/* Rede (iLezgo) - estilos do app. Celular primeiro (360 a 430px); no computador o conteúdo fica
   centralizado em até 480px. Cores, fonte e formas vêm SÓ das variáveis de /css/tema.css. */

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--fonte);
  font-size: 1rem;
  line-height: 1.5;
  background: var(--fundo);
  color: var(--texto);
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
/* Com login: a barra de topo cuida da área segura de cima (fica grudada no topo, inclusive embaixo do relógio) */
body.com-barra { padding-top: 0; padding-bottom: calc(var(--altura-barra) + env(safe-area-inset-bottom) + 24px); }
/* Campo focado ou rolado até a vista nunca fica escondido atrás das barras */
html:has(> body.com-barra) {
  scroll-padding-top: calc(var(--altura-topo) + env(safe-area-inset-top) + 8px);
  scroll-padding-bottom: calc(var(--altura-barra) + env(safe-area-inset-bottom) + 8px);
}

/* Foco sempre visível no teclado */
:focus-visible { outline: 3px solid var(--foco); outline-offset: 2px; border-radius: 6px; }
main:focus, h1:focus, h2:focus { outline: none; }

.pular {
  position: absolute; left: 8px; top: -100px; z-index: 30;
  background: var(--superficie); color: var(--texto); padding: 8px 12px; border-radius: 8px;
}
.pular:focus { top: 8px; }
/* Só para leitores de tela (ex.: o título "Início" do feed) */
.so-leitor {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Ícones: traço de 2px na cor do texto + preenchimento amarelo deslocado */
.icone { width: 24px; height: 24px; flex: none; color: inherit; }
.icone.pequeno { width: 18px; height: 18px; }
.icone.grande { width: 52px; height: 52px; }
.ic-traco { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-fundo { fill: var(--amarelo); stroke: none; }
.ic-ponto { fill: currentColor; stroke: none; }

/* Escrita da marca ("iLezgo"): o "i" é desenhado (haste + pingo amarelo), não é letra; o resto vem do textos.js.
   A cor da haste e do texto é a cor do elemento (roxo no fundo claro, branco no fundo roxo); o pingo é sempre amarelo. */
.escrita {
  display: inline-flex; align-items: baseline;
  font-family: var(--fonte); font-weight: 800; line-height: 1; letter-spacing: -0.03em; white-space: nowrap;
}
.escrita-i {
  position: relative; display: inline-block; flex: none;
  width: 0.13em; height: 0.54em; margin: 0 0.06em 0 0.03em; /* base na linha do texto; folga para o pingo */
  border-radius: 0.065em; background: currentColor;
}
.escrita-i::before {
  content: ""; position: absolute; left: 50%; bottom: calc(100% + 0.08em);
  width: 0.19em; height: 0.19em; margin-left: -0.095em; border-radius: 50%; background: var(--amarelo);
}

/* Telas de entrada (sem login): faixa roxa no alto com a escrita grande em branco e o slogan, acima do formulário */
.topo {
  margin: calc(-1 * env(safe-area-inset-top)) calc(-1 * env(safe-area-inset-right)) 0 calc(-1 * env(safe-area-inset-left));
  padding: calc(env(safe-area-inset-top) + 40px) 16px 28px;
  background: var(--roxo); color: var(--sobre-roxo); text-align: center;
}
.marca { display: inline-block; font-size: 3rem; color: var(--sobre-roxo); }
.topo-slogan { margin: 12px 0 0; font-size: 1.125rem; font-weight: 600; color: var(--sobre-roxo); }

/* ---------- barra de topo (com login) ---------- */
.barra-topo {
  position: sticky; top: 0; z-index: 20;
  margin: 0 calc(-1 * env(safe-area-inset-right)) 0 calc(-1 * env(safe-area-inset-left));
  padding: env(safe-area-inset-top) env(safe-area-inset-right) 0 env(safe-area-inset-left);
  background: var(--superficie); border-bottom: 1px solid var(--borda);
}
.barra-topo-dentro {
  position: relative; display: flex; align-items: center; gap: 4px;
  max-width: var(--largura-max); height: var(--altura-topo); margin: 0 auto; padding: 0 8px 0 16px;
}
.marca-topo {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-right: auto; padding-right: 8px;
  font-weight: 800; font-size: 1.5rem; line-height: 1; letter-spacing: -0.03em;
  color: var(--roxo-texto); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
.marca-topo img { width: 28px; height: 28px; border-radius: 8px; flex: none; }
.botao-topo {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--texto); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.botao-topo:hover, .botao-topo[aria-expanded="true"] { background: var(--roxo-suave); }
.botao-topo .icone { width: 26px; height: 26px; }
.botao-topo:focus-visible { border-radius: 50%; }

.menu-topo {
  position: absolute; top: calc(100% + 4px); right: 8px; width: min(280px, calc(100vw - 32px));
  padding: 6px; background: var(--superficie); border: 1px solid var(--borda);
  border-radius: var(--raio-cartao); box-shadow: var(--sombra-menu);
}
.menu-topo ul { list-style: none; margin: 0; padding: 0; }
.menu-topo .item-menu {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 48px; padding: 10px 12px;
  border: 0; border-radius: 12px; background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--texto); text-align: left; text-decoration: none;
}
.menu-topo .item-menu:hover { background: var(--roxo-suave); color: var(--roxo-suave-texto); }
.menu-topo .item-menu .icone { color: var(--roxo-texto); }
.menu-topo li:last-child { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--borda); }

main { max-width: var(--largura-max); margin: 0 auto; padding: 8px 16px 32px; }

h1 { font-size: 1.6rem; font-weight: 800; line-height: 1.2; margin: 20px 0 6px; letter-spacing: -0.02em; overflow-wrap: anywhere; }
h2 { font-size: 1.1rem; font-weight: 800; margin: 0 0 8px; }
p { margin: 0 0 12px; }
a { color: var(--roxo-texto); font-weight: 600; text-underline-offset: 3px; }

.suave { color: var(--texto-suave); }
.dica { color: var(--texto-suave); font-size: 0.875rem; margin: 6px 0 0; }
.centro { text-align: center; }

/* ---------- cartões, selos ---------- */
.cartao {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao);
  padding: 16px; margin-top: 16px;
}
.selo {
  display: inline-block; padding: 3px 10px; border-radius: var(--raio-selo);
  font-size: 0.8125rem; font-weight: 700; line-height: 1.4;
}
.selo.amarelo { background: var(--amarelo); color: var(--sobre-amarelo); }
.selo.nivel { background: var(--roxo-suave); color: var(--roxo-suave-texto); font-size: 0.75rem; padding: 1px 8px; vertical-align: 1px; }

/* ---------- botões ---------- */
.botao {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: var(--altura-botao); padding: 10px 18px;
  font: inherit; font-weight: 700; line-height: 1.2; text-align: center; text-decoration: none;
  border-radius: var(--raio-botao); border: 1.5px solid transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.botao.principal { background: var(--roxo); color: var(--sobre-roxo); }
.botao.principal:hover { background: var(--roxo-hover); }
.botao.secundario { background: var(--superficie); color: var(--texto); border-color: var(--borda-campo); }
.botao.secundario:hover { background: var(--roxo-suave); }
.botao.perigo { background: var(--erro); color: var(--superficie); }
.botao.estado { background: var(--roxo-suave); color: var(--roxo-suave-texto); cursor: default; }
.botao.largo { width: 100%; margin-top: 8px; }
.botao.pequeno { padding: 8px 14px; font-size: 0.9375rem; }
.botao:disabled, .botao[aria-busy="true"] { opacity: 0.6; cursor: not-allowed; }
.botao[aria-busy="true"] { cursor: progress; }

.acoes { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.acoes > .botao { flex: 1 1 0; min-width: 9rem; }
.acoes-dica { flex-basis: 100%; text-align: center; margin: 0; }
.acoes.invertidas { flex-direction: row-reverse; }

/* ---------- formulários ---------- */
form { margin-top: 16px; }
.campo { margin-bottom: 16px; }
label { display: block; font-weight: 700; margin-bottom: 6px; }

input[type="text"], input[type="email"], input[type="password"], input[type="tel"], input[type="date"], textarea {
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  font: inherit;
  color: var(--texto);
  background: var(--superficie);
  border: 1.5px solid var(--borda-campo);
  border-radius: var(--raio-campo);
}
textarea { resize: vertical; min-height: 104px; line-height: 1.45; }
input[type="date"] { appearance: none; -webkit-appearance: none; display: block; }
input:focus-visible, textarea:focus-visible { outline-offset: 1px; border-color: var(--foco); }
[aria-invalid="true"] { border-color: var(--erro) !important; }
input::placeholder, textarea::placeholder { color: var(--texto-suave); opacity: 0.75; }

.duas-colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
@media (max-width: 359px) { .duas-colunas { grid-template-columns: 1fr; } }

/* Campo com "@" na frente (busca) */
.com-prefixo { position: relative; }
.com-prefixo .prefixo { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--texto-suave); font-weight: 700; }
.com-prefixo input { padding-left: 34px; }

/* Senha com botão "Mostrar" dentro do campo */
.senha { position: relative; }
.senha input { padding-right: 96px; }
.ver-senha {
  position: absolute; right: 4px; top: 4px; bottom: 4px;
  min-width: 80px; padding: 0 12px;
  font: inherit; font-size: 0.9375rem; font-weight: 700;
  color: var(--roxo-texto); background: transparent; border: 0; border-radius: 10px; cursor: pointer;
}

.campo.marcar { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 10px; }
.campo.marcar label { margin: 0; font-weight: 500; flex: 1; }
.campo.marcar .erro-campo { flex-basis: 100%; }
input[type="checkbox"], input[type="radio"] { width: 22px; height: 22px; margin: 0; accent-color: var(--roxo); flex: none; }

/* Regras da senha: viram ✓ quando atendidas */
.regras { list-style: none; padding: 0; margin: 10px 0 0; font-size: 0.875rem; color: var(--texto-suave); }
.regras li { padding-left: 1.6em; position: relative; margin-bottom: 2px; }
.regras li::before { content: "•"; position: absolute; left: 0.4em; }
.regras li.ok { color: var(--ok); }
.regras li.ok::before { content: "✓"; left: 0.2em; }
.regras li.falha { color: var(--erro); }
.regras li.falha::before { content: "✗"; left: 0.2em; }

.erro-campo { color: var(--erro); font-size: 0.875rem; font-weight: 700; margin: 6px 0 0; }
.alerta {
  background: var(--erro-fundo); color: var(--erro);
  border: 1.5px solid var(--erro); border-radius: var(--raio-campo);
  padding: 12px 14px; margin: 0 0 16px; font-weight: 700;
}

/* Grupos de opções (privacidade). legend "flutuando" para não cortar a borda do cartão */
fieldset.grupo { min-width: 0; }
fieldset.grupo legend { float: left; width: 100%; padding: 0; margin-bottom: 10px; font-weight: 800; }
fieldset.grupo legend + * { clear: both; }

.opcao-grande {
  display: flex; align-items: flex-start; gap: 12px; margin: 0 0 10px;
  padding: 12px 14px; border: 1.5px solid var(--borda); border-radius: var(--raio-campo); cursor: pointer; font-weight: 500;
}
.opcao-grande:has(input:checked) { border-color: var(--roxo-texto); background: var(--roxo-suave); }
.opcao-grande:has(input:disabled) { opacity: 0.55; cursor: not-allowed; }
.opcao-grande input { margin-top: 2px; }
.opcao-grande strong { display: block; }
.opcao-grande .dica { display: block; margin: 2px 0 0; }

.legenda-niveis p { margin: 0 0 4px; font-size: 0.9375rem; }
.legenda-niveis p:last-child { margin: 0; }

.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; clear: both; }
.segmentos label { position: relative; margin: 0; }
.segmentos input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; margin: 0; }
.segmentos span {
  display: flex; align-items: center; justify-content: center; min-height: var(--altura-botao);
  border: 1.5px solid var(--borda-campo); border-radius: var(--raio-botao);
  font-weight: 700; font-size: 0.9375rem; color: var(--texto); background: var(--superficie);
}
.segmentos input:checked + span { background: var(--roxo); border-color: var(--roxo); color: var(--sobre-roxo); }
.segmentos input:focus-visible + span { outline: 3px solid var(--foco); outline-offset: 2px; }
.campo-privacidade .padrao { margin-top: 8px; }

/* ---------- Início ---------- */
.destaque-capa {
  position: relative; overflow: hidden; margin-top: 16px; padding: 22px 16px 16px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao);
}
.destaque-capa::before { content: ""; position: absolute; inset: 0 0 auto; height: 8px; background: var(--capa); }
/* Slogan: o título em destaque e o texto menor mais discreto; quebram por igual em telas estreitas (360px) */
.destaque-titulo {
  margin: 0 0 6px; font-weight: 800; font-size: 1.75rem; line-height: 1.15; letter-spacing: -0.02em;
  text-wrap: balance; overflow-wrap: anywhere;
}
.destaque-texto { margin: 0; font-size: 0.9375rem; line-height: 1.45; color: var(--texto-suave); text-wrap: pretty; }

.atalho { display: flex; align-items: center; gap: 14px; color: var(--texto); text-decoration: none; font-weight: 500; margin-top: 12px; }
.atalho:hover { border-color: var(--roxo-texto); }
.atalho .icone { width: 28px; height: 28px; color: var(--roxo-texto); }
.atalho strong { display: block; }
.atalho .dica { display: block; margin: 0; }

.em-breve {
  margin-top: 16px; padding: 14px 16px; border-radius: var(--raio-cartao);
  background: var(--roxo-suave); color: var(--roxo-suave-texto); font-weight: 700; text-align: center;
}

/* ---------- Perfil ---------- */
.tela-perfil { text-align: center; position: relative; }
/* Botão ⋯ (Denunciar/Bloquear) sobre a capa, no perfil de outra pessoa */
.perfil-menu {
  position: absolute; top: 12px; right: 0; display: grid; place-items: center;
  width: 44px; height: 44px; padding: 0; border-radius: 50%; cursor: pointer;
  background: var(--superficie); color: var(--texto); border: 1px solid var(--borda);
}
.perfil-menu:hover { background: var(--roxo-suave); }
@media (min-width: 481px) { .perfil-menu { top: 10px; right: 10px; } }
.perfil-capa { height: var(--altura-capa); margin: -8px -16px 0; background: var(--capa); border-radius: 0 0 24px 24px; }
@media (min-width: 481px) { .perfil-capa { margin: 0; border-radius: 24px; } }
.perfil-topo { display: flex; justify-content: center; margin-top: calc(var(--avatar) / -2); }

.avatar {
  display: inline-grid; place-items: center; flex: none; overflow: hidden;
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--roxo-suave); color: var(--sobre-avatar);
  font-weight: 800; font-size: 1rem; letter-spacing: 0.02em; user-select: none;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.grande {
  width: var(--avatar); height: var(--avatar); font-size: 2rem;
  border: var(--avatar-borda) solid var(--fundo); box-sizing: content-box;
}
.avatar-0 { background: var(--avatar-0); } .avatar-1 { background: var(--avatar-1); }
.avatar-2 { background: var(--avatar-2); } .avatar-3 { background: var(--avatar-3); }
.avatar-4 { background: var(--avatar-4); } .avatar-5 { background: var(--avatar-5); }
.avatar-6 { background: var(--avatar-6); } .avatar-7 { background: var(--avatar-7); }

.perfil-nome { font-size: 22px; font-weight: 800; margin: 10px 0 0; }
.perfil-username { color: var(--texto-suave); margin: 0 0 8px; overflow-wrap: anywhere; }
.selos { margin: 0 0 8px; }
.perfil-bio { white-space: pre-line; overflow-wrap: anywhere; margin: 0 auto 8px; max-width: 34ch; }
.perfil-local { display: inline-flex; align-items: center; gap: 6px; color: var(--texto-suave); margin: 0 0 4px; font-weight: 600; }
.perfil-local .icone { color: var(--texto-suave); }
.perfil-estado { padding-top: 8px; }

.numeros {
  list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 14px 0 0; padding: 12px 0;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao);
}
.numeros li { display: flex; flex-direction: column; align-items: center; }
.numeros li + li { border-left: 1px solid var(--borda); }
.numeros strong { font-size: 1.25rem; font-weight: 800; line-height: 1.2; }
.numeros span { font-size: 0.8125rem; color: var(--texto-suave); }

.restrito {
  display: flex; align-items: center; gap: 12px; text-align: left; margin-top: 16px; padding: 14px 16px;
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao);
}
.restrito .icone { width: 32px; height: 32px; color: var(--roxo-texto); }
.restrito p { margin: 0; }

.links-perfil { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px 20px; margin: 14px 0 0; }
.links-perfil a { display: inline-flex; align-items: center; min-height: 44px; }

.tela-perfil .alerta { margin-top: 16px; text-align: left; }

.abas { display: grid; grid-template-columns: repeat(3, 1fr); margin-top: 18px; border-bottom: 1px solid var(--borda); }
.abas [role="tab"] {
  min-height: var(--altura-botao); font: inherit; font-weight: 700; color: var(--texto-suave);
  background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -1px; cursor: pointer;
}
.abas [role="tab"][aria-selected="true"] { color: var(--roxo-texto); border-bottom-color: var(--roxo-texto); }
.painel { padding: 16px 0 0; text-align: left; }
.painel:focus-visible { outline-offset: 4px; }
.vazio { text-align: center; padding: 28px 16px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao); }
.vazio .icone { color: var(--texto-suave); margin-bottom: 6px; }
.vazio p { margin: 0 0 2px; }

.sobre { margin: 0; padding: 4px 16px; background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao); }
.sobre dt { font-size: 0.8125rem; font-weight: 700; color: var(--texto-suave); padding-top: 12px; }
.sobre dd { margin: 2px 0 0; padding-bottom: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.sobre dd:not(:last-child) { border-bottom: 1px solid var(--borda); }

/* ---------- telas internas (editar, privacidade, amigos, convites) ---------- */
.voltar { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; margin-top: 8px; text-decoration: none; }
.voltar + h1 { margin-top: 4px; }

.contador { color: var(--texto-suave); font-weight: 600; }

.pessoas { list-style: none; margin: 0; padding: 0; }
.pessoa { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-top: 1px solid var(--borda); }
.pessoa:first-child { border-top: 0; padding-top: 0; }
.pessoa-link { display: flex; align-items: center; gap: 12px; min-width: 0; flex: 1 1 12rem; color: var(--texto); text-decoration: none; min-height: 44px; }
.pessoa-nomes { display: flex; flex-direction: column; min-width: 0; }
.pessoa-nome { overflow-wrap: anywhere; }
.pessoa-username { margin: 0; overflow-wrap: anywhere; }
.pessoa-acoes { display: flex; gap: 8px; }
.pessoa-acoes:empty { display: none; }

.convites { list-style: none; margin: 12px 0 4px; padding: 0; }
.convite {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 0; border-top: 1px solid var(--borda);
}
.convite:first-child { border-top: 0; }
.convite > div { min-width: 0; }
.codigo { display: block; font-family: var(--mono); font-size: 0.95rem; letter-spacing: 0.02em; overflow-wrap: anywhere; user-select: all; }
.validade { display: block; margin: 2px 0 0; }

.troca { margin-top: 24px; text-align: center; }

/* ---------- barra inferior ---------- */
.barra {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  height: calc(var(--altura-barra) + env(safe-area-inset-bottom));
  padding: 0 max(8px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(8px, env(safe-area-inset-left));
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  max-width: none; background: var(--superficie); border-top: 1px solid var(--borda); box-shadow: var(--sombra-barra);
}
@media (min-width: 481px) {
  .barra { padding-left: calc((100% - var(--largura-max)) / 2); padding-right: calc((100% - var(--largura-max)) / 2); }
}
.barra a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  height: 100%; min-width: 0; color: var(--texto-suave); text-decoration: none;
  font-size: 0.75rem; font-weight: 700; -webkit-tap-highlight-color: transparent;
}
.barra a .icone { width: 26px; height: 26px; }
.barra a[aria-current="page"] { color: var(--roxo-texto); }
.barra a:focus-visible { outline-offset: -4px; border-radius: 14px; }
.barra .mais-circulo {
  display: grid; place-items: center; width: 56px; height: 56px; margin-top: -22px;
  border-radius: 50%; background: var(--roxo); color: var(--sobre-roxo); box-shadow: var(--sombra-mais);
  border: 4px solid var(--superficie); box-sizing: content-box;
}
.barra .mais .icone { width: 28px; height: 28px; }
.barra .mais .ic-traco { stroke-width: 2.5; }
.barra .mais:hover .mais-circulo, .barra .mais[aria-current="page"] .mais-circulo { background: var(--roxo-hover); }
.barra .mais[aria-current="page"] { color: var(--sobre-roxo); }

/* ---------- confirmação ---------- */
dialog {
  width: calc(100% - 32px); max-width: 400px; padding: 20px; border: 1px solid var(--borda);
  border-radius: var(--raio-cartao); background: var(--superficie); color: var(--texto);
}
dialog::backdrop { background: rgba(20, 22, 31, 0.55); }
dialog form { margin: 0; }
dialog .acoes { margin-top: 8px; }
dialog h2 { overflow-wrap: anywhere; }

/* Menu de ações (três pontos do perfil) */
.menu-acoes .item-menu {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: var(--altura-botao);
  padding: 10px 4px; border: 0; border-top: 1px solid var(--borda); background: none; cursor: pointer;
  font: inherit; font-weight: 700; color: var(--texto); text-align: left;
}
.menu-acoes .item-menu:hover { color: var(--roxo-texto); }
.menu-acoes .item-menu.perigoso { color: var(--erro); }
.menu-acoes .botao.largo { margin-top: 12px; }

/* Denunciar */
#denunciar { max-height: calc(100dvh - 32px); overflow-y: auto; }
.motivos .opcao-grande { margin-bottom: 8px; padding: 10px 12px; }
.denuncia-ok h2:focus { outline: none; }

/* Fotos (item 12): capa com foto ou degradê */
.perfil-capa { overflow: hidden; }
.perfil-capa img, .perfil-capa canvas, .avatar canvas { display: block; width: 100%; height: 100%; object-fit: cover; }
.editar-fotos { margin: 16px 0 24px; text-align: center; }
.editar-fotos h2 { text-align: left; }
.editar-capa { margin: 0; border-radius: var(--raio-cartao); }
.foto-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 12px 0 0; }
.foto-previa > p { margin: 12px 0 0; font-weight: 700; }
.foto-status:empty { display: none; }
.editar-fotos .alerta { margin: 12px 0 0; text-align: left; }
/* campo de arquivo: fora da tela, aberto pelos botões "Trocar" */
.escondido { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
/* Enquadramento (item 12B): área de ajuste no formato real (capa 3:1; foto de perfil quadrada com moldura
   redonda desenhada no próprio canvas). touch-action: none deixa o arrasto e a pinça com o app, não com a página. */
.foto-previa .dica { margin: 4px 0 0; }
.enquadrar { margin: 12px 0 0; }
.enquadrar.redondo { width: min(100%, 300px); margin-inline: auto; }
.enquadrar canvas {
  display: block; width: 100%; height: auto; border-radius: var(--raio-cartao); background: var(--borda);
  touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.enquadrar canvas:focus-visible { border-radius: var(--raio-cartao); }
.enquadrar.arrastando canvas { cursor: grabbing; }
.zoom { display: flex; align-items: center; gap: 10px; margin: 12px 0 0; }
.zoom .zoom-rotulo { margin: 0; }
.zoom input[type="range"] { flex: 1; min-width: 0; height: 44px; margin: 0; accent-color: var(--roxo); }
.botao.redondo { width: var(--altura-botao); padding: 0; flex: none; font-size: 1.4rem; }
.botao.com-giro[aria-busy="true"]::after {
  content: ""; width: 1em; height: 1em; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent; animation: girar 0.8s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .botao.com-giro[aria-busy="true"]::after { animation-duration: 2.4s; } }

/* Pessoas bloqueadas */
.atalho-bloqueados { margin-top: 16px; }

/* Aviso flutuante ("Código copiado") */
.aviso {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 25;
  max-width: calc(100% - 32px);
  background: var(--texto); color: var(--fundo); padding: 10px 18px; border-radius: 999px; font-weight: 700;
  opacity: 0; pointer-events: none; transition: opacity 0.2s;
}
.com-barra .aviso { bottom: calc(var(--altura-barra) + 16px + env(safe-area-inset-bottom)); }
.aviso.visivel { opacity: 1; }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Feed e cartão da publicação (item 12) ---------- */
.tela-feed { padding-top: 4px; }
.feed { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }
.feed:empty { display: none; }
.feed-carregando { margin: 24px 0; }
.feed-erro, .feed-vazio { margin-top: 16px; }
.feed-erro .botao, .feed-vazio .botao { margin-top: 12px; }
.feed-vazio + .atalho { margin-top: 12px; }
.feed-mais { margin-top: 8px; }
.feed-mais .dica { margin: 16px 0 0; }
#feed-sentinela { height: 1px; }

.post {
  background: var(--superficie); border: 1px solid var(--borda); border-radius: var(--raio-cartao);
  overflow: hidden;
}
.post-topo { display: flex; align-items: center; gap: 10px; padding: 10px 6px 10px 12px; }
.post-avatar { display: flex; flex: none; border-radius: 50%; }
.post-avatar .avatar { width: 40px; height: 40px; font-size: 0.9375rem; }
.post-nomes { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.post-nome { color: var(--texto); font-weight: 800; text-decoration: none; overflow-wrap: anywhere; align-self: flex-start; }
.post-nome:hover { text-decoration: underline; }
.post-quando { margin: 2px 0 0; font-size: 0.8125rem; }
.post-menu {
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--texto); cursor: pointer;
}
.post-menu:hover { background: var(--roxo-suave); }
.post-menu:focus-visible { border-radius: 50%; }

/* Foto inteira na proporção real: os atributos width/height do <img> reservam o espaço antes de carregar
   (proporção calculada pelo navegador, sem estilo inline). Altura no máximo ~80% da tela (igual a FRACAO_TELA em
   js/foto-contas.js); foto muito alta ou muito larga aparece inteira ("contain") sobre o fundo neutro do tema. */
.post-foto { position: relative; }
.post-foto img {
  display: block; width: 100%; height: auto; max-height: 80vh; max-height: 80dvh;
  object-fit: contain; background: var(--borda);
}
.post-foto.falhou img { visibility: hidden; }
.post-foto.falhou::after {
  content: "Não foi possível carregar a foto"; position: absolute; inset: 0; display: grid; place-items: center;
  padding: 16px; text-align: center; color: var(--texto-suave); font-weight: 700;
}

/* Vídeo do Vibes no feed: a capa na proporção real (como a foto), ▶ no meio e a duração no canto. Não toca no feed. */
.post-video { position: relative; display: block; color: var(--now-texto); -webkit-tap-highlight-color: transparent; }
.post-video img {
  display: block; width: 100%; height: auto; max-height: 80vh; max-height: 80dvh;
  object-fit: contain; background: var(--now-tela);
}
.post-video.falhou img { visibility: hidden; }
.post-video:focus-visible { outline-offset: -4px; border-radius: 0; }
.post-play {
  position: absolute; top: 50%; left: 50%; width: 72px; height: 72px; margin: -36px 0 0 -36px;
  opacity: 0.92; filter: var(--vibe-sombra-icone); pointer-events: none;
}
.post-play .ic-fundo { fill: none; }
.post-duracao {
  position: absolute; right: 10px; bottom: 10px; padding: 2px 8px; border-radius: 6px;
  background: var(--vibe-veu); color: var(--now-texto); font-size: 0.8125rem; font-weight: 800; pointer-events: none;
}
.post-duracao:empty { display: none; }
/* Vídeo meu ainda em preparo (só na timeline do meu perfil): sem capa, só o aviso; curtir e comentar ficam escondidos */
.post-video.preparando {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 200px;
  padding: 16px; background: var(--roxo-suave); color: var(--roxo-suave-texto); font-weight: 800; text-align: center;
}
.post-video.preparando::before {
  content: ""; width: 28px; height: 28px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent;
  animation: girar 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .post-video.preparando::before { animation-duration: 2.4s; } }

.post-acoes { display: flex; align-items: center; gap: 4px; padding: 4px 12px 0 4px; }
.curtir {
  display: grid; place-items: center; width: 48px; height: 48px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--texto); cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.curtir .icone { width: 30px; height: 30px; }
.curtir:hover { background: var(--roxo-suave); }
.curtir:focus-visible { border-radius: 50%; }
/* Curtido: o coração fica rosa e cheio (o amarelo deslocado continua, como nos outros ícones) */
.curtir.curtido { color: var(--rosa); }
.curtir.curtido .ic-coracao-traco { fill: var(--rosa); }
.curtir.curtido .icone { animation: pulsar 0.28s ease-out; }
@keyframes pulsar { 50% { transform: scale(1.18); } }
@media (prefers-reduced-motion: reduce) { .curtir.curtido .icone { animation: none; } }
.curtir[aria-busy="true"] { cursor: progress; }
.curtidas { font-weight: 800; font-size: 0.9375rem; }
/* Quem curtiu (item 12, Curtidas): o número é um link para a lista (área de toque de 44 px) */
a.curtidas {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 6px; border-radius: 10px;
  color: var(--texto); text-decoration: none; -webkit-tap-highlight-color: transparent;
}
a.curtidas:hover { text-decoration: underline; }
.post-legenda { margin: 0; padding: 4px 16px 14px; white-space: pre-line; overflow-wrap: anywhere; }
.post-acoes:has(+ .post-legenda[hidden]) { padding-bottom: 6px; }

/* Publicação inteira (#/p/<id>) */
#post-lugar .post { margin-top: 8px; }
#post-estado { margin-top: 16px; }
#post-estado .botao { margin-top: 12px; }

/* ---------- Grade do perfil: 3 colunas de miniaturas quadradas ---------- */
.grade { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.grade:empty { display: none; }
.grade a { display: block; aspect-ratio: 1 / 1; background: var(--borda); border-radius: 4px; overflow: hidden; }
.grade a:focus-visible { outline-offset: -3px; border-radius: 4px; }
.grade img { display: block; width: 100%; height: 100%; object-fit: cover; }
.grade a.falhou img { visibility: hidden; }
#grade-ver-mais { margin-top: 12px; }
#painel-fotos .alerta { margin-top: 12px; }

/* ---------- Publicar (item 12): foto inteira, sem arrastar (a tela rola normalmente) ---------- */
.tela-publicar .alerta { margin-top: 12px; }
.pub-escolher {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; width: 100%;
  min-height: 220px; margin-top: 8px; padding: 24px 16px; cursor: pointer; text-align: center;
  font: inherit; color: var(--texto); background: var(--superficie);
  border: 2px dashed var(--borda-campo); border-radius: var(--raio-cartao);
}
.pub-escolher:hover { border-color: var(--roxo-texto); background: var(--roxo-suave); }
.pub-escolher .icone { color: var(--roxo-texto); }
.pub-escolher strong { display: block; font-size: 1.1rem; }
.pub-escolher .dica { display: block; }
#pub-form { margin-top: 8px; }
.pub-previa { display: flex; justify-content: center; padding: 8px; background: var(--borda); border-radius: var(--raio-cartao); }
.pub-previa canvas { display: block; max-width: 100%; max-height: 60vh; max-height: 60dvh; width: auto; height: auto; }
#pub-previa-dica { margin: 8px 0 0; }
.pub-trocar { margin: 12px 0 0; text-align: center; }
#pub-form .campo { margin-top: 16px; }
#pub-contador.passou { color: var(--erro); font-weight: 700; }
#pub-status { margin-top: 12px; text-align: center; font-weight: 700; }

/* ---------- Puxar para atualizar (js/puxar.js) ---------- */
/* A descida vem do JS como classe .puxar-N (N px, de 3 em 3): nada de estilo inline */
.puxar-0 { --p: 0; } .puxar-3 { --p: 3; } .puxar-6 { --p: 6; } .puxar-9 { --p: 9; } .puxar-12 { --p: 12; } .puxar-15 { --p: 15; } .puxar-18 { --p: 18; } .puxar-21 { --p: 21; }
.puxar-24 { --p: 24; } .puxar-27 { --p: 27; } .puxar-30 { --p: 30; } .puxar-33 { --p: 33; } .puxar-36 { --p: 36; } .puxar-39 { --p: 39; } .puxar-42 { --p: 42; } .puxar-45 { --p: 45; }
.puxar-48 { --p: 48; } .puxar-51 { --p: 51; } .puxar-54 { --p: 54; } .puxar-57 { --p: 57; } .puxar-60 { --p: 60; } .puxar-63 { --p: 63; } .puxar-66 { --p: 66; } .puxar-69 { --p: 69; }
.puxar-72 { --p: 72; } .puxar-75 { --p: 75; } .puxar-78 { --p: 78; } .puxar-81 { --p: 81; } .puxar-84 { --p: 84; } .puxar-87 { --p: 87; } .puxar-90 { --p: 90; }
.puxar-alvo.puxando, .puxar-alvo.atualizando, .puxar-alvo.puxar-voltando { transform: translateY(calc(var(--p, 0) * 1px)); }
.puxar-alvo.atualizando, .puxar-alvo.puxar-voltando { transition: transform 0.25s ease-out; }
/* O círculo fica escondido atrás da barra de topo (abaixo da área segura do iPhone) e desce junto com o dedo */
.puxar-indicador {
  position: fixed; z-index: 15; left: 50%;
  top: calc(var(--altura-topo) + env(safe-area-inset-top));
  display: grid; place-items: center; width: var(--puxar-tamanho); height: var(--puxar-tamanho);
  border-radius: 50%; background: var(--superficie); border: 1px solid var(--borda); box-shadow: var(--sombra-menu);
  transform: translate(-50%, calc(var(--p, 0) * 1px - 100% - 10px));
  opacity: 0; pointer-events: none;
}
.puxar-indicador.puxando, .puxar-indicador.atualizando, .puxar-indicador.puxar-voltando { opacity: 1; }
.puxar-indicador.atualizando, .puxar-indicador.puxar-voltando { transition: transform 0.25s ease-out; }
.puxar-giro {
  width: 60%; height: 60%; border-radius: 50%;
  border: var(--puxar-traco) solid var(--puxar-cor); border-right-color: transparent;
  transform: rotate(calc(var(--p, 0) * 4deg)); /* puxando: o arco acompanha o dedo */
}
/* Passou do limite (~70 px) ou atualizando: gira sozinho */
.puxar-indicador.pronto .puxar-giro, .puxar-indicador.atualizando .puxar-giro { animation: girar 0.8s linear infinite; }
@media (prefers-reduced-motion: reduce) {
  .puxar-indicador.pronto .puxar-giro, .puxar-indicador.atualizando .puxar-giro { animation-duration: 2.4s; }
}

/* ---------- Quem visitou você (item 12, parte Visitas) ---------- */
/* Item no meu perfil: ícone, nome + linha de apoio e o número dos últimos 7 dias (amarelo da marca) */
.atalho-visitas { text-align: left; min-height: 44px; }
.atalho-textos { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.atalho-textos strong { overflow-wrap: anywhere; }
.selo-numero {
  display: inline-grid; place-items: center; flex: none; min-width: 28px; height: 28px; padding: 0 8px;
  border-radius: 14px; background: var(--amarelo); color: var(--sobre-amarelo); font-weight: 800; font-size: 0.875rem;
}
/* Lista: linha inteira é o link (abre o perfil); à direita, quando e quantas vezes */
.visita { border-top: 1px solid var(--borda); }
.visita:first-child { border-top: 0; }
.visita-link {
  display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 0;
  color: var(--texto); text-decoration: none; font-weight: 500;
}
.visita:first-child .visita-link { padding-top: 0; }
.visita-link:focus-visible { border-radius: 12px; }
.visita-nomes { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.visita-nome { overflow-wrap: anywhere; }
.visita-username { margin: 0; overflow-wrap: anywhere; }
.visita-info { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: none; text-align: right; }
.visita-quando { margin: 0; white-space: nowrap; }
.visita-vezes {
  padding: 1px 8px; border-radius: var(--raio-selo); background: var(--roxo-suave); color: var(--roxo-suave-texto);
  font-size: 0.75rem; font-weight: 700; white-space: nowrap;
}
.visitas-vazio { text-align: center; padding: 16px 8px; }
.visitas-vazio .icone { color: var(--texto-suave); margin-bottom: 6px; }
.visitas-vazio p { margin: 0 0 2px; }
.visitas-erro { margin-top: 16px; }
.tela-visitas .botao.largo { margin-top: 12px; }
.curtidas-total { margin: 0 0 8px; }
.curtidas-total:empty { display: none; }

/* ---------- Now (item 12, parte Now) ---------- */
/* Faixa no topo do Início: rola para os lados (o puxar para atualizar ignora gesto mais horizontal que vertical) */
.nows { margin: 0 -16px; padding: 2px 0 8px; border-bottom: 1px solid var(--borda); }
.nows-lista {
  list-style: none; margin: 0; padding: 4px 16px; display: flex; gap: 10px;
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none;
}
.nows-lista::-webkit-scrollbar { display: none; }
.now-item { position: relative; flex: none; }
.now-circulo {
  display: flex; flex-direction: column; align-items: center; gap: 4px; width: 76px; padding: 2px 0;
  border: 0; background: none; color: var(--texto); font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.now-circulo:focus-visible { border-radius: 14px; }
/* Anel: colorido = ainda não visto; cinza e mais fino = já visto; o meu sem Now ativo fica sem anel */
.now-anel {
  display: grid; place-items: center; width: var(--now-circulo); height: var(--now-circulo);
  padding: 3px; border-radius: 50%; background: var(--now-anel);
}
.now-anel.visto { padding: 2px; background: var(--now-anel-visto); }
.now-anel.sem { background: transparent; }
.now-anel .avatar { width: 100%; height: 100%; border: 3px solid var(--fundo); font-size: 1.125rem; }
.now-rotulo { max-width: 76px; font-size: 0.75rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.meu .now-rotulo { color: var(--texto-suave); }
/* "+" do meu círculo: pequeno na tela, mas a área de toque tem 44 px (o ::before) */
.now-mais {
  position: absolute; top: 50px; left: 52px; display: grid; place-items: center; width: 26px; height: 26px; padding: 0;
  border: 2px solid var(--fundo); border-radius: 50%; background: var(--roxo); color: var(--sobre-roxo); cursor: pointer;
}
.now-mais::before { content: ""; position: absolute; inset: -11px; }
.now-mais:hover { background: var(--roxo-hover); }
.now-mais:focus-visible { border-radius: 50%; }
.now-mais .icone { width: 16px; height: 16px; }
.now-mais .ic-traco { stroke-width: 3; }

/* Tela cheia (criar e ver): sempre escura, foto inteira (contain), respeita a área segura do iPhone */
dialog.now-tela {
  position: fixed; inset: 0; width: 100%; max-width: none; height: 100vh; height: 100dvh; max-height: none;
  margin: 0; padding: 0; border: 0; border-radius: 0; background: var(--now-tela); color: var(--now-texto); overflow: hidden;
}
dialog.now-tela::backdrop { background: var(--now-tela); }
html:has(dialog.now-tela[open]) { overflow: hidden; }
.now-palco {
  display: flex; flex-direction: column; height: 100%; max-width: 560px; margin: 0 auto;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.now-tela :focus-visible { outline-color: var(--now-texto); }
.now-tela .dica, .now-tela .suave { color: var(--now-texto-suave); }
.now-tela .erro-campo { color: var(--now-erro); }
.now-tela .alerta { margin: 0 0 10px; }
.now-tela .campo { margin-bottom: 8px; }
.now-tela textarea { min-height: 64px; }
.now-tela .acoes { margin-top: 8px; }

.now-barras { display: flex; gap: 4px; padding: 8px 12px 0; }
.now-barra { flex: 1; height: 3px; border-radius: 2px; background: var(--now-barra); overflow: hidden; }
.now-enche { display: block; height: 100%; background: var(--now-barra-cheia); transform: scaleX(0); transform-origin: left; }
.now-barra.cheia .now-enche { transform: scaleX(1); }
/* O tempo de cada foto (5 s, DURACAO_MS em js/nows-contas.js) é esta animação: pausada, o tempo para junto */
.now-barra.atual .now-enche { animation: now-encher 5s linear forwards; }
.now-tela.pausado .now-barra.atual .now-enche { animation-play-state: paused; }
@keyframes now-encher { from { transform: scaleX(0); } to { transform: scaleX(1); } }
/* Menos movimento: a barra anda em 5 degraus (um por segundo) em vez de deslizar */
@media (prefers-reduced-motion: reduce) { .now-barra.atual .now-enche { animation-timing-function: steps(5, end); } }

.now-topo { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 6px 4px 6px 12px; }
.now-topo .avatar { width: 36px; height: 36px; font-size: 0.8125rem; }
.now-nomes { display: flex; flex-direction: column; flex: 1; min-width: 0; line-height: 1.25; }
.now-nome { font-weight: 800; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.now-quando { font-size: 0.8125rem; color: var(--now-texto-suave); }
.now-titulo { flex: 1; margin: 0; font-size: 1.125rem; }
.now-titulo:focus { outline: none; }
.now-botao {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; padding: 0;
  border: 0; border-radius: 50%; background: none; color: var(--now-texto); cursor: pointer;
}
.now-botao:hover, .now-botao[aria-pressed="true"] { background: var(--now-botao-fundo); }
.now-botao:focus-visible { border-radius: 50%; }

/* A foto ocupa todo o espaço entre o topo e o rodapé, inteira. Segurar não seleciona nem abre menu */
.now-foto {
  position: relative; flex: 1; min-height: 0; touch-action: none;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.now-foto img, .now-foto canvas { display: block; width: 100%; height: 100%; object-fit: contain; }
.now-foto img { pointer-events: none; transition: opacity 0.2s; }
.now-tela.carregando .now-foto img, .now-tela.falhou .now-foto img { opacity: 0; }
.now-tela.carregando .now-foto::after {
  content: ""; position: absolute; top: 50%; left: 50%; width: 32px; height: 32px; margin: -16px 0 0 -16px;
  border-radius: 50%; border: 3px solid var(--now-barra-cheia); border-right-color: transparent; animation: girar 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .now-tela.carregando .now-foto::after { animation-duration: 2.4s; } }
.now-falhou-texto { display: none; }
.now-tela.falhou .now-falhou-texto {
  position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 16px;
  text-align: center; font-weight: 700; color: var(--now-texto-suave);
}
/* Zonas de toque: esquerda (1/3) volta, direita avança (igual a ZONA_VOLTAR em js/nows-contas.js) */
.now-zona {
  position: absolute; top: 0; bottom: 0; margin: 0; padding: 0; border: 0; background: transparent; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.now-anterior { left: 0; width: 33.333%; }
.now-proximo { right: 0; width: 66.667%; }
.now-zona:focus-visible { outline-offset: -6px; border-radius: 12px; }

.now-rodape { padding: 8px 16px 12px; }
.now-legenda { margin: 0 0 8px; max-height: 30vh; overflow-y: auto; white-space: pre-line; overflow-wrap: anywhere; }
.now-aviso { margin: 0 0 8px; text-align: center; font-weight: 700; }
.now-aviso:empty { display: none; }
.now-aviso.visivel { animation: now-aviso 3s forwards; }
@keyframes now-aviso { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .now-aviso.visivel { animation: none; } }
.now-acoes { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.now-acao {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border: 0; border-radius: 999px; background: var(--now-botao-fundo); color: var(--now-texto);
  font: inherit; font-weight: 700; cursor: pointer;
}
.now-acao:focus-visible { border-radius: 999px; }
#now-vistos-botao { margin-right: auto; }
#now-form { margin: 0; }

/* Quem viu (caixa normal, no tema do app) */
#now-vistos { max-height: calc(100dvh - 32px); overflow-y: auto; }
.now-vistos-lista { margin: 8px 0 4px; }

/* ---------- Comentários (item 12) ---------- */
/* No cartão: balão com o número ao lado (o número some quando é zero) */
.comentar {
  display: inline-flex; align-items: center; gap: 4px; min-width: 48px; height: 48px; padding: 0 10px;
  border-radius: 24px; color: var(--texto); text-decoration: none; font-weight: 800; font-size: 0.9375rem;
  -webkit-tap-highlight-color: transparent;
}
.comentar .icone { width: 28px; height: 28px; }
.comentar:hover { background: var(--roxo-suave); }
.comentar:focus-visible { border-radius: 24px; }
.comentar-n:empty { display: none; }
.comentar + .curtidas { margin-left: 4px; }

/* Tela de comentários: sem a barra inferior; o campo de escrever fica grudado embaixo (sticky), acima da área
   segura do iPhone. Com poucos comentários, a tela ocupa a altura toda e o campo fica no pé da tela. */
body.com-barra.sem-barra { padding-bottom: 0; }
.sem-barra main { padding-bottom: 0; }
html:has(> body.sem-barra) { scroll-padding-bottom: calc(110px + env(safe-area-inset-bottom)); }
.sem-barra .aviso { bottom: calc(96px + env(safe-area-inset-bottom)); }
.tela-comentarios {
  display: flex; flex-direction: column;
  min-height: calc(100vh - var(--altura-topo) - env(safe-area-inset-top) - 9px);
  min-height: calc(100dvh - var(--altura-topo) - env(safe-area-inset-top) - 9px);
}
.comentarios-topo { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.comentarios-ver-post { display: inline-flex; align-items: center; min-height: 44px; margin-top: 8px; font-weight: 700; }
.tela-comentarios h1 { margin-top: 4px; }
.comentarios-total { margin: 0 0 4px; }
.comentarios-total:empty { display: none; }

.comentarios { list-style: none; margin: 0 0 12px; padding: 0; }
.comentarios:empty { display: none; }
.comentario { display: flex; align-items: flex-start; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--borda); }
.comentario:last-child { border-bottom: 0; }
.comentario-avatar { display: flex; flex: none; margin-top: 2px; border-radius: 50%; }
.comentario-avatar .avatar { width: 36px; height: 36px; font-size: 0.8125rem; }
.comentario-corpo { flex: 1; min-width: 0; }
.comentario-topo { margin: 0; line-height: 1.3; }
.comentario-nome { color: var(--texto); font-weight: 800; text-decoration: none; overflow-wrap: anywhere; }
.comentario-nome:hover { text-decoration: underline; }
.comentario-quando { margin-left: 4px; color: var(--texto-suave); font-size: 0.8125rem; white-space: nowrap; }
.comentario-texto { margin: 2px 0 0; white-space: pre-line; overflow-wrap: anywhere; }
.comentario-menu {
  display: grid; place-items: center; width: 44px; height: 44px; margin: -6px -10px 0 0; padding: 0; flex: none;
  border: 0; border-radius: 50%; background: none; color: var(--texto-suave); cursor: pointer;
}
.comentario-menu:hover { background: var(--roxo-suave); color: var(--texto); }
.comentario-menu:focus-visible { border-radius: 50%; }
.comentario-menu .icone { width: 20px; height: 20px; }
.comentarios-carregando { margin: 16px 0; }
.comentarios-vazio { margin: 8px 0 16px; }
.comentarios-vazio .botao { margin-top: 12px; }
#comentarios-ver-mais { margin: 0 0 16px; }
/* Curtir comentário (item 12, Curtidas): coração menor, no mesmo estilo do da publicação, e o número ao lado (link
   para "Quem curtiu"). Área de toque de 44 px; o coração fica alinhado com o texto. */
.comentario-acoes { display: flex; align-items: center; gap: 0; margin: 0 0 -8px -12px; }
.curtir.curtir-comentario { width: 44px; height: 44px; }
.curtir.curtir-comentario .icone { width: 20px; height: 20px; }
.comentario-curtidas {
  display: inline-flex; align-items: center; min-width: 32px; min-height: 44px; margin-left: -8px; padding: 0 8px;
  border-radius: 10px; color: var(--texto-suave); font-size: 0.8125rem; font-weight: 800; text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.comentario-curtidas:hover { color: var(--texto); text-decoration: underline; }

.comentar-form {
  position: sticky; bottom: 0; z-index: 15;
  margin: auto -16px 0; padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: var(--superficie); border-top: 1px solid var(--borda);
}
.comentar-linha { display: flex; align-items: flex-end; gap: 8px; }
.comentar-linha textarea {
  flex: 1; min-width: 0; min-height: 44px; max-height: 9.5em; padding: 9px 14px; resize: none;
  field-sizing: content; border-radius: 22px;
}
.comentar-linha .botao { flex: none; min-height: 44px; border-radius: 22px; }
.comentar-linha .botao.sem-texto { opacity: 0.55; }
.comentar-contador { margin: 4px 0 0; text-align: right; }
.comentar-contador.passou { color: var(--erro); font-weight: 700; }
.comentar-form .erro-campo { margin: 4px 0 0; }

/* ---------- Vibes (item 12): postar vídeo na tela Publicar (js/vibes-envio.js) ---------- */
.vid-escolher { margin-top: 28px; }
.vid-titulo { margin: 0 0 4px; font-size: 1.125rem; }
.vid-escolher .pub-escolher {
  flex-direction: row; justify-content: flex-start; gap: 14px; min-height: 0; padding: 16px; text-align: left;
}
.vid-escolher .pub-escolher .icone.grande { width: 40px; height: 40px; }
/* Uma coisa por vez: com uma foto escolhida o bloco de vídeo some, e com um vídeo escolhido o de foto some */
.tela-publicar:has(#pub-form:not([hidden])) #vid-escolher,
.tela-publicar:has(#vid-form:not([hidden])) #pub-escolher { display: none; }
.tela-publicar:has(#vid-form:not([hidden])) .vid-escolher + .vid-form { margin-top: 8px; }
.vid-form { margin-top: 16px; }
.vid-previa { display: flex; justify-content: center; padding: 8px; background: var(--now-tela); border-radius: var(--raio-cartao); }
.vid-previa video {
  display: block; max-width: 100%; max-height: 55vh; max-height: 55dvh; width: auto; height: auto; border-radius: 8px;
}
.vid-resumo { margin: 8px 0 0; font-weight: 700; color: var(--texto); }
.vid-progresso { margin: 4px 0 8px; }
.vid-progresso progress { display: block; width: 100%; height: 12px; accent-color: var(--roxo); }
.vid-progresso p { margin: 6px 0 0; }
.vid-processando { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding: 14px 16px; }
.vid-processando a { font-weight: 700; }

/* ---------- Vibes: tela cheia vertical (js/vibes.js) ---------- */
/* Ocupa a tela inteira acima da barra inferior (que continua, com a área segura do iPhone). A página não rola:
   quem rola é a lista, com encaixe (um vídeo por vez). Sem a barra de topo nesta tela.
   Toque: nada transparente fica por cima do .vibe-toque. Camadas que só desenham (véu, topo, colunas) têm
   pointer-events: none e só os botões/links de verdade recebem o toque. */
html:has(> body.tela-cheia) { overflow: hidden; }
body.com-barra.tela-cheia { padding-bottom: 0; }
.tela-vibes {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  bottom: calc(var(--altura-barra) + env(safe-area-inset-bottom));
  background: var(--now-tela); color: var(--now-texto);
}
.tela-vibes :focus-visible { outline-color: var(--now-texto); }
.vibes-topo {
  position: absolute; z-index: 3; top: 0; left: 0; right: 0; display: flex; align-items: center; gap: 8px;
  padding: calc(env(safe-area-inset-top) + 6px) max(12px, env(safe-area-inset-right)) 12px max(12px, env(safe-area-inset-left));
  background: linear-gradient(to bottom, var(--vibe-veu-topo), transparent); pointer-events: none;
}
.vibes-topo > * { pointer-events: auto; }
.vibes-topo h1 { pointer-events: none; flex: 1; margin: 0; font-size: 1.25rem; font-weight: 800; color: var(--now-texto); text-shadow: var(--vibe-sombra-texto); }
.vibes-botao {
  display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 50%;
  color: var(--now-texto); background: var(--now-botao-fundo);
}
.vibes-botao:focus-visible { border-radius: 50%; }
button.vibes-botao { margin: 0; padding: 0; border: 0; font: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent; }
/* Alto-falante no canto: com som, discreto; mudo, amarelo (bem à vista) */
.vibes-som .ic-fundo { fill: none; }
.vibes-som.mudo { background: var(--amarelo); color: var(--sobre-amarelo); }
/* O navegador não deixou tocar com som: aviso curto embaixo do topo (tocar liga o som) */
.vibes-aviso-som {
  position: absolute; z-index: 4; left: 50%; top: calc(env(safe-area-inset-top) + 62px); transform: translateX(-50%);
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px; border: 0; border-radius: 999px;
  background: var(--amarelo); color: var(--sobre-amarelo); font: inherit; font-size: 0.9375rem; font-weight: 800;
  white-space: nowrap; cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.vibes-aviso-som .ic-fundo { fill: none; }
.vibes-aviso-som:focus-visible { border-radius: 999px; }

.vibes-lista {
  list-style: none; margin: 0; padding: 0; height: 100%; overflow-y: auto; overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory; scrollbar-width: none;
}
.vibes-lista::-webkit-scrollbar { display: none; }
.vibe { position: relative; height: 100%; overflow: hidden; scroll-snap-align: start; scroll-snap-stop: always; background: var(--now-tela); }
/* Véu embaixo para ler nome e legenda sobre qualquer vídeo */
.vibe::before {
  content: ""; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 40%; pointer-events: none;
  background: linear-gradient(to top, var(--vibe-veu), transparent);
}
/* Vídeo em pé ocupa a tela toda (corta um pouco as laterais); deitado aparece inteiro, com faixas */
.vibe-capa, .vibe-video { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: contain; }
.vibe-capa.em-pe, .vibe-video.em-pe { object-fit: cover; }
.vibe-capa.sem-capa { visibility: hidden; }
.vibe-video { opacity: 0; transition: opacity 0.15s; }
.vibe.tocando .vibe-video { opacity: 1; }
.vibe.falhou .vibe-video { display: none; }
/* Toque no meio pausa/continua: o ▶ aparece quando o vídeo da tela está parado */
.vibe-toque {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; margin: 0; padding: 0; border: 0;
  background: transparent; color: var(--now-texto); cursor: pointer; -webkit-tap-highlight-color: transparent;
  touch-action: manipulation; /* sem "toque duplo = zoom": cada toque vira um click na hora, nenhum é engolido */
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.vibe-toque:focus-visible { outline-offset: -6px; border-radius: 12px; }
.vibe-play { width: 76px; height: 76px; opacity: 0; transition: opacity 0.15s; filter: var(--vibe-sombra-icone); }
.vibe-play .ic-fundo { fill: none; }
.vibe.atual.pausado .vibe-play { opacity: 0.92; }
.vibe.atual.carregando:not(.pausado)::after {
  content: ""; position: absolute; z-index: 1; top: 50%; left: 50%; width: 36px; height: 36px; margin: -18px 0 0 -18px;
  border-radius: 50%; border: 3px solid var(--now-barra-cheia); border-right-color: transparent; animation: girar 0.8s linear infinite;
  pointer-events: none;
}
@media (prefers-reduced-motion: reduce) { .vibe.atual.carregando::after { animation-duration: 2.4s; } .vibe-video, .vibe-play { transition: none; } }
.vibe-falhou { display: none; }
.vibe.falhou .vibe-falhou {
  position: absolute; inset: 0; z-index: 1; display: grid; place-items: center; margin: 0; padding: 16px;
  text-align: center; font-weight: 700; color: var(--now-texto-suave); pointer-events: none;
}
/* Coluna da direita: curtir, comentar, menu ⋯ (botões de 52 px, bons para o dedo) */
.vibe-lado {
  position: absolute; z-index: 2; right: max(6px, env(safe-area-inset-right)); bottom: 20px;
  display: flex; flex-direction: column; align-items: center; gap: 12px; pointer-events: none;
}
.vibe-lado > * { pointer-events: auto; }
.vibe-acao {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 52px; min-height: 52px;
  padding: 0; border: 0; border-radius: 14px; background: none; color: var(--now-texto); font: inherit; font-size: 0.875rem;
  font-weight: 800; text-decoration: none; cursor: pointer; filter: var(--vibe-sombra-icone); -webkit-tap-highlight-color: transparent;
}
.vibe-acao .icone { width: 34px; height: 34px; }
.vibe-acao.curtir { width: auto; height: auto; border-radius: 14px; }
.vibe-acao.curtir:hover, .vibe-acao:hover { background: none; }
.vibe-acao:focus-visible { border-radius: 14px; }
.vibe-n:empty { display: none; }
/* Embaixo à esquerda: foto e nome (levam ao perfil) e a legenda */
.vibe-info {
  position: absolute; z-index: 2; left: max(14px, env(safe-area-inset-left)); right: 76px; bottom: 18px;
  color: var(--now-texto); text-shadow: var(--vibe-sombra-texto); pointer-events: none;
}
.vibe-info > * { pointer-events: auto; }
.vibe-autor { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; max-width: 100%; color: var(--now-texto); text-decoration: none; }
.vibe-autor .avatar { width: 40px; height: 40px; font-size: 0.875rem; border: 2px solid var(--now-texto); text-shadow: none; }
.vibe-nome { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 800; }
.vibe-legenda { margin: 4px 0 0; max-height: 4.6em; overflow-y: auto; white-space: pre-line; overflow-wrap: anywhere; }
/* Carregando, vazio e erro: no meio da tela escura */
.vibes-estado {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  margin: 0; padding: 24px; text-align: center; color: var(--now-texto);
}
.vibes-estado p { margin: 4px 0; }
.vibes-estado .suave { color: var(--now-texto-suave); }

/* Interface recolhida (só no celular deitado, tocando): fica só o vídeo; um toque traz tudo de volta (js/vibes.js) */
.tela-vibes .vibes-topo, .vibe-lado, .vibe-info, .vibe::before, body.tela-cheia .barra { transition: opacity 0.2s, visibility 0s; }
.tela-vibes.interface-oculta .vibes-topo, .tela-vibes.interface-oculta .vibe-lado, .tela-vibes.interface-oculta .vibe-info,
.tela-vibes.interface-oculta .vibe::before, body.tela-cheia:has(.tela-vibes.interface-oculta) .barra {
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0s 0.2s;
}
@media (prefers-reduced-motion: reduce) {
  .tela-vibes .vibes-topo, .vibe-lado, .vibe-info, .vibe::before, body.tela-cheia .barra,
  .tela-vibes.interface-oculta .vibes-topo, .tela-vibes.interface-oculta .vibe-lado, .tela-vibes.interface-oculta .vibe-info,
  .tela-vibes.interface-oculta .vibe::before, body.tela-cheia:has(.tela-vibes.interface-oculta) .barra { transition: none; }
}

/* Vibes deitado: a MESMA consulta de CONSULTA_DEITADO (js/vibes-contas.js). O vídeo ocupa a tela inteira, sem moldura
   (100dvw x 100dvh, por baixo do notch); os botões respeitam a área segura. A barra inferior fica por cima e some
   junto com a interface. Vídeo deitado preenche a tela; vídeo em pé aparece inteiro (sem cortar o rosto). */
@media (orientation: landscape) and (max-height: 540px) and (pointer: coarse) {
  body.tela-cheia .tela-vibes {
    top: 0; left: 0; right: auto; bottom: auto; width: 100vw; width: 100dvw; height: 100vh; height: 100dvh;
  }
  .tela-vibes .vibe-capa, .tela-vibes .vibe-video { object-fit: cover; }
  .tela-vibes .vibe-capa.em-pe, .tela-vibes .vibe-video.em-pe { object-fit: contain; }
  body.tela-cheia .tela-vibes .vibe-lado { bottom: calc(var(--altura-barra) + env(safe-area-inset-bottom) + 6px); gap: 4px; }
  body.tela-cheia .tela-vibes .vibe-info { bottom: calc(var(--altura-barra) + env(safe-area-inset-bottom) + 6px); right: max(84px, calc(env(safe-area-inset-right) + 76px)); }
  .tela-vibes .vibe-legenda { max-height: 2.4em; }
  .tela-vibes .vibes-topo { padding-top: max(6px, env(safe-area-inset-top)); }
  .vibes-aviso-som { top: calc(max(6px, env(safe-area-inset-top)) + 54px); }
}

/* Botão de tela cheia (Fullscreen API: Android e computador): a tela do Vibes inteira, sem a barra inferior */
.tela-vibes:fullscreen { inset: 0; width: 100%; height: 100%; }
.tela-vibes:-webkit-full-screen { inset: 0; width: 100%; height: 100%; }
.tela-vibes:fullscreen .vibe-lado, .tela-vibes:fullscreen .vibe-info { bottom: max(20px, env(safe-area-inset-bottom)); }

/* ---------- Vibes no perfil: capas em pé (9:16) ---------- */
.grade-vibes a, .grade-vibes .grade-status { aspect-ratio: 9 / 16; }
.grade-vibes a { position: relative; }
.grade-duracao {
  position: absolute; left: 6px; bottom: 6px; padding: 1px 6px; border-radius: 6px;
  background: var(--vibe-veu); color: var(--now-texto); font-size: 0.75rem; font-weight: 800;
}
.grade-status {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 8px;
  border: 0; border-radius: 4px; background: var(--roxo-suave); color: var(--roxo-suave-texto);
  font: inherit; font-size: 0.8125rem; font-weight: 800; text-align: center;
}
.grade-status.preparando::before {
  content: ""; width: 24px; height: 24px; border-radius: 50%; border: 3px solid currentColor; border-right-color: transparent;
  animation: girar 0.8s linear infinite;
}
@media (prefers-reduced-motion: reduce) { .grade-status.preparando::before { animation-duration: 2.4s; } }
.grade-status.falhou { background: var(--erro-fundo); color: var(--erro); cursor: pointer; }
#painel-vibes .alerta { margin-top: 12px; }
/* Aba Publicações do perfil: a lista do Início (.feed / .post) */
#perfil-timeline { margin-top: 0; }
#painel-publicacoes .alerta, #painel-publicacoes .vazio { margin-top: 12px; }
#timeline-sentinela { height: 1px; }
