/* =========================================================
   v2 — Visual "grupo de troca e venda": feed, posts, stories
   ========================================================= */

/* ---------- Topo com abas ---------- */
.topo { border-bottom: 0; box-shadow: 0 1px 0 var(--borda), 0 4px 14px rgba(16, 24, 20, .06); }
.topo::before { content: ''; display: block; height: 4px; background: linear-gradient(90deg, #00b864, #ffc107, #ff7a1a, #f0368a, #7c4dff); }
.topo-in { gap: 14px; }
.logo img { border-radius: 50%; filter: drop-shadow(0 3px 8px rgba(0, 163, 92, .35)); transition: transform .3s; }
/* Logo é um selo redondo (foto do avião) em todos os lugares */
.grupo-logo, .app-hero-ic img, .app-banner-ic img { border-radius: 50% !important; }
.topo .logo img { width: 44px; height: 44px; }
.logo:hover img { transform: rotate(-8deg) scale(1.05); }
.logo-txt strong { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.busca-topo { max-width: 280px; flex: 0 1 280px; padding: 0 14px; height: 42px; border: 0; background: var(--superficie-2); }
.busca-topo:focus-within { box-shadow: 0 0 0 2px var(--verde); background: var(--superficie); }
.topo-abas { flex: 1; display: flex; justify-content: center; gap: 6px; align-self: stretch; }
.topo-aba {
  position: relative; display: grid; place-items: center; width: 92px; color: var(--texto-2);
  border-bottom: 3px solid transparent; transition: color .15s, background .15s; text-decoration: none !important;
}
.topo-aba .ic { width: 26px; height: 26px; }
.topo-aba:hover { color: var(--verde); background: var(--superficie-2); border-radius: 10px 10px 0 0; }
.topo-aba.ativo { color: var(--verde); border-bottom-color: var(--verde); }
.topo-aba .badge { position: absolute; top: 8px; left: calc(50% + 6px); }
.topo-nav { margin-left: auto; }
.btn { background: var(--grad); }
.btn:hover { background: var(--verde-esc); }
.btn-claro { background: var(--superficie); }
.btn-claro:hover { background: var(--superficie-2); }
.btn-perigo { background: var(--vermelho); }
.btn-destaque { background: var(--grad-quente); color: #2a1600; box-shadow: 0 4px 14px rgba(255, 122, 26, .35); }
.btn-destaque:hover { background: linear-gradient(135deg, #ffb300, #ff6a00); box-shadow: 0 6px 18px rgba(255, 122, 26, .45); }
.btn-whats { background: linear-gradient(135deg, #25d366, #1fa855); box-shadow: 0 4px 14px rgba(31, 168, 85, .35); }
.btn-ouro { background: var(--grad-quente); }

/* ---------- Layout 3 colunas ---------- */
.feed-layout { display: grid; grid-template-columns: 280px minmax(0, 640px) 300px; gap: 24px; justify-content: center; padding-top: 18px; max-width: 1320px; }
.lado-esq, .lado-dir { position: sticky; top: calc(var(--topo-h) + 22px); align-self: start; max-height: calc(100vh - var(--topo-h) - 30px); overflow-y: auto; scrollbar-width: thin; padding-bottom: 16px; }
.lado-menu { display: grid; gap: 2px; }
.lado-item {
  display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 10px; color: var(--texto);
  font-weight: 600; font-size: .93rem; text-decoration: none !important; transition: background .15s;
}
.lado-item:hover { background: rgba(0, 0, 0, .05); }
.lado-item.ativo { background: var(--verde-claro); color: var(--verde); }
.lado-item small { margin-left: auto; font-weight: 500; }
.lado-item .badge { margin-left: auto; }
.lado-ic { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: #fff; flex-shrink: 0; }
.lado-ic .ic { width: 19px; height: 19px; }
.ic-verde { background: var(--grad); }
.ic-azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.ic-roxo { background: linear-gradient(135deg, #a78bfa, #7c4dff); }
.ic-rosa { background: linear-gradient(135deg, #f472b6, #f0368a); }
.ic-vermelho { background: linear-gradient(135deg, #f87171, #dc2626); }
.ic-laranja { background: var(--grad-quente); }
.lado-emoji { background: var(--superficie); box-shadow: var(--sombra); font-size: 1.15rem; }
.lado-titulo { font-size: .95rem; color: var(--texto-2); margin: 18px 10px 6px; padding-top: 14px; border-top: 1px solid var(--borda); }
.lado-dir .painel { padding: 16px; }
.lado-dir h3 { font-size: 1.02rem; }
.lado-rodape { font-size: .78rem; padding: 0 6px; line-height: 1.7; }
.lado-rodape a { color: var(--texto-2); }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 4px 0 14px; text-align: center; }
.mini-stats div { padding: 10px 4px; border-radius: 10px; background: var(--superficie-2); }
.mini-stats strong { display: block; font-size: 1.25rem; font-weight: 800; color: var(--verde); }
.mini-stats span { font-size: .72rem; color: var(--texto-2); font-weight: 600; text-transform: uppercase; }
.regras-mini { margin: 0 0 10px; padding-left: 20px; font-size: .88rem; display: grid; gap: 4px; }

/* ---------- Capa do grupo ---------- */
.grupo-capa { position: relative; border-radius: 18px; overflow: hidden; margin-bottom: 14px; background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(0, 163, 92, .25); }
.grupo-capa-fundo { position: absolute; inset: 0; overflow: hidden; }
.bolha { position: absolute; border-radius: 50%; opacity: .35; animation: flutua 9s ease-in-out infinite; }
.b1 { width: 220px; height: 220px; right: -60px; top: -80px; background: #ffc107; }
.b2 { width: 140px; height: 140px; right: 120px; bottom: -70px; background: #ff7a1a; animation-delay: -3s; }
.b3 { width: 90px; height: 90px; left: 40%; top: -30px; background: #f0368a; animation-delay: -6s; opacity: .25; }
@keyframes flutua { 50% { transform: translate(-14px, 12px) scale(1.06); } }
.grupo-capa-info { position: relative; display: flex; align-items: center; gap: 16px; padding: 26px 22px; }
.grupo-logo { border-radius: 18px; box-shadow: 0 6px 18px rgba(0, 0, 0, .25); border: 3px solid rgba(255, 255, 255, .85); flex-shrink: 0; }
.grupo-capa h1 { font-size: 1.55rem; margin: 0 0 4px; text-shadow: 0 2px 8px rgba(0, 0, 0, .15); }
.grupo-capa p { margin: 0; opacity: .95; font-size: .9rem; display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }

/* ---------- Composer ---------- */
.composer { background: var(--superficie); border-radius: 16px; box-shadow: var(--sombra); padding: 12px 16px 6px; margin-bottom: 14px; }
.composer-linha { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; border-bottom: 1px solid var(--borda); }
.composer-campo {
  flex: 1; padding: 11px 16px; border-radius: 999px; background: var(--superficie-2); color: var(--texto-2);
  font-size: 1rem; text-decoration: none !important; transition: background .15s;
}
.composer-campo:hover { background: var(--borda); }
.composer-botoes { display: grid; grid-template-columns: repeat(3, 1fr); padding-top: 4px; }
.composer-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px; padding: 9px; border-radius: 10px;
  color: var(--texto-2); font-weight: 600; font-size: .92rem; text-decoration: none !important;
}
.composer-btn:hover { background: var(--superficie-2); }
.composer-btn .ic { width: 22px; height: 22px; }
.c-verde { color: #22c55e; }
.c-vermelho { color: #ef4444; }
.c-roxo { color: var(--roxo); }

/* ---------- Stories ---------- */
.stories { position: relative; margin-bottom: 14px; }
.carrossel-trilho.stories-trilho { grid-auto-columns: 128px; gap: 10px; padding: 2px 2px 6px; }
.story {
  position: relative; display: block; height: 216px; border-radius: 14px; overflow: hidden; background: #222;
  box-shadow: var(--sombra); color: #fff; text-decoration: none !important;
}
/* Só a foto do produto (filha direta) ocupa o card; a foto do vendedor fica pequena no canto */
.story > img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.story:hover > img { transform: scale(1.07); }
.story::after { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .25) 0%, transparent 35%, transparent 50%, rgba(0, 0, 0, .8) 100%); }
.story-sem { display: grid; place-items: center; height: 100%; font-size: 3rem; background: var(--grad); }
.story-av { position: absolute; top: 8px; left: 8px; z-index: 1; padding: 3px; border-radius: 50%; background: var(--grad-quente); display: flex; }
.story-av .avatar { width: 40px !important; height: 40px !important; border: 2px solid #fff; object-fit: cover; }
.story-info { position: absolute; left: 10px; right: 10px; bottom: 10px; z-index: 1; display: flex; flex-direction: column; }
.story-info strong { font-size: 1rem; font-weight: 800; }
.story-info span { font-size: .78rem; line-height: 1.25; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.story-criar { background: var(--superficie); color: var(--texto); display: flex; flex-direction: column; }
.story-criar::after { display: none; }
.story-criar-topo { flex: 1; display: grid; place-items: center; background: var(--superficie-2); overflow: hidden; }
.story-criar-topo .avatar { width: 100%; height: 100%; border-radius: 0; font-size: 3rem; object-fit: cover; }
.story-criar-ic .ic { width: 40px; height: 40px; color: var(--verde); }
.story-criar-mais {
  position: absolute; left: 50%; bottom: 44px; transform: translate(-50%, 50%); display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--grad); color: #fff; border: 4px solid var(--superficie);
}
.story-criar strong { padding: 26px 8px 12px; text-align: center; font-size: .85rem; }
.stories .carrossel-btn { top: 50%; transform: translateY(-50%); }
.stories .carrossel-btn.esq { left: -12px; }
.stories .carrossel-btn.dir { right: -12px; }

/* ---------- Buscar no feed ---------- */
.feed-busca {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px; padding: 6px 6px 6px 16px;
  background: var(--superficie); border-radius: 999px; box-shadow: var(--sombra); border: 2px solid transparent; transition: border-color .15s, box-shadow .15s;
}
.feed-busca:focus-within { border-color: var(--verde); box-shadow: 0 0 0 4px color-mix(in srgb, var(--verde) 15%, transparent); }
.feed-busca > .ic { color: var(--verde); width: 20px; height: 20px; flex-shrink: 0; }
.feed-busca input[type=search] { flex: 1; min-width: 0; border: 0; background: none; padding: 9px 0; font-size: 1rem; box-shadow: none; }
.feed-busca input[type=search]:focus { box-shadow: none; }
.feed-busca input[type=search]::-webkit-search-cancel-button { display: none; }
.feed-busca-limpar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; color: var(--texto-2); background: var(--superficie-2); flex-shrink: 0; }
.feed-busca .btn { flex-shrink: 0; }
@media (max-width: 600px) {
  .feed > .feed-busca { margin-left: 8px; margin-right: 8px; }
  .feed-busca .btn { display: none; }
  .feed-busca input[type=search] { font-size: .95rem; }
}

/* ---------- Abas do feed / chips ---------- */
.feed-abas { display: flex; gap: 6px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; padding: 2px 2px 4px; }
.feed-abas a, .chip {
  flex-shrink: 0; padding: 8px 16px; border-radius: 999px; background: var(--superficie); color: var(--texto);
  font-weight: 700; font-size: .9rem; box-shadow: var(--sombra); text-decoration: none !important; transition: all .15s;
}
.feed-abas a:hover, .chip:hover { transform: translateY(-1px); }
.feed-abas a.ativo, .chip.ativo { background: var(--grad); color: #fff; box-shadow: 0 4px 12px rgba(0, 163, 92, .35); }
.feed-filtro { margin: -4px 0 12px; font-size: .9rem; }
.cats-chips { gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -16px 12px; padding: 2px 16px 6px; }
.cats-chips::-webkit-scrollbar, .feed-abas::-webkit-scrollbar { display: none; }
.so-mobile-flex { display: none; }

/* ---------- Post ---------- */
.posts { display: grid; gap: 14px; }
.post { background: var(--superficie); border-radius: 16px; box-shadow: var(--sombra); overflow: hidden; animation: sobe .35s ease both; }
@keyframes sobe { from { opacity: 0; transform: translateY(12px); } }
.post-destaque { box-shadow: 0 0 0 2px var(--amarelo), 0 8px 24px rgba(255, 193, 7, .25); }
.post-vendido .mosaico { filter: grayscale(.8); opacity: .7; }
.post-topo { display: flex; align-items: center; gap: 10px; padding: 12px 16px 4px; }
.post-av { display: flex; }
.post-av .avatar { box-shadow: 0 0 0 2px var(--superficie), 0 0 0 4px var(--verde-claro); }
.post-quem { flex: 1; min-width: 0; }
.post-nome { display: block; font-weight: 700; color: var(--texto); font-size: .97rem; }
.post-meta { font-size: .8rem; color: var(--texto-2); display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.post-meta span { display: inline-flex; align-items: center; gap: 2px; }
.post-meta a { color: var(--texto-2); font-weight: 600; }
.post-meta .ic { width: 12px; height: 12px; }
.post-selo { flex-shrink: 0; }
.post-texto { padding: 6px 16px 10px; }
.post-titulo-linha { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 2px; }
.post-titulo { font-weight: 700; font-size: 1.05rem; color: var(--texto); }
.pill { display: inline-block; padding: 3px 9px; border-radius: 6px; font-size: .7rem; font-weight: 800; letter-spacing: .04em; color: #fff; }
.pill-venda { background: var(--grad); }
.pill-troca { background: linear-gradient(135deg, #a78bfa, #7c4dff); }
.pill-venda_ou_troca { background: linear-gradient(135deg, #3b82f6, #7c4dff); }
.pill-vendido { background: #18211c; }
.post-preco, .card-preco, .detalhe-preco {
  font-weight: 900; letter-spacing: -.02em;
  background: linear-gradient(135deg, #00a35c, #0d8f7a); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.post-preco { font-size: 1.55rem; margin: 2px 0 4px; }
.post-desc { margin: 0; white-space: pre-line; word-wrap: break-word; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-desc.aberto { display: block; }
.post-mais { background: none; border: 0; padding: 0; color: var(--texto); font-weight: 700; cursor: pointer; font-size: .9rem; }
.post-mais:hover { text-decoration: underline; }
.post-troca { display: flex; align-items: flex-start; gap: 8px; margin-top: 8px; padding: 9px 12px; border-radius: 10px; background: #f1ecff; color: #4c2bb8; font-size: .9rem; }
.post-troca .ic { margin-top: 2px; }

/* Mosaico de fotos (como posts de grupo) */
.mosaico { display: grid; gap: 3px; background: var(--superficie-2); text-decoration: none !important; }
.mosaico-item { position: relative; overflow: hidden; background: #111; min-height: 0; }
.mosaico-item img, .mosaico-item video { width: 100%; height: 100%; object-fit: cover; transition: opacity .2s; }
.mosaico:hover .mosaico-item img { opacity: .92; }
.mosaico-1 .mosaico-item { aspect-ratio: 4 / 3.4; }
.mosaico-2 { grid-template-columns: 1fr 1fr; }
.mosaico-2 .mosaico-item { aspect-ratio: 1 / 1.15; }
.mosaico-3 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.mosaico-3 .mosaico-item:first-child { grid-row: 1 / 3; }
.mosaico-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; aspect-ratio: 1 / 1; }
.mosaico-5 { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1.4fr 1fr; aspect-ratio: 1 / 1; }
.mosaico-5 .mosaico-item:nth-child(1), .mosaico-5 .mosaico-item:nth-child(2) { grid-column: span 3; }
.mosaico-5 .mosaico-item:nth-child(n+3) { grid-column: span 2; }
.mosaico-play {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; place-items: center;
  width: 58px; height: 58px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; border: 3px solid #fff;
}
.mosaico-play .ic { width: 24px; height: 24px; fill: #fff; margin-left: 3px; }
.mosaico-extra { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .5); color: #fff; font-size: 2rem; font-weight: 800; }

.post-numeros { display: flex; justify-content: space-between; padding: 10px 16px; font-size: .85rem; color: var(--texto-2); }
.post-numeros span { display: inline-flex; align-items: center; gap: 4px; }
.post-numeros a { color: var(--texto-2); }
.post-acoes { display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 12px; border-top: 1px solid var(--borda); border-bottom: 1px solid var(--borda); padding: 3px 0; }
.post-acoes form { margin: 0; display: contents; }
.post-acao {
  display: flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 4px; border-radius: 8px;
  background: none; border: 0; color: var(--texto-2); font-weight: 600; font-size: .9rem; cursor: pointer; text-decoration: none !important;
}
.post-acao:hover { background: var(--superficie-2); color: var(--texto); }
.post-acao .ic { width: 20px; height: 20px; }
.post-acao.ativo { color: var(--vermelho); }
.post-acao.ativo .ic { fill: var(--vermelho); animation: pulsa .35s; }
@keyframes pulsa { 50% { transform: scale(1.35); } }
.post-acao-whats { color: #1fa855; }
.post-acao-whats:hover { color: #178c46; background: #e8f9ee; }

/* ---------- Comentários ---------- */
.post-coments { padding: 8px 16px 12px; }
.detalhe-coments .post-coments { padding: 0; }
.detalhe-coments h2 { display: flex; align-items: center; gap: 8px; }
.coment-dica { font-size: .88rem; margin-top: -4px; }
.post-ver-coments { display: inline-block; font-weight: 600; font-size: .88rem; color: var(--texto-2); margin-bottom: 6px; }
.coment-lista { display: grid; gap: 8px; margin-bottom: 8px; }
.coment-lista:empty { display: none; }
.coment { display: flex; gap: 8px; animation: sobe .25s ease both; }
.coment-av { flex-shrink: 0; display: flex; }
.coment-corpo { min-width: 0; }
.coment-bolha { display: inline-block; max-width: 100%; padding: 7px 12px; border-radius: 18px; background: var(--superficie-2); }
.coment-nome { font-weight: 700; font-size: .85rem; color: var(--texto); }
.coment-selo { margin-left: 4px; padding: 1px 6px; border-radius: 5px; background: var(--verde-claro); color: var(--verde); font-size: .66rem; font-weight: 800; text-transform: uppercase; }
.coment-bolha p { margin: 1px 0 0; font-size: .92rem; white-space: pre-line; word-wrap: break-word; }
.coment-meta { display: flex; gap: 10px; align-items: center; padding: 2px 12px 0; font-size: .75rem; color: var(--texto-2); font-weight: 600; }
.coment-meta form { margin: 0; }
.coment-apagar { background: none; border: 0; padding: 0; color: var(--texto-2); font: inherit; cursor: pointer; }
.coment-apagar:hover { color: var(--vermelho); text-decoration: underline; }
.coment-form { display: flex; align-items: center; gap: 8px; margin: 0; }
.coment-form input[type=text] { flex: 1; border-radius: 999px; background: var(--superficie-2); border-color: transparent; padding: 9px 14px; }
.coment-form input[type=text]:focus { background: var(--superficie); }
.coment-enviar { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 0; background: none; color: var(--verde); cursor: pointer; flex-shrink: 0; }
.coment-enviar:hover { background: var(--verde-claro); }
.coment-login { display: block; text-align: center; padding: 9px; border-radius: 999px; background: var(--superficie-2); font-weight: 600; font-size: .9rem; }
.coment-vazio { margin: 0; font-size: .9rem; }

/* ---------- Carregando ---------- */
.feed-carregando { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 24px; color: var(--texto-2); font-weight: 600; }
.spinner { width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--borda); border-top-color: var(--verde); animation: gira .8s linear infinite; }
@keyframes gira { to { transform: rotate(360deg); } }
.feed-fim { text-align: center; padding: 20px; font-weight: 600; }

/* ---------- Cards/painéis mais vivos ---------- */
.card { border: 0; box-shadow: var(--sombra); border-radius: 16px; }
.selo-troca { background: linear-gradient(135deg, #a78bfa, #7c4dff); }
.selo-destaque { background: var(--grad-quente); color: #2a1600; box-shadow: 0 2px 8px rgba(255, 122, 26, .4); }
.painel { border: 0; box-shadow: var(--sombra); border-radius: 16px; }
.filtros-form, .cat, .passo, .galeria { border: 0; box-shadow: var(--sombra); }
.nav-mobile-mais .ic { background: var(--grad-quente) !important; box-shadow: 0 4px 14px rgba(255, 122, 26, .5) !important; }

/* ---------- Modo escuro (ajustes v2) ---------- */
@media (prefers-color-scheme: dark) {
  .post-troca { background: #251d45; color: #c4b5fd; }
  .lado-item:hover { background: rgba(255, 255, 255, .06); }
  .post-acao-whats:hover { background: #12301f; }
}

/* ---------- Responsivo v2 ---------- */
@media (max-width: 1240px) {
  .feed-layout { grid-template-columns: 250px minmax(0, 620px) 270px; gap: 18px; }
  .topo-aba { width: 72px; }
}
@media (max-width: 1080px) {
  .feed-layout { grid-template-columns: 240px minmax(0, 1fr); }
  .lado-dir { display: none; }
}
@media (max-width: 860px) {
  .topo-abas { display: none; }
  .busca-topo { max-width: none; flex: 1; }
  .feed-layout { grid-template-columns: minmax(0, 1fr); padding-top: 10px; }
  .lado-esq { display: none; }
  .so-mobile-flex { display: flex; }
  .grupo-capa-info { padding: 18px 16px; }
  .grupo-logo { width: 56px; height: 56px; }
  .grupo-capa h1 { font-size: 1.2rem; }
  .stories .carrossel-btn { display: none; }
  /* Página do anúncio: preço e contato logo depois das fotos */
  .detalhe-midia { display: contents; }
  .detalhe .galeria { order: 1; }
  .detalhe-lateral { order: 2; }
  .detalhe-desc { order: 3; }
  .detalhe-coments { order: 4; }
}
@media (max-width: 600px) {
  .feed-layout { padding-left: 0; padding-right: 0; }
  .feed > .grupo-capa, .feed > .composer { margin-left: 8px; margin-right: 8px; }
  .stories { padding-left: 8px; }
  .feed-abas, .feed-filtro { padding-left: 8px; padding-right: 8px; }
  .cats-chips { margin: 0 0 12px; padding: 2px 8px 6px; }
  .posts { gap: 10px; }
  .post { border-radius: 0; }
  .post-acao span { display: none; }
  .post-acao .ic { width: 22px; height: 22px; }
  .post-preco { font-size: 1.35rem; }
  .carrossel-trilho.stories-trilho { grid-auto-columns: 108px; }
  .story { height: 184px; }
}

/* ---------- Sino de notificações ---------- */
.menu-notif { position: relative; }
.sino {
  position: relative; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%;
  background: var(--superficie-2); color: var(--texto); cursor: pointer; list-style: none; transition: background .15s;
}
.sino::-webkit-details-marker { display: none; }
.sino:hover, .menu-notif[open] .sino { background: var(--verde-claro); color: var(--verde); }
.sino .ic { width: 22px; height: 22px; }
.sino .badge { position: absolute; top: -3px; right: -4px; border: 2px solid var(--superficie); }
.menu-notif[open] .sino .ic { animation: balanca .5s; }
@keyframes balanca { 20% { transform: rotate(14deg); } 40% { transform: rotate(-12deg); } 60% { transform: rotate(8deg); } 80% { transform: rotate(-4deg); } }
.notif-drop {
  position: absolute; right: -50px; top: calc(100% + 10px); width: 380px; max-height: 70vh; overflow-y: auto; z-index: 70;
  background: var(--superficie); border-radius: 16px; box-shadow: var(--sombra-forte); border: 1px solid var(--borda); padding: 6px;
}
.notif-topo { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 6px; }
.notif-topo strong { font-size: 1.15rem; }
.notif-topo a { font-weight: 600; font-size: .88rem; }
.notif-vazio { padding: 14px 12px 18px; margin: 0; font-size: .9rem; }
.notif {
  display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 12px; color: var(--texto);
  text-decoration: none !important; transition: background .15s;
}
.notif:hover { background: var(--superficie-2); }
.notif.nao-lida { background: color-mix(in srgb, var(--verde-claro) 70%, transparent); }
.notif-av { position: relative; flex-shrink: 0; display: flex; }
.notif-av .avatar { width: 48px; height: 48px; }
.notif-tipo {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
  background: var(--superficie); box-shadow: var(--sombra); font-size: .78rem;
}
.notif-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: .9rem; line-height: 1.3; }
.notif-frase b { font-weight: 700; }
.notif-trecho { color: var(--texto-2); font-size: .85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 1px; }
.notif-quando { color: var(--verde); font-size: .76rem; font-weight: 700; margin-top: 2px; }
.notif:not(.nao-lida) .notif-quando { color: var(--texto-2); font-weight: 500; }
.notif-ponto { width: 10px; height: 10px; border-radius: 50%; background: var(--verde); flex-shrink: 0; }
.notif-pagina { padding: 6px; }
@media (max-width: 860px) {
  .notif-drop { position: fixed; left: 8px; right: 8px; top: calc(var(--topo-h) + 10px); width: auto; max-height: calc(100vh - var(--topo-h) - 90px); }
  .sino { width: 38px; height: 38px; }
}

/* ---------- Curtir ---------- */
.post-acoes { grid-template-columns: repeat(5, 1fr); }
.btn-curtir.ativo, .btn-curtir.ativo:hover { color: var(--azul); }
.btn-curtir.ativo .ic { fill: color-mix(in srgb, var(--azul) 22%, transparent); animation: pulsa .35s; }
.post-ncurt { display: inline-flex; align-items: center; gap: 10px; }
.ncurt-bolha { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; color: var(--texto); }
.btn-texto .ncurt-bolha { margin-left: 2px; padding: 0 7px; border-radius: 999px; background: var(--superficie-2); font-size: .8rem; }
.coment-curtir { background: none; border: 0; padding: 0; font: inherit; font-weight: 700; color: var(--texto-2); cursor: pointer; }
.coment-curtir:hover { text-decoration: underline; }
.coment-curtir.ativo { color: var(--azul); }
.coment-ncurt { padding: 0 6px; border-radius: 999px; background: var(--superficie); box-shadow: var(--sombra); color: var(--texto); }
.coment:target .coment-bolha { animation: destaca 2.4s ease; }
@keyframes destaca { 0%, 60% { box-shadow: 0 0 0 3px var(--amarelo); } 100% { box-shadow: none; } }

/* ---------- Etiquetas dos stories ---------- */
.story-etiqueta {
  position: absolute; top: 10px; right: 8px; z-index: 1; padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, .55); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .02em;
}
.story-meu .story-etiqueta { background: var(--grad); }
.story-destaque .story-etiqueta { background: var(--grad-quente); color: #2a1600; }
.story-meu { box-shadow: 0 0 0 3px var(--verde), var(--sombra); }

/* ---------- Foto do perfil ---------- */
.avatar-trocar { position: relative; display: inline-flex; flex-shrink: 0; cursor: pointer; border-radius: 50%; text-decoration: none !important; }
.avatar-trocar .avatar { box-shadow: 0 0 0 3px var(--superficie), 0 0 0 5px var(--verde-claro); transition: filter .15s; }
.avatar-trocar:hover .avatar { filter: brightness(.9); }
.avatar-trocar .avatar-xl { width: 112px; height: 112px; font-size: 2.6rem; }
.avatar-cam {
  position: absolute; right: -2px; bottom: -2px; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: 50%; background: var(--grad); color: #fff; border: 3px solid var(--superficie); box-shadow: var(--sombra);
}
.avatar-cam .ic { width: 17px; height: 17px; }
.avatar-trocar-sm .avatar-cam { width: 26px; height: 26px; border-width: 2px; }
.avatar-trocar-sm .avatar-cam .ic { width: 13px; height: 13px; }
.avatar-edit { align-items: center; gap: 20px; }
.avatar-edit-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.avatar-edit-txt p { margin: 0 0 4px; font-size: .88rem; }
.avatar-edit-txt .check { margin: 4px 0 0; }
.avatar-enviando { display: inline-flex; align-items: center; gap: 8px; font-size: .88rem; }
.avatar-enviando .spinner { width: 16px; height: 16px; border-width: 2px; }
.convite-foto {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 16px; border-radius: 16px;
  background: var(--amarelo-claro); border: 1px dashed var(--amarelo-esc); color: var(--texto); text-decoration: none !important;
}
.convite-foto-ic { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; background: var(--grad-quente); color: #2a1600; flex-shrink: 0; }
.convite-foto > span:nth-child(2) { flex: 1; display: flex; flex-direction: column; }
.convite-foto small { color: var(--texto-2); }
@media (max-width: 600px) {
  .avatar-edit { flex-direction: column; text-align: center; }
  .avatar-edit-txt { align-items: center; }
  .convite-foto { flex-wrap: wrap; }
  .convite-foto .btn { width: 100%; }
}

/* ---------- Painel do administrador (dashboard) ---------- */
.dash-topo { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.dash-titulo { font-size: 1.5rem; margin: 0 0 2px; }
.dash-topo p { margin: 0; }
.dash-data { text-transform: capitalize; }
.dash-aovivo { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--verde-claro); color: var(--verde); font-weight: 700; font-size: .85rem; }
.dash-aovivo-ponto { width: 9px; height: 9px; border-radius: 50%; background: var(--verde); animation: piscar 1.4s infinite; }
.kpis { display: grid; gap: 14px; margin-bottom: 14px; }
.kpis-destaque { grid-template-columns: repeat(4, 1fr); }
.kpi {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 18px 18px 16px;
  border-radius: 18px; color: #fff; box-shadow: var(--sombra-forte);
}
.kpi::after { content: ''; position: absolute; right: -30px; top: -30px; width: 120px; height: 120px; border-radius: 50%; background: rgba(255, 255, 255, .14); }
.kpi-verde { background: var(--grad); }
.kpi-laranja { background: linear-gradient(135deg, #ffb300, #ff6a00); }
.kpi-roxo { background: linear-gradient(135deg, #9c6bff, #6a3df0); }
.kpi-azul { background: linear-gradient(135deg, #3b82f6, #1d4ed8); }
.kpi-ic { font-size: 1.6rem; line-height: 1; margin-bottom: 4px; }
.kpi-rotulo { font-size: .85rem; font-weight: 700; opacity: .92; text-transform: uppercase; letter-spacing: .04em; }
.kpi-valor { font-size: 2.6rem; font-weight: 900; line-height: 1.05; letter-spacing: -.03em; }
.kpi-sub { font-size: .82rem; opacity: .95; }
.kpi-delta { padding: 1px 7px; border-radius: 999px; background: rgba(255, 255, 255, .22); font-weight: 700; white-space: nowrap; }
.kpis-mini { grid-template-columns: repeat(8, 1fr); }
.kpi-mini {
  display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--superficie);
  box-shadow: var(--sombra); color: var(--texto); text-decoration: none !important;
}
.kpi-mini span { font-size: .74rem; color: var(--texto-2); font-weight: 600; line-height: 1.2; }
.kpi-mini strong { font-size: 1.35rem; font-weight: 800; }
.kpi-alerta { box-shadow: 0 0 0 2px var(--vermelho), var(--sombra); }
.kpi-pulso { animation: pulsa .6s; display: inline-block; }
.kpi-alerta strong { color: var(--vermelho); }
.dash-grade { display: grid; grid-template-columns: 1.7fr 1fr; gap: 14px; margin-bottom: 14px; }
.dash-grade-3 { grid-template-columns: repeat(3, 1fr); }
.dash-grade .painel { margin: 0; }
.dash-sec-topo { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.dash-sec-topo h3 { margin: 0; }
.legenda { display: flex; gap: 12px; font-size: .8rem; color: var(--texto-2); flex-wrap: wrap; }
.legenda i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.cor-pub, .barra-pub { background: #ff8a00; fill: #ff8a00; }
.cor-com, .barra-com { background: #7c4dff; fill: #7c4dff; }
.cor-mem, .barra-mem { background: #00a35c; fill: #00a35c; }
.grafico { width: 100%; height: auto; display: block; }
.grafico .grade-linha { stroke: var(--borda); stroke-width: 1; }
.grafico .eixo { fill: var(--texto-2); font-size: 11px; font-family: inherit; }
.grafico g:hover rect { opacity: .8; }
.atividade, .ranking { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.atividade li { display: flex; gap: 10px; align-items: flex-start; font-size: .88rem; line-height: 1.35; }
.atividade li > div { min-width: 0; display: flex; flex-direction: column; }
.atividade a { font-weight: 600; }
.atividade-det { color: var(--texto-2); font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.atividade time { font-size: .75rem; }
.ranking li { display: flex; align-items: center; gap: 10px; }
.ranking-pos { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; background: var(--superficie-2); font-weight: 800; font-size: .8rem; flex-shrink: 0; }
.ranking li:first-child .ranking-pos { background: var(--grad-quente); color: #2a1600; }
.ranking-img { width: 46px; height: 46px; border-radius: 10px; overflow: hidden; background: var(--superficie-2); flex-shrink: 0; }
.ranking-img img { width: 100%; height: 100%; object-fit: cover; }
.ranking-info { min-width: 0; display: flex; flex-direction: column; font-size: .88rem; }
.ranking-info a { font-weight: 600; color: var(--texto); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ranking-info span { font-size: .78rem; }
@media (max-width: 1100px) {
  .kpis-mini { grid-template-columns: repeat(4, 1fr); }
  .dash-grade, .dash-grade-3 { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
  .kpis-destaque { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .kpi { padding: 14px; }
  .kpi-valor { font-size: 2rem; }
  .kpi-sub { font-size: .75rem; }
  .kpis-mini { grid-template-columns: repeat(2, 1fr); gap: 8px; }
}

/* ---------- Chat: foto e áudio ---------- */
.chat-anexo {
  display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 50%;
  border: 0; background: var(--superficie-2); color: var(--verde); cursor: pointer; font-size: 1.15rem; transition: background .15s;
}
.chat-anexo:hover { background: var(--verde-claro); }
.chat-anexo .ic { width: 21px; height: 21px; }
.chat-form { align-items: center; }
.chat-gravando, .chat-enviando { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-top: 1px solid var(--borda); }
.chat-gravando[hidden], .chat-enviando[hidden], .chat-form[hidden] { display: none; }
.chat-gravando-cancelar { display: grid; place-items: center; width: 42px; height: 42px; border: 0; border-radius: 50%; background: var(--vermelho-claro); color: var(--vermelho); cursor: pointer; }
.chat-gravando-ponto { width: 12px; height: 12px; border-radius: 50%; background: var(--vermelho); animation: piscar 1s infinite; }
@keyframes piscar { 50% { opacity: .25; } }
.chat-gravando-tempo { font-weight: 800; font-variant-numeric: tabular-nums; min-width: 42px; }
.chat-gravando-txt { flex: 1; font-size: .9rem; }
.chat-enviando { justify-content: center; font-weight: 600; }
.chat-enviando .spinner { width: 18px; height: 18px; border-width: 2px; }
.msg-img { display: block; margin: -2px -6px 2px; border-radius: 12px; overflow: hidden; max-width: 260px; }
.msg-img img { display: block; width: 100%; max-height: 340px; object-fit: cover; cursor: zoom-in; }
.msg-som { display: flex; align-items: center; gap: 6px; margin: 2px 0; }
.msg-som-ic { font-size: 1.1rem; }
.msg-som audio { width: 230px; max-width: 62vw; height: 40px; }
.msg.msg-foto, .msg.msg-audio { padding: 6px 8px 5px; }
@media (max-width: 600px) {
  .chat-anexo { width: 38px; height: 38px; }
  .chat-form { gap: 6px; padding: 8px; }
}

/* ---------- Aviso: app desatualizado ---------- */
.app-atualizar {
  position: sticky; top: calc(var(--topo-h) + 4px); z-index: 45; display: flex; align-items: center; gap: 12px;
  margin: 10px auto 0; width: calc(100% - 16px); max-width: 760px; padding: 12px 12px 12px 14px; border-radius: 16px;
  background: linear-gradient(135deg, #18211c, #0d3b28); color: #fff; box-shadow: var(--sombra-forte); animation: sobe .35s ease both;
}
.app-atualizar-ic { font-size: 1.6rem; flex-shrink: 0; }
.app-atualizar-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.app-atualizar-txt small { opacity: .8; font-size: .8rem; }
.app-atualizar .btn { flex-shrink: 0; }
.app-atualizar-x { display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .12); color: #fff; cursor: pointer; flex-shrink: 0; }
.app-atualizar-x .ic { width: 15px; height: 15px; }

/* ---------- App Android: banner e página /app ---------- */
.app-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 14px; border-radius: 16px;
  background: linear-gradient(135deg, #18211c, #0d3b28); color: #fff; box-shadow: var(--sombra-forte); text-decoration: none !important;
}
.app-banner-ic img { border-radius: 10px; display: block; }
.app-banner-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.app-banner-txt small { opacity: .8; font-size: .8rem; }
.app-banner-btn { padding: 8px 16px; border-radius: 999px; background: var(--grad-quente); color: #2a1600; font-weight: 800; font-size: .88rem; flex-shrink: 0; }
@media (max-width: 600px) { .feed > .app-banner { margin-left: 8px; margin-right: 8px; } }

.app-hero { display: flex; gap: 22px; align-items: center; padding: 28px; margin-bottom: 16px; border-radius: 20px; background: var(--grad); color: #fff; box-shadow: 0 8px 26px rgba(0, 163, 92, .25); }
.app-hero h1 { font-size: 1.6rem; margin-bottom: 6px; }
.app-hero p { opacity: .95; }
.app-hero-ic img { border-radius: 22px; border: 3px solid rgba(255, 255, 255, .85); box-shadow: 0 6px 18px rgba(0, 0, 0, .25); }
.app-meta { color: rgba(255, 255, 255, .85) !important; font-size: .85rem; margin: 10px 0 0; }
.app-ok { display: flex; align-items: center; gap: 6px; font-weight: 700; }
.app-hero .aviso { color: var(--texto); margin: 0; }
.app-passos { padding-left: 22px; display: grid; gap: 10px; }
.app-passos code { background: var(--superficie-2); padding: 1px 6px; border-radius: 6px; font-size: .85em; }
@media (max-width: 600px) {
  .app-hero { flex-direction: column; text-align: center; padding: 22px 16px; }
  .app-hero .btn { width: 100%; }
}
