/* Popex v115 — final requested alignment and bubble-finish pass. */
@media (orientation:portrait){
  /* Gentle wobble for the live score values. */
  #score, #best{
    display:inline-block;
    transform-origin:50% 75%;
    animation:pw115ScoreWobble 4.6s ease-in-out infinite;
    will-change:transform;
  }
  #best{animation-delay:-2.1s}
  @keyframes pw115ScoreWobble{
    0%,100%{transform:translateY(0) rotate(0deg) scale(1)}
    12%{transform:translateY(-0.5px) rotate(-0.7deg) scale(1.008)}
    28%{transform:translateY(0.3px) rotate(0.45deg) scale(0.998)}
    46%{transform:translateY(-0.6px) rotate(0.85deg) scale(1.01)}
    68%{transform:translateY(0.2px) rotate(-0.4deg) scale(0.998)}
    84%{transform:translateY(-0.25px) rotate(0.22deg) scale(1.004)}
  }

  /* Live POP TIME bubble lifted into the free band between header/stats and the board. */
  #gameStage>.stats .pop-time-hud{
    top:-46px!important;
    width:126px!important;
    height:126px!important;
    margin-left:-63px!important;
    z-index:620!important;
  }
  #gameStage .pop-time-clock,
  .moonlit-app .pop-time-clock{
    width:126px!important;
    height:126px!important;
    border-radius:50%!important;
    background:
      radial-gradient(circle at 22% 16%, rgba(255,255,255,.32) 0 6%, transparent 17%),
      radial-gradient(circle at 30% 24%, rgba(255,255,255,.18), transparent 30%),
      linear-gradient(180deg, rgba(171,184,236,.33) 0%, rgba(128,145,214,.27) 49%, rgba(91,107,182,.23) 100%)!important;
    border:1.4px solid rgba(232,239,255,.56)!important;
    box-shadow:inset 0 2px 10px rgba(255,255,255,.16), inset 0 -8px 18px rgba(21,35,84,.14), 0 9px 26px rgba(8,14,34,.08)!important;
    backdrop-filter:blur(10px) saturate(120%);
    -webkit-backdrop-filter:blur(10px) saturate(120%);
  }
  #gameStage .pop-time-clock small{
    font-size:11px!important;letter-spacing:1.35px!important;margin-top:11px!important;
  }
  #gameStage .pop-time-clock strong{
    font-size:56px!important;line-height:.88!important;margin:3px 0 1px!important;
  }
  #gameStage .pop-time-clock span{
    font-size:10px!important;letter-spacing:.55px!important;margin-bottom:10px!important;
  }

  /* Board bubbles: remove the center glow, keep only a top highlight and smooth body shading. */
  #gameStage #board>.cell.filled:not(.pop-now)::before,
  body.wrap-texture #gameStage #board>.cell.filled:not(.pop-now)::before{
    background:
      radial-gradient(circle at 18% 15%, rgba(255,255,255,.96) 0 2.2%, rgba(255,255,255,.56) 3%, rgba(255,255,255,0) 8.8%),
      radial-gradient(ellipse at 24% 20%, rgba(255,255,255,.26) 0 8%, rgba(255,255,255,0) 15%),
      linear-gradient(180deg,
        color-mix(in srgb,var(--tile) 46%,white) 0%,
        color-mix(in srgb,var(--tile) 82%,white) 18%,
        var(--tile) 58%,
        color-mix(in srgb,var(--tile) 76%,#51677a) 100%) !important;
    border-color:rgba(255,255,255,.70)!important;
    box-shadow:inset 0 5px 8px rgba(255,255,255,.38), inset 0 -9px 14px rgba(0,0,0,.18), 0 3px 5px rgba(0,0,0,.14)!important;
  }
  #gameStage #board>.cell.filled:not(.pop-now)::after,
  body.wrap-texture #gameStage #board>.cell.filled:not(.pop-now)::after{
    inset:10%!important;
    background:
      radial-gradient(circle at 14% 18%, rgba(255,255,255,.14), rgba(255,255,255,0) 18%),
      linear-gradient(125deg, rgba(255,255,255,.10), rgba(255,255,255,0) 42%, rgba(255,255,255,.05) 100%)!important;
    opacity:.58!important;
  }
}
@media (orientation:portrait) and (max-height:740px){
  #gameStage>.stats .pop-time-hud{top:-38px!important;width:116px!important;height:116px!important;margin-left:-58px!important}
  #gameStage .pop-time-clock,.moonlit-app .pop-time-clock{width:116px!important;height:116px!important}
  #gameStage .pop-time-clock strong{font-size:51px!important}
  #gameStage .pop-time-clock small{font-size:10px!important;margin-top:10px!important}
  #gameStage .pop-time-clock span{font-size:9px!important;margin-bottom:9px!important}
}
@media (orientation:portrait) and (max-height:620px){
  #gameStage>.stats .pop-time-hud{top:-24px!important;width:96px!important;height:96px!important;margin-left:-48px!important}
  #gameStage .pop-time-clock,.moonlit-app .pop-time-clock{width:96px!important;height:96px!important}
  #gameStage .pop-time-clock strong{font-size:42px!important}
  #gameStage .pop-time-clock small{font-size:8px!important;margin-top:7px!important}
  #gameStage .pop-time-clock span{font-size:8px!important;margin-bottom:7px!important}
}
@media(prefers-reduced-motion:reduce){
  #score,#best{animation:none!important}
}
