/* Keep the conversation layout identical before and during keyboard animation. */
html body.topup-chat-open.chat-focus-mode:has(#gc-chat-view.is-active) .bottom-app-nav,
body.group-room-open .bottom-app-nav,
body.direct-room-open .bottom-app-nav,
body.topup-chat-open:has(#scrimChatRoom:not([hidden])) .bottom-app-nav{display:none!important}
@media(max-width:767px){
 html body.topup-chat-open.chat-focus-mode #chat-center{
  position:fixed!important;inset:var(--gc-visual-top,0px) 0 auto!important;
  height:var(--gc-visual-height,100dvh)!important;min-height:0!important;overflow:hidden!important;
 }
 html body.topup-chat-open.chat-focus-mode #chat-center .gc-panel,
 html body.topup-chat-open.chat-focus-mode #chat-center .gc-shell{
  height:100%!important;min-height:0!important;padding:0!important;overflow:hidden!important;
  transition:none!important;animation:none!important;transform:none!important;
 }
 html body.topup-chat-open.chat-focus-mode #chat-center #gc-chat-view.is-active{
  position:absolute!important;inset:0!important;height:100%!important;min-height:0!important;
  display:grid!important;grid-template-rows:auto minmax(0,1fr) auto!important;padding:0!important;
 }
 html body.topup-chat-open.chat-focus-mode #chat-center #gc-chat-view.is-active .gc-composer{
  position:relative!important;inset:auto!important;bottom:auto!important;transform:none!important;
  width:100%!important;margin:0!important;padding:9px 12px calc(9px + env(safe-area-inset-bottom,0px))!important;
  transition:none!important;animation:none!important;
 }
 html body.topup-chat-open.chat-focus-mode #chat-center #gc-chat-view.is-active .gc-messages{
  min-height:0!important;padding-bottom:12px!important;overflow-y:auto!important;
 }
 html body.group-room-open #chat-center #gc-group-room.is-active{
  position:absolute!important;inset:0!important;height:100%!important;min-height:0!important;
  grid-template-rows:auto minmax(0,1fr) auto!important;
 }
 html body.group-room-open #chat-center #gc-group-room.has-group-reply{grid-template-rows:auto minmax(0,1fr) auto!important}
 html body.topup-chat-open:has(#scrimChatRoom:not([hidden])) #chat-center{
  position:fixed!important;inset:var(--scrim-visible-top,0px) 0 auto!important;
  height:var(--scrim-visible-height,100dvh)!important;min-height:0!important;
 }
 html body.topup-chat-open:has(#scrimChatRoom:not([hidden])) #scrimChatRoom{inset:0!important;height:100%!important;padding-bottom:0!important}
 #chat-center .gc-messages,#chat-center .gc-group-messages,#directMessages,#scrimChatRoom .scrim-chat-messages{
  overscroll-behavior:contain;-webkit-overflow-scrolling:touch;overflow-anchor:auto;scroll-behavior:auto!important;touch-action:pan-y;
 }
 #chat-center .gc-composer input,#chat-center .gc-group-composer input,#directInput{font-size:16px!important}
 html body.topup-chat-open.chat-focus-mode.keyboard-open #chat-center #gc-chat-view.is-active .gc-composer,
 html body.group-room-open.keyboard-open #chat-center #gc-group-room .gc-group-composer,
 html body.direct-room-open.keyboard-open #chat-center #gnexDirectRoom #directComposer{padding-bottom:9px!important}

 /* Safari can expose the enlarged screen before firing visualViewport.resize
    on keyboard dismissal. Keep an opaque chat surface behind the moving panel. */
 html body.topup-chat-open.chat-focus-mode:has(#gc-chat-view.is-active) #chat-center{
  inset:0!important;height:100vh!important;height:100lvh!important;
  background:#102631!important;transform:none!important;transition:none!important;
 }
 html body.topup-chat-open.chat-focus-mode:has(#gc-chat-view.is-active) #chat-center .gc-panel{
  position:absolute!important;inset:var(--gc-visual-top,0px) 0 auto!important;
  height:var(--gc-visual-height,100dvh)!important;
 }
}
/* The Scrim promo strip occupies space above the room. Keep the shell and
   its fixed descendants inside the remaining visual viewport. */
html body.topup-chat-open.group-room-open.scrim-navigation-context #chat-center .gc-panel>.gc-shell{
 height:calc(100% - var(--scrim-promo-space,0px))!important;min-height:0!important;
}
html body.topup-chat-open.group-room-open.scrim-navigation-context #chat-center #gc-group-room.is-active{
 height:100%!important;max-height:100%!important;min-height:0!important;
 grid-template-rows:auto minmax(0,1fr) auto!important;
}
