/* MotionPX v3 — UI do usuário. Estúdio escuro: painel à esquerda (~300 px) + biblioteca em vídeo (masonry) à direita.
 * Um único acento (lima). Fontes do sistema (CSP: nada de CDN). Celular: coluna única + Gerar fixo na base. */

:root {
  --bg: #0b0c0e;
  --bg-2: #0f1013;
  --panel: #141518;
  --card: #1b1c20;
  --card-2: #222328;
  --card-3: #2b2c32;
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.12);
  --dash: rgba(255, 255, 255, 0.17);
  --text: #f3f4f6;
  --text-2: #a7aab1;
  --text-3: #74777f;
  --accent: #c8ff3a;
  --accent-hover: #d6ff66;
  --accent-ink: #0d1200;
  --accent-soft: rgba(200, 255, 58, 0.12);
  --accent-line: rgba(200, 255, 58, 0.38);
  --danger: #ff6b6b;
  --danger-soft: rgba(255, 107, 107, 0.12);
  --warn: #ffbf4d;
  --warn-soft: rgba(255, 191, 77, 0.11);
  --r-xs: 8px;
  --r-sm: 10px;
  --r: 12px;
  --r-lg: 16px;
  --r-xl: 20px;
  --top-h: 56px;
  --side-w: 316px;
  --dock-h: 0px;
  --font: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", Consolas, "Liberation Mono", monospace;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.45 var(--font);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, video { max-width: 100%; }
/* rolagens programáticas param abaixo do topo fixo (e acima do botão Gerar fixo no celular) */
[id], .lib-bar { scroll-margin-top: calc(var(--top-h) + 12px); scroll-margin-bottom: calc(var(--dock-h) + 12px); }
a { color: var(--text); }
button { font: inherit; color: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon {
  width: 18px; height: 18px; flex: none;
  fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}
.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;
}
.skip {
  position: absolute; left: 12px; top: -60px; z-index: 100;
  background: var(--accent); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r-sm); font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.fine { font-size: 12px; color: var(--text-3); }

/* ------------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 16px; border-radius: var(--r-sm); border: 1px solid transparent;
  font: 650 14px/1 var(--font); text-decoration: none; white-space: nowrap; cursor: pointer;
  transition: background-color .15s, border-color .15s, color .15s, transform .08s;
}
.btn:active { transform: scale(.98); }
.btn .icon { width: 17px; height: 17px; }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--card-2); border-color: var(--line-2); color: var(--text); }
.btn-secondary:hover { background: var(--card-3); }
.btn-ghost { background: transparent; color: var(--text-2); }
.btn-ghost:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.btn-buy { background: var(--accent); color: var(--accent-ink); font-weight: 750; }
.btn-buy:hover { background: var(--accent-hover); }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn-block { width: 100%; }
.btn.is-armed { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 107, 107, .4); }
.btn[disabled] { opacity: .55; cursor: not-allowed; }

.iconbtn {
  display: inline-grid; place-items: center; position: relative;
  width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line-2);
  background: var(--card); color: var(--text-2); cursor: pointer;
}
.iconbtn:hover { color: var(--text); background: var(--card-2); }
.iconbtn-sm { width: 30px; height: 30px; border: 0; background: transparent; }
.iconbtn-sm .icon { width: 15px; height: 15px; }

.linkbtn {
  background: none; border: 0; padding: 6px 2px; cursor: pointer;
  color: var(--text-2); font: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(255, 255, 255, .25);
}
.linkbtn:hover { color: var(--text); text-decoration-color: currentColor; }
.linkbtn-sm { font-size: 12.5px; }

.minibtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .1);
  font: 650 12.5px/1 var(--font); color: var(--text);
}
.minibtn:hover { background: rgba(255, 255, 255, .14); }

/* ---------------------------------------------------------------- barra de topo */
.masthead { position: sticky; top: 0; z-index: 40; }
.d-only { display: none; }
@media (min-width: 1024px) { .d-only { display: inline; } .m-only { display: none; } }
.topbar {
  position: relative;
  height: 56px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 0 16px 0 20px;
  background: rgba(11, 12, 14, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--text); min-width: 0; }
.brand-mark {
  width: 30px; height: 30px; border-radius: 9px; background: var(--accent);
  display: inline-grid; place-items: center; flex: none;
}
.brand-mark svg { width: 24px; height: 24px; }
.brand-mark rect { fill: var(--accent-ink); }
.brand-mark .m1 { opacity: .35; }
.brand-mark .m2 { opacity: .65; }
.brand-name { font-weight: 900; font-size: 17px; letter-spacing: -.02em; white-space: nowrap; }
.topbar-right { display: flex; align-items: center; gap: 10px; min-width: 0; }
.top-jobs { display: none; }
.dot-badge {
  position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px var(--bg);
}
/* v7: saldo "● 35 tokens" + "Comprar tokens" */
.wallet {
  display: inline-flex; align-items: center; gap: 7px; flex: none; height: 34px; padding: 0 12px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line-2); font: 700 13px/1 var(--font); color: var(--text); white-space: nowrap;
}
.wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; box-shadow: 0 0 0 3px var(--accent-soft); }
.wallet.is-zero .wallet-dot { background: var(--text-3); box-shadow: none; }
.wallet-n { font-variant-numeric: tabular-nums; }
.buy-open { flex: none; gap: 6px; font-weight: 750; }
.buy-open .icon { width: 15px; height: 15px; stroke-width: 2.4; }
/* v10: "Entrar" (sem conta) e a conta (foto + nome + menu) */
.top-login { flex: none; font-weight: 750; }
.acct { position: relative; flex: none; }
.acct-btn {
  display: inline-flex; align-items: center; gap: 7px; height: 36px; max-width: 180px; padding: 0 8px 0 3px; border-radius: 999px;
  border: 1px solid var(--line-2); background: var(--card); color: var(--text); cursor: pointer; font: 650 13px/1 var(--font);
}
.acct-btn:hover { background: var(--card-2); }
.acct-av {
  position: relative; display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; overflow: hidden;
  background: var(--accent-soft); color: var(--accent); font-weight: 800; font-size: 13px;
}
.acct-av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-chev { width: 14px; height: 14px; color: var(--text-3); }
.acct-btn[aria-expanded="true"] .acct-chev { transform: rotate(180deg); }
.acct-menu {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60; width: min(260px, calc(100vw - 24px));
  display: flex; flex-direction: column; padding: 6px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55); animation: menuIn .14s ease-out;
}
.acct-who { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; min-width: 0; }
.acct-who-name { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-who-mail { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.acct-mi {
  display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border: 0; border-radius: var(--r-sm);
  background: none; color: var(--text); cursor: pointer; text-align: left; font: 600 14px/1.2 var(--font);
}
.acct-mi:hover { background: var(--card-2); }
.acct-mi .icon { width: 17px; height: 17px; color: var(--text-2); }

/* ---------------------------------------------------------------- avisos globais */
/* fundo SÓLIDO: o conteúdo que rola por baixo do topo fixo não pode aparecer atrás do texto dos avisos */
.banners { display: flex; flex-direction: column; gap: 6px; padding: 8px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
.banners:empty { display: none; }
.banner { display: flex; align-items: flex-start; gap: 10px; padding: 8px 14px; border-radius: var(--r); font-size: 13px; }
.banner .icon { width: 17px; height: 17px; margin-top: 1px; }
.banner-warn { background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .3); color: #ffe2a8; }
.banner-info { background: rgba(120, 165, 255, .09); border: 1px solid rgba(120, 165, 255, .25); color: #d3e2ff; }

/* ---------------------------------------------------------------- layout */
.app { display: block; }
.side { padding: 12px 12px 0; }
.side-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-xl);
  display: flex; flex-direction: column; overflow: hidden;
}
.side-tabs { display: flex; gap: 18px; padding: 12px 16px 0; border-bottom: 1px solid var(--line); flex: none; }
.side-tab { font-weight: 700; font-size: 14px; padding: 2px 0 11px; border-bottom: 2px solid var(--text); margin-bottom: -1px; }
.side-scroll { display: flex; flex-direction: column; gap: 8px; padding: 10px; }
.stage { padding: 16px 12px 0; min-width: 0; outline: none; }

@media (min-width: 1024px) {
  .app { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr); align-items: start; }
  .side {
    position: sticky; top: var(--top-h);
    height: calc(100vh - var(--top-h)); height: calc(100dvh - var(--top-h));
    padding: 12px 0 12px 12px;
  }
  .side-card { height: 100%; }
  .side-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2c2d33 transparent; }
  .stage {
    padding: 14px 28px 0;
    min-height: calc(100vh - var(--top-h));
    background-image: radial-gradient(rgba(255, 255, 255, .045) 1px, transparent 1.3px);
    background-size: 18px 18px;
  }
}

/* ---------------------------------------------------------------- banner do modo */
.mode-banner {
  position: relative; flex: none; height: 116px; border-radius: var(--r); overflow: hidden;
  background:
    radial-gradient(120% 140% at 0% 100%, rgba(200, 255, 58, .2), transparent 55%),
    linear-gradient(135deg, #1b2810 0%, #131417 62%);
}
.mode-media { position: absolute; inset: 0; }
.mode-video { width: 100%; height: 100%; object-fit: cover; display: block; }
.mode-shade { position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 15%, rgba(0, 0, 0, .78)); }
.mode-copy { position: absolute; left: 12px; right: 12px; bottom: 10px; }
.mode-title {
  font-weight: 900; font-size: 19px; line-height: 1.1; letter-spacing: -.015em; text-transform: uppercase;
  color: var(--accent); text-shadow: 0 2px 14px rgba(0, 0, 0, .55); overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- avisos do painel */
.notice {
  flex: none; display: flex; align-items: center; gap: 10px;
  padding: 10px 8px 10px 12px; border-radius: var(--r); font-size: 12.5px; line-height: 1.4;
}
.notice > .icon { width: 18px; height: 18px; }
.notice-text { flex: 1; min-width: 0; }
.notice-ok { background: var(--accent-soft); border: 1px solid var(--accent-line); color: #ecffc4; }
.notice-ok > .icon { color: var(--accent); }
.notice-warn { background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .3); color: #ffe2a8; flex-wrap: wrap; padding-right: 12px; }
.notice-warn > .icon { color: var(--warn); }
.notice-warn .btn { margin-left: auto; }

.active-strip { flex: none; }
.active-btn {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 10px 12px; border-radius: var(--r); cursor: pointer; text-align: left;
  background: var(--card); border: 1px solid var(--accent-line);
}
.active-btn:hover { background: var(--card-2); }
.active-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); }
.active-txt strong { color: var(--text); font-size: 13px; }
.active-txt span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.active-go { font-weight: 750; color: var(--accent); font-size: 13px; }
.live-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none;
  box-shadow: 0 0 0 0 rgba(200, 255, 58, .6); animation: pulse 1.6s infinite;
}

/* ---------------------------------------------------------------- caixas tracejadas */
.drop {
  position: relative; flex: none;
  border: 1px dashed var(--dash); border-radius: var(--r);
  background: var(--card);
  transition: border-color .15s, background-color .15s;
}
.drop:not(.is-filled):hover { border-color: rgba(255, 255, 255, .3); background: #1e1f24; }
.drop.is-over { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }
.drop.is-filled { border-style: solid; border-color: var(--line-2); }
.drop.is-done { border-color: var(--accent-line); }
.drop.is-error { border-color: rgba(255, 107, 107, .5); }
.drop.is-nudge { animation: glow 1.1s ease 2; }
.drop-empty { display: flex; flex-direction: column; }
.drop-main {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  width: 100%; min-height: 138px; padding: 18px 14px;
  background: none; border: 0; border-radius: inherit; cursor: pointer; text-align: center;
}
.drop-icon {
  display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 8px; border-radius: 50%;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .13); color: var(--text);
}
.drop-icon .icon { width: 15px; height: 15px; }
.drop-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; }
.drop-sub { font-size: 12px; color: var(--text-3); }
.drop-cam {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; align-self: center;
  margin: -8px 0 12px; min-height: 36px; padding: 0 12px; border-radius: 999px;
  background: transparent; border: 1px solid var(--line-2); color: var(--text-2); font-size: 12.5px; cursor: pointer;
}
.drop-cam .icon { width: 15px; height: 15px; }
@media (hover: hover) and (pointer: fine) { .drop-cam:not(.drop-lib) { display: none; } }
/* arrastando um cartão da biblioteca: a caixa 1 se acende para mostrar onde soltar */
body.is-dragging-tpl #motion-box { border-color: var(--accent-line); background: rgba(200, 255, 58, .05); box-shadow: 0 0 0 3px rgba(200, 255, 58, .12); }
body.is-dragging-tpl #motion-box.is-over, #motion-box.is-over { border-color: var(--accent); border-style: dashed; background: var(--accent-soft); }

.pick { display: flex; align-items: stretch; gap: 10px; padding: 8px; }
.pick-media {
  position: relative; flex: none; width: 74px; aspect-ratio: 3 / 4; border-radius: var(--r-sm); overflow: hidden;
  background: #0e0f11; display: grid; place-items: center; color: var(--text-3);
}
.pick-media img, .pick-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }

/* MUDANÇA #3: vídeo parado (movimento reduzido / economia de dados) = pôster + o NOSSO botão de play (nunca controles nativos) */
.vstill { position: absolute; inset: 0; display: block; }
.vplay {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 2;
  display: grid; place-items: center; width: 40px; height: 40px; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(11, 12, 14, .62); border: 1px solid rgba(255, 255, 255, .28); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity .15s, background-color .15s;
}
.vplay:hover { background: rgba(11, 12, 14, .8); }
.vplay .icon { width: 17px; height: 17px; }
.vplay .icon use[href="#i-play"] { transform: translateX(1px); }
.vstill.is-playing .vplay { opacity: 0; }
.vstill.is-playing:hover .vplay, .vstill .vplay:focus-visible { opacity: 1; }
.pick-media .vplay { width: 32px; height: 32px; }
.pick-media .vplay .icon { width: 14px; height: 14px; }
.pick-ph { width: 26px; height: 26px; }
.pick-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.pick-label { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
/* origem do movimento: "Da biblioteca" / "Seu vídeo" */
.pick-origin { display: inline-flex; align-items: center; gap: 5px; align-self: flex-start; }
.pick-origin .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.pick-origin.is-own { color: var(--accent); }
.pick-title {
  font-size: 14px; font-weight: 750; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pick-meta { font-size: 12px; color: var(--text-2); }
.pick-status { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-2); }
.pick-status .icon { width: 14px; height: 14px; }
.pick-status.is-ok { color: var(--accent); }
.pick-status.is-err { color: var(--danger); }
.pick-actions { margin-top: auto; padding-top: 4px; display: flex; flex-wrap: wrap; gap: 6px; }

.progress { position: relative; height: 5px; margin: 3px 0; border-radius: 9px; background: var(--card-3); overflow: hidden; }
.progress-bar { display: block; height: 100%; width: 0; background: var(--accent); border-radius: inherit; transition: width .2s; }
.progress.is-indet .progress-bar { width: 40% !important; animation: indet 1.2s ease-in-out infinite; }

.framing { padding: 2px 8px 10px; }
.framing-q { margin-bottom: 6px; font-size: 12px; font-weight: 650; color: var(--text-2); }
.fchips { display: flex; gap: 6px; }
.fchip {
  position: relative; flex: 1; display: flex; align-items: center; justify-content: center;
  min-height: 36px; padding: 0 10px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--card-2); color: var(--text-2);
  font-size: 12.5px; font-weight: 650; text-align: center;
}
.fchip input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; pointer-events: none; }
.fchip:hover { color: var(--text); }
.fchip.is-on { background: var(--accent-soft); border-color: var(--accent); color: var(--text); }
.fchip:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }

.mismatch { margin: 0 8px 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .35); }
.mismatch-title { display: flex; align-items: center; gap: 6px; font-weight: 750; font-size: 13px; color: var(--warn); }
.mismatch-title .icon { width: 15px; height: 15px; }
.mismatch-text { margin: 4px 0 4px; font-size: 12px; color: var(--text-2); }

/* ---------------------------------------------------------------- linhas Modelo / Qualidade */
.opt { flex: none; }
.row {
  display: flex; align-items: center; gap: 10px; width: 100%;
  min-height: 54px; padding: 8px 12px 8px 14px; border-radius: var(--r);
  background: var(--card); border: 1px solid transparent; cursor: pointer; text-align: left;
  transition: background-color .15s, border-color .15s;
}
.row:hover { background: var(--card-2); }
.row[disabled] { cursor: not-allowed; opacity: .6; }
.row-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.row-k { font-size: 11.5px; font-weight: 600; color: var(--text-3); }
.row-v { font-size: 14px; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-aside { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; font-weight: 650; color: var(--text-2); white-space: nowrap; }
.row-aside.is-bad { color: var(--danger); }
.row-aside.is-cost { color: var(--warn); font-weight: 700; }
/* antes do vídeo de movimento: o preço de referência (um vídeo de 5 s), discreto */
.row-aside.is-ref { color: var(--text-2); font-weight: 650; }
.row-warn { display: inline-flex; color: var(--warn); }
.row-warn .icon { width: 15px; height: 15px; }
.row-chev { width: 16px; height: 16px; color: var(--text-3); transition: transform .15s; }
.opt.is-open .row { background: var(--card-2); border-color: var(--line-2); }
.opt.is-open .row-chev { transform: rotate(90deg); }

.menu {
  margin-top: 6px; padding: 6px; display: flex; flex-direction: column; gap: 3px;
  background: #101114; border: 1px solid var(--line-2); border-radius: var(--r);
  box-shadow: 0 18px 44px rgba(0, 0, 0, .45);
  animation: menuIn .14s ease;
}
.mitem {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  padding: 10px; border-radius: var(--r-sm); border: 1px solid transparent;
  background: transparent; text-align: left; cursor: pointer;
}
.mitem:hover { background: var(--card-2); }
.mitem.is-on { background: var(--card-2); border-color: var(--accent-line); }
.mitem[disabled] { opacity: .5; cursor: not-allowed; }
.mitem[disabled]:hover { background: transparent; }
.mitem-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mitem-top { display: flex; align-items: flex-start; gap: 6px; }
.mitem-title { font-weight: 750; font-size: 13.5px; line-height: 1.3; }
.mitem-sub { font-size: 12px; color: var(--text-2); line-height: 1.35; }
.mitem-meta, .mitem-warn { display: flex; align-items: center; gap: 4px; font-size: 11.5px; color: var(--text-3); }
.mitem-meta .icon, .mitem-warn .icon { width: 12px; height: 12px; }
.mitem-warn { color: var(--warn); }
.mitem-reason { font-size: 11.5px; color: var(--danger); }
.mitem-need { font-size: 11.5px; color: var(--text-2); }
/* o nome do modelo QUEBRA linha (nunca "Trocar pessoa · SC…"): o preço fica no alto, à direita */
.mitem-title { min-width: 0; overflow-wrap: anywhere; }
.mitem-price { margin-left: auto; padding-left: 6px; font-size: 12.5px; line-height: 1.4; font-weight: 800; color: var(--accent); white-space: nowrap; }
.mitem-check { margin-top: -1px; }
/* só no PC do dono: "custo R$ 1,90 · preço R$ 4,00" */
.mitem-cost { font-size: 11.5px; font-weight: 700; color: var(--warn); }
.mitem-check { display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); flex: none; }
.mitem-title + .mitem-check { margin-left: auto; }
.mitem-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 1px 0 2px; }
.mitem-range { font-size: 12.5px; font-weight: 800; color: var(--accent); white-space: nowrap; }
.mitem-check .icon { width: 12px; height: 12px; stroke-width: 3; }
.menu-note { padding: 6px 8px 4px; font-size: 11.5px; color: var(--text-3); }
.tag {
  display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 5px;
  background: var(--accent-soft); color: var(--accent); font-size: 10.5px; font-weight: 800;
}

/* ---------------------------------------------------------------- preço em tokens: [moeda] 11 tokens */
/* o ícone é do nosso design (moeda com faísca); o texto herda a cor do lugar onde está */
.tok { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; vertical-align: -.16em; }
.tok-icon { width: 1.08em; height: 1.08em; flex: none; stroke-width: 2; color: var(--accent); }
.tok-n { line-height: 1; }
.row-v .tok { vertical-align: -.12em; }

/* ---------------------------------------------------------------- "foto extra (opcional)" (v10 §7.5: item discreto, sem caixa) */
.refs { flex: none; border-radius: var(--r); }
.refs.is-filled { background: var(--card); border: 1px solid var(--line-2); }
.refs.is-error { border-color: rgba(255, 107, 107, .45); }
.refs.is-over { outline: 1px dashed var(--accent-line); outline-offset: 2px; }
.refs-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 0; }
.refs-count { font-size: 11.5px; font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.refs-grid { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 12px; padding: 0 2px; }
.refs.is-filled .refs-grid { padding: 10px; }
.refs-list { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none; }
.refs-list:empty { display: none; }
.ref { position: relative; flex: none; width: 58px; height: 58px; border-radius: var(--r-sm); background: #0e0f11; }
.ref-media {
  position: absolute; inset: 0; display: grid; place-items: center; overflow: hidden;
  border-radius: inherit; color: var(--text-3);
}
.ref-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ref-media .icon { width: 20px; height: 20px; }
/* como a referência é citada na instrução (@image_2…): canto de baixo, some durante o envio (a barra de progresso fica ali) */
.ref-tag {
  position: absolute; left: 3px; bottom: 3px; max-width: calc(100% - 6px); padding: 1px 4px; border-radius: 4px;
  background: rgba(11, 12, 14, .8); color: #fff; font-size: 9.5px; font-weight: 700; line-height: 1.35;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none;
}
.ref.is-uploading .ref-tag, .ref.is-over .ref-tag { display: none; }
.ref.is-uploading .ref-media img { opacity: .55; }
.ref.is-error::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--danger); pointer-events: none; }
.ref.is-error .ref-media img { opacity: .4; }
/* modelo com menos vagas que as imagens adicionadas: as que ficam de fora aparecem apagadas */
.ref.is-over .ref-media { filter: grayscale(1); opacity: .35; }
.ref-prog { position: absolute; left: 6px; right: 6px; bottom: 6px; height: 4px; border-radius: 9px; background: rgba(0, 0, 0, .6); overflow: hidden; }
.ref-bar { display: block; height: 100%; width: 0; border-radius: inherit; background: var(--accent); transition: width .2s; }
.ref-prog.is-indet .ref-bar { width: 40% !important; animation: indet 1.2s ease-in-out infinite; }
.ref-bad { position: absolute; inset: 0; display: grid; place-items: center; color: var(--danger); pointer-events: none; }
.ref-bad .icon { width: 18px; height: 18px; }
.ref-retry {
  position: absolute; inset: 0; z-index: 1; margin: auto; display: grid; place-items: center;
  width: 32px; height: 32px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .25);
  background: rgba(11, 12, 14, .75); color: #fff; cursor: pointer;
}
.ref-retry .icon { width: 15px; height: 15px; }
.ref-x {
  position: absolute; top: -7px; right: -7px; z-index: 2; display: grid; place-items: center;
  width: 22px; height: 22px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .2); background: #2a2b31; color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.ref-x::before { content: ""; position: absolute; inset: -11px; border-radius: 50%; } /* área de toque de 44 px */
.ref-x:hover { background: #3a3b42; }
.ref-x .icon { width: 12px; height: 12px; stroke-width: 2.4; }
/* sem fotos extras: só uma linha discreta "+ foto extra (opcional)" */
.refs-add {
  position: relative; display: inline-flex; align-items: center; gap: 8px; flex: 0 1 auto; min-height: 36px; padding: 4px 6px;
  border: 0; border-radius: var(--r-sm); background: none; color: var(--text-2); cursor: pointer; text-align: left;
}
.refs-add:hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.refs-add-icon {
  display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(255, 255, 255, .06); border: 1px solid rgba(255, 255, 255, .12);
}
.refs-add-icon .icon { width: 12px; height: 12px; stroke-width: 2.2; }
.refs-add-txt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.refs-add-title { font-weight: 600; font-size: 12.5px; line-height: 1.3; }
/* com miniaturas: o botão vira um quadrado tracejado com "+" ao lado delas */
.refs-add.is-tile { flex: none; width: 58px; height: 58px; min-height: 0; padding: 0; justify-content: center; border: 1px dashed var(--dash); color: var(--text); }
.refs-add.is-tile .refs-add-icon { width: 32px; height: 32px; }
.refs-add.is-tile:hover { border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .04); }
.refs-add.is-tile .refs-add-txt { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.refs-note { padding: 0 10px 10px; font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
.refs:not(.is-filled) .refs-note { padding: 2px 6px 4px; }

/* ---------------------------------------------------------------- v10 §0: "Quem trocar no vídeo? (opcional)" */
.target { flex: none; display: flex; flex-direction: column; gap: 6px; padding: 10px 12px 12px; border-radius: var(--r); background: var(--card); }
.target-label { font-weight: 650; font-size: 13px; color: var(--text); }
.target-opt { font-weight: 500; color: var(--text-3); }
.target-input { height: 42px; font-size: 14px; }
.target-input[aria-invalid="true"] { border-color: var(--danger); }
.target .field-error { font-size: 12px; }
.refs-note.is-err { color: var(--danger); }

/* ---------------------------------------------------------------- caixa 2 (v6): PERSONAGEM (avatares, painel de fotos, foto avulsa) */
.char-box { display: flex; flex-direction: column; }
.char-box.is-chars { border-style: solid; border-color: var(--line-2); }
.char-box.is-chars.is-done { border-color: var(--accent-line); }
.char-head { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px 0; }
.char-sub { font-size: 12px; line-height: 1.35; color: var(--text-3); overflow-wrap: anywhere; }
.char-block { display: flex; flex-direction: column; gap: 8px; padding: 10px 10px 8px; }
.char-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); gap: 10px 4px; }
.char { position: relative; min-width: 0; }
.char-tile {
  display: flex; flex-direction: column; align-items: center; gap: 5px; width: 100%; min-width: 0; min-height: 44px;
  padding: 4px 2px 2px; background: none; border: 0; border-radius: var(--r-sm); color: var(--text-2); cursor: pointer; font: inherit;
}
.char-tile:hover { color: var(--text); }
.char-av {
  position: relative; display: grid; place-items: center; flex: none; width: 52px; height: 52px; border-radius: 50%;
  background: #0e0f11; border: 2px solid var(--line-2); color: var(--text-3);
}
.char-av img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.char-av .pick-ph { width: 22px; height: 22px; }
.char-ini { font-size: 20px; font-weight: 800; line-height: 1; color: var(--text); }
.char-av-new { border: 1.5px dashed rgba(255, 255, 255, .3); background: transparent; color: var(--text); }
.char-av-new .icon { width: 20px; height: 20px; stroke-width: 2; }
.char-new:hover .char-av-new { border-color: var(--accent); color: var(--accent); }
.char-new.is-off { opacity: .55; }
.char.is-on .char-av { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.char.is-on .char-tile { color: var(--text); }
.char-check {
  position: absolute; right: -4px; bottom: -4px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); border: 2px solid var(--card);
}
.char-check .icon { width: 10px; height: 10px; stroke-width: 3.2; }
.char-check.is-bad { background: var(--warn); }
.char-name {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; max-width: 100%;
  font-size: 11.5px; font-weight: 650; line-height: 1.25; text-align: center; overflow-wrap: anywhere;
}
.char-more {
  position: absolute; top: -2px; right: 0; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; padding: 0;
  border-radius: 50%; cursor: pointer; border: 1px solid rgba(255, 255, 255, .18); background: #2a2b31; color: var(--text);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .45);
}
.char-more::before { content: ""; position: absolute; inset: -10px; border-radius: 50%; } /* área de toque de 44 px */
.char-more:hover, .char.is-open .char-more { background: #3a3b42; }
.char-more .icon { width: 14px; height: 14px; }
.char-note { font-size: 12px; line-height: 1.4; color: var(--text-3); overflow-wrap: anywhere; }
.char-note.is-err { color: var(--danger); }
.char-note .linkbtn { padding: 2px; }
.char-menu {
  display: flex; flex-direction: column; gap: 2px; padding: 6px; border-radius: var(--r); background: #101114; border: 1px solid var(--line-2);
  animation: menuIn .14s ease;
}
.char-menu-title { padding: 4px 8px 6px; font-size: 12px; font-weight: 750; color: var(--text-3); overflow-wrap: anywhere; }
.char-menu-text { padding: 6px 8px; font-size: 12.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.char-menu-actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 2px 6px 4px; }
.char-mi {
  display: flex; align-items: center; gap: 10px; width: 100%; min-height: 40px; padding: 0 10px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--text); font: 650 13.5px/1.2 var(--font); text-align: left; cursor: pointer;
}
.char-mi:hover { background: var(--card-2); }
.char-mi .icon { width: 16px; height: 16px; color: var(--text-2); }
.char-mi.is-danger, .char-mi.is-danger .icon { color: var(--danger); }
.btn-danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(255, 107, 107, .4); }
.btn-danger:hover { background: rgba(255, 107, 107, .2); }
.char-menu .btn[disabled] { opacity: .55; cursor: progress; }

.char-picked { display: flex; flex-direction: column; gap: 8px; }
.cp-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 10px; }
.cp-name { display: flex; flex-direction: column; min-width: 0; flex: 1 1 120px; }
.cp-k { font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.cp-v { font-size: 14px; font-weight: 750; line-height: 1.25; overflow-wrap: anywhere; }
.cp-list { padding: 0; gap: 10px; }
.cp-photo .ref-tag { font-size: 9px; }
.cp-note { font-size: 11.5px; line-height: 1.4; color: var(--text-3); overflow-wrap: anywhere; }
.cp-warn, .ce-warn {
  display: flex; align-items: flex-start; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .3); font-size: 11.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere;
}
.cp-warn .icon, .ce-warn .icon { flex: none; width: 14px; height: 14px; margin-top: 1px; color: var(--warn); }
.cp-warn span, .ce-warn span { min-width: 0; }

/* v11: VÁRIAS pessoas no mesmo vídeo (até 3): selo 1/2/3 no avatar, lista com "×", "+ Trocar mais uma pessoa", um "quem trocar" por pessoa */
.char-num { font-size: 10.5px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.char-row.is-adding .char:not(.is-on) .char-av { border-style: dashed; border-color: var(--accent); }
.cp-team { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; list-style: none; }
.cp-person {
  display: flex; align-items: center; gap: 8px; min-width: 0; padding: 4px 4px 4px 6px; border-radius: var(--r-sm);
  background: var(--card-2); border: 1px solid var(--line-2);
}
.cp-num {
  display: grid; place-items: center; flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 850; line-height: 1;
}
.cp-av { position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; background: #0e0f11; }
.cp-av img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.cp-av .char-ini { font-size: 14px; }
.cp-pname { flex: 1 1 auto; min-width: 0; font-size: 13.5px; font-weight: 700; line-height: 1.25; overflow-wrap: anywhere; }
.cp-x {
  position: relative; display: grid; place-items: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
  background: transparent; color: var(--text-2); cursor: pointer;
}
.cp-x::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; } /* área de toque de 44 px */
.cp-x:hover { background: var(--card); color: var(--text); }
.cp-x .icon { width: 14px; height: 14px; }
.cp-add { display: inline-flex; align-items: center; gap: 6px; align-self: flex-start; max-width: 100%; min-height: 36px; white-space: normal; text-align: left; }
.cp-add .icon { flex: none; width: 14px; height: 14px; }
.cp-adding {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; border-radius: var(--r-sm);
  background: var(--accent-soft); font-size: 12.5px; line-height: 1.4; color: var(--text); overflow-wrap: anywhere;
}
.cp-adding .icon { flex: none; width: 14px; height: 14px; color: var(--accent); }
.cp-adding span { flex: 1 1 160px; min-width: 0; }
.target-multi { display: flex; flex-direction: column; gap: 10px; }
.target-person { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.target-person .target-label { display: flex; align-items: center; gap: 6px; min-width: 0; overflow-wrap: anywhere; }
.target-num {
  display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 850; line-height: 1;
}

.char-editor { display: flex; flex-direction: column; gap: 8px; }
.ce-title { font-size: 14px; font-weight: 800; }
.ce-label { font-size: 12px; font-weight: 650; color: var(--text-2); }
.ce-photos-label { display: flex; align-items: center; justify-content: space-between; margin-top: 2px; }
.ce-count { font-weight: 700; color: var(--text-3); font-variant-numeric: tabular-nums; }
.ce-name { height: 42px; font-size: 14px; }
.ce-slots { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 8px; margin: 0; padding: 0; list-style: none; }
.ce-slot { display: flex; align-items: center; gap: 8px; min-width: 0; }
.ce-thumb, .ce-add { position: relative; flex: none; width: 56px; height: 56px; border-radius: var(--r-sm); background: #0e0f11; }
.ce-add {
  display: grid; place-items: center; padding: 0; border: 1px dashed var(--dash); color: var(--text-2); cursor: pointer;
}
.ce-add:hover { border-color: rgba(255, 255, 255, .4); color: var(--text); }
.ce-add.is-next { border-color: var(--accent-line); color: var(--accent); }
.ce-add .icon { width: 18px; height: 18px; stroke-width: 2.2; }
.ce-hint { display: flex; flex-direction: column; gap: 1px; min-width: 0; font-size: 11.5px; line-height: 1.3; color: var(--text-2); overflow-wrap: anywhere; }
.ce-n { font-size: 10px; font-weight: 800; color: var(--text-3); }
.ce-slot.is-empty .ce-hint { color: var(--text-3); }
.ce-slot.is-uploading .ref-media img { opacity: .55; }
.ce-slot.is-error .ce-thumb::after { content: ""; position: absolute; inset: 0; border-radius: inherit; border: 1.5px solid var(--danger); pointer-events: none; }
.ce-slot.is-error .ref-media img { opacity: .4; }
.ce-rule { display: flex; align-items: flex-start; gap: 6px; font-size: 11.5px; line-height: 1.4; color: var(--text-2); overflow-wrap: anywhere; }
.ce-rule .icon { flex: none; width: 13px; height: 13px; margin-top: 1.5px; color: var(--accent); }
.ce-rule span { min-width: 0; }
.ce-error { font-size: 12.5px; line-height: 1.4; color: var(--danger); overflow-wrap: anywhere; }
.ce-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.ce-actions .btn[aria-disabled="true"] { opacity: .6; cursor: progress; }

/* a foto avulsa vira o "plano B" quando há personagens: caixa tracejada menor, dentro da caixa do personagem */
.char-quick { display: flex; flex-direction: column; min-width: 0; }
.char-box.is-chars .char-quick { margin: 0 10px 10px; border: 1px dashed var(--dash); border-radius: var(--r-sm); }
.char-box.is-chars .char-quick.is-filled { border-style: solid; border-color: var(--line-2); }
.char-box.is-chars .drop-main { min-height: 92px; padding: 12px 10px; }
.char-box.is-chars .drop-icon { margin-bottom: 4px; }
.char-box.is-chars .drop-cam { margin: -4px 0 10px; }
.row-hint { font-size: 11.5px; line-height: 1.3; font-weight: 500; color: var(--text-3); overflow-wrap: anywhere; }

/* ---------------------------------------------------------------- linha "Instruções" (rótulo + interruptor, como na referência) */
.prompt { border-radius: var(--r); background: var(--card); border: 1px solid transparent; transition: border-color .15s; }
.prompt.is-on { border-color: var(--line-2); }
.prompt.is-required.is-on { border-color: var(--accent-line); }
.prompt .prow { min-height: 48px; background: transparent; }
.prompt .prow:hover { background: rgba(255, 255, 255, .03); }
.prow-k { font-size: 14px; font-weight: 750; }
.prow-opt { font-weight: 500; color: var(--text-3); }
.prow-req { flex: none; }
.row.prow[disabled] { cursor: default; opacity: 1; }
.row.prow[disabled]:hover { background: transparent; }
.switch { position: relative; flex: none; width: 34px; height: 20px; border-radius: 999px; background: #3a3b42; transition: background-color .15s; }
.switch-knob {
  position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: #d9dbe0; transition: transform .15s, background-color .15s;
}
.prow[aria-checked="true"] .switch { background: var(--accent); }
.prow[aria-checked="true"] .switch-knob { transform: translateX(14px); background: var(--accent-ink); }
.prompt-body { display: flex; flex-direction: column; gap: 8px; padding: 0 10px 10px; }
textarea.prompt-input { min-height: 150px; max-height: 46vh; font-size: 13px; line-height: 1.5; }
.prompt-foot { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; margin-top: -2px; }
.prompt-hint { font-size: 11.5px; line-height: 1.4; color: var(--text-3); }
/* modelos com várias imagens: como citar cada uma no texto (@image_1 = a foto do boneco) */
.prompt-refs { margin: -4px 0 0; font-size: 11.5px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.prompt-counter { flex: none; font-size: 11.5px; line-height: 1.4; color: var(--text-3); font-variant-numeric: tabular-nums; }
.prompt-count.is-near { color: var(--warn); }
.prompt-count.is-full { color: var(--danger); font-weight: 700; }
.prompt-warn {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; padding: 6px 10px; border-radius: var(--r-sm);
  background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .3); font-size: 12px; line-height: 1.4; color: #ffe2a8;
}
.prompt-warn-text:empty { display: none; }
.prompt-next { color: var(--warn); text-decoration-color: rgba(255, 191, 77, .45); }
/* sem "[describe…]" pendente, mas ainda com campos entre colchetes: só o atalho, sem a caixa de aviso */
.prompt-warn.is-quiet { padding: 0; background: none; border: 0; }
.prompt-warn.is-quiet .prompt-next { color: var(--text-2); text-decoration-color: rgba(255, 255, 255, .25); }
.prompt-tpl { align-self: flex-start; }
.prompt-tpl .icon { width: 14px; height: 14px; }
.prompt-tpl.is-armed { background: var(--warn-soft); border-color: rgba(255, 191, 77, .45); color: var(--warn); }

/* ---------------------------------------------------------------- declaração */
.consent { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px; padding: 2px 4px 0; }
.check { position: relative; display: inline-flex; align-items: center; gap: 9px; min-height: 38px; cursor: pointer; font-size: 12.5px; color: var(--text-2); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.check-box {
  display: grid; place-items: center; flex: none; width: 18px; height: 18px; border-radius: 5px;
  border: 1.5px solid rgba(255, 255, 255, .32); background: transparent; transition: background-color .12s, border-color .12s;
}
.check-box .icon { width: 12px; height: 12px; stroke-width: 3; color: var(--accent-ink); opacity: 0; }
.check input:checked + .check-box { background: var(--accent); border-color: var(--accent); }
.check input:checked + .check-box .icon { opacity: 1; }
.check input:focus-visible + .check-box { outline: 2px solid var(--accent); outline-offset: 2px; }
.check:hover .check-box { border-color: rgba(255, 255, 255, .55); }
.check-text { line-height: 1.3; }
.check-sm { min-height: 32px; font-size: 12px; color: var(--text); }
.consent-full {
  flex-basis: 100%; margin: 4px 0 2px; padding: 10px 12px; border-radius: var(--r-sm);
  background: var(--card); font-size: 12px; line-height: 1.5; color: var(--text-2);
}
.consent-links { margin-top: 8px; }
.consent-links a { color: var(--text); }

/* ---------------------------------------------------------------- botão Gerar */
.gen { flex: none; padding: 10px; border-top: 1px solid var(--line); background: var(--panel); }
.gen-hint { margin: 0 2px 8px; min-height: 1.35em; font-size: 12px; line-height: 1.35; color: var(--text-3); }
.gen-hint.is-nudge { animation: shake .45s; color: var(--warn); }
.form-error { margin: 0 2px 8px; font-size: 12.5px; color: var(--danger); }
.gen-btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 46px; border: 0; border-radius: var(--r); cursor: pointer;
  background: #26272c; color: #80838b; font: 750 15px/1 var(--font);
  transition: background-color .15s, color .15s, box-shadow .2s, transform .08s;
}
.gen-btn:hover { background: #2c2d33; }
.gen-btn:active { transform: scale(.99); }
.gen-btn.is-ready { background: var(--accent); color: var(--accent-ink); box-shadow: 0 10px 34px rgba(200, 255, 58, .2); }
.gen-btn.is-ready:hover { background: var(--accent-hover); }
.gen-btn.is-buy { background: var(--text); color: #0b0c0e; }
.gen-btn.is-buy:hover { background: #fff; }
.gen-btn.is-busy { cursor: progress; }
/* "Gerar · [moeda] 11 tokens" */
.gen-price { display: inline-flex; align-items: center; gap: 8px; }
.gen-dot { opacity: .65; }
.gen-btn .tok-icon { color: currentColor; stroke-width: 2.2; }

/* ---------------------------------------------------------------- abas da área principal */
.tabs {
  display: flex; align-items: center; gap: 4px; margin: 0 0 6px;
  overflow-x: auto; scrollbar-width: none;
}
.tabs::-webkit-scrollbar { display: none; }
.tab {
  display: inline-flex; align-items: center; gap: 7px; flex: none;
  height: 34px; padding: 0 12px; border-radius: 9px; border: 1px solid transparent;
  background: transparent; color: var(--text-2); font: 600 13px/1 var(--font); cursor: pointer; white-space: nowrap;
}
.tab .icon { width: 15px; height: 15px; }
.tab:hover { color: var(--text); }
.tab.is-on { background: var(--card); border-color: var(--line-2); color: var(--text); }
.tab-count {
  display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800;
}

.boot { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; padding: 90px 16px; color: var(--text-2); text-align: center; }
.boot.is-error { color: var(--text); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--card-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.boot.is-error .spinner { display: none; }

/* ---------------------------------------------------------------- destaque do topo (hero) */
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, min(440px, 44%)); align-items: center; gap: 36px; padding: 30px 0 34px; }
.hero-title { margin: 0; font-weight: 900; font-size: clamp(30px, 3.1vw, 42px); line-height: .96; letter-spacing: -.025em; text-transform: uppercase; }
.hero-sub { margin-top: 14px; max-width: 470px; font-size: 14.5px; line-height: 1.5; color: var(--text-2); }
.hero-media {
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 4px;
  aspect-ratio: 16 / 9; border-radius: var(--r-lg); overflow: hidden;
  background: linear-gradient(135deg, #1a2410, #15161a 60%);
}
.hero-tile { position: relative; overflow: hidden; background: #111215; }
.hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 1023px) { .hero { display: none; } }

/* ---------------------------------------------------------------- biblioteca: pílulas, filtros, grade */
.lib-bar { display: flex; justify-content: center; margin: 4px 0 14px; }
.seg {
  display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px;
  border: 1px solid var(--line-2); background: rgba(15, 16, 19, .85);
}
.seg-btn {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 14px; border-radius: 999px;
  border: 0; background: transparent; color: var(--text-2); font: 650 13px/1 var(--font); cursor: pointer; white-space: nowrap;
  transition: background-color .15s, color .15s;
}
.seg-btn .icon { width: 14px; height: 14px; }
.seg-btn:hover { color: var(--text); }
.seg-btn.is-on { background: #fff; color: #0b0c0e; }

.lib-tools { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; }
.chips { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.chips::-webkit-scrollbar { display: none; }
.cat {
  flex: none; height: 30px; padding: 0 12px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-2); background: transparent; color: var(--text-2); font: 600 12.5px/1 var(--font);
}
.cat:hover { color: var(--text); }
.cat.is-on { background: var(--card-2); border-color: rgba(255, 255, 255, .26); color: var(--text); }
.search {
  display: flex; align-items: center; gap: 6px; flex: none; width: 230px; height: 34px; padding: 0 12px;
  border-radius: 999px; border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text-3); margin-left: auto;
}
.search .icon { width: 15px; height: 15px; }
.search input { flex: 1; min-width: 0; height: 100%; background: none; border: 0; outline: none; color: var(--text); font: 13px var(--font); }
.search input::placeholder { color: var(--text-3); }
.search:focus-within { border-color: rgba(255, 255, 255, .35); }

.masonry {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 2px; grid-auto-flow: row dense; column-gap: 10px; row-gap: 0;
}
@media (max-width: 1023px) { .masonry { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 8px; } }

.tcard { position: relative; align-self: start; border-radius: 10px; background: var(--card); }
.tcard.skeleton {
  align-self: stretch; margin-bottom: 10px;
  background: linear-gradient(100deg, #16171a 30%, #1f2025 50%, #16171a 70%); background-size: 220% 100%;
  animation: shimmer 1.5s linear infinite;
}
.tcard-btn {
  position: relative; display: block; width: 100%; padding: 0; border: 0; border-radius: inherit;
  background: none; cursor: pointer; overflow: hidden; text-align: left;
}
.tcard-btn:focus-visible { outline: none; }
.tcard-btn:focus-visible::after { content: ""; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 2px #fff; }
.tcard-media { position: relative; display: block; width: 100%; aspect-ratio: 9 / 16; background: #15161a; }
.tcard-media img, .tcard-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.tcard-video { opacity: 0; transition: opacity .25s; }
.tcard.is-playing .tcard-video { opacity: 1; }
.tcard-ph { position: absolute; inset: 0; display: grid; place-items: center; color: var(--text-3); }
.tcard-ph .icon { width: 28px; height: 28px; }
.tcard-shade { position: absolute; inset: 0; background: linear-gradient(180deg, transparent 50%, rgba(0, 0, 0, .78)); opacity: 0; transition: opacity .2s; }
.tcard-over {
  position: absolute; left: 10px; right: 10px; bottom: 10px;
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  opacity: 0; transform: translateY(6px); transition: opacity .2s, transform .2s;
}
.tcard-title { font-weight: 750; font-size: 13px; line-height: 1.25; text-shadow: 0 1px 10px rgba(0, 0, 0, .7); }
.tcard-use {
  display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 12.5px; white-space: nowrap;
}
.tcard-use .icon { width: 14px; height: 14px; stroke-width: 2.4; }
.tcard-dur {
  position: absolute; left: 8px; top: 8px; padding: 2px 7px; border-radius: 6px;
  background: rgba(0, 0, 0, .55); font-size: 11px; font-weight: 700; opacity: 0; transition: opacity .2s;
}
/* vídeo de demonstração (seed, sem pessoa): selo discreto; some quando o cartão mostra título e "Usar este movimento" */
.tcard-demo {
  position: absolute; left: 8px; bottom: 8px; padding: 2px 7px; border-radius: 6px; pointer-events: none;
  background: rgba(0, 0, 0, .6); color: var(--text-2); font-size: 10px; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; transition: opacity .2s;
}
@media (hover: hover) { .tcard-btn:hover .tcard-demo { opacity: 0; } }
.tcard-btn:focus-visible .tcard-demo { opacity: 0; }
.tcard-check {
  position: absolute; top: 8px; right: 8px; display: grid; place-items: center;
  width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: var(--accent-ink);
  opacity: 0; transform: scale(.6); transition: opacity .2s, transform .2s;
}
.tcard-check .icon { width: 15px; height: 15px; stroke-width: 3; }
@media (hover: hover) {
  .tcard-btn:hover .tcard-shade, .tcard-btn:hover .tcard-over, .tcard-btn:hover .tcard-dur { opacity: 1; transform: none; }
}
.tcard-btn:focus-visible .tcard-shade, .tcard-btn:focus-visible .tcard-over, .tcard-btn:focus-visible .tcard-dur { opacity: 1; transform: none; }
.tcard.is-selected { outline: 2px solid var(--accent); outline-offset: 2px; }
.tcard.is-selected .tcard-check { opacity: 1; transform: none; }
.tcard.is-selected .tcard-use-txt::after { content: " (escolhido)"; }

/* v6.1: botão de SOM das prévias (alto-falante). As prévias tocam mudas; o som só liga por um clique (política de autoplay). */
.vsnd {
  display: grid; place-items: center; width: 34px; height: 34px; padding: 0; border-radius: 50%; cursor: pointer;
  background: rgba(11, 12, 14, .68); border: 1px solid rgba(255, 255, 255, .32); color: #fff;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: opacity .15s, background-color .15s;
}
.vsnd .icon { width: 17px; height: 17px; }
.vsnd:hover { background: rgba(11, 12, 14, .88); }
.vsnd.is-on, .vsnd.is-on:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.vsnd:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
/* no cartão: canto de cima à direita; aparece com o mouse em cima (ou foco de teclado) e fica sempre visível no toque */
.tcard-snd { position: absolute; top: 8px; right: 8px; z-index: 3; opacity: 0; pointer-events: none; }
.tcard:hover .tcard-snd, .tcard:focus-within .tcard-snd, .tcard.is-sound .tcard-snd { opacity: 1; pointer-events: auto; }
.tcard.has-snd .tcard-check { right: 50px; } /* o "escolhido" fica ao lado do botão de som */
@media (hover: none), (pointer: coarse) {
  .tcard-snd { opacity: 1; pointer-events: auto; width: 40px; height: 40px; }
  .tcard.has-snd .tcard-check { right: 56px; }
}
/* na caixa 1: botão pequeno com texto, ao lado de "Trocar" */
.vsnd-inline {
  width: auto; height: 30px; padding: 0 12px; border-radius: 999px; gap: 6px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .1); -webkit-backdrop-filter: none; backdrop-filter: none;
  font: 650 12.5px/1 var(--font);
}
.vsnd-inline:hover { background: rgba(255, 255, 255, .14); }
.vsnd-inline .icon { width: 15px; height: 15px; }

.lib-state { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 56px 16px; text-align: center; color: var(--text-2); }
.lib-state-icon {
  display: grid; place-items: center; width: 50px; height: 50px; margin-bottom: 6px; border-radius: 50%;
  background: var(--card); border: 1px solid var(--line-2); color: var(--text);
}
.lib-state-title { font-weight: 800; font-size: 16px; color: var(--text); }
.lib-state p { max-width: 440px; }
.lib-state .btn { margin-top: 10px; }
.owner-hint { margin-top: 8px; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); color: var(--warn); font-size: 12.5px; }
.lib-more { position: relative; display: flex; justify-content: center; padding: 22px 0 6px; }
.lib-sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; }

/* ---------------------------------------------------------------- Meus vídeos */
.panel { outline: none; }
.panel-head { display: flex; align-items: center; gap: 10px; margin: 10px 0 16px; }
.panel-title { flex: 1; margin: 0; font-weight: 900; font-size: 24px; line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.jobs-back { display: none; }
.sub-title { margin: 8px 0 12px; font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.job-panel { outline: none; }

.jobcard { margin-bottom: 26px; padding: 16px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.job-head { display: flex; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.job-head-txt { min-width: 0; }
.job-title {
  margin: 0; font-size: 18px; font-weight: 800; line-height: 1.2; outline: none; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.job-sub { margin-top: 3px; font-size: 13px; color: var(--text-2); }
.jobcard-body { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 22px; align-items: start; }
.jobcard-result .jobcard-body { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.jobcard-info { min-width: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 6px; flex: none;
  height: 26px; padding: 0 10px; border-radius: 999px; background: var(--card-2); font-size: 12px; font-weight: 750; white-space: nowrap;
}
.chip .icon { width: 14px; height: 14px; }
.chip-live { background: var(--accent-soft); color: var(--accent); }
.chip-ok { background: var(--accent); color: var(--accent-ink); }
.chip-ok .icon { stroke-width: 2.6; }
.chip-err { background: var(--danger-soft); color: var(--danger); }

.jmedia { display: flex; align-items: center; gap: 10px; }
.jm { flex: 1; min-width: 0; margin: 0; }
.jm-media {
  position: relative; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden;
  background: var(--card); display: grid; place-items: center; color: var(--text-3);
}
.jm-media img, .jm-media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.jm figcaption { margin-top: 6px; text-align: center; font-size: 12px; color: var(--text-3); }
.jm-plus { font-size: 22px; font-weight: 300; color: var(--text-3); }

.job-eta { margin-bottom: 12px; font-weight: 900; font-size: 30px; line-height: 1.05; letter-spacing: -.02em; }
.job-eta.is-soft { font-size: 20px; color: var(--warn); }
.meter { position: relative; height: 8px; border-radius: 99px; background: var(--card-2); overflow: hidden; }
.meter-bar { display: block; height: 100%; width: 4%; border-radius: inherit; background: var(--accent); transition: width .8s ease; }
.meter.is-indet .meter-bar { width: 30% !important; animation: indet 1.4s ease-in-out infinite; }
.job-stage { margin: 10px 0 12px; color: var(--text-2); }
.stats { display: flex; flex-wrap: wrap; gap: 10px; }
.stat { min-width: 96px; padding: 8px 12px; border-radius: var(--r-sm); background: var(--card); }
.stat-k { display: block; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); }
.stat-v { font-weight: 800; font-size: 16px; }
.job-note { margin-top: 12px; font-size: 12.5px; color: var(--text-3); }
.conn-note { margin-top: 10px; font-size: 12.5px; color: var(--warn); }
.slow { display: flex; gap: 10px; margin: 14px 0 0; padding: 12px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .3); }
.slow > .icon { color: var(--warn); margin-top: 1px; }
.slow-title { font-weight: 750; color: var(--warn); margin-bottom: 4px; }
.slow-body p { font-size: 12.5px; color: var(--text-2); }
.slow .actions { margin: 10px 0 0; }
.job-error { margin: 0 0 6px; color: var(--text); font-size: 15px; }

.player { position: relative; border-radius: var(--r); overflow: hidden; background: #000; display: grid; place-items: center; min-height: 160px; }
.player-empty { background: var(--card); padding: 30px 16px; }
.result-video { display: block; width: 100%; max-height: 74vh; background: #000; }
.player-msg { padding: 16px; text-align: center; color: var(--text-2); }
/* v5: "Ativar som" sobre o vídeo gerado (ele toca sozinho MUDO; o resultado tem o áudio original). No canto de cima: os controles
   nativos ficam embaixo. Área de toque de 44 px; sem largura fixa (cabe em 375 px). */
.player-sound {
  position: absolute; top: 10px; right: 10px; z-index: 2;
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; max-width: calc(100% - 20px); padding: 0 16px 0 13px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, .28); background: rgba(11, 12, 14, .72); color: #fff;
  font-weight: 700; font-size: 14px; line-height: 1.2; cursor: pointer;
  -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); transition: background-color .15s;
}
.player-sound:hover { background: rgba(11, 12, 14, .88); }
.player-sound .icon { width: 18px; height: 18px; }
.rate { margin-bottom: 12px; padding: 14px; border-radius: var(--r); background: var(--card); border: 1px solid transparent; }
.rate.is-pending { border-color: var(--accent-line); }
.rate.is-nudge { animation: glow 1s ease 2; }
.rate-q { margin-bottom: 10px; font-weight: 800; font-size: 16px; }
.rate-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.rate-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 74px; padding: 10px 8px; border-radius: var(--r); cursor: pointer;
  background: var(--card-2); border: 1px solid var(--line-2); font: 650 13px/1.1 var(--font);
  transition: background-color .15s, border-color .15s, transform .08s;
}
.rate-btn:hover { background: var(--card-3); }
.rate-btn:active { transform: scale(.97); }
.rate-emoji { font-size: 26px; line-height: 1; }
.rate-up.is-on { border-color: var(--accent); background: var(--accent-soft); }
.rate-down.is-on { border-color: var(--danger); background: var(--danger-soft); }
.rate-thanks { margin-top: 8px; font-size: 12.5px; color: var(--text-2); }
.rate-thanks:empty { display: none; }
.rate-note { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.rate-note .btn { align-self: flex-start; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.actions-main > * { flex: 1 1 140px; }
.share-box { margin: 0 0 12px; display: flex; flex-direction: column; gap: 6px; }
.mini-help { margin-top: 4px; border-top: 1px solid var(--line); }
.mini-help summary { padding: 10px 0; cursor: pointer; font-size: 13px; color: var(--text-2); }
.mini-help summary:hover { color: var(--text); }
.mini-help p { margin-bottom: 10px; font-size: 12.5px; color: var(--text-2); }
.mini-help .btn { margin: 6px 0 10px; }

.hgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; }
.hgrid.skeleton, .hcard.skeleton { min-height: 220px; border-radius: var(--r); background: linear-gradient(100deg, #16171a 30%, #1f2025 50%, #16171a 70%); background-size: 220% 100%; animation: shimmer 1.5s linear infinite; }
.hcard {
  display: flex; flex-direction: column; gap: 7px; padding: 0; border: 0; background: none;
  text-align: left; cursor: pointer; min-width: 0;
}
.hthumb {
  position: relative; display: grid; place-items: center; aspect-ratio: 3 / 4; border-radius: var(--r); overflow: hidden;
  background: var(--card); color: var(--text-3); transition: outline-color .15s;
}
.hthumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hthumb-ph .icon { width: 26px; height: 26px; }
.hcard:hover .hthumb { outline: 1px solid rgba(255, 255, 255, .25); outline-offset: 2px; }
.hcard.is-focus .hthumb { outline: 2px solid var(--accent); outline-offset: 2px; }
.hbadge { position: absolute; left: 6px; top: 6px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .62); font-size: 11px; font-weight: 750; }
.hbadge-succeeded { color: var(--accent); }
.hbadge-failed { color: var(--danger); }
.hbadge-queued, .hbadge-processing { color: var(--warn); }
.hbadge-canceled { color: var(--text-2); }
.hrate { position: absolute; right: 6px; bottom: 6px; font-size: 17px; }
.hrate-todo { padding: 2px 7px; border-radius: 6px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-weight: 800; }
.hmeta { display: flex; flex-direction: column; min-width: 0; }
.hmeta-name {
  font-weight: 650; font-size: 13px; line-height: 1.3; overflow-wrap: anywhere;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.hmeta-time { font-size: 12px; color: var(--text-3); }
.hmeta-char { font-size: 12px; line-height: 1.3; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.job-char { overflow-wrap: anywhere; }
/* histórico em tokens: "há 5 min · [moeda] 11 tokens"; falhou/cancelado = "não cobrado" */
.hmeta-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 1px 8px; }
.hmeta-price { font-size: 12px; font-weight: 700; color: var(--text-2); }
.hmeta-price.is-free { font-weight: 600; color: var(--text-3); }
/* falha que ficou COBRADA (regra anti-abuso): "[moeda] 8 tokens cobrados" — nunca "não cobrado" */
.hmeta-charged { display: inline-flex; align-items: center; gap: 4px; }
.hmeta-price.is-charged { font-weight: 600; color: var(--warn); }

/* aviso das instruções que pede confirmação antes de gerar (numeração das imagens / referências que este modelo não usa) */
.prompt-check { flex: none; padding: 10px 12px; border-radius: var(--r-sm); background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .35); }
.prompt-check-title { display: flex; align-items: center; gap: 6px; margin: 0; font-weight: 750; font-size: 13px; color: var(--warn); }
.prompt-check-title .icon { width: 15px; height: 15px; flex: none; }
.prompt-check-text { margin: 4px 0 8px; font-size: 12px; line-height: 1.45; color: var(--text-2); overflow-wrap: anywhere; }
.prompt-check-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }

/* ---------------------------------------------------------------- Como funciona */
.steps { list-style: none; margin: 0 0 30px; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step { padding: 18px; border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line); }
.step-n { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 14px; border-radius: 10px; background: var(--accent); color: var(--accent-ink); font-weight: 900; }
.step-title { margin: 0 0 6px; font-size: 16px; font-weight: 800; }
.step p { color: var(--text-2); }
.faq { max-width: 820px; }
.faq details { margin-bottom: 8px; padding: 0 16px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); }
.faq summary { display: flex; justify-content: space-between; gap: 12px; padding: 14px 0; font-weight: 700; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-weight: 400; font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 0 0 14px; color: var(--text-2); }

/* ---------------------------------------------------------------- formulários, diálogo, avisos */
.input {
  width: 100%; height: 46px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-2); color: var(--text); font: 15px var(--font);
}
.input:focus { outline: none; border-color: var(--accent); }
textarea.input { height: auto; padding: 10px 12px; font-size: 13.5px; resize: vertical; }
.field-label { font-weight: 650; font-size: 13px; }
.field-help { font-size: 12px; color: var(--text-3); }
.field-error { font-size: 13px; color: var(--danger); }

.dialog { width: min(420px, calc(100vw - 32px)); max-width: none; padding: 0; border: 0; background: transparent; color: var(--text); }
.dialog::backdrop { background: rgba(0, 0, 0, .66); }
.dialog[open]:not(:modal) { position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 100; }
.dialog-card {
  display: flex; flex-direction: column; gap: 8px; padding: 18px;
  border-radius: var(--r-lg); background: var(--panel); border: 1px solid var(--line-2);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .6);
}
.dialog-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.dialog-title { margin: 0; font-weight: 900; font-size: 18px; letter-spacing: -.01em; text-transform: uppercase; }
.dialog .btn-block { margin-top: 6px; min-height: 46px; }

/* cartão de aviso dos modais pequenos (v10: Entrar com Google, "Quase lá!") */
.pay-card { gap: 10px; padding: 20px; background: linear-gradient(180deg, rgba(200, 255, 58, .06), rgba(200, 255, 58, 0) 42%), var(--panel); }
.pay-card .dialog-head { margin-bottom: 2px; }
.pay-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: var(--accent);
}
.pay-icon .icon { width: 20px; height: 20px; }
.pay-text { font-size: 14px; line-height: 1.5; color: var(--text-2); }

/* v10: "Crie sua conta grátis para continuar" (Entrar com Google) e "Quase lá!" */
.login-title { text-transform: none; font-size: 20px; line-height: 1.2; }
.google-btn { background: #fff; color: #1f1f1f; border-color: #dadce0; font-weight: 700; gap: 10px; }
.google-btn:hover { background: #f3f4f6; }
.google-btn[disabled] { opacity: .75; cursor: progress; }
.google-g { width: 20px; height: 20px; flex: none; }
.login-error { margin: 0; }
.login-terms { font-size: 12px; line-height: 1.5; color: var(--text-3); }
.login-terms a { color: var(--text-2); }
.onb-card { gap: 10px; }
.onb-card .dialog-title { text-transform: none; font-size: 22px; }
.onb-card .dialog-title:focus { outline: none; }
.onb-card .buy-field { display: flex; flex-direction: column; gap: 6px; }
.field-opt { font-weight: 500; color: var(--text-3); }
.onb-card .check-text { font-size: 13px; color: var(--text); }

/* ---------------------------------------------------------------- v7 "Comprar tokens" (Pix) */
.dialog-buy {
  width: min(460px, calc(100vw - 24px));
  max-height: calc(100vh - 24px); max-height: calc(100dvh - 24px);
  overflow-y: auto; overscroll-behavior: contain;
}
.buy-card { gap: 12px; padding: 18px; background: linear-gradient(180deg, rgba(200, 255, 58, .06), rgba(200, 255, 58, 0) 160px), var(--panel); }
.buy-card .dialog-head { margin-bottom: 0; gap: 12px; }
.buy-card .dialog-title { font-size: 17px; }
.buy-card .dialog-title:focus { outline: none; }
.buy-card .dialog-title:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.buy-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.buy-body .btn-block { margin-top: 0; }
.buy-why {
  margin: 0; padding: 10px 12px; border-radius: var(--r-sm); font-size: 13.5px; line-height: 1.45;
  background: var(--accent-soft); border: 1px solid var(--accent-line); color: #ecffc4;
}
.buy-form { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.packs { margin: 0; padding: 0; border: 0; min-width: 0; }
.packs legend { padding: 0; margin-bottom: 8px; }
.pack-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; padding-top: 6px; }
.pack {
  position: relative; display: flex; flex-direction: column; gap: 4px; min-width: 0; padding: 12px;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2); cursor: pointer;
  transition: border-color .15s, background-color .15s;
}
.pack:hover { border-color: var(--dash); }
.pack.is-on { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.pack:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.pack-radio { position: absolute; top: 0; left: 0; width: 1px; height: 1px; margin: 0; opacity: 0; pointer-events: none; }
.pack-tokens { font-weight: 900; font-size: 18px; letter-spacing: -.02em; }
.pack-tokens .tok { gap: 6px; }
.pack-bonus { font-size: 12px; font-weight: 700; color: var(--accent); overflow-wrap: anywhere; }
.pack-bonus.is-none { color: var(--text-3); font-weight: 600; }
.pack-price { font-size: 14px; font-weight: 650; color: var(--text-2); font-variant-numeric: tabular-nums; }
.pack.is-on .pack-price { color: var(--text); }
.pack-tag {
  position: absolute; top: -9px; right: 8px; padding: 3px 8px; border-radius: 999px;
  background: var(--accent); color: var(--accent-ink); font-size: 10.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase;
}
.buy-fields { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.buy-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.buy-field .field-help, .buy-field .field-error { margin: 0; }
.buy-field .input[aria-invalid="true"] { border-color: var(--danger); }
.buy-field .linkbtn { padding: 0 2px; }
.buy-error { margin: 0; }
.buy-submit { min-height: 50px; font-size: 15px; font-weight: 800; }
.buy-submit.is-busy { cursor: progress; opacity: .8; }
.buy-note { margin: 0; font-size: 12px; line-height: 1.5; color: var(--text-3); }
.buy-note a { color: var(--text-2); }

/* passo 2: o Pix */
.pix-sum { margin: 0; display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 15px; }
.pix-amount { font-weight: 900; font-size: 24px; letter-spacing: -.02em; }
.pix-dot { opacity: .5; }
.pix-main { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.pix-qr { display: grid; place-items: center; }
.pix-qr-img { display: block; width: min(240px, 100%); height: auto; aspect-ratio: 1; padding: 10px; border-radius: var(--r); background: #fff; }
.pix-qr-wait {
  display: grid; place-items: center; align-content: center; gap: 10px; width: min(240px, 100%); aspect-ratio: 1; padding: 12px;
  border-radius: var(--r); background: var(--card); border: 1px dashed var(--dash); color: var(--text-2); font-size: 13px; text-align: center;
}
.pix-copy { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.pix-copy-btn { min-height: 50px; font-size: 15px; font-weight: 800; }
.btn.is-done { background: var(--accent-hover); }
.btn-secondary.is-done { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); }
.pix-code { height: auto; padding: 8px 10px; font: 12px/1.4 var(--mono); color: var(--text-2); resize: none; word-break: break-all; overflow-wrap: anywhere; }
.pix-steps { margin: 0; padding-left: 20px; font-size: 13px; line-height: 1.5; color: var(--text-2); }
.pix-steps li + li { margin-top: 2px; }
.pix-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; padding: 10px 12px;
  border-radius: var(--r-sm); background: var(--card); border: 1px solid var(--line-2);
}
.pix-timer { margin: 0; font-size: 13px; color: var(--text-2); }
.pix-left { font-size: 16px; color: var(--text); font-variant-numeric: tabular-nums; }
.pix-status { margin: 0; display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; color: var(--text); }
.pix-spin { flex: none; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--card-3); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.pix-back { align-self: center; }
/* no celular quem paga costuma estar no MESMO aparelho: "Copiar código Pix" vem antes do QR */
@media (max-width: 1023px) and (pointer: coarse) { .pix-copy { order: -1; } }

/* v9 TriadPay: a página de pagamento HOSPEDADA num iframe dentro do modal (mais largo e alto; em 375 px ocupa a largura toda,
   sem rolagem lateral — o que não couber na altura rola dentro do próprio iframe ou do modal) */
.dialog-buy.is-hosted { width: min(560px, calc(100vw - 16px)); }
.tp-frame {
  position: relative; min-width: 0; min-height: 160px; overflow: hidden;
  border-radius: var(--r); background: var(--card); border: 1px solid var(--line-2);
}
.tp-frame.is-loaded { background: #fff; }
.tp-iframe {
  display: block; width: 100%; min-height: 360px; border: 0; background: transparent;
  height: min(640px, calc(100vh - 300px)); height: min(640px, calc(100dvh - 300px));
}
.tp-wait {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 16px;
  color: var(--text-2); font-size: 13px; text-align: center; pointer-events: none;
}
.tp-wait .spinner { flex: none; width: 22px; height: 22px; }
.tp-frame.is-loaded .tp-wait { display: none; }
.tp-open { min-height: 46px; gap: 8px; text-decoration: none; }
.tp-open .icon { width: 16px; height: 16px; }
.tp-note { text-align: center; }
/* "Você tem um pagamento em andamento" (topo): texto + "Ver pagamento" quebram linha no celular */
.banner-pay { align-items: center; flex-wrap: wrap; }
.banner-pay p { flex: 1 1 220px; min-width: 0; margin: 0; overflow-wrap: anywhere; }
.banner-btn {
  flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 13px;
}
.banner-btn:focus-visible { outline: 2px solid var(--text); outline-offset: 2px; }
@media (pointer: coarse) { .banner-btn { min-height: 44px; } }

/* passo 3: pago + a chave de acesso */
.buy-ok { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 0 2px; text-align: center; }
.buy-ok-icon {
  display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 6px; border-radius: 50%;
  background: var(--accent); color: var(--accent-ink); animation: popIn .35s ease-out;
}
.buy-ok-icon .icon { width: 28px; height: 28px; stroke-width: 2.6; }
.buy-ok-plus { margin: 0; font-weight: 900; font-size: 30px; letter-spacing: -.02em; color: var(--accent); }
.buy-ok-bal { margin: 0; font-size: 14px; color: var(--text-2); }
.buy-ok-bal strong { color: var(--text); }
.buy-auto { margin: 0; text-align: center; }

.toasts {
  position: fixed; z-index: 90; left: 50%; bottom: calc(14px + var(--dock-h)); transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; width: min(440px, calc(100vw - 24px)); pointer-events: none;
}
@media (min-width: 1024px) { .toasts { left: auto; right: 24px; transform: none; } }
.toast {
  display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 14px; border-radius: var(--r);
  background: #1f2024; border: 1px solid var(--line-2); box-shadow: 0 14px 40px rgba(0, 0, 0, .5);
  font-size: 13.5px; pointer-events: auto; animation: toastIn .2s ease; transition: opacity .3s, transform .3s;
}
.toast > .icon { width: 17px; height: 17px; color: var(--text-2); }
.toast-ok > .icon { color: var(--accent); }
.toast-err > .icon { color: var(--danger); }
.toast-text { flex: 1; min-width: 0; }
.toast.is-out { opacity: 0; transform: translateY(6px); }
.toast-action {
  flex: none; height: 32px; padding: 0 14px; border-radius: 999px; border: 0; cursor: pointer;
  background: var(--accent); color: var(--accent-ink); font-weight: 750; font-size: 13px;
}

.footer { margin-top: 36px; padding: 18px 16px 26px; border-top: 1px solid var(--line); text-align: center; font-size: 12px; color: var(--text-3); display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.footer a { color: var(--text-2); }
.footer-btn { padding: 0 2px; font-size: 12px; }

/* v10 §4: aviso de cookies (só com pixel configurado). Acima do botão Gerar fixo do celular; nada pré-aceito. */
.cookie {
  position: fixed; left: 12px; right: 12px; bottom: calc(12px + var(--dock-h)); z-index: 70; margin: 0 auto; max-width: 560px;
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 12px 14px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line-2); box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
}
.cookie-text { flex: 1 1 220px; min-width: 0; font-size: 13px; line-height: 1.45; color: var(--text-2); }
.cookie-text a { color: var(--text); }
.cookie-actions { display: flex; gap: 8px; flex: none; margin-left: auto; }
.noscript { padding: 20px; text-align: center; }

/* ---------------------------------------------------------------- celular / tablet (< 1024 px) */
@media (max-width: 1023px) {
  .topbar { padding: 0 12px 0 14px; gap: 8px; }
  .top-jobs { display: inline-grid; }
  .side-tabs { display: none; }
  .side-card { border-radius: var(--r-lg); }
  .drop-main { min-height: 150px; }
  /* Gerar fixo na base (só na Biblioteca; em "Meus vídeos"/"Como funciona" a tela é cheia).
     Fundo SÓLIDO atrás da dica e do botão (o texto da dica nunca se mistura com o conteúdo que rola por baixo); o degradê
     de transição fica FORA da caixa, acima dela, e não tem texto. */
  .gen {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--bg);
  }
  .gen::before {
    content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 18px; pointer-events: none;
    background: linear-gradient(180deg, rgba(11, 12, 14, 0), var(--bg));
  }
  /* Safari do iPhone: a barra do navegador cobre a base da tela; o botão sobe acima dela (o fundo sólido preenche o espaço) */
  .ios-safari .gen { padding-bottom: calc(10px + env(safe-area-inset-bottom) + 64px); }
  .gen-btn { height: 52px; font-size: 16px; }
  /* 16 px: o iPhone não dá zoom ao tocar na caixa de texto */
  textarea.prompt-input { font-size: 16px; min-height: 170px; max-height: 50vh; }
  .buy-field .input { font-size: 16px; }
  body.tab-library { padding-bottom: calc(var(--dock-h) + 18px); } /* + o degradê acima do botão */
  body:not(.tab-library) .side, body:not(.tab-library) .gen { display: none; }
  .jobs-back { display: inline-flex; }
  .panel-head { margin-top: 0; }
  .panel-title { font-size: 20px; }
  .lib-tools { flex-wrap: wrap; }
  .search { width: 100%; order: -1; margin-left: 0; }
  /* passos compactos: número ao lado do título (3 cartões cabem quase numa tela só) */
  .steps { grid-template-columns: 1fr; gap: 10px; }
  .step { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 14px; align-items: center; padding: 14px 16px; }
  .step-n { grid-row: span 2; align-self: start; margin: 0; }
  .step-title { margin: 0 0 4px; }
  .jobcard { padding: 12px; }
  .job-head { gap: 10px; margin-bottom: 12px; }
  .job-title { font-size: 16px; }
  .jobcard-body, .jobcard-result .jobcard-body { grid-template-columns: 1fr; gap: 16px; }
  /* Resultado no celular: vídeo + 👍/👎 + Baixar na PRIMEIRA tela. O vídeo encolhe para caber: reserva ~400 px para as abas,
     o título (até 2 linhas) e os botões abaixo dele (--top-h já inclui os avisos do topo); nunca menor que 200 px. */
  .jobcard-result .jobcard-body { gap: 12px; }
  .result-video {
    max-height: max(200px, calc(100vh - var(--top-h) - 400px));
    max-height: max(200px, calc(100svh - var(--top-h) - 400px));
  }
  .jobcard-result .rate { padding: 12px; margin-bottom: 10px; }
  .jobcard-result .rate-q { margin-bottom: 8px; font-size: 15px; }
  .jobcard-result .rate-btn { flex-direction: row; min-height: 48px; gap: 8px; font-size: 14px; }
  .jobcard-result .rate-emoji { font-size: 20px; }
  .jobcard-result .actions-main { margin: 10px 0; }
  .hgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .job-eta { font-size: 26px; }
}
@media (max-width: 420px) {
  .brand-name { font-size: 15px; }
  .tab { padding: 0 10px; }
  .tab .icon { display: none; }
  .panel-title { font-size: 18px; white-space: nowrap; }
  #history-refresh span, .jobs-back span { display: none; }
  #history-refresh, .jobs-back { min-width: 44px; padding: 0 10px; }
  .seg-btn { padding: 0 11px; font-size: 12.5px; }
  .seg-btn .icon { display: none; }
}
@media (max-width: 340px) {
  .brand-name { display: none; }
}
/* v7: saldo + "Comprar" no topo do celular — a marca vira só o ícone e o botão fica curto (nada de rolagem lateral em 375 px) */
@media (max-width: 559px) {
  .buy-open-x { display: none; }
  /* v10: com a conta, o topo do celular mostra só a foto (o nome fica no menu) e o "Comprar" fica no menu também */
  .acct-name { display: none; }
  .acct-btn { padding: 0 6px 0 3px; gap: 4px; }
  .topbar.has-acct .buy-open { display: none; }
}
@media (max-width: 479px) {
  .topbar.has-wallet .brand-name, .topbar.has-acct .brand-name { display: none; }
  .wallet { padding: 0 10px; gap: 6px; }
  .buy-open { padding: 0 10px; }
  .buy-card { padding: 16px 14px; }
  .cookie { left: 8px; right: 8px; padding: 10px 12px; }
  .cookie-actions { width: 100%; }
  .cookie-actions .btn { flex: 1 1 0; }
}
/* alvos de toque de no mínimo 44 px em telas de toque */
@media (pointer: coarse) {
  .minibtn { min-height: 44px; padding: 0 16px; }
  .linkbtn { min-height: 44px; }
  .cat, .seg-btn, .tab, .fchip, .drop-cam, .btn-sm, .toast-action { min-height: 44px; }
  .seg { padding: 3px; }
  .search { height: 44px; }
  .iconbtn { width: 44px; height: 44px; }
  .iconbtn-sm { width: 44px; height: 44px; }
  .vplay { width: 44px; height: 44px; }
  .pick-media .vplay { width: 40px; height: 40px; }
  .check { min-height: 44px; }
  .brand { min-height: 44px; }
  .ref, .refs-add.is-tile { width: 64px; height: 64px; }
  .ref-x { width: 26px; height: 26px; top: -8px; right: -8px; }
  .ref-x::before { inset: -9px; }
  .ref-retry { width: 40px; height: 40px; }
  .refs-add { min-height: 44px; }
  .acct-btn { height: 44px; }
  .acct-mi { min-height: 48px; }
  .prompt .prow { min-height: 52px; }
  .prompt-next { min-height: 44px; }
  .footer a, .consent-links a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 4px; }
}
/* hover só onde existe mouse (no toque, o "hover" grudaria no último item tocado) */
@media (hover: none) {
  .drop:not(.is-filled):hover { border-color: var(--dash); background: var(--card); }
  .row:hover { background: var(--card); }
  .opt.is-open .row:hover { background: var(--card-2); }
  .fchip:hover { color: var(--text-2); }
  .fchip.is-on:hover { color: var(--text); }
  .cat:hover, .seg-btn:hover, .tab:hover { color: var(--text-2); }
  .cat.is-on:hover, .tab.is-on:hover { color: var(--text); }
  .seg-btn.is-on:hover { color: #0b0c0e; }
  .mitem:hover { background: transparent; }
  .mitem.is-on:hover { background: var(--card-2); }
  .prompt .prow:hover { background: transparent; }
  .refs-add.is-tile:hover { border-color: var(--dash); background: none; }
  .ref-x:hover { background: #2a2b31; }
}

/* ---------------------------------------------------------------- páginas legais (termos.html / privacidade.html) */
.legal-page { background: var(--bg); }
.legal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: var(--top-h); padding: 0 16px 0 20px; border-bottom: 1px solid var(--line); }
.legal { max-width: 780px; margin: 0 auto; padding: 28px 16px 60px; }
.legal h1 { margin: 0 0 6px; font-weight: 900; font-size: clamp(26px, 5vw, 36px); line-height: 1; letter-spacing: -.02em; text-transform: uppercase; }
.legal h2 { margin: 30px 0 10px; font-size: 18px; font-weight: 800; }
.legal p, .legal li { color: #d3d5da; line-height: 1.65; }
.legal p { margin: 0 0 12px; }
.legal ul, .legal ol { padding-left: 22px; margin: 0 0 12px; }
.legal li { margin-bottom: 6px; }
.legal .updated { color: var(--text-3); font-size: 13px; margin-bottom: 18px; }
.legal .fill { color: var(--warn); font-weight: 700; }
.legal-draft { margin: 0 0 22px; padding: 12px 14px; border-radius: var(--r); background: var(--warn-soft); border: 1px solid rgba(255, 191, 77, .35); color: #ffe2a8; font-size: 13.5px; }
.legal a { color: var(--accent); }

/* ---------------------------------------------------------------- animações */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -120% 0; } }
@keyframes indet { 0% { transform: translateX(-110%); } 100% { transform: translateX(340%); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(200, 255, 58, .55); } 70% { box-shadow: 0 0 0 7px rgba(200, 255, 58, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 255, 58, 0); } }
@keyframes glow { 0%, 100% { box-shadow: 0 0 0 0 rgba(200, 255, 58, 0); } 50% { box-shadow: 0 0 0 3px rgba(200, 255, 58, .45); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }
@keyframes toastIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes menuIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important; animation-iteration-count: 1 !important;
    transition-duration: .001ms !important; scroll-behavior: auto !important;
  }
}
