/* Delsagram V261 - Android/mobile scroll performance layer
   Scope: front-end rendering only. No layout routes, backend, websocket, DB, or JS logic changes.
   Goal: reduce Android Chrome scroll jank caused by blur, heavy shadows, large repaint areas, and offscreen card rendering.
*/

@media (max-width: 768px) {
  html {
    scroll-behavior: auto !important;
  }

  .app-shell {
    overflow-x: hidden !important;
  }

  .app-shell::before {
    display: none !important;
  }

  html.ua-android *,
  html.ua-android-density * {
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
  }

  html.ua-android .ds-topbar,
  html.ua-android-density .ds-topbar {
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 1px 0 rgba(17,24,39,.06) !important;
  }

  html.ua-android .ds-bottom-nav,
  html.ua-android-density .ds-bottom-nav {
    background: rgba(255,255,255,.98) !important;
    box-shadow: 0 8px 24px rgba(33,22,76,.12) !important;
  }

  html.ua-android .ds-ad-card,
  html.ua-android .card,
  html.ua-android .hall-card,
  html.ua-android .contact-tile,
  html.ua-android .cchat-room-row,
  html.ua-android .profile-showcase-card,
  html.ua-android .profile-showcase-card-v98,
  html.ua-android .profile-showcase-card-v99,
  html.ua-android .profile-caption-side,
  html.ua-android-density .ds-ad-card,
  html.ua-android-density .card,
  html.ua-android-density .hall-card,
  html.ua-android-density .contact-tile,
  html.ua-android-density .cchat-room-row,
  html.ua-android-density .profile-showcase-card,
  html.ua-android-density .profile-showcase-card-v98,
  html.ua-android-density .profile-showcase-card-v99,
  html.ua-android-density .profile-caption-side {
    box-shadow: 0 8px 22px rgba(38,28,85,.055) !important;
  }

  html.ua-android .ds-ad-card,
  html.ua-android .hall-card,
  html.ua-android .contact-tile,
  html.ua-android .cchat-room-row,
  html.ua-android .profile-showcase-card,
  html.ua-android .profile-showcase-card-v98,
  html.ua-android .profile-showcase-card-v99,
  html.ua-android-density .ds-ad-card,
  html.ua-android-density .hall-card,
  html.ua-android-density .contact-tile,
  html.ua-android-density .cchat-room-row,
  html.ua-android-density .profile-showcase-card,
  html.ua-android-density .profile-showcase-card-v98,
  html.ua-android-density .profile-showcase-card-v99 {
    contain: layout paint style !important;
  }

  html.ua-android .ds-ad-card,
  html.ua-android-density .ds-ad-card {
    content-visibility: auto;
    contain-intrinsic-size: 760px;
  }

  html.ua-android .hall-card,
  html.ua-android .contact-tile,
  html.ua-android .cchat-room-row,
  html.ua-android-density .hall-card,
  html.ua-android-density .contact-tile,
  html.ua-android-density .cchat-room-row {
    content-visibility: auto;
    contain-intrinsic-size: 160px;
  }

  html.ua-android .premium-stories,
  html.ua-android .profile-showcase-strip,
  html.ua-android .story-viewer-list,
  html.ua-android .cchat-room-list,
  html.ua-android-density .premium-stories,
  html.ua-android-density .profile-showcase-strip,
  html.ua-android-density .story-viewer-list,
  html.ua-android-density .cchat-room-list {
    -webkit-overflow-scrolling: touch !important;
    overscroll-behavior: contain !important;
  }

  html.ua-android a,
  html.ua-android button,
  html.ua-android .btn,
  html.ua-android [role="button"],
  html.ua-android label,
  html.ua-android input,
  html.ua-android select,
  html.ua-android textarea,
  html.ua-android-density a,
  html.ua-android-density button,
  html.ua-android-density .btn,
  html.ua-android-density [role="button"],
  html.ua-android-density label,
  html.ua-android-density input,
  html.ua-android-density select,
  html.ua-android-density textarea {
    touch-action: manipulation !important;
  }

  html.ua-android video,
  html.ua-android img,
  html.ua-android .ad-media,
  html.ua-android .ds-media,
  html.ua-android-density video,
  html.ua-android-density img,
  html.ua-android-density .ad-media,
  html.ua-android-density .ds-media {
    backface-visibility: hidden !important;
  }
}
