/* =========================================================
   Zahlenzauber – fröhlich, ruhig, gross genug für Kinderfinger
   ========================================================= */
:root {
  --bg: #FFF7E8;
  --paper: #FFFFFF;
  --ink: #2A2350;
  --ink-soft: #6B6490;
  --line: #EEE3CF;
  --sun: #FFC93C;    --sun-d: #E0A800;
  --coral: #FF6B6B;  --coral-d: #D94848;
  --sky: #4D96FF;    --sky-d: #2F72D6;
  --grape: #9B5DE5;  --grape-d: #7A3EC4;
  --mint: #22B8A7;   --mint-d: #138C7F;
  --leaf: #4FBF63;   --leaf-d: #36984A;
  --orange: #FF9F43; --orange-d: #DE7C1C;
  --radius: 24px;
  --font-fun: 'Fredoka', 'Comic Sans MS', ui-rounded, system-ui, sans-serif;
  --font-text: 'Nunito', ui-rounded, system-ui, sans-serif;
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background-color: var(--bg);
  background-image: radial-gradient(circle at 1px 1px, rgba(42, 35, 80, .07) 1.5px, transparent 0);
  background-size: 28px 28px;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 18px;
  line-height: 1.45;
}
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; padding: 0; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Farbvarianten für Karten */
.c-coral  { --c: var(--coral);  --cd: var(--coral-d); }
.c-sky    { --c: var(--sky);    --cd: var(--sky-d); }
.c-grape  { --c: var(--grape);  --cd: var(--grape-d); }
.c-mint   { --c: var(--mint);   --cd: var(--mint-d); }
.c-orange { --c: var(--orange); --cd: var(--orange-d); }
.c-leaf   { --c: var(--leaf);   --cd: var(--leaf-d); }

/* ---------- Kopfzeile ---------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  background: rgba(255, 247, 232, .94);
  backdrop-filter: blur(8px);
  border-bottom: 3px solid var(--line);
}
.logo { display: flex; align-items: center; gap: 8px; margin-right: auto; font-family: var(--font-fun); font-weight: 700; font-size: 26px; border-radius: 12px; }
.logo-star { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 14px; background: var(--grape); color: var(--sun); font-size: 26px; box-shadow: 0 4px 0 var(--grape-d); }
.points-pill {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 16px; border-radius: 999px;
  background: var(--sun); box-shadow: 0 4px 0 var(--sun-d);
  font-family: var(--font-fun); font-weight: 700; font-size: 21px;
}
.points-pill.bump { animation: bump .55s ease-out; }
.icon-btn { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 16px; background: var(--paper); box-shadow: 0 4px 0 var(--line); font-size: 22px; }
.icon-btn:active, .btn-ghost:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }

main { max-width: 1060px; margin: 0 auto; padding: 22px 16px 56px; }

/* ---------- Startseite ---------- */
.hello { display: flex; align-items: center; gap: 18px; margin: 6px 0 22px; }
.hello .mascot { width: 104px; height: 104px; flex: none; animation: float 4s ease-in-out infinite; }
.bubble { position: relative; background: var(--paper); border-radius: var(--radius); padding: 14px 22px; box-shadow: 0 6px 0 var(--line); }
.bubble::before { content: ''; position: absolute; left: -9px; top: 50%; width: 20px; height: 20px; background: var(--paper); transform: translateY(-50%) rotate(45deg); border-radius: 3px; }
.bubble h1 { margin: 0; font-family: var(--font-fun); font-size: clamp(28px, 5vw, 38px); line-height: 1.15; }
.bubble p { margin: 4px 0 0; color: var(--ink-soft); font-weight: 700; }

.range-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px;
  padding: 14px 18px; margin-bottom: 28px;
  background: var(--paper); border-radius: var(--radius); box-shadow: 0 6px 0 var(--line);
}
.range-box .label { font-family: var(--font-fun); font-weight: 600; font-size: 21px; }
.range-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.pill {
  min-height: 48px; padding: 8px 18px; border-radius: 999px;
  background: var(--bg); border: 3px solid var(--line);
  font-family: var(--font-fun); font-weight: 600; font-size: 19px;
}
.pill.on { background: var(--grape); border-color: var(--grape); color: #fff; box-shadow: 0 4px 0 var(--grape-d); }

.section-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin: 0 0 14px; font-family: var(--font-fun); font-size: 26px; }
.title-note { font-family: var(--font-text); font-size: 15px; font-weight: 700; color: var(--ink-soft); }

.topic-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-bottom: 34px; }
.topic-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  min-height: 178px; padding: 18px 12px 16px;
  background: var(--c); color: #fff; text-align: center;
  border-radius: var(--radius); box-shadow: 0 8px 0 var(--cd);
  transition: transform .12s, box-shadow .12s;
}
.topic-card:hover { transform: translateY(-3px); box-shadow: 0 11px 0 var(--cd); }
.topic-card:active { transform: translateY(6px); box-shadow: 0 2px 0 var(--cd); }
.t-icon {
  display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 6px;
  border-radius: 50%; background: #fff; color: var(--c);
  font-family: var(--font-fun); font-weight: 700; font-size: 42px; line-height: 1;
}
.c-grape .t-icon { font-size: 76px; }
.t-name { font-family: var(--font-fun); font-weight: 700; font-size: 25px; line-height: 1.1; }
.t-sub { font-size: 14px; font-weight: 800; opacity: .92; }
.t-count { margin-top: 8px; padding: 2px 12px; border-radius: 999px; background: rgba(255, 255, 255, .26); font-size: 13px; font-weight: 800; }

.test-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; margin-bottom: 34px; }
.test-card {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; align-items: center; gap: 0 14px;
  padding: 14px 18px; min-height: 84px; text-align: left;
  background: var(--paper); border-radius: 20px; border-left: 10px solid var(--c);
  box-shadow: 0 6px 0 var(--line);
  transition: transform .12s, box-shadow .12s;
}
.test-card:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--line); }
.test-card:active { transform: translateY(5px); box-shadow: 0 1px 0 var(--line); }
.test-icon { grid-row: span 2; font-family: var(--font-fun); font-weight: 700; font-size: 26px; color: var(--c); min-width: 52px; text-align: center; }
.test-name { font-family: var(--font-fun); font-weight: 600; font-size: 20px; line-height: 1.15; }
.test-go { font-size: 15px; font-weight: 800; color: var(--cd); }

.next-sticker {
  display: flex; align-items: center; gap: 16px; width: 100%;
  padding: 14px 20px; text-align: left;
  background: var(--paper); border-radius: var(--radius); box-shadow: 0 6px 0 var(--line);
}
.ns-emoji { font-size: 44px; line-height: 1; }
.ns-emoji.locked { filter: grayscale(1) brightness(1.15); opacity: .55; }
.ns-body { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.ns-text { font-weight: 700; }
.bar { display: block; height: 16px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.bar span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--sun), var(--orange)); }

/* ---------- Üben ---------- */
.play-head { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.btn-ghost { flex: none; min-height: 48px; padding: 8px 16px; border-radius: 16px; background: var(--paper); box-shadow: 0 4px 0 var(--line); font-weight: 800; }
.play-info { flex: 1; min-width: 0; }
.play-title { display: block; font-family: var(--font-fun); font-weight: 700; font-size: 22px; line-height: 1.15; }
.progress { height: 14px; margin-top: 6px; border-radius: 999px; background: var(--paper); box-shadow: inset 0 0 0 2px var(--line); overflow: hidden; }
.progress span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--leaf), var(--mint)); transition: width .4s; }
.play-count { flex: none; font-family: var(--font-fun); font-weight: 700; font-size: 20px; }
.page-title { margin: 0; font-family: var(--font-fun); font-size: 28px; }

.play-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; }
@media (min-width: 880px) {
  .play-grid { grid-template-columns: minmax(0, 1.4fr) minmax(300px, 1fr); align-items: start; }
  .play-side { position: sticky; top: 92px; }
}

.coach { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.coach .mascot { width: 66px; height: 66px; flex: none; }
.coach.happy .mascot { animation: jump .6s ease-out; }
.coach.oops .mascot { animation: wobble .5s ease-out; }
.coach-text {
  flex: 1; display: block; min-height: 52px; margin: 0; padding: 12px 18px;
  background: var(--paper); border-radius: 20px; box-shadow: 0 4px 0 var(--line);
  font-weight: 800; font-size: 18px;
}
.plus { color: var(--leaf-d); white-space: nowrap; }

.task-card {
  padding: 40px 20px; text-align: center;
  background: var(--paper); border-radius: 28px; border-top: 12px solid var(--c);
  box-shadow: 0 8px 0 var(--line);
}
.task-card.shake { animation: shake .45s; }
.eq { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .28em; font-family: var(--font-fun); font-weight: 600; line-height: 1.2; }
.eq-task { font-size: clamp(36px, 8.5vw, 62px); }
.op { color: var(--c, var(--ink-soft)); }
.unit { color: var(--ink-soft); }
.nowrap { display: inline-flex; align-items: center; gap: .2em; white-space: nowrap; }
.slot {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 2.1em; height: 1.35em; padding: 0 .25em;
  border: 4px dashed var(--c); border-radius: 16px; background: #FFFDF6;
}
.slot.empty::after { content: ''; width: 4px; height: .8em; border-radius: 2px; background: var(--c); animation: blink 1.1s steps(1) infinite; }
.slot.right { border-style: solid; border-color: var(--leaf); background: #E9F8EC; color: var(--leaf-d); animation: pop .4s; }
.slot.shown { border-style: solid; border-color: var(--grape); background: #F3EBFD; color: var(--grape-d); animation: pop .4s; }
.task-q { margin: 0 0 12px; font-family: var(--font-fun); font-weight: 600; font-size: 22px; color: var(--ink-soft); }
.task-text { margin: 0; font-family: var(--font-fun); font-weight: 600; font-size: clamp(25px, 5vw, 34px); line-height: 1.35; }
.blank { display: inline-block; min-width: 2.2em; border-bottom: 4px dashed var(--c); color: var(--c); }
.test-hint { margin: 16px 4px 0; color: var(--ink-soft); font-weight: 700; }

/* Zahlenfeld */
.keypad, .choices { padding: 16px; background: var(--paper); border-radius: 28px; box-shadow: 0 8px 0 var(--line); }
.keypad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.key {
  height: 68px; border-radius: 18px;
  background: var(--bg); box-shadow: 0 5px 0 var(--line);
  font-family: var(--font-fun); font-weight: 700; font-size: 32px;
}
.key:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.key.del { background: #FFE9D6; box-shadow: 0 5px 0 #F2CBA8; }
.key.ok { background: var(--leaf); color: #fff; box-shadow: 0 5px 0 var(--leaf-d); }
.keypad.off { opacity: .4; pointer-events: none; }

.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.choices.three .choice:last-child { grid-column: 1 / -1; }
.choice {
  min-height: 74px; padding: 8px; border-radius: 18px;
  background: var(--bg); box-shadow: 0 5px 0 var(--line);
  font-family: var(--font-fun); font-weight: 700; font-size: 28px;
}
.choice:active:not(:disabled) { transform: translateY(4px); box-shadow: 0 1px 0 var(--line); }
.choice.nope { opacity: .35; }
.choice.yes { background: var(--leaf); color: #fff; box-shadow: 0 5px 0 var(--leaf-d); opacity: 1; animation: pop .4s; }

/* Knöpfe */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 60px; padding: 12px 28px; border-radius: 20px;
  font-family: var(--font-fun); font-weight: 700; font-size: 23px;
}
.btn:active { transform: translateY(4px); }
.btn-go { background: var(--leaf); color: #fff; box-shadow: 0 6px 0 var(--leaf-d); }
.btn-soft { background: var(--paper); box-shadow: 0 6px 0 var(--line); }
.btn-next { width: 100%; margin-top: 18px; background: var(--sky); color: #fff; box-shadow: 0 6px 0 var(--sky-d); animation: pop .35s; }
.btn-tip { margin-top: 18px; min-height: 56px; font-size: 22px; background: var(--sun); box-shadow: 0 6px 0 var(--sun-d); }
.btn:active.btn-go, .btn:active.btn-next, .btn:active.btn-tip, .btn:active.btn-soft { box-shadow: 0 2px 0 rgba(0, 0, 0, .12); }
.full { width: 100%; }

/* ---------- Tipp ---------- */
.tip-panel {
  margin-top: 18px; padding: 20px;
  background: #FFFBEA; border: 3px solid var(--sun); border-radius: 24px;
  animation: unfold .3s ease-out;
}
.tip-intro { margin: 0 0 14px; font-weight: 800; font-size: 19px; }
.step { display: none; }
.step.show { display: block; animation: pop .35s ease-out; }
.tip-block { margin-top: 6px; }
.tip-note { margin: 0 0 8px; font-weight: 700; color: var(--ink-soft); }
.eq-tip { justify-content: flex-start; align-items: flex-start; margin: 4px 0 10px; font-size: 34px; }
.eq-tip > .num, .eq-tip > .op { line-height: 1.3; }

.split { display: inline-flex; flex-direction: column; align-items: stretch; }
.split-top { padding: 0 .25em; border-radius: 12px; background: var(--sun); text-align: center; line-height: 1.3; white-space: nowrap; }
.split-v { display: block; width: 100%; min-width: 2.4em; height: 36px; overflow: visible; transform-origin: top; animation: grow .45s .1s ease-out both; }
.split-v path { fill: none; stroke: var(--coral); stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.split-parts { display: flex; }
.split-parts > span { flex: 1 1 0; display: flex; justify-content: center; padding: 0 .3em; }
.split-parts b {
  padding: 0 .3em; border: 3px solid var(--coral); border-radius: 14px; background: var(--paper);
  font-size: .8em; font-weight: 600; white-space: nowrap;
  animation: pop .4s .45s both;
}

.tline {
  width: fit-content; max-width: 100%; margin: 8px 0; padding: 6px 16px;
  background: var(--paper); border-radius: 14px; box-shadow: 0 3px 0 var(--line);
  font-family: var(--font-fun); font-weight: 600; font-size: 28px;
}
.tline b { color: var(--mint-d); }
.ask { display: inline-block; min-width: 1.6em; border: 3px dashed var(--grape); border-radius: 10px; color: var(--grape); text-align: center; }
.btn-step {
  margin-top: 10px; min-height: 48px; padding: 8px 18px; border-radius: 16px;
  background: var(--sun); box-shadow: 0 4px 0 var(--sun-d);
  font-family: var(--font-fun); font-weight: 600; font-size: 19px;
}
.btn-step:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--sun-d); }
.tip-done { margin: 12px 0 0; font-weight: 800; color: var(--grape-d); }

.dots { display: inline-grid; gap: 5px; padding: 12px; border-radius: 16px; background: var(--paper); }
.dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--sky); }
.dots i.b { background: var(--coral); }
.dots i.gl { margin-left: 10px; }
.dots i.gt { margin-top: 10px; }
.vis-cap { margin: 6px 0 12px; font-size: 15px; font-weight: 700; color: var(--ink-soft); }

.ladder { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.lad-unit {
  display: grid; place-items: center; min-width: 56px; height: 54px; padding: 0 8px;
  border: 3px solid var(--line); border-radius: 14px; background: var(--paper);
  font-family: var(--font-fun); font-weight: 700; font-size: 23px; color: var(--ink-soft);
}
.lad-unit.in { border-color: var(--mint); color: var(--ink); }
.lad-unit.from { background: var(--sun); border-color: var(--sun-d); }
.lad-unit.to { background: var(--mint); border-color: var(--mint-d); color: #fff; }
.lad-arrow { display: flex; flex-direction: column; padding: 0 3px; font-size: 13px; font-weight: 800; line-height: 1.25; text-align: center; color: #B9B1CF; white-space: nowrap; }
.lad-arrow.in { color: var(--mint-d); }

.refs { display: grid; gap: 8px; }
.ref { display: flex; align-items: center; gap: 12px; padding: 8px 14px; border-radius: 14px; background: var(--paper); font-weight: 700; }
.ref b { min-width: 60px; font-family: var(--font-fun); font-size: 22px; color: var(--mint-d); }

/* ---------- Ergebnis ---------- */
.result-card {
  max-width: 620px; margin: 10px auto; padding: 30px 22px; text-align: center;
  background: var(--paper); border-radius: 30px; box-shadow: 0 8px 0 var(--line);
}
.result-card .mascot { width: 110px; height: 110px; animation: jump .8s ease-out; }
.result-card h1 { margin: 6px 0 8px; font-family: var(--font-fun); font-size: clamp(30px, 6vw, 40px); }
.result-line { margin: 0 0 4px; font-size: 21px; }
.result-sub { margin: 6px 0 0; font-weight: 700; color: var(--ink-soft); }
.earned { margin: 10px 0 0; font-family: var(--font-fun); font-weight: 700; font-size: 44px; color: var(--sun-d); }
.result-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 26px; }
.stars { display: flex; justify-content: center; gap: 8px; font-size: 64px; line-height: 1; }
.stars span { color: var(--line); }
.stars span.on { color: var(--sun); text-shadow: 0 4px 0 var(--sun-d); animation: pop .5s both; }
.stars span.on:nth-child(2) { animation-delay: .15s; }
.stars span.on:nth-child(3) { animation-delay: .3s; }
.review { margin-top: 22px; padding: 14px 18px; text-align: left; background: #F3EBFD; border-radius: 18px; }
.review h2 { margin: 0 0 6px; font-family: var(--font-fun); font-size: 20px; }
.review ul { margin: 0; padding-left: 20px; font-family: var(--font-fun); font-size: 21px; font-weight: 500; }

/* ---------- Sticker ---------- */
.trophy-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 24px; }
.trophy { display: flex; flex-direction: column; align-items: center; padding: 14px; background: var(--paper); border-radius: 20px; box-shadow: 0 6px 0 var(--line); }
.trophy b { font-family: var(--font-fun); font-size: 32px; }
.trophy span { font-weight: 700; color: var(--ink-soft); }
.sticker-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 16px; }
.sticker { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 18px 10px; background: var(--paper); border-radius: 22px; box-shadow: 0 6px 0 var(--line); }
.s-emoji { font-size: 54px; line-height: 1.1; }
.s-name { font-family: var(--font-fun); font-weight: 600; font-size: 18px; }
.sticker.locked { background: transparent; box-shadow: none; border: 3px dashed var(--line); }
.sticker.locked .s-emoji { opacity: .45; }
.sticker.locked .s-name { color: var(--ink-soft); font-size: 16px; }

/* ---------- Eltern-Dialog ---------- */
dialog {
  width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 40px); padding: 0;
  border: 0; border-radius: 28px; background: var(--paper); color: var(--ink);
  box-shadow: 0 20px 60px rgba(42, 35, 80, .3);
}
dialog::backdrop { background: rgba(42, 35, 80, .45); }
.settings { padding: 24px; }
.settings h2 { margin: 0 0 16px; font-family: var(--font-fun); font-size: 28px; }
.field { display: flex; flex-direction: column; gap: 8px; margin-bottom: 18px; font-weight: 800; }
.field input {
  min-height: 52px; padding: 8px 14px; border: 3px solid var(--line); border-radius: 14px;
  font: inherit; font-weight: 700; color: var(--ink); background: var(--bg);
}
.field input:focus { outline: none; border-color: var(--sky); }
.info { padding: 14px 16px; margin-bottom: 16px; border-radius: 16px; background: var(--bg); font-size: 16px; }
.info h3 { margin: 0 0 6px; font-family: var(--font-fun); font-size: 19px; }
.info p { margin: 0 0 8px; }
.info p:last-child { margin: 0; }
.danger { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-bottom: 20px; font-size: 16px; font-weight: 700; }
.btn-link { min-height: 44px; padding: 4px 2px; color: var(--coral-d); font-weight: 800; text-decoration: underline; }
.btn-link.strong { padding: 4px 12px; border-radius: 12px; background: var(--coral); color: #fff; text-decoration: none; }

/* ---------- Sticker-Feier ---------- */
.celebrate { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(42, 35, 80, .45); }
.celebrate-card { width: min(380px, 100%); padding: 28px 24px; text-align: center; background: var(--paper); border-radius: 30px; animation: pop .45s ease-out; }
.cel-emoji { display: block; font-size: 96px; line-height: 1.1; animation: float 3s ease-in-out infinite; }
.celebrate-card h2 { margin: 6px 0 4px; font-family: var(--font-fun); font-size: 32px; }
.celebrate-card p { margin: 0 0 20px; font-weight: 700; }

/* ---------- Konfetti ---------- */
.confetti { position: fixed; z-index: 60; width: 0; height: 0; pointer-events: none; }
.confetti i { position: absolute; width: 10px; height: 14px; border-radius: 3px; animation: burst 1.1s ease-out forwards; }

/* ---------- Animationen ---------- */
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); opacity: 1; } 100% { transform: scale(1); } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes unfold { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes bump { 30% { transform: scale(1.18); } 100% { transform: scale(1); } }
@keyframes float { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes jump { 30% { transform: translateY(-14px) rotate(-8deg); } 60% { transform: translateY(0) rotate(6deg); } }
@keyframes wobble { 25% { transform: rotate(-10deg); } 75% { transform: rotate(8deg); } }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
@keyframes burst {
  from { transform: translate(0, 0) rotate(0); opacity: 1; }
  to { transform: translate(var(--x), calc(var(--y) + 80px)) rotate(var(--r)); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 560px) {
  body { font-size: 17px; }
  .logo-text { display: none; }
  .hello .mascot { width: 76px; height: 76px; }
  .topic-grid { grid-template-columns: 1fr 1fr; gap: 14px; }
  .topic-card { min-height: 158px; }
  .task-card { padding: 30px 12px; }
  .key { height: 60px; }
  .eq-tip { font-size: 27px; }
  .tline { font-size: 23px; }
  .lad-unit { min-width: 44px; height: 46px; font-size: 19px; }
  .lad-arrow { font-size: 11px; }
  .play-head { gap: 10px; }
  .btn-ghost { padding: 8px 12px; }
}
