/* Lichtgarten — warm, rund, groß, für kleine Finger gemacht */
@font-face { font-family: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-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: 'Baloo 2'; font-style: normal; font-weight: 400 800; font-display: swap; src: url(../fonts/baloo2-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Amiri'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fonts/amiri-arabic.woff2) format('woff2');
  unicode-range: U+0600-06FF, U+0750-077F, U+0870-088E, U+0890-0891, U+0897-08E1, U+08E3-08FF, U+200C-200E, U+2010-2011, U+204F, U+2E41, U+FB50-FDFF, U+FE70-FE74, U+FE76-FEFC; }

:root {
  --cream: #FFF8EC; --cream2: #F7EBD3; --ink: #3B2F2F; --ink2: #6B5B53;
  --green: #3FA66A; --green-d: #2C8051; --sun: #FFC93C; --sun-d: #DDA21C;
  --sky: #7EC8E3; --coral: #FF7B6B; --purple: #8A6FD1; --gold: #E8B730;
  --card: #FFFFFF; --line: #EADFC9; --shadow: rgba(59, 47, 47, .14);
  --bar: 60px; --caph: 112px;
  --ar: 4 / 3;
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; touch-action: pan-x pan-y; overscroll-behavior: none; }   /* v58: kein Zwei-Finger-Zoom, kein Doppeltipp-Zoom, kein „Zurück“-Wischen über den Rand */
body {
  background: var(--cream);
  background-image: radial-gradient(circle at 12% 8%, #FFEFC9 0, transparent 38%), radial-gradient(circle at 92% 96%, #E4F4E7 0, transparent 40%);
  background-attachment: fixed;
  color: var(--ink);
  font-family: 'Baloo 2', 'Amiri', ui-rounded, 'SF Pro Rounded', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-weight: 600; line-height: 1.3;
  -webkit-tap-highlight-color: transparent; -webkit-user-select: none; user-select: none;
  touch-action: pan-x pan-y; overscroll-behavior: none; -webkit-text-size-adjust: 100%; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:focus-visible { outline: 4px solid var(--sky); outline-offset: 3px; }
svg.art { display: block; width: 100%; height: auto; overflow: visible; }
:not(html)[lang="ar"], .ar { font-family: 'Amiri', 'Noto Naskh Arabic', 'Geeza Pro', serif; font-weight: 700; }
/* Arabische Oberfläche (seit 29.10.): klare Systemschrift statt Kalligrafie, etwas mehr Zeilenhöhe für Vokalzeichen.
   Amiri bleibt für Quran, Buchstaben und Silben (lang="ar" an einzelnen Elementen). */
html[lang="ar"] body { font-family: 'Baloo 2', 'Segoe UI', 'Noto Sans Arabic', 'Noto Naskh Arabic', 'Geeza Pro', Tahoma, sans-serif; line-height: 1.55; }
[dir="rtl"] .art-ui_next, [dir="rtl"] .art-ui_back { transform: scaleX(-1); }   /* Pfeile zeigen in Leserichtung */
.lang-ar { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: #2E7D4F; color: #fff; font-family: 'Amiri', serif; font-weight: 700; font-size: 26px; line-height: 1; padding-bottom: 6px; box-sizing: border-box; }
[hidden] { display: none !important; }

#app { min-height: 100dvh; display: flex; flex-direction: column; }
#view { flex: 1; width: 100%; max-width: 1000px; margin: 0 auto; padding: 8px 14px calc(var(--caph) + 18px); }
body[data-screen="start"] #view, body[data-screen="parents"] #view { padding-bottom: 28px; }

/* ---------------------------------------------------------------- Kopfleiste */
#bar {
  position: sticky; top: 0; z-index: 20; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px;
  min-height: var(--bar); padding: max(6px, env(safe-area-inset-top)) 12px 6px;
  background: rgba(255, 248, 236, .9); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.bar-l { display: flex; justify-content: flex-start; } .bar-r { display: flex; justify-content: flex-end; gap: 8px; }
.bar-title { margin: 0; font-size: 1.2rem; font-weight: 800; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 58vw; }
.bar-btn { position: relative; width: 50px; height: 50px; border: 0; border-radius: 17px; background: #fff; box-shadow: 0 4px 0 var(--line); display: grid; place-items: center; padding: 9px; transition: transform .1s; }
.bar-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--line); }
.bar-btn.av { padding: 2px; border-radius: 50%; }
.bar-btn.gbtn { width: auto; padding: 6px 12px 6px 8px; display: flex; gap: 4px; }
.bar-btn.gbtn svg { width: 34px; } .bar-btn.gbtn b { font-size: 1.15rem; color: var(--green-d); }
.bar-btn.lock { width: 40px; height: 40px; padding: 9px; opacity: .55; box-shadow: none; background: transparent; }

/* ---------------------------------------------------------------- Pamuk-Untertitel */
#caption {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: flex-end; justify-content: center; gap: 8px;
  padding: 8px 10px max(10px, env(safe-area-inset-bottom)); pointer-events: none;
  background: linear-gradient(to top, rgba(255, 248, 236, .96) 55%, rgba(255, 248, 236, 0));
}
#caption > * { pointer-events: auto; }
.cap-cat { position: relative; flex: 0 0 auto; width: 78px; height: 78px; border: 0; background: none; padding: 0; }
.cap-cat .art { animation: catBob 3s ease-in-out infinite; transform-origin: 50% 100%; }
.cap-ear { position: absolute; right: -2px; top: 0; width: 26px; height: 26px; border-radius: 50%; background: #fff; box-shadow: 0 2px 0 var(--line); padding: 4px; }
.cap-bubble { position: relative; flex: 1 1 auto; max-width: 820px; background: #fff; border-radius: 22px; padding: 10px 16px; margin-bottom: 10px; box-shadow: 0 5px 0 var(--line), 0 10px 26px var(--shadow); height: 7.9em; max-height: 7.9em; overflow: auto; }   /* feste Höhe → Layout kann den Platz sicher einplanen */
.cap-bubble::before { content: ''; position: absolute; left: -9px; bottom: 16px; border: 10px solid transparent; border-right-color: #fff; border-left: 0; }
.cap-text { margin: 0; font-size: 1.04rem; font-weight: 600; }
#caption.bump .cap-cat .art { animation: catTalk .5s ease, catBob 3s 0.5s ease-in-out infinite; }
#caption.nocap .cap-bubble { display: none; }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 10px 20px;
  border: 0; border-radius: 20px; font-weight: 800; font-size: 1.08rem; color: #fff; background: var(--green);
  box-shadow: 0 5px 0 var(--green-d); transition: transform .1s, box-shadow .1s; position: relative;
}
.btn svg { width: 30px; height: 30px; flex: 0 0 auto; }
.btn:not(.sun):not(.ghost):not(.gold) svg { filter: brightness(0) invert(1); }
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--green-d); }
.btn.sun { background: var(--sun); color: var(--ink); box-shadow: 0 5px 0 var(--sun-d); }
.btn.sun:active { box-shadow: 0 1px 0 var(--sun-d); }
.btn.ghost { background: #fff; color: var(--ink); box-shadow: 0 5px 0 var(--line); }
.btn.gold { background: linear-gradient(#FFD45E, #F2B92B); color: var(--ink); box-shadow: 0 5px 0 #C9951A; }
.btn.big { min-height: 66px; font-size: 1.3rem; padding: 12px 30px; border-radius: 24px; }
.btn.big svg { width: 38px; height: 38px; }
.btn.sm { min-height: 44px; font-size: .95rem; padding: 6px 12px; border-radius: 15px; }
.btn.sm svg { width: 22px; height: 22px; }
.btn:disabled { opacity: .6; }
.hint { animation: hintPulse 1.15s ease-in-out infinite; }
.hold { position: relative; overflow: hidden; }
.hold::after { content: ''; position: absolute; left: 0; bottom: 0; height: 5px; width: calc(var(--p, 0) * 100%); background: var(--green); border-radius: 5px; }
.nudge { animation: wig .45s; }
.row-center { display: flex; justify-content: center; gap: 12px; margin-top: 14px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Start */
.start { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; padding-top: max(10px, env(safe-area-inset-top)); }
.logo { margin-top: 6px; }
.logo-art { position: relative; width: 150px; height: 112px; margin: 0 auto; }
.logo-art .l1 { position: absolute; width: 84px; left: 6px; top: 4px; animation: spin 40s linear infinite; }
.logo-art .l2 { position: absolute; width: 60px; right: 6px; top: 0; animation: float 4s ease-in-out infinite; }
.logo-art .l3 { position: absolute; width: 70px; left: 40px; bottom: -8px; animation: sway 3s ease-in-out infinite; transform-origin: 50% 100%; }
.logo h1 { margin: 6px 0 0; font-size: clamp(2.2rem, 9vw, 3.2rem); font-weight: 800; color: var(--green-d); letter-spacing: .5px; line-height: 1; }
.logo p { margin: 4px 0 0; color: var(--ink2); font-size: 1.02rem; }
.langs { display: flex; gap: 10px; margin: 8px 0 2px; }
.lang { display: flex; align-items: center; gap: 8px; border: 3px solid transparent; background: #fff; border-radius: 18px; padding: 8px 16px 8px 10px; box-shadow: 0 4px 0 var(--line); font-weight: 800; font-size: 1.05rem; }
.lang svg { width: 40px; }
.lang.on { border-color: var(--green); background: #EFFAF2; }
@media (max-width: 440px) {   /* drei Sprachen nebeneinander auf schmalen Handys: Flagge über dem Namen */
  .langs { flex-wrap: wrap; justify-content: center; gap: 8px; }
  .lang { flex-direction: column; gap: 2px; padding: 6px 12px; font-size: .95rem; }
}
.who { margin: 12px 0 2px; font-size: 1.45rem; font-weight: 800; }
.profiles { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; }
.prof { width: min(42vw, 190px); border: 0; background: #fff; border-radius: 28px; padding: 14px 10px 12px; box-shadow: 0 6px 0 var(--line), 0 12px 30px var(--shadow); display: flex; flex-direction: column; align-items: center; gap: 2px; animation: popIn .5s backwards; transition: transform .12s; }
.prof:nth-child(2) { animation-delay: .1s; } .prof:nth-child(3) { animation-delay: .2s; }
.prof:active { transform: scale(.96); }
.prof-av { width: 100%; max-width: 130px; }
.prof-n { font-size: 1.15rem; font-weight: 800; margin-top: 6px; }
.prof-a { color: var(--ink2); font-size: .95rem; }
.parents-gate { margin-top: 18px; display: inline-flex; align-items: center; gap: 8px; border: 0; background: transparent; color: var(--ink2); font-size: .9rem; padding: 10px 14px; border-radius: 14px; }
.parents-gate svg { width: 22px; }

/* ---------------------------------------------------------------- Home */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(150px, 44vw), 1fr)); gap: 14px; padding-top: 6px; }
.tile { position: relative; border: 0; border-radius: 28px; background: var(--c); padding: 12px 10px 12px; display: flex; flex-direction: column; align-items: center; justify-content: space-between; gap: 6px; aspect-ratio: 1 / 1.02; box-shadow: 0 6px 0 rgba(0, 0, 0, .09), 0 10px 22px var(--shadow); animation: popIn .5s backwards; animation-delay: calc(var(--i) * 55ms); transition: transform .12s; overflow: hidden; }
.tile::before { content: ''; position: absolute; width: 80%; aspect-ratio: 1; border-radius: 50%; background: rgba(255, 255, 255, .45); top: 4%; left: 10%; }
.tile:active { transform: scale(.95); }
.tile-art { position: relative; width: 68%; flex: 1; display: grid; place-items: center; }
.tile-art .art { filter: drop-shadow(0 4px 0 rgba(0, 0, 0, .08)); }
.tile:hover .tile-art .art { animation: wig .6s; }
.tile-n { position: relative; font-size: 1.08rem; font-weight: 800; line-height: 1.1; text-align: center; min-height: 2.2em; display: grid; place-items: center; }

/* ---------------------------------------------------------------- Allgemein im Spiel */
.game { display: flex; flex-direction: column; align-items: center; }
.top-row { display: flex; align-items: center; justify-content: center; gap: 10px; min-height: 26px; margin: 2px 0 10px; width: 100%; }
.dots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.dots i { width: 13px; height: 13px; border-radius: 50%; background: #EADCC2; transition: background .3s, transform .3s; }
.dots i.on { background: var(--green); transform: scale(1.1); }
.story-t { font-weight: 800; font-size: 1rem; color: var(--ink2); }
.pop-in { animation: popIn .5s backwards; }
.fade-out { animation: fadeOut .4s forwards; }

/* ---------------------------------------------------------------- Szene */
.scene {
  position: relative; overflow: hidden; border-radius: 26px; aspect-ratio: var(--ar);
  width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 96px) * 4 / 3));
  box-shadow: 0 6px 0 rgba(0, 0, 0, .08), 0 14px 30px var(--shadow); isolation: isolate;
  background: linear-gradient(#8ED1F2, #CFEFFF 62%, #EAF8FF);
}
.scene .bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; }
.sc-layer, .sc-fx { position: absolute; inset: 0; }
.sc-layer { z-index: 1; } .sc-fx { z-index: 2; pointer-events: none; }
.bg-land, .bg-garden, .bg-sky, .bg-sea { background: linear-gradient(#8ED1F2, #CFEFFF 62%, #EAF8FF); }
.bg-storm { background: linear-gradient(#55657E, #8A98AE); }
.bg-night { background: linear-gradient(#141C40, #2B3A67 70%, #3D4C82); }
.bg-dark { background: radial-gradient(circle at 50% 45%, #22305A 0%, #0B1022 72%); }
.bg-desert { background: linear-gradient(#FFD49A, #FFF0D2); }
.scene.to-night { animation: dusk 1.4s ease; }
.scene.flash { animation: flash 1.2s ease; }
.scene.lit::after { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; background: radial-gradient(circle at 50% 50%, rgba(255, 236, 160, .95) 0%, rgba(255, 220, 120, .45) 35%, rgba(255, 220, 120, 0) 70%); animation: lightUp 1.6s ease forwards; }
.sc-el { position: absolute; transform: translate(-50%, -50%); transition: left .8s cubic-bezier(.45, 0, .25, 1), top .8s cubic-bezier(.45, 0, .25, 1), opacity .6s, transform .6s, filter .8s; }
.sc-el.tap { cursor: pointer; }
.sc-el.tap::before { content: ''; position: absolute; inset: -35%; border-radius: 50%; }   /* große Tippfläche, auch für kleine Ziele */
/* Hinweis-Puls MIT Zentrierung (das allgemeine .hint überschrieb translate(-50%,-50%) → Ziele sprangen eine halbe Größe weg) */
.sc-el.hint { animation: hintPulseC 1.15s ease-in-out infinite; }
.sc-el.hint::before { border: 4px dashed rgba(255, 255, 255, .95); box-shadow: 0 0 18px rgba(255, 255, 255, .8); animation: spin 6s linear infinite, hintFade 1.2s ease-in-out infinite; }
.world .sc-el.done::after { content: '✓'; position: absolute; right: -4%; top: -6%; width: 30%; max-width: 30px; min-width: 18px; aspect-ratio: 1; border-radius: 50%; background: var(--gold); color: #fff; font-size: .8rem; font-weight: 800; display: grid; place-items: center; box-shadow: 0 2px 0 #B98A10; animation: popIn .4s; }
.sc-el.hidden { opacity: 0 !important; pointer-events: none; }
.sc-el.dim { filter: brightness(.5) saturate(.6); }
.sc-el.moving { z-index: 3; }
.sc-el.moving.into { opacity: 0 !important; transform: translate(-50%, -50%) scale(.3); transition: left .8s cubic-bezier(.45, 0, .25, 1), top .8s cubic-bezier(.45, 0, .25, 1), opacity .4s .6s, transform .5s .5s; }
.sc-el.hopping .sc-in { animation: hop .5s 3; }
.sc-el.grow-in .sc-in { animation: growIn 1.4s cubic-bezier(.2, 1.4, .4, 1) backwards; transform-origin: 50% 100%; }
.sc-in { transform-origin: 50% 60%; }
.sc-in.wig { animation: wig .5s !important; }

/* Bewegungen */
.spin-slow { animation: spin 40s linear infinite; }
.drift { animation: drift 7s ease-in-out infinite; }
.fly { animation: fly 3.4s ease-in-out infinite; }
.sway { animation: sway 3.2s ease-in-out infinite; transform-origin: 50% 100% !important; }
.buzz { animation: buzz 1.6s ease-in-out infinite; }
.bob { animation: bob 2.4s ease-in-out infinite; }
.swim { animation: swim 4s ease-in-out infinite; }
.glow { animation: glow 2.6s ease-in-out infinite; }
.twinkle { animation: twinkle 2.2s ease-in-out infinite; }
.beat { animation: beat 1.3s ease-in-out infinite; }
.rock { animation: rock 2.6s ease-in-out infinite; }
.hop { animation: hop 1s ease-in-out infinite; }
.march { animation: march 3s ease-in-out infinite; }
.pulse { animation: pulse 1.4s ease-in-out infinite; }
.fall { animation: fall 1.6s ease-in infinite; }
.wiggle { animation: wig 1.6s ease-in-out infinite; }
.d1 { animation-delay: .2s !important; } .d2 { animation-delay: .45s !important; } .d3 { animation-delay: .7s !important; }

.rain { position: absolute; inset: 0; }
.rain i { position: absolute; top: -12%; width: 3px; height: 10%; border-radius: 3px; background: linear-gradient(rgba(255, 255, 255, 0), rgba(220, 240, 255, .95)); animation: rainfall .9s linear infinite; }

/* ---------------------------------------------------------------- Wimmelbild-Welt */
.world { cursor: default; }

/* ---------------------------------------------------------------- Quiz-Karten */
.quiz { width: 100%; max-width: 640px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.q-title { margin: 6px 0 0; font-size: 1.4rem; font-weight: 800; color: var(--green-d); }
.choices { width: 100%; display: grid; gap: 14px; margin-top: 8px; }
.choices.n2 { grid-template-columns: 1fr 1fr; }
.choices.n3 { grid-template-columns: repeat(3, 1fr); }
.card-opt { border: 0; background: #fff; border-radius: 24px; padding: 14px; aspect-ratio: 1; box-shadow: 0 6px 0 var(--line), 0 10px 24px var(--shadow); animation: popIn .45s backwards; transition: transform .12s, opacity .3s; }
.card-opt:nth-child(2) { animation-delay: .08s; } .card-opt:nth-child(3) { animation-delay: .16s; }
.card-opt:active { transform: scale(.95); }
.card-opt.right { background: #E9F8EE; box-shadow: 0 6px 0 var(--green), 0 0 0 4px var(--green); transform: scale(1.05); }
.card-opt.nope { opacity: .5; }
.card-opt.pose { background: #FFF4E2; }
.card-opt.face { max-width: 180px; justify-self: center; width: 100%; }

/* ---------------------------------------------------------------- Was sagen wir? */
.sagen { width: 100%; max-width: 560px; display: flex; flex-direction: column; align-items: center; }
.situation { width: min(52vw, 230px, calc((100dvh - var(--bar) - var(--caph) - 330px))); min-width: 120px; aspect-ratio: 1; border-radius: 50%; background: #fff; padding: 22px; box-shadow: 0 6px 0 var(--line), 0 14px 30px var(--shadow); }
.sagen .choices { grid-template-columns: 1fr; gap: 12px; margin-top: 16px; }
.phrase { border: 0; border-radius: 22px; background: var(--c); color: #fff; padding: 8px 16px 10px; min-height: 76px; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: 0 6px 0 rgba(0, 0, 0, .18); animation: popIn .45s backwards; transition: transform .12s, opacity .3s; }
.phrase:nth-child(2) { animation-delay: .07s; } .phrase:nth-child(3) { animation-delay: .14s; }
.phrase:active { transform: translateY(3px); }
.ph-ar { font-size: 1.55rem; line-height: 1.5; }
.ph-t { font-size: 1.25rem; font-weight: 800; line-height: 1.1; }
.phrase.right { transform: scale(1.04); box-shadow: 0 0 0 5px #fff, 0 0 0 9px var(--c), 0 10px 26px var(--shadow); }
.phrase.fade { opacity: .25; }

/* ---------------------------------------------------------------- Memory */
/* Spalten und Kartenbreite rechnet das Spiel passend zum Bildschirm aus (--cols, --cw) */
.memory { --cols: 3; --cw: 100px; display: grid; grid-template-columns: repeat(var(--cols), var(--cw)); justify-content: center; gap: 12px; width: 100%; }
.mem-levels { display: flex; gap: 8px; justify-content: center; margin: 2px 0 10px; }
.mem-lv { width: 40px; height: 40px; border-radius: 50%; border: 0; background: #fff; color: var(--ink2); font-weight: 800; font-size: 1.1rem; display: grid; place-items: center; box-shadow: 0 3px 0 var(--line); padding: 0; }
.mem-lv.done { background: #FFE38A; color: #8A6410; box-shadow: 0 3px 0 #E8B730; }
.mem-lv.cur { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-d), 0 0 0 3px #fff, 0 0 0 6px var(--green); }
.mem-lv.locked { background: #F1ECE2; box-shadow: none; }
.mem-lv.locked .art { width: 20px; height: 20px; opacity: .55; }
.mcard { border: 0; padding: 0; background: none; aspect-ratio: 3 / 4; perspective: 900px; animation: popIn .45s backwards; }
.m-in { position: relative; display: block; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .45s cubic-bezier(.3, 1.3, .5, 1); }
.mcard.open .m-in, .mcard.match .m-in { transform: rotateY(180deg); }
.m-back, .m-front { position: absolute; inset: 0; border-radius: 18px; -webkit-backface-visibility: hidden; backface-visibility: hidden; display: grid; place-items: center; }
.m-back { background: var(--green); background-image: radial-gradient(circle at 50% 50%, rgba(255, 255, 255, .25) 0 18%, transparent 19%), repeating-linear-gradient(45deg, rgba(255, 255, 255, .08) 0 8px, transparent 8px 16px); box-shadow: 0 5px 0 var(--green-d); }
.m-back .art { width: 42%; opacity: .95; }
.m-front { background: #fff; transform: rotateY(180deg); box-shadow: 0 5px 0 var(--line); padding: 10%; }
.mcard.match .m-front { background: #EFFAF2; box-shadow: 0 5px 0 var(--green), 0 0 0 3px var(--green); }

/* ---------------------------------------------------------------- Wudu */
.wudu-sc { --ar: 1 / 1; width: min(100%, 460px, calc(100dvh - var(--bar) - var(--caph) - 150px)); background: linear-gradient(#E3F4FB, #CFEAF6); }
.tiles-bg { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .55) 2px, transparent 2px), linear-gradient(90deg, rgba(255, 255, 255, .55) 2px, transparent 2px); background-size: 12.5% 12.5%; }
.wudu-child { position: absolute; inset: 0; transition: filter .6s; }
.wudu-child.wig { animation: wig .4s; }
.wudu-child.shine { filter: drop-shadow(0 0 14px rgba(255, 230, 120, .95)); }
.spots { position: absolute; inset: 0; z-index: 2; }
.spot { position: absolute; width: 14%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 0; background: transparent; padding: 0; pointer-events: none; }
.wudu-sc { cursor: pointer; }
.spot[data-part="mouth"], .spot[data-part="nose"] { width: 9%; z-index: 3; }
.spot[data-part="face"] { width: 20%; } .spot[data-part="head"] { width: 17%; } .spot[data-part="ears"] { width: 9%; z-index: 3; }
.spot[data-part="heart"] { width: 15%; }
.spot.glow { background: radial-gradient(rgba(255, 255, 255, .6), rgba(126, 200, 227, .35) 60%, rgba(126, 200, 227, 0) 72%); box-shadow: 0 0 0 4px rgba(255, 255, 255, .95), 0 0 22px 6px rgba(58, 154, 217, .75); animation: glowPulse 1.1s ease-in-out infinite; }
.spot.wig { animation: wigC .4s; }
.water { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.water i { position: absolute; width: 7%; transform: translate(-50%, -50%); animation: splashDrop .85s ease-out forwards; animation-delay: var(--d); opacity: 0; }
.drops { display: flex; gap: 10px; justify-content: center; margin-top: 12px; min-height: 40px; }
.drops span { width: 34px; filter: grayscale(1) opacity(.35); transition: filter .3s, transform .3s; }
.drops span.on { filter: none; transform: scale(1.18); }

/* ---------------------------------------------------------------- Gebet */
.pose-card { width: min(100%, 380px, calc(100dvh - var(--bar) - var(--caph) - 190px)); aspect-ratio: 1; background: #fff; border-radius: 30px; box-shadow: 0 6px 0 var(--line), 0 14px 30px var(--shadow); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 6% 8% 4%; background-image: radial-gradient(circle at 50% 40%, #FFF3D9 0, #fff 62%); }
.pose-art { width: 84%; }
.pose-name { font-size: 1.4rem; font-weight: 800; color: var(--green-d); }

/* ---------------------------------------------------------------- Gutes tun */
.gutes { width: 100%; max-width: 600px; display: flex; flex-direction: column; align-items: center; }
.g-scene-card { width: min(100%, 440px); min-height: 150px; background: #fff; border-radius: 28px; padding: 14px; display: flex; justify-content: center; align-items: flex-end; gap: 6px; box-shadow: 0 6px 0 var(--line), 0 14px 30px var(--shadow); background-image: linear-gradient(transparent 70%, #E9F6E3 70%); }
.g-scene-card span { width: 42%; max-width: 170px; }
.g-scene-card span:only-child { width: 56%; max-width: 210px; }
.deed { border: 0; background: #fff; border-radius: 24px; padding: 12px 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: 0 6px 0 var(--line), 0 10px 24px var(--shadow); animation: popIn .45s backwards; transition: transform .12s; }
.deed:nth-child(2) { animation-delay: .08s; }
.deed:active { transform: scale(.96); }
.d-art { width: 62%; max-width: 120px; }
.d-t { font-size: 1.05rem; font-weight: 800; line-height: 1.15; text-align: center; }
.deed.right { background: #E9F8EE; box-shadow: 0 6px 0 var(--green), 0 0 0 4px var(--green); }

/* ---------------------------------------------------------------- Haus des Islam */
/* Haus ist ca. 1,18 × so hoch wie breit (hohes Dach); darunter die Säulen-Leiste (Höhe ≈ min(29vw, 145px)) – alles über der Sprechblase */
.house { width: min(100%, 440px, calc((100dvh - var(--bar) - var(--caph) - 60px - min(29vw, 145px)) / 1.18)); margin-top: 2px; display: flex; flex-direction: column; align-items: center; }
.h-roof { width: 100%; position: relative; z-index: 2; aspect-ratio: 100 / 46; overflow: visible; transform: translateY(-10px); animation: float 3s ease-in-out infinite; transition: transform .8s cubic-bezier(.3, 1.6, .5, 1); }
.h-roof .art { margin-top: -16%; }
.house.done .h-roof { animation: none; transform: translateY(0); filter: drop-shadow(0 0 16px rgba(255, 215, 90, .9)); }
.h-cols { width: 86%; display: grid; grid-template-columns: repeat(5, 1fr); gap: 4%; margin-top: -2%; }
.h-slot { position: relative; aspect-ratio: 1 / 2.3; border: 3px dashed #D8C8A8; border-radius: 12px; background: rgba(255, 255, 255, .5); }
.h-col { position: absolute; inset: 0; display: flex; flex-direction: column; opacity: 0; transform: translateY(-40%); transition: opacity .3s, transform .6s cubic-bezier(.3, 1.5, .5, 1); }
.h-col .cap, .h-col .foot { display: block; height: 10%; border-radius: 5px; background: var(--gold); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.h-col .shaft { display: block; flex: 1; margin: 0 14%; background: repeating-linear-gradient(90deg, #FFF8E8 0 18%, #F1E0BA 18% 24%); box-shadow: inset -5px 0 0 rgba(0, 0, 0, .06); }
.h-slot.filled { border-color: transparent; background: transparent; }
.h-slot.filled .h-col { opacity: 1; transform: none; }
.h-badge { position: absolute; left: 50%; top: 50%; width: 96%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; background: var(--c); padding: 13%; box-shadow: 0 3px 0 rgba(0, 0, 0, .15), 0 0 0 3px #fff; z-index: 1; }
.h-base { width: 100%; height: 20px; border-radius: 12px; background: #E9CF9A; box-shadow: 0 5px 0 #CDAE70; }
.tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 18px; width: 100%; max-width: 520px; }
.token { position: relative; width: 17%; min-width: 56px; max-width: 84px; aspect-ratio: 1 / 1.7; border: 0; background: #fff; border-radius: 18px; box-shadow: 0 5px 0 var(--line), 0 10px 22px var(--shadow); padding: 0; animation: popIn .45s backwards; transition: opacity .4s, transform .4s; }
.token .h-col { opacity: .45; transform: none; inset: 10% 16%; }
.token .h-badge { width: 76%; }
.token.used { opacity: 0; transform: scale(.6) translateY(-40px); pointer-events: none; }

/* ---------------------------------------------------------------- Geschichten */
.shelf { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(160px, 44vw), 1fr)); gap: 16px; width: 100%; }
.book { position: relative; border: 0; border-radius: 10px 26px 26px 10px; background: var(--c); padding: 16px 12px 14px 22px; display: flex; flex-direction: column; align-items: center; gap: 6px; box-shadow: inset 10px 0 0 rgba(0, 0, 0, .08), 0 6px 0 rgba(0, 0, 0, .1), 0 12px 26px var(--shadow); aspect-ratio: 3 / 3.6; animation: popIn .45s backwards; transition: transform .12s; }
.book:nth-child(2) { animation-delay: .07s; } .book:nth-child(3) { animation-delay: .14s; } .book:nth-child(4) { animation-delay: .21s; }
.book:active { transform: scale(.96) rotate(-1deg); }
.b-art { width: 80%; flex: 1; display: grid; place-items: center; }
.b-t { font-size: 1.08rem; font-weight: 800; line-height: 1.12; text-align: center; min-height: 2.3em; }
.story-holder { width: 100%; display: flex; flex-direction: column; align-items: center; }
.page-in { animation: pageIn .55s ease backwards; }
.ar-line { margin-top: 10px; font-size: clamp(1.3rem, 5vw, 1.9rem); line-height: 1.7; text-align: center; color: var(--green-d); background: #fff; border-radius: 18px; padding: 4px 16px; box-shadow: 0 4px 0 var(--line); }
.next-btn { min-width: 170px; }
.lesson { width: min(100%, 520px); background: #fff; border-radius: 30px; padding: 22px 22px 18px; text-align: center; box-shadow: 0 6px 0 var(--line), 0 14px 30px var(--shadow); }
.l-art { width: 110px; margin: 0 auto; animation: glow 2.6s ease-in-out infinite; }
.lesson h2 { margin: 6px 0 4px; color: var(--green-d); font-size: 1.5rem; }
.lesson p { margin: 0; font-size: 1.12rem; }

/* ---------------------------------------------------------------- Feier / Belohnung */
#overlay { position: fixed; inset: 0; z-index: 40; background: rgba(59, 47, 47, .38); display: grid; place-items: center; padding: 14px; padding-bottom: calc(var(--caph) + 8px); overflow: auto; animation: fadeIn .3s; }
.cele { width: min(100%, 480px); background: #fff; border-radius: 30px; padding: 16px 18px 18px; text-align: center; box-shadow: 0 8px 0 var(--line), 0 20px 50px rgba(0, 0, 0, .25); animation: popIn .5s; }
.cele-top { display: flex; justify-content: center; align-items: flex-end; gap: 6px; }
.cele-cat { width: 110px; } .cele-plant { width: 92px; animation: growIn 1.2s .2s cubic-bezier(.2, 1.4, .4, 1) backwards; transform-origin: 50% 100%; }
.cele-praise { margin: 6px 0 0; font-size: 1.6rem; color: var(--green-d); font-weight: 800; }
.cele-reward { margin: 2px 0 10px; color: var(--ink2); }
.mission { background: #FFF6E2; border: 3px dashed #EBCB85; border-radius: 22px; padding: 10px 14px 12px; text-align: left; }
.mission-h { display: flex; align-items: center; gap: 8px; font-weight: 800; color: #A06A00; }
.mission-h svg { width: 28px; }
.mission p { margin: 4px 0 0; font-size: 1.05rem; }
.mission .talk { margin-top: 8px; font-size: .92rem; color: var(--ink2); font-weight: 600; }
.cele-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 14px; }
.cele-btns .btn { flex: 1 1 120px; padding: 8px 12px; }

/* ---------------------------------------------------------------- Effekte */
#fx { position: fixed; inset: 0; pointer-events: none; z-index: 60; overflow: hidden; }
.spark { position: fixed; width: 28px; height: 28px; margin: -14px 0 0 -14px; animation: spark 1s cubic-bezier(.2, .7, .4, 1) forwards; }
.spark.heart { width: 24px; height: 24px; }
.wig { animation: wig .5s; }

/* ---------------------------------------------------------------- Garten */
.garden { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.g-scene { position: relative; width: 100%; max-width: 760px; aspect-ratio: 4 / 3; border-radius: 28px; overflow: hidden; background: linear-gradient(#8ED1F2, #D6F1FF 55%); box-shadow: 0 6px 0 rgba(0, 0, 0, .08), 0 14px 30px var(--shadow); }
.g-scene .bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.g-sun { position: absolute; width: 16%; right: 5%; top: 5%; animation: spin 50s linear infinite; }
.g-plant { position: absolute; width: calc(10.5% * var(--s)); border: 0; background: none; padding: 0; transform: translate(-50%, -100%); transform-origin: 50% 100%; animation: growInP .9s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.g-plant .art { transform-origin: 50% 100%; animation: sway 4s ease-in-out infinite; }
.g-plant:nth-child(3n) .art { animation-delay: -1.3s; } .g-plant:nth-child(3n+1) .art { animation-delay: -2.4s; }
.g-plant.wig { animation: wigP .5s; }
.g-empty { position: absolute; left: 50%; top: 72%; width: 12%; transform: translate(-50%, -50%); animation: pulseC 1.6s ease-in-out infinite; }
.g-count { position: absolute; left: 3%; top: 4%; display: flex; align-items: center; gap: 4px; background: rgba(255, 255, 255, .9); border-radius: 16px; padding: 4px 12px 4px 6px; font-size: 1.3rem; font-weight: 800; color: var(--green-d); }
.g-count svg { width: 30px; }
.g-life { position: absolute; width: 7%; z-index: 120; pointer-events: none; }
.g-life.butterfly { left: 20%; top: 30%; animation: flutter 9s ease-in-out infinite; }
.g-life.bird { left: 60%; top: 14%; width: 8%; animation: fly 4s ease-in-out infinite; }
.g-life.bee { left: 40%; top: 46%; width: 5%; animation: flutter 7s ease-in-out infinite reverse; }
.g-panel { width: 100%; max-width: 760px; }
.g-panel h2 { margin: 6px 0 8px; font-size: 1.3rem; font-weight: 800; }
.g-panel .hint { animation: none; color: var(--ink2); font-size: .95rem; margin: -4px 0 8px; font-weight: 600; }
.dhikr { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dh { border: 0; border-radius: 22px; background: #fff; padding: 8px 10px 10px; box-shadow: 0 5px 0 var(--line), 0 8px 20px var(--shadow); display: flex; flex-direction: column; align-items: center; transition: transform .12s; }
.dh:active { transform: scale(.96); }
.dh .ar { font-size: 1.65rem; line-height: 1.6; color: var(--green-d); }
.dh .tl { font-weight: 800; font-size: 1.02rem; }
.missions { display: flex; flex-direction: column; gap: 10px; }
.mrow { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 20px; padding: 8px 10px; box-shadow: 0 4px 0 var(--line); }
.mrow p { flex: 1; margin: 0; font-size: .98rem; }
.m-ic { width: 40px; flex: 0 0 auto; }

/* ---------------------------------------------------------------- Pause */
.pause { display: flex; flex-direction: column; align-items: center; text-align: center; max-width: 560px; margin: 0 auto; }
.pause-art { position: relative; width: 220px; }
.pause-art .ns { width: 100%; border-radius: 26px; }
.pause-art .pc { position: absolute; width: 46%; left: 27%; bottom: -8%; }
.zzz { position: absolute; right: 12%; top: 10%; font-size: 1.6rem; color: #fff; font-weight: 800; }
.zzz i, .zzz b { font-style: normal; display: inline-block; animation: float 2s ease-in-out infinite; }
.zzz i { font-size: 1.2em; animation-delay: .3s; } .zzz b { font-size: 1.4em; animation-delay: .6s; }
.pause h2 { margin: 18px 0 4px; font-size: 1.6rem; color: var(--green-d); }
.pause p { margin: 0 0 12px; font-size: 1.08rem; }
.learned { background: #fff; border-radius: 20px; padding: 10px 14px; box-shadow: 0 4px 0 var(--line); margin-bottom: 16px; }
.learned > div { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 6px; }
.lchip { display: inline-flex; align-items: center; gap: 6px; background: var(--c); border-radius: 14px; padding: 4px 10px 4px 6px; font-size: .92rem; }
.lchip svg { width: 26px; }

/* ---------------------------------------------------------------- Toast */
.toast { position: fixed; left: 50%; top: calc(var(--bar) + 12px); transform: translateX(-50%); z-index: 70; background: var(--ink); color: #fff; padding: 8px 16px; border-radius: 14px; font-size: .95rem; animation: toast 2.2s forwards; pointer-events: none; }

/* ---------------------------------------------------------------- Kleine & quer gehaltene Handys */
/* Quran-Wörter (Zuordnen): unter der Szene steht nichts → mehr Höhe nutzen, größere Ziele für Kinderfinger */
@media (max-aspect-ratio: 4/5) and (max-height: 720px) { .qw-stage .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 70px) * 3 / 4)); } }
@media (max-aspect-ratio: 4/5) { .scene { --ar: 3 / 4; --k: 1.22; width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 120px) * 3 / 4)); } .wudu-sc { --ar: 1 / 1; --k: 1; width: min(100%, 460px, calc(100dvh - var(--bar) - var(--caph) - 150px)); } }
@media (max-height: 520px) and (orientation: landscape) {
  :root { --bar: 50px; --caph: 74px; }
  .bar-btn { width: 42px; height: 42px; border-radius: 14px; padding: 7px; }
  .cap-cat { width: 54px; height: 54px; } .cap-bubble { height: 3.6em; max-height: 3.6em; padding: 6px 12px; margin-bottom: 4px; } .cap-text { font-size: .94rem; }
  .tiles { grid-template-columns: repeat(4, 1fr); } .tile { aspect-ratio: 1.25 / 1; } .tile-n { font-size: .95rem; min-height: 0; }
  .situation { width: 120px; padding: 14px; } .sagen { flex-direction: row; gap: 16px; max-width: 900px; align-items: center; } .sagen .choices { margin-top: 0; }
  .phrase { min-height: 60px; } .ph-ar { font-size: 1.2rem; }
  .pose-card { width: min(60vh, 300px); }
}
@media (max-width: 360px) { .phrase { min-height: 66px; } .ph-t { font-size: 1.1rem; } .tile-n { font-size: .98rem; } .cap-cat { width: 64px; height: 64px; } }
@media (min-width: 900px) { :root { --caph: 120px; } .cap-text { font-size: 1.15rem; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------------------------------------------------------------- Keyframes */
@keyframes popIn { 0% { opacity: 0; transform: scale(.6); } 70% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeOut { to { opacity: 0; transform: scale(.96); } }
@keyframes pageIn { from { opacity: 0; transform: translateX(30px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes drift { 0%, 100% { transform: translateX(-6%); } 50% { transform: translateX(6%); } }
@keyframes fly { 0%, 100% { transform: translate(0, 0) rotate(-3deg); } 25% { transform: translate(6%, -10%) rotate(3deg); } 50% { transform: translate(12%, 0) rotate(-2deg); } 75% { transform: translate(5%, 8%) rotate(2deg); } }
@keyframes sway { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes buzz { 0%, 100% { transform: translate(0, 0); } 25% { transform: translate(8%, -10%); } 50% { transform: translate(-6%, -4%); } 75% { transform: translate(4%, 8%); } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5%); } }
@keyframes swim { 0%, 100% { transform: translateX(-5%) rotate(-2deg); } 50% { transform: translateX(5%) rotate(2deg); } }
@keyframes glow { 0%, 100% { filter: drop-shadow(0 0 4px rgba(255, 220, 110, .5)); } 50% { filter: drop-shadow(0 0 16px rgba(255, 220, 110, .95)); } }
@keyframes twinkle { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .65; transform: scale(.93); } }
@keyframes beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.12); } 30% { transform: scale(1); } 45% { transform: scale(1.08); } }
@keyframes rock { 0%, 100% { transform: rotate(-4deg) translateY(0); } 50% { transform: rotate(4deg) translateY(-3%); } }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-22%); } 60% { transform: translateY(-18%); } }
@keyframes march { 0%, 100% { transform: translateX(-4%); } 50% { transform: translateX(4%); } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
@keyframes fall { 0% { transform: translateY(-20%); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(160%); opacity: 0; } }
@keyframes wig { 0%, 100% { transform: rotate(0); } 20% { transform: rotate(-9deg) scale(1.05); } 45% { transform: rotate(8deg) scale(1.05); } 70% { transform: rotate(-4deg); } }
@keyframes hintPulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
/* dieselben Animationen für zentrierte Elemente (translate muss in jedem Schritt mit, sonst springen sie) */
@keyframes hintPulseC { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.07); } }
@keyframes pulseC { 0%, 100% { transform: translate(-50%, -50%) scale(1); } 50% { transform: translate(-50%, -50%) scale(1.1); } }
@keyframes wigC { 0%, 100% { transform: translate(-50%, -50%) rotate(0); } 20% { transform: translate(-50%, -50%) rotate(-9deg) scale(1.05); } 45% { transform: translate(-50%, -50%) rotate(8deg) scale(1.05); } 70% { transform: translate(-50%, -50%) rotate(-4deg); } }
@keyframes growInP { 0% { transform: translate(-50%, -100%) scale(0); opacity: 0; } 100% { transform: translate(-50%, -100%) scale(1); opacity: 1; } }
@keyframes wigP { 0%, 100% { transform: translate(-50%, -100%) rotate(0); } 20% { transform: translate(-50%, -100%) rotate(-9deg) scale(1.05); } 45% { transform: translate(-50%, -100%) rotate(8deg) scale(1.05); } 70% { transform: translate(-50%, -100%) rotate(-4deg); } }
@keyframes hintFade { 0%, 100% { opacity: .5; } 50% { opacity: 1; } }
@keyframes glowPulse { 0%, 100% { transform: translate(-50%, -50%) scale(.92); } 50% { transform: translate(-50%, -50%) scale(1.1); } }
@keyframes growIn { 0% { transform: scale(0); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes spark { 0% { transform: translate(0, 0) scale(.3) rotate(0); opacity: 1; } 100% { transform: translate(var(--dx), var(--dy)) scale(1) rotate(var(--r)); opacity: 0; } }
@keyframes rainfall { from { top: -12%; } to { top: 108%; } }
@keyframes splashDrop { 0% { opacity: 1; transform: translate(-50%, -80%) scale(.6); } 100% { opacity: 0; transform: translate(calc(-50% + var(--dx)), 60%) scale(1); } }
@keyframes dusk { 0% { filter: brightness(1.4) saturate(1.2); } 100% { filter: none; } }
@keyframes flash { 0% { filter: brightness(1.8); } 100% { filter: none; } }
@keyframes lightUp { from { opacity: 0; } to { opacity: 1; } }
@keyframes catBob { 0%, 100% { transform: translateY(0) rotate(0); } 50% { transform: translateY(-3px) rotate(-1.5deg); } }
@keyframes catTalk { 0% { transform: scale(1); } 40% { transform: scale(1.1) rotate(-4deg); } 100% { transform: scale(1); } }
@keyframes flutter { 0% { transform: translate(0, 0); } 25% { transform: translate(180%, -60%); } 50% { transform: translate(380%, 20%); } 75% { transform: translate(160%, 80%); } 100% { transform: translate(0, 0); } }
@keyframes toast { 0% { opacity: 0; transform: translate(-50%, -8px); } 12%, 80% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; } }

/* ---------------------------------------------------------------- Eltern-Bereich */
.parents { max-width: 760px; margin: 0 auto; }
.p-tabs { display: flex; gap: 6px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.p-tab { flex: 0 0 auto; border: 0; background: #fff; border-radius: 14px; padding: 8px 14px; font-weight: 800; box-shadow: 0 3px 0 var(--line); }
.p-tab.on { background: var(--green); color: #fff; box-shadow: 0 3px 0 var(--green-d); }
.p-card { background: #fff; border-radius: 22px; padding: 16px 18px; margin-bottom: 14px; box-shadow: 0 4px 0 var(--line); -webkit-user-select: text; user-select: text; }
.p-card h2 { margin: 0 0 8px; font-size: 1.25rem; color: var(--green-d); }
.p-card h3 { margin: 14px 0 4px; font-size: 1.05rem; }
.p-card p, .p-card li { font-weight: 500; font-size: 1rem; line-height: 1.5; }
.p-card ul, .p-card ol { padding-left: 1.2em; margin: 6px 0; }
.p-card .src { font-size: .85rem; color: var(--ink2); }
.p-card .quote { border-left: 4px solid var(--gold); padding: 4px 12px; margin: 10px 0; background: #FFF8E6; border-radius: 0 12px 12px 0; }
.p-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 10px 0; }
.p-row label { font-weight: 800; min-width: 130px; }
.p-row input[type="text"], .p-row select { font: inherit; font-weight: 600; padding: 9px 12px; border-radius: 12px; border: 2px solid var(--line); background: #FFFCF6; min-width: 0; flex: 1 1 160px; color: var(--ink); }
.p-kid { border: 2px solid var(--line); border-radius: 18px; padding: 10px 12px; margin: 10px 0; }
.p-avs { display: flex; gap: 6px; flex-wrap: wrap; }
.p-av { width: 52px; height: 52px; border-radius: 50%; border: 3px solid transparent; background: none; padding: 0; }
.p-av.on { border-color: var(--green); }
.seg { display: inline-flex; background: var(--cream2); border-radius: 14px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; border-radius: 11px; padding: 7px 12px; font-weight: 800; }
.seg button.on { background: #fff; box-shadow: 0 2px 0 var(--line); color: var(--green-d); }
.p-note { background: #EEF7FF; border-radius: 14px; padding: 10px 12px; font-size: .95rem; font-weight: 500; }
.p-warn { background: #FFF1EC; border-radius: 14px; padding: 10px 12px; font-size: .95rem; font-weight: 500; }
.p-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }
.pill { display: inline-block; background: var(--cream2); border-radius: 10px; padding: 1px 8px; font-size: .85rem; margin: 2px 2px; }

/* ---------------------------------------------------------------- Vorlesen der Antworten: gerade gelesene Möglichkeit */
.choices > *, .shelf > * { position: relative; }
.reading { transform: scale(1.08) !important; background: #FFF4CC !important; box-shadow: 0 0 0 6px var(--sun), 0 0 30px 10px rgba(255, 201, 60, .75) !important; z-index: 3; transition: transform .2s, box-shadow .2s, background .2s; }
.phrase.reading { background: var(--c) !important; box-shadow: 0 0 0 5px #fff, 0 0 0 11px var(--sun), 0 0 34px 12px rgba(255, 201, 60, .8) !important; }
.pointer { position: absolute; right: -12px; bottom: -18px; width: 60px; height: 60px; pointer-events: none; z-index: 4; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .25)); animation: tapHint .9s ease-in-out infinite; }
@keyframes tapHint { 0%, 100% { transform: translate(0, 0) rotate(-12deg); } 50% { transform: translate(-6px, -8px) rotate(-12deg) scale(.92); } }

/* ---------------------------------------------------------------- Foto als Profilbild */
.ph-av { display: block; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 4px solid #fff; box-shadow: 0 0 0 3px var(--green); background: #fff; }
.bar-btn.av .ph-av { border-width: 2px; box-shadow: none; }
.p-av .ph-av { border-width: 2px; box-shadow: none; }
.p-photo-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.p-photo-row input[type=file] { display: none; }

/* ---------------------------------------------------------------- Eltern: Altersstufen-Tabelle */
.ages-box { margin-top: 12px; background: #FFF8E6; border-radius: 14px; padding: 8px 12px; }
.ages-box summary { font-weight: 800; cursor: pointer; color: var(--green-d); }
.ages { width: 100%; border-collapse: collapse; margin-top: 8px; font-size: .86rem; font-weight: 500; }
.ages th, .ages td { border-bottom: 1px solid var(--line); padding: 6px 4px; text-align: left; vertical-align: top; }
.ages th { font-weight: 800; color: var(--green-d); }
.ages td:first-child { font-weight: 700; width: 26%; }

/* ---------------------------------------------------------------- Sabil-Kids-Logo (Startseite, Eltern-Bereich) */
.sabil { width: min(78vw, 330px); margin: 4px auto 2px; background: #fff; border-radius: 26px; padding: 8px 10px 4px; box-shadow: 0 6px 0 var(--line), 0 12px 28px var(--shadow); animation: popIn .5s backwards; }
.sabil img { display: block; width: 100%; height: auto; border-radius: 18px; }
.logo h1 { font-size: clamp(1.9rem, 8vw, 2.6rem); margin-top: 10px; }
.p-sabil { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.p-sabil img { width: 180px; height: auto; border-radius: 14px; border: 1px solid var(--line); }
@media (max-height: 700px) { .sabil { width: min(60vw, 240px); } }

/* ---------------------------------------------------------------- NEU-Markierung auf Spielkarten */
.new-badge { position: absolute; top: 10px; right: 10px; z-index: 2; background: var(--coral); color: #fff; font-weight: 800; font-size: .82rem; letter-spacing: 1px; border-radius: 999px; padding: 3px 10px 1px; box-shadow: 0 3px 0 #D9584A; animation: badgePop 1.6s ease-in-out infinite; }
@keyframes badgePop { 0%, 100% { transform: scale(1) rotate(6deg); } 50% { transform: scale(1.12) rotate(6deg); } }

/* ---------------------------------------------------------------- Alif-Ba-Dinos */
.alif-top { justify-content: space-between; }
.alif-top .dots { flex: 1; }
.valley-btn { min-height: 44px; }
.valley-btn svg { width: 30px !important; height: 30px !important; filter: none !important; }
.alif-stage { width: 100%; max-width: 620px; display: flex; flex-direction: column; align-items: center; }
.dino { position: relative; display: block; container-type: inline-size; }
.dino .ltr { position: absolute; left: 52%; top: 70%; transform: translate(calc(-50% + var(--dx, 0em)), calc(-50% + var(--dy, 0em))) scale(var(--s, 1)); font-family: 'Amiri', serif; font-weight: 700; font-size: 25cqw; line-height: 1; color: #3B2F2F; pointer-events: none; }
.nest-scene { position: relative; width: min(100%, 520px); aspect-ratio: 5 / 4; border-radius: 28px; overflow: hidden; background: linear-gradient(#BFE8FB, #E8F7FF 55%); box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 14px 30px var(--shadow); }
.nest-scene .bg-svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.nest-scene .nest { position: absolute; left: -4%; right: -4%; bottom: -2%; }
.nest-scene .ns-sun { position: absolute; width: 17%; right: 6%; top: 6%; animation: spin 40s linear infinite; }
.eggs { position: absolute; left: 3%; right: 3%; bottom: 17%; display: flex; justify-content: center; align-items: flex-end; gap: 1%; }
.egg { position: relative; width: 33%; max-width: 46%; flex: 0 1 auto; border: 0; background: none; padding: 0; animation: eggWobble 2.4s ease-in-out infinite; transform-origin: 50% 90%; }
.egg:nth-child(2) { animation-delay: -.8s; } .egg:nth-child(3) { animation-delay: -1.6s; }
.egg .crack { position: absolute; inset: 0; opacity: 0; }
.egg.c1 .crack.k1, .egg.c2 .crack.k2 { opacity: 1; }
.egg.c1, .egg.c2 { animation: eggShake .35s ease-in-out; }
.egg.hint { animation: eggWobble .9s ease-in-out infinite, glowEgg 1.2s ease-in-out infinite; }
.egg.hatched { animation: none; cursor: default; }
.egg.hatched .shell { position: absolute; left: 0; right: 0; bottom: 0; z-index: 2; }
.egg.hatched .dino { width: 100%; animation: growIn .7s cubic-bezier(.2, 1.4, .4, 1) backwards; }
@keyframes eggWobble { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(3deg); } }
@keyframes eggShake { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-10deg); } 75% { transform: rotate(10deg); } }
@keyframes glowEgg { 0%, 100% { filter: drop-shadow(0 0 0 rgba(255, 201, 60, 0)); } 50% { filter: drop-shadow(0 0 14px rgba(255, 201, 60, .95)); } }
.reveal { display: flex; align-items: center; justify-content: center; gap: 14px; width: 100%; flex-wrap: wrap; }
.big-dino { width: min(62vw, 300px); }
.big-dino .dino { animation: dinoHop 1.4s ease-in-out infinite; }
@keyframes dinoHop { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6%); } }
.word-card { background: #fff; border-radius: 26px; padding: 12px 16px 10px; box-shadow: 0 6px 0 var(--line), 0 12px 26px var(--shadow); display: flex; flex-direction: column; align-items: center; min-width: 150px; }
.word-card .w-art { width: 96px; }
.word-card .w-ar { font-family: 'Amiri', serif; font-weight: 700; font-size: 2.6rem; line-height: 1.4; color: var(--green-d); }
.word-card .w-tl { font-weight: 800; font-size: 1.02rem; text-align: center; max-width: 220px; }
.trace-wrap { display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.trace-head { display: flex; align-items: center; gap: 10px; }
.trace-head .dino { width: 92px; }
.trace-box { position: relative; width: min(86vw, 330px, calc(100dvh - var(--bar) - var(--caph) - 230px)); aspect-ratio: 1; border-radius: 28px; background: #FFF3DC; box-shadow: inset 0 0 0 4px #F0DDBA, 0 6px 0 var(--line); overflow: hidden; touch-action: none; }
.trace-box canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.t-dot { position: absolute; width: 22%; aspect-ratio: 1; transform: translate(-50%, -50%); border-radius: 50%; border: 4px dashed var(--sun-d); animation: pulseC 1s ease-in-out infinite; pointer-events: none; }
.trace-box.done { box-shadow: inset 0 0 0 4px var(--green), 0 0 26px 6px rgba(63, 166, 106, .45); }
.dino-opt { padding: 8px; }
.dino-opt .dino { width: 100%; }
.word-q { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 24px; padding: 10px 16px; box-shadow: 0 5px 0 var(--line); }
.word-q .w-art { width: 90px; }
.word-q .w-ar { font-family: 'Amiri', serif; font-weight: 700; font-size: 2.3rem; color: var(--green-d); }
.valley { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; width: 100%; background: linear-gradient(#E3F6D8, #CDEDBE); border-radius: 26px; padding: 12px 10px; box-shadow: 0 6px 0 rgba(0,0,0,.06); }
.v-dino { border: 0; background: rgba(255,255,255,.55); border-radius: 16px; padding: 3px; }
.v-dino.new { background: #FFF4CC; box-shadow: 0 0 0 3px var(--sun); animation: pulse 1.4s ease-in-out infinite; scroll-margin: calc(var(--bar) + 12px) 0 calc(var(--caph) + 14px); }
.v-egg { opacity: .5; padding: 6px; }
.valley-head { display: flex; align-items: center; justify-content: space-between; width: 100%; margin-bottom: 8px; gap: 8px; }
.valley-head b { font-size: 1.15rem; }
@media (max-width: 560px) { .valley { grid-template-columns: repeat(4, 1fr); gap: 8px; } .v-egg { padding: 14px; } }
.valley-head .btn { white-space: nowrap; }
.valley-head b { font-size: 1.05rem; line-height: 1.2; }

.t-dots { position: absolute; inset: 0; pointer-events: none; }
.dino.hopping { animation: hop .5s ease-in-out 3; }
.t-skip { margin-top: -4px; }
.t-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.t-row .t-skip { margin-top: 0; }
.eggs.n2 .egg { width: 40%; }
.eggs.n1 .egg { width: 46%; }
.egg svg.art { transform: scale(1.3); transform-origin: 50% 92%; }
.egg.hatched svg.art { transform: scale(1.15); }
.alif-stage .choices { grid-template-columns: 1fr 1fr; gap: 14px; max-width: 440px; margin-top: 14px; }
.alif-stage .choices.n3 > :last-child { grid-column: 1 / -1; justify-self: center; width: calc(50% - 7px); }
.alif-stage .dino-opt { padding: 4px 8px 0; aspect-ratio: auto; }
.listen-card { display: flex; align-items: center; gap: 12px; border: 0; background: #fff; border-radius: 24px; padding: 10px 22px 10px 14px; box-shadow: 0 5px 0 var(--line), 0 10px 22px var(--shadow); font-weight: 800; font-size: 1.15rem; }
.listen-card svg { width: 46px; height: 46px; }
.word-q { border: 0; position: relative; }
.word-q .w-spk { width: 36px; }

/* NEU-Schild am Geschichtenbuch */
.book .new-badge { top: -8px; right: -6px; font-size: .72rem; padding: 3px 9px 1px; }

/* Buchstaben verbinden (Alif-Ba Stufe 2) */
.vb-stage { padding: 4px 2px 8px; }
/* Kartenhöhe passt sich der Bildschirmhöhe an: 4 Reihen müssen über die Sprechblase passen (kleine Handys) */
.vb-pairs { --vbh: clamp(64px, calc((100dvh - var(--bar) - var(--caph) - 92px) / 4), 104px); position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 0 56px; max-width: 440px; margin: 0 auto; }
.vb-lines { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: visible; z-index: 1; }
.vb-lines line { stroke-width: 8; stroke-linecap: round; opacity: .85; }
.vb-col { display: flex; flex-direction: column; gap: 12px; }
.vb-dino, .vb-form, .vb-tile { border: 0; border-radius: 22px; background: #fff; box-shadow: 0 5px 0 rgba(0,0,0,.08), 0 10px 22px var(--shadow); transition: transform .12s; color: #3B2F2F; }
.vb-dino { height: var(--vbh, 104px); display: grid; place-items: center; padding: 4px; }
.vb-dino .dino { width: calc(var(--vbh, 104px) - 8px); height: calc(var(--vbh, 104px) - 8px); }
.vb-form { height: var(--vbh, 104px); font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: calc(var(--vbh, 104px) * .63); line-height: 1; padding-bottom: calc(var(--vbh, 104px) * .15); }
.vb-dino.sel, .vb-form.sel { outline: 5px solid #FFC94A; transform: scale(1.04); }
.vb-dino.done, .vb-form.done { background: #E6F5DC; }
.vb-word { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.vb-pic { width: 128px; height: 128px; }
.vb-tiles { display: flex; gap: 12px; transition: gap .4s, opacity .4s; }
.vb-tile { width: 82px; height: 96px; font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 56px; padding-bottom: 12px; }
.vb-tile.on { background: #E6F5DC; }
.vb-tile.glow { outline: 5px solid #FFC94A; animation: badgePop 1.4s ease-in-out infinite; }
.vb-tiles.joined { gap: 3px; opacity: .45; }
.vb-joined { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 92px; line-height: 1.35; color: #2E7D4F; min-height: 1.3em; }
/* niedrige Bildschirme: Bild + Buchstaben + fertiges Wort + Weiter passen sonst nicht über die Sprechblase */
@media (max-height: 720px) {
  .game-verbinden .vb-word { gap: 10px; }
  .game-verbinden .vb-pic { width: 84px; height: 84px; }
  .game-verbinden .vb-tile { width: 70px; height: 80px; font-size: 48px; padding-bottom: 10px; }
  .game-verbinden .vb-joined { font-size: 72px; line-height: 1.2; }
}

/* Puzzle */
.pz-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 96px; }
.pz-board { position: relative; border-radius: 18px; background: #fff; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 12px 26px var(--shadow); overflow: hidden; }
.pz-ghost { position: absolute; inset: 0; pointer-events: none; }
.pz-slot { position: absolute; box-sizing: border-box; border: 2px dashed rgba(90, 70, 50, .22); }
.pz-slot.hint { background: rgba(255, 201, 74, .45); border-color: #FFC94A; }
.pz-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: space-evenly; }
.pz-pic { width: 56%; height: 56%; }
.pz-ltr { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; line-height: 1.15; color: #3B2F2F; background: rgba(255,255,255,.8); border-radius: 999px; padding: 0 .4em .12em; }
.pz-tray { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 60px; }
.pz-piece { position: relative; overflow: hidden; border-radius: 8px; box-shadow: 0 3px 0 rgba(0,0,0,.12), 0 6px 14px var(--shadow); touch-action: none; cursor: grab; background: #fff; }
.pz-in { position: absolute; left: 0; top: 0; transform-origin: 0 0; pointer-events: none; }
.pz-piece.placed { position: absolute; border-radius: 0; box-shadow: inset 0 0 0 1px rgba(255,255,255,.6); }
.pz-board.done .pz-piece.placed { box-shadow: none; }
.pz-float { position: fixed; inset: 0; pointer-events: none; z-index: 60; }
.pz-float .pz-piece { position: absolute; box-shadow: 0 10px 24px rgba(0,0,0,.25); transform: scale(1.04); }

/* Allahs schöne Namen */
.nm-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 4px 0 96px; }
.nm-card { display: flex; flex-direction: column; align-items: center; gap: 0; }
.nm-card svg { width: 58px; height: 58px; }
.nm-card b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: 30px; line-height: 1.6; color: #2E6B4F; margin-bottom: 3px; }
.nm-card span { font-weight: 800; color: #5A4632; font-size: .9rem; line-height: 1.1; }
.nm-big { border: 0; border-radius: 28px; background: linear-gradient(#FFF8DC, #FFE6A0); padding: 22px 36px 18px; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 14px 30px var(--shadow); margin-top: 8px; }
.nm-big .nm-card svg { width: 128px; height: 128px; }
.nm-big .nm-card b { font-size: 60px; }
.nm-big .nm-card span { font-size: 1.2rem; }
.nm-scene { display: flex; justify-content: center; align-items: flex-end; gap: 4px; background: #fff; border-radius: 24px; padding: 14px 12px; width: min(340px, 94%); box-shadow: 0 6px 0 rgba(0,0,0,.06), 0 12px 26px var(--shadow); }
.nm-scene span svg { width: 96px; height: 96px; }
.nm-opt { border: 0; border-radius: 22px; background: #fff; padding: 10px 4px 8px; box-shadow: 0 5px 0 rgba(0,0,0,.08), 0 10px 22px var(--shadow); position: relative; }
.nm-opt.ok { background: #E6F5DC; }
.nm-opt.nope { opacity: .4; }
.nm-album { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; width: min(370px, 98%); }
.nm-slot { border: 0; border-radius: 18px; background: #fff; padding: 8px 2px 6px; min-height: 108px; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0,0,0,.07), 0 8px 18px var(--shadow); }
.nm-slot .nm-card svg { width: 40px; height: 40px; }
.nm-slot .nm-card b { font-size: 21px; }
.nm-slot .nm-card span { font-size: .6rem; }
.nm-slot.locked { background: #F1EBDD; }
.nm-slot.locked svg { width: 36px; height: 36px; filter: grayscale(1); opacity: .45; }
.nm-slot.fresh { outline: 4px solid #FFC94A; }

/* Ba Bi Bu (Harakat) */
.hk-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 16px; padding: 6px 0 96px; }
.hk-card { display: flex; flex-direction: column; align-items: center; }
.hk-card b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 72px; line-height: 1.75; color: #3B2F2F; }
.hk-card span { font-weight: 800; color: #8A6CD1; font-size: 1rem; margin-top: 4px; }
.hk-one { border: 0; border-radius: 30px; background: #fff; padding: 0 46px 14px; margin-top: 10px; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 14px 30px var(--shadow); }
.hk-one .hk-card b { font-size: 150px; line-height: 1.55; }
.hk-one .hk-card span { font-size: 1.3rem; }
.hk-row { display: flex; gap: 10px; justify-content: center; }
.hk-btn { border: 0; border-radius: 22px; background: #fff; padding: 0 12px 10px; min-width: 96px; position: relative; box-shadow: 0 5px 0 rgba(0,0,0,.08), 0 10px 22px var(--shadow); }
.hk-btn.ok { background: #E6F5DC; }
.hk-btn.nope { opacity: .4; }
.vb-tile.hk-tile { width: 88px; font-size: 54px; line-height: 1.5; padding-bottom: 6px; }
/* Lange Laute (Med): kurz und lang nebeneinander, die lange Karte mit „Rutsche“ unter der Silbe */
.md-pair { gap: 18px; }
.md-pair .hk-btn { min-width: 120px; }
.hk-card.long span { color: #E08A2E; display: flex; flex-direction: column; align-items: center; }
.hk-card.long span::before { content: ''; width: 64px; height: 7px; border-radius: 4px; margin-bottom: 4px; background: linear-gradient(270deg, #FFC94A, #FF9F43); }   /* unter der Silbe, nicht im Esre-Bereich */
.md-spell { margin-top: 2px; }

/* Zähler bei „N-mal tippen“ */
.tap-count { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); display: flex; gap: 6px; padding: 6px 10px; border-radius: 999px; background: rgba(255,255,255,.85); z-index: 4; pointer-events: none; }
.tap-count i { width: 14px; height: 14px; border-radius: 50%; background: #E3D6BF; transition: background .2s, transform .2s; }
.tap-count i.on { background: #4E9E45; transform: scale(1.15); }

/* Geschichten: Bild so groß, dass Titel, Bild und Weiter-Taste über die Sprechblase passen */
.story-holder .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 150px) * 4 / 3)); }
@media (max-aspect-ratio: 4/5) { .story-holder .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 170px) * 3 / 4)); } }
.next-btn { scroll-margin-bottom: calc(var(--caph) + 12px); }
.sc-el.tap.big::before { inset: -6%; }   /* große Ziele: keine Vergrößerung, sonst überdecken sie Nachbarn */
.sc-el.tap.many::before { inset: -8%; }   /* viele Ziele nebeneinander: Tippflächen nicht überlappen lassen */

/* Selbst lesen (Eltern-Hörmodus) in Ba Bi Bu */
.rd-ask { display: flex; flex-direction: column; align-items: center; gap: 14px; margin-top: 8px; }
.rd-art { width: 150px; height: 150px; } .rd-art svg { width: 100%; height: 100%; }
.rd-btns { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.rd-one { display: flex; flex-direction: column; align-items: center; gap: 14px; width: 100%; }
.rd-tile { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 130px; line-height: 1.6; padding: 0 40px 10px; background: #fff; border-radius: 30px; color: #3B2F2F; box-shadow: 0 6px 0 rgba(0,0,0,.08), 0 14px 30px var(--shadow); }
.rd-tile.w { font-size: 84px; padding: 0 24px 8px; }
/* kleine Handys: Silbe so groß, dass Eltern-Tasten über der Sprechblase bleiben */
.rd-tile { font-size: clamp(60px, calc((100dvh - var(--bar) - var(--caph) - 250px) / 1.6), 130px); }
.rd-tile.w { font-size: clamp(44px, calc((100dvh - var(--bar) - var(--caph) - 250px) / 2.4), 84px); }
.rd-parent { scroll-margin-bottom: calc(var(--caph) + 12px); }
.rd-parent { width: 100%; max-width: 440px; background: #FFF8E6; border: 2px dashed #E9D6A8; border-radius: 20px; padding: 10px 12px 12px; text-align: center; }
.rd-parent p { margin: 0 0 8px; font-size: .9rem; font-weight: 600; color: var(--ink2); line-height: 1.4; }
.rd-ctl { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.rd-model { margin-top: 8px; border: 0; background: none; color: var(--ink2); font-weight: 700; font-size: .9rem; display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; }
.rd-model svg { width: 22px; height: 22px; }

/* Eltern-Bereich: Lernstand */
.lv-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; } .lv-head h2 { margin: 0; }
.lv-av { width: 44px; height: 44px; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #FFF6E0; flex: 0 0 auto; }
.lv-av svg, .lv-av img { width: 100%; height: 100%; object-fit: cover; }
.lv-stage { margin: 10px 0; }
.lv-st-h { display: flex; justify-content: space-between; gap: 8px; font-size: .95rem; }
.lv-st-h span { color: var(--ink2); font-weight: 600; white-space: nowrap; }
.lv-bar { position: relative; height: 12px; border-radius: 99px; background: #EFE6D6; margin-top: 4px; }
.lv-bar i { position: absolute; left: 0; top: 0; bottom: 0; border-radius: 99px; background: var(--green); }
.lv-bar em { position: absolute; left: 85%; top: -3px; bottom: -3px; width: 2px; background: var(--ink2); opacity: .45; }
.lv-grid { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; direction: rtl; }
.lv-c { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 24px; line-height: 1.9; min-width: 42px; text-align: center; border-radius: 10px; padding: 0 6px; background: #F1ECE4; color: #9A8A7A; }
.lv-c.ueben { background: #FDE3C8; color: #8A4B12; }
.lv-c.fast { background: #E3F2D5; color: #3B6B2A; }
.lv-c.sicher { background: var(--green); color: #fff; }
.lv-c.hoca { outline: 3px solid var(--gold); outline-offset: -3px; }
.lv-legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.lv-legend .lv-c { font-family: inherit; font-size: .85rem; line-height: 1.8; padding: 0 10px; }
.lv-conf { direction: rtl; font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: 22px; }
.lv-conf small { font-family: system-ui, sans-serif; font-size: .8rem; color: var(--ink2); direction: ltr; unicode-bidi: isolate; }

/* Geschichten: Mitmach-Arten außer Antippen (ziehen, schütteln, wischen, Weg, halten, suchen, nachfahren, Frage) */
.sc-el.drag { touch-action: none; cursor: grab; }
.sc-el.drag.held { transition: opacity .3s; z-index: 6; cursor: grabbing; }
.sc-el.drag.held .sc-in { transform: scale(1.12); filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .28)); }
.sc-el.near::after { content: ''; position: absolute; inset: -16%; border-radius: 50%; border: 4px dashed #fff; box-shadow: 0 0 20px rgba(255, 255, 255, .9); pointer-events: none; }
.sc-el.drop-zone { aspect-ratio: 1; }
.sc-el.drop-zone .sc-in { width: 100%; height: 100%; border-radius: 50%; border: 4px dashed rgba(255, 255, 255, .95); background: rgba(255, 255, 255, .18); animation: zonePulse 1.4s ease-in-out infinite; }
@keyframes zonePulse { 0%, 100% { transform: scale(.92); } 50% { transform: scale(1.06); } }
.sc-el.shaking .sc-in { animation: shakeX .35s ease; transform-origin: 50% 100%; }
@keyframes shakeX { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-6deg); } 75% { transform: rotate(6deg); } }
.sc-el.fall .sc-in { animation: fallIn .85s cubic-bezier(.3, 1.45, .5, 1) backwards; }
@keyframes fallIn { from { transform: translateY(-240%) rotate(-30deg); opacity: 0; } 25% { opacity: 1; } to { transform: none; } }
.sc-el.peek .sc-in { animation: peekUp .6s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes peekUp { from { transform: translateY(45%) scale(.35); } to { transform: none; } }
.wipe-cv { position: absolute; z-index: 3; touch-action: none; transition: opacity .8s; border-radius: inherit; }
.wipe-cv.gone { opacity: 0; pointer-events: none; }
.path-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; }
.path-guide { fill: none; stroke: #fff; stroke-width: 6px; stroke-dasharray: 2 14; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .95; }
.path-trail { fill: none; stroke-width: 14px; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; opacity: .9; }
.hold-ring { position: absolute; inset: -14%; width: 128%; height: 128%; pointer-events: none; transform: rotate(-90deg); }
.hold-ring circle { fill: none; stroke: rgba(255, 255, 255, .5); stroke-width: 6; }
.hold-ring .hr-p { stroke: #FFC93C; stroke-linecap: round; }
.sc-el.holding .sc-in { transform: scale(1.07); transition: transform .2s; }
.hold-count { position: absolute; left: 50%; top: 6%; transform: translateX(-50%); z-index: 4; background: rgba(255, 255, 255, .92); border-radius: 16px; padding: 4px 16px; font-weight: 800; font-size: clamp(1.1rem, 5vw, 1.9rem); color: var(--ink); box-shadow: 0 3px 0 var(--line); white-space: nowrap; pointer-events: none; }
.night-veil { position: absolute; inset: 0; z-index: 1; background: #0B1022; opacity: 0; pointer-events: none; transition: opacity .15s; }
.st-trace { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; background: rgba(255, 248, 236, .78); transition: opacity .6s; }
.st-trace.fade { opacity: 0; pointer-events: none; }
.st-trace .trace-box { width: min(62%, 300px); }
.st-trace .t-skip { position: absolute; bottom: 4%; }
.choices.st-pick { position: absolute; left: 4%; right: 4%; bottom: 4%; width: auto; margin: 0; z-index: 5; gap: 8px; grid-template-columns: 1fr 1fr; }
.st-opt { border: 0; border-radius: 16px; background: #fff; color: var(--ink); font-weight: 800; font-size: clamp(.95rem, 3.4vw, 1.2rem); line-height: 1.2; padding: 10px 8px; box-shadow: 0 4px 0 var(--line); }
.st-opt.ok { background: #E6F5DC; box-shadow: 0 0 0 4px var(--green); }
.st-opt.nope { opacity: .45; }
.g-hint { position: absolute; z-index: 6; width: 13%; max-width: 64px; pointer-events: none; transform: translate(-25%, -10%); transition: left .55s ease-in-out, top .55s ease-in-out; filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3)); }
.g-hint svg { width: 100%; height: auto; display: block; }
.g-hint.press { transform: translate(-25%, -10%) scale(.82); }
/* Geschichten: nur Mitmach-Dinge nehmen den Finger an – Deko (Wellen, Berge …) darf Ziele nicht verdecken */
.story-holder .sc-el { pointer-events: none; }
.story-holder .sc-el.tap, .story-holder .sc-el.drag { pointer-events: auto; }
.story-holder .sc-el.drag { z-index: 2; }

/* Ersteinrichtung (Anzahl Kinder, Name, Alter, Bild) */
.setup { max-width: 520px; margin: 0 auto; display: flex; flex-direction: column; align-items: stretch; gap: 14px; padding: max(10px, env(safe-area-inset-top)) 2px 24px; text-align: center; }
.setup .logo { margin: 0 auto; } .setup .langs { justify-content: center; }
.setup h2 { font-size: clamp(1.3rem, 5.5vw, 1.7rem); margin: 4px 0 0; color: var(--green-d); line-height: 1.25; }
.setup p { margin: 0; color: var(--ink2); font-weight: 600; line-height: 1.45; }
.su-dots { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; }
.su-dots i { width: 9px; height: 9px; border-radius: 50%; background: #E3D6BF; }
.su-dots i.on { background: var(--green); }
.su-big { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.su-big.n3 { grid-template-columns: repeat(3, 1fr); }
.su-big button { border: 0; border-radius: 22px; background: #fff; color: var(--ink); font-weight: 800; font-size: 2.1rem; padding: 16px 0 14px; box-shadow: 0 5px 0 var(--line); }
.su-big button small { display: block; font-size: .8rem; color: var(--ink2); font-weight: 700; margin-top: 2px; }
.su-big button.on { background: #E6F5DC; box-shadow: 0 0 0 4px var(--green); }
/* Namensfeld der Ersteinrichtung – auf .setup begrenzt: die Suren-Karten nutzen dieselbe Klasse für den Surennamen und
   bekamen sonst Rahmen und Polster des Eingabefelds (Karten 160 px hoch, dritte Reihe unter der Sprechblase) */
.setup .su-name { font: inherit; font-size: 1.35rem; font-weight: 700; text-align: center; border: 3px solid var(--line); border-radius: 18px; padding: 14px; width: 100%; background: #fff; color: var(--ink); }
.setup .su-name:focus { outline: none; border-color: var(--green); }
.su-avs { display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr)); gap: 12px; }
.su-avs button { border: 0; background: #fff; border-radius: 50%; aspect-ratio: 1; padding: 6px; box-shadow: 0 4px 0 var(--line); overflow: hidden; }
.su-avs button.on { box-shadow: 0 0 0 5px var(--green); }
.su-avs svg, .su-avs img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.su-photo { align-self: center; position: relative; overflow: hidden; }
.su-photo input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.su-nav { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 4px; }
.su-kids { display: grid; gap: 10px; }
.su-kid { display: flex; align-items: center; gap: 12px; background: #fff; border-radius: 18px; padding: 10px 14px; box-shadow: 0 3px 0 var(--line); text-align: left; }
.su-kid b { flex: 1; font-size: 1.15rem; }
.su-kid span:last-child { color: var(--ink2); font-weight: 700; }
.su-av { width: 52px; height: 52px; flex: 0 0 auto; border-radius: 50%; overflow: hidden; display: grid; place-items: center; background: #FFF6E0; }
.su-av svg, .su-av img { width: 100%; height: 100%; object-fit: cover; }

/* Tageszeiten (Die 5 Gebete) */
.bg-dawn { background: linear-gradient(#2B3A67, #8E7CC3 45%, #F7B6A3 78%, #FFE3B8); }
.bg-noon { background: linear-gradient(#5EB8EC, #BDE6FA 62%, #EAF8FF); }
.bg-afternoon { background: linear-gradient(#8CC7E8, #F6E0B0 72%, #FFE9C4); }
.bg-sunset { background: linear-gradient(#5A3E8C, #E2725B 55%, #FFB25E 85%); }
.sc-in.dusk svg { filter: hue-rotate(-25deg) saturate(1.5); }
/* Textkarten in Szenen (Gebetsnamen, arabische Wörter) */
.sc-in.card { background: #fff; border-radius: 14px; padding: 6% 4%; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(0, 0, 0, .08), 0 8px 16px var(--shadow); }
.sc-txt { display: block; font-weight: 800; font-size: clamp(.75rem, 3vw, 1.1rem); line-height: 1.25; color: var(--ink); text-align: center; white-space: nowrap; }
.sc-txt.ar { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: clamp(1.25rem, 5.6vw, 2.3rem); line-height: 1.7; }
/* Quran-Wörter */
.qw-stage { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 6px 0 96px; }
.qw-stage .choices { max-width: 520px; }
.qw-card { display: flex; flex-direction: column; align-items: center; gap: 4px; border: 0; background: #fff; border-radius: 28px; padding: 14px 30px 16px; color: var(--ink); box-shadow: 0 6px 0 rgba(0, 0, 0, .08), 0 14px 30px var(--shadow); }
.qw-pic { width: min(40vw, 170px); display: block; } .qw-pic svg { width: 100%; height: auto; display: block; }
.qw-card b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: clamp(3rem, 13vw, 4.6rem); line-height: 1.6; color: #2E6B4F; }
.qw-tl { font-weight: 800; color: var(--ink2); }
.qw-opt { border: 0; background: #fff; border-radius: 22px; padding: 12%; aspect-ratio: 1; box-shadow: 0 5px 0 rgba(0, 0, 0, .08), 0 10px 22px var(--shadow); }
.qw-opt svg { width: 100%; height: 100%; display: block; }
.qw-opt.ok { background: #E6F5DC; } .qw-opt.nope { opacity: .4; }
.qw-read { font-family: Amiri, 'Noto Naskh Arabic', serif; font-weight: 700; font-size: clamp(3.2rem, 15vw, 5.6rem); line-height: 1.6; background: #fff; border-radius: 28px; padding: 0 34px 10px; color: #3B2F2F; box-shadow: 0 6px 0 rgba(0, 0, 0, .08), 0 14px 30px var(--shadow); }
.qw-album { width: 100%; max-width: 560px; text-align: center; } .qw-album h3 { margin: 4px 0 10px; color: var(--green-d); }
.qw-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.qw-mini { border: 0; background: #fff; border-radius: 18px; padding: 8px 6px 2px; box-shadow: 0 4px 0 var(--line); display: flex; flex-direction: column; align-items: center; color: var(--ink); }
.qw-mini svg { width: 54px; height: 54px; } .qw-mini b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: 1.5rem; line-height: 1.8; }

/* Suren-Garten (games.js Games.suren) */
.su-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; width: 100%; max-width: 760px; margin: 0 auto; }
.su-title { display: flex; align-items: baseline; gap: 12px; margin: 4px 0 0; font-size: 1.15rem; color: var(--green-d); }
.su-title b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: 2rem; font-weight: 700; color: var(--ink); }
.su-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; width: 100%; }
.su-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; border: 0; background: #fff; border-radius: 22px; padding: 12px 10px 14px; box-shadow: 0 5px 0 var(--line); }
.su-card b { font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: 2.1rem; font-weight: 700; line-height: 1.5; }
.su-card .su-name { font-weight: 800; font-size: 1.05rem; line-height: 1.2; text-align: center; }
.su-card .su-sub { font-size: .85rem; color: var(--ink2); }
.su-card.next { outline: 4px solid #FFC94A; animation: badgePop 1.6s ease-in-out infinite; }
.su-card.done { background: #EEF8F1; }
.su-tree { position: absolute; top: -10px; inset-inline-end: -6px; width: 40px; height: 40px; }
.su-tree svg { width: 100%; height: 100%; }
.su-ayat { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.su-ayat li { display: flex; align-items: center; gap: 10px; background: #fff; border-radius: 16px; padding: 4px 14px; box-shadow: 0 3px 0 var(--line);
  font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: clamp(22px, 4.2vw, 32px); line-height: 1.9; transition: background .25s, transform .25s; }
.su-ayat li.new { border: 2px dashed #F2B92B; }
.su-ayat li.cur { background: #FFF3C4; transform: scale(1.02); }
.su-n { flex: 0 0 auto; display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--green); color: #fff; font: 800 15px/1 'Baloo 2', system-ui, sans-serif; }
.su-line { display: flex; flex-direction: column; gap: 6px; width: 100%; min-height: 20px; }
.su-cards { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; width: 100%; }
.su-verse { display: flex; align-items: center; gap: 8px; border: 0; background: #fff; border-radius: 18px; padding: 8px 14px; box-shadow: 0 4px 0 var(--line); font-family: Amiri, 'Noto Naskh Arabic', serif; font-size: clamp(22px, 4vw, 30px); line-height: 1.8; }
.su-verse svg { width: 26px; height: 26px; flex: 0 0 auto; }
.su-verse.placed { background: #EEF8F1; box-shadow: 0 3px 0 #CFE8D6; width: 100%; }
.su-parent { margin-top: 4px; }

/* ---------- v49: Mein Herz + Mein Ramadan ---------- */
.bg-room { background: linear-gradient(#FFF3E3, #FFE9CF 70%); }
.sc-in.fly-away { animation: flyAway 3.4s ease-in 1.4s forwards; }
@keyframes flyAway { 0% { transform: translate(0, 0) rotate(0); opacity: 1; } 60% { opacity: 1; } 100% { transform: translate(40%, -230%) rotate(12deg); opacity: 0; } }
.sc-in.shadow { filter: brightness(0) opacity(.82); }
.sc-in.lamp { filter: grayscale(1) brightness(.6); transition: filter .5s; }
.sc-el.done .sc-in.lamp { filter: drop-shadow(0 0 10px #FFD65C) brightness(1.15); }
.sc-el.breath .sc-in { transition: transform .1s linear, filter .4s; transform-origin: 50% 60%; }
.sc-el.breath.full .sc-in { filter: drop-shadow(0 0 14px rgba(255, 214, 92, .9)); }
/* Mein Herz: Szene kleiner, solange die Gesichter darunter stehen */
.herz-holder.with-q .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 290px) * 4 / 3)); }
@media (max-aspect-ratio: 4/5) { .herz-holder.with-q .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 300px) * 3 / 4)); } }
.herz-q { width: 100%; display: flex; justify-content: center; }
.herz-q .choices { max-width: 520px; gap: 10px; margin-top: 10px; }
.herz-q .choices.n2 { max-width: 280px; }
.herz-q .choices.n4 { grid-template-columns: repeat(4, 1fr); }
.herz-q .card-opt.face { padding: 8px; border-radius: 20px; max-width: 120px; }
.herz-intro { width: min(46vw, 200px); margin: 4vh auto 0; }
.herz-intro .art { width: 100%; height: auto; animation: pulse 1.6s ease-in-out infinite; }
/* Mein Ramadan: Laternen-Straße */
.rm-wrap { width: min(100%, 560px); margin: 0 auto; background: linear-gradient(#141C40, #2B3A67 70%, #3D4C82); border-radius: 26px; padding: 10px 12px 14px; color: #fff; box-shadow: 0 6px 0 #10173A, 0 14px 30px var(--shadow); }
.rm-sky { display: flex; align-items: center; gap: 10px; padding: 0 4px 6px; flex-wrap: wrap; }
.rm-moon { width: clamp(40px, 8vh, 80px); height: auto; filter: drop-shadow(0 0 12px rgba(255, 233, 168, .45)); }
.rm-label { font-weight: 800; font-size: clamp(1.1rem, 4.6vw, 1.5rem); }
.rm-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.rm-lan { border: 0; background: rgba(255, 255, 255, .07); border-radius: 14px; padding: 4px 2px 2px; color: #fff; display: flex; flex-direction: column; align-items: center; font: inherit; font-weight: 800; font-size: .8rem; line-height: 1.1; cursor: pointer; }
.rm-lan .art { width: min(44px, calc((100dvh - var(--bar) - var(--caph) - 190px) / 5 - 22px)); min-width: 22px; height: auto; }
.rm-lan b { font-size: .75rem; }
.rm-lan.off .art { filter: grayscale(1) brightness(.75); }
.rm-lan.lit .art { filter: drop-shadow(0 0 8px #FFD65C) brightness(1.1); }
.rm-lan.locked { opacity: .28; cursor: default; }
.rm-lan.today { box-shadow: 0 0 0 3px #FFD65C; animation: pulse 1.4s ease-in-out infinite; }
.rm-specials { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-left: auto; }
.rm-sp { padding: 8px 12px; font-size: .95rem; min-height: 44px; }
.rm-sp .art { width: 26px; height: 26px; }

/* ---------- v52: Runde 3 (rund ums Spiel) ---------- */
/* Alters-Tabelle im Eltern-Bereich: auf schmalen Handys nicht breiter als der Bildschirm (vorher 455 px auf 360 px) */
.ages-box { overflow-x: auto; }
@media (max-width: 560px) {
  .ages { table-layout: fixed; font-size: .76rem; }
  .ages th, .ages td { padding: 5px 3px; hyphens: auto; -webkit-hyphens: auto; overflow-wrap: anywhere; }
  .ages td:first-child { width: 24%; }
}
/* Garten: die Dhikr-Knöpfe sollen über der Sprechblase liegen (Kinder scrollen nicht) – Szene passt sich der Höhe an */
.g-scene { width: min(100%, max(240px, calc((100dvh - var(--bar) - var(--caph) - 255px) * 4 / 3))); }
@media (max-height: 760px) {
  .dhikr { gap: 8px; }
  .dh { padding: 4px 8px 6px; }
  .dh .ar { font-size: 1.32rem; line-height: 1.45; }
  .dh .tl { font-size: .92rem; }
  .g-scene { width: min(100%, max(240px, calc((100dvh - var(--bar) - var(--caph) - 205px) * 4 / 3))); }
}
/* Startseite „Wer spielt heute?“: auf niedrigen Handys und bei 3–4 Kindern müssen alle Kinderbilder ohne Scrollen sichtbar sein
   (vorher auf 360×640: Kind 3 und 4 unterhalb des Bildschirms) */
.profiles.n3, .profiles.n4 { gap: 12px; }
.profiles.n3 .prof, .profiles.n4 .prof { width: min(40vw, 170px); padding: 8px 8px 8px; border-radius: 22px; }
.profiles.n3 .prof-av, .profiles.n4 .prof-av { max-width: 92px; }
@media (max-height: 860px) {
  .start { gap: 6px; }
  .start .sabil { width: min(50vw, 210px); padding: 6px 8px 3px; border-radius: 20px; }
  .start .logo h1 { font-size: clamp(1.6rem, 7vw, 2.2rem); margin-top: 6px; }
  .start .logo p { font-size: .92rem; }
  .start .langs { margin: 2px 0 0; }
  .start .lang svg { width: 30px; }
  .start .who { margin: 4px 0 0; font-size: 1.25rem; }
  .prof { padding: 10px 8px 8px; }
  .prof-av { max-width: 104px; }
  .profiles.n3 .prof-av, .profiles.n4 .prof-av { max-width: 60px; }
  .profiles.n3 .prof-n, .profiles.n4 .prof-n { font-size: 1.02rem; margin-top: 2px; }
  .parents-gate { margin-top: 8px; }
}
/* Sprechblase eingeklappt (Spielübersicht nach der Begrüßung): nur die Katze links unten, kein heller Verlauf über den Kacheln */
#caption.mini { background: none; justify-content: flex-start; }
#caption.mini .cap-bubble { display: none; }

/* ---------- v55: Dino-Spielplatz ---------- */
.park-holder { width: 100%; display: flex; flex-direction: column; align-items: center; }
.park-holder .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 52px) * 4 / 3)); touch-action: none; user-select: none; -webkit-user-select: none; }
@media (max-aspect-ratio: 4/5) { .park-holder .scene { width: min(100%, calc((100dvh - var(--bar) - var(--caph) - 52px) * 3 / 4)); } }
.park-holder .sc-el { pointer-events: none; }
.park-holder .pk-dino, .park-holder .pk-food, .park-holder .pk-moon, .park-holder .pk-bush.tap { pointer-events: auto; }
.pk-obj { z-index: 1; }
.pk-slide { z-index: 2; }
.pk-puddle svg { display: block; width: 100%; height: 100%; }   /* v58: Teich wächst mit der Zahl der Dinos, Bild wird in die Fläche gezogen */
.pk-dino { z-index: 3; }
.pk-food { z-index: 4; }
.park-holder .pk-food.into, .park-holder .pk-food.hidden { pointer-events: none !important; }   /* gefressene Beere darf den Dino darunter nicht blockieren */
.pk-bush { z-index: 5; }
.pk-bush.tap::before { inset: -4%; }
.pk-moon { z-index: 8; opacity: .85; }
.pk-moon.lit { opacity: 1; }
.pk-moon.lit .sc-in { filter: drop-shadow(0 0 14px #FFE9A8); }
.pk-dino .sc-in { transform-origin: 50% 92%; transition: transform .2s, filter .5s; }
.pk-dino .dino { width: 100%; }
.pk-dino.munch .sc-in { animation: pkMunch .45s 2; }
.pk-dino.splash .sc-in { animation: pkSplash .5s 2; }
.pk-dino.sliding { transition: left .9s cubic-bezier(.5, 0, .9, .6), top .9s cubic-bezier(.5, 0, .9, .6); }
.pk-dino.hid { opacity: 0 !important; pointer-events: none !important; }
.pk-dino.out, .pk-dino.peek { z-index: 6; }
.pk-dino.asleep .sc-in { transform: rotate(-9deg) scale(.95); }
@keyframes pkMunch { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1, .9); } }
@keyframes pkSplash { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-9deg) translateY(-6%); } 75% { transform: rotate(9deg) translateY(-6%); } }
.pk-wish { position: absolute; left: 50%; top: -38%; width: 50%; aspect-ratio: 1; margin-left: -25%; background: #fff; border-radius: 50%; padding: 9%; box-shadow: 0 3px 0 var(--line), 0 6px 14px var(--shadow); pointer-events: none; animation: popIn .4s backwards; }
.pk-wish .art { display: block; width: 100%; height: 100%; }
.pk-zzz { position: absolute; left: 62%; top: -14%; font-weight: 800; color: #fff; font-size: clamp(.8rem, 3.4vw, 1.3rem); pointer-events: none; text-shadow: 0 1px 3px rgba(0, 0, 0, .4); }
.pk-zzz i { font-style: normal; font-size: .8em; margin-left: 2px; } .pk-zzz b { font-size: .62em; margin-left: 2px; }
.pk-drop { position: absolute; left: var(--x); top: var(--y); width: 2.6%; aspect-ratio: 1; border-radius: 50%; background: #6DB9EA; animation: pkDrop .7s ease-out forwards; }
@keyframes pkDrop { to { left: calc(var(--x) + var(--dx)); top: calc(var(--y) + var(--dy)); opacity: 0; } }
/* Verstecken: Spielgeräte treten zurück, Büsche erscheinen */
.park.seek .pk-obj { opacity: .18; pointer-events: none !important; }
/* Nacht: alles wird dunkler, der Mond leuchtet */
.park::after { content: ''; position: absolute; inset: 0; z-index: 7; pointer-events: none; background: #101840; opacity: 0; transition: opacity 1.2s; }
.park.night::after { opacity: .58; }
/* v58: „Was sagen wir“ – auf 768 px hohen Laptops scrollte die Seite um ein paar Pixel */
@media (min-height: 521px) and (max-height: 800px) { .sagen .choices { gap: 8px; margin-top: 10px; } }
