/* V1.27.81 — Roleta e Caixinha fixas, sem rolagem durante a utilização.
   O overlay e a página ao fundo não se movem; o conteúdo se adapta à altura disponível. */

/* Fluxos principais de bônus: nenhum scroll/overscroll. */
#wheelPlayModal.open,
#giftBoxModal.open{
  position:fixed!important;
  inset:0!important;
  width:100vw!important;
  height:100dvh!important;
  max-height:100dvh!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  touch-action:none!important;
  -webkit-overflow-scrolling:auto!important;
  align-items:center!important;
  justify-content:center!important;
  box-sizing:border-box!important;
}

#wheelPlayModal.open>.wheel-play-modal-card,
#giftBoxModal.open>.gift-box-modal-card{
  width:min(430px,100%)!important;
  max-width:430px!important;
  min-height:0!important;
  height:auto!important;
  max-height:100%!important;
  margin:0 auto!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  touch-action:none!important;
  box-sizing:border-box!important;
}

/* Controles continuam respondendo ao toque, mas sem gesto de rolagem. */
#wheelPlayModal.open button,
#giftBoxModal.open button,
#wheelPlayModal.open .wheel-center-button,
#giftBoxModal.open .gift-box-choice{
  touch-action:manipulation!important;
}

/* A roda diminui pela altura disponível em aparelhos baixos em vez de criar scroll. */
#wheelPlayModal.open{
  --wheel-fixed-size:clamp(190px,min(84vw,calc(100dvh - 190px)),330px);
}
#wheelPlayModal.open #wheelPlaySurface{
  min-height:0!important;
  max-height:var(--wheel-fixed-size)!important;
  overflow:visible!important;
}
#wheelPlayModal.open #wheelPlaySurface>.wheel-stage{
  width:var(--wheel-fixed-size)!important;
  height:var(--wheel-fixed-size)!important;
  min-height:0!important;
  max-height:var(--wheel-fixed-size)!important;
  flex:0 0 var(--wheel-fixed-size)!important;
  overflow:visible!important;
}
#wheelPlayModal.open .wheel-disc{
  width:var(--wheel-fixed-size)!important;
  height:var(--wheel-fixed-size)!important;
  max-width:var(--wheel-fixed-size)!important;
  max-height:var(--wheel-fixed-size)!important;
}

/* Caixinha: remove a regra antiga que aumentava o card além da viewport. */
#giftBoxModal.open>.gift-box-modal-card{
  max-width:430px!important;
  justify-content:center!important;
}
#giftBoxModal.open #giftBoxChoices{
  overflow:visible!important;
  overscroll-behavior:none!important;
  touch-action:none!important;
}

/* Em telas baixas, compacta só o necessário para tudo permanecer fixo e acessível. */
@media(max-height:620px){
  #wheelPlayModal.open,
  #giftBoxModal.open{
    padding-top:max(8px,env(safe-area-inset-top,0px))!important;
    padding-bottom:max(8px,env(safe-area-inset-bottom,0px))!important;
  }
  #wheelPlayModal.open .wheel-play-modal-head,
  #giftBoxModal.open .gift-box-modal-head{margin-bottom:7px!important}
  #wheelPlayModal.open .wheel-play-balance-line{margin-top:12px!important}
  #wheelPlayModal.open .gift-box-open-all-btn,
  #giftBoxModal.open .gift-box-open-all-btn{margin-top:8px!important;min-height:42px!important}
  #giftBoxModal.open #giftBoxChoices{margin-top:5px!important;margin-bottom:4px!important}
  #giftBoxModal.open #giftBoxOpeningText{margin-bottom:4px!important}
}

@media(max-height:500px){
  #wheelPlayModal.open{--wheel-fixed-size:clamp(170px,min(78vw,calc(100dvh - 170px)),260px)}
  #wheelPlayModal.open #wheelPlayModalTitle,
  #giftBoxModal.open #giftBoxModalTitle{font-size:1.42rem!important}
  #giftBoxModal.open #giftBoxChoices>.gift-box-choice>.gift-box-icon,
  #giftBoxModal.open #giftBoxChoices>.gift-box-choice>span.gift-box-icon{font-size:clamp(4rem,20vw,5.4rem)!important}
  #giftBoxModal.open .gift-box-open-all-btn,
  #wheelPlayModal.open .gift-box-open-all-btn{min-height:38px!important;padding-block:8px!important}
}
