/* tafel.css – Tafel-Demo „Ableiten“ (Verena 03.11.2026). Bühne 1600 × 900 (16:9), skaliert per JS auf jede Tafel; Kindertext in GS Druck.
   Farben wie grundschullupe.de; Lupenstelle grau hinterlegt wie auf den Blättern. Keine Inline-Styles (CSP). */
@font-face { font-family: "GS Druck"; src: url("/fonts/gsdruck-regular.woff2") format("woff2"); font-display: block; }
@font-face { font-family: "Fibel Web"; src: url("/fonts/fibel-web-regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fibel Web"; src: url("/fonts/fibel-web-bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }
:root {
  --papier: #fbf7f0; --karte: #ffffff; --tinte: #1b1916; --leise: #6b645c; --linie: #d8d0c4;
  --terra: #b5532e; --terra-hell: #f3ddd3; --gold: #d9a531; --gold-hell: #fbf0d2; --gruen: #3f8a4f; --gruen-hell: #dcefe0;
  --rot: #c7372f; --lupe: #e0e0e0;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #2a2622; overflow: hidden; }
body { font-family: "Fibel Web", system-ui, sans-serif; color: var(--tinte); -webkit-user-select: none; user-select: none; touch-action: manipulation; }
.buehne { position: absolute; left: 0; top: 0; width: 1600px; height: 900px; background: var(--papier); transform-origin: 0 0; overflow: hidden; }
.gs { font-family: "GS Druck", "Fibel Web", sans-serif; font-weight: 400; }
button { font: inherit; color: inherit; cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* Seiten */
.seite { position: absolute; inset: 0 0 96px 0; padding: 48px 72px 24px; display: none; flex-direction: column; }
.seite.aktiv { display: flex; animation: einblenden .35s ease-out; }
@keyframes einblenden { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
h1 { font-size: 120px; margin: 0 0 12px; line-height: 1; }
h2 { font-size: 52px; margin: 0 0 32px; display: flex; align-items: center; gap: 22px; }
h3 { font-size: 40px; margin: 0 0 8px; }
.hinweis { font-size: 30px; margin: 0 0 18px; color: var(--leise); line-height: 1.3; }
/* Lupenstelle nur im Mittelband grau (GS Druck: Oberkante 0,78 em über der Grundlinie, x-Höhe 0,3 em + halbe Strichstärke) */
.lupe, .wort-anim .vokal, .wortkarte .luecke.voll { display: inline-block; line-height: normal; background: linear-gradient(transparent .37em, var(--lupe) .37em, var(--lupe) .88em, transparent .88em); padding: 0 .04em; }
.art { color: #8d8780; }

/* Knöpfe */
.knopf { border: 0; border-radius: 22px; background: var(--terra); color: #fff; font-size: 32px; font-weight: 700; padding: 20px 34px; min-height: 84px;
  display: inline-flex; align-items: center; gap: 14px; box-shadow: 0 4px 0 #8e3f22; transition: transform .1s; }
.knopf:active { transform: translateY(3px); box-shadow: 0 1px 0 #8e3f22; }
.knopf.leise { background: var(--karte); color: var(--terra); box-shadow: 0 0 0 3px var(--terra) inset, 0 4px 0 var(--linie); }
.knopf:disabled { opacity: .4; cursor: default; }
.knopf.gross { font-size: 44px; padding: 26px 48px; }
.knopf svg { width: 40px; height: 40px; stroke-width: 3; }
.knopfreihe { display: flex; gap: 20px; flex-wrap: wrap; }
.knopfreihe.senkrecht { flex-direction: column; align-items: stretch; }

/* 1 Start */
.start { display: flex; align-items: center; gap: 80px; height: 100%; }
.start-bild { width: 470px; height: 470px; border-radius: 40px; background: var(--karte); display: grid; place-items: center; box-shadow: 0 10px 30px rgba(60,40,20,.12); flex: none; }
.start-bild img { width: 360px; height: 360px; }
.start-logo { display: block; height: 110px; width: auto; margin: 0 0 34px; }   /* Logo Grundschullupe (04.11.2026) */
.dach { font-size: 30px; color: var(--terra); font-weight: 700; margin: 0 0 6px; letter-spacing: .02em; }
.wortpaar { font-size: 88px; margin: 10px 0 48px; white-space: nowrap; }
.pfeil { color: var(--terra); font-family: "Fibel Web", sans-serif; }

/* 2 Merksatz */
.zeichen { width: 84px; height: 84px; border-radius: 20px; border: 3px solid var(--tinte); display: inline-grid; place-items: center; flex: none;
  background: radial-gradient(circle, var(--gold-hell) 0 25px, var(--gold) 26px 29px, transparent 30px); position: relative; }
.zeichen::after { content: ""; width: 26px; height: 38px; background: var(--tinte);
  clip-path: polygon(62% 0, 8% 58%, 44% 58%, 30% 100%, 92% 38%, 54% 38%, 72% 0); }
.merksatz { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 26px; }
.merksatz li { font-size: 54px; display: flex; align-items: center; gap: 30px; background: var(--karte); border-radius: 24px; padding: 22px 34px;
  box-shadow: 0 4px 14px rgba(60,40,20,.08); opacity: .35; transition: opacity .4s, transform .4s; }
.merksatz li.an { opacity: 1; transform: translateX(10px); }
.merksatz.alle li { opacity: 1; transform: none; }
.merksatz .nr { width: 64px; height: 64px; border-radius: 50%; background: var(--terra); color: #fff; display: grid; place-items: center; font-weight: 700; font-size: 36px; flex: none; }
.merksatz b { font-size: 60px; }
.bu { color: var(--terra); font-weight: 700; }

/* 3 Video */
/* Video absolut in der Restfläche: sonst nimmt es seine Eigenhöhe 720 px und rutscht unter die Leiste – Steuerung nicht mehr antippbar (Verena 03.11.2026: „video geht nicht“) */
.film { flex: 1; min-height: 0; position: relative; }
.film video { position: absolute; top: 0; left: 50%; transform: translateX(-50%); height: 100%; max-width: 100%; aspect-ratio: 16 / 9; border-radius: 24px; background: #000; box-shadow: 0 10px 30px rgba(0,0,0,.25); }

/* 4 Animation */
.verwandle { flex: 1; display: flex; align-items: center; justify-content: center; gap: 60px; min-height: 0; }
.verwandle .gross-bild { width: 250px; height: 250px; border-radius: 30px; background: var(--karte); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(60,40,20,.1); }
.verwandle .gross-bild img { width: 210px; height: 210px; }
.wort-anim { font-family: "GS Druck", sans-serif; font-size: 130px; white-space: nowrap; display: flex; align-items: baseline; }
.wort-anim .art { font-size: 90px; margin-right: 30px; transition: opacity .3s; }

.wort-anim .vokal.springt { animation: springen .7s ease-in-out; }
@keyframes springen { 0% { transform: none; } 35% { transform: translateY(-.35em) scale(1.15); } 70% { transform: translateY(.04em); } 100% { transform: none; } }
.wort-anim .neu { display: inline-block; color: var(--terra); animation: hinein .5s ease-out both; }
@keyframes hinein { from { opacity: 0; transform: translateX(-.4em); } to { opacity: 1; transform: none; } }
.bildreihe { display: flex; justify-content: center; gap: 26px; }
.bildkarte { width: 200px; height: 200px; border-radius: 28px; border: 0; background: var(--karte); box-shadow: 0 5px 0 var(--linie); display: grid; place-items: center; padding: 0; }
.bildkarte img { width: 160px; height: 160px; pointer-events: none; }
.bildkarte.gewaehlt { box-shadow: 0 0 0 6px var(--terra); }
.bildkarte.fertig::after { content: "✓"; position: absolute; }

/* 5 Sortieren */
.zaehler { margin-left: auto; font-size: 34px; color: var(--leise); }
.kisten { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; height: 360px; }
.kiste { border: 4px dashed var(--linie); border-radius: 30px; padding: 16px 22px; display: flex; flex-direction: column; transition: background .2s, border-color .2s; }
.kiste[data-kiste="a"] { background: var(--gold-hell); }
.kiste[data-kiste="e"] { background: #eef1f5; }
.kiste.ziel { border-color: var(--terra); border-style: solid; }
.kiste-kopf { margin: 0 0 10px; font-size: 54px; display: flex; align-items: baseline; gap: 14px; }
.kiste-kopf small { font-size: 26px; color: var(--leise); margin-left: auto; }
.kiste-inhalt { display: flex; flex-wrap: wrap; gap: 14px; align-content: flex-start; }
.stapel { display: flex; flex-wrap: wrap; justify-content: center; gap: 18px; margin-top: 26px; min-height: 150px; }
.wortkarte { display: flex; align-items: center; gap: 12px; background: var(--karte); border-radius: 22px; padding: 10px 22px 10px 12px; box-shadow: 0 5px 0 var(--linie);
  font-family: "GS Druck", sans-serif; font-size: 58px; touch-action: none; cursor: grab; white-space: nowrap; }
.wortkarte img { width: 76px; height: 76px; pointer-events: none; }
/* Lücke mit Leerzeichen: Zeilenhöhe 0,38 em setzt die Unterkante genau auf die Grundlinie (GS Druck: 0,78 em über, 0,36 em unter der Grundlinie) */
.wortkarte .luecke { display: inline-block; width: .7em; line-height: .38em; border-bottom: 5px solid var(--terra); vertical-align: baseline; margin: 0 .05em; }
.wortkarte .luecke.voll { width: auto; border-bottom-width: 0; margin: 0; padding: 0 .01em; }
.wortkarte.zieht { position: absolute; pointer-events: none; z-index: 10; box-shadow: 0 16px 30px rgba(0,0,0,.25); cursor: grabbing; }
.wortkarte.abgelegt { font-size: 50px; padding: 6px 16px 6px 8px; box-shadow: none; cursor: default; }
.wortkarte.abgelegt img { width: 54px; height: 54px; }
.wortkarte.wackelt { animation: wackeln .45s; }
@keyframes wackeln { 25% { transform: translateX(-10px); } 75% { transform: translateX(10px); } }
#sortneu { align-self: center; margin-top: 14px; }

/* 6 Mitmachen */
.mitmachen { display: grid; grid-template-columns: 1.15fr 1fr; gap: 40px; flex: 1; min-height: 0; }
.feld { background: var(--karte); border-radius: 30px; padding: 26px 34px; min-height: 0; overflow: hidden; display: flex; flex-direction: column; box-shadow: 0 6px 20px rgba(60,40,20,.08); }
.daumen-buehne { flex: 1; display: flex; align-items: center; justify-content: center; gap: 30px; min-height: 0; }
.daumen-buehne .ohr { width: 140px; height: 140px; color: var(--terra); stroke-width: 2.6; }
.daumen-buehne img { width: 150px; height: 150px; }
.daumen-buehne .paar { font-family: "GS Druck", sans-serif; font-size: 58px; line-height: 1.35; }
.daumen-buehne .urteil { font-family: "Fibel Web", sans-serif; font-size: 34px; font-weight: 700; color: var(--gruen); }
.daumen-buehne .urteil.nein { color: var(--leise); }
.ohr.hoert { animation: pulsieren 1s ease-in-out 2; }
@keyframes pulsieren { 50% { transform: scale(1.12); } }
.uhr { position: relative; width: 240px; height: 240px; margin: 0 auto 20px; flex: none; }
.uhr svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.uhr-grund { stroke: var(--terra-hell); stroke-width: 12; }
.uhr-rest { stroke: var(--terra); stroke-width: 12; stroke-dasharray: 276.46; stroke-dashoffset: 0; transition: stroke-dashoffset 1s linear; }
.uhr span { position: absolute; inset: 0; display: grid; place-items: center; font-size: 84px; font-weight: 700; }
.uhr.fertig span { color: var(--gruen); }

/* 7 Schreiben */
.schreiben { display: grid; grid-template-columns: 330px 1fr; gap: 36px; flex: 1; min-height: 0; }
.aufgabe { display: flex; flex-direction: column; gap: 18px; }
.aufgabe .knopf { min-height: 76px; padding: 14px 24px; font-size: 30px; justify-content: center; }
.aufgabe-bild { height: 250px; border-radius: 30px; background: var(--karte); display: grid; place-items: center; box-shadow: 0 6px 20px rgba(60,40,20,.08); font-size: 28px; color: var(--leise); text-align: center; padding: 20px; }
.aufgabe-bild img { width: 210px; height: 210px; }
.lineatur-feld { position: relative; background: var(--karte); border-radius: 30px; box-shadow: 0 6px 20px rgba(60,40,20,.08); overflow: hidden; }
.linien { position: absolute; inset: 0; width: 100%; height: 100%; }
#schreibflaeche { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; }
.werkzeuge { position: absolute; right: 18px; top: 18px; display: flex; gap: 12px; }
.wz { width: 76px; height: 76px; border-radius: 50%; border: 3px solid var(--linie); background: var(--karte); display: grid; place-items: center; }
.wz.aktiv { border-color: var(--terra); box-shadow: 0 0 0 3px var(--terra); }
.wz svg { width: 38px; height: 38px; }
.punkt { width: 32px; height: 32px; border-radius: 50%; display: block; }
.punkt.schwarz { background: var(--tinte); } .punkt.rot { background: var(--rot); }

/* 8 Abschluss */
.ampel { display: flex; justify-content: center; gap: 50px; flex: 1; align-items: center; }
.licht { width: 340px; height: 400px; border-radius: 40px; border: 0; background: var(--karte); box-shadow: 0 6px 0 var(--linie); display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 26px; font-size: 34px; transition: transform .2s, box-shadow .2s; }
.licht.an { transform: translateY(-10px) scale(1.04); }
.licht.gruen.an { box-shadow: 0 0 0 8px var(--gruen); } .licht.gelb.an { box-shadow: 0 0 0 8px var(--gold); } .licht.rot.an { box-shadow: 0 0 0 8px var(--rot); }
.gesicht { width: 190px; height: 190px; border-radius: 50%; position: relative; }
.gruen .gesicht { background: var(--gruen); } .gelb .gesicht { background: var(--gold); } .rot .gesicht { background: var(--rot); }
.gesicht::before { content: ""; position: absolute; left: 50px; top: 62px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 68px 0 0 #fff; }
.gesicht::after { content: ""; position: absolute; left: 50px; width: 90px; height: 40px; border: 9px solid #fff; }
.gesicht.gut::after { top: 92px; border-top: 0; border-radius: 0 0 60px 60px; }
.gesicht.mittel::after { top: 120px; height: 0; border-width: 9px 0 0 0; }
.gesicht.hilfe::after { top: 120px; border-bottom: 0; border-radius: 60px 60px 0 0; }
.lob { text-align: center; font-size: 56px; font-weight: 700; color: var(--terra); margin: 0 0 10px; animation: einblenden .5s; }

/* Leiste */
.leiste { position: absolute; left: 0; right: 0; bottom: 0; height: 96px; display: flex; align-items: center; gap: 18px; padding: 0 40px; background: #f2ebe0; border-top: 2px solid var(--linie); }
.rund { width: 72px; height: 72px; border-radius: 50%; border: 0; background: var(--karte); box-shadow: 0 3px 0 var(--linie); display: grid; place-items: center; flex: none; }
.rund svg { width: 36px; height: 36px; stroke-width: 3; }
.rund.ton { background: var(--terra); color: #fff; box-shadow: 0 3px 0 #8e3f22; }
.rund.ton.spielt { animation: pulsieren 1s ease-in-out infinite; }
.punkte { list-style: none; display: flex; gap: 12px; margin: 0 6px; padding: 0; }
.punkte button { width: 46px; height: 46px; border-radius: 50%; border: 3px solid var(--linie); background: var(--karte); font-size: 22px; font-weight: 700; padding: 0; }
.punkte button.aktiv { background: var(--terra); border-color: var(--terra); color: #fff; }
.vermerk { margin: 0 0 0 auto; font-size: 18px; color: var(--leise); }
.vermerk a { color: inherit; }
:focus-visible { outline: 4px solid var(--gold); outline-offset: 3px; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
