/* BeeSpeaker Loud Bee — komiksowa przyroda: staw z boku, grube granatowe kontury, przesunięte cienie, soczyste kolory.
   Rodzina: granat #1d1e4f, żółty #ffd801, róż #ff4f9a; własny akcent: turkus #12b5cb. Etapy zmieniają paletę (.st-0…3). */
:root {
  --navy: #1d1e4f;
  --yellow: #ffd801;
  --pink: #ff4f9a;
  --teal: #12b5cb;
  --mint: #3ee09a;
  --red: #ff5d5d;
  --paper: #fffdf4;
  --display: "Bungee", "Baloo 2", system-ui, sans-serif;
  --body: "Baloo 2", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wy: 330px;      /* linia wody (ustawia gra) */
  --cam: 0px;       /* przesunięcie kamery (paralaksa) */
}
* { box-sizing: border-box; }
html, body {
  height: 100%;
  margin: 0;
  background: var(--navy);
  color: #fff;
  font-family: var(--body);
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  overflow: hidden;
}
button { font: inherit; color: inherit; -webkit-appearance: none; appearance: none; cursor: pointer; }
[hidden] { display: none !important; }

.app {
  position: relative;
  width: 100%;
  max-width: 560px;
  height: 100%;
  height: 100dvh;
  margin: 0 auto;
  overflow: hidden;
  --sky1: #47c6ff; --sky2: #d4f6ff; --w1: #2fd3d8; --w2: #0a86b8; --hill: #7edc7a; --hill2: #45b86a;
}
.app.st-1 { --sky1: #58b4ff; --sky2: #e8fbd2; --w1: #3fa9f5; --w2: #1450b8; --hill: #5cc98a; --hill2: #2c9a6c; }
.app.st-2 { --sky1: #35c9c0; --sky2: #dffcf0; --w1: #54e0e0; --w2: #0b8fa8; --hill: #8d9bb8; --hill2: #5f6f96; }
.app.st-3 { --sky1: #ff9d4d; --sky2: #ffe9a8; --w1: #ffc533; --w2: #e07a00; --hill: #ffb45e; --hill2: #e8873a; }
.app.shake { animation: shake .45s linear; }
.app.shake-big { animation: shakeBig .7s linear; }
@keyframes shake { 10% { transform: translate(-4px, 2px); } 30% { transform: translate(5px, -3px); } 50% { transform: translate(-4px, -2px); } 70% { transform: translate(3px, 3px); } 90% { transform: translate(-2px, 1px); } }
@keyframes shakeBig { 8% { transform: translate(-10px, 5px) rotate(-1deg); } 22% { transform: translate(11px, -7px) rotate(1deg); } 38% { transform: translate(-9px, -5px) rotate(-.6deg); } 54% { transform: translate(8px, 7px) rotate(.6deg); } 70% { transform: translate(-6px, 3px); } 86% { transform: translate(4px, -2px); } }

/* ---------- scena ---------- */
.scene { position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; background: linear-gradient(var(--sky1), var(--sky2) 62%); transition: background 1s; }
.sun {
  position: absolute; right: -46px; top: 54px; width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, #fff6b0 0 34%, #ffe45c 35% 44%, rgba(255, 228, 92, 0) 45%), repeating-conic-gradient(rgba(255, 255, 255, .5) 0 12deg, rgba(255, 255, 255, 0) 12deg 30deg);
  -webkit-mask-image: radial-gradient(circle, #000 60%, transparent 72%); mask-image: radial-gradient(circle, #000 60%, transparent 72%);
  animation: spin 40s linear infinite; opacity: .95;
}
@keyframes spin { to { transform: rotate(360deg); } }
.cloud {
  position: absolute; width: 110px; height: 34px; border-radius: 40px; background: #fff; opacity: .92;
  box-shadow: 26px -14px 0 2px #fff, 56px -6px 0 -2px #fff;
  animation: drift 46s linear infinite;
}
.cloud.c1 { top: 150px; left: -140px; }
.cloud.c2 { top: 210px; left: -140px; transform: scale(.7); animation-duration: 64s; animation-delay: -30s; opacity: .8; }
.cloud.c3 { top: 120px; left: -140px; transform: scale(.55); animation-duration: 80s; animation-delay: -55s; opacity: .7; }
@keyframes drift { to { margin-left: 760px; } }

.layer { position: absolute; left: 0; right: 0; background-repeat: repeat-x; transition: background-position .9s cubic-bezier(.3, .7, .2, 1); }
.far {
  top: calc(var(--wy) - 118px); height: 124px; background-size: 360px 124px; background-position: calc(var(--cam) * -.18) 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='124'%3E%3Cpath d='M0 124V62Q46 18 96 54Q140 12 196 50Q246 22 296 56Q332 36 360 62V124Z' fill='%237edc7a'/%3E%3Cpath d='M0 124V92Q40 58 84 84Q130 54 176 84Q226 60 270 86Q318 64 360 92V124Z' fill='%2345b86a'/%3E%3Cg fill='%2345b86a'%3E%3Ccircle cx='60' cy='62' r='14'/%3E%3Ccircle cx='76' cy='56' r='11'/%3E%3Ccircle cx='236' cy='58' r='13'/%3E%3Ccircle cx='220' cy='64' r='10'/%3E%3C/g%3E%3C/svg%3E");
}
.st-1 .far { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='124'%3E%3Cpath d='M0 124V70Q60 40 120 66Q190 36 250 64Q310 44 360 70V124Z' fill='%235cc98a'/%3E%3Cg fill='%232c9a6c'%3E%3Cpath d='M30 96L46 40L62 96ZM70 96L90 26L110 96ZM150 96L164 48L178 96ZM200 96L222 20L244 96ZM268 96L282 46L296 96ZM312 96L330 34L348 96Z'/%3E%3Crect y='90' width='360' height='34'/%3E%3C/g%3E%3C/svg%3E"); }
.st-2 .far { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='124'%3E%3Cpath d='M0 124V40L40 8L84 44L120 14L170 52L214 4L262 46L300 20L360 40V124Z' fill='%238d9bb8'/%3E%3Cpath d='M0 124V84L50 56L96 88L150 60L200 90L250 62L310 90L360 84V124Z' fill='%235f6f96'/%3E%3Cpath d='M40 8L52 20L40 18L30 22ZM214 4L228 18L214 15L202 20Z' fill='%23fff'/%3E%3C/svg%3E"); }
.st-3 .far { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='124'%3E%3Cpath d='M0 124V66Q50 30 100 60Q150 26 200 58Q260 30 310 60Q340 46 360 66V124Z' fill='%23ffb45e'/%3E%3Cpath d='M0 124V94Q44 66 90 90Q140 62 190 90Q236 68 280 90Q324 70 360 94V124Z' fill='%23e8873a'/%3E%3Cg fill='%23ffd801' stroke='%23e07a00' stroke-width='3'%3E%3Cpath d='M56 70l10 6v12l-10 6l-10-6v-12Z'/%3E%3Cpath d='M240 64l10 6v12l-10 6l-10-6v-12Z'/%3E%3C/g%3E%3C/svg%3E"); }
.mid {
  top: calc(var(--wy) - 70px); height: 84px; background-size: 250px 84px; background-position: calc(var(--cam) * -.45) 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='250' height='84'%3E%3Cg fill='none' stroke='%231f8f46' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M22 84Q24 50 16 22M38 84Q36 56 46 34M58 84Q60 64 54 46M132 84Q130 50 140 20M150 84Q152 60 146 40M206 84Q204 56 214 30M224 84Q226 66 220 50'/%3E%3C/g%3E%3Cg fill='%2339b85c'%3E%3Cpath d='M0 84Q6 40 2 20Q14 44 12 84ZM70 84Q80 44 92 30Q86 54 84 84ZM104 84Q102 50 94 36Q112 52 114 84ZM166 84Q174 50 186 38Q180 58 178 84ZM238 84Q240 54 250 40V84Z'/%3E%3C/g%3E%3Cg fill='%237a4a12' stroke='%231d1e4f' stroke-width='2.5'%3E%3Crect x='10' y='8' width='11' height='28' rx='5.5'/%3E%3Crect x='41' y='20' width='10' height='24' rx='5'/%3E%3Crect x='135' y='6' width='11' height='28' rx='5.5'/%3E%3Crect x='209' y='16' width='10' height='26' rx='5'/%3E%3C/g%3E%3C/svg%3E");
}
.st-3 .mid { filter: hue-rotate(-38deg) saturate(1.3); }

/* wodospad (etap 3) */
.fall { position: absolute; left: 16%; top: calc(var(--wy) - 250px); width: 96px; height: 252px; display: none; border-radius: 30px 30px 0 0; overflow: hidden; border: 4px solid var(--navy); border-bottom: 0; background: #bff3ff; }
.st-2 .fall { display: block; }
.fall i { position: absolute; top: -40px; bottom: 0; width: 14px; border-radius: 8px; background: repeating-linear-gradient(#fff 0 26px, rgba(255, 255, 255, 0) 26px 44px); animation: fall .55s linear infinite; }
.fall i:nth-child(1) { left: 12px; } .fall i:nth-child(2) { left: 40px; animation-duration: .42s; width: 18px; } .fall i:nth-child(3) { left: 68px; animation-duration: .5s; }
@keyframes fall { to { transform: translateY(44px); } }
.fall::after { content: ""; position: absolute; left: -20px; right: -20px; bottom: -14px; height: 44px; border-radius: 50%; background: radial-gradient(#fff 30%, rgba(255, 255, 255, 0) 70%); }

/* ul w tle (etap 4) */
.hive-far { position: absolute; right: 10px; top: calc(var(--wy) - 232px); width: 112px; height: 124px; display: none; transform-origin: 50% 0; animation: sway 4s ease-in-out infinite; }
.st-3 .hive-far { display: block; }
.hive-far svg { width: 100%; height: 100%; display: block; overflow: visible; }
.hive-far.open .hive-glow { animation: glow .5s ease-in-out infinite alternate; }
@keyframes glow { to { opacity: .4; } }
@keyframes sway { 0%, 100% { transform: rotate(-2deg); } 50% { transform: rotate(2deg); } }

.water { position: absolute; left: 0; right: 0; top: var(--wy); bottom: 0; background: linear-gradient(var(--w1), var(--w2) 70%); border-top: 4px solid var(--navy); box-shadow: inset 0 5px 0 rgba(255, 255, 255, .55); transition: background 1s; }
.waves { position: absolute; left: 0; right: 0; height: 16px; background-repeat: repeat-x; background-size: 120px 16px; opacity: .5; animation: wave 7s linear infinite;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='16'%3E%3Cpath d='M0 8Q15 0 30 8T60 8T90 8T120 8' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round'/%3E%3C/svg%3E"); }
.waves.w1 { top: 44px; opacity: .35; }
.waves.w2 { top: 38%; animation-duration: 5s; animation-direction: reverse; background-size: 160px 20px; height: 20px; }
.waves.w3 { top: 68%; animation-duration: 9s; background-size: 200px 24px; height: 24px; opacity: .28; }
.st-1 .waves { animation-duration: 2.6s; }
.st-1 .waves.w2 { animation-direction: normal; animation-duration: 1.9s; }
@keyframes wave { to { background-position-x: -240px; } }

/* trzciny z prawej (tam pszczoła robi BONK) i z przodu */
.reeds-r, .reeds-front { position: absolute; background-repeat: no-repeat; background-size: 100% 100%; transform-origin: 50% 100%; animation: sway 3.4s ease-in-out infinite; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 90 170'%3E%3Cg fill='none' stroke='%231d1e4f' stroke-width='9' stroke-linecap='round'%3E%3Cpath d='M30 170Q34 100 22 40M52 170Q50 110 62 56M70 170Q74 120 66 84'/%3E%3C/g%3E%3Cg fill='none' stroke='%232fb956' stroke-width='5' stroke-linecap='round'%3E%3Cpath d='M30 170Q34 100 22 40M52 170Q50 110 62 56M70 170Q74 120 66 84'/%3E%3C/g%3E%3Cg fill='%2339b85c' stroke='%231d1e4f' stroke-width='3' stroke-linejoin='round'%3E%3Cpath d='M8 170Q14 110 2 70Q28 110 24 170ZM78 170Q84 126 90 100V170Z'/%3E%3C/g%3E%3Cg fill='%238a5416' stroke='%231d1e4f' stroke-width='3'%3E%3Crect x='14' y='14' width='15' height='40' rx='7.5'/%3E%3Crect x='55' y='34' width='14' height='36' rx='7'/%3E%3C/g%3E%3C/svg%3E"); }
.reeds-r { right: -22px; top: calc(var(--wy) - 96px); width: 66px; height: 130px; }
.reeds-r.bonk { animation: bonk .5s ease-out; }
@keyframes bonk { 20% { transform: rotate(14deg); } 45% { transform: rotate(-9deg); } 70% { transform: rotate(5deg); } }
.reeds-front { left: -22px; bottom: -22px; width: 110px; height: 200px; animation-duration: 4.2s; transform: scaleX(-1); }
@keyframes swayF { 0%, 100% { transform: scaleX(-1) rotate(-2deg); } 50% { transform: scaleX(-1) rotate(2.5deg); } }
.reeds-front { animation-name: swayF; }

/* liście z sylabami */
.pads { position: absolute; left: 0; top: 0; right: 0; bottom: 0; transition: transform .34s cubic-bezier(.4, 0, .2, 1), opacity .2s; }
.pads.out { transform: translateX(-110%); opacity: 0; }
.pads.pre { transform: translateX(110%); transition: none; }
.pad { position: absolute; left: 0; top: 0; width: 70px; height: 32px; margin: -16px 0 0 -35px; will-change: transform; }
.pad-in { width: 100%; height: 100%; animation: bob 2.6s ease-in-out infinite; transform-origin: 50% 60%; }
.pad:nth-child(2n) .pad-in { animation-delay: -1.1s; }
.pad:nth-child(3n) .pad-in { animation-delay: -.5s; }
.pad svg { width: 100%; height: 100%; display: block; overflow: visible; }
.pad.pulse .pad-in { animation: pulse .32s cubic-bezier(.2, 1.8, .4, 1); }
.pad.dip .pad-in { animation: dip .42s ease-out; }
.pad.sink .pad-in { animation: sink 1s ease-in forwards; }
.pad.done svg { filter: saturate(.75) brightness(.95); }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-1.2deg); } 50% { transform: translateY(2.5px) rotate(1.2deg); } }
@keyframes pulse { 0% { transform: scale(1); } 35% { transform: scale(1.28) translateY(-5px); } 100% { transform: scale(1); } }
@keyframes dip { 0% { transform: translateY(0); } 30% { transform: translateY(7px) scaleY(.9); } 60% { transform: translateY(-2px); } 100% { transform: translateY(0); } }
@keyframes sink { to { transform: translateY(26px) rotate(8deg); opacity: 0; } }
.syl {
  position: absolute; left: 50%; top: 100%; transform: translateX(-50%); margin-top: 1px; white-space: nowrap;
  font-family: var(--display); font-size: 17px; line-height: 1; color: #fff; letter-spacing: .01em;
  text-shadow: 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 2px 0 var(--navy), 0 -2px 0 var(--navy), 2px 2px 0 var(--navy), -2px 2px 0 var(--navy), 2px -2px 0 var(--navy), -2px -2px 0 var(--navy), 0 4px 0 rgba(0, 0, 0, .28);
}
.pad.gold .syl { color: var(--yellow); }
.pad.pulse .syl { animation: sylPop .32s ease-out; }
.pad.done .syl { color: var(--mint); }
@keyframes sylPop { 40% { transform: translateX(-50%) scale(1.35); } }

/* pszczoła */
.bee { position: absolute; left: 0; top: 0; width: 66px; height: 77px; margin: -72px 0 0 -33px; will-change: transform; z-index: 2; }
.bee-in { width: 100%; height: 100%; transform-origin: 50% 92%; }
.bee svg { width: 100%; height: 100%; display: block; overflow: visible; }
.bee .wing { transform-box: fill-box; transform-origin: 80% 90%; animation: flap .16s ease-in-out infinite alternate; }
.bee .wr { animation-delay: -.08s; }
@keyframes flap { to { transform: rotate(-20deg) scaleY(.7); } }
.bee .e-happy, .bee .e-sad, .bee .e-dizzy, .bee .mo-open, .bee .mo-big, .bee .mo-o, .bee .mo-sad, .bee .arm-shh, .bee .arms-up, .bee .drops, .bee .stars, .bee .hat-frog { display: none; }
.bee.m-open .mo-smile, .bee.m-shout .mo-smile, .bee.m-proud .mo-smile, .bee.m-shh .mo-smile, .bee.m-soaked .mo-smile, .bee.m-dizzy .mo-smile { display: none; }
.bee.m-open .mo-open { display: block; }
.bee.m-shout .mo-big { display: block; }
.bee.m-shout .bee-in { animation: shout .12s linear infinite alternate; }
@keyframes shout { to { transform: scale(1.06, .96) rotate(2deg); } }
.bee.m-proud .mo-big, .bee.m-proud .e-happy, .bee.m-proud .arms-up { display: block; }
.bee.m-proud .e-open { display: none; }
.bee.m-shh .mo-o, .bee.m-shh .arm-shh { display: block; }
.bee.m-shh .wing { animation-duration: .5s; }
.bee.m-soaked .e-sad, .bee.m-soaked .mo-sad, .bee.m-soaked .drops { display: block; }
.bee.m-soaked .e-open { display: none; }
.bee.m-soaked .wing { animation: none; transform: rotate(24deg); }
.bee.m-soaked.frogged .hat-frog { display: block; animation: hatHop .5s ease-out; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes hatHop { 0% { transform: translateY(-40px) scale(.6); } 60% { transform: translateY(0) scale(1.1, .9); } 100% { transform: none; } }
.bee.m-dizzy .e-dizzy, .bee.m-dizzy .mo-o, .bee.m-dizzy .stars { display: block; }
.bee.m-dizzy .e-open { display: none; }
.bee.m-dizzy .stars { transform-box: fill-box; transform-origin: 50% 120%; animation: starSpin .7s linear infinite; }
@keyframes starSpin { 50% { transform: rotate(14deg) translateX(4px); } }
.bee.bob .bee-in { animation: beeIdle 1.5s ease-in-out infinite; }
@keyframes beeIdle { 50% { transform: translateY(-3px) rotate(2deg); } }
.bee.land .bee-in { animation: land .26s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes land { 0% { transform: scale(1.22, .7); } 55% { transform: scale(.92, 1.12); } 100% { transform: none; } }
.bee.cheer .bee-in { animation: cheer .5s cubic-bezier(.3, 1.5, .5, 1) 2; }
@keyframes cheer { 40% { transform: translateY(-26px) rotate(-8deg) scale(1.08); } }
.bee.flip .bee-in { animation: flip .62s cubic-bezier(.3, 1.2, .5, 1); }
@keyframes flip { 0% { transform: translateY(0) rotate(0); } 45% { transform: translateY(-64px) rotate(200deg) scale(1.15); } 100% { transform: translateY(0) rotate(360deg); } }
.bee.swim .bee-in { animation: swim .14s linear infinite alternate; }
@keyframes swim { from { transform: translateY(7px) rotate(-12deg); } to { transform: translateY(10px) rotate(12deg); } }
.bee.under { opacity: 0; }
/* w wodzie: dół pszczoły schowany pod powierzchnią */
.bee.inwater { -webkit-clip-path: inset(-70px -50px 17% -50px); clip-path: inset(-70px -50px 17% -50px); }

.fx { position: absolute; left: 0; top: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }

/* ściana miodu */
.wall { position: absolute; left: 0; top: 0; width: 96px; height: 236px; margin: -200px 0 0 -48px; z-index: 1; transform-origin: 50% 100%; }
.wall svg { width: 100%; height: 100%; display: block; overflow: visible; filter: drop-shadow(6px 6px 0 rgba(0, 0, 0, .25)); }
.wall .crack { display: none; }
.wall.c1 .crack-1, .wall.c2 .crack-1, .wall.c2 .crack-2, .wall.c3 .crack { display: block; }
.wall.in { animation: wallIn .5s cubic-bezier(.2, 1.3, .4, 1); }
@keyframes wallIn { from { margin-left: 200px; } }
.wall.hit { animation: wallHit .25s ease-out; }
@keyframes wallHit { 30% { transform: rotate(4deg) scale(1.03); } 60% { transform: rotate(-2deg); } }
.wall-word {
  position: absolute; left: 50%; top: 34%; transform: translate(-50%, -50%) rotate(-5deg); padding: 6px 10px; background: var(--paper); color: var(--navy);
  border: 4px solid var(--navy); border-radius: 12px; font-family: var(--display); font-size: 19px; line-height: 1; white-space: nowrap; box-shadow: 4px 4px 0 var(--pink);
}

/* ---------- HUD ---------- */
.hud { position: absolute; left: 0; right: 0; top: 0; z-index: 6; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: max(8px, env(safe-area-inset-top)) 10px 0; }
.lives { display: flex; gap: 5px; align-items: center; padding-left: 2px; }
.lives i { display: block; width: 19px; height: 19px; background: var(--yellow); border: 3px solid var(--navy); border-radius: 0 50% 50% 50%; transform: rotate(45deg); box-shadow: inset -3px -3px 0 #f2a200; transition: transform .3s, opacity .3s; }
.lives i.lost { background: #b9c2d6; box-shadow: none; opacity: .55; transform: rotate(45deg) scale(.72); }
.lives i.pop { animation: lifePop .5s ease-out; }
@keyframes lifePop { 30% { transform: rotate(45deg) scale(1.6); background: var(--red); } }
.prog { flex: 1; display: flex; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.prog i { display: block; width: 9px; height: 9px; border-radius: 50%; background: rgba(29, 30, 79, .28); border: 2px solid var(--navy); flex: none; }
.prog i.ok { background: var(--mint); }
.prog i.meh { background: var(--yellow); }
.prog i.bad { background: var(--red); }
.prog i.now { background: #fff; transform: scale(1.35); }
.prog i.gate { width: 13px; height: 13px; border-radius: 3px; background: #ffab00; transform: rotate(45deg) scale(.9); margin-left: 3px; }
.prog i.gate.now { background: #fff; transform: rotate(45deg) scale(1.2); }
.prog i.gate.ok { background: var(--mint); }
.prog b { font-family: var(--display); font-weight: 400; font-size: 13px; color: var(--navy); margin-right: 5px; white-space: nowrap; }
.streak { position: absolute; left: 12px; top: -13px; font-family: var(--display); font-size: 11.5px; color: #fff; background: var(--pink); border: 3px solid var(--navy); border-radius: 999px; padding: 1px 8px 1px 6px; white-space: nowrap; }
.streak.bump { animation: bump .4s ease-out; }
.pts { font-family: var(--display); font-size: 17px; color: var(--navy); background: var(--yellow); padding: 3px 11px; border-radius: 999px; border: 3px solid var(--navy); box-shadow: 3px 3px 0 rgba(0, 0, 0, .3); min-width: 58px; text-align: center; }
.pts.bump { animation: bump .4s ease-out; }
@keyframes bump { 40% { transform: scale(1.25) rotate(-4deg); } }
.icon-btn { background: rgba(29, 30, 79, .78); border: 0; width: 40px; height: 40px; border-radius: 12px; font-size: 17px; flex: none; }

/* ---------- ekran przed grą ---------- */
.idle { position: absolute; left: 0; right: 0; top: 0; z-index: 4; padding: max(54px, calc(env(safe-area-inset-top) + 40px)) 16px 0; text-align: center; pointer-events: none; }
.title { margin: 0; font-family: var(--display); font-weight: 400; font-size: 58px; line-height: .92; color: var(--yellow); letter-spacing: .01em;
  text-shadow: 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy), -3px -3px 0 var(--navy), 3px -3px 0 var(--navy), -3px 3px 0 var(--navy), 6px 8px 0 rgba(29, 30, 79, .35); }
.title span { display: block; }
.title .alt { color: #fff; }
.tagline { margin: 12px auto 0; display: inline-block; font-weight: 800; font-size: 17px; line-height: 1.2; color: var(--navy); background: rgba(255, 255, 255, .78); padding: 5px 14px; border-radius: 999px; }

/* ---------- rozgrywka ---------- */
.play { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 5; pointer-events: none; }
.play > * { pointer-events: auto; }
.card {
  position: absolute; left: 12px; right: 12px; top: calc(max(8px, env(safe-area-inset-top)) + 52px); margin: 0 auto; max-width: 400px; min-height: 76px;
  display: flex; align-items: center; gap: 10px; padding: 8px 14px 8px 10px; background: var(--paper); color: var(--navy);
  border: 4px solid var(--navy); border-radius: 20px; box-shadow: 5px 5px 0 var(--teal), 0 10px 22px rgba(0, 0, 0, .18); pointer-events: none;
}
.card.in { animation: cardIn .34s cubic-bezier(.2, 1.4, .4, 1) both; }
@keyframes cardIn { from { transform: translateY(-18px) rotate(-2deg) scale(.92); opacity: 0; } }
.card.wait { visibility: hidden; }
.card.gate { box-shadow: 5px 5px 0 var(--pink), 0 10px 22px rgba(0, 0, 0, .18); background: #fff3c4; }
.pic { flex: none; width: 54px; height: 54px; border-radius: 50%; background: #dff6ff; border: 3px solid var(--navy); display: flex; align-items: center; justify-content: center; font-size: 30px; line-height: 1; }
.wtxt { flex: 1; min-width: 0; }
.word { margin: 0; font-family: var(--display); font-size: 27px; line-height: 1.05; overflow-wrap: anywhere; }
.word b { font-weight: 400; color: var(--pink); }
.word.long { font-size: 22px; }
.word.xlong { font-size: 18px; }
.mean { margin: 1px 0 0; font-size: 16px; font-weight: 700; line-height: 1.15; color: #4b4d86; }
.acc { position: absolute; right: 10px; top: -13px; background: var(--navy); color: var(--yellow); font-family: var(--display); font-size: 10.5px; padding: 3px 8px; border-radius: 999px; }
.acc:empty { display: none; }
.timer { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 142px); width: 56%; max-width: 240px; height: 12px; transform: translateX(-50%); background: rgba(29, 30, 79, .25); border: 3px solid var(--navy); border-radius: 999px; overflow: hidden; opacity: 0; transition: opacity .2s; pointer-events: none; }
.timer.on { opacity: 1; }
.timer i { display: block; height: 100%; width: 100%; background: var(--yellow); transform-origin: 0 50%; }
.timer.low i { background: var(--red); }

.banner { position: absolute; left: 0; right: 0; top: calc(var(--wy) - 172px); text-align: center; z-index: 7; animation: bannerIn 1.9s ease-in-out both; pointer-events: none; }
.banner small { display: inline-block; font-family: var(--display); font-size: 13px; color: var(--navy); background: var(--yellow); border: 3px solid var(--navy); border-radius: 999px; padding: 2px 12px; }
.banner b { display: block; margin-top: 4px; font-family: var(--display); font-weight: 400; font-size: 32px; line-height: 1; color: #fff; padding: 0 10px;
  text-shadow: 3px 0 0 var(--navy), -3px 0 0 var(--navy), 0 3px 0 var(--navy), 0 -3px 0 var(--navy), 3px 3px 0 var(--navy), -3px -3px 0 var(--navy), 3px -3px 0 var(--navy), -3px 3px 0 var(--navy), 5px 7px 0 rgba(29, 30, 79, .35); }
@keyframes bannerIn { 0% { transform: translateX(-110%) skewX(-12deg); } 14%, 80% { transform: none; } 100% { transform: translateX(110%) skewX(12deg); } }

.burst {
  position: absolute; left: 50%; top: calc(var(--wy) - 138px); transform: translate(-50%, -50%) rotate(-5deg); z-index: 8;
  padding: 8px 16px; background: var(--yellow); color: var(--navy); font-family: var(--display); font-size: 24px; line-height: 1.05;
  border: 4px solid var(--navy); border-radius: 16px; box-shadow: 5px 5px 0 var(--pink), 0 10px 22px rgba(0, 0, 0, .3);
  max-width: 92%; width: max-content; text-align: center; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1) both; pointer-events: none;
}
.burst.bad { background: var(--red); color: #fff; box-shadow: 5px 5px 0 var(--navy), 0 10px 22px rgba(0, 0, 0, .3); }
.burst.good { background: var(--mint); }
.burst.pink { background: var(--pink); color: #fff; box-shadow: 5px 5px 0 var(--yellow), 0 10px 22px rgba(0, 0, 0, .3); }
.burst.go { font-size: 44px; padding: 4px 22px; background: #fff; box-shadow: 5px 5px 0 var(--teal), 0 10px 22px rgba(0, 0, 0, .3); }
.burst.shh { font-size: 34px; background: var(--navy); color: #fff; border-color: #fff; box-shadow: 5px 5px 0 var(--teal); }
@keyframes pop { from { transform: translate(-50%, -50%) scale(.2) rotate(-28deg); opacity: 0; } }
.pop { position: absolute; left: 0; top: 0; z-index: 8; font-family: var(--display); font-size: 22px; color: var(--yellow); white-space: nowrap; pointer-events: none; animation: rise .9s ease-out both;
  text-shadow: 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 2px 0 var(--navy), 0 -2px 0 var(--navy), 2px 2px 0 var(--navy), -2px -2px 0 var(--navy), 2px -2px 0 var(--navy), -2px 2px 0 var(--navy); }
@keyframes rise { 0% { margin-top: 0; opacity: 0; transform: translateX(-50%) scale(.6); } 20% { opacity: 1; transform: translateX(-50%) scale(1.15); } 100% { margin-top: -54px; opacity: 0; transform: translateX(-50%) scale(1); } }

.meter { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 166px); transform: translateX(-50%); width: 72%; max-width: 300px; text-align: center; pointer-events: none; }
.meter-bar { position: relative; height: 22px; background: rgba(29, 30, 79, .3); border: 4px solid var(--navy); border-radius: 999px; overflow: hidden; }
.meter-bar i { display: block; height: 100%; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: linear-gradient(90deg, var(--mint), var(--yellow) 60%, var(--red)); transition: transform .06s linear; }
.meter-goal { position: absolute; left: 78%; top: -4px; bottom: -4px; width: 4px; background: var(--navy); }
.meter span { display: inline-block; margin-top: 5px; font-family: var(--display); font-size: 13px; color: var(--navy); background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 2px 10px; }

.frog-wrap { position: absolute; right: 8px; left: 8px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 34px); display: flex; align-items: flex-end; justify-content: flex-end; gap: 6px; pointer-events: none; }
.frog { width: 96px; height: 80px; flex: none; }
.frog svg { width: 100%; height: 100%; display: block; overflow: visible; }
.frog .f-open, .frog .f-blink { display: none; }
.frog.talk .f-open { display: block; animation: ftalk .16s steps(2) infinite; transform-box: fill-box; transform-origin: 50% 0; }
.frog.talk .f-closed { display: none; }
.frog.talk { animation: fhop .3s ease-out; }
@keyframes ftalk { 50% { transform: scaleY(.45); } }
@keyframes fhop { 40% { transform: translateY(-9px) scale(1.04, .96); } }
.frog .f-eyes { animation: blinkEyes 4s steps(1) infinite; }
.frog .f-blink { display: block; animation: blinkLids 4s steps(1) infinite; }
@keyframes blinkEyes { 0%, 94% { opacity: 1; } 95%, 100% { opacity: 0; } }
@keyframes blinkLids { 0%, 94% { opacity: 0; } 95%, 100% { opacity: 1; } }
.bubble {
  position: relative; margin-bottom: 30px; max-width: calc(100% - 118px); padding: 7px 12px; background: #fff; color: var(--navy); border: 3px solid var(--navy); border-radius: 16px;
  font-weight: 800; font-size: 15.5px; line-height: 1.15; box-shadow: 3px 3px 0 rgba(0, 0, 0, .25); animation: bubbleIn .25s cubic-bezier(.2, 1.5, .4, 1) both; transform-origin: 100% 100%;
}
.bubble::after { content: ""; position: absolute; right: -11px; bottom: 10px; width: 16px; height: 16px; background: #fff; border-right: 3px solid var(--navy); border-top: 3px solid var(--navy); transform: rotate(45deg) skew(12deg, 12deg); }
@keyframes bubbleIn { from { transform: scale(.3); opacity: 0; } }
/* z przyciskiem stukania dymek żaby idzie nad żabę */
.tapmode .frog-wrap { flex-direction: column; align-items: flex-end; gap: 4px; left: 130px; }
.tapmode .bubble { margin-bottom: 0; max-width: 100%; }
.tapmode .bubble::after { right: 34px; bottom: -11px; border-top: 0; border-bottom: 3px solid var(--navy); }
.hint { position: absolute; left: 8px; right: 8px; bottom: max(8px, env(safe-area-inset-bottom)); margin: 0; text-align: center; font-weight: 800; font-size: 14.5px; line-height: 1.15; color: #fff; text-shadow: 0 1px 0 rgba(0, 0, 0, .35); pointer-events: none; min-height: 1.2em; }
.hint b { font-family: var(--display); font-weight: 400; color: var(--yellow); letter-spacing: .02em; }

.tap {
  position: absolute; left: 14px; bottom: calc(max(10px, env(safe-area-inset-bottom)) + 30px); width: 112px; height: 112px; border-radius: 50%;
  border: 5px solid var(--navy); background: radial-gradient(circle at 35% 30%, #fff39a, var(--yellow) 55%, #f2a200); color: var(--navy);
  font-family: var(--display); font-size: 22px; line-height: 1; box-shadow: 0 7px 0 var(--navy), 0 14px 24px rgba(0, 0, 0, .3); animation: tapPulse 1s ease-in-out infinite;
}
.tap:active, .tap.hit { transform: translateY(5px) scale(.96); box-shadow: 0 2px 0 var(--navy); animation: none; }
.tap.off { filter: grayscale(.6); opacity: .7; animation: none; }
@keyframes tapPulse { 50% { transform: scale(1.05); } }

/* ---------- brak mikrofonu ---------- */
.nomic { position: absolute; left: 0; top: 0; right: 0; bottom: 0; z-index: 9; display: flex; align-items: center; justify-content: center; padding: 18px; background: rgba(29, 30, 79, .72); }
.panel { width: 100%; max-width: 380px; background: var(--paper); color: var(--navy); border: 4px solid var(--navy); border-radius: 24px; box-shadow: 6px 6px 0 var(--teal), 0 16px 32px rgba(0, 0, 0, .35); padding: 18px 16px 14px; text-align: center; animation: cardIn .3s cubic-bezier(.2, 1.4, .4, 1) both; }
.nomic-ico { position: relative; width: 68px; height: 68px; margin: 0 auto 6px; border-radius: 50%; background: var(--yellow); border: 4px solid var(--navy); font-size: 32px; line-height: 60px; }
.nomic-ico i { position: absolute; left: 6px; right: 6px; top: 50%; height: 6px; margin-top: -3px; background: var(--red); border: 0; border-radius: 3px; transform: rotate(-45deg); box-shadow: 0 0 0 2px var(--paper); }
.panel h2 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; font-size: 21px; line-height: 1.1; }
.panel p { margin: 0 0 12px; font-size: 15.5px; font-weight: 700; line-height: 1.25; color: #3d3f78; }
.panel .small { margin: 10px 0 0; font-size: 13px; color: #6a6c9c; }
.btn { display: block; width: 100%; border: 4px solid var(--navy); border-radius: 999px; padding: 11px 14px; font-family: var(--display); font-size: 18px; line-height: 1.1; }
.btn.primary { background: linear-gradient(180deg, #ffe85a, var(--yellow) 55%, #f6b60b); color: var(--navy); box-shadow: 0 5px 0 var(--navy); }
.btn.primary:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--navy); }
.btn.ghost { margin-top: 12px; background: #fff; font-size: 14px; padding: 8px 12px; border-width: 3px; }

/* ---------- małe ekrany ---------- */
@media (max-height: 640px) {
  .card { min-height: 64px; padding: 6px 12px 6px 8px; top: calc(max(8px, env(safe-area-inset-top)) + 48px); }
  .pic { width: 44px; height: 44px; font-size: 24px; }
  .word { font-size: 23px; }
  .word.long { font-size: 19px; }
  .word.xlong { font-size: 16px; }
  .mean { font-size: 14.5px; }
  .timer { top: calc(max(8px, env(safe-area-inset-top)) + 122px); height: 10px; }
  .meter { top: calc(max(8px, env(safe-area-inset-top)) + 140px); }
  .frog { width: 78px; height: 65px; }
  .bubble { font-size: 14px; max-width: calc(100% - 98px); margin-bottom: 22px; }
  .tap { width: 92px; height: 92px; font-size: 18px; }
  .title { font-size: 46px; }
  .burst { font-size: 21px; top: calc(var(--wy) - 112px); }
  .hive-far { top: calc(var(--wy) - 186px); width: 90px; height: 100px; }
  .burst.go { font-size: 38px; }
  .banner b { font-size: 26px; }
  .sun { top: 40px; width: 120px; height: 120px; }
  .cloud.c1 { top: 118px; } .cloud.c2 { top: 160px; } .cloud.c3 { top: 96px; }
}
@media (max-width: 340px) {
  .prog i { width: 7px; height: 7px; }
  .prog b { display: none; }
  .lives i { width: 16px; height: 16px; }
  .pts { font-size: 15px; min-width: 50px; padding: 3px 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .sun, .cloud, .waves, .reeds-r, .reeds-front, .hive-far, .pad-in, .fall i, .bee.bob .bee-in, .tap, .frog .f-eyes, .frog .f-blink { animation: none !important; }
  .frog .f-blink { display: none; }
  .app.shake, .app.shake-big { animation: none; }
  .layer, .pads { transition: none; }
}
