/* MAMBA ENABLEMENT — visual v2: Feed enxuto, menu do gestor em grupos, tela Você, Reels, notificações.
   Carrega depois do app.css e só refina; nada aqui muda as regras antigas de outras telas. */

/* ───── cor de cada tipo de post ───── */
.kind-curiosidade { --kc: 109, 40, 217; }
.kind-case { --kc: 138, 90, 0; }
.kind-dica { --kc: 12, 107, 69; }
.kind-conquista { --kc: 176, 36, 120; }

/* ───── Feed: layout com coluna da direita no PC largo ───── */
.feed-layout { width: 100%; }
.feed-rail { display: none; }
.page:has(.feed-layout) { max-width: 1180px; }
@media (min-width: 1180px) {
  html:not([data-mode="mobile"]) .feed-layout { display: grid; grid-template-columns: minmax(0, 700px) 300px; gap: 28px; justify-content: center; align-items: start; }
  html:not([data-mode="mobile"]) .feed-rail { display: grid; gap: 14px; position: sticky; top: 84px; align-self: start; }
  html:not([data-mode="mobile"]) .feed-top .fstrip { display: none; }
}

/* ───── Feed: stories mais enxutos ───── */
.feed .dst-row { padding: 2px 2px 8px; gap: 14px; }
.feed .dst-item { width: 66px; gap: 5px; font-size: .78rem; }
.feed .dst-ring { width: 62px; height: 62px; }

/* ───── Feed: faixa de status de uma linha ───── */
.feed-top { gap: 10px; transition: opacity .25s ease, transform .25s ease; }
.feed-top.is-leaving { opacity: 0; transform: translateY(-6px); }
.fstrip { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.fs-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 34px; padding: 0 13px; border-radius: 999px; font-weight: 700; font-size: .88rem; background: var(--panel-2); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.fs-chip.warn { background: rgba(255, 193, 94, .12); border-color: rgba(255, 193, 94, .5); color: var(--warn); }
a.fs-chip:hover { border-color: var(--gold); color: var(--text); }
.fs-chip.fire { background: rgba(255, 122, 60, .14); border-color: rgba(255, 122, 60, .5); color: #ffb27a; }
.fs-checkin { flex: 1 1 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 8px 7px 14px; border-radius: 14px; background: linear-gradient(120deg, rgba(var(--purple-rgb), .75), rgba(var(--panel-rgb), .85)); border: 1px solid rgba(var(--gold-rgb), .35); }
.fs-text { font-size: .9rem; }
.fs-ico { width: 30px; height: 30px; flex: none; display: grid; place-items: center; border-radius: 50%; background: var(--gold); color: var(--gold-ink); }
.panel.fnick { padding: 9px 10px 9px 12px; border-color: rgba(var(--gold-rgb), .4); }
.fstrip-row { display: flex; align-items: center; gap: 10px; }
.fstrip-row .fs-text { flex: 1; min-width: 0; line-height: 1.3; }
.fnick .nick-form { margin-top: 10px; }

/* ───── Feed: caixa de post recolhida ───── */
.composer.panel { padding: 14px 16px; gap: 10px; border-radius: 16px; }
.composer-top { align-items: center; }
.composer-top > :last-child { flex: 1; min-width: 0; }
.composer.is-compact { padding: 10px 12px; gap: 8px; }
.composer.is-compact > :not(.composer-top):not(.kind-row) { display: none; }
.composer.is-compact > .kind-row { display: flex; }
.fs-checkin .btn { white-space: nowrap; flex: none; }
.fs-checkin .fs-text { min-width: 0; }
.composer.is-compact .composer-top .avatar { width: 36px !important; height: 36px !important; }
.composer.is-compact .composer-text { min-height: 42px; height: 42px; padding: 9px 16px; border-radius: 999px; resize: none; overflow: hidden; background: rgba(var(--sh), .5); line-height: 1.4; white-space: nowrap; text-overflow: ellipsis; }
.composer:not(.is-compact) .composer-top { align-items: flex-start; }
.kind-row { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 1px 0; }
.kind-row::-webkit-scrollbar { display: none; }
.kind-lead { font-size: .82rem; font-weight: 700; color: var(--faint); margin-right: 2px; white-space: nowrap; }
.kind-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(var(--kc), .5); background: rgba(var(--kc), .1); color: rgb(var(--kc)); font-weight: 700; font-size: .86rem; cursor: pointer; white-space: nowrap; flex: none; }
.kind-btn:hover { background: rgba(var(--kc), .22); }
.kind-btn[aria-pressed="true"] { background: rgb(var(--kc)); color: var(--gold-ink); border-color: rgb(var(--kc)); }
.kind-chip { color: rgb(var(--kc)); background: rgba(var(--kc), .13); border-color: rgba(var(--kc), .5); }
.composer-note { margin: 0; color: var(--muted); }
.composer-note::before { content: "✓ "; color: var(--good); font-weight: 800; }

/* ───── Feed: filtros em uma linha ───── */
.fbar { display: flex; align-items: center; gap: 8px; margin: 0; }
.fbar-scroll { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px 0; -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 22px), transparent); }
.fbar-scroll::-webkit-scrollbar { display: none; }
.fbar-end { display: flex; gap: 6px; flex: none; }
.fpill { display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 700; font-size: .86rem; text-decoration: none; white-space: nowrap; cursor: pointer; flex: none; }
.fpill:is(.tag-gold, .tag-purple, .tag-green, .tag-red, .tag-blue, .tag-orange, .tag-pink, .tag-gray) { color: rgb(var(--tc)); border-color: rgba(var(--tc), .45); }
.fpill:hover { border-color: var(--gold); color: var(--text); }
.fpill.on, .fpill[aria-pressed="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.fpill.on:is(.tag-gold, .tag-purple, .tag-green, .tag-red, .tag-blue, .tag-orange, .tag-pink, .tag-gray) { background: rgb(var(--tc)); border-color: rgb(var(--tc)); color: var(--gold-ink); }
.fpill.ghost { color: var(--text); }
.fbar.is-mine .fbar-scroll { opacity: .45; pointer-events: none; }
@media (max-width: 480px) { .fpill .fp-t { display: none; } .fpill.ghost { padding: 0 11px; } .kind-lead { display: none; } }

/* ───── Feed: coluna da direita ───── */
.rail-card { padding: 16px; }
.rail-h { font-size: 1.2rem; margin: 0 0 10px; }
.rail-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.rail-stats > div { display: grid; padding: 10px 12px; border-radius: 12px; background: rgba(var(--sh), .45); }
.rail-stats b { font-family: var(--display); font-size: 1.9rem; line-height: 1; color: var(--gold); }
.rail-stats span { font-size: .78rem; color: var(--muted); }
.rail-ok { display: flex; align-items: center; gap: 7px; color: var(--good); margin: 0; font-weight: 700; }
.rail-goals { list-style: none; margin: 14px 0 6px; padding: 0; display: grid; gap: 10px; font-size: .86rem; }
.rail-goals .row-between { display: flex; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.rail-goals li.done { opacity: .6; }
.rail-link { display: flex; align-items: center; gap: 7px; margin-top: 10px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.rail-link svg:last-child { margin-left: auto; }
.rail-kinds { display: flex; flex-wrap: wrap; gap: 6px; }
.rail-queue { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rail-queue a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 10px; background: rgba(var(--sh), .45); color: var(--text); text-decoration: none; font-size: .9rem; }
.rail-queue a:hover { background: rgba(var(--gold-rgb), .12); }
.rail-queue b { min-width: 26px; text-align: center; padding: 1px 8px; border-radius: 999px; background: var(--panel-3); }
.rail-queue b.has { background: var(--sun); color: #2a1a00; }
.rail-reels { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--text); background: linear-gradient(135deg, #6a2fd0, #35146e 60%, #7a4a00); border-color: rgba(var(--gold-rgb), .35); }
.rail-reels > div { flex: 1; min-width: 0; }
.rr-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--hl), .14); }
.rail-reels:hover { border-color: var(--gold); color: var(--text); }

/* ───── menu do gestor em grupos ───── */
.grp-badge { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: #2a1a00; font-size: .72rem; font-weight: 800; display: grid; place-items: center; }

/* ───── abas de gestão no topo da tela ───── */
.admin-tabs { display: flex; align-items: center; gap: 12px; margin: 0 0 22px; padding: 6px 6px 6px 14px; border-radius: 16px; background: rgba(var(--sh), .55); border: 1px solid var(--line); }
.at-label { display: inline-flex; align-items: center; gap: 7px; font-size: .78rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--faint); white-space: nowrap; }
.at-row { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; flex: 1; min-width: 0; }
.at-row::-webkit-scrollbar { display: none; }
.at { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 0 16px; border-radius: 11px; color: var(--muted); font-weight: 700; font-size: .92rem; text-decoration: none; white-space: nowrap; }
.at:hover { color: var(--text); background: rgba(var(--hl), .06); }
.at[aria-current="page"] { background: var(--gold); color: var(--gold-ink); }
.at-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--sun); color: #2a1a00; font-size: .72rem; display: grid; place-items: center; }
.at[aria-current="page"] .at-n { background: var(--gold-ink); color: var(--gold); }
@media (max-width: 680px) { .admin-tabs { margin-inline: -4px; padding-left: 10px; } .at-label span, .at-label { font-size: 0; gap: 0; } .at-label svg { font-size: 1rem; } }

/* ───── celular: barra de baixo com Reels, Você como tela própria ───── */
.top-search-btn { display: none; }
@media (max-width: 860px) {
  .top-search-btn { display: inline-grid; }
  .tab-me[aria-current="page"] .avatar, .tab-me[data-on] .avatar { border-color: var(--gold); }
}
.tab-me .tab-dot { top: -4px; right: -8px; }

/* ───── tela Você ───── */
.voce { max-width: 640px; margin: 0 auto; display: grid; gap: 18px; }
.vhead { display: flex; align-items: center; gap: 14px; padding: 16px; }
.vhead-info { display: grid; min-width: 0; }
.vhead-info strong { font-family: var(--display); font-size: 1.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.vsec-h { font-family: var(--body); font-size: .76rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 0 4px 8px; }
.vlist { display: grid; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: var(--panel); }
.vrow, .vmode { display: flex; align-items: center; gap: 14px; width: 100%; min-height: 58px; padding: 8px 14px; border: 0; background: transparent; color: var(--text); text-decoration: none; text-align: left; font: inherit; cursor: pointer; }
.vrow + .vrow, .vrow + .vmode, .vmode + .vrow, .vlist > * + * { border-top: 1px solid var(--line); }
.vrow:hover { background: rgba(var(--hl), .05); color: var(--text); }
.v-ico { width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(var(--gold-rgb), .12); color: var(--gold); }
.v-txt { flex: 1; min-width: 0; display: grid; }
.v-txt small { color: var(--muted); font-size: .8rem; }
.v-n { min-width: 24px; height: 24px; padding: 0 7px; border-radius: 999px; background: var(--sun); color: #2a1a00; font-size: .78rem; display: grid; place-items: center; }
.vrow > svg:last-child { color: var(--faint); flex: none; }
.vmode .mode-btns { flex: none; }

/* ───── troca de aba ao arrastar ───── */
html[data-swipe="next"] .page { animation: sw-next .26s ease-out; }
html[data-swipe="prev"] .page { animation: sw-prev .26s ease-out; }
@keyframes sw-next { from { transform: translateX(46px); opacity: .2; } to { transform: none; opacity: 1; } }
@keyframes sw-prev { from { transform: translateX(-46px); opacity: .2; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { html[data-swipe] .page { animation: none; } }

/* ───── sino pulando quando há notificação ───── */
.bell-btn.has-new svg { transform-origin: 50% 8%; animation: bell-hop 2.8s ease-in-out infinite; color: var(--gold); }
.bell-btn.has-new .bell-n { animation: bell-pulse 2.8s ease-in-out infinite; }
.bell-btn.rang svg { animation: bell-ring .9s ease-in-out 1, bell-hop 2.8s ease-in-out 1s infinite; }
@keyframes bell-hop {
  0%, 62%, 100% { transform: translateY(0) rotate(0); }
  6% { transform: translateY(-7px) rotate(-12deg); }
  12% { transform: translateY(0) rotate(10deg); }
  18% { transform: translateY(-4px) rotate(-8deg); }
  24% { transform: translateY(0) rotate(6deg); }
  30% { transform: translateY(-1px) rotate(-3deg); }
  36% { transform: translateY(0) rotate(0); }
}
@keyframes bell-ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(22deg); } 30% { transform: rotate(-18deg); } 45% { transform: rotate(14deg); } 60% { transform: rotate(-10deg); } 75% { transform: rotate(5deg); } }
@keyframes bell-pulse { 0%, 62%, 100% { transform: scale(1); } 10% { transform: scale(1.3); } 22% { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) { .bell-btn.has-new svg, .bell-btn.has-new .bell-n, .bell-btn.rang svg { animation: none; } }

.vmode { flex-wrap: wrap; align-items: center; }
.vmode .mode-switch { flex: 1 1 100%; min-width: 0; justify-items: stretch; margin: 4px 0 6px; }
.vmode .mode-btns { display: flex; width: 100%; }
.vmode .mode-opt { flex: 1; justify-content: center; }
.vmode .mode-auto { justify-self: center; }

/* ───── Reels ───── */
.page.page-reels { max-width: none; padding: 14px 0 0; }
.reels-wrap { --reels-h: 640px; display: flex; justify-content: center; align-items: center; gap: 16px; }
.reels-stage { position: relative; width: calc(var(--reels-h) * 9 / 16); max-width: 100%; height: var(--reels-h); border-radius: 22px; overflow: hidden; background: #000; border: 1px solid var(--line-strong); box-shadow: 0 18px 60px rgba(0, 0, 0, .5); }
.reels-nav { display: grid; gap: 10px; }
.reels-nav .icon-btn { width: 46px; height: 46px; border-radius: 50%; background: var(--panel-2); border: 1px solid var(--line-strong); }
.reels-scroller { height: 100%; overflow-y: scroll; scroll-snap-type: y mandatory; scrollbar-width: none; overscroll-behavior: contain; outline: none; }
.reels-scroller::-webkit-scrollbar { display: none; }
.reel { position: relative; height: 100%; scroll-snap-align: start; scroll-snap-stop: always; overflow: hidden; background: #000; color: #fff; }
.reel-bg { position: absolute; inset: -24px; background: var(--bg) center / cover no-repeat; filter: blur(26px) brightness(.55); }
.reel-media { position: absolute; inset: 0; display: grid; }
.reel-video { width: 100%; height: 100%; object-fit: cover; background: transparent; }
.reel.is-landscape .reel-video { object-fit: contain; }
.reel-iframe { width: 100%; height: 100%; border: 0; pointer-events: none; background: #000; }
.reel-scrim { position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, rgba(0, 0, 0, .4), transparent 20%, transparent 52%, rgba(0, 0, 0, .8)); }
.reel-tap { position: absolute; inset: 0; z-index: 3; border: 0; background: none; cursor: pointer; padding: 0; }
.reel-prog { position: absolute; left: 0; right: 0; top: 0; height: 3px; z-index: 6; background: rgba(var(--hl), .25); }
.reel-prog-bar { display: block; height: 100%; width: 0; background: var(--gold); transition: width .25s linear; }
.reel-info { position: absolute; left: 0; bottom: 0; z-index: 5; width: calc(100% - 76px); padding: 0 6px 18px 16px; display: grid; gap: 8px; pointer-events: none; text-shadow: 0 1px 6px rgba(0, 0, 0, .7); }
.reel-info a, .reel-info button { pointer-events: auto; }
.reel-who { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.reel-who-t { display: grid; line-height: 1.25; min-width: 0; }
.reel-who-t .small { color: rgba(var(--hl), .8); }
.reel-name { color: #fff; font-weight: 800; text-decoration: none; }
.reel-text { margin: 0; font-size: .96rem; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.reel-see { display: inline-flex; align-items: center; gap: 4px; width: fit-content; padding: 0; border: 0; background: none; color: var(--gold); font: inherit; font-weight: 800; font-size: .88rem; cursor: pointer; text-decoration: none; }
.reel-rail { position: absolute; right: 8px; bottom: 22px; z-index: 6; display: grid; gap: 16px; justify-items: center; }
.reel-btn, .reel-rail .hype-btn { display: grid; justify-items: center; gap: 2px; min-height: 0; padding: 4px; border: 0; background: none; color: #fff; cursor: pointer; font: inherit; filter: drop-shadow(0 1px 4px rgba(0, 0, 0, .7)); }
.reel-rail .hype-btn.on, .reel-rail .hype-btn:hover { background: none; color: var(--gold); }
.reel-rail .hype-label, .reel-rail .hype-line { display: none; }
.reel-rail .hype-btn svg { width: 28px; height: 28px; }
.reel-n, .reel-rail .hype-n { font-size: .74rem; font-weight: 800; }
.reel-rail .hype-wrap { position: relative; }
.reel-end { position: absolute; inset: 0; z-index: 7; display: grid; place-content: center; justify-items: center; gap: 14px; background: rgba(8, 3, 20, .62); backdrop-filter: blur(3px); }
.reel-end[hidden] { display: none; }
.reel-go { min-height: 54px; padding-inline: 26px; font-size: 1.05rem; }
.reel-replay { border: 0; background: none; color: #fff; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.reel-pause-ico { position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; pointer-events: none; opacity: 0; transition: opacity .15s; }
.reel-pause-ico svg { width: 64px; height: 64px; padding: 16px; border-radius: 50%; background: rgba(0, 0, 0, .5); }
.reel.is-paused .reel-pause-ico { opacity: 1; }
.reel.is-done .reel-pause-ico { opacity: 0; }
.reel.is-manual .reel-tap, .reel.is-manual .reel-pause-ico { display: none; }
.reel-start { position: absolute; z-index: 8; left: 50%; top: 50%; transform: translate(-50%, -50%); display: inline-flex; align-items: center; gap: 8px; padding: 12px 20px; border-radius: 999px; border: 0; background: var(--gold); color: var(--gold-ink); font: inherit; font-weight: 800; cursor: pointer; }
.reel.is-broken::after { content: "Não foi possível tocar este vídeo. Use “Ver post”."; position: absolute; inset: 0; z-index: 4; display: grid; place-items: center; padding: 30px; text-align: center; background: rgba(0, 0, 0, .6); }
.reels-sheet-host { position: absolute; inset: 0; z-index: 20; pointer-events: none; }
.reels-sheet { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: flex-end; pointer-events: auto; }
.rs-back { position: absolute; inset: 0; background: rgba(0, 0, 0, .55); }
.rs-card { position: relative; max-height: 72%; overflow: auto; background: var(--panel); border-radius: 18px 18px 0 0; padding: 14px 14px 18px; color: var(--text); }
.rs-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.reels-empty { margin: 60px auto; max-width: 520px; display: grid; justify-items: center; gap: 12px; }
/* celular: o quadro dos Reels fica preso entre o topo e a barra de baixo; assim ele acompanha a barra de endereço do navegador sem depender de cálculo em JS */
@media (max-width: 860px) {
  .page.page-reels { position: fixed; left: 0; right: 0; top: var(--top-h, 75px); bottom: var(--tab-h, 70px); max-width: none; margin: 0; padding: 0; overflow: hidden; }
  .reels-wrap { display: block; height: 100%; }
  .reels-stage { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
  .reels-nav { display: none; }
}
html[data-mode="mobile"] .page.page-reels { position: fixed; left: 0; right: 0; top: var(--top-h, 75px); bottom: var(--tab-h, 70px); max-width: none; margin: 0; padding: 0; overflow: hidden; }
html[data-mode="mobile"] .reels-wrap { display: block; height: 100%; }
html[data-mode="mobile"] .reels-stage { width: 100%; height: 100%; border-radius: 0; border: 0; box-shadow: none; }
html[data-mode="mobile"] .reels-nav { display: none; }
body.is-reels { overflow: hidden; }
@media (min-width: 861px) { body.is-reels { overflow: auto; } }

/* ───── avisos no aparelho ───── */
.push-dlg { display: grid; gap: 14px; min-width: min(420px, 86vw); max-width: 480px; }
.push-body { display: grid; gap: 12px; }
.push-title { font-family: var(--display); font-size: 1.5rem; }
.push-state { display: flex; align-items: center; gap: 10px; }
.push-state .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); }
.push-state.is-on .dot { background: var(--good); box-shadow: 0 0 0 4px rgba(var(--good-rgb), .2); }
.push-steps { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.push-h { font-family: var(--body); font-size: .76rem; letter-spacing: .1em; text-transform: uppercase; color: var(--faint); margin: 8px 0 4px; }
.push-prefs { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.push-prefs label { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 12px; cursor: pointer; }
.push-prefs label:hover { background: rgba(var(--hl), .05); }
.push-prefs input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--gold); }
.push-prefs span { display: grid; }
.push-prefs small { color: var(--muted); }
.notif-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.notif-push { display: inline-flex; align-items: center; gap: 5px; font-size: .8rem; }
.av { max-width: 720px; display: grid; gap: 0; }
.av-form { display: grid; gap: 12px; margin-top: 14px; }
.av-ideas { display: flex; flex-wrap: wrap; gap: 6px; }
.av-hist { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.panel.fpush .fs-ico { background: rgba(var(--gold-rgb), .18); color: var(--gold); }

/* ───── celular: a página nunca pode ficar mais larga que a tela ─────
   (uma barra de filtros com muitas tags empurrava o Feed para 1000 px e o iPhone diminuía o zoom) */
.feed, .feed-top { grid-template-columns: minmax(0, 1fr); min-width: 0; }
.feed > *, .feed-top > *, .feed-layout > * { min-width: 0; }
.fbar, .fstrip, .composer { min-width: 0; }
.main, .page { min-width: 0; }
html, body { max-width: 100%; overflow-x: clip; }
/* a barra de baixo ganha camada própria: no iPhone ela não "sobe" quando a barra do Safari se mexe */
.tabbar { will-change: transform; backface-visibility: hidden; -webkit-backdrop-filter: none; backdrop-filter: none; background: var(--panel); border-top: 1px solid var(--line); }
body { min-height: 100dvh; }
.shell { min-height: 100dvh; }

/* ───── perfil de um acesso (admin): cabeçalho com foto + seções que recolhem ───── */
.uhero { display: grid; grid-template-columns: auto 1fr; gap: 8px 20px; align-items: center; margin: 12px 0 16px; padding: 20px; border-radius: 18px; border: 1px solid var(--line); background: linear-gradient(135deg, rgba(var(--purple-rgb), .55), rgba(var(--panel-rgb), .9)); }
.uhero-av .avatar { width: 96px !important; height: 96px !important; font-size: 2.2rem !important; border-width: 3px; box-shadow: 0 0 0 3px rgba(var(--gold-rgb), .25); }
.uhero-main { min-width: 0; }
.uhero-main h2 { margin: 0 0 2px; overflow-wrap: anywhere; line-height: 1.05; }
.uhero-mail { margin: 0 0 10px; color: var(--muted); overflow-wrap: anywhere; }
.uhero-stats { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.ustat { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: rgba(0, 0, 0, .22); border: 1px solid var(--line); min-width: 0; }
.ustat strong { font-family: var(--display); font-size: 1.35rem; line-height: 1.1; overflow-wrap: anywhere; }
.ustat span { font-size: .78rem; color: var(--muted); }
.acc-bar { display: flex; gap: 8px; justify-content: flex-end; margin: 0 0 10px; }
.acc { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); }
.acc + .acc { margin-top: 10px; }
.acc > summary, .acc-in > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 12px 16px; }
.acc > summary::-webkit-details-marker, .acc-in > summary::-webkit-details-marker { display: none; }
.acc > summary:hover { background: rgba(var(--hl), .03); border-radius: var(--radius); }
.acc-t { font-family: var(--display); font-weight: 800; font-size: 1.15rem; letter-spacing: .01em; }
.acc-s { color: var(--muted); font-size: .85rem; margin-left: auto; text-align: right; }
.acc > summary .acc-s { margin-left: auto; }
.acc-c { flex: none; width: 10px; height: 10px; border-right: 2px solid var(--gold); border-bottom: 2px solid var(--gold); transform: rotate(45deg); transition: transform .15s; margin: -4px 4px 0 2px; }
.acc[open] > summary .acc-c, .acc-in[open] > summary .acc-c { transform: rotate(-135deg); margin-top: 4px; }
.acc[open] > summary { border-bottom: 1px solid var(--line); }
.acc-b { padding: 16px; }
.acc-b .panel, .acc-b h3 { margin-top: 0; }
.acc-in { border: 1px solid var(--line); border-radius: 12px; background: rgba(var(--hl), .03); margin-top: 12px; }
.acc-in > summary { min-height: 44px; padding: 8px 12px; font-weight: 700; font-size: .92rem; color: var(--muted); }
.acc-in > summary .acc-t { font-family: var(--body); font-size: .95rem; color: var(--text); }
.acc-in > .table-wrap, .acc-in > .chips { padding: 0 12px 12px; }
.prog-list .acc-in:first-child { margin-top: 0; }
.prog-list .acc-in > summary { flex-wrap: wrap; row-gap: 6px; }
.prog-list .acc-in .acc-s { margin-left: 0; }
.pbar { flex: 1 1 90px; min-width: 70px; max-width: 220px; height: 8px; border-radius: 99px; background: rgba(var(--hl), .12); overflow: hidden; margin-left: auto; }
.pbar i { display: block; height: 100%; background: var(--gold); border-radius: 99px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.perm-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 760px) {
  .uhero { grid-template-columns: 1fr; justify-items: start; padding: 16px; }
  .uhero-av .avatar { width: 80px !important; height: 80px !important; }
  .uhero-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perm-cols { grid-template-columns: 1fr; }
  .acc-bar { justify-content: stretch; }
  .acc-bar .btn { flex: 1; }
  .acc > summary { flex-wrap: wrap; row-gap: 2px; }
  .acc-s { margin-left: 0; text-align: left; order: 3; flex-basis: 100%; }
  .acc-t { flex: 1; }
  .acc-c { order: 2; }
}
.acc-in > summary .acc-c { margin-left: auto; }
.prog-list .acc-in > summary .acc-c { margin-left: 4px; }
.prog-list + .acc-in { margin-top: 12px; }

/* ───── Comunidades por times ───── */
.team-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; border-radius: 50%; overflow: hidden; background: rgba(var(--tc, 253, 185, 39), .22); border: 1px solid rgba(var(--tc, 253, 185, 39), .6); line-height: 1; font-weight: 800; }
.team-badge img { width: 100%; height: 100%; object-fit: cover; display: block; }
.team-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 3px; border-radius: 999px; font-size: .76rem; font-weight: 700; text-decoration: none; white-space: nowrap; color: rgb(var(--tc)); background: rgba(var(--tc), .14); border: 1px solid rgba(var(--tc), .5); }
a.team-chip:hover { background: rgba(var(--tc), .26); }
.team-pill { padding-left: 8px; }
.team-pill .team-badge { background: rgba(var(--hl), .15); }
.composer-team { display: inline-flex; align-items: center; gap: 6px; }
.composer-team[hidden] { display: none; }
.team-new { display: grid; gap: 12px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; }
.team-new-row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.team-new-row .input { flex: 1 1 180px; min-width: 0; }
.team-emoji { flex: 0 0 76px !important; width: 76px; text-align: center; }
.team-row .team-chip { flex: none; }
.team-row { gap: 8px; }

/* ───── Comunidades: botão no celular, cartões na lateral do PC, cabeçalho do feed do time ───── */
@media (min-width: 1180px) {
  html:not([data-mode="mobile"]) .only-narrow { display: none !important; }
}
.comm-cta, .comm-pick > summary { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 16px; text-decoration: none; color: var(--text); cursor: pointer; list-style: none;
  background: linear-gradient(135deg, rgba(var(--tc), .22), rgba(var(--tc), .06)); border: 1px solid rgba(var(--tc), .55); min-height: 56px; }
.comm-pick > summary::-webkit-details-marker { display: none; }
.comm-pick { --tc: 253, 185, 39; }
.comm-cta:hover, .comm-pick > summary:hover { background: linear-gradient(135deg, rgba(var(--tc), .32), rgba(var(--tc), .1)); }
.cc-t { display: grid; flex: 1; min-width: 0; line-height: 1.25; }
.cc-t strong { font-size: 1.02rem; }
.cc-t .small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-badges { display: inline-flex; }
.cc-badges .team-badge + .team-badge { margin-left: -8px; box-shadow: 0 0 0 2px var(--bg, #170b2e); }
.comm-pick[open] > summary svg:last-child { transform: rotate(180deg); }
.comm-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.rail-teams { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.rail-team { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; text-decoration: none; color: var(--text); background: rgba(var(--sh), .45); border: 1px solid transparent; }
.rail-team:hover { background: rgba(var(--tc), .16); border-color: rgba(var(--tc), .5); }
.rail-team.on { background: rgba(var(--tc), .22); border-color: rgba(var(--tc), .7); }
.rail-team .rt-name { flex: 1; min-width: 0; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rail-team svg:last-child { color: rgba(var(--tc), 1); }
.rail-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tag-chip.on { background: rgb(var(--tc)); color: var(--gold-ink); border-color: rgb(var(--tc)); }
a.tag-chip { padding-block: 4px; }
.comm-head { display: flex; align-items: center; gap: 14px; padding: 14px 16px; background: linear-gradient(135deg, rgba(var(--tc), .24), rgba(var(--tc), .05)); border-color: rgba(var(--tc), .55); }
.comm-head .team-badge { background: rgba(var(--hl), .12); }
.comm-head-t { flex: 1; min-width: 0; display: grid; }
.comm-head-t h2 { margin: 0; font-size: 1.5rem; line-height: 1.1; overflow-wrap: anywhere; }
.uhero-photo { display: flex; flex-direction: column; align-items: center; gap: 6px; margin-top: 10px; }
.uhero-av { display: flex; flex-direction: column; align-items: center; }

/* ───── Feed das trilhas (tela inicial) ───── */
.fd { max-width: 1180px; margin-inline: auto; }
.fd-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 0 0 18px; }
.fd-stat { position: relative; display: block; padding: 14px 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.fd-stat:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.fd-stat-ico { position: absolute; top: 12px; right: 12px; color: var(--gold); opacity: .8; }
.fd-stats b { display: block; font-family: var(--display); font-size: 2rem; line-height: 1; }
.fd-stats span { color: var(--muted); font-size: .82rem; font-weight: 600; }
.fd-admin { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 14px; padding: 14px 18px; }
.fd-admin p { margin: 2px 0 0; }
.fd-filters { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; margin-bottom: 4px; scrollbar-width: none; position: sticky; top: 0; z-index: 3; background: linear-gradient(var(--bg) 70%, transparent); }
.fd-filters::-webkit-scrollbar { display: none; }
.fd-chip { flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line-strong); background: var(--panel); color: var(--text); font: 700 .92rem var(--body); cursor: pointer; }
.fd-chip b { font-size: .75rem; padding: 1px 7px; border-radius: 999px; background: rgba(var(--hl), .12); }
.fd-chip[aria-selected="true"] { background: var(--gold); border-color: var(--gold); color: var(--gold-ink); }
.fd-chip[aria-selected="true"] b { background: rgba(26, 15, 46, .18); }
.fd-list { display: grid; gap: 14px; }
.fd-card { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); }
.fd-card.fd-hero { border-color: rgba(var(--gold-rgb), .55); background: linear-gradient(135deg, rgba(var(--purple-rgb), .7), rgba(var(--panel-rgb), .92)); }
.fd-card.fd-hero .fd-title { font-size: 2.1rem; }
.fd-head { display: flex; align-items: center; gap: 12px; }
.fd-ico { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 50%; background: rgba(var(--gold-rgb), .14); color: var(--gold); }
.fd-win .fd-ico { background: var(--good-bg); color: var(--good); }
.fd-exam .fd-ico { background: rgba(255, 193, 94, .14); color: var(--warn); }
.fd-who { display: flex; flex-direction: column; min-width: 0; }
.fd-who strong { font-size: .95rem; }
.fd-title { margin: 0; font-size: 1.7rem; line-height: 1.1; overflow-wrap: anywhere; }
.fd-title a { color: inherit; text-decoration: none; }
.fd-text { margin: 0; color: var(--muted); }
.fd-prog { display: flex; align-items: center; gap: 12px; }
.fd-prog .bar { flex: 1; }
.fd-cta { align-self: flex-start; margin-top: 4px; }
@media (max-width: 860px) {
  .fd-stats { grid-template-columns: repeat(3, 1fr); }
  .fd-card { padding: 16px; }
  .fd-title { font-size: 1.5rem; }
  .fd-card.fd-hero .fd-title { font-size: 1.8rem; }
  .fd-cta { align-self: stretch; justify-content: center; }
}

/* Feed das trilhas: seções por categoria */
.fd-list { gap: 26px; }
.fd-sec-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 12px; }
.fd-sec-head h3 { margin: 0; font-size: 1.7rem; line-height: 1.1; }
.fd-sec-link { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; color: var(--gold); text-decoration: none; font-weight: 700; }
.fd-forum { display: grid; gap: 10px; }
.fd-forum-item { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 14px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; }
.fd-forum-item:hover { border-color: var(--gold); }
.fd-forum-item strong { display: block; }
.fd-forum-item p { margin: 4px 0 0; }
.fd + .fd, .fd .next-card { margin-bottom: 18px; }

/* feed largo: cards de trilha mais compactos, em 3 colunas no computador */
.fd .trail-grid.dense { grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 16px; }
.fd .trail-grid.dense .trail-card { padding: 18px; gap: 10px; }
.fd .trail-grid.dense .trail-card h3 { font-size: 1.6rem; line-height: 1.05; }
.fd .trail-grid.dense .trail-tag { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; font-size: .95rem; }
.fd .next-card, .fd .fd-admin, .fd .fd-onb { margin-bottom: 16px; }
a.fd-onb { color: var(--text); text-decoration: none; }
a.fd-onb:hover { border-color: var(--gold); }
/* materiais de apoio (posts do fórum) em cards */
.fd-mat-cats { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 12px; }
.fd-mini { padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line-strong); background: transparent; color: var(--muted); font: 600 .85rem var(--body); cursor: pointer; }
.fd-mini:hover { color: var(--text); }
.fd-mini[aria-pressed="true"] { background: var(--panel-3); border-color: var(--gold); color: var(--text); }
.fd-mats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr)); gap: 14px; }
.fd-mat { display: flex; flex-direction: column; gap: 8px; padding: 16px; border-radius: 16px; background: var(--panel); border: 1px solid var(--line); color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.fd-mat:hover { border-color: var(--gold); transform: translateY(-2px); color: var(--text); }
.fd-mat strong { font-size: 1.02rem; line-height: 1.3; }
.fd-mat .fd-text { flex: 1; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fd-mat .trail-cta { font-size: .9rem; }
.fd-more { display: flex; margin: 14px auto 0; }
