:root{
  --gras:#2f9e44; --gras-d:#1f7a33; --gras-l:#d3f9d8;
  --himmel:#4dabf7; --himmel-d:#1971c2; --rot:#e03131; --gold:#fcc419; --gold-d:#e67700;
  --ink:#1b2a1f; --mute:#5c6b60; --papier:#fffdf6; --linie:#e6e2d3;
  --font:"Baloo 2","Arial Rounded MT Bold","Trebuchet MS",system-ui,sans-serif;
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;height:100%;background:#1f7a33}
body{font-family:system-ui,"Segoe UI",Roboto,sans-serif;color:var(--ink);overscroll-behavior:none}
button{font-family:inherit;color:inherit}
h1,h2,h3{font-family:var(--font);margin:0;line-height:1.15}

/* ---------- feste Bühne: nichts springt ---------- */
.app{position:relative;height:100vh;height:100dvh;max-width:560px;margin:0 auto;display:flex;flex-direction:column;background:var(--papier);overflow:hidden;
  padding-top:env(safe-area-inset-top);padding-bottom:env(safe-area-inset-bottom)}
.kopf{flex:0 0 60px;display:flex;align-items:center;justify-content:space-between;padding:0 10px;background:linear-gradient(180deg,#2b8a3e,#37b24d);color:#fff;z-index:5}
.logo{border:0;background:none;cursor:pointer;text-align:left;line-height:1;padding:0}
.logo .l1{display:inline-block;background:#fff;color:var(--gras-d);font-family:var(--font);font-weight:800;font-size:12px;padding:1px 7px;border-radius:6px}
.logo .l2{display:block;font-family:var(--font);font-weight:800;font-size:20px;color:#fff;text-shadow:0 2px 0 var(--gras-d);margin-top:2px}
.kopf-r{display:flex;gap:6px;align-items:center}
.kbtn{border:0;background:#fff;border-radius:12px;width:42px;height:42px;font-size:20px;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.18)}
.lang{position:relative}
.lang .box{position:absolute;right:0;top:50px;background:#fff;border-radius:14px;padding:8px;display:none;gap:6px;box-shadow:0 10px 30px rgba(0,0,0,.3);z-index:20;width:200px;flex-direction:column;color:var(--ink)}
.lang.offen .box{display:flex}
.lang .box button{display:flex;align-items:center;gap:10px;border:0;background:#f4f4f0;border-radius:10px;padding:6px 10px;font-size:15px;font-weight:700;cursor:pointer;text-align:left}
.lang .box button span{font-size:24px}
.lang .box button[disabled]{opacity:.45;cursor:default}
.lang .box button small{margin-left:auto;font-weight:600;font-size:11px}
.buehne{flex:1 1 auto;position:relative;overflow:hidden}
.fuss{flex:0 0 auto;font-size:10.5px;text-align:center;color:#fff;background:#1f7a33;padding:5px 8px;line-height:1.3}

.screen{position:absolute;inset:0;display:none;flex-direction:column;overflow:hidden}
.screen.an{display:flex}

/* ---------- Bausteine ---------- */
.btn{border:0;border-radius:16px;padding:12px 18px;font-family:var(--font);font-weight:800;font-size:18px;cursor:pointer;transition:transform .08s;line-height:1.1}
.btn:active{transform:translateY(3px)}
.btn.gold{background:var(--gold);color:#5c3b00;box-shadow:0 5px 0 var(--gold-d)}
.btn.gruen{background:var(--gras);color:#fff;box-shadow:0 5px 0 var(--gras-d)}
.btn.blau{background:var(--himmel-d);color:#fff;box-shadow:0 5px 0 #0b4f8a}
.btn.rot{background:var(--rot);color:#fff;box-shadow:0 5px 0 #a61e1e}
.btn.weiss{background:#fff;color:var(--ink);box-shadow:0 5px 0 #ccc}
.btn.gross{font-size:22px;padding:14px 26px}
.btn[disabled]{opacity:.45;pointer-events:none}
.klein{font-size:13px;color:var(--mute);text-align:center}
.sprech{background:#fff;border-radius:18px;padding:12px 14px;font-size:16px;line-height:1.4;box-shadow:0 3px 0 rgba(0,0,0,.08);text-align:left}
.sprech b{display:block;font-family:var(--font);color:var(--gras-d);font-size:15px}

/* ---------- Start ---------- */
#s-start,#s-alter,#s-tor{background:linear-gradient(180deg,#e7f5ff,#d3f9d8)}
.start-in{flex:1;overflow-y:auto;padding:16px 18px 20px;display:flex;flex-direction:column;align-items:center;gap:12px;text-align:center}
.start-figur{width:150px;height:150px;border-radius:50%;overflow:hidden;border:5px solid #fff;box-shadow:0 6px 0 rgba(0,0,0,.1);flex:0 0 auto}
.start-figur img{width:100%;height:100%;object-fit:cover;object-position:center 15%}
.trikot{width:150px;height:142px;flex:0 0 auto}
.trname{font-family:var(--font);font-weight:800;font-size:19px;fill:#1b2a1f}
.trnum{font-family:var(--font);font-weight:800;font-size:56px;fill:#1971c2;stroke:#fff;stroke-width:2}
#nameIn{width:100%;max-width:300px;border:3px solid #fff;border-radius:14px;padding:12px;font-size:20px;font-weight:800;text-align:center;box-shadow:0 3px 0 rgba(0,0,0,.08)}
.nummer{display:flex;align-items:center;gap:14px}
.nummer button{width:48px;height:48px;border-radius:50%;border:0;background:#fff;font-size:26px;font-weight:800;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.12)}
.nummer span{font-family:var(--font);font-weight:800;font-size:38px;min-width:64px;color:var(--himmel-d)}
.alter{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;width:100%;max-width:340px}
.alter button{border:0;border-radius:18px;background:#fff;font-family:var(--font);font-weight:800;font-size:34px;padding:16px 0;cursor:pointer;box-shadow:0 5px 0 rgba(0,0,0,.12);color:var(--himmel-d)}

/* ---------- Stadion ---------- */
#s-hub{background:#2b8a3e;padding:8px 10px}
.ticker{flex:0 0 auto;display:flex;align-items:center;gap:8px;background:#1b2a1f;color:#ffe066;border-radius:14px;padding:5px 10px 5px 5px;font-size:13.5px;font-weight:700;min-height:48px}
.ticker img{width:38px;height:38px;border-radius:50%;object-fit:cover;object-position:center 20%;flex:0 0 38px;border:2px solid #ffe066}
.platz{flex:1;margin-top:8px;border-radius:16px;border:3px solid #fff;position:relative;overflow-y:auto;
  background:linear-gradient(transparent calc(50% - 1.5px),#fff calc(50% - 1.5px),#fff calc(50% + 1.5px),transparent calc(50% + 1.5px)),
             repeating-linear-gradient(0deg,#40c057 0 52px,#37b24d 52px 104px);
  display:grid;grid-template-columns:1fr 1fr;grid-auto-rows:minmax(76px,1fr);gap:9px;padding:10px}
.station{position:relative;border:0;border-radius:16px;background:#fff;cursor:pointer;display:flex;align-items:center;gap:8px;padding:8px;text-align:left;box-shadow:0 4px 0 rgba(0,0,0,.2)}
.station .nr{flex:0 0 40px;height:40px;border-radius:50%;color:#fff;font-family:var(--font);font-weight:800;font-size:22px;display:flex;align-items:center;justify-content:center}
.station .tx{font-family:var(--font);font-weight:800;font-size:15px;line-height:1.05}
.station .tx small{display:block;font-family:system-ui,sans-serif;font-weight:600;font-size:11px;color:var(--mute);margin-top:3px}
.station .stern{position:absolute;top:-7px;right:-5px;width:26px;height:26px;border-radius:50%;font-size:14px;display:flex;align-items:center;justify-content:center;font-weight:800}
.station.halb .stern{background:#fff;border:2px solid var(--gold-d);color:var(--gold-d)}
.station.fertig{background:#fff9db}
.station.fertig .stern{background:var(--gold);color:#5c3b00}
.station.gold{background:linear-gradient(135deg,#fff3bf,#ffe066)}
.station.gold .stern{background:#e67700;color:#fff}
.station.zu{opacity:.75}
.station.zu .nr::after{content:"🔒";position:absolute;font-size:14px;transform:translate(16px,14px)}
.hubfuss{flex:0 0 auto;display:flex;justify-content:space-between;color:#fff;font-weight:800;font-size:14px;padding:7px 4px 0}

/* ---------- Kopf in Stationen ---------- */
.stkopf{flex:0 0 54px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border-bottom:1px solid var(--linie);background:#fff}
.zurueck,.vorlesen{border:0;background:#f1f3f5;border-radius:12px;width:42px;height:42px;font-size:20px;cursor:pointer;flex:0 0 42px}
.vorlesen.spricht{background:var(--gold)}
.sttitel{font-family:var(--font);font-weight:800;font-size:19px;text-align:center;flex:1;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}

/* ---------- Erklärseiten ---------- */
#s-seiten{background:#f1f8f3}
.seite{flex:1;display:flex;flex-direction:column;overflow:hidden;margin:10px;border-radius:20px;background:#fff;box-shadow:0 3px 0 rgba(0,0,0,.08)}
.seite-bild{flex:0 0 44%;position:relative;overflow:hidden;background:#cfe8ff;display:flex;align-items:center;justify-content:center}
.seite-bild img{width:100%;height:100%;object-fit:cover;object-position:center 18%}
.seite-bild svg{width:100%;height:100%}
.seite-bild .marke{position:absolute;left:10px;bottom:8px;background:#fff;border-radius:999px;padding:2px 10px;font-family:var(--font);font-weight:800;font-size:13px}
.seite-text{flex:1;overflow-y:auto;padding:14px 16px}
.seite-text h2{font-size:24px;margin-bottom:6px}
.seite-text p{font-size:18px;line-height:1.5;margin:0}
.seite-text .profi{display:inline-block;background:#fff3bf;color:#8a5a00;font-weight:800;font-size:11px;padding:2px 8px;border-radius:999px;margin-bottom:6px}
.punkte{flex:0 0 14px;display:flex;justify-content:center;gap:6px}
.punkte i{width:9px;height:9px;border-radius:50%;background:#ced4da}
.punkte i.an{background:var(--gras);width:22px;border-radius:9px}
.navi{flex:0 0 auto;display:flex;gap:10px;padding:10px}
.navi .btn{flex:1}
.navi .btn.weiss{flex:0 0 70px}

/* ---------- Spiel ---------- */
#s-spiel{background:#e7f5ff}
.spiel{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px}
.mit{display:flex;gap:10px;align-items:flex-start}
.mit img{width:56px;height:56px;border-radius:50%;object-fit:cover;object-position:center 15%;border:3px solid #fff;flex:0 0 56px;box-shadow:0 3px 0 rgba(0,0,0,.1)}
.mit .sprech{flex:1}
.balken{display:flex;gap:4px}
.balken i{flex:1;height:7px;border-radius:9px;background:rgba(0,0,0,.12)}
.balken i.an{background:var(--gras)}
.frage{background:#fff;border-radius:16px;padding:14px;font-weight:800;font-size:17px;line-height:1.35}
.antw{display:grid;gap:8px}
.antw button{text-align:left;border:0;border-radius:14px;padding:13px;background:#fff;font-weight:800;font-size:16px;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.1)}
.antw button.ok{background:#b2f2bb}.antw button.nein{background:#ffc9c9}
.rueck{background:#fff;border-radius:16px;padding:12px 14px;font-size:15.5px;line-height:1.4}
.rueck b{display:block;font-family:var(--font);font-size:16px}
.gitter{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ding{border:0;background:#fff;border-radius:14px;padding:9px 4px;cursor:pointer;font-size:12.5px;font-weight:800;box-shadow:0 3px 0 rgba(0,0,0,.1);line-height:1.15;min-height:84px}
.ding .ic{font-size:30px;display:block;margin-bottom:3px}
.ding.ok{background:#b2f2bb;outline:3px solid var(--gras)}
.ding.nein{background:#ffc9c9;outline:3px solid var(--rot)}
.reihe-ziel{display:flex;flex-direction:column;gap:6px;min-height:40px}
.reihe-ziel div{background:#b2f2bb;border-radius:12px;padding:9px 12px;font-weight:800;font-size:15px}
.reihe-ziel div b{display:inline-block;width:24px;height:24px;border-radius:50%;background:var(--gras);color:#fff;text-align:center;margin-right:8px;font-size:14px;line-height:24px}
.reihe-wahl{display:grid;gap:7px}
.reihe-wahl button{border:0;background:#fff;border-radius:12px;padding:11px;font-weight:800;font-size:15px;cursor:pointer;box-shadow:0 3px 0 rgba(0,0,0,.1);text-align:left}
.wackel{animation:wackel .35s}
@keyframes wackel{25%{transform:translateX(-6px)}75%{transform:translateX(6px)}}
.memory{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.karte{aspect-ratio:3/4;border:0;border-radius:12px;cursor:pointer;background:linear-gradient(135deg,#c2255c,#f06595);color:#fff;font-size:26px;font-weight:800;box-shadow:0 3px 0 rgba(0,0,0,.15);padding:4px;line-height:1.1}
.karte.offen{background:#fff;color:var(--ink);font-size:12px}
.karte.offen .ic{font-size:24px;display:block}
.karte.weg{background:#d3f9d8;color:var(--ink);font-size:12px;opacity:.85}
.karte.weg .ic{font-size:24px;display:block}
.szene{background:#40c057;border-radius:16px;height:170px;position:relative;border:3px solid #fff;overflow:hidden;flex:0 0 170px}
.szene svg{width:100%;height:100%}
.ms{display:grid;grid-template-columns:1fr 1fr;gap:8px}
.ms .btn{font-size:17px;padding:10px 6px}
.ms .btn small{display:block;font-size:12px;font-weight:700;opacity:.9}
.ms .weiter{grid-column:1/3}
.ampel{width:150px;height:150px;border-radius:50%;margin:10px auto;display:flex;align-items:center;justify-content:center;font-size:76px;border:0;cursor:pointer;background:#e03131;box-shadow:0 8px 0 rgba(0,0,0,.2);transition:background .1s}
.ampel.gruen{background:#2f9e44}
.ampel.warte{background:#adb5bd}
.zeitwert{text-align:center;font-family:var(--font);font-weight:800;font-size:26px;min-height:34px}
.tor{position:relative;height:200px;border-radius:14px;background:#40c057;border:3px solid #fff;overflow:hidden;flex:0 0 200px}
.tor .netz{position:absolute;left:8%;right:8%;top:10px;height:120px;border:6px solid #fff;border-bottom:0;background:repeating-linear-gradient(45deg,rgba(255,255,255,.25) 0 2px,transparent 2px 14px),repeating-linear-gradient(-45deg,rgba(255,255,255,.25) 0 2px,transparent 2px 14px)}
.tor .kira{position:absolute;bottom:30px;width:70px;height:70px;border-radius:50%;object-fit:cover;object-position:center 18%;border:3px solid #fff;left:50%;margin-left:-35px;transition:left .15s}
.tor .ball{position:absolute;font-size:30px;left:50%;bottom:-40px;margin-left:-15px;opacity:0}
.tor .ball.flieg{transition:all var(--t,1.2s) linear;opacity:1}
.zonen{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.zonen button{border:0;border-radius:14px;background:#fff;padding:14px 0;font-size:26px;cursor:pointer;box-shadow:0 4px 0 rgba(0,0,0,.12)}
.ergebnis{text-align:center;font-family:var(--font);font-weight:800;font-size:22px}

/* ---------- Übung ---------- */
#s-uebung{background:#fff9db}
.uebung{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:10px}
.uhr{font-family:var(--font);font-weight:800;font-size:66px;text-align:center;color:var(--gras-d);line-height:1}
.schritt{text-align:center;font-family:var(--font);font-weight:800;font-size:24px;color:#c2255c;min-height:34px}
.zaehler{display:flex;justify-content:center;align-items:center;gap:16px}
.zaehler span{font-family:var(--font);font-weight:800;font-size:52px;min-width:80px;text-align:center}
.zaehler button{width:80px;height:80px;border-radius:50%;border:0;font-size:28px;font-weight:800;cursor:pointer;background:var(--gold);box-shadow:0 5px 0 var(--gold-d)}
.rekord{text-align:center;font-size:14px;color:var(--mute);font-weight:700}
.daumen{background:#fff;border:3px dashed var(--gras);border-radius:16px;padding:12px;text-align:center}
.daumen p{margin:0 0 8px;font-weight:700;font-size:14.5px}

/* ---------- Fertig / Album / Urkunde ---------- */
#s-fertig{background:radial-gradient(circle at 50% 30%,#fff3bf,#ffd43b)}
.fertig-in{flex:1;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:12px;padding:20px;text-align:center;position:relative}
.fertig-in h2{font-size:28px}
.fertig-in p{font-size:17px;margin:0;max-width:380px}
.konfetti{position:absolute;inset:0;pointer-events:none;overflow:hidden}
.konfetti i{position:absolute;top:-12px;width:8px;height:12px;animation:fall 2.8s linear infinite}
@keyframes fall{to{transform:translateY(900px) rotate(600deg)}}
.sticker{aspect-ratio:3/4;border-radius:14px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;font-family:var(--font);font-weight:800;font-size:13px;line-height:1.1;padding:6px;color:#fff;border:3px solid #fff;box-shadow:0 4px 0 rgba(0,0,0,.15)}
.sticker .ic{font-size:34px;display:block;margin-bottom:4px}
.sticker .no{position:absolute;top:4px;left:7px;font-size:11px;opacity:.85}
.sticker.gross{width:150px;font-size:18px;animation:pop .5s}
.sticker.gross .ic{font-size:64px}
.sticker.goldrand{border-color:#ffd43b;box-shadow:0 0 0 3px #e67700,0 6px 0 rgba(0,0,0,.15)}
.sticker.leer{background:#fff;color:#bfa95a;border:2px dashed #e0c36a;box-shadow:none}
.sticker.leer .ic{filter:grayscale(1);opacity:.35}
@keyframes pop{0%{transform:scale(.5)}70%{transform:scale(1.1)}100%{transform:scale(1)}}
#s-album{background:#fff9db}
.album-in{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px}
.album{display:grid;grid-template-columns:repeat(3,1fr);gap:10px}
.album .sticker{position:relative}
#s-urkunde{background:#e9ecef}
.urkunde{flex:1;overflow-y:auto;margin:10px;background:#fffdf3;border-radius:14px;border:10px double #e67700;padding:18px 14px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:8px}
.urkunde .pokal{font-size:70px;line-height:1}
.urkunde h1{font-family:var(--font);font-size:34px;color:#8a5a00}
.urkunde .name{font-family:var(--font);font-weight:800;font-size:36px;color:var(--gras-d);border-bottom:2px solid #e0c36a;padding:0 20px}
.urkunde .sig{display:flex;gap:6px;justify-content:center;flex-wrap:wrap;margin-top:6px}
.urkunde .sig div{font-size:11px;font-weight:700;color:var(--mute);width:62px}
.urkunde .sig img{width:52px;height:52px;border-radius:50%;object-fit:cover;object-position:center 16%;border:2px solid #fff;box-shadow:0 2px 4px rgba(0,0,0,.15);display:block;margin:0 auto 2px}

/* ---------- Eltern ---------- */
.aufgabe{font-family:var(--font);font-weight:800;font-size:40px}
.tor-antw{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;width:100%;max-width:300px}
.tor-antw button{border:0;border-radius:14px;background:#fff;font-family:var(--font);font-weight:800;font-size:26px;padding:12px 0;cursor:pointer;box-shadow:0 4px 0 rgba(0,0,0,.12)}
#s-eltern{background:#f8f9fa}
.eltern{flex:1;overflow-y:auto;padding:12px;display:flex;flex-direction:column;gap:12px}
.ekarte{background:#fff;border-radius:16px;padding:14px;box-shadow:0 2px 0 rgba(0,0,0,.06)}
.ekarte h3{font-size:18px;margin-bottom:8px}
.ekarte p{margin:6px 0;font-size:14.5px;line-height:1.45}
.wahl{display:flex;gap:6px;flex-wrap:wrap}
.wahl button{border:2px solid var(--linie);background:#fff;border-radius:12px;padding:8px 12px;font-weight:800;font-size:14px;cursor:pointer}
.wahl button.an{border-color:var(--gras);background:var(--gras-l)}
.ekarte details{border-top:1px solid var(--linie);padding:8px 0}
.ekarte summary{font-weight:800;cursor:pointer;font-size:14.5px}

/* ---------- Durchsage & Pause ---------- */
.durchsage{position:absolute;left:10px;right:10px;bottom:36px;background:#1b2a1f;color:#ffe066;border-radius:16px;padding:10px;display:flex;gap:10px;align-items:center;font-weight:800;font-size:15px;transform:translateY(160%);transition:transform .35s;z-index:30;pointer-events:none}
.durchsage.zeigen{transform:none}
.durchsage img{width:46px;height:46px;border-radius:50%;object-fit:cover;object-position:center 20%;flex:0 0 46px;border:2px solid #ffe066}
.pause{position:absolute;inset:0;background:rgba(0,0,0,.55);display:none;align-items:center;justify-content:center;z-index:40;padding:20px}
.pause.zeigen{display:flex}
.pause-in{background:#fff;border-radius:22px;padding:20px;text-align:center;display:flex;flex-direction:column;align-items:center;gap:10px}
.pause-in img{width:110px;height:110px;border-radius:50%;object-fit:cover;object-position:center 20%}

@media print{
  body,html{background:#fff;height:auto}
  .kopf,.fuss,.nodruck,.durchsage,.pause{display:none!important}
  .app{height:auto;max-width:none}
  .buehne{overflow:visible}
  .screen{position:static}
  .screen:not(#s-urkunde){display:none!important}
  .urkunde{margin:0;min-height:95vh;justify-content:center}
}
