/* Chat em tela pequena (06/11/2026): a conversa ocupa a tela; a lista de conversas abre pelo menu, por cima. No computador nada muda. */
#menuBtn, #sideFundo { display: none; }
@media (max-width: 760px) {
  body { height: 100dvh; }
  #main { width: 100%; }
  #side {
    position: fixed; top: 0; bottom: 0; left: 0; z-index: 950;
    width: min(300px, 86vw); border-radius: 0 18px 18px 0;
    transform: translateX(-105%);
  }
  body.side-aberto #side { transform: none; }
  #sideFundo { position: fixed; inset: 0; z-index: 940; background: rgba(6, 20, 16, .55); }
  body.side-aberto #sideFundo { display: block; }
  /* A lista por cima pede fundo denso: atrás dela há conversa, não a foto */
  html:not([data-tema="claro"]) #side { background: var(--v-vidro-solido); }
  html[data-tema="claro"] #side { background: #f4f7f5; }

  #menuBtn {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 40px; height: 40px; border: 0; border-radius: 12px; cursor: pointer;
    background: transparent; color: var(--ink);
  }
  #menuBtn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
  header { gap: 6px; padding: 6px 8px !important; }
  header .hdr-ava { display: none; }
  .seg { flex: 0 1 auto; }
  .seg .tx { display: none; }
  .seg a { padding: 8px 7px; }
  header .hdr-icons { gap: 0; }

  #chat { padding: 12px 10px; }
  .msg { max-width: 100%; gap: 7px; }
  .avatar { width: 28px; height: 28px; font-size: 14px; }
  .msg.user .avatar { font-size: 10px; }
  .bubble { min-width: 0; overflow-x: auto; }
  footer { padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); }
  .hint { display: none; }
  #inp { font-size: 16px; min-width: 0; }   /* abaixo de 16px o iPhone dá zoom ao focar */
  #attach { width: 42px; flex-shrink: 0; }
  #send { padding: 0 12px; font-size: 0; gap: 0; flex-shrink: 0; }
  #send svg { width: 18px; height: 18px; }
  body #espaco { width: 100vw; border-radius: 0; }
  #cfg { padding: 0; }
  #cfg .box { height: 100dvh; border-radius: 0; }
  #cfg .top { flex-wrap: wrap; gap: 6px; padding: 10px 12px; }
}
@media (max-width: 760px) {
  #espacoBtn { font-size: 0 !important; gap: 0 !important; padding: 0 9px !important; }
  #espacoBtn svg { flex-shrink: 0; }
  header .hdr-icons > button[title="Opções"] { display: none; }
  .seg { min-width: 0; overflow-x: auto; scrollbar-width: none; }
}
