/* Mobile profile: keep the email confirmation reachable and prevent KYC overlap. */
@media(max-width:900px){
  #profile .profile-layout{
    align-items:start!important;
    overflow:visible!important;
  }

  #profile .profile-layout > .profile-security-panel.security-grid-panel{
    position:relative!important;
    z-index:2!important;
    height:auto!important;
    min-height:0!important;
    max-height:min(72svh,680px)!important;
    overflow-x:hidden!important;
    overflow-y:auto!important;
    overscroll-behavior:contain!important;
    -webkit-overflow-scrolling:touch!important;
    scroll-behavior:smooth!important;
    scroll-padding-top:18px!important;
    scroll-padding-bottom:96px!important;
    padding-bottom:max(26px,env(safe-area-inset-bottom))!important;
    scrollbar-width:thin!important;
    scrollbar-color:rgba(53,229,212,.34) rgba(255,255,255,.04)!important;
  }

  #profile .profile-layout > .profile-security-panel.security-grid-panel::-webkit-scrollbar{
    width:4px!important;
  }
  #profile .profile-layout > .profile-security-panel.security-grid-panel::-webkit-scrollbar-track{
    background:rgba(255,255,255,.035)!important;
  }
  #profile .profile-layout > .profile-security-panel.security-grid-panel::-webkit-scrollbar-thumb{
    background:rgba(53,229,212,.34)!important;
    border-radius:999px!important;
  }

  #profile .security-grid-panel .security-card-stack,
  #profile .security-grid-panel .security-manage-card{
    position:relative!important;
    display:block!important;
    flex:none!important;
    width:100%!important;
    height:auto!important;
    min-height:0!important;
    max-height:none!important;
    overflow:visible!important;
  }

  #profile .security-grid-panel .security-card-stack{
    padding-bottom:10px!important;
  }

  #profile .security-grid-panel .security-manage-card + .security-manage-card{
    margin-top:16px!important;
  }

  #profile .security-grid-panel .security-manage-card:nth-child(2){
    padding-bottom:18px!important;
    scroll-margin-bottom:96px!important;
  }

  #profile .security-grid-panel .security-manage-card:nth-child(2) > button:last-child{
    position:sticky!important;
    left:0!important;
    right:0!important;
    bottom:0!important;
    z-index:6!important;
    width:100%!important;
    min-height:50px!important;
    margin:14px 0 0!important;
    border:1px solid rgba(53,229,212,.42)!important;
    background:rgba(17,29,33,.96)!important;
    color:#55e7d9!important;
    box-shadow:0 -10px 22px rgba(9,13,17,.86)!important;
    backdrop-filter:blur(14px)!important;
    -webkit-backdrop-filter:blur(14px)!important;
  }

  #profile .profile-layout > .kyc-right-panel{
    position:relative!important;
    z-index:1!important;
    clear:both!important;
    height:auto!important;
    min-height:0!important;
    margin-top:0!important;
    overflow:visible!important;
  }

  #profile #inline-change-email,
  #profile #inline-change-email-code,
  #profile #inline-email-send-btn{
    scroll-margin-top:18px!important;
    scroll-margin-bottom:100px!important;
  }
}

@media(max-width:560px){
  #profile .profile-layout > .profile-security-panel.security-grid-panel{
    max-height:min(68svh,610px)!important;
  }
}
