/* Toki – KI fließend lernen. Eigenes Farbschema (Violett/Türkis), hell und dunkel. */
:root {
  --bg: #f5f3ff;
  --flaeche: #ffffff;
  --flaeche2: #efebff;
  --text: #1c1832;
  --text2: #5f5a7a;
  --rand: #e3def5;
  --primaer: #6d4aff;
  --primaer-dunkel: #4f2fe0;
  --akzent: #0fb5a3;
  --gold: #f5b301;
  --feuer: #ff7a1a;
  --gut: #12a866;
  --gut-hell: #def8ec;
  --schlecht: #e5394f;
  --schlecht-hell: #fde5e9;
  --gesperrt: #d4cfe4;
  --schatten: 0 6px 20px rgba(60, 40, 140, .10);
  --farbe: var(--primaer);
  --radius: 18px;
  --schrift: ui-rounded, "SF Pro Rounded", "Nunito", "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color-scheme: light;
}
/* Dunkel: folgt dem System; ein ausdrücklich gesetztes data-theme (z. B. in der Vorschau) hat Vorrang. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f0c1d;
    --flaeche: #1a1630;
    --flaeche2: #241f40;
    --text: #f2f0ff;
    --text2: #aaa4c8;
    --rand: #2f2950;
    --primaer: #8466ff;
    --primaer-dunkel: #5f3ff0;
    --gut: #2fd28a;
    --gut-hell: #0f3426;
    --schlecht: #ff5c72;
    --schlecht-hell: #3d1520;
    --gesperrt: #3a3458;
    --schatten: 0 6px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
    --bg: #0f0c1d;
    --flaeche: #1a1630;
    --flaeche2: #241f40;
    --text: #f2f0ff;
    --text2: #aaa4c8;
    --rand: #2f2950;
    --primaer: #8466ff;
    --primaer-dunkel: #5f3ff0;
    --gut: #2fd28a;
    --gut-hell: #0f3426;
    --schlecht: #ff5c72;
    --schlecht-hell: #3d1520;
    --gesperrt: #3a3458;
    --schatten: 0 6px 24px rgba(0, 0, 0, .35);
    color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text); font-family: var(--schrift);
  font-size: 17px; line-height: 1.45; -webkit-tap-highlight-color: transparent;
  min-height: 100vh; overscroll-behavior-y: none;
}
body.in-sitzung { overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--akzent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { line-height: 1.2; margin: 0; }
p { margin: 0; }
.klein { font-size: 13px; color: var(--text2); font-weight: 600; letter-spacing: .01em; }

.app { max-width: 560px; margin: 0 auto; min-height: 100vh; }

/* ---------- Kopfzeile ---------- */
.kopf {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--rand);
}
.kopf-rechts { display: flex; gap: 6px; align-items: center; }
.chip {
  display: inline-flex; align-items: center; gap: 5px; height: 36px; padding: 0 11px; border-radius: 999px;
  border: 1px solid var(--rand); background: var(--flaeche); font-weight: 700; font-size: 15px; white-space: nowrap;
}
.chip-stufe { background: var(--primaer); color: #fff; border-radius: 8px; padding: 1px 6px; font-size: 13px; }
.chip-niveau span:last-child { max-width: 110px; overflow: hidden; text-overflow: ellipsis; }
.chip-serie b { color: var(--feuer); }
.chip-serie.aus { filter: grayscale(1); opacity: .7; }
.chip-tokens b { color: var(--gold); }
.chip-ziel { width: 36px; padding: 0; justify-content: center; position: relative; }
.chip-ziel svg { position: absolute; inset: 3px; }
.chip-ziel-symbol { position: relative; font-size: 13px; color: var(--gut); }

/* ---------- Navigation ---------- */
.navi {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center;
  background: color-mix(in srgb, var(--flaeche) 94%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--rand); padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
}
.navi button {
  flex: 1; max-width: 112px; display: flex; flex-direction: column; align-items: center; gap: 1px;
  background: none; border: 0; padding: 6px 2px; border-radius: 14px; font-size: 12px; font-weight: 700; color: var(--text2);
}
.navi-symbol { font-size: 22px; line-height: 1.1; filter: grayscale(.6); transition: transform .15s; }
.navi button.aktiv { color: var(--primaer); background: var(--flaeche2); }
.navi button.aktiv .navi-symbol { filter: none; transform: scale(1.1); }

.inhalt { padding-bottom: calc(90px + env(safe-area-inset-bottom)); }
.seite { padding: 18px 16px 24px; }
.seiten-titel { font-size: 28px; font-weight: 800; margin-bottom: 4px; }
.seiten-unter { color: var(--text2); margin-bottom: 14px; }
.abschnitt { font-size: 17px; font-weight: 800; margin: 22px 2px 10px; }
.leer { color: var(--text2); text-align: center; padding: 24px 8px; }

/* ---------- Knöpfe ---------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 50px; padding: 0 20px;
  border-radius: 16px; border: 2px solid var(--rand); background: var(--flaeche); font-weight: 800; font-size: 16px;
  letter-spacing: .02em; box-shadow: 0 4px 0 var(--rand); transition: transform .08s, box-shadow .08s, filter .15s;
}
.knopf:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--rand); }
.knopf:disabled { opacity: .45; }
.knopf-breit { width: 100%; }
.knopf-klein { min-height: 40px; padding: 0 14px; font-size: 14px; border-radius: 12px; }
.knopf-primaer { background: linear-gradient(135deg, var(--primaer), color-mix(in srgb, var(--primaer) 70%, var(--akzent))); color: #fff; border-color: transparent; box-shadow: 0 4px 0 var(--primaer-dunkel); }
.knopf-primaer:active:not(:disabled) { box-shadow: 0 1px 0 var(--primaer-dunkel); }
.knopf-primaer:disabled { background: var(--gesperrt); box-shadow: 0 4px 0 color-mix(in srgb, var(--gesperrt) 70%, #000); opacity: 1; color: color-mix(in srgb, var(--text) 45%, transparent); }
.knopf-gut { background: var(--gut); border-color: transparent; color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--gut) 65%, #000); }
.knopf-schlecht { background: var(--schlecht); border-color: transparent; color: #fff; box-shadow: 0 4px 0 color-mix(in srgb, var(--schlecht) 65%, #000); }
.knopf-gold { background: color-mix(in srgb, var(--gold) 18%, var(--flaeche)); border-color: color-mix(in srgb, var(--gold) 55%, transparent); box-shadow: 0 3px 0 color-mix(in srgb, var(--gold) 55%, transparent); }
.knopf-gefahr { background: var(--schlecht); color: #fff; border-color: transparent; box-shadow: 0 4px 0 color-mix(in srgb, var(--schlecht) 65%, #000); }
.knopf-leise { background: transparent; border-color: transparent; box-shadow: none; color: var(--text2); }
.knopf-mini { border: 1px solid var(--rand); background: var(--flaeche); border-radius: 999px; padding: 4px 10px; font-size: 13px; font-weight: 700; }
.pille { border: 2px solid var(--rand); background: var(--flaeche); border-radius: 999px; padding: 8px 14px; font-weight: 700; font-size: 14px; }
.pille.aktiv { border-color: var(--primaer); background: var(--flaeche2); color: var(--primaer); }
.pille-gefahr { color: var(--schlecht); }
.auswahl-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 6px 0 14px; }

/* ---------- Maskottchen & Sprechblase ---------- */
.toki { position: relative; flex: none; display: inline-block; }
.toki svg { display: block; overflow: visible; }
.toki-antenne { animation: leuchten 2.4s ease-in-out infinite; }
.toki-jubel svg { animation: huepfen 1s ease-in-out infinite; }
@keyframes leuchten { 50% { opacity: .45; } }
@keyframes huepfen { 50% { transform: translateY(-6%); } }
/* Schriftgröße setzt app.js passend zur Größe des Maskottchens. */
.toki-outfit { position: absolute; left: 50%; top: -6%; transform: translateX(-50%); line-height: 1; pointer-events: none; }
.toki-outfit-brille { top: 37%; }
.toki-outfit-kopfhoerer { top: 8%; }
.toki-outfit-kappe, .toki-outfit-zylinder, .toki-outfit-doktorhut, .toki-outfit-krone { top: -14%; }

.sprechend { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; }
.blase {
  position: relative; background: var(--flaeche); border: 2px solid var(--rand); border-radius: 18px; padding: 12px 14px;
  font-weight: 600; box-shadow: var(--schatten);
}
.blase::before {
  content: ""; position: absolute; left: -9px; top: 50%; width: 14px; height: 14px; background: var(--flaeche);
  border-left: 2px solid var(--rand); border-bottom: 2px solid var(--rand); transform: translateY(-50%) rotate(45deg);
}

/* ---------- Installations-Hinweis ---------- */
.install-banner { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 10px; background: var(--flaeche); border: 2px solid var(--rand); border-radius: var(--radius); padding: 12px; margin-bottom: 8px; }
.install-symbol { font-size: 28px; }
.install-text { display: grid; min-width: 0; }
.install-text span { font-size: 13px; color: var(--text2); }
.install-zu { background: none; border: 0; color: var(--text2); font-size: 16px; width: 32px; height: 32px; border-radius: 8px; }
.install-schritte { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-weight: 600; }

/* ---------- Lernpfad ---------- */
.pfad { padding-top: 14px; }
.stufe-trenner { display: flex; align-items: center; gap: 10px; margin: 26px 0 14px; flex-wrap: wrap; justify-content: center; }
.stufe-linie { flex: 1; height: 2px; background: var(--rand); min-width: 30px; }
.stufe-name { font-weight: 800; color: var(--text2); font-size: 15px; }
.stufe-name b { color: var(--primaer); }
.stufe-trenner .knopf-mini { flex-basis: 100%; max-width: max-content; }
.einheit-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 10px 0 22px; padding: 16px 18px;
  border-radius: var(--radius); color: #fff; background: linear-gradient(135deg, var(--farbe), color-mix(in srgb, var(--farbe) 60%, #1b1440));
  box-shadow: 0 5px 0 color-mix(in srgb, var(--farbe) 55%, #000);
}
.einheit-ueber { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; opacity: .85; }
.einheit-titel { font-size: 21px; font-weight: 800; margin: 2px 0; }
.einheit-unter { font-size: 14px; opacity: .92; }
.einheit-symbol { font-size: 40px; filter: drop-shadow(0 3px 6px rgba(0, 0, 0, .25)); }

.knoten-zeile { position: relative; display: flex; flex-direction: column; align-items: center; margin: 0 auto 18px; width: 150px; }
.knoten {
  width: 74px; height: 70px; border-radius: 50%; border: 0; display: grid; place-items: center; font-size: 30px;
  background: var(--farbe); color: #fff; box-shadow: 0 7px 0 color-mix(in srgb, var(--farbe) 55%, #000); transition: transform .1s, box-shadow .1s;
}
.knoten:active { transform: translateY(5px); box-shadow: 0 2px 0 color-mix(in srgb, var(--farbe) 55%, #000); }
.knoten-fertig { background: linear-gradient(145deg, var(--gold), #ff9f1c); box-shadow: 0 7px 0 #c27c00; font-weight: 900; }
.knoten-fertig:active { box-shadow: 0 2px 0 #c27c00; }
.knoten-gesperrt { background: var(--gesperrt); box-shadow: 0 7px 0 color-mix(in srgb, var(--gesperrt) 70%, #000); font-size: 24px; }
.knoten-gesperrt .knoten-symbol { filter: grayscale(1); opacity: .7; }
.knoten-aktuell { animation: puls 1.8s ease-in-out infinite; }
@keyframes puls {
  0%, 100% { outline: 6px solid color-mix(in srgb, var(--farbe) 30%, transparent); outline-offset: 4px; }
  50% { outline: 10px solid color-mix(in srgb, var(--farbe) 12%, transparent); outline-offset: 7px; }
}
.knoten-meilenstein { width: 86px; height: 80px; border-radius: 26px; font-size: 36px; }
.knoten-titel { margin-top: 12px; font-size: 13px; font-weight: 700; color: var(--text2); text-align: center; line-height: 1.25; }
.knoten-gesperrt + .knoten-titel { opacity: .6; }
.start-blase {
  position: absolute; top: -40px; background: var(--flaeche); color: var(--farbe); border: 2px solid var(--rand); font-weight: 900;
  font-size: 14px; letter-spacing: .08em; padding: 5px 12px; border-radius: 12px; animation: schweben 1.6s ease-in-out infinite; z-index: 1;
}
.start-blase::after {
  content: ""; position: absolute; left: 50%; bottom: -8px; width: 12px; height: 12px; background: var(--flaeche);
  border-right: 2px solid var(--rand); border-bottom: 2px solid var(--rand); transform: translateX(-50%) rotate(45deg);
}
.knoten-zeile:has(.start-blase) { margin-top: 46px; }
@keyframes schweben { 50% { transform: translateY(-5px); } }
.ziel-karte { text-align: center; background: var(--flaeche); border: 2px solid var(--rand); border-radius: var(--radius); padding: 22px; margin-top: 20px; display: grid; justify-items: center; gap: 8px; }

/* ---------- Karten, Kacheln ---------- */
.karte { background: var(--flaeche); border: 2px solid var(--rand); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.karten-titel { font-size: 16px; font-weight: 800; margin-bottom: 10px; }
.niveau-kopf { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.niveau-name { font-size: 22px; font-weight: 800; }
.balken { height: 14px; border-radius: 999px; background: var(--flaeche2); overflow: hidden; margin: 6px 0 14px; }
.balken-fuellung { height: 100%; width: 0; border-radius: inherit; background: linear-gradient(90deg, var(--primaer), var(--akzent)); transition: width .4s ease; }
.leiter { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.leiter-stufe { display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--text2); text-align: center; font-weight: 700; }
.leiter-stufe b { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: var(--flaeche2); color: var(--text2); font-size: 13px; }
.leiter-stufe.ok b { background: var(--gold); color: #fff; }
.leiter-stufe.jetzt b { background: var(--primaer); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--primaer) 25%, transparent); }
.kacheln { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 14px; }
.kachel { background: var(--flaeche); border: 2px solid var(--rand); border-radius: 16px; padding: 12px; display: grid; gap: 1px; }
.kachel-symbol { font-size: 20px; }
.kachel b { font-size: 20px; }
.kachel span:last-child { font-size: 13px; color: var(--text2); font-weight: 600; }
.woche { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; height: 140px; align-items: end; }
.woche-tag { display: grid; grid-template-rows: 16px 1fr 18px; height: 100%; justify-items: center; font-size: 12px; color: var(--text2); font-weight: 700; }
.saeule-raum { width: 100%; display: flex; align-items: flex-end; justify-content: center; }
.saeule { width: 70%; max-width: 30px; border-radius: 8px 8px 4px 4px; background: color-mix(in srgb, var(--primaer) 55%, var(--flaeche2)); }
.saeule.ziel { background: linear-gradient(180deg, var(--gold), var(--feuer)); }
.woche-xp { font-size: 11px; }
.abzeichen { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.abzeichen-eins { background: var(--flaeche); border: 2px solid var(--rand); border-radius: 16px; padding: 12px; display: grid; gap: 2px; justify-items: start; opacity: .55; }
.abzeichen-eins.ok { opacity: 1; border-color: color-mix(in srgb, var(--gold) 60%, var(--rand)); }
.abzeichen-symbol { font-size: 28px; filter: grayscale(1); }
.abzeichen-eins.ok .abzeichen-symbol { filter: none; }
.abzeichen-eins b { font-size: 15px; }
.abzeichen-eins span:last-child { font-size: 12px; color: var(--text2); }

/* ---------- Üben ---------- */
.uebung-karte { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; align-items: center; background: var(--flaeche); border: 2px solid var(--rand); border-radius: var(--radius); padding: 16px; margin-bottom: 12px; }
.uebung-symbol { font-size: 36px; grid-row: span 2; }
.uebung-text h3 { font-size: 18px; }
.uebung-text p { color: var(--text2); font-size: 14px; }
.uebung-karte .knopf { grid-column: 2; justify-self: start; }
.uebung-karte.gesperrt { opacity: .7; }

/* ---------- Lexikon ---------- */
.suche, .eingabe { width: 100%; font: inherit; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--rand); background: var(--flaeche); color: var(--text); margin-bottom: 12px; }
.suche:focus, .eingabe:focus { outline: none; border-color: var(--primaer); }
.lexikon-gruppe { font-size: 15px; font-weight: 800; margin: 18px 2px 8px; color: var(--farbe); }
.lexikon-eintrag { background: var(--flaeche); border: 2px solid var(--rand); border-left: 5px solid var(--farbe); border-radius: 14px; padding: 10px 14px; margin-bottom: 8px; }
.lexikon-eintrag p { color: var(--text2); font-size: 15px; margin-top: 2px; }
.lexikon-liste .lexikon-eintrag { --farbe: var(--primaer); }

/* ---------- Profil & Shop ---------- */
.profil-kopf { display: flex; align-items: center; gap: 16px; }
.profil-name { flex: 1; }
.profil-name .eingabe { margin: 4px 0 0; }
.shop { display: grid; gap: 10px; }
.shop-eins { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; }
.shop-symbol { font-size: 30px; text-align: center; }
.shop-text { display: grid; }
.shop-text span { font-size: 13px; color: var(--text2); }
.einstellungen label { display: block; }
.ueber p { font-size: 14px; color: var(--text2); margin-bottom: 8px; }

/* ---------- Einstieg ---------- */
.einstieg { min-height: 100vh; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 16px; text-align: center; padding-top: 40px; }
.einstieg .sprechend { text-align: left; align-self: stretch; }
.einstieg-titel { font-size: 32px; font-weight: 900; }
.einstieg-text { color: var(--text2); max-width: 420px; }
.einstieg-liste { list-style: none; padding: 0; margin: 4px 0 10px; display: grid; gap: 8px; text-align: left; font-weight: 600; }
.ziel-liste { display: grid; gap: 10px; width: 100%; }
.ziel-wahl { display: grid; grid-template-columns: 1fr auto; text-align: left; gap: 2px 10px; padding: 14px 16px; border-radius: 16px; border: 2px solid var(--rand); background: var(--flaeche); box-shadow: 0 4px 0 var(--rand); }
.ziel-wahl:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--rand); }
.ziel-wahl b { font-size: 17px; }
.ziel-wahl span { color: var(--text2); font-size: 14px; grid-column: 1; }
.ziel-wahl .ziel-xp { grid-column: 2; grid-row: 1 / span 2; align-self: center; color: var(--primaer); font-weight: 800; }
.ziel-wahl.empfohlen { border-color: var(--primaer); }

/* ---------- Lern-Runde ---------- */
.sitzung {
  position: fixed; inset: 0; z-index: 40; background: var(--bg); display: flex; flex-direction: column;
  max-width: 560px; margin: 0 auto; padding: env(safe-area-inset-top) 0 env(safe-area-inset-bottom);
}
.sitzung-kopf { display: flex; align-items: center; gap: 12px; padding: 14px 16px 6px; }
.schliessen { background: none; border: 0; font-size: 22px; color: var(--text2); width: 36px; height: 36px; border-radius: 10px; flex: none; }
.balken-sitzung { flex: 1; margin: 0; }
.balken-sitzung .balken-fuellung { background: linear-gradient(90deg, var(--farbe), color-mix(in srgb, var(--farbe) 55%, var(--akzent))); }
.balken-blitz .balken-fuellung { transition: width .2s linear; background: linear-gradient(90deg, var(--feuer), var(--gold)); }
.combo { min-width: 46px; font-weight: 900; color: var(--feuer); text-align: right; }
.combo.plopp { animation: plopp .35s ease; }
@keyframes plopp { 50% { transform: scale(1.35); } }
.sitzung-mitte { flex: 1; overflow-y: auto; padding: 14px 16px 20px; display: flex; flex-direction: column; }
.sitzung-fuss { padding: 12px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 2px solid var(--rand); display: grid; gap: 8px; background: var(--bg); }
.fuss-hinweis { text-align: center; color: var(--text2); font-size: 14px; font-weight: 600; min-height: 50px; display: grid; place-items: center; }
.nochmal { align-self: flex-start; font-size: 13px; font-weight: 800; color: var(--feuer); background: color-mix(in srgb, var(--feuer) 14%, transparent); padding: 3px 10px; border-radius: 999px; margin-bottom: 10px; }

.lernkarte { background: var(--flaeche); border: 2px solid var(--rand); border-top: 6px solid var(--farbe); border-radius: var(--radius); padding: 18px; box-shadow: var(--schatten); margin: auto 0; }
.lernkarte-kopf { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.lernkarte-label { font-size: 13px; font-weight: 800; color: var(--farbe); text-transform: uppercase; letter-spacing: .06em; }
.lernkarte-titel { font-size: 23px; font-weight: 800; margin-bottom: 10px; }
.lernkarte-text { font-size: 17px; line-height: 1.5; }
.lernkarte-text strong { color: var(--farbe); }
.lernkarte-beispiel { margin-top: 14px; background: var(--flaeche2); border-radius: 12px; padding: 10px 14px; border-left: 4px solid var(--akzent); }
.lernkarte-beispiel p { font-style: italic; margin-top: 2px; }

.aufgabe { display: flex; flex-direction: column; gap: 14px; }
.aufgabe-label { font-size: 13px; font-weight: 800; color: var(--farbe); text-transform: uppercase; letter-spacing: .06em; }
.aufgabe-frage { font-size: 22px; font-weight: 800; line-height: 1.3; }
.optionen { display: grid; gap: 10px; }
.optionen-wahrfalsch { grid-template-columns: 1fr 1fr; }
.optionen-luecke { grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); }
.option {
  display: flex; align-items: center; gap: 12px; text-align: left; padding: 14px 14px; min-height: 56px; border-radius: 16px;
  border: 2px solid var(--rand); background: var(--flaeche); box-shadow: 0 4px 0 var(--rand); font-weight: 600; font-size: 16px;
  transition: transform .08s, box-shadow .08s, border-color .15s, background .15s;
}
.option:active:not(:disabled) { transform: translateY(3px); box-shadow: 0 1px 0 var(--rand); }
.option-buchstabe { flex: none; min-width: 28px; height: 28px; padding: 0 6px; border-radius: 8px; border: 2px solid var(--rand); display: grid; place-items: center; font-size: 13px; font-weight: 800; color: var(--text2); }
.option-luecke, .option-wahrfalsch { justify-content: center; text-align: center; font-weight: 800; }
.option-prompt { flex-direction: column; align-items: flex-start; gap: 6px; }
.option-prompt .option-buchstabe { min-width: auto; height: 24px; font-size: 12px; }
.option-prompt .option-text { font-family: ui-monospace, "SF Mono", "Cascadia Mono", Menlo, monospace; font-size: 14.5px; font-weight: 500; line-height: 1.45; }
.option.gewaehlt { border-color: var(--farbe); background: color-mix(in srgb, var(--farbe) 12%, var(--flaeche)); box-shadow: 0 4px 0 color-mix(in srgb, var(--farbe) 55%, transparent); }
.option.gewaehlt .option-buchstabe { border-color: var(--farbe); color: var(--farbe); }
.option.richtig { border-color: var(--gut); background: var(--gut-hell); box-shadow: 0 4px 0 color-mix(in srgb, var(--gut) 60%, transparent); }
.option.falsch { border-color: var(--schlecht); background: var(--schlecht-hell); box-shadow: 0 4px 0 color-mix(in srgb, var(--schlecht) 60%, transparent); }
.option:disabled { opacity: 1; }
.option-blitz { justify-content: center; text-align: center; }
.luecke-feld { display: inline-block; min-width: 90px; border-bottom: 3px solid var(--farbe); margin: 0 4px; padding: 0 4px; color: var(--farbe); text-align: center; }
.luecke-feld.gefuellt { background: color-mix(in srgb, var(--farbe) 12%, transparent); border-radius: 8px 8px 0 0; }

.paare { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.paare-spalte { display: grid; gap: 10px; align-content: start; }
.paar { padding: 12px 10px; min-height: 58px; border-radius: 14px; border: 2px solid var(--rand); background: var(--flaeche); box-shadow: 0 4px 0 var(--rand); font-weight: 700; font-size: 15px; line-height: 1.25; }
.paar-rechts { font-weight: 500; font-size: 14px; text-align: left; }
.paar.gewaehlt { border-color: var(--farbe); background: color-mix(in srgb, var(--farbe) 12%, var(--flaeche)); }
.paar.richtig { border-color: var(--gut); background: var(--gut-hell); opacity: .65; box-shadow: none; }
.wackeln { animation: wackeln .4s; border-color: var(--schlecht) !important; background: var(--schlecht-hell) !important; }
@keyframes wackeln { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.reihe-ablage { min-height: 90px; border: 2px dashed var(--rand); border-radius: 16px; padding: 10px; display: grid; gap: 8px; align-content: start; }
.reihe-hinweis { color: var(--text2); font-size: 14px; align-self: center; text-align: center; padding: 16px 4px; }
.reihe-vorrat { display: grid; gap: 8px; }
.reihe-stueck { display: flex; align-items: center; gap: 10px; text-align: left; padding: 11px 12px; border-radius: 14px; border: 2px solid var(--rand); background: var(--flaeche); box-shadow: 0 3px 0 var(--rand); font-weight: 600; font-size: 15px; }
.reihe-stueck b { flex: none; width: 26px; height: 26px; border-radius: 50%; background: var(--farbe); color: #fff; display: grid; place-items: center; font-size: 13px; }
.reihe-stueck.gesetzt { border-color: color-mix(in srgb, var(--farbe) 50%, var(--rand)); }
.reihe-stueck.richtig { border-color: var(--gut); background: var(--gut-hell); }
.reihe-stueck.falsch { border-color: var(--schlecht); background: var(--schlecht-hell); }
.reihe-stueck:disabled { opacity: 1; }

.rueckmeldung { border-radius: 16px; padding: 14px; display: grid; gap: 8px; animation: hoch .22s ease; }
@keyframes hoch { from { transform: translateY(16px); opacity: 0; } }
.rueckmeldung.gut { background: var(--gut-hell); }
.rueckmeldung.schlecht { background: var(--schlecht-hell); }
.rueckmeldung-titel { display: flex; align-items: center; gap: 8px; font-size: 20px; }
.rueckmeldung.gut .rueckmeldung-titel { color: var(--gut); }
.rueckmeldung.schlecht .rueckmeldung-titel { color: var(--schlecht); }
.rueckmeldung-titel span { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 900; }
.rueckmeldung.gut .rueckmeldung-titel span { background: var(--gut); }
.rueckmeldung.schlecht .rueckmeldung-titel span { background: var(--schlecht); }
.rueckmeldung-loesung p { font-weight: 700; }
.rueckmeldung-text { font-size: 15px; max-height: 32vh; overflow-y: auto; }

.ergebnis { flex: 1; overflow-y: auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px 16px; text-align: center; }
.ergebnis-titel { font-size: 28px; font-weight: 900; }
.ergebnis-unter { color: var(--text2); max-width: 420px; }
.ergebnis-kacheln { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: 100%; margin-top: 8px; }
.ergebnis-kachel { border-radius: 14px; border: 2px solid; padding: 10px 4px; display: grid; gap: 2px; }
.ergebnis-kachel b { font-size: 19px; }
.ergebnis-kachel span { font-size: 12px; font-weight: 700; color: var(--text2); }
.k-xp { border-color: var(--gold); } .k-xp b { color: color-mix(in srgb, var(--gold) 80%, var(--text)); }
.k-quote { border-color: var(--gut); } .k-quote b { color: var(--gut); }
.k-tokens { border-color: var(--feuer); } .k-tokens b { color: var(--feuer); }
.k-zeit { border-color: var(--akzent); } .k-zeit b { color: var(--akzent); }
.ergebnis-liste { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 8px; width: 100%; }
.ergebnis-liste li { display: flex; gap: 10px; align-items: center; background: var(--flaeche); border: 2px solid var(--rand); border-radius: 14px; padding: 10px 14px; font-weight: 700; text-align: left; }
.ergebnis-liste li span:first-child { font-size: 22px; }

/* ---------- Fenster, Toasts, Konfetti ---------- */
.schicht { position: fixed; inset: 0; z-index: 60; background: rgba(10, 6, 30, .5); display: flex; align-items: flex-end; justify-content: center; animation: einblenden .15s; }
@keyframes einblenden { from { opacity: 0; } }
.blatt { width: 100%; max-width: 560px; background: var(--flaeche); border-radius: 24px 24px 0 0; padding: 22px 18px calc(18px + env(safe-area-inset-bottom)); display: grid; gap: 10px; animation: hoch .2s ease; }
.blatt-titel { font-size: 21px; font-weight: 800; }
.blatt-text { color: var(--text2); }
.blatt-knoepfe { display: grid; gap: 8px; margin-top: 6px; }
.toasts { position: fixed; top: calc(12px + env(safe-area-inset-top)); left: 0; right: 0; z-index: 80; display: grid; justify-items: center; gap: 8px; pointer-events: none; padding: 0 16px; }
.toast { display: flex; align-items: center; gap: 8px; background: var(--text); color: var(--bg); padding: 10px 16px; border-radius: 14px; font-weight: 700; font-size: 15px; box-shadow: var(--schatten); animation: hoch .2s ease; max-width: 520px; transition: opacity .35s, transform .35s; }
.toast.weg { opacity: 0; transform: translateY(-10px); }
.toast-symbol { font-size: 18px; }
.konfetti { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 90; display: none; }
.konfetti.an { display: block; }

@media (min-width: 600px) {
  .sitzung { border-left: 1px solid var(--rand); border-right: 1px solid var(--rand); }
}
@media (max-width: 380px) {
  .chip { padding: 0 8px; font-size: 14px; }
  .chip-niveau span:last-child { display: none; }
  .ergebnis-kacheln { grid-template-columns: repeat(2, 1fr); }
  .aufgabe-frage { font-size: 20px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
