/* BeeSpeaker Mic Mania — komiksowa scena w elektrycznym fiolecie i różu. Barwy marki: granat #1d1e4f, żółty #ffd801, różowy #ff4f9a;
 * własny akcent: fiolet #7b2ff7 i neonowy błękit #2ee6ff. Fonty: Bungee (polecenia, komiksowe napisy) + Baloo 2 (teksty).
 * Układ: HUD → nagłówek polecenia → podpis + scenka (kwadrat SVG) → konsola (miernik głośności + lont). */
:root {
  --navy: #1d1e4f; --navy2: #2a2b6e; --ink: #17123f; --yellow: #ffd801; --pink: #ff4f9a; --violet: #7b2ff7; --violet2: #3b1a8c;
  --cyan: #2ee6ff; --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;
  --hud: 52px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { height: 100%; margin: 0; overflow: hidden; }
body {
  background: var(--navy); color: #fff; font-family: var(--body);
  touch-action: manipulation; overscroll-behavior: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
}
button { font: inherit; color: inherit; cursor: pointer; touch-action: manipulation; -webkit-appearance: none; appearance: none; }

.app {
  position: relative; width: 100%; max-width: 480px; height: 100%; height: 100dvh; margin: 0 auto; overflow: hidden;
  display: flex; flex-direction: column;
  background: radial-gradient(circle at 50% 36%, #a55cff 0, #7b2ff7 30%, #4a1cb0 68%, #2a1173 100%);
}
.app.shake { animation: shake .4s linear; }
@keyframes shake { 0%, 100% { transform: translate(0, 0); } 15% { transform: translate(-7px, 4px) rotate(-.6deg); } 30% { transform: translate(6px, -5px) rotate(.5deg); } 45% { transform: translate(-5px, 3px); } 60% { transform: translate(5px, 4px) rotate(-.4deg); } 80% { transform: translate(-3px, -2px); } }
/* tło sceny: wolno obracające się promienie + raster */
.bgRays, .bgDots { position: absolute; pointer-events: none; }
.bgRays {
  left: 50%; top: 36%; width: 260%; padding-bottom: 260%; margin: -130% 0 0 -130%;
  background: repeating-conic-gradient(rgba(255, 79, 154, .34) 0deg 10deg, rgba(255, 79, 154, 0) 10deg 20deg);
  animation: spin 50s linear infinite;
}
.bgDots { left: 0; top: 0; right: 0; bottom: 0; background-image: radial-gradient(rgba(255, 255, 255, .1) 2px, transparent 2.6px); background-size: 18px 18px; }
.app[data-phase="play"] .bgRays { opacity: .35; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- HUD ---------- */
.hud { position: relative; z-index: 8; flex: none; height: calc(var(--hud) + env(safe-area-inset-top)); display: flex; align-items: center; justify-content: space-between; padding: max(6px, env(safe-area-inset-top)) 12px 0; }
.counter { display: flex; gap: 3px; min-width: 44px; }
.digit { display: inline-block; min-width: 28px; height: 38px; text-align: center; background: var(--navy); color: var(--yellow); border: 3px solid var(--yellow); border-radius: 9px; font: 400 21px/32px var(--display); box-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.digit.flip { animation: flip .45s ease-out; }
@keyframes flip { 0% { transform: rotateX(90deg); } 60% { transform: rotateX(-18deg); } 100% { transform: rotateX(0); } }
.hearts { position: absolute; left: 50%; bottom: 3px; transform: translateX(-50%); display: flex; gap: 5px; padding: 7px 13px 6px; background: var(--navy); border: 3px solid var(--pink); border-radius: 99px; box-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.heart { width: 23px; height: 21px; display: block; }
.heart svg { width: 100%; height: 100%; display: block; overflow: visible; }
.heart.full path { fill: var(--pink); stroke: #fff; stroke-width: 1.6; }
.heart.empty path { fill: none; stroke: #7f73c9; stroke-width: 2; stroke-dasharray: 3 3; }
.heart.losing { animation: heartLose .5s ease-in; }
.heart.gaining { animation: heartGain .6s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes heartLose { 0% { transform: scale(1.5) rotate(-14deg); filter: brightness(2); } 60% { transform: scale(1.1) rotate(10deg); } 100% { transform: scale(1); } }
@keyframes heartGain { 0% { transform: scale(0); } 60% { transform: scale(1.6); } 100% { transform: scale(1); } }
.mute { width: 42px; height: 42px; border: 3px solid var(--yellow); border-radius: 50%; background: var(--navy); color: var(--yellow); display: flex; align-items: center; justify-content: center; padding: 0; box-shadow: 0 4px 0 rgba(0, 0, 0, .28); }
.mute svg { width: 23px; height: 23px; }
.mute .off, .mute.muted .on { display: none; }
.mute.muted .off { display: block; }
.fingerTag { position: absolute; z-index: 9; left: 50%; top: calc(var(--hud) + env(safe-area-inset-top) + 6px); transform: translateX(-50%); white-space: nowrap; font: 800 12px/1 var(--body); color: var(--navy); background: var(--cyan); border: 2px solid var(--navy); border-radius: 99px; padding: 5px 10px; }
.app[data-phase="play"] .fingerTag { display: none; }

/* ---------- nagłówek mikrogry ---------- */
.head { position: relative; z-index: 3; flex: none; margin-top: auto; min-height: 58px; padding: 6px 10px 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; text-align: center; }
.headCmd { font: 400 27px/1 var(--display); color: var(--yellow); letter-spacing: .02em; text-shadow: 2px 2px 0 var(--navy), -2px -2px 0 var(--navy), 2px -2px 0 var(--navy), -2px 2px 0 var(--navy), 0 5px 0 var(--navy); }
.head.long .headCmd { font-size: 22px; }
.head.xlong .headCmd { font-size: 18px; }
.headHint { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; font: 800 14.5px/1.15 var(--body); color: var(--navy); background: #fff; border: 2.5px solid var(--navy); border-radius: 99px; padding: 3px 11px; box-shadow: 0 3px 0 var(--navy); }
.head.ok .headHint { background: var(--mint); }
.head.bad .headHint { background: #ffc2d0; }
.fi { display: inline-block; width: 1.1em; height: 1.1em; flex: none; vertical-align: -0.18em; }
.fi svg { width: 100%; height: 100%; display: block; }

/* ---------- scena ---------- */
.head.pre { visibility: hidden; }
.stage { position: relative; z-index: 2; flex: none; display: flex; flex-direction: column; padding: 2px 10px 0; transition: opacity .2s; }
.stage.pre { opacity: .25; }
.stage.boss .cap { height: auto; padding-bottom: 8px; }
.cap { flex: none; height: 50px; display: flex; align-items: center; justify-content: center; text-align: center; padding: 2px 2px 6px; font: 800 20px/1.1 var(--body); color: #fff; text-shadow: 0 2px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy); }
.scene { flex: none; display: flex; align-items: center; justify-content: center; }
.sceneBox { position: relative; flex: none; width: 280px; height: 280px; border: 4px solid var(--navy); border-radius: 22px; overflow: hidden; background: #fff; box-shadow: 6px 6px 0 var(--pink), 0 14px 30px rgba(0, 0, 0, .35); }
.sceneBox > svg { display: block; width: 100%; height: 100%; }
.stage.won .sceneBox { animation: wonPulse .5s ease-out; box-shadow: 6px 6px 0 var(--mint), 0 14px 30px rgba(0, 0, 0, .35); }
.stage.lost .sceneBox { animation: lostJolt .45s ease-out; box-shadow: 6px 6px 0 var(--red), 0 14px 30px rgba(0, 0, 0, .35); }
@keyframes wonPulse { 0% { transform: scale(1); } 35% { transform: scale(1.04) rotate(-1deg); } 100% { transform: scale(1); } }
@keyframes lostJolt { 0% { transform: rotate(0); } 25% { transform: rotate(-3deg) scale(.97); } 60% { transform: rotate(2deg); } 100% { transform: rotate(0); } }

/* podpisy mikrogier (po angielsku) */
.capLine b { font-family: var(--display); font-weight: 400; color: var(--yellow); }
.capSay { font-size: 21px; }
.capSay b { font: 400 25px/1 var(--display); color: var(--yellow); letter-spacing: .03em; }
.tag { display: inline-block; font: 400 13px/1 var(--display); padding: 5px 9px; border-radius: 99px; border: 2.5px solid var(--navy); text-shadow: none; vertical-align: 3px; margin-left: 4px; }
.tag.long { background: var(--mint); color: var(--navy); letter-spacing: .12em; }
.tag.short { background: var(--cyan); color: var(--navy); }
.capQ { font-size: 23px; line-height: 1.05; }
.capQ b { font: 400 25px/1 var(--display); color: var(--yellow); }
.capQ.truth { animation: popIn .3s cubic-bezier(.3, 1.6, .5, 1); }
.capQ.truth.ok { color: var(--mint); }
.capQ.truth.bad { color: #ffc2d0; }
.chips { display: flex; gap: 6px; justify-content: center; flex-wrap: nowrap; }
.chip { font: 400 17px/1 var(--display); font-style: normal; padding: 8px 10px; border-radius: 12px; background: var(--ink); color: #8d83cf; border: 3px solid var(--navy); text-shadow: none; }
.chips.small .chip { font-size: 12px; padding: 7px 5px; border-width: 2.5px; }
.chip.on { background: var(--yellow); color: var(--navy); animation: popIn .3s cubic-bezier(.3, 1.8, .5, 1); }
.capGo { display: inline-flex; align-items: baseline; gap: 12px; font-family: var(--display); font-weight: 400; }
.capGo i { font-style: normal; color: #cbbcff; transition: color .15s; }
.capGo i:nth-child(1) { font-size: 16px; } .capGo i:nth-child(2) { font-size: 24px; } .capGo i:nth-child(3) { font-size: 34px; }
.capGo i.on { color: var(--yellow); animation: popIn .3s cubic-bezier(.3, 1.8, .5, 1); }
.capWait { font: 400 34px/1 var(--display); color: #ffc2d0; letter-spacing: .04em; }
.capWait.isGo { color: var(--mint); animation: popIn .25s cubic-bezier(.3, 2, .5, 1); font-size: 40px; }
@keyframes popIn { from { transform: scale(.3); } to { transform: scale(1); } }

/* ---------- konsola: miernik + lont ---------- */
.console { position: relative; z-index: 6; flex: none; margin-top: auto; padding: 8px 12px max(6px, env(safe-area-inset-bottom)); }
.meter { display: flex; align-items: center; gap: 8px; height: 30px; opacity: .55; transition: opacity .2s; }
.meter.live { opacity: 1; }
.mIco { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--yellow); border: 2.5px solid var(--yellow); display: flex; align-items: center; justify-content: center; }
.mIco svg { width: 17px; height: 17px; display: block; }
.meter.sound .mIco { background: var(--pink); color: #fff; border-color: #fff; }
.mTrack { position: relative; flex: 1; height: 16px; border-radius: 99px; border: 3px solid var(--navy); background: linear-gradient(90deg, #6d7bff 0, var(--cyan) 22%, var(--mint) 48%, var(--yellow) 72%, var(--pink) 100%); box-shadow: 0 3px 0 rgba(0, 0, 0, .25); }
.mFill { position: absolute; right: 0; top: 0; bottom: 0; width: 100%; background: var(--ink); border-radius: 0 99px 99px 0; }
.mTarget { position: absolute; z-index: 2; top: -7px; bottom: -7px; border: 3px dashed #fff; border-radius: 9px; background: rgba(255, 255, 255, .2); animation: targetPulse .7s ease-in-out infinite alternate; }
.meter.hit .mTarget { border-style: solid; border-color: var(--mint); background: rgba(62, 224, 154, .45); }
@keyframes targetPulse { from { opacity: .65; } to { opacity: 1; } }
.mBee { position: absolute; z-index: 3; left: 0; top: 50%; width: 36px; height: 30px; margin: -17px 0 0 -18px; transition: left .06s linear; filter: drop-shadow(0 2px 0 rgba(0, 0, 0, .3)); }
.mBee svg { width: 100%; height: 100%; display: block; overflow: visible; }
.meter.sound .mBee { animation: beeBuzz .12s linear infinite; }
@keyframes beeBuzz { 0%, 100% { transform: translateY(-1px) rotate(-4deg); } 50% { transform: translateY(1px) rotate(4deg); } }
.fuse { height: 40px; margin-top: 4px; }
.fuse svg { display: block; width: 100%; height: 100%; overflow: visible; }
.console.meterOnly .fuse { display: none; }
#fuseBoom { display: none; }
.fuse.hot #spark circle:first-child { fill: var(--red); }
.fuse.hot #fuseAmp { animation: ampShake .12s linear infinite; }
@keyframes ampShake { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(1.5px, -1px); } }
.fuse.blown #fuseAmp, .fuse.blown #spark, .fuse.blown #fusePath, .fuse.blown #fuseGhost { display: none; }
.fuse.blown #fuseBoom { display: block; }
.fuse.boom svg { animation: fuseBoom .5s ease-out; }
@keyframes fuseBoom { 0% { transform: scale(1.5); } 100% { transform: scale(1); } }
.fuse.safe #spark { display: none; }

/* ---------- polecenie ---------- */
.command { position: absolute; z-index: 20; left: 50%; top: 45%; width: 96%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; pointer-events: none; }
.cmdBurst {
  position: absolute; z-index: -1; left: 50%; top: 50%; width: 128%; max-width: 620px; padding-bottom: 128%; transform: translate(-50%, -50%) rotate(8deg);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 104 104'%3E%3Cpolygon transform='translate(3 3)' fill='%231d1e4f' points='50,0 60,32 92,18 74,44 100,50 74,56 92,82 60,68 50,100 40,68 8,82 26,56 0,50 26,44 8,18 40,32'/%3E%3Cpolygon fill='%23ff4f9a' points='50,0 60,32 92,18 74,44 100,50 74,56 92,82 60,68 50,100 40,68 8,82 26,56 0,50 26,44 8,18 40,32'/%3E%3C/svg%3E") center / 100% 100% no-repeat;
}
.cmdText { display: block; padding: 0 10px; font: 400 64px/.95 var(--display); font-size: clamp(46px, 16vw, 72px); color: #fff; text-shadow: 3px 3px 0 var(--navy), -3px -3px 0 var(--navy), 3px -3px 0 var(--navy), -3px 3px 0 var(--navy), 0 8px 0 var(--navy); }
.command.long .cmdText { font-size: 46px; font-size: clamp(38px, 12.5vw, 56px); }
.command.xlong .cmdText { font-size: 38px; font-size: clamp(32px, 10.5vw, 48px); }
.cmdHint { max-width: 92%; font: 800 18px/1.15 var(--body); color: var(--navy); background: #fff; border: 3px solid var(--navy); border-radius: 20px; padding: 6px 14px; box-shadow: 0 4px 0 var(--navy); }
.cmdHint em { display: block; margin-top: 3px; padding-top: 3px; border-top: 2px dashed rgba(29, 30, 79, .3); font-style: normal; color: var(--violet); }
.command.slam { animation: slam .45s cubic-bezier(.2, 1.4, .4, 1); }
.command.slam .cmdBurst { animation: burstSpin .6s ease-out; }
@keyframes slam { 0% { transform: translate(-50%, -50%) scale(3.2); opacity: 0; } 55% { transform: translate(-50%, -50%) scale(.92); opacity: 1; } 75% { transform: translate(-50%, -50%) scale(1.06); } 100% { transform: translate(-50%, -50%) scale(1); } }
@keyframes burstSpin { 0% { transform: translate(-50%, -50%) rotate(-40deg) scale(.4); } 100% { transform: translate(-50%, -50%) rotate(8deg) scale(1); } }
.command.settled { animation: settle .28s ease-in forwards; }
@keyframes settle { to { transform: translate(-50%, -170%) scale(.3); opacity: 0; } }

/* ---------- Mika między grami ---------- */
.interlude { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--hud) + env(safe-area-inset-top)); bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 9px; padding: 22px 16px max(14px, env(safe-area-inset-bottom)); }
.ilTop { display: flex; flex-direction: column; align-items: center; gap: 7px; }
.ilLabel { margin: 0; font: 400 34px/1 var(--display); color: #fff; letter-spacing: .03em; text-shadow: 3px 3px 0 var(--navy), 5px 5px 0 var(--pink); animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1) both; }
.ilLabel.boss { color: var(--yellow); animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1) both, tremble .18s .4s linear infinite; }
.ilLabel.over { color: var(--yellow); font-size: 38px; }
@keyframes tremble { 0%, 100% { transform: translateX(-3px) rotate(-1deg); } 50% { transform: translateX(3px) rotate(1deg); } }
.progress { display: flex; align-items: center; gap: 5px; padding: 7px 11px; background: var(--navy); border-radius: 99px; box-shadow: 0 4px 0 rgba(0, 0, 0, .22); }
.progress i { width: 11px; height: 11px; border-radius: 50%; background: #45418f; }
.progress i.ok { background: var(--mint); }
.progress i.bad { background: var(--pink); }
.progress i.just { animation: dotPop .45s cubic-bezier(.3, 1.8, .5, 1); }
.progress i.cur { background: var(--yellow); animation: dotCur .5s ease-in-out infinite alternate; }
.progress .boss { width: 22px; height: 22px; margin-left: 2px; color: #8d83cf; display: flex; }
.progress .boss svg { width: 100%; height: 100%; }
.progress .boss.cur { color: var(--yellow); animation: dotCur .3s ease-in-out infinite alternate; }
@keyframes dotPop { 0% { transform: scale(2.4); } 100% { transform: scale(1); } }
@keyframes dotCur { from { transform: scale(1.05); } to { transform: scale(1.45); } }
.ilBee { flex: 0 1 auto; height: 200px; height: clamp(110px, 29vh, 230px); min-height: 0; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .2)); }
.ilBee svg, .inBee svg, .idleBee svg { display: block; height: 100%; width: auto; margin: 0 auto; overflow: visible; }
.interlude.normal .ilBee { animation: hover 1.4s ease-in-out infinite; }
.interlude.win .ilBee { animation: dance .5s ease-in-out infinite; }
.interlude.lose .ilBee { animation: tremble .18s linear infinite; }
.interlude.over .ilBee { animation: sink 2.2s ease-in forwards; }
@keyframes hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-9px); } }
@keyframes dance { 0%, 100% { transform: rotate(-8deg) translateY(0); } 50% { transform: rotate(8deg) translateY(-14px); } }
@keyframes sink { to { transform: translateY(26px) rotate(-8deg) scale(.94); } }
.speech { position: relative; max-width: 94%; font: 800 19px/1.15 var(--body); color: var(--navy); background: #fff; border: 4px solid var(--navy); border-radius: 20px; padding: 9px 18px; text-align: center; box-shadow: 0 6px 0 var(--navy); animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.speech::before, .speech::after { content: ""; position: absolute; left: 50%; width: 0; height: 0; transform: translateX(-50%); border-style: solid; border-color: transparent; border-top-width: 0; }
.speech::before { top: -20px; border-width: 0 14px 20px; border-bottom-color: var(--navy); }
.speech::after { top: -12px; border-width: 0 9px 14px; border-bottom-color: #fff; }
.learn { display: flex; flex-direction: column; align-items: center; gap: 4px; max-width: 96%; padding: 8px 14px; background: var(--yellow); color: var(--navy); border: 4px solid var(--navy); border-radius: 16px; box-shadow: 5px 5px 0 var(--pink); transform: rotate(-1.5deg); animation: popIn .35s .1s cubic-bezier(.3, 1.6, .5, 1) both; }
.lw { display: block; text-align: center; line-height: 1.1; }
.lw b { font: 400 17px/1.1 var(--display); }
.lw i { font: 700 16px/1.1 var(--body); font-style: normal; }
.lw i::before { content: " = "; font-weight: 800; color: var(--violet); }
.tease { display: flex; align-items: center; gap: 8px; }
.tease small { font: 400 13px/1 var(--display); color: #e6dcff; letter-spacing: .08em; }
.tease b { width: 46px; height: 46px; border-radius: 50%; background: var(--navy); border: 3px solid var(--cyan); display: flex; align-items: center; justify-content: center; font-size: 24px; line-height: 1; animation: wobble .5s ease-in-out infinite alternate; }
@keyframes wobble { from { transform: rotate(-12deg) scale(.95); } to { transform: rotate(12deg) scale(1.08); } }

/* ---------- banery: SPEED UP!, poziom, boss ---------- */
.banner { position: absolute; z-index: 12; left: 0; right: 0; top: calc(var(--hud) + env(safe-area-inset-top)); bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; text-align: center; padding: 16px; overflow: hidden; }
.banner p { margin: 0; font: 800 19px/1.2 var(--body); text-shadow: 0 2px 0 var(--navy); }
.tags { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.tags b { display: inline-block; font: 400 17px/1 var(--display); padding: 10px 14px; border-radius: 12px; border: 3px solid var(--navy); box-shadow: 0 5px 0 rgba(0, 0, 0, .3); animation: popIn .4s 1.5s cubic-bezier(.3, 1.6, .5, 1) both; }
.tags b.y { background: var(--yellow); color: var(--navy); }
.tags b.p { background: var(--pink); color: #fff; animation-delay: 1.7s; }
.banner.speed { background: var(--navy); }
.banner.speed::before { content: ""; position: absolute; left: 50%; top: 45%; width: 260%; padding-bottom: 260%; margin: -130% 0 0 -130%; background: repeating-conic-gradient(#3b1a8c 0 10deg, #1d1e4f 10deg 20deg); animation: spin 2.6s cubic-bezier(.6, 0, 1, 1) forwards; }
.spLetters { position: relative; font: 400 72px/.95 var(--display); font-size: clamp(56px, 19vw, 92px); color: var(--yellow); text-shadow: 5px 5px 0 var(--pink), 8px 8px 0 #000; transform: rotate(-6deg); }
.spLetters span { display: inline-block; animation: letterDrop .4s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes letterDrop { from { transform: translateY(-120px) scale(1.6); opacity: 0; } }
.spBee { position: relative; height: 120px; height: clamp(84px, 18vh, 150px); animation: spinBee 1.1s cubic-bezier(.5, 0, .5, 1) infinite; }
.spBee svg { height: 100%; width: auto; display: block; overflow: visible; }
@keyframes spinBee { 0% { transform: rotate(0) scale(1); } 50% { transform: rotate(180deg) scale(1.15); } 100% { transform: rotate(360deg) scale(1); } }
.banner.speed .tags { position: relative; }
.banner.level { background: rgba(29, 30, 79, .78); }
.lvBig { font: 400 60px/1 var(--display); font-size: clamp(44px, 15vw, 72px); color: var(--yellow); text-shadow: 4px 4px 0 var(--pink), 7px 7px 0 var(--navy); transform: rotate(-4deg); animation: popIn .45s cubic-bezier(.3, 1.6, .5, 1); }
.banner.level .tags b { animation-delay: .7s; }
.banner.bossin { background: #3a0b2c; }
.biPulse { position: absolute; left: 0; top: 0; right: 0; bottom: 0; background: radial-gradient(circle at 50% 45%, rgba(255, 79, 154, .55), rgba(255, 79, 154, 0) 62%); animation: pulse .6s ease-in-out infinite alternate; }
@keyframes pulse { from { opacity: .35; } to { opacity: 1; } }
.biWarn { position: relative; font: 400 64px/1 var(--display); font-size: clamp(50px, 17vw, 80px); color: var(--yellow); text-shadow: 4px 4px 0 var(--red), 8px 8px 0 #000; animation: tremble .16s linear infinite; }
.biCond { position: relative; height: 220px; height: clamp(150px, 34vh, 280px); animation: rise 2.6s cubic-bezier(.2, .8, .3, 1) both; }
.biCond svg { height: 100%; width: auto; display: block; overflow: visible; }
@keyframes rise { 0% { transform: translateY(70%) scale(.7); filter: brightness(0); } 55% { filter: brightness(0); } 100% { transform: none; filter: none; } }
.biName { position: relative; font: 400 30px/1 var(--display); font-size: clamp(22px, 7.5vw, 34px); color: #fff; text-shadow: 3px 3px 0 var(--navy), 5px 5px 0 var(--pink); animation: popIn .4s 1.9s cubic-bezier(.3, 1.6, .5, 1) both; }
.banner.bossin p { position: relative; animation: popIn .4s 2.2s cubic-bezier(.3, 1.6, .5, 1) both; }

/* ---------- boss: Dyrygent ---------- */
.cue { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; text-shadow: none; }
.cueRow { display: flex; gap: 8px; }
.cueRow i { width: 18px; height: 18px; border-radius: 50%; background: #45418f; border: 3px solid var(--navy); }
.cueRow i.cur { background: var(--yellow); animation: dotCur .4s ease-in-out infinite alternate; }
.cueRow i.ok { background: var(--mint); }
.cueRow i.bad { background: var(--red); }
.cueCard { position: relative; width: 100%; max-width: 340px; min-height: 78px; padding: 8px 12px 14px 58px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; gap: 2px; background: var(--paper); color: var(--navy); border: 4px solid var(--navy); border-radius: 16px; box-shadow: 5px 5px 0 var(--pink); text-align: left; overflow: hidden; visibility: hidden; }
.cueCard.in { visibility: visible; animation: cardFlip .3s cubic-bezier(.3, 1.4, .5, 1); }
@keyframes cardFlip { from { transform: rotateX(90deg) scale(.9); } to { transform: none; } }
.cueSign { position: absolute; left: 8px; top: 50%; width: 42px; height: 42px; margin-top: -24px; border-radius: 50%; background: var(--violet); color: #fff; display: flex; align-items: center; justify-content: center; font: 400 20px/1 var(--display); font-style: italic; }
.cueCard b { font: 400 28px/1 var(--display); }
.cueCard em { display: inline-flex; align-items: center; gap: 4px; font: 800 14.5px/1.1 var(--body); font-style: normal; color: #4a4b86; }
.cueBar { position: absolute; left: 0; right: 0; bottom: 0; height: 8px; background: #d9d4f5; }
.cueBar i { display: block; height: 100%; width: 100%; background: var(--pink); }
.cueCard.ok { background: #d6ffe6; box-shadow: 5px 5px 0 var(--mint); }
.cueCard.bad { background: #ffd6dd; box-shadow: 5px 5px 0 var(--red); animation: lostJolt .4s ease-out; }
.cueCard.c-shout b { color: #e0115f; } .cueCard.c-whisper b { color: var(--violet); font-size: 23px; } .cueCard.c-freeze b { color: #0a8fb0; } .cueCard.c-sing b { color: #0f9a5b; }
.cueEnd { font: 400 44px/1 var(--display); color: var(--mint); text-shadow: 3px 3px 0 var(--navy), 6px 6px 0 rgba(0, 0, 0, .3); animation: popIn .4s cubic-bezier(.3, 1.8, .5, 1); min-height: 78px; display: flex; align-items: center; }
.cueEnd.bad { color: var(--red); }
.cond { position: absolute; left: 50%; bottom: 17%; width: 58%; margin-left: -29%; }
.cond svg { display: block; width: 100%; height: auto; overflow: visible; }
.cond .armR { transform-origin: 38px -14px; }
.cond.beat .armR { animation: baton .38s ease-in-out 2; }
@keyframes baton { 50% { transform: rotate(-24deg); } }
.cond.nod { animation: nod .3s ease-in-out 2; }
@keyframes nod { 50% { transform: translateY(6px) rotate(3deg); } }
.cond.rage { animation: tremble .12s linear 5; }
.cond.bow { animation: bow 1.2s ease-in-out; transform-origin: 50% 100%; }
@keyframes bow { 30%, 60% { transform: rotate(18deg) translateY(8px); } }
.singer { position: absolute; right: 3%; bottom: 1%; width: 27%; }
.singer svg { display: block; width: 100%; height: auto; overflow: visible; }

/* ---------- wstęp: kalibracja i „bez mikrofonu” ---------- */
.intro { position: absolute; z-index: 5; left: 0; right: 0; top: calc(var(--hud) + env(safe-area-inset-top)); bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; text-align: center; padding: 10px 20px 96px; }
.inBee { flex: 0 1 auto; height: 190px; height: clamp(110px, 28vh, 220px); min-height: 0; animation: hover 1.4s ease-in-out infinite; filter: drop-shadow(0 10px 0 rgba(0, 0, 0, .2)); }
.intro.ok .inBee { animation: dance .5s ease-in-out infinite; }
.inSay { margin: 0; font: 800 19px/1.1 var(--body); text-shadow: 0 2px 0 var(--navy); }
.inBig { display: block; font: 400 54px/1 var(--display); font-size: clamp(42px, 14vw, 64px); color: var(--yellow); text-shadow: 3px 3px 0 var(--navy), -3px -3px 0 var(--navy), 3px -3px 0 var(--navy), -3px 3px 0 var(--navy), 0 7px 0 var(--navy); animation: popIn .35s cubic-bezier(.3, 1.6, .5, 1); }
.inBig.en { color: #fff; font-size: 40px; font-size: clamp(34px, 11.5vw, 52px); background: var(--pink); border: 4px solid var(--navy); border-radius: 18px; padding: 10px 16px 8px; box-shadow: 6px 6px 0 var(--navy); transform: rotate(-3deg); text-shadow: 3px 3px 0 var(--navy); }
.inBig.small { font-size: 27px; font-size: clamp(23px, 7.4vw, 32px); line-height: 1.05; }
.inSub { margin: 0; max-width: 340px; font: 700 17px/1.25 var(--body); color: #f1eaff; text-shadow: 0 2px 0 rgba(29, 30, 79, .6); }
.intro.again .inSub { color: var(--yellow); font-weight: 800; }
.inBar { width: 180px; height: 12px; border-radius: 99px; background: var(--ink); border: 3px solid var(--navy); overflow: hidden; }
.inBar i { display: block; height: 100%; width: 0; background: var(--cyan); }
@keyframes inBar { from { width: 0; } to { width: 100%; } }
.inNote { margin: 2px 0 0; max-width: 340px; font: 700 14.5px/1.25 var(--body); color: var(--navy); background: var(--cyan); border: 3px solid var(--navy); border-radius: 14px; padding: 7px 12px; }
.inBtns { display: flex; flex-direction: column; align-items: center; gap: 9px; margin-top: 6px; width: 100%; }
.go { width: 100%; max-width: 340px; border: 4px solid var(--navy); border-radius: 999px; padding: 12px 16px; font: 400 20px/1.1 var(--display); color: var(--navy); background: linear-gradient(180deg, #ffe85a, var(--yellow) 55%, #f6b60b); box-shadow: 0 6px 0 var(--navy), 0 10px 24px rgba(0, 0, 0, .35); }
.go small, .link small { font: 800 13px/1 var(--body); display: block; margin-top: 3px; opacity: .8; }
.go:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--navy); }
.pill { border: 3px solid var(--navy); border-radius: 999px; background: #fff; color: var(--navy); padding: 9px 16px; font: 800 15.5px/1.1 var(--body); box-shadow: 0 4px 0 rgba(0, 0, 0, .35); }
.link { background: rgba(29, 30, 79, .55); border: 2px solid rgba(255, 255, 255, .5); border-radius: 16px; color: #fff; padding: 8px 14px; font: 800 14.5px/1.15 var(--body); min-height: 44px; }

/* ---------- ekran pod startem powłoki ---------- */
.idle { position: absolute; z-index: 4; left: 0; right: 0; top: 0; bottom: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 20px; text-align: center; }
.idleBee { height: 210px; height: clamp(130px, 32vh, 260px); animation: hover 1.6s ease-in-out infinite; }
.logo { margin: 0; font: 400 60px/.92 var(--display); font-size: clamp(52px, 17vw, 78px); color: var(--yellow); text-shadow: 4px 4px 0 var(--navy), 7px 7px 0 rgba(0, 0, 0, .35); transform: rotate(-4deg); }
.logo span { display: block; }
.logo .l2 { color: var(--pink); text-shadow: 4px 4px 0 #fff, 7px 7px 0 var(--navy); }
.idleNote { margin: 8px 0 0; font: 800 17px/1.2 var(--body); text-shadow: 0 2px 0 var(--navy); }

/* ---------- efekty ---------- */
.fx { position: absolute; z-index: 30; left: 0; top: 0; right: 0; bottom: 0; pointer-events: none; overflow: hidden; }
.flash { position: absolute; left: 0; top: 0; right: 0; bottom: 0; opacity: 0; animation: flash .26s ease-out; }
@keyframes flash { from { opacity: .7; } to { opacity: 0; } }
.conf { position: absolute; width: 10px; height: 14px; border-radius: 2px; opacity: 0; }
.ripple { position: absolute; width: 90px; height: 90px; margin: -45px 0 0 -45px; border-radius: 50%; border: 5px solid #fff; animation: ripple .45s ease-out forwards; }
@keyframes ripple { from { transform: scale(.2); opacity: .9; } to { transform: scale(1.2); opacity: 0; } }

/* ---------- pszczoły i Dyrygent (SVG) ---------- */
.bee .wing, .mini .mw { transform-box: fill-box; transform-origin: 80% 90%; animation: flap .11s ease-in-out infinite alternate; }
.bee .wr { transform-origin: 20% 90%; }
@keyframes flap { from { transform: rotate(-7deg); } to { transform: rotate(9deg); } }
.bee .twinkle { transform-box: fill-box; transform-origin: center; animation: twinkle .5s ease-in-out infinite alternate; }
.bee .twinkle.t2 { animation-delay: .25s; }
@keyframes twinkle { from { transform: scale(.5) rotate(-20deg); } to { transform: scale(1.15) rotate(20deg); } }
.bee .dizzy { transform-box: fill-box; transform-origin: 50% 200%; animation: dizzy 1s linear infinite; }
@keyframes dizzy { from { transform: rotate(-14deg); } 50% { transform: rotate(14deg); } to { transform: rotate(-14deg); } }
.bee .rings path { animation: ringPulse .5s ease-in-out infinite alternate; }
.bee .rings path:nth-child(2n) { animation-delay: .2s; }
@keyframes ringPulse { from { opacity: .2; } to { opacity: 1; } }
.bee .sweat { transform-box: fill-box; animation: drip .8s ease-in infinite; }
@keyframes drip { from { transform: translateY(-6px); opacity: 1; } to { transform: translateY(16px); opacity: 0; } }
.cond .steam, .biCond .steam { animation: ringPulse .25s linear infinite alternate; }

/* ---------- scenki ---------- */
.pow { display: none; }
.pow.on { display: block; }
.pow.on .powIn { transform-box: fill-box; transform-origin: center; animation: powIn .4s cubic-bezier(.2, 1.7, .4, 1) both; }
@keyframes powIn { from { transform: scale(.1) rotate(-30deg); opacity: 0; } to { transform: scale(1) rotate(0); opacity: 1; } }
.tw0, .tw1, .tw2 { animation: ringPulse 1.1s ease-in-out infinite alternate; }
.tw1 { animation-delay: .4s; } .tw2 { animation-delay: .8s; }
/* WHISPER */
#whHead .whStir, #whHead .whOpen { display: none; }
#whHead.stir .whClosed { display: none; } #whHead.stir .whStir { display: block; }
#whHead.awake .whClosed, #whHead.awake .whStir { display: none; } #whHead.awake .whOpen { display: block; }
#whZzz text { animation: zzz 1.6s ease-in-out infinite; }
#whZzz text:nth-child(2) { animation-delay: .3s; } #whZzz text:nth-child(3) { animation-delay: .6s; }
@keyframes zzz { 0%, 100% { opacity: .25; transform: translateY(4px); } 50% { opacity: 1; transform: translateY(-4px); } }
#whBee.go .mini { animation: tiptoe .22s ease-in-out infinite alternate; }
@keyframes tiptoe { from { transform: translateY(0) rotate(-4deg); } to { transform: translateY(-4px) rotate(4deg); } }
/* FREEZE */
.frBrowA { display: none; }
#frOwl.angry .frBrowA { display: block; } #frOwl.angry .frBrowN { display: none; }
.frPupils { animation: scan 1.6s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-6px); } to { transform: translateX(6px); } }
#frOwl.angry .frPupils { animation: none; transform: translate(-7px, 3px); }
#frOwl.happy .frPupils { animation: none; }
#frTempt.on { animation: temptIn .3s cubic-bezier(.3, 1.6, .5, 1), temptWiggle .4s .3s ease-in-out infinite alternate; }
@keyframes temptIn { from { transform: translateX(-80px); } to { transform: none; } }
@keyframes temptWiggle { from { transform: translateY(0); } to { transform: translateY(-4px); } }
/* BLOW */
.blFlame { animation: flicker .16s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: 50% 100%; }
@keyframes flicker { from { opacity: .92; } to { opacity: 1; } }
.blFlIn { transition: transform .08s linear; }
.blSmoke.on { animation: smoke .9s ease-out forwards; }
@keyframes smoke { 0% { opacity: .9; transform: translateY(0); } 100% { opacity: 0; transform: translateY(-26px); } }
.sc-blow.burn .blFlIn { animation: burn .5s ease-out forwards; }
@keyframes burn { to { transform: scale(2.3, 2.6); } }
/* YES OR NO? */
#ynYes.lit .ynGlass { fill: var(--mint); } #ynNo.lit .ynGlass { fill: var(--red); }
.ynLamp.lit { animation: lampPop .35s cubic-bezier(.3, 1.8, .5, 1); transform-box: fill-box; transform-origin: center; }
.ynLamp.lit text { fill: var(--navy); }
#ynNo.lit text { fill: #fff; }
@keyframes lampPop { from { opacity: .4; } to { opacity: 1; } }
/* LOUDER! */
.loLamp circle { transition: fill .1s; }
.loLamp.on circle { fill: var(--mint); stroke: #fff; }
/* FASTER! */
#fsFace .fsAwake { display: none; }
#fsFace.awake .fsAwake { display: block; } #fsFace.awake .fsSleep { display: none; }
#fsZzz text { animation: zzz 1.6s ease-in-out infinite; }
/* WAIT… GO! */
#wgGlow circle { animation: ringPulse .3s ease-in-out infinite alternate; }

/* japoński: Bungee nie ma tych znaków — zastępczy font jest cienki, więc pogrubiamy i zdejmujemy gruby kontur */
:lang(ja) .inBig.small, :lang(ja) .ilLabel, :lang(ja) .biName, :lang(ja) .lvBig, :lang(ja) .tags b, :lang(ja) .cueEnd, :lang(ja) .go, :lang(ja) .tease small { font-family: var(--body); font-weight: 800; }
:lang(ja) .inBig.small { text-shadow: 0 3px 0 var(--navy), 2px 0 0 var(--navy), -2px 0 0 var(--navy), 0 -2px 0 var(--navy); }
@media (min-height: 760px) {
  .head { min-height: 74px; gap: 5px; }
  .headCmd { font-size: 33px; } .head.long .headCmd { font-size: 26px; } .head.xlong .headCmd { font-size: 21px; }
  .headHint { font-size: 16px; padding: 4px 13px; }
  .cap { height: 60px; font-size: 23px; }
  .capSay { font-size: 24px; } .capSay b, .capQ b { font-size: 29px; } .capQ { font-size: 26px; }
  .chip { font-size: 19px; } .chips.small .chip { font-size: 13.5px; }
  .console { padding-top: 12px; }
  .meter { height: 36px; } .mTrack { height: 19px; } .mBee { width: 42px; height: 35px; margin: -20px 0 0 -21px; }
  .fuse { height: 46px; margin-top: 6px; }
}
@media (max-height: 620px) {
  .head { min-height: 50px; padding-top: 2px; }
  .headCmd { font-size: 23px; } .head.long .headCmd { font-size: 19px; } .head.xlong .headCmd { font-size: 16px; }
  .headHint { font-size: 13.5px; }
  .cap { height: 42px; font-size: 18px; padding-bottom: 4px; }
  .capSay { font-size: 19px; } .capSay b, .capQ b { font-size: 22px; } .capQ { font-size: 20px; }
  .fuse { height: 34px; margin-top: 2px; }
  .console { padding-top: 6px; }
  .interlude { gap: 7px; padding-top: 16px; }
  .ilLabel { font-size: 28px; }
  .speech { font-size: 17px; padding: 7px 14px; }
  .lw b { font-size: 15.5px; } .lw i { font-size: 15px; }
  .tease b { width: 40px; height: 40px; font-size: 21px; }
  .cueCard { min-height: 68px; } .cueCard b { font-size: 24px; } .cueEnd { min-height: 68px; font-size: 38px; }
  .intro { padding-bottom: 84px; gap: 6px; }
  .inSub { font-size: 15.5px; } .inNote { font-size: 13.5px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}
