/* DGN Reels fullscreen mobile alignment fix.
   Keep the game stack anchored under the top bar instead of vertically centering
   it and creating a large dead band above the reels. */

@media (max-width:760px) {
  body.slots-game-mode .rw-machine.slots-fullscreen {
    justify-content:flex-start !important;
  }

  body.slots-game-mode .rl-gamebar {
    margin-bottom:.35rem !important;
  }

  body.slots-game-mode .rl {
    flex:1 1 auto !important;
    min-height:0 !important;
    justify-content:flex-start !important;
    align-content:start !important;
    gap:.3rem !important;
    overflow-x:hidden !important;
    overflow-y:auto !important;
    padding:0 !important;
    scroll-padding-bottom:calc(env(safe-area-inset-bottom,0px) + .5rem);
  }

  body.slots-game-mode .rl-stage {
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
    gap:.24rem !important;
  }

  body.slots-game-mode .rl-board {
    margin:0 !important;
  }

  body.slots-game-mode .rw-win {
    margin:0 !important;
  }

  body.slots-game-mode .rl-rail {
    flex:0 0 auto !important;
    width:100% !important;
    margin:0 !important;
    padding-bottom:calc(env(safe-area-inset-bottom,0px) + .35rem) !important;
  }

  /* Keep blur only while the reel is genuinely travelling. Once a symbol is
     stopped it must render at full sharpness on high-DPI Android/iOS screens. */
  .rw-strip:not(.rolling):not(.settle) img,
  .rw-strip:not(.rolling):not(.settle) .g {
    filter:drop-shadow(0 2px 6px rgba(0,0,0,.55)) !important;
    transform:none !important;
  }

  .rw-cell img {
    image-rendering:auto;
    -webkit-font-smoothing:antialiased;
  }
}

/* Some phones expose the OS "reduce/remove animations" preference. In that
   mode the normal settle-focus animation is suppressed, so explicitly clear
   the residual .35px settle blur instead of leaving the final symbols soft. */
@media (max-width:760px) and (prefers-reduced-motion:reduce) {
  .rw-strip.settle img,
  .rw-strip.settle .g {
    animation:none !important;
    filter:drop-shadow(0 2px 6px rgba(0,0,0,.55)) !important;
    transform:none !important;
  }
}

/* Short portrait devices still get every control; scroll only when the physical
   viewport cannot contain the full cabinet. */
@media (max-width:760px) and (max-height:760px) and (orientation:portrait) {
  body.slots-game-mode .rl-gamebar { min-height:2.35rem !important; }
  body.slots-game-mode .rl-go { min-height:2.85rem !important; }
  body.slots-game-mode .rl-mode { min-height:2.5rem !important; }
  body.slots-game-mode .rl-tools button { min-height:2rem !important; }
}

/* Anticipation glow must not expose the synthetic rolling strip outside its
   three-symbol reel window. The glow itself is a box-shadow, so clipping the
   strip does not remove the effect. */
.rw-reel.scatter-tease { overflow:hidden !important; }
