/* Schriften lokal (SIL Open Font License), damit die App offline läuft. */
@font-face { font-family: 'Bangers'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/bangers-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Bangers'; font-style: normal; font-weight: 400; font-display: swap; src: url(fonts/bangers-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/nunito-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(fonts/nunito-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2C60-2C7F, U+A720-A7FF; }

/* Comic-Look (Andis Wahl 24.10.2026): dicke Konturen, versetzte Schatten, Rasterpunkte.
   Layout: eine Spalte, Daumenbedienung, Karte nur für die aktuelle Aufgabe. */
:root {
  --bg: #ffd84a; --surface: #ffffff; --ink: #111111; --muted: #444444; --line: #111111;
  --accent: #e8212e; --accent-ink: #ffffff; --gold: #1c5cff; --good: #11924a; --bad: #e8212e;
  --good-bg: #b8f5cf; --bad-bg: #ffc2c6; --shadow: 5px 5px 0 #111111;
  --display: 'Bangers', 'Impact', sans-serif;
  --body: 'Nunito', system-ui, sans-serif;
  --dots: radial-gradient(rgba(0,0,0,.13) 1.2px, transparent 1.4px) 0 0 / 9px 9px;
  --page-fg: #111111; --pop: #ffd84a;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #1b1c3a; --surface: #fff7df; --page-fg: #fff7df; --shadow: 5px 5px 0 #000000;
  --dots: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.4px) 0 0 / 9px 9px; color-scheme: dark;
} }
:root[data-theme="dark"] {
  --bg: #1b1c3a; --surface: #fff7df; --page-fg: #fff7df; --shadow: 5px 5px 0 #000000;
  --dots: radial-gradient(rgba(255,255,255,.08) 1.2px, transparent 1.4px) 0 0 / 9px 9px; color-scheme: dark;
}

html { -webkit-text-size-adjust: 100%; }
:root { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
body { margin: 0; }
img { max-width: 100%; }
[hidden] { display: none !important; }
*, *::before, *::after { box-sizing: border-box; }
html, body { min-height: 100%; }
body {
  background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.45;
  -webkit-tap-highlight-color: transparent;
}
#app {
  max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 20px;
  padding-block: 16px 40px;
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2 { margin: 0; text-wrap: balance; }
p { margin: 0; }
.btn {
  font: 600 1rem/1.2 var(--body); border: 2px solid var(--line); background: var(--surface); color: var(--ink);
  border-radius: 14px; padding: 14px 16px; min-height: 52px; cursor: pointer; touch-action: manipulation;
  transition: transform .08s ease;
}
.btn:active { transform: translateY(2px); }
.btn:focus-visible, input:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow); }
.btn.big { font-size: 1.1rem; min-height: 60px; width: 100%; }
.btn.ghost { background: transparent; }
.btn.small { min-height: 40px; padding: 6px 12px; }

/* Start */
.top { display: flex; flex-direction: column; gap: 14px; }
.brand { font-family: var(--display); font-weight: 400; font-size: 2rem; line-height: 1; letter-spacing: .01em; }
.brand span { color: var(--accent); margin-left: .25em; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: var(--surface); border: 2px solid var(--line); border-radius: 14px; padding: 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 6px; align-items: baseline; }
.sicon { grid-row: span 2; font-size: 1.4rem; align-self: center; }
.stat.stars .sicon, .stat.points .sicon { color: var(--gold); }
.sval { font: 800 1.35rem/1 var(--body); font-variant-numeric: tabular-nums; }
.slabel { font-size: .75rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.hero { display: flex; flex-direction: column; gap: 12px; }
.eyebrow { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 600; }
.lead { font-size: 1.05rem; }
.revenge { background: var(--bad-bg); color: var(--ink); border-radius: 12px; padding: 10px 12px; font-size: .95rem; }
.lessons { display: flex; flex-direction: column; gap: 10px; }
.lessons h2 { font: 800 1.05rem/1.2 var(--body); }
.lesson-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.lesson { display: grid; grid-template-columns: 2.4rem 1fr auto; column-gap: 10px; row-gap: 6px; align-items: center; background: var(--surface); border-radius: 12px; padding: 10px 12px; }
.lnum { font-family: var(--display); color: var(--accent); }
.ltitle { min-width: 0; font-size: .95rem; }
.lpct { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); font-size: .9rem; }
.bar { grid-column: 1 / -1; height: 8px; background: var(--line); border-radius: 99px; overflow: hidden; }
.fill { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--gold)); border-radius: 99px; transition: width .6s ease; }
.hint { font-size: .85rem; color: var(--muted); }

/* Aufgabe */
.run-top { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; }
.dots { display: flex; gap: 5px; justify-content: center; }
.dot { width: 100%; max-width: 22px; height: 8px; border-radius: 99px; background: var(--line); }
.dot.done { background: var(--accent); }
.dot.now { background: var(--gold); }
.run-points { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--gold); }
.card { background: var(--surface); border-radius: 20px; padding: 18px; display: flex; flex-direction: column; gap: 14px; border: 2px solid var(--line); }
.card.is-right { border-color: var(--good); }
.card.is-wrong { border-color: var(--bad); }
.card-head { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; background: var(--accent); color: var(--accent-ink); border-radius: 99px; padding: 4px 10px; }
.chip.quiet { background: var(--bg); color: var(--muted); }
.revenge-chip { background: var(--bad); color: #fff; }
.body { display: flex; flex-direction: column; gap: 10px; }
.ask { color: var(--muted); font-size: .95rem; }
.target { font: 800 1.5rem/1.2 var(--body); }
.of { color: var(--muted); font-size: .85rem; margin-bottom: -6px; }
.word-hint { font-size: 1rem; }
.latin, .german { font-weight: 800; overflow-wrap: anywhere; }
.big { font-size: 2rem; line-height: 1.15; }
.german.big { font-size: 1.6rem; }
.stemline { letter-spacing: .01em; }
.slot { display: inline-block; min-width: 2.2ch; border-bottom: 4px solid var(--gold); color: var(--gold); text-align: center; margin-left: 2px; }
.answer, .cell {
  font: 600 1.25rem/1.2 var(--body); width: 100%; min-width: 0; padding: 12px 14px; border-radius: 12px;
  border: 2px solid var(--line); background: var(--bg); color: var(--ink);
}
.cell { font-size: 1.05rem; padding: 10px; }
.cell.given { color: var(--muted); }
.cell.none { text-align: center; color: var(--muted); border: none; background: none; }
.cell.right { border-color: var(--good); background: var(--good-bg); }
.cell.wrong { border-color: var(--bad); background: var(--bad-bg); }
.actions { display: flex; flex-direction: column; gap: 10px; }
.options { display: grid; gap: 10px; }
.options.endings { grid-template-columns: repeat(3, 1fr); }
.options.endings .btn { font-size: 1.2rem; }
.options.stack { grid-template-columns: 1fr; }
.grid { display: grid; gap: 8px; }
.grid-noun { grid-template-columns: 3.2rem 1fr 1fr; align-items: center; }
.grid-verb { grid-template-columns: 1fr 1fr; }
.grid-verb .btn:last-child { grid-column: 1 / -1; }
.gh { font-size: .8rem; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; text-align: center; }
.grid .btn { padding: 10px 8px; font-size: .95rem; }
.table-wrap { overflow-x: auto; }
.table { display: grid; grid-template-columns: 3rem 1fr 1fr; gap: 8px; align-items: center; min-width: 280px; }
.option.right { background: var(--good-bg); border-color: var(--good); }
.option.wrong { background: var(--bad-bg); border-color: var(--bad); }
.option:disabled { opacity: 1; color: var(--ink); }
.feedback { display: flex; flex-direction: column; gap: 8px; border-top: 2px dashed var(--line); padding-top: 14px; }
.verdict { font-family: var(--display); font-size: 1.5rem; }
.is-right .verdict { color: var(--good); }
.is-wrong .verdict { color: var(--bad); }
.explain { font-size: 1.05rem; font-weight: 600; overflow-wrap: anywhere; }

/* Erfolg */
.finish { display: flex; flex-direction: column; gap: 14px; text-align: center; align-items: stretch; }
.big-stars { display: flex; justify-content: center; gap: 10px; font-size: 3.4rem; line-height: 1; }
.bigstar { color: var(--line); }
.bigstar.on { color: var(--gold); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both; animation-delay: calc(var(--i) * .25s); }
.score { font: 800 1.3rem/1.2 var(--body); }
.gif { margin: 0; border-radius: 16px; overflow: hidden; background: var(--surface); }
.gif img { display: block; width: 100%; height: auto; max-height: 300px; object-fit: contain; }
.overlay {
  position: fixed; inset: 0; z-index: 20; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 70%, transparent);
  padding: max(16px, env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) max(16px, env(safe-area-inset-bottom, 0px)) max(16px, env(safe-area-inset-left, 0px));
  animation: fade .2s ease both;
}
.pop { background: var(--surface); border: 3px solid var(--gold); border-radius: 20px; padding: 14px; width: min(340px, 100%); display: flex; flex-direction: column; gap: 10px; text-align: center; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both; }
.pop-title { font-family: var(--display); font-size: 1.3rem; color: var(--accent); }
@keyframes pop { from { transform: scale(.3); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Comic-Regeln */
body { background: var(--dots), var(--bg); color: var(--ink); font-weight: 600; }
.brand { font-family: var(--display); font-size: 2.6rem; letter-spacing: .04em; transform: rotate(-2deg); color: var(--ink); text-shadow: 3px 3px 0 #fff; }
.brand span { color: var(--accent); }
.stat, .lesson, .card, .pop, .gif, .revenge { border: 3px solid var(--line); box-shadow: var(--shadow); border-radius: 4px; background: var(--surface); color: var(--ink); }
.lnum { font-family: var(--display); font-size: 1.4rem; color: var(--accent); }
.bar { border: 2px solid var(--line); height: 12px; background: #fff; }
.fill { background: repeating-linear-gradient(45deg, var(--gold) 0 6px, #4d84ff 6px 12px); border-radius: 0; }
.chip { background: var(--ink); color: #fff; border-radius: 2px; font-family: var(--display); font-size: .95rem; letter-spacing: .06em; }
.chip.quiet { background: var(--pop); color: var(--ink); border: 2px solid var(--line); }
.btn { border: 3px solid var(--line); border-radius: 4px; box-shadow: 3px 3px 0 var(--line); font-weight: 800; color: var(--ink); background: #fff; }
.btn.primary { background: var(--accent); color: #fff; font-family: var(--display); font-size: 1.35rem; letter-spacing: .06em; box-shadow: var(--shadow); }
.btn:active { transform: translate(3px, 3px); box-shadow: none; }
.answer, .cell { border: 3px solid var(--line); border-radius: 4px; background: #fff; color: var(--ink); }
.target { font-family: var(--display); font-size: 2rem; letter-spacing: .04em; font-weight: 400; }
.latin.big { font-size: 2.3rem; }
.verdict { font-size: 2rem; transform: rotate(-2deg); }
.feedback { border-top: 3px solid var(--line); }
.dot { background: #fff; border: 2px solid var(--line); height: 12px; }
.dot.done { background: var(--ink); }
.dot.now { background: var(--accent); }
.run-points { color: var(--ink); font-family: var(--display); font-size: 1.3rem; }
.eyebrow { color: var(--ink); }
.lessons h2 { font-family: var(--display); font-size: 1.6rem; font-weight: 400; letter-spacing: .04em; }
.big-stars { font-size: 4rem; }
.bigstar { color: rgba(0,0,0,.2); -webkit-text-stroke: 2px var(--line); }
.bigstar.on { color: #ffe600; }
.score { font-family: var(--display); font-size: 2rem; font-weight: 400; letter-spacing: .04em; }
.overlay { background: rgba(0,0,0,.55); }
.pop-title { font-family: var(--display); font-size: 2rem; color: var(--accent); }
.slot { border-bottom-color: var(--accent); color: var(--accent); }
.hint { color: var(--muted); }
.brand, .eyebrow, .lead, .lessons h2, .score, .run-points, .hero > .hint, .lessons > .hint { color: var(--page-fg); }
.brand { text-shadow: 3px 3px 0 var(--accent-ink); }
.brand span, .finish .eyebrow { color: var(--accent); }
.finish > .lead { color: var(--page-fg); }
.btn.ghost { background: var(--surface); }

