/* v1.8 · F05 – iPhone / Safari iOS */
/* 100vh on a phone includes the area behind the browser bars; dvh is what is really visible. */
:root{--vh100:100vh;--zsc-kb:0px}
@supports (height:100dvh){:root{--vh100:100dvh}}
/* No grey flash on tap. */
html{-webkit-text-size-adjust:100%;text-size-adjust:100%;-webkit-tap-highlight-color:transparent}
/* Buttons that only appeared under the mouse are always there on touch screens. */
html.zsc-touch .ph18-ra,html.zsc-touch .dk18-btn,html.zsc-touch #workPet.pet18-compact .pet18-toggle{opacity:1!important}
@media (max-width:760px){
  /* No sideways scrolling of the page itself. */
  html,body{max-width:100%;overflow-x:hidden}
  /* Home-screen app on iPhone: keep clear of the notch / status bar. A transparent border adds the space without
     touching each screen's own padding. */
  html.m18 #appView>.sidebar,html.m18 #appView>.chat-pane,html.m18 #appView>#detailPane,html.m18 .modal>.modal-card{border-top:env(safe-area-inset-top,0px) solid transparent!important;box-sizing:border-box}
  html.m18 #authView.auth-shell{padding-top:calc(20px + env(safe-area-inset-top,0px))!important;min-height:var(--vh100)}
  /* Full-screen pages use the visible height. */
  html.m18 .modal>.modal-card{height:var(--vh100)!important;max-height:var(--vh100)!important}
  /* Keyboard open on iOS: lift everything that sits at the bottom above it and hide the tab bar. */
  html.m18.zsc-kb .m18-nav{display:none!important}
  html.m18.zsc-kb #appView>.sidebar,html.m18.zsc-kb #appView>.chat-pane,html.m18.zsc-kb #appView>#detailPane{bottom:var(--zsc-kb)!important}
  html.m18.zsc-kb .modal>.modal-card{height:calc(var(--vh100) - var(--zsc-kb))!important;max-height:calc(var(--vh100) - var(--zsc-kb))!important}
  html.m18.zsc-kb .att18-bar,html.m18.zsc-kb .toast{bottom:calc(var(--zsc-kb) + 12px)!important}
  /* Touch targets. */
  html.m18 button,html.m18 select,html.m18 [role=button]{touch-action:manipulation}
  html.m18 .chat-pane .composer{padding-bottom:8px!important}
  /* Momentum scrolling inside the long lists. */
  html.m18 .messages,html.m18 .internal-message-stage,html.m18 .conversation-list{-webkit-overflow-scrolling:touch;overscroll-behavior:contain}
}

/* 27/10/2026 · Dien thoai: thanh cong cu hoi thoai Zalo khong bi cat nut cuoi (vi du "NV").
   Cho vuot ngang, khong xuong dong, co vet mo ben phai bao con nut phia sau. */
html.m18 .internal-chat-head .button-row:not(.cb18-row){flex-wrap:nowrap!important;overflow-x:auto;overflow-y:hidden;-webkit-overflow-scrolling:touch;scrollbar-width:none;padding-right:14px;
  -webkit-mask-image:linear-gradient(to right,#000 calc(100% - 16px),transparent 100%);mask-image:linear-gradient(to right,#000 calc(100% - 16px),transparent 100%);}
html.m18 .internal-chat-head .button-row:not(.cb18-row)::-webkit-scrollbar{display:none}
html.m18 .internal-chat-head .button-row:not(.cb18-row)>*{flex:0 0 auto!important}
/* ten nhom 1 dong, co dau ... thay vi xuong 2 dong lam chat dau trang */
html.m18 .internal-chat-head #zgsTitle{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
html.m18 .internal-chat-head>div:first-child{min-width:0;flex:1 1 auto;overflow:hidden}
