/* Post-build layout fix — overrides legacy custom.css px/em rules */
.lefsg .name {
  font-size: calc(4.102564 * var(--vw, 1vw)) !important;
  font-weight: 700;
}
.lefsg .mey {
  font-size: calc(4.615385 * var(--vw, 1vw)) !important;
  color: #7981a4;
}
.activity-page .consg {
  padding-left: calc(2.564103 * var(--vw, 1vw)) !important;
  padding-right: calc(2.564103 * var(--vw, 1vw)) !important;
  margin-top: 0 !important;
}
.activity-page .consg .lis img {
  min-height: calc(51.282051 * var(--vw, 1vw)) !important;
  height: auto !important;
}
.activity-page .van-tabs__nav .van-tab__text {
  font-size: calc(3.589744 * var(--vw, 1vw)) !important;
}

/* Mine page: king_popup_bg is a check-in popup template, not an avatar ring */
.mine-header__avatar-frame {
  display: none !important;
}

.mine-header__avatar-wrap {
  position: relative !important;
  overflow: hidden !important;
  flex-shrink: 0 !important;
}

.mine-header__avatar-input {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  inset: auto !important;
  opacity: 0 !important;
  z-index: 3 !important;
  pointer-events: none !important;
}

.mine-header__avatar-wrap .mine-header__avatar {
  cursor: pointer;
}

.mine-header__info,
.mine-header__actions,
.mine-header__action-icon,
.mine-header__msg {
  position: relative !important;
  z-index: 10 !important;
  pointer-events: auto !important;
}

/* ===== Login page: mobile + desktop responsive ===== */
html,
body {
  width: 100%;
  min-height: 100%;
  margin: 0;
  padding: 0;
}

#app,
#app-root {
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  min-height: 100%;
}

.login-page,
.forgot-page,
.register-page {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.login-panel {
  width: 100%;
  max-width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

/* Fix broken sponsor strip transform from built CSS */
.login-sponsor-wrap {
  width: 100% !important;
  max-width: 100% !important;
  transform: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.login-sponsor-wrap::-webkit-scrollbar {
  display: none;
}

.login-sponsor-img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  object-fit: contain;
}

.login-footer {
  flex-wrap: nowrap;
  gap: calc(var(--vw, 1vw) * 1.02564);
}

.login-footer-item {
  flex: 1 1 0;
  min-width: 0;
}

/* Phone: safe area + small screen tweaks */
@media (max-width: 430px) {
  .login-page,
  .forgot-page,
  .register-page {
    padding-left: max(12px, env(safe-area-inset-left)) !important;
    padding-right: max(12px, env(safe-area-inset-right)) !important;
  }
}

@media (max-width: 360px) {
  .login-footer {
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .login-footer-item {
    width: calc(33.333% - 6px);
    flex: 0 0 calc(33.333% - 6px);
  }
}

/* ===== Member pages: full-width within shell ===== */
.home-page,
.mine-page,
.main-layout,
.activity-page,
.activity-page.acts,
.activity-info-page,
.sub-page,
.agent-page,
.zhanzhuye-page,
.zhanzhu-page,
.zhanzhu-page.acts {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
}

.main-layout {
  min-height: 100vh;
}

/* ===== Wide viewport: shell + fixed UI for all member routes ===== */
html.is-wide-viewport {
  --wap-shell-w: 430px;
  background: #dfe6f5;
}

html.is-wide-viewport:has(.login-page),
html.is-wide-viewport:has(.forgot-page),
html.is-wide-viewport:has(.register-page) {
  background: #0a1628 url(/static/img/login-bg.9e84a6dd.png) no-repeat center top;
  background-size: cover;
  background-attachment: fixed;
}

html.is-wide-viewport .van-tabbar.van-tabbar--fixed,
html.is-wide-viewport .van-tabbar.mine-tabbar,
html.is-wide-viewport .van-nav-bar--fixed,
html.is-wide-viewport .activity-page .pageTop,
html.is-wide-viewport .activity-page .topsa,
html.is-wide-viewport .activity-info-nav,
html.is-wide-viewport .zhanzhu-page .pageTop,
html.is-wide-viewport .mine-loading {
  left: 50% !important;
  right: auto !important;
  width: var(--wap-shell-w) !important;
  max-width: var(--wap-shell-w) !important;
  transform: translateX(-50%);
}

html.is-wide-viewport .activity-info-page .bonsf {
  left: 50% !important;
  right: auto !important;
  width: calc(var(--wap-shell-w) * 0.9) !important;
  max-width: calc(var(--wap-shell-w) * 0.9) !important;
  transform: translateX(-50%);
}

html.is-wide-viewport .bancgs {
  left: calc(50% - var(--wap-shell-w) / 2 + calc(var(--vw, 1vw) * 2.5641)) !important;
  right: auto !important;
}

html.is-wide-viewport #redPacket {
  right: auto !important;
  left: calc(50% + var(--wap-shell-w) / 2 - 100px) !important;
}

/* Center modals (captcha etc.) — full XY center, not shell-pinned */
.captcha-popup.van-popup--center,
.van-popup.captcha-popup {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: calc(100vw - 32px) !important;
  transform: translate(-50%, -50%) !important;
  background: transparent !important;
  overflow: visible !important;
}

html.is-wide-viewport .van-popup--center,
html.is-wide-viewport .captcha-popup,
html.is-wide-viewport .van-dialog {
  top: 50% !important;
  left: 50% !important;
  right: auto !important;
  bottom: auto !important;
  width: auto !important;
  max-width: min(calc(var(--wap-shell-w) - 24px), 92vw) !important;
  transform: translate(-50%, -50%) !important;
}

html.is-wide-viewport .van-overlay {
  left: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  transform: none !important;
}

html.is-wide-viewport .van-popup--bottom,
html.is-wide-viewport .van-popup--top,
html.is-wide-viewport .van-action-sheet {
  left: 50% !important;
  right: auto !important;
  width: var(--wap-shell-w) !important;
  max-width: var(--wap-shell-w) !important;
  transform: translateX(-50%);
}

html.is-wide-viewport .van-toast {
  left: 50% !important;
  transform: translateX(-50%);
  max-width: calc(var(--wap-shell-w) - 32px);
}

/* Tablet / desktop: centered mobile shell on full browser width */
html.is-wide-viewport body {
  display: flex !important;
  justify-content: center !important;
  align-items: stretch !important;
  min-height: 100vh;
  width: 100% !important;
  background: #dfe6f5;
  margin: 0;
  padding: 0;
}

html.is-wide-viewport #app,
html.is-wide-viewport #app-root {
  width: 430px !important;
  max-width: 430px !important;
  min-height: 100vh;
  margin: 0 !important;
  flex: 0 0 430px !important;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
  background: #edf2fd;
  position: relative;
}

html.is-wide-viewport .login-page {
  min-height: 100vh;
  background-size: cover;
  background-position: center top;
}

/* Fallback when class not yet applied */
@media (min-width: 431px) {
  :root {
    --wap-shell-w: 430px;
  }

  html {
    background: #dfe6f5;
  }

  html:has(.login-page),
  html:has(.forgot-page),
  html:has(.register-page) {
    background: #0a1628 url(/static/img/login-bg.9e84a6dd.png) no-repeat center top;
    background-size: cover;
    background-attachment: fixed;
  }

  body {
    background: #dfe6f5;
    display: flex;
    justify-content: center;
    align-items: stretch;
    min-height: 100vh;
  }

  #app,
  #app-root {
    width: 100%;
    max-width: 430px;
    min-height: 100vh;
    margin: 0 auto;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.22);
    background: #edf2fd;
    position: relative;
    flex-shrink: 0;
  }

  .login-page {
    min-height: 100vh;
    background-size: cover;
    background-position: center top;
  }

  .van-tabbar.van-tabbar--fixed,
  .van-tabbar.mine-tabbar,
  .van-nav-bar--fixed,
  .activity-page .pageTop,
  .activity-page .topsa,
  .activity-info-nav,
  .zhanzhu-page .pageTop,
  .mine-loading {
    left: 50% !important;
    right: auto !important;
    width: var(--wap-shell-w) !important;
    max-width: var(--wap-shell-w) !important;
    transform: translateX(-50%);
  }

  .activity-info-page .bonsf {
    left: 50% !important;
    right: auto !important;
    width: calc(var(--wap-shell-w) * 0.9) !important;
    max-width: calc(var(--wap-shell-w) * 0.9) !important;
    transform: translateX(-50%);
  }

  .bancgs {
    left: calc(50% - var(--wap-shell-w) / 2 + calc(var(--vw, 1vw) * 2.5641)) !important;
    right: auto !important;
  }

  #redPacket {
    right: auto !important;
    left: calc(50% + var(--wap-shell-w) / 2 - 100px) !important;
  }

  .captcha-popup.van-popup--center,
  .van-popup.captcha-popup,
  .van-popup--center,
  .van-dialog {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    width: auto !important;
    max-width: min(calc(var(--wap-shell-w) - 24px), 92vw) !important;
    transform: translate(-50%, -50%) !important;
  }

  .van-overlay {
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    transform: none !important;
  }

  .van-popup--bottom,
  .van-popup--top,
  .van-action-sheet {
    left: 50% !important;
    right: auto !important;
    width: var(--wap-shell-w) !important;
    max-width: var(--wap-shell-w) !important;
    transform: translateX(-50%);
  }

  .van-toast {
    left: 50% !important;
    transform: translateX(-50%);
    max-width: calc(var(--wap-shell-w) - 32px);
  }
}

/* Wide desktop: keep readable phone-width column centered */
@media (min-width: 1024px) {
  #app,
  #app-root {
    max-width: 430px;
    border-radius: 0;
  }
}

/* ===== UserCent: settings-style logout row (mobile + desktop) ===== */
.sub-page {
  padding-bottom: calc(var(--vw, 1vw) * 4) !important;
  min-height: auto !important;
}

.sub-page .user-cent-logout-wrap {
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
  margin: calc(var(--vw, 1vw) * 3.2) 0 0 !important;
  padding: 0 !important;
  background: transparent !important;
  flex-shrink: 0 !important;
}

.sub-page .user-cent-logout-btn {
  display: block !important;
  width: 100% !important;
  max-width: 100% !important;
  margin: 0 !important;
  padding: calc(var(--vw, 1vw) * 4) calc(var(--vw, 1vw) * 3.2) !important;
  border: none !important;
  border-radius: calc(var(--vw, 1vw) * 2.67) !important;
  background: #fff !important;
  color: #1a2744 !important;
  font-size: calc(var(--vw, 1vw) * 4) !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-align: center !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  -webkit-tap-highlight-color: transparent !important;
}

.sub-page .user-cent-logout-btn:active {
  background: #f7f8fa !important;
}

@media (min-width: 431px) {
  .sub-page .user-cent-logout-btn {
    padding: 14px 12px !important;
    border-radius: 10px !important;
  }

  .sub-page .user-cent-logout-wrap {
    margin-top: 12px !important;
  }
}


/* arithmetic captcha question */
.captcha-math{color:#a0e0ff!important;font-weight:700!important;text-align:center!important}
