.auth-mask{
  background:#050505!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  overflow-y:auto!important;
  overscroll-behavior:none!important;
}
html.auth-open,
html.auth-open body{
  overflow:hidden!important;
  overscroll-behavior:none!important;
}
html.auth-open #app .app-shell>:not(.auth-mask){
  display:none!important;
}
html.auth-open #app .app-shell .auth-mask.auth-mask{
  position:fixed!important;
  inset:0!important;
  top:var(--auth-vv-top,0px)!important;
  right:0!important;
  bottom:auto!important;
  left:0!important;
  width:100%!important;
  height:var(--auth-vv-height,100dvh)!important;
  min-height:0!important;
  max-height:none!important;
  padding:0!important;
  align-items:stretch!important;
  justify-content:center!important;
  overflow:hidden!important;
  overscroll-behavior:none!important;
  background:#050505!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
html[data-theme="light"].auth-open #app .app-shell .auth-mask.auth-mask{background:radial-gradient(ellipse at 18% 8%,rgba(230,181,87,.38),transparent 42%),radial-gradient(ellipse at 86% 83%,rgba(75,136,209,.24),transparent 48%),linear-gradient(150deg,#fff7e7 0%,#e6f0fc 57%,#f8eddb 100%)!important}
html:not([data-theme="light"]).auth-open #app .app-shell .auth-mask.auth-mask{background:radial-gradient(ellipse at 50% 0%,rgba(223,169,68,.2),transparent 50%),linear-gradient(180deg,#17130b 0%,#050505 100%)!important}
html.auth-open #app .app-shell .auth-mask.auth-mask>.auth-sheet.si-auth-sheet{
  width:min(100%,520px)!important;
  max-width:520px!important;
  height:100%!important;
  min-height:0!important;
  max-height:100%!important;
  margin:0 auto!important;
  padding:max(16px,env(safe-area-inset-top)) 18px max(28px,env(safe-area-inset-bottom))!important;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
  background:radial-gradient(circle at 50% -15%,rgba(255,205,88,.15),transparent 36%),linear-gradient(180deg,#17130b 0%,#0a0907 42%,#050505 100%)!important;
  color:#fff!important;
  overflow-y:auto!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
}
html[data-theme="light"].auth-open #app .app-shell .auth-mask.auth-mask>.auth-sheet.si-auth-sheet{background:radial-gradient(ellipse at 13% 0%,rgba(237,190,105,.34),transparent 39%),radial-gradient(ellipse at 96% 90%,rgba(108,160,220,.20),transparent 42%),linear-gradient(160deg,#fff8eb 0%,#edf5ff 57%,#faf1de 100%)!important;color:#1f2937!important}
html[data-theme="light"] .si-auth-name{color:#1e4d89!important;text-shadow:none!important}
html[data-theme="light"] .si-auth-sheet .auth-form label{color:#354968!important}
html[data-theme="light"] .si-auth-sheet .auth-form input{background:#f8faff!important;color:#182841!important;border-color:#d6e1ef!important;caret-color:#2367b7!important;box-shadow:none!important}
html[data-theme="light"] .si-auth-sheet .auth-form input::placeholder{color:#8798ad!important}
html[data-theme="light"] .si-auth-sheet .auth-submit{background:#236bc2!important;color:#fff!important;box-shadow:none!important}
html[data-theme="light"] .si-auth-sheet .auth-consent,html[data-theme="light"] .si-auth-sheet .auth-consent-check{color:#596a82!important}
html[data-theme="light"] .si-auth-sheet [data-auth-close]{background:#f4f7fb!important;color:#36516e!important;border-color:#dce6f0!important}
html[data-theme="light"] .si-auth-sheet .auth-switch,html[data-theme="light"] .si-auth-sheet .auth-links button{color:#236bc2!important}
.si-auth-brand{display:flex;flex-direction:column;align-items:center;text-align:center;margin:0 0 10px}
.si-auth-domain{order:0;margin:0 0 5px;font-size:10px;line-height:1;font-weight:800;letter-spacing:2.1px;color:#e7c46c;text-transform:lowercase}
.si-auth-logo{order:1;display:block;width:76px;height:76px;flex:0 0 auto;border-radius:23%;object-fit:contain;background:#fff;border:1px solid rgba(216,169,54,.72);box-shadow:0 0 0 4px rgba(216,169,54,.08),0 12px 32px rgba(40,40,40,.16)}
.si-auth-name{order:2;margin-top:7px;font-size:21px;line-height:1;font-weight:950;letter-spacing:.5px;color:#f8df9b;text-shadow:0 1px 18px rgba(218,166,44,.25)}
html.auth-open .si-auth-sheet .auth-head{position:relative!important;display:flex!important;align-items:center!important;justify-content:center!important;min-height:34px!important;margin:0 0 8px!important;padding:0 42px!important;border:0!important;background:transparent!important}
.si-auth-sheet .auth-head>div{text-align:center!important}
.si-auth-sheet .auth-head b{display:block!important;margin:0!important;color:#fff!important;font-size:21px!important;line-height:1.25!important;font-weight:900!important}
html[data-theme="light"] .si-auth-sheet .auth-head b{color:#1f2937!important}
.si-auth-sheet .auth-head small{display:none!important}
.si-auth-sheet [data-auth-close]{position:absolute!important;right:0!important;top:50%!important;transform:translateY(-50%)!important;width:36px!important;height:36px!important;min-width:36px!important;padding:0!important;border:1px solid rgba(228,190,98,.3)!important;border-radius:50%!important;background:#15120c!important;color:#e8ca7d!important;font-size:24px!important;line-height:34px!important;box-shadow:none!important}
.si-auth-sheet .auth-form{display:flex!important;flex-direction:column!important;gap:10px!important;margin:0!important}
.si-auth-sheet .auth-form label{display:flex!important;flex-direction:column!important;gap:6px!important;margin:0!important;color:#d8c28c!important;font-size:12px!important;line-height:1.2!important;font-weight:800!important}
.si-auth-sheet .auth-form input{width:100%!important;height:48px!important;min-height:48px!important;margin:0!important;padding:0 14px!important;border:1px solid rgba(218,177,75,.3)!important;border-radius:14px!important;outline:0!important;background:#0b0a08!important;color:#fff!important;caret-color:#e4b94f!important;font-size:16px!important;font-weight:650!important;box-shadow:inset 0 1px 0 rgba(255,255,255,.025)!important}
.si-auth-sheet .auth-invite-field{position:relative}
.si-auth-sheet .auth-invite-field>small{position:absolute;right:3px;top:0;color:#ae9967;font-size:11px;font-weight:650}
.si-auth-sheet .auth-consent{display:grid;gap:4px;margin:0;padding:2px 0 0;color:#d8c28c}
.si-auth-sheet .auth-consent .auth-consent-check{display:flex!important;flex-direction:row!important;align-items:flex-start!important;gap:9px!important;color:#e8d7ab!important;font-size:12px!important;font-weight:650!important;line-height:1.6!important}
.si-auth-sheet .auth-form .auth-consent-check input[type="checkbox"]{width:19px!important;height:19px!important;min-width:19px!important;min-height:19px!important;flex:0 0 19px!important;margin-top:1px!important;padding:0!important;border-radius:5px!important;accent-color:#d3a12e!important;cursor:pointer}
.si-auth-sheet .auth-consent-check span{flex:1;min-width:0}.si-auth-sheet .auth-consent a{color:#f2c96b;text-decoration:underline;text-underline-offset:2px}
.si-auth-sheet .auth-consent>p{margin:0;color:#ef9a9a;font-size:11px;line-height:1.5}
.si-auth-sheet .auth-form input::placeholder{color:#716b5e!important;font-weight:500!important}
.si-auth-sheet .auth-form input:focus{border-color:#e1b64d!important;box-shadow:0 0 0 3px rgba(225,182,77,.11)!important}
.si-auth-sheet [data-auth-status]{min-height:0!important;margin:0!important;padding:0 2px!important;color:#efc865!important;font-size:12px!important;line-height:1.45!important}
.si-auth-sheet [data-auth-status]:empty{display:none!important}
.si-auth-sheet .auth-submit{position:static!important;bottom:auto!important;z-index:auto!important;width:100%!important;height:50px!important;margin:3px 0 0!important;border:0!important;border-radius:15px!important;background:linear-gradient(135deg,#ffe49a 0%,#d3a12e 44%,#8b5b08 100%)!important;color:#171005!important;font-size:16px!important;font-weight:950!important;letter-spacing:.6px!important;box-shadow:0 10px 24px rgba(170,113,15,.22),inset 0 1px rgba(255,255,255,.45)!important}
.si-auth-sheet .auth-submit:disabled{opacity:.6!important}
.si-auth-sheet .auth-switch,.si-auth-sheet .auth-links button,.si-auth-sheet .auth-resend button{border:0!important;background:transparent!important;color:#e8c66c!important;box-shadow:none!important;font-size:13px!important;font-weight:800!important}
.si-auth-sheet .auth-switch{display:block!important;width:100%!important;margin:12px 0 0!important;padding:8px!important}
.si-auth-sheet .auth-links{display:flex!important;align-items:center!important;justify-content:center!important;gap:22px!important;margin-top:12px!important;padding-top:11px!important;border-top:1px solid rgba(218,177,75,.12)!important}
.si-auth-sheet .auth-links button{padding:6px 2px!important}
.auth-mask[data-auth-page="login"]>.si-auth-sheet{display:flex!important;flex-direction:column!important}
.auth-mask[data-auth-page="login"] .si-auth-brand{margin-top:clamp(16px,5vh,56px)!important;margin-bottom:18px!important}
.auth-mask[data-auth-page="login"] .auth-links{margin-bottom:0!important}
.auth-mask[data-auth-page="login"] .auth-head,.auth-mask[data-auth-page="login"] .auth-form,.auth-mask[data-auth-page="login"] .auth-links{width:100%!important;max-width:400px!important;align-self:center!important;box-sizing:border-box!important}
.si-auth-sheet .auth-resend{margin-top:12px!important;padding:12px!important;border:1px solid rgba(218,177,75,.18)!important;border-radius:14px!important;background:rgba(255,255,255,.025)!important}
.si-auth-sheet .youxi-otp-row{display:grid!important;grid-template-columns:minmax(0,1fr) 108px!important;gap:8px!important}
.si-auth-sheet .youxi-otp-send{height:48px!important;min-width:108px!important;padding:0 8px!important;border:1px solid rgba(227,187,85,.36)!important;border-radius:14px!important;background:#18130a!important;color:#edcc75!important;font-size:12px!important;font-weight:900!important}
.si-auth-sheet .youxi-otp-send:disabled{opacity:.55!important}
@media(max-width:390px){
  .auth-sheet.si-auth-sheet{width:100%!important;max-width:520px!important;padding:max(12px,env(safe-area-inset-top)) 14px max(16px,env(safe-area-inset-bottom))!important;border-radius:0!important}
  .si-auth-logo{width:60px;height:60px}.si-auth-name{font-size:20px}.si-auth-domain{font-size:10px;margin-bottom:5px}.si-auth-sheet .auth-form{gap:8px!important}.si-auth-sheet .auth-form input{height:45px!important;min-height:45px!important;font-size:16px!important}.si-auth-sheet .youxi-otp-send{height:45px!important}
}
/* 投注盘：只调整清空/确认/全押位置与自动/全押视觉，不改投注逻辑。 */
.play-bottom .bottom-action-row.single.with-allin{display:grid!important;grid-template-columns:72px minmax(0,1fr) 72px!important;align-items:center!important;gap:8px!important}
.play-bottom .bottom-action-row.single.with-allin .clear-bet-btn{grid-column:1!important;justify-self:start!important}
.play-bottom .bottom-action-row.single.with-allin .confirm-btn{grid-column:2!important;justify-self:center!important;width:min(176px,100%)!important;max-width:176px!important;margin:0!important}
.play-bottom .bottom-action-row.single.with-allin .all-in-btn{grid-column:3!important;justify-self:end!important;margin-right:-4px!important;border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;color:#f97316!important;padding:0!important}
.play-bottom .bet-one-row .auto-bet-open,.play-bottom .bet-one-row .auto-bet-open.active{border:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;color:#e11d48!important;padding-left:4px!important;padding-right:0!important}

/* 投注页布局收口：开奖/历史同宽，已选只留在完整开奖区之后，投注盘固定贴导航栏上沿。 */
.play-page{display:flex!important;flex-direction:column!important}
.play-page>.play-mode-line,.play-page>.mode-picker{order:1}
.play-page>.play-top{order:2}
.play-page>.rs-top{order:3}
.play-page>.play-history-panel{order:4}
.play-page>.bet-toolbar{order:5}
.play-page>.selector-wrap{order:6}
.play-page>.play-bottom{order:7}
.play-page .rs-top,
.play-page .play-history-panel{
  width:100%!important;
  margin-left:0!important;
  margin-right:0!important;
  box-sizing:border-box!important;
}
.play-page .play-history-panel{margin-top:0!important;margin-bottom:8px!important}
.play-page .bet-toolbar{
  position:relative!important;
  top:auto!important;
  bottom:auto!important;
  z-index:auto!important;
  width:100%!important;
  margin:10px 0!important;
  grid-template-columns:minmax(0,1fr) 48px!important;
  padding-right:12px!important;
  grid-template-rows:auto!important;
  align-items:start!important;
  box-sizing:border-box!important;
}
.play-page .bet-toolbar .sel-box{
  grid-column:1!important;
  grid-row:1!important;
  min-width:0!important;
  width:100%!important;
  align-items:flex-start!important;
}
.play-page .bet-toolbar .sel-items{
  display:block!important;
  width:100%!important;
  max-width:100%!important;
  max-height:none!important;
  overflow:visible!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
  word-break:break-word!important;
}
.play-page .bet-toolbar>button{grid-row:1!important;align-self:start!important}
.play-page .bet-toolbar>[data-action="clear"]{transform:translateX(-12px)!important}
.play-page .play-bottom.show{
  position:fixed!important;
  left:50%!important;
  right:auto!important;
  bottom:52px!important;
  width:min(100%,520px)!important;
  margin:0!important;
  transform:translateX(-50%)!important;
  z-index:998!important;
}
@media(min-width:700px){
  .play-page .play-bottom.show{
    bottom:58px!important;
    width:min(calc(100% - 32px),1180px)!important;
  }
}
@media(orientation:landscape) and (max-height:500px){
  .play-page .play-bottom.show{bottom:46px!important}
}

/* Home-screen installed app only: align the existing bet tray with the
   actual bottom navigation, including its iPhone home-indicator safe area.
   Browser/Safari styling is deliberately unchanged. */
@media (display-mode: standalone) {
  .play-page .play-bottom.show {
    bottom: calc(var(--navigation-height) + env(safe-area-inset-bottom))!important;
    max-height: calc(100dvh - var(--navigation-height) - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 8px)!important;
    overflow-y: auto!important;
    overscroll-behavior-y: contain;
    -webkit-overflow-scrolling: touch;
  }
  /* When the short app viewport needs scrolling, keep confirmation usable. */
  .play-page .play-bottom.show .bottom-action-row {
    position: sticky;
    bottom: 0;
    z-index: 1;
    flex-shrink: 0;
    background: inherit;
  }
  /* The existing app keyboard observer hides the nav and supplies this offset. */
  html.auth-keyboard-open .play-page .play-bottom.show {
    bottom: var(--app-keyboard-bottom, 0px)!important;
    max-height: calc(var(--auth-vv-height, 100dvh) - env(safe-area-inset-top) - 8px)!important;
  }
}
