/* Lernfuchs: Schulheft und Bastelpapier */
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-latin.woff2') format('woff2'); font-weight: 300 700; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Fredoka'; src: url('/fonts/fredoka-latin-ext.woff2') format('woff2'); font-weight: 300 700; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-latin.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Nunito'; src: url('/fonts/nunito-latin-ext.woff2') format('woff2'); font-weight: 200 1000; font-display: swap; unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --papier: #fdf8ef;
  --kaestchen: #e7eef6;
  --tinte: #2b1d16;
  --tinte-weich: #6b5a4e;
  --fuchs: #f76707;
  --fuchs-hell: #ffe8cc;
  --gruen: #2f9e44;
  --gruen-hell: #d3f9d8;
  --rot: #e03131;
  --rot-hell: #ffe3e3;
  --gold: #fab005;
  --karte: #ffffff;
  --rand: #2b1d16;
  --schatten: 4px 4px 0 var(--rand);
  --schatten-klein: 2px 2px 0 var(--rand);
  --radius: 18px;
  --fach: var(--fuchs);
  --kopf: 'Fredoka', 'Nunito', sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; color: var(--tinte); font-family: 'Nunito', sans-serif; font-size: 18px; line-height: 1.5;
  background-color: var(--papier);
  background-image:
    linear-gradient(var(--kaestchen) 1px, transparent 1px),
    linear-gradient(90deg, var(--kaestchen) 1px, transparent 1px);
  background-size: 24px 24px;
  display: flex; flex-direction: column;
}
#app { flex: 1; width: 100%; max-width: 980px; margin: 0 auto; padding: 16px 16px 40px; }
.fuss { text-align: center; font-size: 13px; color: var(--tinte-weich); padding: 18px 16px 24px; }
h1, h2, h3 { font-family: var(--kopf); font-weight: 600; line-height: 1.15; margin: 0 0 .4em; }
h1 { font-size: clamp(30px, 6vw, 46px); }
h2 { font-size: clamp(24px, 4.5vw, 32px); }
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
.versteckt { position: absolute; left: -9999px; }

/* ---------- Bausteine ---------- */
.karte { background: var(--karte); border: 2.5px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); padding: 20px; }
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 10px 22px;
  border: 2.5px solid var(--rand); border-radius: 999px; background: var(--fuchs); color: #fff; font-family: var(--kopf); font-weight: 600; font-size: 20px;
  box-shadow: var(--schatten-klein); cursor: pointer; text-decoration: none; transition: transform .08s, box-shadow .08s;
}
.knopf:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--rand); }
.knopf:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--rand); }
.knopf:disabled { opacity: .45; cursor: default; transform: none; box-shadow: var(--schatten-klein); }
.knopf.hell { background: #fff; color: var(--tinte); }
.knopf.gruen { background: var(--gruen); }
.knopf.klein { min-height: 40px; font-size: 16px; padding: 6px 14px; }
.knopf.breit { width: 100%; }
.textknopf { background: none; border: 0; padding: 6px 4px; cursor: pointer; font-weight: 700; color: var(--tinte-weich); text-decoration: underline; text-underline-offset: 3px; }
.zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.zeile.ende { justify-content: flex-end; }
.zeile.zwischen { justify-content: space-between; }
.stapel > * + * { margin-top: 14px; }
.leise { color: var(--tinte-weich); }
.fehlermeldung { background: var(--rot-hell); border: 2px solid var(--rot); border-radius: 12px; padding: 10px 14px; font-weight: 700; }
.fehlermeldung:empty { display: none; }

label.feld { display: block; font-weight: 700; }
label.feld span { display: block; margin-bottom: 4px; }
.feld input, .feld select, input.eingabe {
  width: 100%; min-height: 52px; padding: 10px 14px; border: 2.5px solid var(--rand); border-radius: 14px; background: #fff; font-size: 20px;
}
label.feld span.passwort { position: relative; display: block; margin: 0; }
.passwort input { padding-right: 56px; }
.passwort .auge { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border: 0; background: none; font-size: 22px; cursor: pointer; border-radius: 10px; }
.passwort .auge:hover { background: var(--fuchs-hell); }
input:focus-visible, select:focus-visible, button:focus-visible { outline: 3px solid var(--fuchs); outline-offset: 2px; }

/* ---------- Kopfleiste ---------- */
.leiste { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.marke { display: flex; align-items: center; gap: 10px; font-family: var(--kopf); font-weight: 700; font-size: 26px; text-decoration: none; }
.marke img { width: 42px; height: 42px; }
.marke small { font-family: 'Nunito'; font-size: 13px; font-weight: 800; background: var(--tinte); color: #fff; border-radius: 6px; padding: 1px 7px; margin-left: 2px; }
.konto { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.plakette { display: inline-flex; align-items: center; gap: 6px; background: #fff; border: 2px solid var(--rand); border-radius: 999px; padding: 4px 12px; font-weight: 800; box-shadow: var(--schatten-klein); }
.plakette.tier { font-size: 22px; padding: 2px 12px 2px 6px; cursor: pointer; }
.plakette.tier span { font-size: 16px; }

/* ---------- Fuchs ---------- */
.fuchs-svg { width: 100%; height: auto; display: block; }
.fuchs-svg .augen { transform-origin: center 52%; animation: zwinkern 5s infinite; }
@keyframes zwinkern { 0%, 94%, 100% { transform: scaleY(1); } 96% { transform: scaleY(.1); } }
.fuchs-svg.freut .kopf { animation: huepfen .6s ease 2; transform-origin: center bottom; }
.fuchs-svg.traurig .kopf { animation: wackeln .5s ease 1; transform-origin: center bottom; }
@keyframes huepfen { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-12%) rotate(-4deg); } }
@keyframes wackeln { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.laden { display: grid; place-items: center; min-height: 50vh; }
.laden-fuchs { width: 64px; height: 64px; background: url('/fuchs.svg') center/contain no-repeat; animation: huepfen 1s infinite; }

/* ---------- Startseite ---------- */
.held { display: grid; grid-template-columns: 1.15fr .85fr; gap: 28px; align-items: center; margin: 12px 0 30px; }
.held h1 em { font-style: normal; background: linear-gradient(transparent 58%, var(--fuchs-hell) 58%); padding: 0 4px; }
.held .fuchs-buehne { position: relative; max-width: 300px; justify-self: center; width: 100%; }
.held .sprechblase { position: absolute; top: -6px; right: -6px; background: #fff; border: 2.5px solid var(--rand); border-radius: 16px; padding: 6px 12px; font-family: var(--kopf); font-weight: 600; box-shadow: var(--schatten-klein); transform: rotate(4deg); }
.vorteile { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin: 26px 0; }
.vorteile .karte { padding: 16px; transform: rotate(var(--dreh, 0deg)); }
.vorteile .karte b { font-family: var(--kopf); font-size: 20px; display: block; margin-bottom: 4px; }
.vorteile .karte:nth-child(1) { --dreh: -1deg; background: #fff9db; }
.vorteile .karte:nth-child(2) { --dreh: .8deg; background: #e7f5ff; }
.vorteile .karte:nth-child(3) { --dreh: -.6deg; background: #ebfbee; }
.vorteile .karte:nth-child(4) { --dreh: 1deg; background: #f8f0fc; }
.anmeldekarte { max-width: 440px; }
.reiter { display: flex; gap: 6px; margin-bottom: 14px; }
.reiter button { flex: 1; border: 2.5px solid var(--rand); background: #fff; border-radius: 12px; padding: 8px; font-family: var(--kopf); font-weight: 600; font-size: 18px; cursor: pointer; }
.reiter button[aria-selected="true"] { background: var(--tinte); color: #fff; }

/* ---------- Profile ---------- */
.profile { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 18px; margin: 20px 0; }
.profil { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 22px 12px; cursor: pointer; border: 2.5px solid var(--rand); background: #fff; border-radius: 24px; box-shadow: var(--schatten); transition: transform .12s; }
.profil:hover { transform: translateY(-3px) rotate(-1deg); }
.profil .tier { font-size: 64px; line-height: 1; width: 104px; height: 104px; display: grid; place-items: center; background: var(--fuchs-hell); border-radius: 50%; border: 2.5px solid var(--rand); }
.profil b { font-family: var(--kopf); font-size: 22px; }
.profil.neu .tier { background: #fff; font-size: 44px; border-style: dashed; }

/* ---------- Fächer ---------- */
.begruessung { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: center; margin-bottom: 18px; }
.begruessung .mini-fuchs { width: 84px; }
.begruessung p { margin: 0; }
.faecher { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 20px; }
.fach {
  position: relative; text-decoration: none; color: var(--tinte); background: var(--fachhell, #fff); border: 2.5px solid var(--rand); border-radius: 22px;
  padding: 20px 20px 18px; box-shadow: 5px 5px 0 var(--fachfarbe); transition: transform .12s, box-shadow .12s; overflow: hidden; display: block;
}
.fach:hover { transform: translate(-2px, -2px) rotate(-.6deg); box-shadow: 7px 7px 0 var(--fachfarbe); }
.fach .icon { font-size: 44px; line-height: 1; }
.fach h2 { margin: 10px 0 2px; font-size: 27px; hyphens: auto; overflow-wrap: break-word; }
.fach .balken { margin-top: 12px; }
.fach::after { content: ''; position: absolute; right: -26px; top: -26px; width: 90px; height: 90px; border-radius: 50%; background: var(--fachfarbe); opacity: .14; }
.balken { height: 14px; border: 2px solid var(--rand); border-radius: 999px; background: #fff; overflow: hidden; }
.balken > i { display: block; height: 100%; background: var(--fachfarbe, var(--fuchs)); border-radius: 999px; transition: width .6s; }
.sterne { color: var(--gold); letter-spacing: 1px; font-size: 20px; white-space: nowrap; }
.sterne .aus { color: #d9cfc4; }

/* ---------- Themen ---------- */
.zurueck { display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-weight: 800; color: var(--tinte-weich); margin-bottom: 10px; }
.fachkopf { display: flex; align-items: center; gap: 14px; margin-bottom: 8px; }
.fachkopf .icon { font-size: 46px; width: 74px; height: 74px; display: grid; place-items: center; background: var(--fachhell); border: 2.5px solid var(--rand); border-radius: 20px; box-shadow: 3px 3px 0 var(--fachfarbe); }
.bereich { margin: 26px 0 10px; font-family: var(--kopf); font-size: 21px; display: flex; align-items: center; gap: 10px; }
.bereich::after { content: ''; flex: 1; height: 2px; background: repeating-linear-gradient(90deg, var(--tinte-weich) 0 6px, transparent 6px 12px); opacity: .5; }
.themen { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.thema { display: flex; flex-direction: column; gap: 4px; text-decoration: none; color: inherit; background: #fff; border: 2.5px solid var(--rand); border-radius: 16px; padding: 14px 16px; box-shadow: 3px 3px 0 var(--fachfarbe); transition: transform .1s; }
.thema:hover { transform: translate(-1px, -2px); }
.thema b { font-family: var(--kopf); font-size: 19px; font-weight: 600; }
.thema .leise { font-size: 15px; }
.etikett { display: inline-block; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; background: var(--fuchs-hell); border: 1.5px solid var(--rand); border-radius: 6px; padding: 0 6px; }

/* ---------- Erklärseite ---------- */
.erklaer { display: grid; grid-template-columns: 1fr 280px; gap: 22px; align-items: start; }
.erklaer .seitenleiste { position: sticky; top: 16px; }
.erklaerung section { margin-bottom: 18px; }
.erklaerung h3 { font-size: 21px; display: flex; align-items: center; gap: 8px; }
.erklaerung .e-worum h3::before { content: '💡'; }
.erklaerung .e-schritte h3::before { content: '🪜'; }
.erklaerung .e-beispiel h3::before { content: '✏️'; }
.erklaerung .e-achtung h3::before { content: '⚠️'; }
.erklaerung .e-merke h3::before { content: '📌'; }
.erklaerung ol, .erklaerung ul { padding-left: 1.3em; margin: 0; }
.erklaerung li { margin: 4px 0; }
.erklaerung .e-beispiel { background: #fff9db; border: 2px dashed #e0b400; border-radius: 14px; padding: 12px 16px; }
.erklaerung .e-achtung { background: var(--rot-hell); border-radius: 14px; padding: 12px 16px; }
.erklaerung .e-merke { background: var(--gruen-hell); border-radius: 14px; padding: 12px 16px; transform: rotate(-.5deg); border: 2px solid var(--gruen); }
.erklaerung .e-merke p { margin: 0; font-weight: 700; }
pre.rechnung { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 700; letter-spacing: .25em; background: #fff; border-radius: 10px; padding: 8px 14px; display: inline-block; margin: 6px 0; line-height: 1.35; }
table.stellen { border-collapse: collapse; margin: 6px 0; background: #fff; }
table.stellen th, table.stellen td { border: 2px solid var(--rand); padding: 4px 12px; text-align: center; font-weight: 800; }
table.stellen th { background: var(--fuchs-hell); }
.vokabeln { list-style: none; padding: 0 !important; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px; }
.vokabeln .vb { font-size: 22px; display: inline-block; width: 30px; text-align: center; }
.stufenwahl { display: flex; gap: 6px; }
.stufenwahl button { flex: 1; padding: 8px 4px; border: 2px solid var(--rand); border-radius: 12px; background: #fff; cursor: pointer; font-weight: 800; font-size: 15px; }
.stufenwahl button[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.hinweis { background: #e7f5ff; border: 2px solid #1c7ed6; border-radius: 14px; padding: 10px 14px; font-weight: 600; font-size: 16px; }
.hinweis.zusatz { background: #fff9db; border-color: #e0b400; }

/* ---------- Übung ---------- */
.uebung { max-width: 760px; margin: 0 auto; }
.fortschritt { display: flex; gap: 6px; margin: 4px 0 16px; }
.fortschritt i { flex: 1; height: 12px; border-radius: 999px; border: 2px solid var(--rand); background: #fff; }
.fortschritt i.jetzt { background: var(--fuchs-hell); }
.fortschritt i.ok { background: var(--gruen); }
.fortschritt i.falsch { background: var(--rot); }
.aufgabe { position: relative; padding: 24px; }
.aufgabe .frage { font-size: 22px; font-weight: 700; margin-bottom: 18px; }
.aufgabe .frage .gross, .aufgabe .frage .wort { display: block; font-family: var(--kopf); font-size: 34px; font-weight: 600; margin-top: 10px; letter-spacing: .01em; }
.aufgabe .frage .wort { font-size: 24px; word-break: break-word; }
/* Große Zahl mitten im Satz: in der Zeile bleiben, Satzzeichen danach nicht in eine eigene Zeile schieben */
.aufgabe .frage span.gross { display: inline-block; margin: 0 .1em; line-height: 1.2; }
.aufgabe .frage .satz { display: block; margin-top: 12px; font-size: 24px; font-weight: 600; background: #fff9db; border-radius: 12px; padding: 10px 14px; }
.aufgabe .platz { display: inline-block; min-width: 1.6em; border: 2.5px solid var(--rand); border-radius: 8px; text-align: center; color: transparent; }
.aufgabe .luecke { display: inline-block; min-width: 1.2em; border-bottom: 3px solid var(--fuchs); color: transparent; margin: 0 2px; }
.aufgabe u.mark { text-decoration: none; background: var(--fuchs-hell); border-bottom: 3px solid var(--fuchs); padding: 0 3px; border-radius: 4px; }
.bild { display: flex; justify-content: center; margin: 4px 0 18px; overflow-x: auto; }
.bild-svg { max-width: 100%; height: auto; }
.bild-gross { font-size: 88px; line-height: 1.1; text-align: center; margin: 8px 0; }
.diagramm-titel { text-align: center; font-weight: 800; margin-bottom: 6px; }
.farbfleck { display: inline-block; width: 110px; height: 110px; border-radius: 28px; border: 3px solid var(--rand); box-shadow: var(--schatten-klein); vertical-align: middle; }
.optionen .farbfleck { width: 60px; height: 60px; }
.lesetext { background: #fffdf7; border: 2px solid var(--rand); border-radius: 14px; padding: 14px 18px; margin-bottom: 18px; font-size: 19px; line-height: 1.65; }
.lesetext h3 { font-size: 20px; }

.optionen { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.optionen.kurz { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.optionen.bilder { grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); }
.option {
  min-height: 60px; padding: 12px 16px; border: 2.5px solid var(--rand); border-radius: 16px; background: #fff; cursor: pointer; text-align: left; font-size: 19px; font-weight: 700;
  box-shadow: var(--schatten-klein); transition: transform .08s, background .15s;
  overflow-wrap: anywhere; min-width: 0;
}
.optionen.kurz .option, .optionen.bilder .option { text-align: center; font-size: 26px; font-family: var(--kopf); }
.optionen.bilder .option { font-size: 52px; min-height: 100px; }
.option:hover:not(:disabled) { background: var(--fuchs-hell); transform: translate(-1px, -1px); }
.option:disabled { cursor: default; }
.option.richtig { background: var(--gruen-hell); border-color: var(--gruen); box-shadow: 2px 2px 0 var(--gruen); }
.option.falsch { background: var(--rot-hell); border-color: var(--rot); box-shadow: 2px 2px 0 var(--rot); }
.option.gewaehlt { background: var(--fuchs-hell); }

.eingaben { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; }
.eingaben input { width: 180px; min-height: 58px; font-size: 26px; font-weight: 800; text-align: center; border: 2.5px solid var(--rand); border-radius: 14px; padding: 6px 10px; background: #fff; }
.eingaben input.schmal { width: 90px; }
.eingaben input.breit { width: 100%; text-align: left; font-size: 22px; }
.eingaben.text input { width: 260px; }

.raster { border-collapse: separate; border-spacing: 3px; margin: 0 auto 6px; }
.raster td { width: 46px; height: 50px; text-align: center; font-family: var(--kopf); font-size: 30px; font-weight: 600; padding: 0; }
.raster td.zeichen { color: var(--fuchs); }
.raster tr.linie td { height: 4px; background: var(--rand); border-radius: 2px; }
.raster input { width: 46px; height: 50px; border: 2px solid #b8c7d6; border-radius: 10px; text-align: center; font-family: var(--kopf); font-size: 28px; font-weight: 600; background: #fff; padding: 0; }
.raster tr.uebertrag input { height: 28px; font-size: 16px; border-style: dashed; color: var(--fuchs); }
.raster tr.uebertrag td { height: 28px; }
.raster tr.hilf input { background: #f1f3f5; }
.raster tr.eingabe input { border-color: var(--rand); border-width: 2.5px; }
.raster-hinweis { text-align: center; font-size: 14px; color: var(--tinte-weich); margin-bottom: 8px; }

.woerter { display: flex; flex-wrap: wrap; gap: 8px; font-size: 22px; }
.wort-chip { border: 2.5px solid var(--rand); border-radius: 12px; background: #fff; padding: 6px 12px; cursor: pointer; font-weight: 700; box-shadow: var(--schatten-klein); }
.wort-chip[aria-pressed="true"] { background: var(--fuchs); color: #fff; }
.wort-chip.richtig { background: var(--gruen-hell); border-color: var(--gruen); color: var(--tinte); }
.wort-chip.falsch { background: var(--rot-hell); border-color: var(--rot); color: var(--tinte); }
.reihe-ziel { min-height: 62px; border: 2.5px dashed var(--tinte-weich); border-radius: 16px; padding: 8px; display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; background: #fffdf7; }
.reihe-ziel .wort-chip { background: var(--fuchs-hell); }
.reihe-ziel .nr { font-weight: 900; color: var(--fuchs); margin-right: 4px; }

.lautsprecher { border: 2.5px solid var(--rand); background: #e7f5ff; border-radius: 50%; width: 64px; height: 64px; font-size: 30px; cursor: pointer; box-shadow: var(--schatten-klein); }
.lautsprecher.gross { width: 96px; height: 96px; font-size: 44px; display: block; margin: 0 auto 16px; }
.aktionen { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 22px; flex-wrap: wrap; }
.tippbox { background: #e7f5ff; border: 2px solid #1c7ed6; border-radius: 14px; padding: 10px 14px; margin-top: 16px; font-weight: 600; }

.rueckmeldung { margin-top: 18px; display: grid; grid-template-columns: 92px 1fr; gap: 14px; align-items: start; border-radius: 18px; padding: 16px; border: 2.5px solid; animation: rein .25s ease; }
.rueckmeldung.ok { background: var(--gruen-hell); border-color: var(--gruen); }
.rueckmeldung.nein { background: #fff4e6; border-color: var(--fuchs); }
.rueckmeldung h3 { font-size: 24px; margin-bottom: 4px; }
.rueckmeldung .loesung { font-weight: 800; }
.rueckmeldung .weg { margin-top: 8px; font-size: 17px; }
@keyframes rein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.schmierzettel { margin-top: 16px; }
.schmierzettel summary { cursor: pointer; font-weight: 800; color: var(--tinte-weich); }
.schmierzettel .werkzeuge { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.schmierzettel .werkzeug { border: 2px solid var(--rand); background: #fff; border-radius: 999px; padding: 4px 12px; font-weight: 800; font-size: 15px; cursor: pointer; }
.schmierzettel .werkzeug[aria-pressed="true"] { background: var(--tinte); color: #fff; }
.schmierzettel canvas { display: block; width: 100%; height: 260px; cursor: crosshair; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; border: 2px dashed var(--tinte-weich); border-radius: 12px; touch-action: none; background-color: #fff; background-image: linear-gradient(var(--kaestchen) 1px, transparent 1px), linear-gradient(90deg, var(--kaestchen) 1px, transparent 1px); background-size: 20px 20px; margin-top: 8px; }

/* ---------- Ergebnis ---------- */
.ergebnis { text-align: center; max-width: 560px; margin: 0 auto; }
.ergebnis .mini-fuchs { width: 150px; margin: 0 auto; }
.ergebnis .gross-sterne { font-size: 64px; letter-spacing: 6px; margin: 6px 0; }
.ergebnis .gross-sterne span { display: inline-block; animation: stern .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.ergebnis .gross-sterne span:nth-child(2) { animation-delay: .25s; }
.ergebnis .gross-sterne span:nth-child(3) { animation-delay: .5s; }
@keyframes stern { from { transform: scale(0) rotate(-90deg); } to { transform: scale(1) rotate(0); } }
.ergebnis .zahlen { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; margin: 14px 0; }
.konfetti { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.konfetti i { position: absolute; top: -20px; width: 10px; height: 16px; border: 1.5px solid var(--rand); animation: fallen 2.4s linear forwards; }
@keyframes fallen { to { transform: translateY(110vh) rotate(720deg); } }

/* ---------- Eltern ---------- */
.elternkopf { background: var(--tinte); color: #fff; border-radius: var(--radius); padding: 18px 20px; margin-bottom: 18px; }
.elternkopf h1 { font-size: 30px; margin: 0; }
.kindkarte { margin-bottom: 20px; }
.kindkarte .kopfzeile { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.kindkarte .kopfzeile .tier { font-size: 40px; }
.statgitter { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.statfach { border: 2px solid var(--rand); border-radius: 14px; padding: 10px 12px; background: var(--fachhell); }
.statfach b { font-family: var(--kopf); }
.tagesbalken { display: flex; align-items: flex-end; gap: 4px; height: 80px; border-bottom: 2px solid var(--rand); padding-top: 6px; }
.tagesbalken div { flex: 1; background: var(--fuchs); border-radius: 4px 4px 0 0; min-height: 2px; position: relative; }
.tagesbalken div span { position: absolute; bottom: -20px; left: 50%; transform: translateX(-50%); font-size: 11px; color: var(--tinte-weich); }
.liste { list-style: none; padding: 0; margin: 0; }
.liste li { padding: 6px 0; border-bottom: 1px dashed #d9cfc4; display: flex; justify-content: space-between; gap: 10px; }
.tiere-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.tiere-wahl button { font-size: 30px; width: 54px; height: 54px; border: 2px solid var(--rand); border-radius: 14px; background: #fff; cursor: pointer; }
.tiere-wahl button[aria-pressed="true"] { background: var(--fuchs-hell); box-shadow: inset 0 0 0 3px var(--fuchs); }
dialog { border: 2.5px solid var(--rand); border-radius: var(--radius); box-shadow: var(--schatten); padding: 22px; max-width: 520px; width: calc(100% - 32px); background: var(--papier); }
dialog::backdrop { background: rgba(43, 29, 22, .45); }

@media (max-width: 760px) {
  body { font-size: 17px; }
  .held { grid-template-columns: 1fr; }
  .held .fuchs-buehne { max-width: 200px; grid-row: 1; }
  .erklaer { grid-template-columns: 1fr; }
  .erklaer .seitenleiste { position: static; order: -1; }
  .aufgabe { padding: 18px 14px; }
  .aufgabe .frage .gross { font-size: 28px; }
  .raster td, .raster input { width: 38px; height: 44px; font-size: 24px; }
  .rueckmeldung { grid-template-columns: 60px 1fr; }
  .bild-gross { font-size: 70px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
