
:root{
  --keyboard-offset:0px;
  --ais-visual-height:100dvh;
  --vvh:100dvh;
}

@media(max-width:900px){
  html,body,.app,.main{
    min-height:0;
    max-height:100dvh;
  }

  .composer-wrap{
    top:auto!important;
    bottom:calc(10px + env(safe-area-inset-bottom))!important;
    transform:none!important;
  }

  body.keyboard-open .composer-wrap{
    bottom:calc(8px + env(safe-area-inset-bottom))!important;
  }

  body.keyboard-open .chat{
    padding-bottom:calc(var(--bottom) + 24px + env(safe-area-inset-bottom))!important;
  }

  body.keyboard-open .welcome{
    min-height:max(
      220px,
      calc(var(--ais-visual-height,100dvh) - var(--top) - var(--bottom) - 18px)
    )!important;
  }

  body.keyboard-open .welcome-inner{
    transform:translateY(-4px)!important;
  }

  /* Лёгкая рамка без blur, перемещения и тяжёлых фоновых слоёв. */
  html.ais-mobile-perf .composer{
    position:relative;
    isolation:isolate!important;
    animation:none!important;
    box-shadow:0 10px 26px rgba(0,0,0,.32),0 0 0 1px rgba(126,136,255,.07)!important;
  }

  html.ais-mobile-perf .composer::before{
    content:""!important;
    display:block!important;
    position:absolute!important;
    inset:-1px!important;
    z-index:3!important;
    border:1px solid rgba(142,136,255,.52)!important;
    border-radius:inherit!important;
    padding:0!important;
    background:none!important;
    filter:none!important;
    -webkit-mask:none!important;
    mask:none!important;
    pointer-events:none!important;
    opacity:.22;
    animation:aisComposerSoftGlowV167 4.8s ease-in-out infinite!important;
  }

  html.ais-mobile-perf .composer::after,
  html.ais-mobile-perf .composer-wrap::before{
    display:none!important;
    content:none!important;
  }

  body.keyboard-open .composer::before{
    opacity:.42;
  }

  body.keyboard-open .toast{
    bottom:82px!important;
  }

  body.keyboard-open .auth-modal{
    top:50%!important;
    transform:translate(-50%,-50%) scale(1)!important;
  }
}

@keyframes aisComposerSoftGlowV167{
  0%,100%{opacity:.18}
  50%{opacity:.46}
}

@media(prefers-reduced-motion:reduce){
  html.ais-mobile-perf .composer::before{
    animation:none!important;
    opacity:.28;
  }
}

.ais-no-anim-v6 .composer::before,
html.ais-low-power .composer::before,
html.ais-tab-hidden .composer::before{
  animation:none!important;
  opacity:.22!important;
}

