.profile-editor-dialog>form>header,
.profile-editor-dialog>form>footer{
  flex:0 0 auto;
}

.profile-editor-scroll{
  min-height:0;
  flex:1 1 auto;
  overflow-x:hidden;
  overflow-y:auto;
  overscroll-behavior:contain;
  touch-action:pan-y;
  -webkit-overflow-scrolling:touch;
}

.profile-editor-quick-nav{display:none}

@media(max-width:700px){
  .profile-editor-dialog>form>header p{
    display:none;
  }

  .profile-editor-dialog{
    height:calc(100dvh - 24px);
    max-height:calc(100dvh - 24px);
    margin-block:12px;
  }

  .profile-editor-dialog>form{
    height:100%;
    max-height:none;
  }

  .profile-editor-scroll{
    padding:0 16px 28px;
    overscroll-behavior-y:auto;
    scroll-behavior:smooth;
  }

  .profile-editor-quick-nav{
    position:sticky;
    top:0;
    z-index:20;
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:6px;
    margin:0 -16px 14px;
    padding:10px 16px;
    border-bottom:1px solid #ffffff10;
    background:#11171bf2;
    backdrop-filter:blur(16px);
  }

  .profile-editor-quick-nav button{
    min-height:36px;
    border:1px solid #3b464e;
    border-radius:10px;
    background:#1a2227;
    color:#8f9ba3;
    font-size:9px;
    font-weight:900;
    transition:border-color .2s,background .2s,color .2s,transform .2s;
    touch-action:manipulation;
  }

  .profile-editor-quick-nav button.is-active{
    border-color:#8fbd2f;
    background:#b8ff0012;
    color:#dfff94;
    transform:translateY(-1px);
  }

  .profile-editor-media,
  .profile-editor-fields,
  .profile-editor-socials{
    scroll-margin-top:70px;
  }

  .profile-editor-media{
    gap:10px!important;
    margin-bottom:14px!important;
  }

  .profile-editor-media .editor-banner{
    grid-template-rows:150px auto!important;
  }

  .profile-editor-media .editor-avatar{
    grid-template-columns:132px minmax(0,1fr);
    grid-template-rows:132px!important;
  }

  .profile-editor-media .editor-banner>[data-banner-preview],
  .profile-editor-media .editor-avatar>[data-avatar-preview]{
    touch-action:pan-y!important;
    -webkit-user-drag:none;
  }

  .profile-editor-media .editor-avatar .profile-media-actions{
    grid-template-columns:1fr;
    align-content:center;
    border-top:0;
    border-left:1px solid #ffffff12;
  }

  .profile-media-actions{
    grid-template-columns:1fr 1fr;
    padding:10px;
  }

  .profile-media-actions button{
    min-height:42px;
  }

  .profile-editor-fields,
  .profile-editor-socials{
    margin-top:12px;
    padding:14px;
    border-radius:16px;
  }

  .profile-editor-dialog>form>footer{
    padding:11px 14px calc(11px + env(safe-area-inset-bottom));
  }

  .profile-editor-dialog>form>footer button{
    min-height:46px;
  }
}

@media(max-width:380px){
  .profile-editor-media .editor-avatar{grid-template-columns:112px minmax(0,1fr);grid-template-rows:120px!important}
  .profile-media-actions{grid-template-columns:1fr}
}
