/* ==========================================================================
   Telelux — design system público (app.css) · rev. 4 "vitrine viva"
   Dark premium minimalista. Mobile-first (375px é o alvo; 2 cards por linha).
   Sem menu, drawer, bottom-nav, sort-select ou rodapé: o brilho vem das imagens
   3D TRANSPARENTES do Flow (avião, selos), de 2 orbes de luz no topo e de movimento
   discreto (só transform/opacity/filter).

   Cores: o layout emite em <style> --accent, --gold (= theme_secondary; o NOME ficou por
   compatibilidade, o VALOR é o rosa), --gold-2, --bg, --text e as versões -rgb/-glow.
   Nada de rosa fixo aqui: tudo sai das variáveis. Superfícies e cinzas derivam de --bg/--text
   por color-mix() (com fallback fixo pra navegador antigo).

   Movimento: <html data-motion="full|soft|off" data-glow="1|0"> (settings theme_motion e
   theme_glow_enabled) + prefers-reduced-motion desliga tudo. Ver seção 19.
   Sem @layer de propósito: as cores de botão/link ficam no nível normal da cascata.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Tokens
   -------------------------------------------------------------------------- */
:root {
  --bg: #07090F;
  --bg-rgb: 7,9,15;
  --text: #F3F5F9;
  --accent: #2AABEE;
  --accent-2: #2596D1;
  --accent-rgb: 42,171,238;
  --accent-glow: rgba(42,171,238,.35);
  --gold: #FF3D7F;                  /* = theme_secondary (rosa). Nome mantido por compatibilidade. */
  --gold-2: #E03670;
  --gold-rgb: 255,61,127;
  --gold-glow: rgba(255,61,127,.35);
  /* tinta do texto dos botões cheios (.btn-primary/.btn-gold): escura (cor do tema a 10%) ou branca, a que
     der mais contraste contra a ponta ESCURA do gradiente — o layout calcula e emite as duas (WCAG ≥ 4,5:1).
     Branco sobre #2AABEE dava 2,6:1 e sobre #FF3D7F 3,4:1. */
  --accent-ink: #041118;
  --gold-ink: #1A060D;

  /* derivados do fundo e do texto (fallback fixo primeiro, color-mix depois) */
  --bg-2: #0C1018;
  --bg-2: color-mix(in srgb, var(--bg), #C9D6FF 3%);
  --surface: #11161F;
  --surface: color-mix(in srgb, var(--bg), #C9D6FF 6%);
  --surface-2: #171D28;
  --surface-2: color-mix(in srgb, var(--bg), #C9D6FF 10%);
  --surface-3: #1E2634;
  --surface-3: color-mix(in srgb, var(--bg), #C9D6FF 14%);
  --text-2: #B6BFCF;
  --text-2: color-mix(in srgb, var(--text) 74%, var(--bg));
  --muted: #8A94A8;
  --muted: color-mix(in srgb, var(--text) 58%, var(--bg));
  --accent-light: #7FD0F8;
  --accent-light: color-mix(in srgb, var(--accent), #fff 40%);
  --gold-light: #FF8FB8;
  --gold-light: color-mix(in srgb, var(--gold), #fff 38%);

  --border: rgba(255,255,255,.08);
  --border-strong: rgba(255,255,255,.14);
  --success: #22C55E;
  --danger: #EF4444;
  --warning: #F59E0B;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --radius-full: 999px;
  --shadow: 0 10px 30px rgba(0,0,0,.45);
  --ring: 0 0 0 3px var(--accent-glow);
  --font-display: 'Space Grotesk', system-ui, sans-serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
  --nav-h: 56px;
  --cta-sticky-h: 67px;            /* .cta-sticky: 10px + .btn 46px + 10px + borda 1px */
  --popup-h: 80px;                 /* espaço que o popup compacto reserva embaixo do <main> */
  --container: 1200px;
  --gutter: 16px;

  --safe-b: env(safe-area-inset-bottom, 0px);
  --glass: rgba(var(--bg-rgb), .74);
  --ease: cubic-bezier(.2,.7,.2,1);
  --ease-out: cubic-bezier(.2,.8,.2,1);
  --icon-shadow: drop-shadow(0 2px 6px rgba(0,0,0,.45));
  color-scheme: dark;
}

/* --------------------------------------------------------------------------
   2. Reset moderno + fundo do topo (glow + orbes)
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-h) + 12px);
}
body {
  position: relative;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
  padding-top: var(--nav-h);
}
/* Fundo do topo da vitrine. z-index NEGATIVO de propósito: fica atrás do conteúdo sem que .page
   precise de z-index (que criaria um contexto de empilhamento e prenderia .story-viewer e
   .cta-sticky — impressos dentro de <main> — embaixo da topbar/popup). Sem imagem: 2 gradientes
   radiais (azul à esquerda, rosa à direita); com img/bg-hero.webp (hero_bg_enabled, --hero-bg vem
   do layout): a imagem com máscara em degradê pro --bg. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 560px;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(60% 50% at 10% -4%, rgba(var(--accent-rgb),.16), transparent 65%),
    radial-gradient(45% 42% at 96% 6%, rgba(var(--gold-rgb),.14), transparent 60%);
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
body.has-hero-bg::before {
  background: var(--hero-bg) center top / cover no-repeat;
  opacity: .8;
  -webkit-mask-image: linear-gradient(180deg, #000 30%, transparent);
  mask-image: linear-gradient(180deg, #000 30%, transparent);
}
html[data-glow="0"] body:not(.has-hero-bg)::before { display: none; }
@media (min-width: 1024px) { body::before { height: 640px; } }
/* Orbes de luz (theme_glow_enabled): azul à esquerda, rosa à direita; se movem devagar em data-motion=full.
   Container com overflow hidden pra o blur nunca criar rolagem horizontal. */
.bg-orbs {
  position: absolute; inset: 0 0 auto 0; height: 520px;
  overflow: hidden; pointer-events: none; z-index: -1;
}
.orb {
  position: absolute; display: block;
  width: 300px; height: 300px; border-radius: 50%;
  filter: blur(60px); opacity: .55;
  will-change: transform;
}
.orb-a { left: -110px; top: -60px; background: radial-gradient(circle, rgba(var(--accent-rgb),.6), rgba(var(--accent-rgb),0) 70%); }
.orb-b { right: -110px; top: 30px; background: radial-gradient(circle, rgba(var(--gold-rgb),.55), rgba(var(--gold-rgb),0) 70%); }
@media (min-width: 768px) {
  .orb { width: 460px; height: 460px; }
  .orb-a { left: -80px; top: -120px; }
  .orb-b { right: -60px; top: -40px; }
}
img, picture, video, canvas, svg { display: block; max-width: 100%; }
img { height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-light); }
p, h1, h2, h3, h4 { overflow-wrap: break-word; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -.01em; font-weight: 700; }
ul, ol { list-style: none; padding: 0; }
:focus { outline: none; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: var(--radius-sm); }
::selection { background: var(--accent); color: #fff; }
[hidden] { display: none !important; }

/* --------------------------------------------------------------------------
   3. Tipografia (3 tamanhos por tela: título · texto · meta)
   -------------------------------------------------------------------------- */
h1 { font-size: clamp(1.5rem, 1.05rem + 2vw, 2.4rem); }
h2 { font-size: clamp(1.2rem, 1rem + .9vw, 1.5rem); font-weight: 600; }
h3 { font-size: clamp(1.05rem, .95rem + .5vw, 1.2rem); font-weight: 600; }
.lead { font-size: clamp(1rem, .95rem + .4vw, 1.125rem); color: var(--text-2); }
.text-muted { color: var(--muted); }
.text-2 { color: var(--text-2); }
.text-center { text-align: center; }
.text-sm { font-size: .875rem; }
.text-xs { font-size: .75rem; }
.font-display { font-family: var(--font-display); }
.truncate { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prose { color: var(--text-2); max-width: 72ch; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin-bottom: 1em; }
.prose h2, .prose h3 { color: var(--text); margin: 1.6em 0 .6em; }
.prose ul { list-style: disc; padding-left: 1.3em; }
.prose ol { list-style: decimal; padding-left: 1.3em; }
.prose blockquote { border-left: 3px solid var(--accent); padding-left: 1em; color: var(--muted); }
.prose a { text-decoration: underline; text-underline-offset: 3px; }

/* --------------------------------------------------------------------------
   4. Layout
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
/* SEM z-index: .page não pode ser contexto de empilhamento (ver body::before) */
.page { position: relative; padding-bottom: calc(24px + var(--safe-b)); }
/* reserva espaço só quando a página tem popup (layout põe body.has-popup) e/ou CTA fixo */
body.has-popup .page { padding-bottom: calc(var(--popup-h) + 12px + var(--safe-b)); }
body.has-cta-sticky .page { padding-bottom: calc(var(--cta-sticky-h) + 16px + var(--safe-b)); }
body.has-cta-sticky.has-popup .page { padding-bottom: calc(var(--cta-sticky-h) + var(--popup-h) + 16px + var(--safe-b)); }
.section { padding-block: 14px; }
.section + .section { padding-top: 4px; }
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.section-head h2 { display: flex; align-items: center; gap: 8px; }
.section-head > div { flex: 1 1 0; min-width: 0; }
.section-head h2 .icon { color: var(--accent); }
.section-head .section-sub { color: var(--muted); font-size: .875rem; margin-top: 2px; }
.section-link {
  display: inline-flex; align-items: center; gap: 4px;
  min-height: 44px; padding: 0 6px;
  font-size: .9rem; font-weight: 600; color: var(--accent); white-space: nowrap;
}
.section-link .icon { width: 1em; height: 1em; }
.vitrine-count { color: var(--muted); font-size: .78rem; margin: 0 0 10px; }

/* Ícones (sprite) */
.icon {
  width: 1.25em; height: 1.25em;
  flex: none;
  display: inline-block;
  vertical-align: -.25em;
  fill: none; stroke: currentColor;
}
.icon-sm { width: 1em; height: 1em; }
.icon-lg { width: 1.5em; height: 1.5em; }
.icon-xl { width: 2em; height: 2em; }
.icon.icon-fill { fill: currentColor; stroke: none; }
/* Selos transparentes do Flow (badge_img): NUNCA com fundo, borda ou raio — só drop-shadow pra contraste */
.badge-img {
  display: inline-block; flex: none; vertical-align: middle;
  background: none; border: 0; border-radius: 0;
  filter: var(--icon-shadow);
}
.inline-badge { vertical-align: -.2em; }

/* --------------------------------------------------------------------------
   5. Botões (fora de qualquer @layer)
   -------------------------------------------------------------------------- */
.btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px;
  border-radius: 12px;
  font-weight: 600; font-size: .95rem; line-height: 1.2;
  border: 1px solid transparent;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s, border-color .18s, filter .18s;
  cursor: pointer;
}
.btn .icon { width: 1.2em; height: 1.2em; }
.btn img { flex: none; filter: drop-shadow(0 2px 4px rgba(0,0,0,.35)); }
.btn:active { transform: scale(.97); }
.btn[disabled], .btn.is-loading { opacity: .6; pointer-events: none; }
/* shine diagonal (passa no hover em data-motion full/soft — ver §19) */
.btn-primary::after, .btn-gold::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.3) 50%, transparent 65%);
  transform: translateX(-130%); opacity: 0;
}
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: var(--accent-ink);
  box-shadow: 0 8px 20px -8px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.18);
}
.btn-primary:hover { color: var(--accent-ink); filter: brightness(1.08); box-shadow: 0 10px 26px -6px var(--accent-glow), inset 0 1px 0 rgba(255,255,255,.22); }
/* "gold" = destaque (rosa de theme_secondary): botão Entrar dos Elite. Texto em --gold-ink (ver tokens). */
.btn-gold {
  background: linear-gradient(135deg, var(--gold), var(--gold-2));
  color: var(--gold-ink);
  box-shadow: 0 8px 20px -8px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.28);
}
.btn-gold:hover { color: var(--gold-ink); filter: brightness(1.06); box-shadow: 0 10px 26px -6px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.32); }
.btn-ghost {
  background: rgba(255,255,255,.03);
  border-color: var(--border-strong);
  color: var(--text);
}
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.07); border-color: rgba(255,255,255,.22); }
.btn-danger { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.5); color: #FCA5A5; }
.btn-danger:hover { color: #fff; background: rgba(239,68,68,.3); }
.btn-success { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.5); color: #86EFAC; }
.btn-success:hover { color: #fff; background: rgba(34,197,94,.3); }
.btn-whatsapp { background: #25D366; color: #06240f; }
.btn-whatsapp:hover { color: #06240f; filter: brightness(1.05); }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: .85rem; border-radius: 10px; gap: 6px; }
.btn-lg { min-height: 54px; padding: 0 26px; font-size: 1.05rem; border-radius: 14px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; flex: none;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.04);
  border: 1px solid var(--border);
  color: var(--text);
  transition: background-color .18s, border-color .18s, transform .18s;
}
.icon-btn:hover { background: rgba(255,255,255,.09); border-color: var(--border-strong); color: var(--text); }
.icon-btn:active { transform: scale(.94); }
.icon-btn .icon { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   6. Badges, chips de status, selos
   -------------------------------------------------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 9px; border-radius: var(--radius-full);
  font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: rgba(255,255,255,.035); color: var(--text-2); border: 1px solid var(--border-strong);
  line-height: 1.4; white-space: nowrap;
}
.badge .icon { width: .95em; height: .95em; }
.badge .badge-img { width: 16px; height: 16px; }
.badge-accent { background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.45); color: var(--accent-light); }
.badge-gold { background: rgba(var(--gold-rgb),.12); border-color: rgba(var(--gold-rgb),.5); color: var(--gold); }
.badge-18 {
  background: rgba(var(--gold-rgb),.1); border: 1px solid rgba(239,68,68,.6); color: #FCA5A5;
  font-weight: 800; font-size: .72rem; padding: 3px 8px; border-radius: var(--radius-full);
  letter-spacing: .02em; line-height: 1.4; white-space: nowrap; display: inline-flex; align-items: center; gap: 5px;
}
.chip-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: var(--radius-full);
  font-size: .75rem; font-weight: 600; line-height: 1.5; white-space: nowrap;
  border: 1px solid transparent;
}
.chip-status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip-status.approved, .chip-status.is-approved { background: rgba(34,197,94,.14); border-color: rgba(34,197,94,.45); color: #86EFAC; }
.chip-status.pending,  .chip-status.is-pending  { background: rgba(245,158,11,.14); border-color: rgba(245,158,11,.45); color: #FCD34D; }
.chip-status.rejected, .chip-status.is-rejected { background: rgba(239,68,68,.14); border-color: rgba(239,68,68,.45); color: #FCA5A5; }
.chip-status.removed,  .chip-status.is-removed  { background: rgba(138,148,168,.14); border-color: rgba(138,148,168,.4); color: var(--text-2); }
.verified { display: inline-flex; align-items: center; vertical-align: -.2em; margin-left: 1px; }
.verified .badge-img { width: 16px; height: 16px; }

/* --------------------------------------------------------------------------
   7. Topbar mínima (glass fixa, 56px): avião + wordmark · [+18] [Enviar]
   Escala de z-index (tudo no contexto da raiz — nada de z-index em .page):
     topbar 60 · ad-popup 90 · cta-sticky 95 · story-viewer 200 · age-gate 300 · toast 400
   -------------------------------------------------------------------------- */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 60;
  height: var(--nav-h);
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--border);
}
.topbar-inner { height: 100%; display: flex; align-items: center; gap: 10px; }
.brand { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--text); flex: none; min-width: 0; }
.brand:hover { color: var(--text); }
.brand-logo { height: 32px; width: auto; }
/* avião transparente: sem raio, sem fundo — só a sombra colorida */
.brand-mark { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 4px 10px rgba(var(--accent-rgb),.45)); transition: transform .25s var(--ease-out); }
.brand:hover .brand-mark { transform: translate(2px, -2px) rotate(-6deg); }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.2rem; letter-spacing: -.02em; white-space: nowrap; }
.brand-name::first-letter { color: var(--gold); }
.topbar-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.topbar-18 { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; }
.topbar-18 .badge-img { width: 28px; height: 28px; }

/* --------------------------------------------------------------------------
   8. Stories + story viewer
   -------------------------------------------------------------------------- */
.stories-section { padding: 10px 0 0; }
.stories { padding: 0; }
.stories-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 0 0 6px; }
.stories-head h2 { font-size: .95rem; display: flex; align-items: center; gap: 7px; }
.stories-head h2 .icon { color: var(--gold); }
.stories-head > div { min-width: 0; }
.stories-head p { color: var(--muted); font-size: .76rem; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stories-hint {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  padding: 5px 10px; border-radius: var(--radius-full);
  font-size: .7rem; font-weight: 600; color: var(--accent-light);
  background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.28);
  white-space: nowrap;
}
.stories-hint .icon { width: .9em; height: .9em; }
.stories-track {
  display: flex; gap: 12px;
  padding: 4px var(--gutter) 2px;
  margin-inline: calc(var(--gutter) * -1);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: var(--gutter); /* a margem negativa põe o scrollport em x=0: sem isto o snap colava a 1ª story na borda */
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.stories-track::-webkit-scrollbar { display: none; }
.story {
  scroll-snap-align: start;
  flex: none; width: 80px;
  display: flex; flex-direction: column; align-items: center; gap: 7px;
  color: var(--text-2); text-align: center;
  padding: 2px 0 4px;
  border-radius: var(--radius-sm);
}
/* anel azul→rosa: gradiente cônico num ::before maior que o círculo (gira em data-motion=full) */
.story-ring {
  position: relative; isolation: isolate; overflow: hidden;
  width: 72px; height: 72px; border-radius: 50%;
  padding: 2.5px;
  box-shadow: 0 0 0 1px rgba(255,255,255,.04), 0 6px 16px -6px var(--gold-glow);
  transition: transform .18s var(--ease);
}
.story-ring::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: conic-gradient(from 200deg, var(--accent), var(--gold), var(--accent-light), var(--accent));
}
.story:hover .story-ring { transform: scale(1.05); }
.story:active .story-ring { transform: scale(.96); }
.story-ring img {
  position: relative;
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  border: 2.5px solid var(--bg);
  background: var(--surface-2);
}
.story.is-seen .story-ring { box-shadow: none; }
.story.is-seen .story-ring::before { background: var(--surface-3); animation: none; }
.story.is-seen { color: var(--muted); }
.story-label { font-size: .75rem; line-height: 1.2; width: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.story-viewer {
  position: fixed; inset: 0; z-index: 200;
  background: #000;
  display: flex; flex-direction: column;
  touch-action: pan-y;
  user-select: none; -webkit-user-select: none;
}
.story-viewer[hidden] { display: none; }
.story-viewer-bg {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center;
  filter: blur(40px) brightness(.55); opacity: .7;
  transform: scale(1.1);
}
.story-viewer-progress {
  position: absolute; top: calc(10px + env(safe-area-inset-top, 0px)); left: 12px; right: 12px; z-index: 3;
  display: flex; gap: 4px;
}
.story-viewer-progress span { flex: 1; height: 3px; border-radius: 3px; background: rgba(255,255,255,.3); overflow: hidden; }
.story-viewer-progress span i { display: block; height: 100%; width: 0; background: #fff; }
.story-viewer-progress span.is-done i { width: 100%; }
.story-viewer-progress span.is-active i { transition: width linear; }
.story-viewer-top {
  position: absolute; top: calc(22px + env(safe-area-inset-top, 0px)); left: 16px; right: 12px; z-index: 5; /* acima das áreas de toque prev/next (4) */
  display: flex; align-items: center; gap: 10px;
}
.story-viewer-title { font-weight: 600; font-size: .95rem; color: #fff; text-shadow: 0 1px 8px rgba(0,0,0,.6); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.story-viewer-close { background: rgba(0,0,0,.35); border-color: rgba(255,255,255,.2); color: #fff; }
.story-viewer-stage {
  position: relative; z-index: 2; flex: 1; min-height: 0;
  display: flex; align-items: center; justify-content: center;
  padding: calc(60px + env(safe-area-inset-top, 0px)) 0 110px;
}
.story-viewer-stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.6); }
.story-viewer-nav { position: absolute; top: 0; bottom: 0; width: 38%; z-index: 4; }
.story-viewer-nav.is-prev { left: 0; }
.story-viewer-nav.is-next { right: 0; }
.story-viewer-cta { position: absolute; left: 16px; right: 16px; bottom: calc(20px + var(--safe-b)); z-index: 5; }
.story-viewer-cta .btn { width: 100%; min-height: 52px; font-size: 1rem; border-radius: 14px; }
@media (min-width: 768px) {
  .story-viewer-stage { padding: 72px 0 110px; }
  .story-viewer-stage img { max-width: min(480px, 90vw); }
  .story-viewer-cta { left: 50%; right: auto; transform: translateX(-50%); width: min(440px, 90vw); }
  .story-viewer-progress, .story-viewer-top { left: 50%; right: auto; transform: translateX(-50%); width: min(480px, 90vw); }
}
body.viewer-open { overflow: hidden; }

/* --------------------------------------------------------------------------
   9. Topo da vitrine: título (1ª letra rosa) + chips opcionais (ícones transparentes)
   -------------------------------------------------------------------------- */
.vitrine-top { position: relative; }
.hero { padding: 12px 0 2px; }
.hero h1 { margin-bottom: 4px; }
.hero p { color: var(--text-2); font-size: clamp(.92rem, .88rem + .3vw, 1.02rem); max-width: 60ch; }
.hero .chips { margin-top: 12px; }
.hero-compact { padding-top: 10px; }
/* 1ª letra do título: gradiente rosa (anima em data-motion=full) */
.hero-glyph {
  display: inline-block;
  background: linear-gradient(100deg, var(--gold) 0%, var(--gold-light) 45%, var(--gold) 70%, var(--gold-2) 100%);
  background-size: 220% 100%;
  -webkit-background-clip: text; background-clip: text;
  color: transparent; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 4px 14px rgba(var(--gold-rgb),.35));
}
.back-link { margin-bottom: 4px; }
.back-link a { display: inline-flex; align-items: center; gap: 2px; min-height: 44px; margin-left: -6px; padding: 0 6px; color: var(--muted); font-size: .85rem; font-weight: 500; }
.back-link a:hover { color: var(--text); }
.back-link .icon { width: 1.1em; height: 1.1em; }
@media (min-width: 768px) { .hero { padding: 20px 0 6px; } }
.chips {
  display: flex; gap: 8px;
  overflow-x: auto; scrollbar-width: none;
  padding: 4px 0 8px;
  margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; scroll-snap-align: start;
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 44px; padding: 0 14px 0 8px;
  border-radius: var(--radius-full);
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-size: .875rem; font-weight: 500; white-space: nowrap;
  transition: background-color .15s, border-color .15s, color .15s, transform .15s;
}
/* ícone transparente: sem tile, sem raio, só sombra */
.chip-icon { width: 28px; height: 28px; flex: none; filter: var(--icon-shadow); }
.chip-icon-all { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); border: 1px solid var(--border); border-radius: 50%; filter: none; }
.chip-icon-all .icon { width: 16px; height: 16px; }
.chip:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.chip:active { transform: scale(.97); }
.chip.is-active { background: rgba(var(--accent-rgb),.14); border-color: rgba(var(--accent-rgb),.55); color: #fff; }
/* no desktop os chips cabem quebrando linha — sem trilha rolável */
@media (min-width: 1024px) {
  .chips { flex-wrap: wrap; overflow: visible; margin-inline: 0; padding-inline: 0; }
}

/* --------------------------------------------------------------------------
   10. Grid + card (card inteiro → Telegram; Elite em rosa)
   -------------------------------------------------------------------------- */
.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
@media (min-width: 768px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; } }
@media (min-width: 1100px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  position: relative;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 16px 10px 10px;
  transition: transform .25s var(--ease-out), border-color .25s;
}
/* brilho do hover num ::after (opacity anima — box-shadow não) */
.card::after {
  content: ""; position: absolute; inset: -1px; z-index: -1;
  border-radius: inherit; pointer-events: none; opacity: 0;
  box-shadow: 0 18px 40px -16px rgba(var(--accent-rgb),.5), 0 0 0 1px rgba(var(--accent-rgb),.35);
  transition: opacity .25s;
}
@media (hover: hover) {
  .card:hover { transform: translateY(-3px); border-color: rgba(var(--accent-rgb),.45); }
  .card:hover::after { opacity: 1; }
}
.card:active { transform: scale(.985); }
@media (min-width: 768px) { .card { padding: 20px 14px 14px; border-radius: 20px; } }
/* o link que cobre avatar + título + contexto + descrição (card-meta e CTA ficam fora, sem aninhar interativos) */
.card-link { display: flex; flex-direction: column; align-items: center; width: 100%; min-width: 0; color: inherit; }
.card-link:hover { color: inherit; }
.card-link:focus-visible { box-shadow: none; }
.card-link:focus-visible .card-avatar { box-shadow: var(--ring); }
/* anel do avatar: gradiente cônico num ::before (gira nos Elite em data-motion=full) */
.card-avatar {
  position: relative; isolation: isolate; overflow: hidden;
  width: 72px; height: 72px; border-radius: 50%;
  padding: 2px;
  margin-bottom: 10px;
  flex: none;
  display: block;
}
.card-avatar::before {
  content: ""; position: absolute; inset: -50%; z-index: -1;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-light), var(--accent-2), var(--accent));
}
.card-avatar img {
  position: relative;
  width: 100%; height: 100%; border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--surface);
  background: var(--surface-2);
  transition: transform .35s var(--ease-out);
}
@media (hover: hover) { .card:hover .card-avatar img { transform: scale(1.04); } }
@media (min-width: 768px) { .card-avatar { width: 84px; height: 84px; padding: 2.5px; } }
.card-title {
  font-family: var(--font-display); font-weight: 700; font-size: .95rem; line-height: 1.25;
  color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
  margin-bottom: 3px;
  transition: color .2s;
}
.card-link:hover .card-title { color: var(--accent-light); }
.card-type { font-size: .75rem; color: var(--muted); margin-bottom: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; display: block; }
.card-cat { font-size: .7rem; color: var(--muted); margin: -3px 0 6px; max-width: 100%; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; opacity: .85; }
.card-desc {
  font-size: .78rem; color: var(--muted); line-height: 1.4;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
  width: 100%;
  margin-bottom: 6px;
}
.card-meta {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  font-size: .75rem; color: var(--muted);
  margin-top: auto; margin-bottom: 6px;
}
.card-meta span, .card-meta button, .card-meta a { display: inline-flex; align-items: center; gap: 4px; }
.card-meta .icon { width: 1.05em; height: 1.05em; }
.like-btn { color: var(--muted); min-height: 44px; min-width: 44px; justify-content: center; margin: -8px 0; padding: 0 6px; border-radius: var(--radius-full); transition: color .15s, transform .15s; }
.like-btn:hover { color: var(--gold-light); }
.like-btn:active { transform: scale(.9); }
.like-btn.is-liked { color: var(--gold); }
.like-btn.is-liked .icon { fill: currentColor; }
.like-btn.is-pop .icon { animation: pop .45s var(--ease-out); }
@keyframes pop { 0% { transform: scale(1); } 35% { transform: scale(1.6) rotate(-8deg); } 70% { transform: scale(.9); } 100% { transform: scale(1); } }
.card-more { color: var(--muted); min-height: 44px; min-width: 32px; justify-content: center; margin: -8px 0; }
.card-more:hover { color: var(--accent); }
.card-cta { min-height: 44px; padding-inline: 10px; font-size: .9rem; gap: 6px; border-radius: 11px; }
.card-cta img { width: 20px; height: 20px; transition: transform .25s var(--ease-out); }
.card-cta:hover img { transform: translate(2px, -2px) rotate(-8deg); }
@media (min-width: 768px) { .card-cta { min-height: 44px; } }

/* Selos do card: coroa Elite (18px, transparente) no canto superior esquerdo; etiqueta no direito.
   Nenhum deles tem fundo/tile — só texto em caixa alta ou o selo com sombra. */
.card-seal {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  display: inline-flex; width: 18px; height: 18px;
  filter: drop-shadow(0 3px 7px rgba(var(--gold-rgb),.5));
}
.card-seal .badge-img { width: 18px; height: 18px; filter: none; }
.card-tag {
  position: absolute; top: 8px; right: 8px; z-index: 2;
  display: inline-flex; align-items: center; gap: 4px;
  padding: 0; background: none; border: 0;
  font-size: .68rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; line-height: 1.6;
  color: var(--text-2); text-shadow: 0 1px 4px rgba(0,0,0,.5);
  max-width: calc(100% - 40px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.card-tag .badge-img { width: 14px; height: 14px; }
.card-tag-sponsored { color: #FDBA74; }
.card-tag-18 { top: 7px; right: 7px; }
.card-tag-18 .badge-img { width: 18px; height: 18px; }
.ad-inline .card-tag { color: var(--muted); }

/* Variações */
.card.is-elite { border-color: rgba(var(--gold-rgb),.45); background: linear-gradient(180deg, rgba(var(--gold-rgb),.08), rgba(var(--gold-rgb),0) 55%), var(--surface); }
.card.is-elite::after { box-shadow: 0 18px 40px -14px rgba(var(--gold-rgb),.55), 0 0 0 1px rgba(var(--gold-rgb),.4); }
@media (hover: hover) { .card.is-elite:hover { border-color: rgba(var(--gold-rgb),.8); } }
.card.is-elite .card-avatar::before { background: conic-gradient(from 210deg, var(--gold), var(--gold-light), var(--gold-2), var(--gold)); }
.card.is-elite .card-link:hover .card-title { color: var(--gold-light); }
.card.is-sponsored { border-color: rgba(249,115,22,.3); }
.rank {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  min-width: 26px; height: 26px; padding: 0 6px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-full);
  background: linear-gradient(135deg, var(--gold), var(--gold-2)); color: #fff;
  font-family: var(--font-display); font-weight: 700; font-size: .72rem;
  box-shadow: 0 6px 14px -5px var(--gold-glow), inset 0 1px 0 rgba(255,255,255,.35);
}
.rank-1 { background: linear-gradient(135deg, var(--gold-light), var(--gold) 55%, var(--gold-2)); }

/* Cards de categoria (/categorias) — ícone transparente, sem tile */
.cat-card { color: inherit; padding-top: 18px; }
.cat-card:hover { color: inherit; }
.cat-card-icon { width: 64px; height: 64px; margin-bottom: 10px; filter: var(--icon-shadow); }
.cat-card-icon-svg { display: inline-flex; align-items: center; justify-content: center; color: var(--accent); border: 1px solid var(--border); border-radius: 50%; filter: none; }
.cat-card-icon-svg .icon { width: 28px; height: 28px; }

/* Skeleton/shimmer nas imagens até carregar (app.js tira a classe no load; o loop só roda em data-motion=full) */
.skeleton {
  position: relative; overflow: hidden;
  background: linear-gradient(90deg, var(--surface-2) 25%, var(--surface-3) 50%, var(--surface-2) 75%);
  background-size: 200% 100%;
}
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* --------------------------------------------------------------------------
   11. Anúncios: inline, banner-top, popup (compacto por padrão)
   -------------------------------------------------------------------------- */
.ad-inline { border-style: dashed; border-color: var(--border-strong); }
.ad-inline .card-avatar { padding: 0; border-radius: var(--radius-sm); }
.ad-inline .card-avatar::before { background: var(--surface-3); }
.ad-inline .card-avatar img { border-radius: 10px; border: 0; }
.ad-label {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 1px 7px; border-radius: var(--radius-full);
  font-size: .68rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  background: rgba(0,0,0,.35); border: 1px solid var(--border-strong); color: var(--text-2);
  line-height: 1.6;
}
.banner-top { padding: 12px 0 0; }
.banner-top a { position: relative; display: block; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); background: var(--surface); }
.banner-top img { width: 100%; aspect-ratio: 16 / 5; max-height: 240px; object-fit: cover; }
.banner-top .ad-label { position: absolute; top: 8px; left: 8px; }

.ad-popup {
  position: fixed; z-index: 90;
  left: 12px; right: 12px;
  bottom: calc(12px + var(--safe-b));
  background: rgba(var(--bg-rgb),.86);
  -webkit-backdrop-filter: blur(16px) saturate(140%); backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid rgba(var(--accent-rgb),.5);
  border-radius: var(--radius-lg);
  box-shadow: 0 16px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(var(--accent-rgb),.12);
  padding: 14px;
  transform: translateY(calc(100% + 40px));
  opacity: 0;
  transition: transform .3s var(--ease), opacity .3s var(--ease);
}
.ad-popup.is-visible { transform: translateY(0); opacity: 1; }
/* normal */
.ad-popup-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.ad-popup-head .ad-label { background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.4); color: var(--accent-light); }
.ad-popup-head .ad-popup-close { width: 44px; height: 44px; margin: -10px -10px -10px 0; }
.ad-popup-body { display: grid; grid-template-columns: 64px 1fr; gap: 12px; align-items: center; margin-bottom: 12px; }
.ad-popup-thumb { width: 64px; height: 64px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-3); flex: none; }
.ad-popup-title { font-family: var(--font-display); font-weight: 700; font-size: 1rem; line-height: 1.2; margin-bottom: 3px; }
.ad-popup-text { font-size: .82rem; color: var(--text-2); line-height: 1.35; }
.ad-popup-text + .ad-popup-text { color: var(--muted); }
.ad-popup > .btn { width: 100%; }
.ad-popup-close .icon { width: 18px; height: 18px; }
@media (min-width: 1024px) {
  .ad-popup { left: auto; right: 24px; bottom: 24px; width: 380px; }
}
/* compacto (popup_size=compact, default): barra de 64px, máx. 420px centralizada */
.ad-popup--compact {
  display: flex; align-items: center; gap: 10px;
  max-width: 420px; margin-inline: auto;
  min-height: 64px; padding: 10px 40px 10px 10px;
  border-radius: var(--radius);
}
.ad-popup--compact .ad-popup-thumb { width: 44px; height: 44px; border-radius: 10px; }
.ad-popup-main { flex: 1 1 auto; min-width: 0; }
.ad-popup--compact .ad-popup-title { font-size: .9rem; margin-bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ad-popup--compact .ad-popup-text { display: flex; align-items: center; gap: 6px; font-size: .75rem; color: var(--muted); white-space: nowrap; overflow: hidden; }
.ad-popup--compact .ad-popup-text > span:last-child { overflow: hidden; text-overflow: ellipsis; }
.ad-popup--compact .ad-label { padding: 0 5px; font-size: .68rem; line-height: 1.5; flex: none; }
/* CTA: alvo de toque 44px (a barra tem 64px, cabe) com a tipografia do .btn-sm */
.ad-popup--compact > .btn { width: auto; flex: none; min-height: 44px; padding: 0 14px; font-size: .85rem; border-radius: 10px; gap: 6px; }
.ad-popup--compact .ad-popup-close {
  position: absolute; top: -8px; right: -8px;
  width: 28px; height: 28px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: 0 4px 10px rgba(0,0,0,.4);
}
.ad-popup--compact .ad-popup-close::before { content: ""; position: absolute; inset: -8px; } /* alvo de toque 44px */
.ad-popup--compact .ad-popup-close .icon { width: 14px; height: 14px; }
@media (min-width: 1024px) {
  .ad-popup--compact { left: auto; right: 24px; bottom: 24px; width: 420px; max-width: calc(100vw - 48px); }
}
/* com CTA fixo (página do grupo), o popup sobe pra não cobrir o botão principal; volta enquanto o sticky está escondido */
body.has-cta-sticky .ad-popup { bottom: calc(var(--cta-sticky-h) + 12px + var(--safe-b)); }
body.has-cta-sticky.cta-sticky-hidden .ad-popup { bottom: calc(12px + var(--safe-b)); }
@media (min-width: 1024px) {
  body.has-cta-sticky .ad-popup, body.has-cta-sticky.cta-sticky-hidden .ad-popup { bottom: 24px; }
}

/* --------------------------------------------------------------------------
   12. Age gate (selo +18 transparente, sem tile; pulsa em data-motion=full)
   -------------------------------------------------------------------------- */
.age-gate {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(var(--bg-rgb),.72);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
}
.age-gate[hidden] { display: none; }
.age-gate-card {
  width: 100%; max-width: 420px;
  background: linear-gradient(180deg, rgba(var(--gold-rgb),.06), rgba(255,255,255,0) 50%), var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow), 0 0 0 1px rgba(var(--gold-rgb),.12);
  padding: 26px 22px 22px;
  text-align: center;
}
.age-seal { width: 80px; height: 80px; margin: 0 auto 14px; display: inline-flex; filter: drop-shadow(0 10px 24px rgba(239,68,68,.45)); }
.age-seal .badge-img { width: 80px; height: 80px; filter: none; }
.age-gate-card h2 { font-size: 1.35rem; margin-bottom: 8px; }
.age-gate-card p { color: var(--text-2); font-size: .95rem; margin-bottom: 20px; }
.age-gate-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.age-gate-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 6px; margin: 8px 0 0; font-size: .78rem; }
.age-gate-links a { color: var(--muted); display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; } /* alvo de toque 44px */
.age-gate-links a:hover { color: var(--text); }
body.age-locked { overflow: hidden; }

/* --------------------------------------------------------------------------
   13. Paginação
   -------------------------------------------------------------------------- */
.pagination { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px; padding: 20px 0 4px; }
.pagination a, .pagination span {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 44px; height: 44px; padding: 0 10px;
  border-radius: 12px;
  background: var(--surface); border: 1px solid var(--border);
  color: var(--text-2); font-weight: 600; font-size: .9rem;
  transition: background-color .15s, border-color .15s, transform .15s;
}
.pagination a:hover { color: var(--text); border-color: var(--border-strong); background: var(--surface-2); }
.pagination a:active { transform: scale(.95); }
.pagination .is-current { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border-color: transparent; color: #fff; }
.pagination .is-disabled { opacity: .4; pointer-events: none; }
.pagination .gap { background: none; border: 0; min-width: 24px; }
.pagination .icon { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   14. Linha legal (opcional, footer_enabled=1) — não é rodapé
   -------------------------------------------------------------------------- */
.legal-line { padding: 4px 0 calc(12px + var(--safe-b)); color: var(--muted); font-size: .75rem; }
.legal-line .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0 6px; }
.legal-line a { color: var(--muted); display: inline-flex; align-items: center; min-height: 36px; }
.legal-line a:hover { color: var(--text); }
.legal-line a::before { content: "·"; margin-right: 6px; }
body.has-popup .legal-line { padding-bottom: calc(var(--popup-h) + 12px + var(--safe-b)); }

/* --------------------------------------------------------------------------
   15. Formulários
   -------------------------------------------------------------------------- */
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.field { display: grid; gap: 6px; min-width: 0; }
.label { font-weight: 600; font-size: .9rem; color: var(--text); }
.label .req { color: var(--danger); }
.input, .select, .textarea {
  width: 100%; min-height: 48px;
  padding: 0 14px;
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  color: var(--text); font-size: 16px;
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }
.textarea { padding: 12px 14px; min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; -webkit-appearance: none; padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238A94A8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent); box-shadow: var(--ring); background: var(--surface); }
.input.is-invalid, .select.is-invalid, .textarea.is-invalid { border-color: var(--danger); }
.help { font-size: .8rem; color: var(--muted); }
.error { font-size: .8rem; color: #FCA5A5; display: flex; align-items: center; gap: 4px; }
.input-group { display: flex; gap: 8px; }
.input-group .input { flex: 1; min-width: 0; }
.checkbox {
  display: flex; align-items: flex-start; gap: 10px;
  min-height: 44px; padding: 6px 0;
  font-size: .9rem; color: var(--text-2); cursor: pointer;
}
.checkbox input { width: 20px; height: 20px; margin-top: 2px; flex: none; accent-color: var(--accent); }
.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px; }
@media (min-width: 768px) {
  .form-card { padding: 28px; }
  .form-2col { grid-template-columns: 1fr 1fr; }
  .form-2col .span-2 { grid-column: span 2; }
}
.dropzone {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 140px; padding: 20px;
  border: 2px dashed var(--border-strong); border-radius: var(--radius);
  background: var(--surface-2); color: var(--muted); text-align: center; font-size: .875rem;
  cursor: pointer; transition: border-color .15s, background-color .15s;
}
.dropzone:hover, .dropzone.is-over { border-color: var(--accent); background: rgba(var(--accent-rgb),.06); color: var(--text-2); }
.dropzone.is-invalid { border-color: var(--danger); }
.dropzone .icon { width: 30px; height: 30px; color: var(--accent); }
.dropzone input[type="file"] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.dropzone strong { color: var(--text); }
.dropzone-preview { display: none; align-items: center; gap: 12px; margin-top: 10px; text-align: left; }
.dropzone.has-file .dropzone-preview { display: flex; }
.dropzone.has-file .dropzone-empty { display: none; }
.dropzone-preview img { width: 72px; height: 72px; border-radius: var(--radius-sm); object-fit: cover; background: var(--surface-3); flex: none; }
.dropzone-preview.aspect-story img { width: 54px; height: 96px; }
.dropzone-preview.aspect-banner img { width: 128px; height: 40px; }
.dropzone-name { font-size: .8rem; color: var(--text-2); word-break: break-all; }
.dropzone-remove { position: relative; z-index: 2; margin-top: 4px; }

/* --------------------------------------------------------------------------
   16. Página do grupo (/grupo/<slug>, só por link direto quando group_pages_enabled=0)
   -------------------------------------------------------------------------- */
.group-hero {
  position: relative; overflow: hidden;
  border: 1px solid var(--border); border-radius: var(--radius-lg);
  background: var(--surface);
  padding: 28px 16px 22px;
  text-align: center;
  isolation: isolate;
}
.group-hero-bg {
  position: absolute; inset: -40px; z-index: -1;
  background-size: cover; background-position: center;
  filter: blur(40px); opacity: .35;
  transform: scale(1.2);
}
.group-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(var(--bg-rgb),.1), rgba(var(--bg-rgb),.65)); }
.group-avatar {
  position: relative;
  width: 128px; height: 128px; margin: 0 auto 14px; border-radius: 50%; padding: 4px;
  background: conic-gradient(from 210deg, var(--accent), var(--accent-light), var(--accent-2), var(--accent));
  box-shadow: 0 16px 40px -14px var(--accent-glow);
}
.group-avatar.is-elite { background: conic-gradient(from 210deg, var(--gold), var(--gold-light), var(--gold-2), var(--gold)); box-shadow: 0 16px 40px -14px var(--gold-glow); }
.group-avatar > img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; border: 3px solid var(--surface); background: var(--surface-2); } /* só a foto: o selo (.group-avatar-seal .badge-img) fica sem fundo/borda (§8) */
.group-avatar-seal { position: absolute; right: -2px; bottom: -2px; display: inline-flex; filter: drop-shadow(0 6px 12px rgba(var(--gold-rgb),.45)); }
.group-avatar-seal .badge-img { width: 36px; height: 36px; filter: none; }
.group-badges { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-bottom: 10px; }
.group-hero h1 { font-size: clamp(1.45rem, 1.1rem + 1.6vw, 2.1rem); margin-bottom: 4px; }
.group-hero .group-type { color: var(--text-2); font-size: .95rem; }
.group-stats {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px;
  margin: 18px auto 0; max-width: 460px;
}
.group-stat {
  background: rgba(var(--bg-rgb),.5); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 10px 6px;
}
.group-stat b { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.1; }
.group-stat span { display: block; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; margin-top: 3px; }
.group-stat .icon { width: 1em; height: 1em; color: var(--accent); vertical-align: -.15em; margin-right: 2px; }
.group-hero .btn-lg { margin-top: 18px; width: 100%; max-width: 420px; }
.group-hero .btn-lg img { width: 22px; height: 22px; }
.group-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 18px; }
.group-card-block { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 18px 16px; }
.group-card-block h2 { font-size: 1.1rem; margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.group-card-block h2 .icon { color: var(--accent); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tags a, .tags span { display: inline-flex; align-items: center; min-height: 32px; padding: 0 10px; border-radius: var(--radius-full); background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-size: .8rem; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: .85rem; color: var(--muted); padding: 10px 0 6px; }
/* alvo de toque 44×44 sem mexer no layout: padding lateral compensado por margem negativa */
.breadcrumb a { color: var(--muted); min-height: 44px; min-width: 44px; justify-content: center; padding: 0 6px; margin: -6px -6px; display: inline-flex; align-items: center; gap: 2px; font-weight: 500; }
.breadcrumb a:hover { color: var(--text); }
.breadcrumb .icon { width: 1.1em; height: 1.1em; }
.cta-sticky {
  position: fixed; left: 0; right: 0; z-index: 95;
  bottom: 0;
  min-height: calc(var(--cta-sticky-h) + var(--safe-b));
  padding: 10px var(--gutter) calc(10px + var(--safe-b));
  background: var(--glass);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--border);
}
.cta-sticky .btn { width: 100%; }
.cta-sticky .btn img { width: 22px; height: 22px; }
/* escondido enquanto o botão do hero está na tela (app.js alterna .is-hidden): desce e some sem
   roubar foco/tab; visibility atrasa 0.25s na ida pra animação terminar e é imediata na volta */
.cta-sticky { transition: transform .25s var(--ease), visibility 0s linear 0s; }
.cta-sticky.is-hidden { transform: translateY(120%); visibility: hidden; transition: transform .25s var(--ease), visibility 0s linear .25s; }
@media (min-width: 1024px) {
  .cta-sticky { display: none; }
  body.has-cta-sticky .page { padding-bottom: calc(24px + var(--safe-b)); }
  body.has-cta-sticky.has-popup .page { padding-bottom: calc(var(--popup-h) + 12px + var(--safe-b)); }
  .group-body { grid-template-columns: 1.5fr 1fr; }
  .group-body .span-2 { grid-column: span 2; }
}
.share { display: flex; flex-wrap: wrap; gap: 8px; }
.share-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  flex: 1 1 auto; min-height: 44px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: .875rem;
}
.share-btn:hover { background: var(--surface-3); color: var(--text); }
.share-btn.is-whatsapp .icon { color: #25D366; }
.share-btn.is-telegram .icon { color: var(--accent); }
.share-btn.is-copy .icon { color: var(--gold); }
.share-btn .icon { fill: currentColor; stroke: none; }
.share-btn.is-copy .icon { fill: none; stroke: currentColor; }

/* --------------------------------------------------------------------------
   17. Estado vazio, flash, toast
   -------------------------------------------------------------------------- */
.empty {
  text-align: center; padding: 48px 16px;
  background: var(--surface); border: 1px dashed var(--border-strong); border-radius: var(--radius-lg);
}
.empty-icon {
  width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(var(--accent-rgb),.1); border: 1px solid rgba(var(--accent-rgb),.3); color: var(--accent);
}
.empty-icon .icon { width: 28px; height: 28px; }
.empty h2, .empty h3 { font-size: 1.15rem; margin-bottom: 6px; }
.empty p { color: var(--muted); max-width: 40ch; margin: 0 auto 16px; }
.flash {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  color: var(--text); font-size: .9rem; margin-bottom: 14px;
}
.flash .icon { flex: none; margin-top: 2px; }
.flash-success { background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.45); }
.flash-success .icon { color: #86EFAC; }
.flash-error { background: rgba(239,68,68,.12); border-color: rgba(239,68,68,.45); }
.flash-error .icon { color: #FCA5A5; }
.flash-info { background: rgba(var(--accent-rgb),.12); border-color: rgba(var(--accent-rgb),.45); }
.flash-info .icon { color: var(--accent-light); }
.flash-close { margin-left: auto; width: 32px; height: 32px; }
.flash-close .icon { width: 16px; height: 16px; margin: 0; }
.toast {
  position: fixed; left: 50%; z-index: 400;
  bottom: calc(20px + var(--safe-b));
  transform: translate(-50%, 20px);
  max-width: calc(100vw - 32px);
  padding: 10px 16px; border-radius: var(--radius-full);
  background: var(--surface-3); border: 1px solid var(--border-strong); color: var(--text);
  box-shadow: var(--shadow); font-size: .9rem; font-weight: 500;
  display: inline-flex; align-items: center; gap: 8px;
  opacity: 0; pointer-events: none;
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.toast.is-visible { opacity: 1; transform: translate(-50%, 0); }
.toast .icon { color: var(--success); }
body.popup-open .toast { bottom: calc(var(--popup-h) + 16px + var(--safe-b)); }
body.has-cta-sticky .toast { bottom: calc(var(--cta-sticky-h) + 16px + var(--safe-b)); }
@media (min-width: 1024px) { .toast, body.popup-open .toast, body.has-cta-sticky .toast { bottom: 24px; } }

/* --------------------------------------------------------------------------
   18. Utilitários
   -------------------------------------------------------------------------- */
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.grid-auto { display: grid; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-center { justify-content: center; }
.flex-wrap { flex-wrap: wrap; }
.flex-col { flex-direction: column; }
.flex-1 { flex: 1 1 0%; min-width: 0; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; } .gap-4 { gap: 16px; } .gap-6 { gap: 24px; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; } .mt-6 { margin-top: 24px; } .mt-8 { margin-top: 32px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; } .mb-6 { margin-bottom: 24px; } .mb-8 { margin-bottom: 32px; }
.p-4 { padding: 16px; }
.w-full { width: 100%; }
.max-w-sm { max-width: 480px; margin-inline: auto; }
.max-w-md { max-width: 640px; margin-inline: auto; }
.max-w-lg { max-width: 820px; margin-inline: auto; }
.hidden { display: none; }
.surface { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); }
.divider { height: 1px; background: var(--border); margin: 16px 0; }
.text-gold { color: var(--gold); }
.text-accent { color: var(--accent); }
.text-danger { color: #FCA5A5; }
.text-success { color: #86EFAC; }
.nowrap { white-space: nowrap; }
@media (max-width: 767.98px) { .hide-mobile { display: none !important; } }
@media (min-width: 768px) { .hide-desktop { display: none !important; } }

/* --------------------------------------------------------------------------
   19. Movimento (data-motion no <html>: full | soft | off)
   Só transform/opacity/filter. full = tudo; soft = só entrada + hover (sem loops);
   off = nada (nem hover). prefers-reduced-motion: reduce desliga tudo também.
   -------------------------------------------------------------------------- */
/* Entrada escalonada (.reveal → .is-in pelo IntersectionObserver do app.js). O html só ganha
   .js-io pelo script inline do layout quando há IO e sem reduced-motion: sem JS nada fica escondido.
   Rede de segurança: quem esconde é o CSS, quem mostra é o app.js (defer) — se ele não chegar (404 no deploy,
   proxy/extensão bloqueando, erro antes do módulo), o reveal-safety devolve a opacidade em 2,5 s sozinho. */
html.js-io .reveal:not(.is-in) { opacity: 0; animation: reveal-safety 0s linear 2.5s forwards; }
@keyframes reveal-safety { to { opacity: 1; } }
html.js-io .reveal.is-in { animation: reveal-in .32s cubic-bezier(.2,.8,.2,1) backwards; animation-delay: var(--d, 0ms); }
@keyframes reveal-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Hover (full + soft) */
html[data-motion="full"] .btn-primary:hover::after, html[data-motion="full"] .btn-gold:hover::after,
html[data-motion="soft"] .btn-primary:hover::after, html[data-motion="soft"] .btn-gold:hover::after {
  opacity: 1; transform: translateX(130%); transition: transform .65s var(--ease-out);
}
/* viewer das stories: slide ao trocar (app.js re-aplica .is-slide) */
html[data-motion="full"] .story-viewer-stage img.is-slide, html[data-motion="soft"] .story-viewer-stage img.is-slide { animation: story-slide .3s var(--ease-out); }
@keyframes story-slide { from { opacity: 0; transform: translateX(28px) scale(.98); } to { opacity: 1; transform: none; } }

/* Loops (só full) */
html[data-motion="full"] .story:not(.is-seen) .story-ring::before { animation: spin 6s linear infinite; }
html[data-motion="full"] .card.is-elite .card-avatar::before { animation: spin 8s linear infinite; }
html[data-motion="full"] .grid > .card.is-elite:nth-child(-n+4)::after { opacity: .45; animation: elite-pulse 3s ease-in-out infinite; }
html[data-motion="full"] .card.is-elite:hover::after { animation: none; opacity: 1; }
html[data-motion="full"] .card-seal { animation: seal-float 3s ease-in-out infinite; }
html[data-motion="full"] .orb-a { animation: orb-a 20s ease-in-out infinite alternate; }
html[data-motion="full"] .orb-b { animation: orb-b 24s ease-in-out infinite alternate; }
html[data-motion="full"] .hero-glyph { animation: glyph-shift 4s linear infinite; }
/* popup: o "bounce" é a curva de overshoot da própria transição (não um keyframe — o estado final tem que ser o normal) */
html[data-motion="full"] .ad-popup { transition: transform .55s cubic-bezier(.34,1.56,.64,1), opacity .3s var(--ease); }
html[data-motion="full"] .ad-popup .btn { animation: pulse-soft 6s ease-in-out 2s infinite; }
html[data-motion="full"] .age-seal { animation: seal-pulse 2.4s ease-in-out infinite; }
html[data-motion="full"] .skeleton { animation: shimmer 1.4s ease-in-out infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes elite-pulse { 0%, 100% { opacity: .35; } 50% { opacity: .85; } }
@keyframes seal-float { 0%, 100% { transform: translateY(0) rotate(-4deg); } 50% { transform: translateY(-2px) rotate(4deg); } }
@keyframes orb-a { from { transform: translate(0, 0) scale(1); } to { transform: translate(90px, 60px) scale(1.15); } }
@keyframes orb-b { from { transform: translate(0, 0) scale(1.1); } to { transform: translate(-110px, 50px) scale(.95); } }
@keyframes glyph-shift { from { background-position: 0% 50%; } to { background-position: 220% 50%; } }
@keyframes pulse-soft { 0%, 8%, 100% { transform: scale(1); } 4% { transform: scale(1.06); } }
@keyframes seal-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }

/* off: nada se mexe (nem hover) */
html[data-motion="off"] *, html[data-motion="off"] *::before, html[data-motion="off"] *::after {
  animation: none !important; transition-duration: 0s !important;
}
html[data-motion="off"] .card:hover, html[data-motion="off"] .card:active, html[data-motion="off"] .card:hover .card-avatar img,
html[data-motion="off"] .btn:active, html[data-motion="off"] .story:hover .story-ring, html[data-motion="off"] .brand:hover .brand-mark,
html[data-motion="off"] .card-cta:hover img { transform: none; }

/* movimento reduzido: tudo desligado */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .skeleton, .orb, .story-ring::before, .card-avatar::before, .card-seal, .hero-glyph, .age-seal { animation: none !important; }
  html.js-io .reveal:not(.is-in) { opacity: 1; }
  .card:hover, .card:hover .card-avatar img, .story:hover .story-ring { transform: none; }
}
