/* 4 Princes — Bubblast (4p-bubblast-v1). The page frame, the dialogs and the end screen come from crown-peaks.css
   (body.cp); this file adds the bubble field: a portrait board drawn on one canvas (bubblast.js), the bottom line (red,
   pulsing gently, when bubbles come within 2 rows of it), the swap button over the next bubble, the coins that fly to
   the score, the "Sound on / Sound off" question (as in Blastile) and the "How to play" pictures. Nothing that only
   decorates takes the pointer. */
body.bb .fp-area{display:flex;align-items:center;justify-content:center}
.bfield{position:relative;margin:0 auto;border-radius:18px;touch-action:none;-webkit-touch-callout:none;outline:none;cursor:crosshair;
  background:radial-gradient(130% 80% at 50% 0%,#283a63 0%,#1b2846 52%,#121a2f 100%);border:1px solid rgba(226,176,74,.28);
  box-shadow:inset 0 2px 24px rgba(0,0,0,.5),0 18px 40px rgba(0,0,0,.3);isolation:isolate}
.bfield::before{content:"";position:absolute;inset:5px;border-radius:14px;border:1px solid rgba(226,176,74,.12);pointer-events:none}
.bfield:focus-visible{box-shadow:0 0 0 3px #fff,inset 0 2px 24px rgba(0,0,0,.5)}
.bfield canvas{position:absolute;left:0;top:0;display:block;border-radius:18px;pointer-events:none}
/* the bottom line: a bubble below it ends the game */
.bline{position:absolute;left:8px;right:8px;height:0;border-top:2px dashed rgba(243,213,142,.32);pointer-events:none;z-index:2;transition:border-color .4s}
.bline.warn{border-top-color:#ff5d5d;box-shadow:0 0 12px 2px rgba(255,80,80,.55);animation:bbWarn 1.4s ease-in-out infinite}
@keyframes bbWarn{0%,100%{box-shadow:0 0 6px 1px rgba(255,80,80,.35);opacity:.75}50%{box-shadow:0 0 18px 4px rgba(255,80,80,.75);opacity:1}}
/* the next bubble (tap it to swap); the bubble itself is drawn on the canvas */
.bnext{position:absolute;z-index:3;border-radius:50%;border:2px dashed rgba(243,213,142,.45);background:transparent;cursor:pointer;padding:0}
.bnext:hover{border-color:rgba(243,213,142,.85)}
.bnext:focus-visible{outline:3px solid #fff;outline-offset:2px}
.bnext:disabled{cursor:default;opacity:.6}
.bfield .float{z-index:7}
.bfx-glow,.bfx-badge{z-index:5}
.controls .info .pips{display:inline-flex;gap:4px;margin-left:8px;vertical-align:1px}
.controls .info .pips i{width:8px;height:8px;border-radius:50%;background:rgba(255,255,255,.18)}
.controls .info .pips i.on{background:#ff8a7a;box-shadow:0 0 6px rgba(255,120,100,.6)}
/* dropped bubbles become gold coins that fly to the score */
.bb-coin{position:fixed;z-index:880;width:18px;height:18px;margin:-9px 0 0 -9px;border-radius:50%;pointer-events:none;
  background:radial-gradient(circle at 35% 30%,#FFF3C4 0 18%,#F6D069 40%,#D49A28 75%,#8A5A0E 100%);box-shadow:0 0 10px rgba(255,214,120,.8),inset 0 0 0 2px rgba(255,241,201,.6)}
.bb-coin.go{transition:transform .52s cubic-bezier(.45,-.25,.6,1),opacity .52s;opacity:.85}
/* Sound on / Sound off (the same question as Blastile) */
.sndask{position:fixed;inset:0;z-index:1200;background:rgba(10,13,20,.58);animation:bbSndIn .18s ease-out}
.sndask.out{animation:bbSndOut .15s ease-in forwards;pointer-events:none}
.sndask .sndbox{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%);display:flex;gap:16px}
.sndbtn{width:132px;height:120px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:10px;font:inherit;font-size:17px;font-weight:700;
  border-radius:22px;cursor:pointer;color:var(--text);background:linear-gradient(160deg,var(--panel),#2B3446);border:1px solid rgba(255,255,255,.12);box-shadow:0 14px 34px rgba(0,0,0,.4)}
.sndbtn.on{color:#1b2130;background:var(--gold);border-color:var(--gold)}
.sndbtn svg{width:46px;height:46px}
.sndbtn:focus-visible{outline:3px solid var(--gold-soft);outline-offset:3px}
@keyframes bbSndIn{from{opacity:0}}
@keyframes bbSndOut{to{opacity:0}}
/* How to play */
.howto .bbht{width:100%;height:100%;display:block}
.bbht-shot{animation:bbHtShot 2.6s ease-in-out infinite}
@keyframes bbHtShot{0%,15%{transform:none}55%{transform:translate(-55px,-48px)}80%,100%{transform:translate(-20px,-74px);opacity:0}}
.bbht-pop{transform-origin:103px 51px;animation:bbHtPop 2.2s ease-in-out infinite}
@keyframes bbHtPop{0%,40%{transform:none;opacity:1}60%{transform:scale(1.5);opacity:0}100%{opacity:0}}
@media (prefers-reduced-motion:reduce){
  .bline.warn{animation:none;box-shadow:0 0 12px 2px rgba(255,80,80,.6)}
  .sndask,.sndask.out,.bbht-shot,.bbht-pop{animation:none}
  .bb-coin{display:none}
}
html.fp-fit body.bb .hint{display:none}
html.fp-fit body.bb .controls{min-height:0}
/* 4p-bubblast-fx-v2: the glow along the floor when a cluster of 6+ lands, the board's short shake (10+) */
.bb-fwave{position:absolute;left:0;right:0;height:6px;margin-top:-3px;pointer-events:none;z-index:6;border-radius:3px;
  background:radial-gradient(closest-side,rgba(255,236,170,.95),rgba(243,213,142,.55) 45%,rgba(243,213,142,0));background-size:46% 100%;background-repeat:no-repeat;
  background-position:var(--x,50%) 0;animation:bbFwave .7s ease-out forwards}
.bb-fwave.big{height:9px;margin-top:-4px}
@keyframes bbFwave{0%{opacity:0;background-size:10% 100%}15%{opacity:1}100%{opacity:0;background-size:220% 100%}}
.bb-shake{animation:bbShake .2s linear}
@keyframes bbShake{0%,100%{transform:translate(0,0)}25%{transform:translate(-3px,2px)}50%{transform:translate(3px,-2px)}75%{transform:translate(-2px,1px)}}
@media (prefers-reduced-motion:reduce){.bb-fwave,.bb-shake{animation:none;display:none}}
