/* AUTO MIR · translucent scroll-to-top control.
   Above the fixed tab bar (and safe-area) in Web, VK and Telegram Mini Apps. */
.auto-scroll-top{
  position:fixed;
  z-index:55;
  right:calc(20px + env(safe-area-inset-right,0px));
  bottom:calc(104px + env(safe-area-inset-bottom,0px));
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  padding:0;
  border:1px solid rgba(212,183,124,.34);
  border-radius:16px;
  background:linear-gradient(150deg,rgba(22,33,47,.72),rgba(7,13,23,.60));
  color:#eed4a0;
  -webkit-backdrop-filter:blur(16px) saturate(125%);
  backdrop-filter:blur(16px) saturate(125%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.13),0 9px 24px rgba(0,0,0,.24);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(10px) scale(.94);
  transition:opacity .2s ease,transform .2s ease,visibility .2s ease,background .2s ease;
  -webkit-tap-highlight-color:transparent;
  touch-action:manipulation;
  cursor:pointer;
}
.auto-scroll-top.is-visible{
  opacity:.87;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}
.auto-scroll-top svg{width:22px;height:22px;display:block}
.auto-scroll-top:hover{
  opacity:1;
  background:linear-gradient(150deg,rgba(37,56,77,.87),rgba(11,22,37,.78));
}
.auto-scroll-top:active{transform:translateY(1px) scale(.96)}
.auto-scroll-top:focus-visible{
  outline:2px solid #f3d6a4;
  outline-offset:3px;
  opacity:1;
}
/* Never float a background navigation action over an open sheet/dialog. */
body:has(.auto-modal-bg,.auto-tg-modal-bg,.auto-car-detail-bg,[data-client-detail-bg]) .auto-scroll-top{
  opacity:0;
  visibility:hidden;
  pointer-events:none;
}
@media(max-width:720px){
  .auto-scroll-top{
    right:calc(14px + env(safe-area-inset-right,0px));
    bottom:calc(104px + env(safe-area-inset-bottom,0px));
    width:46px;
    height:46px;
    border-radius:15px;
  }
}
@media(prefers-reduced-motion:reduce){
  .auto-scroll-top{transition:none}
}
