/* ============================================================
   Ajustes para celular (03/11/2026) — carregado por último, só sobrepõe.
   Desktop não muda: tudo fica dentro de media query de toque/tela pequena.
   ============================================================ */

/* 5 · o iOS/Android não aumentam o texto sozinhos ao girar a tela */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

/* 4 · sem atraso de toque e sem o clarão azul ao tocar */
a, button, summary, label, select, [role="button"], [data-act] {
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

/* 3 · altura real da tela no celular (a barra do navegador não corta o rodapé) */
@supports (height: 100dvh) {
  .ob { min-height: calc(100dvh - var(--header-h) - 40px); }
  .pn { min-height: calc(100dvh - var(--header-h)); }
  .chat { height: calc(100dvh - var(--header-h) - 140px); }
  .msn-msgs { height: clamp(300px, calc(100dvh - 470px), 680px); }
}

/* ROLAGEM DO BATE-PAPO: a caixa de mensagens "prendia" o dedo (overscroll-behavior: contain),
   então tocar nela não rolava a página. No celular a rolagem passa para a página quando a lista chega ao fim
   ou quando ela não tem o que rolar. */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .msn-msgs, .chat-msgs, .av-chat .msn-msgs { overscroll-behavior: auto; touch-action: pan-y; }
  .msn-msgs { height: clamp(240px, 46dvh, 520px); }
  .av-chat .msn-msgs { height: clamp(240px, 46dvh, 420px); }
  .chat { height: clamp(420px, 70dvh, 720px); min-height: 0; }
}

/* 2 · campos com 16px: o iPhone não dá zoom ao focar */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  input, select, textarea, .field, .chat-form textarea, .acct-add input { font-size: 16px; }
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, .field, .acct-add input { min-height: 48px !important; }
  .acct-add input { height: 48px; }
}

/* 1 · área de toque de 48px (botões, chips, ícones, itens de menu) */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .btn, .btn-sm, .btn-xs, .chip-btn, .icon-btn, .menu-btn,
  .esc-andares .chip-btn, .esc-abas .chip-btn, .esc-total .chip-btn, .esc-barra .chip-btn,
  .cat-list > button, .aj-chip, .text-btn, .msn-ferr > button, .msn-ferr > a, .side-item, .mobile-nav a, .acc-nav .acc-tab, .market-tabs button, .com-secoes > * {
    min-height: 48px !important;
  }
  .icon-btn, .menu-btn { min-width: 48px; width: 48px; height: 48px; }
  .btn-sm, .btn-xs, .chip-btn, .esc-andares .chip-btn, .esc-abas .chip-btn, .esc-total .chip-btn, .esc-barra .chip-btn { height: auto; }
  .btn-sm, .btn-xs { padding-inline: 16px; font-size: 14px; }
  .chat-del, .msn-del { min-width: 40px; min-height: 40px; }
}

/* Bate-papo: chips pequenos (reações, responder, denunciar, resumo de emoji) mantêm o visual, mas ganham 48px de área de toque */
@media (hover: none) and (pointer: coarse), (max-width: 768px) {
  .msn-pe .bp-reacao, .bp-reagir summary, .msn-denunciar, .msn-responder, .msn-emojis summary { position: relative; }
  .msn-pe .bp-reacao::after, .bp-reagir summary::after, .msn-denunciar::after, .msn-responder::after, .msn-emojis summary::after {
    content: ""; position: absolute; left: 50%; top: 50%; width: max(100%, 48px); height: 48px; transform: translate(-50%, -50%);
  }
  .msn-denunciar { opacity: .7; }
  .bp-som, .msn-formato .bp-som { width: 48px !important; height: 48px !important; }
  .bp-reagir-menu { flex-wrap: wrap; max-width: calc(100vw - 32px); }
  .bp-reagir-menu .bp-reacao { height: 48px; min-width: 48px; }
  .msn-emojis-menu { grid-template-columns: repeat(5, 48px); }
  .msn-emojis-menu button { width: 48px; height: 48px; }
  .chat-form .btn, .msn-pe + * .btn, #app form .btn { min-height: 48px !important; }
}

/* 8 · textos de leitura com no mínimo 12px no celular (selos, gráficos e avatares ficam como estão) */
@media (max-width: 768px) {
  .chat-dia span, .chat-meta time, .chat-autor .chip, .msn-dia, .msn-nome .chip, .bp-previa-info, .dica,
  .robo-card .plat, .robo-card .kpis .l, .robo-card .bottom .cap .l, .robo-card .incluso, .float-metric .l,
  .period-opt .p small, .plan .ribbon, .ao-vivo, .sala-dl dt, .men-item small, .in-selo, .in-cont-tx em,
  .in-app-tx em, .pn-dica span, .table th, .footer h4, .logo small { font-size: 12px; }
}

/* indicador "a página continua abaixo" (criado por js/mobile.js) */
.rolar-dica {
  position: fixed; left: 16px; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 70;
  width: 48px; height: 48px; border-radius: 50%; display: none; place-items: center; padding: 0;
  background: var(--surface-4, #2a2d31); color: var(--text, #fff); border: 1px solid var(--line-2, rgb(255 255 255 / .2));
  box-shadow: 0 8px 24px -8px #000; cursor: pointer;
  opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease;
}
.rolar-dica svg { width: 22px; height: 22px; animation: rolar-dica-pulo 1.6s ease-in-out infinite; }
.rolar-dica.on { opacity: 1; transform: none; }
@keyframes rolar-dica-pulo { 0%, 100% { transform: translateY(-2px); } 50% { transform: translateY(3px); } }
@media (max-width: 768px) { .rolar-dica { display: grid; } }
@media (prefers-reduced-motion: reduce) { .rolar-dica, .rolar-dica svg { transition: none; animation: none; } }
body.lateral-aberta .rolar-dica, body:has(#modal) .rolar-dica { display: none; }
