/* TLGAWY V89 UNIVERSAL TURBO — desktop + mobile rendering accelerator */
html.tlgawy-turbo-v89,
body.tlgawy-turbo-v89{-webkit-text-size-adjust:100%}

/* Isolate repeating chat/member rows so one update does not invalidate the
   complete page layout. Keep paint containment off to avoid clipping badges. */
body.tlgawy-turbo-v89 #show_chat .chat_log,
body.tlgawy-turbo-v89 #show_private .private_logs,
body.tlgawy-turbo-v89 #show_private .privlog,
body.tlgawy-turbo-v89 #container_user .user_item{
  contain:layout style;
}

body.tlgawy-turbo-v89 #show_chat ul,
body.tlgawy-turbo-v89 #show_private,
body.tlgawy-turbo-v89 #chat_right_data,
body.tlgawy-turbo-v89 #chat_left_data{
  scroll-behavior:auto!important;
  overscroll-behavior-y:contain;
}

/* During typing/scrolling, input and scrolling win over cosmetic animation.
   Effects return automatically a fraction of a second after interaction. */
body.tlgawy-perf-typing #chat_center .chat_log *,
body.tlgawy-perf-typing #chat_right *,
body.tlgawy-perf-typing #chat_left *,
body.tlgawy-perf-scrolling #chat_center .chat_log *,
body.tlgawy-perf-scrolling #chat_right *,
body.tlgawy-perf-scrolling #chat_left *{
  animation-play-state:paused!important;
  transition:none!important;
}

body.tlgawy-perf-busy .float_menu,
body.tlgawy-perf-busy .sysmenu,
body.tlgawy-perf-busy .menu_drop,
body.tlgawy-perf-busy #chat_right,
body.tlgawy-perf-busy #chat_left,
body.tlgawy-perf-busy #private_center,
body.tlgawy-perf-busy #over_modal_in,
body.tlgawy-perf-busy #over_emodal_in{
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
  will-change:auto!important;
}

body.tlgawy-turbo-v89 #content,
body.tlgawy-turbo-v89 #message_content{
  will-change:auto!important;
}

html.tlgawy-perf-hidden *,
html.tlgawy-perf-hidden *:before,
html.tlgawy-perf-hidden *:after{
  animation-play-state:paused!important;
}

@media (pointer:coarse){
  body.tlgawy-turbo-v89 #submit_button,
  body.tlgawy-turbo-v89 #private_send,
  body.tlgawy-turbo-v89 .footer_item,
  body.tlgawy-turbo-v89 .head_option{
    touch-action:manipulation;
    -webkit-tap-highlight-color:transparent;
  }
}


/* V91 adaptive low-FX mode. Activated for ~2 seconds only after repeated >120ms
   main-thread stalls; this protects typing/scrolling without permanently changing design. */
body.tlgawy-perf-lowfx #show_chat .chat_log *,
body.tlgawy-perf-lowfx #show_private .private_logs *,
body.tlgawy-perf-lowfx #show_private .privlog *,
body.tlgawy-perf-lowfx #chat_right *,
body.tlgawy-perf-lowfx #chat_left *{
  animation:none!important;
  transition:none!important;
  -webkit-backdrop-filter:none!important;
  backdrop-filter:none!important;
}
body.tlgawy-perf-lowfx #show_chat .chat_log,
body.tlgawy-perf-lowfx #show_private .private_logs,
body.tlgawy-perf-lowfx #show_private .privlog{
  will-change:auto!important;
}
