/* Constrain the page and allow vertical scrolling inside the publication sheet. */
html, body { max-width: 100%; overflow-x: clip; }
body:has(.np-tela) { overflow: hidden; }
.np-tela, .np-tela * { box-sizing: border-box; }
.np-tela { left: 0; right: 0; width: 100%; max-width: 100%; }
.np-tela .modal-nova-pub, .np-corpo, .np-midias, .np-config, .np-lista, .np-item, .np-item-info, .np-cab > div, .np-rodape > div { min-width: 0; max-width: 100%; }
.np-corpo { overflow-x: hidden; overscroll-behavior: contain; touch-action: pan-y pinch-zoom; }
.np-tela input, .np-tela textarea, .np-tela select { min-width: 0; max-width: 100%; }
.np-espaco { min-width: 0; }
.np-espaco > * { min-width: 0; }
.np-ajuste { color: var(--texto-2); font-size: 12px; line-height: 1.5; }
.np-envio { flex: 1; min-width: 0; }
.np-envio-titulo { display: flex; align-items: center; gap: 9px; }
.np-envio-trilha { height: 4px; border-radius: 9px; background: var(--linha-forte); overflow: hidden; margin-top: 9px; }
.np-envio-trilha > i { display: block; height: 100%; background: var(--ok); border-radius: inherit; transition: width .35s ease; }
.np-rodape .np-envio-detalhe { display: block; font-size: 11px; color: var(--texto-2); overflow-wrap: anywhere; margin-top: 5px; }
.np-spinner { display: inline-block; flex: none; width: 17px; height: 17px; border: 2px solid var(--linha-forte); border-top-color: var(--marca); border-radius: 50%; animation: np-girar .8s linear infinite; }
@keyframes np-girar { to { transform: rotate(360deg); } }
@media (max-width: 760px) {
  body:has(.np-tela) { position: fixed; inset: 0; width: 100%; }
  .np-tela { width: 100%; border-radius: 0; }
  .np-cab { gap: 12px; padding: 16px; flex-shrink: 0; }
  .np-cab .btn { flex: none; }
  .np-cab h1 { font-size: 22px; }
  .np-corpo { display: block; width: 100%; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  .np-midias, .np-config { width: 100%; padding: 18px 16px; }
  .np-tela .np-item { grid-template-columns: minmax(0, 1fr); }
  .np-item-media { width: 100%; }
  .np-item-info { width: 100%; }
  .np-secao-cab { flex-wrap: wrap; gap: 8px; }
  .np-rodape { gap: 12px; padding: 12px 16px max(12px, env(safe-area-inset-bottom)); }
  .np-rodape .np-envio { width: 100%; flex-basis: 100%; }
  .np-rodape .btn { min-height: 46px; }
  .np-rodape b { font-size: 13px; }
  /* Safari video layers must stay inside their own non-shrinking media box. */
  .modal-post { display: block; max-height: 90svh; overflow-y: auto; overflow-x: hidden; }
  .modal-post-midia { position: relative; display: block; height: min(50svh, 480px); min-height: 0; width: 100%; overflow: hidden; isolation: isolate; contain: paint; flex: none; }
  .modal-post-midia video, .modal-post-midia img { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; object-fit: contain; }
  .modal-post-lado { position: relative; z-index: 1; display: flex; background: var(--superficie); overflow: visible; padding: 18px 16px; }
}
@media (prefers-reduced-motion: reduce) { .np-spinner { animation: none; border-top-color: var(--texto); } .np-envio-trilha > i { transition: none; } }
.dm-msg-acoes .dm-responder-instagram { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 30px; padding: 3px 8px; color: var(--texto-2); font-size: 10px; text-decoration: none; border-radius: 8px; }
.dm-responder-instagram svg { width: 14px; height: 14px; flex: none; }
.dm-responder-instagram:hover { color: var(--marca); background: var(--marca-suave); }
.dm-compartilhado { display: flex; flex-direction: column; width: min(240px, 100%); min-width: 160px; border: 1px solid var(--linha-forte); border-radius: 16px; overflow: hidden; text-decoration: none; color: inherit; background: var(--superficie-2); }
.dm-compartilhado > img { width: 100%; max-height: 300px; object-fit: cover; }
.dm-compartilhado > span:last-child { padding: 12px; }
.dm-compartilhado b, .dm-compartilhado small { display: block; }
.dm-compartilhado b { font-size: 12px; line-height: 1.5; }
.dm-compartilhado small { font-size: 10px; margin-top: 4px; color: var(--marca-clara); }
.dm-compartilhado-icone { display: grid; place-items: center; height: 90px; color: var(--texto-3); }
.dm-compartilhado-icone svg { width: 28px; height: 28px; }
.dm-anexo-video > a { display: inline-block; margin-top: 6px; font-size: 11px; color: var(--marca-clara); }
.dm-video-falha { display: none; }
.dm-anexo-video.falhou .dm-video-falha { display: block; padding: 12px 0; color: var(--texto-2); font-size: 12px; }
