/* Bubble Wrap v3 — preserve main PopeX UI, adapt ONLY the honeycomb cells
   and drag interaction to the original animated Bloopkins. */
body.bw-prototype #gameStage #board>.cell.bw-bubble{
  box-sizing:border-box!important;
  transform:none;
  transform-origin:50% 50%;
  overflow:visible!important;
}
/* Occupied bubble centred inside its membrane.  Empty dome stays in place. */
body.bw-prototype #gameStage>#sheet>#board>.cell.bw-bubble.filled::before,
body.bw-prototype #gameStage>#sheet>#board>.cell.bw-bubble.filled::after{
  border-radius:50%!important;
  margin:0!important;
  transform-origin:center!important;
}
body.bw-prototype #gameStage>#sheet>#board>.cell.bw-bubble.filled::before{
  inset:3.5%!important;
}
body.bw-prototype #gameStage #board>.cell.bw-bubble.filled .face{
  left:50%!important;
  z-index:8!important;
  pointer-events:none;
}
/* The dragged shape has precisely board-sized, fully formed characters;
   one unified live shape follows the finger from Next Shapes to board. */
body.bw-prototype #bwGhost{
  position:fixed!important;inset:0!important;z-index:1900!important;
  pointer-events:none!important;overflow:visible!important;
  filter:none!important;contain:layout style;
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble{
  display:block;position:fixed;box-sizing:border-box;border-radius:50%;
  --bubble-light:color-mix(in srgb,var(--tile) 35%,white);
  background:radial-gradient(circle at 25% 19%,#fff 0 7%,var(--bubble-light) 26%,var(--tile) 64%,color-mix(in srgb,var(--tile) 65%,#222c50) 100%);
  border:1px solid rgba(249,253,255,.68);
  box-shadow:inset 1px 3px 6px rgba(255,255,255,.55),inset -2px -5px 8px rgba(8,18,49,.24),0 6px 12px rgba(2,9,33,.24);
  transition:none!important;
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble::before{
  content:'';position:absolute;inset:4%;pointer-events:none;border-radius:50%;
  background:radial-gradient(ellipse at 22% 16%,rgba(255,255,255,.75),transparent 29%);
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .face{
  position:absolute;top:31%;left:50%;transform:translate(-50%,-50%);
  display:flex;gap:2px;z-index:2;pointer-events:none;
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .eye{
  display:block;position:relative;background:linear-gradient(130deg,#fff,#e4ecf7);
  border:1px solid #d4dbe8;border-radius:50%;width:9px;height:12px;
  box-shadow:0 1px 2px #141e3e77;
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .eye:first-child{transform:rotate(-9deg) scale(.86)}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .eye:last-child{transform:rotate(9deg)}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .pupil{
  display:block;position:absolute;left:37%;top:43%;width:40%;height:40%;
  background:radial-gradient(circle at 25% 25%,#565769,#15172a 67%);border-radius:50%;
}
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .lid,
body.bw-prototype #bwGhost>.bw-v3-drag-bubble .mute-mouth{display:none}
body.bw-prototype #bwGhost.bw-v3-blocked>.bw-v3-drag-bubble{opacity:.72;filter:saturate(.7)}
/* Original anticipatory eyes, rebound and membrane-shatter, not a whole
   button shrinking into a black dot as in the v2 prototype. */
body.bw-prototype #gameStage #board>.cell.bw-bubble.line-primed:not(.pop-now)::before{
  filter:brightness(1.12);
}
body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now{
  animation:none!important;opacity:1!important;
}
body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now::before,
body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now::after{
  animation:pw146MembranePop .31s cubic-bezier(.2,.64,.22,1) both!important;
}
body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now .face{
  animation:pw146FaceRelease .31s cubic-bezier(.2,.64,.22,1) both!important;
}
@keyframes pw146MembranePop{
  0%{opacity:1;transform:scale(.98)}
  28%{opacity:1;transform:scale(1.06)}
  54%{opacity:.95;transform:scale(1.18)}
  70%{opacity:0;transform:scale(1.3)}
  100%{opacity:0;transform:scale(1.3)}
}
body.bw-prototype #gameStage #board>.cell.bw-bubble.dome-return:not(.filled)::before{
  animation:pw146DomeBack .34s cubic-bezier(.16,.6,.25,1) both!important;
}
@keyframes pw146DomeBack{0%{opacity:.12;transform:scale(.76)}60%{opacity:1;transform:scale(1.04)}100%{opacity:1;transform:scale(1)}}
/* Force sneaking sprite to exactly the original transparent, colorful spirit.
   V2 mistakenly cloned the EMPTY/filled button and painted it black. */
body.bw-prototype #gameStage .sneak-ghost{
  background:
    radial-gradient(circle at 22% 17%,rgba(255,255,255,.60),transparent 26%),
    radial-gradient(circle at 50% 52%,color-mix(in srgb,var(--sneak-color) 55%,transparent),color-mix(in srgb,var(--sneak-color) 31%,transparent) 72%,rgba(242,249,255,.10) 96%)!important;
  border:1px solid rgba(242,250,255,.59)!important;
  box-shadow:inset 1px 2px 4px rgba(255,255,255,.38),inset -2px -4px 7px rgba(45,65,83,.13),0 5px 8px rgba(15,22,34,.12)!important;
}
body.bw-prototype #gameStage #board>.cell.filled.sneak-source::before{opacity:.28!important}
body.bw-prototype #gameStage #board>.cell.filled.sneak-source .face{visibility:hidden!important}
@media(prefers-reduced-motion:reduce){
  body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now::before,
  body.bw-prototype #gameStage #board>.cell.bw-bubble.pop-now::after{animation-duration:.11s!important}
}
