/* Deutsch-Detektiv – Julias Wahl (1.10.2026):
   hell  = Variante A „Mint-Glas“ (Mint → Türkis → Flieder, Milchglas-Karten)
   dunkel = Variante C „Nacht-Detektiv“ (Nachtblau, leuchtendes Mint/Flieder)
   Umschalten: data-theme="light|dark" am <html>, sonst folgt die App dem iPad. */

:root {
  --stage: linear-gradient(135deg, #c9f5ea 0%, #bfe9f5 45%, #e3d6fb 100%);
  --stage-fix: #d4eff0;
  --surface: rgba(255, 255, 255, .74);
  --surface-fest: #ffffff;
  --fg: #1d3b44;
  --muted: #5d7a82;
  --line: #cfe7e6;
  --card: rgba(255, 255, 255, .78);
  --shadow: 0 10px 30px -12px rgba(30, 90, 100, .35), inset 0 1px 0 rgba(255, 255, 255, .8);
  --rand: 1px solid rgba(255, 255, 255, .7);
  --glas: blur(14px);
  --pill: rgba(255, 255, 255, .8);
  --pillfg: #127a74;
  --hero: linear-gradient(120deg, #3fd1b9, #45b6e3 60%, #9d8cf0);
  --herofg: #ffffff;
  --btn: linear-gradient(120deg, #2ec4a9, #3aa9dc);
  --btnfg: #ffffff;
  --btnschatten: 0 8px 18px -8px #2aa9a0;
  --btn2: rgba(255, 255, 255, .7);
  --btn2fg: #1d3b44;
  --paper: #fffffff2;
  --paperfg: #24324a;
  --paperline: #b9dfe6;
  --rainbow: linear-gradient(120deg, #7fe3cf, #7cc8f2 35%, #b9a3f5 65%, #f7a8c8);
  --fokus: #2ec4a9;
  --warn-bg: #fff4d6;
  --warn-fg: #7a5600;
  --fehler-bg: #ffe3df;
  --fehler-fg: #9b2c22;
  --ok: #138a63;
  --eltern-akzent: #9b7be0;
  --kat-R: #e8655a; --kat-Z: #4a98e0; --kat-G: #21a891; --kat-Grkl: #ef9443;
  --kat-ZsGs: #9b7be0; --kat-Sb: #d9b532; --kat-H: #8c86a8;
  --font-head: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-hand: "Quicksand", "Nunito", system-ui, sans-serif;
  --head-w: 900;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --stage: radial-gradient(120% 90% at 10% 0%, #25305a 0%, #141729 60%);
    --stage-fix: #161a2e;
    --surface: #1c2140;
    --surface-fest: #1c2140;
    --fg: #eef0ff;
    --muted: #a2a8cf;
    --line: #323a66;
    --card: #252b52;
    --shadow: 0 0 0 1px #2c3462, 0 20px 40px -20px #000;
    --rand: 1px solid #2c3462;
    --glas: none;
    --pill: #2a3160;
    --pillfg: #8ff0d9;
    --hero: linear-gradient(120deg, #253064, #2c2860);
    --herofg: #eef0ff;
    --btn: linear-gradient(120deg, #6ff0d2, #87c7ff);
    --btnfg: #121530;
    --btnschatten: 0 0 22px -6px #6ff0d2;
    --btn2: #2a3160;
    --btn2fg: #eef0ff;
    --paper: #f7f5ff;
    --paperfg: #24243c;
    --paperline: #d6d2f0;
    --rainbow: linear-gradient(120deg, #6ff0d2, #87c7ff 35%, #c3a6ff 65%, #ffa8d0);
    --fokus: #6ff0d2;
    --warn-bg: #3d3420;
    --warn-fg: #ffd98a;
    --fehler-bg: #47202a;
    --fehler-fg: #ffb3ad;
    --ok: #6ff0d2;
    --eltern-akzent: #c3a6ff;
    --font-head: "Lexend", "Nunito", system-ui, sans-serif;
    --head-w: 700;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --stage: radial-gradient(120% 90% at 10% 0%, #25305a 0%, #141729 60%);
  --stage-fix: #161a2e;
  --surface: #1c2140;
  --surface-fest: #1c2140;
  --fg: #eef0ff;
  --muted: #a2a8cf;
  --line: #323a66;
  --card: #252b52;
  --shadow: 0 0 0 1px #2c3462, 0 20px 40px -20px #000;
  --rand: 1px solid #2c3462;
  --glas: none;
  --pill: #2a3160;
  --pillfg: #8ff0d9;
  --hero: linear-gradient(120deg, #253064, #2c2860);
  --herofg: #eef0ff;
  --btn: linear-gradient(120deg, #6ff0d2, #87c7ff);
  --btnfg: #121530;
  --btnschatten: 0 0 22px -6px #6ff0d2;
  --btn2: #2a3160;
  --btn2fg: #eef0ff;
  --paper: #f7f5ff;
  --paperfg: #24243c;
  --paperline: #d6d2f0;
  --rainbow: linear-gradient(120deg, #6ff0d2, #87c7ff 35%, #c3a6ff 65%, #ffa8d0);
  --fokus: #6ff0d2;
  --warn-bg: #3d3420;
  --warn-fg: #ffd98a;
  --fehler-bg: #47202a;
  --fehler-fg: #ffb3ad;
  --ok: #6ff0d2;
  --eltern-akzent: #c3a6ff;
  --font-head: "Lexend", "Nunito", system-ui, sans-serif;
  --head-w: 700;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--stage-fix);
  background-image: var(--stage);
  background-attachment: fixed;
  color: var(--fg);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.5;
  -webkit-text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}
button, input, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--fokus); outline-offset: 2px; }
/* Standardgröße für Symbole – ohne sie bläht sich ein SVG in Flex-Zeilen auf (z. B. Eltern-Band) */
.ico { width: 1.3em; height: 1.3em; flex: none; vertical-align: -0.2em; }

/* ---------- Rahmen ---------- */
.seite { max-width: 1240px; margin: 0 auto; padding-inline: max(16px, env(safe-area-inset-left, 0px));
  padding-block: calc(env(safe-area-inset-top, 0px) + 14px) calc(env(safe-area-inset-bottom, 0px) + 40px);
  display: flex; flex-direction: column; gap: 18px; }
.kopfleiste { display: flex; align-items: center; gap: 10px; }
.kopfleiste .marke { display: flex; align-items: center; gap: 10px; font-family: var(--font-head);
  font-weight: var(--head-w); font-size: 1.15rem; margin-right: auto; cursor: pointer; background: none; border: 0; padding: 0; }
.kopfleiste .marke svg { width: 34px; height: 34px; }
.rundknopf { width: 46px; height: 46px; border-radius: 50%; border: var(--rand); background: var(--pill);
  color: var(--fg); display: grid; place-items: center; cursor: pointer; box-shadow: var(--shadow); }
.rundknopf svg { width: 22px; height: 22px; }
.punkte { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; padding: 8px 14px; border-radius: 999px;
  background: var(--pill); color: var(--pillfg); font-variant-numeric: tabular-nums; }

h1, h2, h3 { font-family: var(--font-head); font-weight: var(--head-w); margin: 0; line-height: 1.15; text-wrap: balance; }
h1 { font-size: clamp(1.6rem, 4vw, 2.1rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
.sub { color: var(--muted); margin: 4px 0 0; }
.klein { font-size: .88rem; color: var(--muted); }

.karte { background: var(--surface); border: var(--rand); border-radius: 22px; padding: 18px; box-shadow: var(--shadow);
  -webkit-backdrop-filter: var(--glas); backdrop-filter: var(--glas); display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.hero { border-radius: 22px; padding: 18px 20px; background: var(--hero); color: var(--herofg); display: flex; gap: 16px;
  align-items: center; }
.hero h1, .hero h2 { color: inherit; }
.hero .sub { color: inherit; opacity: .9; }
.raster { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

/* ---------- Knöpfe ---------- */
.btn { border: 0; border-radius: 16px; padding: 14px 18px; font-weight: 800; font-size: 1rem; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; background: var(--btn); color: var(--btnfg);
  box-shadow: var(--btnschatten); min-height: 52px; text-decoration: none; }
.btn svg { width: 22px; height: 22px; flex: none; }
.btn.zweit { background: var(--btn2); color: var(--btn2fg); box-shadow: none; border: var(--rand); }
.btn.klein { min-height: 42px; padding: 9px 14px; font-size: .92rem; border-radius: 13px; }
.btn.breit { width: 100%; }
.btn.gefahr { background: var(--fehler-bg); color: var(--fehler-fg); box-shadow: none; }
.btn:disabled { opacity: .5; cursor: default; }
.knopfreihe { display: flex; gap: 10px; flex-wrap: wrap; }
.knopfreihe .btn { flex: 1 1 180px; }

/* ---------- Formulare ---------- */
.feld { display: flex; flex-direction: column; gap: 6px; }
.feld label, .feld .lbl { font-weight: 700; font-size: .92rem; }
.eingabe { width: 100%; min-height: 50px; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line);
  background: var(--surface-fest); color: var(--fg); font-size: 1.05rem; }
textarea.eingabe { min-height: 90px; resize: vertical; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { border: 2px solid var(--line); background: var(--card); color: var(--fg); padding: 9px 14px; border-radius: 999px;
  font-weight: 700; cursor: pointer; min-height: 44px; }
.chip[aria-pressed="true"] { border-color: transparent; background: var(--btn); color: var(--btnfg); }
.meldung-zeile { padding: 12px 14px; border-radius: 14px; background: var(--fehler-bg); color: var(--fehler-fg); font-weight: 700; }
.meldung-zeile.info { background: var(--warn-bg); color: var(--warn-fg); }
.meldung-zeile:empty { display: none; }

/* ---------- Listen ---------- */
.liste { display: flex; flex-direction: column; gap: 10px; }
.eintrag { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; background: var(--card);
  border: 0; text-align: left; width: 100%; cursor: pointer; color: var(--fg); min-height: 60px; }
.eintrag .t { min-width: 0; flex: 1; }
.eintrag .t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eintrag .t small { color: var(--muted); }
.symbol { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; flex: none; background: var(--rainbow);
  color: #1d2240; font-weight: 900; }
.status { font-size: .78rem; font-weight: 800; padding: 4px 10px; border-radius: 999px; background: var(--pill); color: var(--pillfg);
  white-space: nowrap; }
.status.warten { background: var(--warn-bg); color: var(--warn-fg); }
.leer { text-align: center; color: var(--muted); padding: 18px; }

/* ---------- Fotos ---------- */
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.foto { position: relative; border-radius: 16px; overflow: hidden; background: var(--card); aspect-ratio: 3 / 4; max-width: 100%; }
.foto img { width: 100%; height: 100%; object-fit: cover; display: block; }
.foto .nr { position: absolute; top: 8px; left: 8px; background: var(--rainbow); color: #1d2240; font-weight: 900;
  width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; }
.foto .werkzeuge { position: absolute; bottom: 6px; left: 6px; right: 6px; display: flex; gap: 6px; justify-content: space-between; }
.foto .werkzeuge button { width: 40px; height: 40px; border-radius: 12px; border: 0; background: rgba(20, 24, 50, .65); color: #fff;
  cursor: pointer; display: grid; place-items: center; }
.foto .werkzeuge svg { width: 20px; height: 20px; }
.foto-neu { border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted);
  cursor: pointer; font-weight: 700; padding: 10px; }
.foto-neu svg { width: 38px; height: 38px; display: block; margin: 0 auto 6px; }

/* ---------- Abschrift prüfen ---------- */
.pruef-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: start; }
/* iPad Pro 11" hoch (834 px): eine Spalte – Foto oben, nicht klebend, sonst verdeckt es die Zeilen */
@media (max-width: 1000px) {
  .pruef-layout { grid-template-columns: 1fr; }
  .pruef-layout .foto-gross { position: static; max-height: 42vh; }
}
.foto-gross { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 10px); border-radius: 18px; overflow: auto;
  max-height: 80vh; background: var(--card); -webkit-overflow-scrolling: touch; }
.foto-gross img { width: 100%; display: block; }
.seitenwahl { display: flex; gap: 6px; padding: 8px; flex-wrap: wrap; }
.zeilen { display: flex; flex-direction: column; gap: 6px; }
.zeile-edit { display: grid; grid-template-columns: 34px minmax(0, 1fr) 40px; gap: 6px; align-items: center; }
.zeile-edit .znr { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; }
.zeile-edit input { min-height: 46px; padding: 8px 10px; border-radius: 12px; border: 2px solid var(--line);
  background: var(--paper); color: var(--paperfg); font-family: var(--font-hand); font-size: 1.08rem; width: 100%; }
.zeile-edit.unsicher input { border-color: #e9c84a; background: #fff8dc; }
.zeile-edit .weg { width: 40px; height: 40px; border-radius: 12px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.unsicher-hinweis { grid-column: 2; font-size: .8rem; color: var(--warn-fg); background: var(--warn-bg); border-radius: 8px; padding: 2px 8px; width: fit-content; }

/* ---------- Text mit Markierungen ---------- */
.heft { font-family: var(--font-hand); font-size: 1.22rem; line-height: 2.1; padding: 14px 18px; border-radius: 18px;
  background: var(--paper); color: var(--paperfg); overflow-x: auto; }
.heft .hz { white-space: pre; min-height: 2.1em; border-bottom: 1px solid var(--paperline); width: max-content; min-width: 100%; }
.mark { border-bottom: 3px solid var(--k, var(--kat-H)); background: color-mix(in srgb, var(--k, var(--kat-H)) 18%, transparent);
  border-radius: 4px; padding: 0 2px; cursor: pointer; }
.mark.h { border-bottom-style: dashed; }
.mark.aus { opacity: .45; text-decoration: line-through; }
.mark.ok { background: transparent; border-bottom-color: var(--ok); }
.mark.aktiv { outline: 3px solid var(--k); outline-offset: 1px; }
.legende { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: .85rem; color: var(--muted); }
.legende span { display: inline-flex; align-items: center; gap: 6px; }
.legende i { width: 18px; height: 0; border-bottom: 3px solid var(--k); display: inline-block; }

/* ---------- Elternmodus ---------- */
.eltern-band { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 16px;
  background: color-mix(in srgb, var(--eltern-akzent) 18%, var(--surface-fest)); border: 2px solid var(--eltern-akzent); font-weight: 700; }
.eltern-band .uhr { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; }
.fkarte { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 12px 14px;
  border-radius: 16px; background: var(--card); border-left: 5px solid var(--k, var(--kat-H)); }
.fkarte .kz { font-weight: 900; color: var(--k); text-align: center; font-size: .95rem; }
.fkarte .was { min-width: 0; }
.fkarte .was .alt { text-decoration: line-through; text-decoration-color: var(--k); opacity: .8; }
.fkarte .was .neu { font-weight: 800; }
.fkarte .was small { display: block; color: var(--muted); }
.fkarte.abgelehnt { opacity: .5; }
.fkarte .aktionen { display: flex; gap: 6px; }
.fkarte .aktionen button { width: 46px; height: 46px; border-radius: 14px; border: 2px solid var(--line); background: var(--surface-fest);
  color: var(--fg); cursor: pointer; display: grid; place-items: center; }
.fkarte .aktionen button[aria-pressed="true"].ja { background: var(--ok); border-color: var(--ok); color: #fff; }
.fkarte .aktionen button[aria-pressed="true"].nein { background: var(--fehler-fg); border-color: var(--fehler-fg); color: #fff; }
.fkarte .aktionen svg { width: 22px; height: 22px; }
.badge-pruefen { display: inline-block; font-size: .72rem; font-weight: 800; padding: 2px 8px; border-radius: 999px;
  background: var(--warn-bg); color: var(--warn-fg); margin-left: 6px; }
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.zahl { background: var(--card); border-radius: 16px; padding: 12px 14px; }
.zahl b { display: block; font-size: 1.6rem; font-family: var(--font-head); font-variant-numeric: tabular-nums; }
.zahl span { color: var(--muted); font-size: .85rem; }

/* ---------- Warten (KI arbeitet) ---------- */
.warten-box { display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 30px 10px; text-align: center; }
.lupe-anim { width: 92px; height: 92px; color: var(--fg); }
@media (prefers-reduced-motion: no-preference) {
  .lupe-anim { animation: suchen 2.4s ease-in-out infinite; }
  .karte, .hero { animation: rein .35s ease-out both; }
}
@keyframes suchen { 0%, 100% { transform: translate(-14px, 0) rotate(-8deg); } 50% { transform: translate(14px, -6px) rotate(8deg); } }
@keyframes rein { from { transform: translateY(6px); opacity: .6; } to { transform: none; opacity: 1; } }
.fortschritt { width: min(320px, 80%); height: 10px; border-radius: 99px; background: var(--card); overflow: hidden; }
.fortschritt i { display: block; height: 100%; width: 40%; border-radius: 99px; background: var(--rainbow); }
@media (prefers-reduced-motion: no-preference) { .fortschritt i { animation: laufen 1.6s ease-in-out infinite; } }
@keyframes laufen { 0% { transform: translateX(-100%); } 100% { transform: translateX(260%); } }

/* ---------- Dialoge (statt alert/confirm) ---------- */
.schleier { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 20, 40, .45); display: flex; align-items: center;
  justify-content: center; padding: 16px; }
.dialog { background: var(--surface-fest); color: var(--fg); border-radius: 22px; padding: 22px; width: min(420px, 100%);
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .5); display: flex; flex-direction: column; gap: 14px; max-height: 90vh; overflow: auto; }
.pinfeld { font-size: 2rem; letter-spacing: .5em; text-align: center; font-variant-numeric: tabular-nums; }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.pinpad button { min-height: 62px; border-radius: 16px; border: var(--rand); background: var(--card); font-size: 1.4rem; font-weight: 800; cursor: pointer; color: var(--fg); }

/* ---------- Anmeldung ---------- */
.anmeldung { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.anmeldung .karte { width: min(400px, 100%); }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: calc(env(safe-area-inset-bottom, 0px) + 20px); z-index: 1100;
  background: var(--fg); color: var(--stage-fix); padding: 12px 18px; border-radius: 14px; font-weight: 700; max-width: calc(100% - 32px); }

@media (max-width: 520px) {
  body { font-size: 16px; }
  .karte { padding: 14px; border-radius: 18px; }
  .fkarte { grid-template-columns: 36px minmax(0, 1fr); }
  .fkarte .aktionen { grid-column: 1 / -1; justify-content: flex-end; }
}

/* ---------- Lernmodus & Spiel (Phase 2/3) ---------- */
.ring { width: 74px; height: 74px; flex: none; }
.serie-zeile { font-weight: 700; }
.balken-gross { height: 12px; border-radius: 99px; background: var(--card); overflow: hidden; }
.balken-gross i { display: block; height: 100%; border-radius: 99px; background: var(--rainbow); }
.abzeichen-reihe { display: flex; gap: 12px; flex-wrap: wrap; }
.abzeichen { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 104px; text-align: center; font-size: .8rem; }
.abzeichen span { width: 64px; height: 64px; border-radius: 50%; background: var(--rainbow); display: grid; place-items: center;
  color: #1d2240; box-shadow: 0 10px 24px -12px var(--fokus); }
.abzeichen svg { width: 30px; height: 30px; }
.akte { border-left: 6px solid var(--k, var(--fokus)); }
.akte-kopf { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.akte-nr { font-family: var(--font-head); font-weight: var(--head-w); font-size: 1.15rem; }
.kat-chip { display: inline-flex; align-items: center; gap: 6px; font-weight: 800; font-size: .85rem; padding: 4px 12px;
  border-radius: 999px; background: color-mix(in srgb, var(--k) 20%, transparent); }
.kat-chip i { width: 10px; height: 10px; border-radius: 50%; background: var(--k); display: block; }
.stempel { margin-left: auto; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; color: var(--ok);
  border: 2px solid var(--ok); border-radius: 8px; padding: 2px 8px; transform: rotate(-4deg); }
.klein-stempel { font-size: .68rem; }
.stufen { display: flex; gap: 6px; }
.stufen span { flex: 1; height: 8px; border-radius: 99px; background: var(--card); }
.stufen span.an { background: var(--k, var(--fokus)); }
.stufen-txt { display: flex; justify-content: space-between; font-size: .72rem; color: var(--muted); font-weight: 700; margin-top: 4px; }
.hinweis-gross { font-size: 1.15rem; font-weight: 800; margin: 0; }
.erkl { display: flex; flex-direction: column; gap: 8px; }
.erkl p { margin: 0; }
.merksatz { font-family: var(--font-hand); font-weight: 700; background: color-mix(in srgb, var(--fokus) 14%, transparent);
  border-radius: 12px; padding: 8px 12px; }
.anders { border-left: 3px dashed var(--eltern-akzent); padding-left: 10px; }
.eingabe-zeile { display: flex; gap: 8px; }
.eingabe-zeile .eingabe { flex: 1; min-width: 0; }
.rueckmeldung { font-weight: 800; min-height: 1.4em; }
.rueckmeldung.falsch { color: var(--fehler-fg); }
.rueckmeldung.richtig { color: var(--ok); }
.loesung-zeige { margin: 0; color: var(--muted); }
.schritte { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 4px; }
.jetzt-du, .heft-satz { font-family: var(--font-hand); font-size: 1.12rem; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.luecke { width: 9em; min-height: 42px; border: 0; border-bottom: 3px solid var(--fokus); background: var(--paper); color: var(--paperfg);
  font-family: var(--font-hand); font-size: 1.1rem; text-align: center; border-radius: 8px 8px 0 0; }
.heft-eingabe { font-family: var(--font-hand); background: var(--paper); color: var(--paperfg); }
.heft.spiel .wort { cursor: pointer; border-radius: 4px; padding: 0 1px; transition: background .2s; }
@media (hover: hover) { .heft.spiel .wort:hover { background: color-mix(in srgb, var(--fokus) 20%, transparent); } }
.heft.spiel .wort.gefunden { background: color-mix(in srgb, var(--ok) 25%, transparent); border-bottom: 3px solid var(--ok); }
.heft.spiel .wort.daneben { background: var(--fehler-bg); }
.merk-karte { border-left: 6px solid var(--k); }
.abzeichen-mini { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 800; color: var(--pillfg); }
.abzeichen-mini svg { width: 18px; height: 18px; }
.kriterium { background: var(--card); border-radius: 16px; padding: 12px 14px; }
.kriterium ul { margin: 6px 0 0; padding-left: 20px; }
.kriterium .fragen li { font-style: italic; }
.regel-zeile { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--card); }
.regel-zeile .t { flex: 1; min-width: 0; }
.regel-zeile small { display: block; color: var(--muted); }
.mini-balken { display: flex; align-items: flex-end; gap: 3px; height: 32px; flex: none; }
.mini-balken i { width: 8px; border-radius: 3px; background: var(--rainbow); display: block; }
.fs-fehler { display: flex; flex-direction: column; gap: 6px; padding: 10px; border-radius: 14px; background: var(--card); }
.konfetti { position: fixed; inset: 0; pointer-events: none; z-index: 1200; overflow: hidden; }
.konfetti i { position: absolute; top: -20px; width: 10px; height: 16px; border-radius: 3px; animation: konfetti 1.8s ease-in forwards; }
@keyframes konfetti { to { transform: translateY(110vh) rotate(540deg); opacity: .2; } }

/* ---------- iPad Pro: 11" 834×1194 / 13" 1024×1366 (hoch) bzw. 1194×834 / 1366×1024 (quer) ---------- */
/* Text und Fallakte (bzw. Fehlerliste im Elternmodus) im Querformat nebeneinander – kein Hin- und Herscrollen. */
.zweispaltig { display: flex; flex-direction: column; gap: 18px; }
.zweispaltig > :empty { display: none; }
@media (min-width: 1100px) and (orientation: landscape) {
  .zweispaltig { flex-direction: row; align-items: flex-start; }
  .zweispaltig > * { flex: 1 1 0; min-width: 0; }
  .zweispaltig > .seitenleiste { flex: 0 1 44%; position: sticky; top: calc(env(safe-area-inset-top, 0px) + 12px);
    max-height: calc(100vh - 24px); overflow: auto; -webkit-overflow-scrolling: touch; }
  .zweispaltig > .seitenleiste > .karte { animation: none; }
}
/* große iPads: Heftschrift etwas größer, damit sie aus Armlänge gut lesbar ist */
@media (min-width: 1000px) {
  .heft { font-size: 1.32rem; }
  .btn { min-height: 56px; }
}
