.app-wrapper {
  height: 100dvh;
}

.app-wrapper .page-container[style*="top: 47px"] {
  height: calc(100% - 47px) !important;
}

.search-page,
.lottery-hall,
.lottery-page-cyber {
  height: 100dvh;
}

.van-popup.van-popup--center:is(
  .v5-auth-modal,
  .download-popup,
  .registration-popup,
  .bet-notice-popup,
  .history-popup,
  .detail-popup,
  .pay-info-popup,
  .add-crypto-popup,
  .add-wechat-popup,
  .add-alipay-popup,
  .record-detail-popup
) {
  max-height: calc(100vh - 96px) !important;
  max-height: calc(100dvh - 96px) !important;
  margin-top: -24px !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch;
}

.v5-auth-modal .brand-name,
.v5-auth-modal .promo-text p {
  min-width: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.deposit-popup {
  height: 94dvh !important;
}

.deposit-popup .popup-body,
.history-popup .record-list,
.detail-popup .detail-body,
.pay-info-popup .pay-info-body {
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}

.history-popup .record-list,
.detail-popup .detail-body,
.pay-info-popup .pay-info-body {
  overflow-y: auto;
}

.van-popup.van-popup--center.history-popup {
  height: min(60dvh, calc(100dvh - 112px)) !important;
}

.van-popup.van-popup--center.detail-popup .view-detail {
  height: auto;
  max-height: calc(100dvh - 96px);
}

.van-popup.van-popup--center.pay-info-popup .pay-info-view {
  max-height: calc(100dvh - 96px);
}

.van-popup.van-popup--center.pay-info-popup .pay-info-body {
  max-height: none;
}

.history-popup .close-circle-outer,
.pay-info-popup .close-circle-outer {
  top: 10px !important;
  right: 12px !important;
  bottom: auto !important;
  left: auto !important;
  transform: none !important;
  border-color: #b2b9b6;
  color: #65716d;
}

.bet-notice-popup .notice-media {
  min-height: min(210px, 40dvh);
  max-height: min(58dvh, 680px);
}

@media (max-width: 600px) {
  .deposit-popup .popup-footer {
    padding-bottom: max(88px, env(safe-area-inset-bottom, 0px)) !important;
  }
}
