/* Mobile UX hardening: no accidental zoom, selection or blue focus chrome. */
html,body{
  touch-action:pan-x pan-y;
  -webkit-text-size-adjust:100%;
  text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
}
body,body *{
  -webkit-tap-highlight-color:transparent;
}
/* The app itself is not a document editor: normal text must never be selected while swiping/holding. */
body.has-app,
body.has-app *:not(input):not(textarea):not([contenteditable="true"]){
  -webkit-user-select:none!important;
  user-select:none!important;
  -webkit-touch-callout:none;
}
body.has-app img,body.has-app video,body.has-app svg{
  -webkit-user-drag:none;
  user-drag:none;
}
/* Editable controls still need a caret, but no blue focus halo. 16px prevents Safari focus zoom. */
input,textarea,select,[contenteditable="true"]{
  font-size:16px!important;
  outline:none!important;
  -webkit-tap-highlight-color:transparent!important;
}
button:focus,button:focus-visible,
input:focus,input:focus-visible,
textarea:focus,textarea:focus-visible,
select:focus,select:focus-visible,
[tabindex]:focus,[tabindex]:focus-visible{
  outline:none!important;
  outline-offset:0!important;
  box-shadow:none!important;
}
.search:focus-within,.capsule:focus-within,
#loginFields input:focus,#registerFields input:focus,
#groupTitle:focus,.poll-field input:focus,.poll-option-input input:focus,
.tools-search:focus,.control-page input:focus,.control-page textarea:focus{
  outline:none!important;
  box-shadow:none!important;
  border-color:var(--separator,var(--line))!important;
}
/* iPhone chat header: search replaces the three-dots menu. */
@media(max-width:899px){
  .head-tools #chatMenuBtn{display:none!important}
  .head-tools #chatSearchBtn{display:grid!important}
  .chat-head .head-tools #chatSearchBtn{width:44px!important;height:44px!important;min-width:44px!important;min-height:44px!important;border:0!important;background:transparent!important;color:var(--accent)!important}
  .chat-head .head-tools #chatSearchBtn:active{opacity:.52!important;background:transparent!important}
}
/* Shared media: only real image thumbnails, no generic mountain/sun placeholder tiles. */
.tgios-profile-media-item{background:var(--background-secondary,#e5e5ea)!important}
.tgios-profile-media-item img{width:100%!important;height:100%!important;object-fit:cover!important;display:block!important}
.tgios-profile-media-item.is-locked{display:none!important}
.tgios-profile-voice-row.is-vnote{min-height:64px}
.tgios-profile-vnote-thumb{width:42px;height:42px;flex:0 0 42px;border-radius:50%;overflow:hidden;background:var(--background-secondary,#e5e5ea);display:grid;place-items:center;color:var(--accent,#0a84ff)}
.tgios-profile-vnote-thumb video{width:100%;height:100%;object-fit:cover;display:block;border-radius:50%}
.tgios-profile-vnote-thumb svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7;stroke-linecap:round;stroke-linejoin:round}
