/* =========================================================================
   Medusa AI · sistema visual (guia: /static/brand/guia.html)
   Conceito: o olhar da Medusa petrificava; o nosso dá movimento.
   Noite (fundo), Seda (texto), Paixão (acento único), Fogo (só em gradientes), Vinho (profundidade).
   Títulos em serifa clássica, interface em Geist, rótulos em mono.
   ========================================================================= */

:root {
  color-scheme: dark;

  /* cor */
  --bg: #0f0809;          /* noite */
  --bg-elev: #170d0f;
  --bg-elev-2: #1f1215;
  --bg-inset: #0a0506;
  --line: rgba(247, 236, 232, .08);
  --line-2: rgba(247, 236, 232, .15);
  --fg: #f7ece8;          /* seda */
  --fg-2: #d4c1bf;
  --muted: #9c8a8c;       /* cinza-rosado */
  --accent: #ff3d6e;      /* paixão */
  --accent-hover: #ff5f88;
  --accent-ink: #1f0309;
  --accent-soft: rgba(255, 61, 110, .12);
  --fire: #ff7a3d;        /* fogo: só em gradientes */
  --wine: #4a0e22;        /* vinho: profundidade */
  --wine-2: #7a1734;
  --ok: #5fd3b0;
  --ok-soft: rgba(95, 211, 176, .12);
  --warn: #f2b84b;
  --warn-soft: rgba(242, 184, 75, .12);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, .12);

  /* tipo */
  --f-serif: "Instrument Serif", "Times New Roman", serif;
  --f-sans: "Geist", "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-mono: "Geist Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;

  /* espaço (base 4px) */
  --s1: .25rem; --s2: .5rem; --s3: .75rem; --s4: 1rem; --s5: 1.5rem;
  --s6: 2rem; --s7: 3rem; --s8: 4rem; --s9: 6rem; --s10: 8rem;

  /* forma */
  --r-sm: 8px; --r: 14px; --r-lg: 22px; --r-pill: 999px;
  --container: 1200px;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --shadow: 0 1px 0 rgba(255, 255, 255, .03) inset, 0 24px 48px -24px rgba(0, 0, 0, .7);
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--fg);
  font: 400 1rem/1.6 var(--f-sans); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
/* granulação de filme, bem sutil */
body::before {
  content: ""; position: fixed; inset: -50%; z-index: 0; pointer-events: none; opacity: .045;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  animation: grain 1.2s steps(6) infinite;
}
body > * { position: relative; z-index: 1; }
body > .site-header { position: sticky; z-index: 40; }
::selection { background: var(--accent); color: var(--accent-ink); }
a { color: inherit; text-decoration-color: var(--line-2); text-underline-offset: 4px; transition: color .2s var(--ease), text-decoration-color .2s var(--ease); }
a:hover { text-decoration-color: currentColor; }
img, video { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
hr { border: 0; border-top: 1px solid var(--line); margin: var(--s6) 0; }

h1, h2, h3, h4 { margin: 0; font-weight: 400; color: var(--fg); }
h1, .h1 { font: 400 clamp(2.4rem, 4.6vw, 3.6rem)/1.02 var(--f-serif); letter-spacing: -.02em; }
h2, .h2 { font: 400 clamp(1.7rem, 3vw, 2.3rem)/1.08 var(--f-serif); letter-spacing: -.015em; }
h3, .h3 { font: 600 1.05rem/1.35 var(--f-sans); letter-spacing: -.01em; }
h4 { font: 600 .95rem/1.4 var(--f-sans); }
h1 em, h2 em, .serif em { font-style: italic; color: var(--accent); }
p { margin: 0; }
.serif { font-family: var(--f-serif); font-weight: 400; }
.mono { font-family: var(--f-mono); font-size: .85em; letter-spacing: 0; }
.muted { color: var(--muted); }
.soft { color: var(--fg-2); }
.small { font-size: .875rem; }
.xs { font-size: .78rem; }
.lead { font-size: 1.125rem; color: var(--fg-2); line-height: 1.6; max-width: 60ch; }
.nowrap { white-space: nowrap; }
.tabular { font-variant-numeric: tabular-nums; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* rótulo mono em caixa alta, usado acima de títulos */
.eyebrow {
  display: inline-flex; align-items: center; gap: var(--s2);
  font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.eyebrow.live::before { animation: rec 1.6s ease-in-out infinite; }

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--s5); }
.container-narrow { max-width: 760px; }
.container-tight { max-width: 480px; }
main { flex: 1; min-width: 0; }
.page { padding-top: var(--s7); padding-bottom: var(--s9); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--s5); flex-wrap: wrap; margin-bottom: var(--s6); }
.page-head .eyebrow { margin-bottom: var(--s3); }
.page-head p { margin-top: var(--s3); color: var(--fg-2); max-width: 58ch; }
.page-head .actions { display: flex; gap: var(--s2); flex-wrap: wrap; }
.back { display: inline-flex; align-items: center; gap: var(--s2); color: var(--muted); text-decoration: none; font-size: .9rem; margin-bottom: var(--s5); }
.back:hover { color: var(--fg); }

.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack-sm { display: flex; flex-direction: column; gap: var(--s2); }
.stack-lg { display: flex; flex-direction: column; gap: var(--s6); }
.row { display: flex; align-items: center; gap: var(--s3); flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid-2 { display: grid; gap: var(--s4); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { display: grid; gap: var(--s4); grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-auto { display: grid; gap: var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.split { display: grid; gap: var(--s6); grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
.sticky { position: sticky; top: 88px; }

/* ---------- cabeçalho ---------- */
.site-header {
  top: 0; background: rgba(15, 8, 9, .82); border-bottom: 1px solid var(--line);
  backdrop-filter: saturate(140%) blur(10px); -webkit-backdrop-filter: saturate(140%) blur(10px);
}
.site-header .container { display: flex; align-items: center; gap: var(--s5); height: 64px; }
/* marca: medalhão de bronze da Medusa (arte em myassets/marca/, recortes em static/brand/).
   .coin = moeda com o rosto (cabeçalho, rodapé); .medallion = medalhão inteiro com olhos vivos (pupilas seguem o cursor). */
.coin { display: block; flex: none; border-radius: 50%; overflow: hidden; background: #2a2420;
  box-shadow: 0 0 0 1.5px #c9a45c, 0 6px 14px -6px rgba(0, 0, 0, .9); transition: transform .5s var(--ease); }
.coin img { display: block; width: 100%; height: 100%; object-fit: cover; }
.medallion { position: relative; display: block; width: 100%; }
.medallion img { display: block; width: 100%; height: auto; }
.medallion-eyes { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; pointer-events: none; }
.medal-glow { fill: #ff5a3d; opacity: .32; animation: medal-glow 4s ease-in-out infinite; }
.medal-blink { transform-box: fill-box; transform-origin: center; animation: blink 6s infinite; }
.mark-eye { transition: transform .45s var(--ease); }
@keyframes blink { 0%, 46%, 50%, 100% { transform: scaleY(1); } 48% { transform: scaleY(.12); } }
@keyframes medal-glow { 50% { opacity: .5; } }

.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--fg); }
.logo .coin { width: 34px; height: 34px; }
.logo:hover .coin { transform: rotate(-10deg) scale(1.06); }
.logo-word { font: 400 1.6rem/1 var(--f-serif); letter-spacing: -.02em; }
.logo-ai { font: 500 .58rem/1 var(--f-mono); letter-spacing: .14em; color: var(--accent); align-self: flex-start; margin: 3px 0 0 -5px; }
.nav { display: flex; align-items: center; gap: var(--s1); margin-left: var(--s4); }
.nav a { text-decoration: none; color: var(--muted); font-size: .92rem; padding: 8px 12px; border-radius: var(--r-pill); transition: color .2s var(--ease), background .2s var(--ease); }
.nav a:hover { color: var(--fg); }
.nav a[aria-current="page"] { color: var(--fg); background: var(--bg-elev-2); }
.header-right { margin-left: auto; display: flex; align-items: center; gap: var(--s2); }
.credits-chip {
  display: inline-flex; align-items: center; gap: 8px; text-decoration: none;
  font: 500 .82rem/1 var(--f-mono); color: var(--fg); padding: 9px 13px;
  border: 1px solid var(--line-2); border-radius: var(--r-pill); transition: border-color .2s var(--ease);
}
.credits-chip:hover { border-color: var(--fg-2); }
.credits-chip b { font-weight: 600; }
.credits-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
/* saldo + comprar, colados num grupo só */
.credits { display: inline-flex; align-items: center; }
.credits .credits-chip { border-radius: var(--r-pill) 0 0 var(--r-pill); border-right: 0; }
.credits-buy {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; padding: 0 14px 0 12px; align-self: stretch;
  border-radius: 0 var(--r-pill) var(--r-pill) 0; background: var(--accent); color: var(--accent-ink);
  font: 500 .82rem/1 var(--f-sans); transition: background .2s var(--ease), box-shadow .3s var(--ease);
}
.credits-buy span[aria-hidden] { font: 500 1.05rem/1 var(--f-sans); margin-top: -1px; }
.credits-buy:hover { background: var(--accent-hover); box-shadow: 0 8px 24px -10px rgba(255, 61, 110, .8); }
.avatar {
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; text-decoration: none;
  background: var(--bg-elev-2); border: 1px solid var(--line-2); font: 600 .8rem/1 var(--f-sans); text-transform: uppercase;
  transition: border-color .2s var(--ease);
}
.avatar:hover { border-color: var(--fg-2); }

/* menu mobile (sem JS: details/summary) */
.menu-mobile { display: none; margin-left: var(--s1); }
.menu-mobile summary { list-style: none; cursor: pointer; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line-2); display: grid; place-items: center; }
.menu-mobile summary::-webkit-details-marker { display: none; }
.menu-mobile summary span, .menu-mobile summary span::before, .menu-mobile summary span::after { display: block; width: 16px; height: 1.5px; background: var(--fg); position: relative; transition: transform .25s var(--ease), background .2s; }
.menu-mobile summary span::before, .menu-mobile summary span::after { content: ""; position: absolute; left: 0; }
.menu-mobile summary span::before { top: -5px; }
.menu-mobile summary span::after { top: 5px; }
.menu-mobile[open] summary span { background: transparent; }
.menu-mobile[open] summary span::before { transform: translateY(5px) rotate(45deg); }
.menu-mobile[open] summary span::after { transform: translateY(-5px) rotate(-45deg); }
.menu-mobile nav {
  position: absolute; left: 0; right: 0; top: 64px; background: var(--bg); border-bottom: 1px solid var(--line);
  padding: var(--s2) var(--s5) var(--s5); display: flex; flex-direction: column; animation: rise .3s var(--ease);
}
.menu-mobile nav a { padding: 16px 0; border-bottom: 1px solid var(--line); text-decoration: none; font: 400 1.5rem/1.1 var(--f-serif); }
.menu-mobile nav a[aria-current="page"] { color: var(--accent); }
.menu-mobile nav .btn { margin-top: var(--s4); font: 500 .95rem/1 var(--f-sans); border-bottom: 0; }

/* ---------- rodapé ---------- */
.site-footer { border-top: 1px solid var(--line); padding: var(--s8) 0 var(--s6); margin-top: auto; }
.footer-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: var(--s6); }
.footer-grid h4 { font: 500 .72rem/1 var(--f-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: var(--s4); }
.footer-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); }
.footer-grid a { text-decoration: none; color: var(--fg-2); font-size: .92rem; }
.footer-grid a:hover { color: var(--fg); }
.footer-brand p { color: var(--muted); font-size: .92rem; margin-top: var(--s3); max-width: 32ch; }
.footer-base { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); flex-wrap: wrap; margin-top: var(--s8); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--muted); font-size: .82rem; }
.lang-switch {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: var(--r-pill); border: 1px solid var(--line);
  color: var(--fg-2); text-decoration: none; font: 500 .78rem/1.4 var(--f-sans); transition: color .2s var(--ease), border-color .2s var(--ease);
}
.lang-switch::before { content: ""; width: 12px; height: 12px; border-radius: 50%; border: 1.3px solid currentColor; box-shadow: inset 0 0 0 3px transparent; background: linear-gradient(currentColor, currentColor) center / 1.3px 100% no-repeat, linear-gradient(currentColor, currentColor) center / 100% 1.3px no-repeat; opacity: .7; }
.lang-switch:hover, .lang-switch:focus-visible { color: var(--fg); border-color: var(--line-2); }

/* ---------- botões ---------- */
.btn {
  --btn-bg: var(--accent); --btn-fg: var(--accent-ink); --btn-bd: transparent;
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px; padding: 0 20px; border-radius: var(--r-pill); border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg); text-decoration: none; cursor: pointer;
  font: 500 .95rem/1 var(--f-sans); letter-spacing: -.01em; white-space: nowrap;
  transition: transform .2s var(--ease), background .2s var(--ease), border-color .2s var(--ease), color .2s var(--ease), box-shadow .3s var(--ease);
}
.btn:hover { --btn-bg: var(--accent-hover); }
.btn:not(.btn-ghost):not(.btn-quiet):not(.btn-light):not(.btn-danger):hover { box-shadow: 0 12px 34px -12px rgba(255, 61, 110, .75); }
.btn:active { transform: scale(.98); }
.btn .arrow { transition: transform .25s var(--ease); }
.btn:hover .arrow { transform: translateX(3px); }
.btn-light { --btn-bg: var(--fg); --btn-fg: #0f0809; }
.btn-light:hover { --btn-bg: #fff; }
.btn-ghost { --btn-bg: transparent; --btn-fg: var(--fg); --btn-bd: var(--line-2); }
.btn-ghost:hover { --btn-bg: var(--bg-elev-2); --btn-bd: var(--fg-2); }
.btn-quiet { --btn-bg: transparent; --btn-fg: var(--fg-2); padding: 0 8px; }
.btn-quiet:hover { --btn-bg: transparent; --btn-fg: var(--fg); }
.btn-danger { --btn-bg: transparent; --btn-fg: var(--danger); --btn-bd: rgba(255, 107, 107, .4); }
.btn-danger:hover { --btn-bg: var(--danger-soft); --btn-bd: var(--danger); }
.btn-sm { min-height: 34px; padding: 0 14px; font-size: .85rem; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .4; cursor: not-allowed; transform: none; }

/* ---------- painéis ---------- */
.panel { background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); padding: var(--s5); box-shadow: var(--shadow); }
.panel-lg { padding: var(--s6); }
.panel-flush { padding: 0; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); flex-wrap: wrap; }
.panel-flush > .panel-head { padding: var(--s5) var(--s5) 0; }
.panel-head h2, .panel-head h3 { margin: 0; }
.panel h2 { font-size: 1.6rem; }
.panel-sub { color: var(--muted); font-size: .9rem; margin-top: 4px; }
.divider { height: 1px; background: var(--line); margin: var(--s5) 0; }

/* lista rótulo · valor */
.kv { display: grid; margin: 0; }
.kv > div { display: flex; justify-content: space-between; gap: var(--s4); padding: 12px 0; border-bottom: 1px solid var(--line); font-size: .92rem; }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; text-align: right; color: var(--fg); }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
label, .label { font: 500 .85rem/1.3 var(--f-sans); color: var(--fg-2); }
.hint { font-size: .82rem; color: var(--muted); }
input[type=text], input[type=email], input[type=number], input[type=url], input[type=password], input[type=search], select, textarea {
  width: 100%; min-height: 46px; padding: 11px 14px; border-radius: var(--r);
  border: 1px solid var(--line-2); background: var(--bg-inset); color: var(--fg);
  font: 400 .95rem/1.4 var(--f-sans); transition: border-color .2s var(--ease), box-shadow .2s var(--ease);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.55; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 20px) 50%, calc(100% - 15px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 40px; }
input::placeholder, textarea::placeholder { color: #6e5a5e; }
input:hover, select:hover, textarea:hover { border-color: rgba(247, 236, 232, .25); }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
input[readonly] { color: var(--fg-2); }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: .92rem; color: var(--fg-2); cursor: pointer; }
.check input { margin: 3px 0 0; width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.form-actions { display: flex; gap: var(--s2); flex-wrap: wrap; align-items: center; }
.inline-form { display: flex; gap: var(--s2); align-items: center; flex-wrap: wrap; }
.inline-form input { width: auto; flex: 1 1 180px; }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { padding: 0; margin-bottom: var(--s3); }
.legend { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s4); }
.legend .num { font: 500 .72rem/1 var(--f-mono); color: var(--accent); letter-spacing: .1em; }
.legend h2 { font-size: 1.6rem; }

/* controle segmentado (radios) */
.segmented { display: inline-flex; padding: 4px; gap: 4px; background: var(--bg-inset); border: 1px solid var(--line-2); border-radius: var(--r-pill); flex-wrap: wrap; }
.segmented label { position: relative; margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; min-height: 38px; padding: 0 18px; border-radius: var(--r-pill); cursor: pointer; font: 500 .9rem/1 var(--f-sans); color: var(--muted); transition: background .2s var(--ease), color .2s var(--ease); }
.segmented span small { font: 400 .72rem/1 var(--f-mono); opacity: .75; }
.segmented label:hover span { color: var(--fg); }
.segmented input:checked + span { background: var(--fg); color: #0f0809; }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

/* cartões de escolha (radios grandes) */
.choices { display: grid; gap: var(--s3); grid-template-columns: repeat(auto-fill, minmax(min(190px, 100%), 1fr)); }
.choice { position: relative; margin: 0; cursor: pointer; display: block; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice-body { display: flex; flex-direction: column; height: 100%; border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-inset); overflow: hidden; transition: border-color .2s var(--ease), transform .25s var(--ease), box-shadow .2s var(--ease); }
.choice:hover .choice-body { border-color: rgba(247, 236, 232, .3); transform: translateY(-2px); }
.choice input:checked + .choice-body { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.choice input:focus-visible + .choice-body { outline: 2px solid var(--accent); outline-offset: 3px; }
.choice-media { display: block; aspect-ratio: 4 / 5; background: var(--bg-elev-2); position: relative; overflow: hidden; }
.choice-media video { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; } /* acima da névoa de fundo */
.choice-tick { position: absolute; top: 12px; right: 12px; width: 24px; height: 24px; border-radius: 50%; border: 1.5px solid rgba(247, 236, 232, .55); background: rgba(15, 8, 9, .55); display: grid; place-items: center; transition: all .2s var(--ease); z-index: 3; }
.choice input:checked + .choice-body .choice-tick { background: var(--accent); border-color: var(--accent); }
.choice input:checked + .choice-body .choice-tick::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent-ink); border-bottom: 2px solid var(--accent-ink); transform: rotate(-45deg) translate(1px, -1px); }
/* template já escolhido (vindo do Explorar): só ele, em formato compacto */
.choices.picked { grid-template-columns: minmax(0, 180px); }
.choices.picked .choice:not(:has(input:checked)) { display: none; }
.choices.picked .choice-media { aspect-ratio: 9 / 16; }
.choices.picked .choice-tick { display: none; }
.choices.picked .choice:hover .choice-body { transform: none; }
.legend-action { margin-left: auto; }
.legend { align-items: center; }
.mode-choice .choice-body { padding: var(--s5); gap: 6px; position: relative; }
.mode-choice .choice-body strong { font: 400 2rem/1.05 var(--f-serif); color: var(--fg); }
.mode-choice .choice-body span { color: var(--muted); font-size: .88rem; }

/* ---------- alertas, badges ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r); border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg-2); font-size: .92rem; }
.alert::before { content: ""; flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: var(--muted); }
.alert-ok { border-color: rgba(95, 211, 176, .35); background: var(--ok-soft); color: #c6f1e4; }
.alert-ok::before { background: var(--ok); }
.alert-error { border-color: rgba(255, 107, 107, .35); background: var(--danger-soft); color: #ffd3d3; }
.alert-error::before { background: var(--danger); }
.alert-warn { border-color: rgba(242, 184, 75, .35); background: var(--warn-soft); color: #f8e2b3; }
.alert-warn::before { background: var(--warn); }
.alert a { color: inherit; text-decoration-color: currentColor; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: var(--r-pill); font: 500 .7rem/1.1 var(--f-mono); letter-spacing: .06em; text-transform: uppercase; border: 1px solid var(--line-2); color: var(--fg-2); background: var(--bg-elev-2); white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-ok { color: var(--ok); border-color: rgba(95, 211, 176, .3); background: var(--ok-soft); }
.badge-warn { color: var(--warn); border-color: rgba(242, 184, 75, .3); background: var(--warn-soft); }
.badge-danger { color: var(--danger); border-color: rgba(255, 107, 107, .3); background: var(--danger-soft); }
.badge-live { color: var(--accent); border-color: rgba(255, 61, 110, .35); background: var(--accent-soft); }
.badge-live::before { animation: rec 1.4s ease-in-out infinite; }
.badge-plain::before { display: none; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .9rem; }
th { text-align: left; font: 500 .68rem/1 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 14px 18px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: middle; color: var(--fg-2); }
tbody tr:last-child td { border-bottom: 0; }
tbody tr { transition: background .15s var(--ease); }
tbody tr:hover { background: rgba(247, 236, 232, .025); }
td a { color: var(--fg); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
td.strong { color: var(--fg); }
.pos { color: var(--ok); }
.neg { color: var(--fg-2); }
.pager { display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 14px 18px; border-top: 1px solid var(--line); font-size: .88rem; }
.pager a { text-decoration: none; color: var(--fg-2); }
.pager a:hover { color: var(--fg); }
pre.json { margin: 0; white-space: pre-wrap; word-break: break-all; font: .76rem/1.5 var(--f-mono); color: var(--muted); max-width: 420px; }

/* ---------- métricas ---------- */
/* células com borda direita/inferior e margem -1px; o contêiner esconde as sobras na borda externa */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr)); background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.stat { padding: var(--s5); display: flex; flex-direction: column; gap: 8px; min-width: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 0 -1px -1px 0; }
.stat-label { font: 500 .68rem/1.2 var(--f-mono); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.stat-value { font: 400 2.1rem/1.02 var(--f-serif); letter-spacing: -.01em; overflow-wrap: anywhere; }
.stat-sub { font-size: .8rem; color: var(--muted); }
/* variante direta (página de créditos): números em sans, sem serifa decorativa */
.stats-plain .stat-value { font: 700 1.7rem/1.05 var(--f-sans); letter-spacing: -.025em; font-variant-numeric: tabular-nums; }

/* ---------- progresso ---------- */
.progress { position: relative; height: 6px; border-radius: var(--r-pill); background: var(--bg-elev-2); overflow: hidden; }
.progress > span { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: inherit; transition: width .8s var(--ease); overflow: hidden; }
.progress > span::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .55), transparent); animation: shine 1.6s linear infinite; }

/* ---------- mídia ---------- */
/* quadro com marcas de canto, estilo visor de câmera */
.frame { position: relative; border-radius: var(--r-lg); overflow: hidden; background: var(--bg-elev-2); isolation: isolate; }
.frame-916 { aspect-ratio: 9 / 16; }
.frame video { width: 100%; height: 100%; object-fit: cover; }
.frame-marks::before, .frame-marks::after { content: ""; position: absolute; width: 22px; height: 22px; z-index: 2; pointer-events: none; }
.frame-marks::before { top: 14px; left: 14px; border-top: 1.5px solid rgba(247, 236, 232, .7); border-left: 1.5px solid rgba(247, 236, 232, .7); }
.frame-marks::after { bottom: 14px; right: 14px; border-bottom: 1.5px solid rgba(247, 236, 232, .7); border-right: 1.5px solid rgba(247, 236, 232, .7); }
.frame-hud { position: absolute; z-index: 3; left: 18px; right: 18px; display: flex; justify-content: space-between; align-items: center; font: 500 .7rem/1 var(--f-mono); letter-spacing: .08em; color: rgba(247, 236, 232, .85); pointer-events: none; }
.frame-hud.top { top: 20px; padding-left: 22px; }
.frame-hud.bottom { bottom: 20px; padding-right: 22px; }
.rec { display: inline-flex; align-items: center; gap: 6px; color: var(--fg); }
.rec::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); animation: rec 1.4s ease-in-out infinite; }

/* placeholder "filme": névoa de vinho e brasa que se move devagar */
.film { position: absolute; inset: 0; overflow: hidden; background: #140a0c; z-index: 0; }
.film::before, .film::after { content: ""; position: absolute; border-radius: 50%; filter: blur(40px); }
.film::before { width: 100%; height: 60%; left: -25%; top: 8%; background: radial-gradient(closest-side, #8a1a3c, transparent); animation: drift-a 14s ease-in-out infinite alternate; }
.film::after { width: 90%; height: 55%; right: -30%; bottom: 0; background: radial-gradient(closest-side, #b4421f, transparent); animation: drift-b 17s ease-in-out infinite alternate; }
.film-b { background: #120a10; }
.film-b::before { background: radial-gradient(closest-side, #5a1446, transparent); }
.film-b::after { background: radial-gradient(closest-side, #c2335a, transparent); }
.film-c { background: #140b0a; }
.film-c::before { background: radial-gradient(closest-side, #6b2a1a, transparent); }
.film-c::after { background: radial-gradient(closest-side, #d0612e, transparent); }
.film-label { position: absolute; left: 18px; right: 18px; top: 48px; z-index: 3; font: 400 1.5rem/1.1 var(--f-serif); color: var(--fg); }

/* ---------- estado vazio ---------- */
.explore-more { text-align: center; color: var(--muted); font-size: .95rem; letter-spacing: .02em; margin-top: var(--s6); }
.empty { text-align: center; padding: var(--s8) var(--s5); border: 1px dashed var(--line-2); border-radius: var(--r-lg); }
.empty h3 { font: 400 1.9rem/1.1 var(--f-serif); margin-bottom: var(--s3); }
.empty p { color: var(--muted); max-width: 44ch; margin: 0 auto var(--s5); }

/* ---------- texto longo (FAQ, termos) ---------- */
.prose { max-width: 68ch; color: var(--fg-2); }
.prose h2 { font-size: 1.7rem; margin: var(--s7) 0 var(--s3); color: var(--fg); }
.prose h2:first-child { margin-top: 0; }
.prose p + p { margin-top: var(--s3); }
.prose a { color: var(--fg); }
.legal-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: var(--s8); align-items: start; }
.legal-toc { position: sticky; top: 96px; display: grid; gap: 2px; }
.legal-toc a { text-decoration: none; color: var(--muted); font-size: .9rem; padding: 6px 0; }
.legal-toc a:hover { color: var(--fg); }
.note { display: inline-flex; gap: 8px; align-items: center; font: 500 .7rem/1 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--warn); border: 1px solid rgba(242, 184, 75, .3); background: var(--warn-soft); padding: 7px 11px; border-radius: var(--r-pill); }

/* acordeão */
.accordion { border-top: 1px solid var(--line); }
.accordion details { border-bottom: 1px solid var(--line); }
.accordion summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s4); padding: 24px 0; font: 400 1.45rem/1.25 var(--f-serif); color: var(--fg); transition: color .2s var(--ease); }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: ""; flex: none; width: 11px; height: 11px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-4px); transition: transform .3s var(--ease); }
.accordion details[open] summary::after { transform: rotate(-135deg) translateY(-2px); }
.accordion details p { color: var(--fg-2); padding: 0 0 24px; max-width: 64ch; }
.accordion summary:hover { color: var(--accent); }

/* ---------- autenticação ---------- */
.auth { min-height: calc(100vh - 65px); display: grid; grid-template-columns: 1fr 1fr; }
.auth-visual { position: relative; border-right: 1px solid var(--line); overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: var(--s7); }
.auth-visual blockquote { position: relative; z-index: 3; margin: 0 0 var(--s4); font: 400 clamp(2rem, 3.4vw, 3rem)/1.05 var(--f-serif); max-width: 14ch; }
.auth-visual blockquote em { color: var(--accent); }
.auth-mark { position: absolute; z-index: 2; width: 72%; max-width: 480px; left: 50%; top: 42%; translate: -50% -50%; color: var(--fg); filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .5)); }
.auth-mark .medallion img { filter: drop-shadow(0 30px 60px rgba(0, 0, 0, .65)); }

.auth-main { display: grid; place-items: center; padding: var(--s7) var(--s5); }
.auth-card { width: 100%; max-width: 400px; }
.auth-card h1 { font-size: clamp(2.4rem, 4vw, 3.2rem); margin: var(--s4) 0 var(--s3); }
.auth-card .lead { font-size: 1rem; margin-bottom: var(--s6); }
.auth-foot { margin-top: var(--s6); padding-top: var(--s5); border-top: 1px solid var(--line); color: var(--muted); font-size: .85rem; }
.auth-switch { margin-top: var(--s5); font-size: .95rem; color: var(--fg-2); }
.auth-switch a { color: var(--accent); font-weight: 600; text-decoration: none; }
.auth-switch a:hover { text-decoration: underline; }
/* campo de senha com botão mostrar/ocultar */
.pw-field { position: relative; }
.pw-field input { padding-right: 86px; }
.pw-toggle {
  position: absolute; right: 8px; top: 50%; translate: 0 -50%; min-height: 32px; padding: 0 12px; border: 0; border-radius: var(--r-pill);
  background: transparent; color: var(--fg-2); font: 500 .8rem/1 var(--f-sans); cursor: pointer;
}
.pw-toggle:hover { background: var(--bg-elev-2); color: var(--fg); }
.signup-hint a { color: var(--accent); font-weight: 600; text-decoration: none; }
.code-input { font: 500 1.7rem/1 var(--f-mono) !important; letter-spacing: .55em; text-align: center; padding-left: calc(14px + .55em) !important; min-height: 64px !important; }

/* ---------- Pix ---------- */
.pix-layout { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.qr-frame { position: relative; background: #f7ece8; border-radius: var(--r-lg); padding: 22px; }
.qr-frame img { width: 100%; height: auto; image-rendering: pixelated; }
.qr-frame::before, .qr-frame::after { content: ""; position: absolute; width: 18px; height: 18px; }
.qr-frame::before { top: 9px; left: 9px; border-top: 2px solid #0f0809; border-left: 2px solid #0f0809; }
.qr-frame::after { bottom: 9px; right: 9px; border-bottom: 2px solid #0f0809; border-right: 2px solid #0f0809; }
.copy-box { display: flex; gap: var(--s2); align-items: stretch; }
.copy-box input { font: .8rem/1.3 var(--f-mono); }
.countdown { font: 400 3.4rem/1 var(--f-serif); font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.steps-mini { counter-reset: st; list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s3); }
.steps-mini li { counter-increment: st; display: flex; gap: 12px; color: var(--fg-2); font-size: .92rem; align-items: flex-start; }
.steps-mini li::before { content: counter(st); flex: none; width: 24px; height: 24px; border-radius: 50%; border: 1px solid var(--line-2); display: grid; place-items: center; font: 500 .72rem/1 var(--f-mono); color: var(--fg); }
.success-mark { width: 60px; height: 60px; border-radius: 50%; background: var(--ok-soft); border: 1px solid rgba(95, 211, 176, .4); display: grid; place-items: center; margin-bottom: var(--s5); }
.success-mark::after { content: ""; width: 20px; height: 10px; border-left: 2px solid var(--ok); border-bottom: 2px solid var(--ok); transform: rotate(-45deg) translate(2px, -2px); }

/* ---------- pacotes ----------
   Aqui a clareza vem antes da estética: sans legível, créditos e preço grandes, um selo por destaque. */
.packages { display: grid; gap: var(--s6) var(--s3); grid-template-columns: repeat(5, minmax(0, 1fr)); padding-top: 12px; }
.package {
  position: relative; display: flex; flex-direction: column; margin: 0; padding: var(--s6) var(--s5) var(--s5);
  border: 1px solid var(--line-2); border-radius: var(--r-lg); background: var(--bg-elev); transition: border-color .2s var(--ease);
}
.package:hover { border-color: rgba(247, 236, 232, .3); }
.package-name { font: 600 1rem/1.2 var(--f-sans); color: var(--fg-2); }
.package-credits { margin-top: var(--s3); font: 700 2.3rem/1 var(--f-sans); letter-spacing: -.035em; color: var(--fg); font-variant-numeric: tabular-nums; }
.package-credits small { font: 500 .95rem/1 var(--f-sans); letter-spacing: 0; color: var(--fg-2); }
.package-price { margin-top: var(--s4); padding-top: var(--s4); border-top: 1px solid var(--line); font: 700 1.55rem/1 var(--f-sans); letter-spacing: -.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.package-yield { margin-top: var(--s3); font: 500 .92rem/1.35 var(--f-sans); color: var(--fg); }
.package-per { margin-top: 4px; font: 400 .82rem/1.35 var(--f-sans); color: var(--muted); }
.package-spacer { flex: 1; min-height: var(--s5); }
.package .btn { min-height: 48px; font-weight: 600; }
.package-badge {
  position: absolute; top: -12px; left: var(--s5); padding: 6px 12px; border-radius: var(--r-pill);
  font: 700 .72rem/1 var(--f-sans); letter-spacing: .04em; text-transform: uppercase; white-space: nowrap;
  background: var(--accent); color: var(--accent-ink);
}
.package-badge.best { background: var(--ok); color: #04241b; }
.package.popular { border-color: var(--accent); background: linear-gradient(180deg, rgba(255, 61, 110, .09), transparent 45%), var(--bg-elev); box-shadow: 0 0 0 1px var(--accent) inset; }
.package.best { border-color: rgba(95, 211, 176, .6); }

/* ---------- biblioteca de vídeos ---------- */
.video-grid { display: grid; gap: var(--s5) var(--s4); grid-template-columns: repeat(auto-fill, minmax(min(210px, 100%), 1fr)); }
.video-card { display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.video-card .frame { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
.video-card:hover .frame { transform: translateY(-4px); box-shadow: 0 30px 50px -30px rgba(0, 0, 0, .9); }
.video-card .frame-hud { font-size: .66rem; }
.video-card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: var(--s2); }
.video-card-meta strong { font-weight: 600; font-size: .95rem; display: block; color: var(--fg); }
.video-card-meta span { color: var(--muted); font: .74rem/1.5 var(--f-mono); }
.video-card .progress { position: absolute; left: 18px; right: 18px; bottom: 48px; z-index: 3; }
.video-card-link, .video-card-meta > a { display: block; text-decoration: none; color: inherit; min-width: 0; }
.video-card-meta .video-expiry { display: block; color: var(--fg-2); }
.video-card-meta .video-expiry.soon { color: var(--warn); }
.card-delete {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--muted); cursor: pointer;
  transition: color .2s var(--ease), border-color .2s var(--ease), background .2s var(--ease);
}
.card-delete:hover, .card-delete:focus-visible { color: var(--danger); border-color: var(--danger); background: var(--danger-soft); }
/* geração em andamento: barra cheia com brilho correndo, sem porcentagem */
.progress-busy > span { width: 100%; }
.player-layout { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: var(--s8); align-items: start; }
.player-layout .frame { background: #000; }
.player-side h1 { margin: var(--s3) 0 var(--s4); }

/* ---------- admin ---------- */
.admin-layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: var(--s7); align-items: start; }
.admin-nav { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 2px; }
.admin-nav .eyebrow { margin: 0 12px var(--s4); }
.admin-nav a { text-decoration: none; color: var(--muted); padding: 10px 12px; border-radius: 10px; font-size: .92rem; display: flex; justify-content: space-between; align-items: center; transition: color .2s, background .2s; }
.admin-nav a:hover { color: var(--fg); background: var(--bg-elev); }
.admin-nav a[aria-current="page"] { color: var(--fg); background: var(--bg-elev-2); }
.admin-nav a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.period + .period { margin-top: var(--s7); }
.period-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); margin-bottom: var(--s4); }
.period-head h2 { font-size: 1.7rem; }
/* funil (admin) */
.funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s4); }
.funnel-top { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); margin-bottom: 8px; }
.funnel-label { display: inline-flex; align-items: center; gap: 10px; font-size: .92rem; color: var(--fg-2); }
.funnel-n { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); font: 500 .7rem/1 var(--f-mono); color: var(--muted); flex: none; }
.funnel-value { font: 700 1.25rem/1 var(--f-sans); font-variant-numeric: tabular-nums; text-align: right; }
.funnel-value small { display: block; margin-top: 4px; font: 400 .72rem/1 var(--f-sans); color: var(--muted); }
.funnel-bar { height: 8px; border-radius: var(--r-pill); background: var(--bg-elev-2); overflow: hidden; }
.funnel-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent), var(--fire)); }
.seg-link { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: var(--r-pill); text-decoration: none; font: 500 .85rem/1 var(--f-sans); color: var(--muted); }
.seg-link:hover { color: var(--fg); }
.seg-link.on { background: var(--fg); color: var(--bg); }
.tpl-admin summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.tpl-admin summary::-webkit-details-marker { display: none; }
.tpl-admin summary .chev { width: 9px; height: 9px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg); transition: transform .3s var(--ease); }
.tpl-admin[open] summary .chev { transform: rotate(-135deg); }
.tpl-admin[open] summary { margin-bottom: var(--s5); }
.tpl-thumb { width: 40px; height: 40px; border-radius: 10px; overflow: hidden; background: var(--bg-elev-2); border: 1px solid var(--line-2); flex: none; }
.tpl-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tpl-media { display: grid; place-items: center; height: 220px; border-radius: var(--r); overflow: hidden; background: var(--bg-inset); border: 1px solid var(--line); }
.tpl-media img, .tpl-media video { width: 100%; height: 100%; object-fit: contain; background: #000; }
.tpl-media-empty { color: var(--muted); font-size: .85rem; padding: var(--s4); text-align: center; }
.upload input[type=file] { font-size: .85rem; color: var(--fg-2); }
.upload input[type=file]::file-selector-button { margin-right: 12px; padding: 8px 14px; border-radius: var(--r-pill); border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg); font: 500 .82rem/1 var(--f-sans); cursor: pointer; }

/* referências enviadas pelo usuário ao criar vídeo */
.ref-drop {
  display: flex; flex-direction: column; align-items: center; gap: var(--s2); padding: var(--s5) var(--s4);
  border: 1.5px dashed var(--line-2); border-radius: var(--r); background: var(--bg-inset); color: var(--muted);
  text-align: center; cursor: pointer; transition: border-color .2s var(--ease), background .2s var(--ease), color .2s var(--ease);
}
.ref-drop:hover, .ref-drop.drag, .ref-drop:focus-within { border-color: var(--accent); background: var(--accent-soft); color: var(--fg); }
.ref-drop.has-files { padding: var(--s3) var(--s4); flex-direction: row; justify-content: center; }
.ref-drop.has-files .ref-drop-hint { display: none; }
.ref-drop-text { font-weight: 500; color: var(--fg); }
.ref-drop-hint { font-size: .82rem; }
.ref-previews { display: grid; grid-template-columns: repeat(auto-fill, minmax(72px, 1fr)); gap: var(--s2); max-width: 520px; }
.ref-previews:empty { display: none; }
.ref-preview { position: relative; aspect-ratio: 1; }
.ref-preview img { width: 100%; height: 100%; object-fit: cover; border-radius: var(--r-sm); border: 1px solid var(--line-2); }
.ref-remove {
  position: absolute; top: -6px; right: -6px; width: 22px; height: 22px; display: grid; place-items: center; padding: 0;
  border-radius: 50%; border: 1px solid var(--line-2); background: var(--bg-elev-2); color: var(--fg); font: 500 15px/1 var(--f-sans); cursor: pointer;
}
.ref-remove:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- explorar (home) ---------- */
.explore-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s5) var(--s7); flex-wrap: wrap; margin-bottom: var(--s7); }
.explore-head h1 { font-size: clamp(2.6rem, 5.4vw, 4.6rem); line-height: .95; letter-spacing: -.03em; margin-top: var(--s4); max-width: 14ch; }
.explore-head h1 { max-width: none; }
.explore-head h1 > * { display: block; } /* uma frase por linha nos dois idiomas */
/* banner "envie uma foto, receba o vídeo" ao lado do título */
.hero-promo {
  flex: 1 1 560px; max-width: 820px; position: relative; overflow: hidden; display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: var(--s5);
  padding: var(--s5) var(--s6); border-radius: var(--r-lg); border: 1px solid rgba(255, 61, 110, .28); color: var(--fg); text-decoration: none;
  background: radial-gradient(120% 140% at 100% 0%, rgba(255, 122, 61, .22), transparent 55%), linear-gradient(120deg, var(--wine) 0%, #2a0a14 55%, var(--bg-elev) 100%);
  box-shadow: 0 30px 60px -36px rgba(255, 61, 110, .45); transition: border-color .25s var(--ease), transform .35s var(--ease);
}
.hero-promo:hover { border-color: rgba(255, 61, 110, .6); transform: translateY(-2px); }
.hero-promo-tag { display: inline-block; padding: 4px 10px; border-radius: var(--r-pill); background: var(--accent-soft); color: var(--accent); font: 500 .66rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; }
.hero-promo h2 { margin: var(--s3) 0 var(--s2); font: 400 clamp(1.8rem, 2.7vw, 2.7rem)/1.02 var(--f-serif); letter-spacing: -.02em; }
.hero-promo h2 em { display: block; color: var(--accent); }
.hero-promo p { margin: 0 0 var(--s5); color: var(--fg-2); font-size: .98rem; max-width: 40ch; }
.hero-promo-cta { pointer-events: none; }
.hero-promo-art { display: flex; align-items: center; gap: 4px; }
.hero-promo-photo, .hero-promo-video {
  display: block; width: 140px; aspect-ratio: 3 / 4; height: auto; object-fit: cover; background: #000;
  border-radius: 14px; border: 2px solid rgba(247, 236, 232, .85); box-shadow: 0 18px 36px -14px rgba(0, 0, 0, .9);
  transition: transform .4s var(--ease);
}
.hero-promo-photo { transform: rotate(-6deg); }
.hero-promo-video { width: 168px; transform: rotate(5deg); }
.hero-promo:hover .hero-promo-photo { transform: rotate(-9deg) scale(1.03); }
.hero-promo:hover .hero-promo-video { transform: rotate(3deg) scale(1.04); }
.hero-promo-arrow { width: 48px; flex: 0 0 48px; overflow: visible; fill: none; stroke: rgba(247, 236, 232, .8); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.hero-promo-arrow .ref-arrow-line { animation: ref-flow 2.4s linear infinite; }
@media (max-width: 640px) {
  .hero-promo { gap: var(--s3); padding: var(--s4); }
  .hero-promo h2 { font-size: 1.45rem; margin: var(--s2) 0 var(--s3); }
  .hero-promo p { display: none; }
  .hero-promo-cta { min-height: 36px; padding: 0 14px; font-size: .82rem; }
  .hero-promo-art { gap: 0; }
  .hero-promo-photo { width: 58px; border-radius: 10px; } .hero-promo-video { width: 76px; border-radius: 10px; }
  .hero-promo-arrow { width: 26px; flex-basis: 26px; }
}
/* Explorar ocupa mais a tela (cabeçalho e rodapé acompanham para alinhar): 5 colunas em telas grandes */
.page-wide { --container: 1640px; }
.explore-grid { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); gap: var(--s4) var(--s3); }
.use-cta {
  position: absolute; z-index: 3; left: 14px; right: 14px; bottom: 14px; display: flex; justify-content: center; align-items: center; gap: 8px;
  min-height: 42px; border-radius: var(--r-pill); background: var(--accent); color: var(--accent-ink); font: 500 .88rem/1 var(--f-sans);
  opacity: 0; transform: translateY(8px); transition: opacity .3s var(--ease), transform .3s var(--ease);
}
.video-card:hover .use-cta, .video-card:focus-visible .use-cta { opacity: 1; transform: none; }
@media (hover: none) { .use-cta { opacity: 1; transform: none; min-height: 36px; font-size: .8rem; } }

/* card de template: vídeo grande + foto de referência no canto */
.frame-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.frame video { position: relative; z-index: 1; background: transparent; }
.frame-marks.has-ref::before { display: none; }
/* foto estática no canto + seta discreta indicando que ela virou o vídeo */
.ref-wrap { position: absolute; z-index: 3; top: 12px; left: 12px; width: 36%; min-width: 60px; max-width: 96px; pointer-events: none; }
.ref-thumb {
  display: block; width: 100%; height: auto; aspect-ratio: 1; object-fit: cover;
  border-radius: 14px; border: 2px solid rgba(247, 236, 232, .9); box-shadow: 0 10px 24px -8px rgba(0, 0, 0, .75);
  transition: transform .35s var(--ease);
}
.ref-arrow {
  position: absolute; top: calc(100% + 4px); left: 46%; width: 52%; height: auto; overflow: visible;
  fill: none; stroke: rgba(247, 236, 232, .7); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7));
}
.ref-arrow-line { stroke-dasharray: 3 4; }
.video-card:hover .ref-thumb { transform: scale(1.06) rotate(-2deg); }
.video-card:hover .ref-arrow-line { animation: ref-flow 1.4s linear infinite; }
@keyframes ref-flow { to { stroke-dashoffset: -14; } }

/* ---------- cadastro (popup ao clicar num template sem conta) ---------- */
html.modal-open { overflow: hidden; }
.signup { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: var(--s4); }
.signup[hidden] { display: none; }
.signup-backdrop { position: absolute; inset: 0; background: rgba(8, 4, 5, .72); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); opacity: 0; transition: opacity .25s var(--ease); }
.signup-card {
  position: relative; width: 100%; max-width: 980px; max-height: calc(100vh - 32px); overflow: auto;
  display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  background: var(--bg-elev); border: 1px solid var(--line-2); border-radius: 26px;
  box-shadow: 0 50px 140px -40px rgba(0, 0, 0, .95), 0 0 0 1px rgba(255, 61, 110, .05);
  opacity: 0; transform: translateY(18px) scale(.98); transition: opacity .3s var(--ease), transform .4s var(--ease);
}
.signup-card:focus { outline: none; }
.signup.in .signup-backdrop { opacity: 1; }
.signup.in .signup-card { opacity: 1; transform: none; }
.signup-close { position: absolute; z-index: 5; top: 14px; right: 14px; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line-2); background: rgba(15, 8, 9, .6); color: var(--fg); display: grid; place-items: center; cursor: pointer; transition: background .2s var(--ease); }
.signup-close:hover { background: var(--bg-elev-2); }
.signup-close svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 2; stroke-linecap: round; fill: none; }
.signup-art { position: relative; min-height: 560px; overflow: hidden; background: var(--bg-elev-2); }
.signup-art > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; } /* só a foto grande (filho direto), não a moeda do logo */
.signup-art video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; }
/* foto e vídeo lado a lado, mesmo tamanho, seta no meio */
.signup-pair[hidden] { display: none; }
.signup-pair { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; gap: 6px; padding: var(--s6) var(--s5) 88px; }
.pair-item { margin: 0; flex: 1 1 0; min-width: 0; max-width: 230px; display: grid; gap: 10px; }
.signup-art .pair-item img, .pair-item video {
  position: static; display: block; width: 100%; height: auto; aspect-ratio: 3 / 4; object-fit: cover; background: #000;
  border-radius: 16px; border: 1px solid rgba(247, 236, 232, .22); box-shadow: 0 18px 40px -18px rgba(0, 0, 0, .9);
}
.pair-item figcaption { text-align: center; font: 500 .66rem/1 var(--f-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--fg-2); }
.pair-arrow { flex: 0 0 40px; width: 40px; margin-bottom: 20px; overflow: visible; fill: none; stroke: rgba(247, 236, 232, .7); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .7)); }
.pair-arrow .ref-arrow-line { animation: ref-flow 2.4s linear infinite; }
.signup-art::after { content: ""; position: absolute; inset: 0; z-index: 2; background: linear-gradient(180deg, transparent 55%, rgba(15, 8, 9, .85)); pointer-events: none; }
.signup-art-foot { position: absolute; z-index: 3; left: var(--s5); right: var(--s5); bottom: var(--s5); display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.signup-art-foot .logo .coin { width: 30px; height: 30px; }
.signup-tpl { font: 500 .7rem/1.2 var(--f-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--fg-2); text-align: right; }
.signup-body { padding: var(--s8) var(--s6) var(--s6); display: flex; flex-direction: column; justify-content: center; }
.signup-body h2 { font-size: clamp(2.2rem, 3.6vw, 2.9rem); line-height: 1; letter-spacing: -.02em; }
.signup-sub { margin: var(--s3) 0 var(--s5); color: var(--fg-2); font-size: 1.02rem; }
.signup-sub em { font: italic 400 1.2em/1 var(--f-serif); color: var(--accent); }
.signup-perks { list-style: none; margin: 0 0 var(--s5); padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 16px; background: var(--bg-inset); }
.signup-perks li { display: grid; justify-items: center; gap: 8px; padding: 14px 8px; text-align: center; font-size: .8rem; line-height: 1.3; color: var(--fg-2); }
.signup-perks li + li { border-left: 1px solid var(--line); }
.perk-ico { width: 22px; height: 22px; border-radius: 50%; background: var(--accent-soft); position: relative; }
.perk-ico::after { content: ""; position: absolute; left: 7px; top: 6px; width: 7px; height: 4px; border-left: 1.8px solid var(--accent); border-bottom: 1.8px solid var(--accent); transform: rotate(-45deg); }
.input-icon { position: relative; }
.input-icon svg { position: absolute; left: 15px; top: 50%; translate: 0 -50%; width: 18px; height: 18px; fill: none; stroke: var(--muted); stroke-width: 1.6; stroke-linejoin: round; pointer-events: none; }
.input-icon input { padding-left: 44px; min-height: 52px; }
.signup-hint { margin-top: var(--s4); font-size: .82rem; color: var(--muted); }
.signup-terms { margin-top: var(--s3); font-size: .75rem; color: var(--muted); }
.signup-terms a { color: var(--fg-2); }
@media (max-width: 760px) {
  .signup { padding: 0; align-items: end; }
  .signup-card { grid-template-columns: 1fr; border-radius: 22px 22px 0 0; max-height: 94vh; }
  .signup-art { min-height: 0; aspect-ratio: 16 / 10; }
  .signup-art.has-pair { aspect-ratio: auto; }
  .signup-pair { position: relative; inset: auto; padding: var(--s4) var(--s4) 64px; }
  .pair-item { max-width: 160px; }
  .pair-arrow { flex-basis: 30px; width: 30px; }
  .signup-body { padding: var(--s5) var(--s4) var(--s6); }
  .signup-perks li { font-size: .74rem; }
}

/* ---------- aviso de entrada (18+) ---------- */
html.gated { overflow: hidden; }
html.gated body > :not(.gate):not(script) { filter: blur(14px) saturate(.8); pointer-events: none; user-select: none; }
.gate {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: var(--s4);
  background: radial-gradient(ellipse at 50% 0%, rgba(122, 23, 52, .45), transparent 60%), rgba(8, 4, 5, .72);
  animation: gate-in .5s var(--ease) both;
}
.gate.out { animation: gate-out .35s var(--ease) both; }
.gate-card:focus { outline: none; }
.gate-card {
  position: relative; width: 100%; max-width: 420px; text-align: center; padding: var(--s7) var(--s5) var(--s5);
  background: linear-gradient(180deg, rgba(255, 61, 110, .07), transparent 40%), var(--bg-elev);
  border: 1px solid var(--line-2); border-radius: 26px; box-shadow: 0 40px 120px -30px rgba(0, 0, 0, .9), 0 0 0 1px rgba(255, 61, 110, .06);
  animation: rise .6s var(--ease) .05s both;
}
.gate-medal { width: 136px; margin: calc(-1 * var(--s7) - 84px) auto var(--s4); filter: drop-shadow(0 16px 36px rgba(0, 0, 0, .75)); }
.gate-card h2 { display: inline-flex; align-items: flex-start; gap: 0; margin-bottom: var(--s5); }
.gate-card h2 .logo-word { font-size: 2.2rem; }
.gate-card h2 .logo-ai { font-size: .66rem; margin: 6px 0 0 4px; }
.gate-rules { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--s2); text-align: left; }
.gate-rules li { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: var(--bg-elev-2); border: 1px solid var(--line); font-size: .92rem; line-height: 1.45; color: var(--fg-2); }
.gate-rules b { color: var(--fg); font-weight: 600; }
.gate-ico { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 .68rem/1 var(--f-mono); letter-spacing: -.02em; }
.gate-ico svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.gate-note { margin: var(--s5) 0; font-size: .8rem; color: var(--muted); }
.gate-note a { color: var(--fg-2); }
.gate-btn { width: 100%; }
.gate-leave { display: inline-block; margin-top: var(--s3); font-size: .85rem; color: var(--muted); text-decoration: none; }
.gate-leave:hover { color: var(--fg); }
@keyframes gate-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes gate-out { to { opacity: 0; } }

/* ---------- erro ---------- */
.error-page { text-align: center; padding: var(--s10) 0; }
.error-code { font: italic 400 clamp(7rem, 20vw, 13rem)/.85 var(--f-serif); color: var(--accent); letter-spacing: -.04em; }
.error-page h1 { margin: var(--s5) 0 var(--s3); }
.error-page p { color: var(--fg-2); margin-bottom: var(--s6); }

/* ---------- animações ---------- */
@keyframes rise { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes rec { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes shine { from { transform: translateX(-100%); } to { transform: translateX(100%); } }
@keyframes grain { 0% { transform: translate(0, 0); } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } 100% { transform: translate(0, 0); } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes drift-a { to { transform: translate(30%, 20%) scale(1.2); } }
@keyframes drift-b { to { transform: translate(-25%, -30%) scale(1.15); } }

.anim { animation: rise .8s var(--ease) both; }
.anim-1 { animation-delay: .06s; } .anim-2 { animation-delay: .14s; } .anim-3 { animation-delay: .22s; } .anim-4 { animation-delay: .3s; } .anim-5 { animation-delay: .38s; }
.js [data-reveal] { opacity: 0; transform: translateY(24px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }

/* ---------- responsivo ---------- */
@media (max-width: 1080px) {
  .packages { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .split { grid-template-columns: minmax(0, 1fr); }
  .sticky { position: static; }
  .legal-layout { grid-template-columns: 1fr; gap: var(--s5); }
  .legal-toc { position: static; display: flex; flex-wrap: wrap; gap: var(--s2) var(--s4); }
}
@media (max-width: 900px) {
  .nav, .header-right .hide-sm { display: none; }
  .menu-mobile { display: block; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
  .auth { grid-template-columns: 1fr; min-height: 0; }
  .auth-visual { display: none; }
  .pix-layout { grid-template-columns: 1fr; gap: var(--s5); }
  .qr-frame { max-width: 300px; }
  .player-layout { grid-template-columns: 1fr; gap: var(--s5); }
  .player-layout .frame { max-width: 400px; }
  .admin-layout { grid-template-columns: 1fr; gap: var(--s4); }
  .admin-nav { position: static; flex-direction: row; overflow-x: auto; gap: 6px; padding-bottom: 4px; }
  .admin-nav .eyebrow { display: none; }
  .admin-nav a { white-space: nowrap; border: 1px solid var(--line); }
  .admin-nav a[aria-current="page"]::after { display: none; }
  .grid-3 { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .hide-xs { display: none; }
  .credits-buy { padding: 0 13px; }
  .container { padding: 0 var(--s4); }
  .page { padding-top: var(--s6); padding-bottom: var(--s8); }
  .panel { padding: var(--s4); border-radius: var(--r); }
  .panel-lg { padding: var(--s5); }
  .panel-flush { padding: 0; }
  .panel-flush > .panel-head { padding: var(--s4) var(--s4) 0; }
  .packages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .packages { gap: var(--s5) var(--s3); }
  .package { padding: var(--s6) var(--s4) var(--s4); }
  .package-credits { font-size: 1.9rem; }
  .package-price { font-size: 1.3rem; }
  .package-badge { left: var(--s4); font-size: .66rem; padding: 5px 10px; }
  .grid-2 { grid-template-columns: 1fr; }
  th, td { padding: 12px 14px; }
  .stat { padding: var(--s4); }
  .stat-value { font-size: 1.7rem; }
  .copy-box { flex-direction: column; }
  .footer-grid { grid-template-columns: 1fr; }
  .video-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s4) var(--s3); }
  .segmented { width: 100%; }
  .segmented label { flex: 1; }
  .segmented span { justify-content: center; padding: 0 10px; width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
}
