/* Central de Criação de Arte da IVA */

@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fontes/work-sans-latin-400-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url(../fontes/work-sans-latin-600-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fontes/work-sans-latin-700-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fontes/work-sans-latin-800-normal.woff2) format('woff2'); }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url(../fontes/work-sans-latin-ext-400-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url(../fontes/work-sans-latin-ext-700-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }
@font-face { font-family: 'Work Sans'; font-style: normal; font-weight: 800; font-display: swap; src: url(../fontes/work-sans-latin-ext-800-normal.woff2) format('woff2'); unicode-range: U+0100-024F; }

:root {
  --noite: #061814;
  --noite-2: #0B2A24;
  --profundo: #1C4B42;
  --verde: #2BB673;
  --lima: #B4E717;
  --lima-claro: #C6F03A;
  --laranja: #F9991C;
  --texto: #F6F5F2;
  --texto-2: rgba(246, 245, 242, .76);
  --texto-3: rgba(246, 245, 242, .54);
  --vidro: rgba(255, 255, 255, .055);
  --vidro-2: rgba(255, 255, 255, .09);
  --borda: rgba(255, 255, 255, .11);
  --borda-2: rgba(255, 255, 255, .18);
  --sombra: 0 22px 50px -24px rgba(0, 0, 0, .7);
  --sair: cubic-bezier(.23, 1, .32, 1);
  --gaveta: cubic-bezier(.32, .72, 0, 1);
  --coluna: 880px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--noite);
  color: var(--texto);
  font: 400 16px/1.5 'Work Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; -webkit-tap-highlight-color: transparent; }
img { max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--lima); outline-offset: 2px; }
[hidden] { display: none !important; }
.oculto-leitor { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fundo {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(55% 45% at 92% -6%, rgba(180, 231, 23, .15), rgba(180, 231, 23, 0) 70%),
    radial-gradient(50% 40% at -8% 104%, rgba(43, 182, 115, .2), rgba(43, 182, 115, 0) 70%),
    linear-gradient(180deg, var(--noite-2) 0%, var(--noite) 72%);
}

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 999px;
  padding: 11px 20px; font-size: 15px; font-weight: 600; line-height: 1.1;
  text-decoration: none; white-space: nowrap;
  transition: transform 160ms var(--sair), background-color 150ms ease, border-color 150ms ease, color 150ms ease, opacity 150ms ease;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-lima { background: var(--lima); color: var(--noite); }
.btn-vidro { background: var(--vidro); border-color: var(--borda); color: var(--texto); }
.btn-pequeno { padding: 8px 14px; font-size: 14px; }
.btn-pequeno svg { width: 16px; height: 16px; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.icone-btn {
  width: 44px; height: 44px; flex: none; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: transparent; color: var(--texto-2);
  transition: transform 160ms var(--sair), background-color 150ms ease, color 150ms ease;
}
.icone-btn svg { width: 21px; height: 21px; }
.icone-btn:active { transform: scale(.94); }
@media (hover: hover) {
  .btn-lima:hover { background: var(--lima-claro); }
  .btn-vidro:hover { background: var(--vidro-2); border-color: var(--borda-2); }
  .icone-btn:hover { background: var(--vidro-2); color: var(--texto); }
  .enviar:hover { background: var(--lima-claro); color: var(--noite); }
}

/* ---------- topo ---------- */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px;
  padding: 14px clamp(16px, 3vw, 32px);
  background: rgba(9, 34, 28, .9);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.topo::after {
  content: ''; position: absolute; left: 0; right: 0; top: 100%; height: 22px; pointer-events: none;
  background: linear-gradient(180deg, rgba(9, 34, 28, .9), rgba(9, 34, 28, 0));
}
.marcas-topo { display: flex; align-items: center; gap: 14px; text-decoration: none; flex: none; }
.marcas-topo .m-iva { height: 30px; width: auto; }
.marcas-topo i { width: 1.5px; height: 24px; background: rgba(255, 255, 255, .3); }
.marcas-topo .m-pref { height: 23px; width: auto; }
.topo-titulo { font-size: 14px; font-weight: 600; color: var(--texto-3); letter-spacing: .01em; padding-left: 14px; border-left: 1.5px solid rgba(255, 255, 255, .14); }
.topo-acoes { display: flex; gap: 8px; margin-left: auto; }
.contador {
  min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px;
  background: var(--lima); color: var(--noite); font-size: 12px; font-weight: 700;
  display: inline-grid; place-items: center; font-variant-numeric: tabular-nums;
}

/* ---------- palco e conversa ---------- */
.palco { width: 100%; max-width: var(--coluna); margin: 0 auto; padding: 8px clamp(16px, 3vw, 24px) var(--folga, 230px); }
.conversa { display: flex; flex-direction: column; gap: 22px; }

.boas-vindas { display: flex; flex-direction: column; align-items: center; text-align: center; padding: clamp(0px, 3vh, 32px) 0 8px; }
.bv-iva {
  width: 200px; height: auto; display: block;
  -webkit-mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
  mask-image: linear-gradient(180deg, #000 72%, transparent 100%);
}
.bv-titulo { margin: 14px 0 10px; font-size: clamp(30px, 4.6vw, 48px); line-height: 1.03; font-weight: 800; letter-spacing: -.03em; text-wrap: balance; }
.bv-titulo em { font-style: normal; color: var(--lima); }
.bv-texto { margin: 0 0 26px; max-width: 520px; font-size: 17px; color: var(--texto-2); text-wrap: pretty; }
.sugestoes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; width: 100%; max-width: 660px; }
.sugestao {
  display: flex; flex-direction: column; align-items: flex-start; gap: 3px; text-align: left;
  padding: 14px 16px; border-radius: 18px; background: var(--vidro); border: 1px solid var(--borda);
  transition: transform 160ms var(--sair), background-color 150ms ease, border-color 150ms ease;
}
.sugestao:active { transform: scale(.98); }
.sugestao b { font-size: 15px; font-weight: 700; }
.sugestao span { font-size: 13.5px; line-height: 1.4; color: var(--texto-3); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (hover: hover) { .sugestao:hover { background: var(--vidro-2); border-color: rgba(180, 231, 23, .35); } }

.msg { display: flex; gap: 12px; align-items: flex-start; animation: entrar 260ms var(--sair) both; }
.msg-eu { justify-content: flex-end; }
.avatar { width: 38px; height: 38px; flex: none; border-radius: 50%; object-fit: cover; border: 2px solid rgba(180, 231, 23, .55); background: var(--profundo); }
.msg-corpo { display: flex; flex-direction: column; align-items: flex-start; gap: 10px; min-width: 0; flex: 1; }
.msg-eu .msg-corpo { align-items: flex-end; flex: 0 1 auto; max-width: min(78%, 580px); }
.balao { padding: 12px 16px; border-radius: 20px; font-size: 16px; line-height: 1.5; overflow-wrap: anywhere; max-width: 100%; }
.msg-eu .balao { background: rgba(180, 231, 23, .13); border: 1px solid rgba(180, 231, 23, .26); border-bottom-right-radius: 6px; }
.msg-iva .balao { background: var(--vidro); border: 1px solid var(--borda); border-top-left-radius: 6px; }
.balao-erro { background: rgba(249, 153, 28, .09) !important; border-color: rgba(249, 153, 28, .45) !important; }
.msg-meta { font-size: 12.5px; color: var(--texto-3); }
.msg-foto { width: 132px; border-radius: 14px; border: 1px solid var(--borda); display: block; }
@keyframes entrar { from { opacity: 0; transform: translateY(8px); } }

/* ---------- artes ---------- */
.arte { margin: 0; width: min(100%, var(--larg, 320px)); }
.arte[data-formato="story"] { --larg: 300px; }
.arte[data-formato="post"] { --larg: 360px; }
.arte[data-formato="quadrado"] { --larg: 390px; }
.arte[data-formato="banner"] { --larg: 620px; }
.arte-quadro {
  position: relative; aspect-ratio: var(--ar, 9 / 16); overflow: hidden;
  border-radius: 16px; border: 1px solid var(--borda); background: rgba(255, 255, 255, .04);
  box-shadow: var(--sombra);
}
.arte-quadro.clicavel { cursor: zoom-in; }
.arte-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.arte-marcas { position: absolute; inset: 0; pointer-events: none; }
.arte-marcas > * { position: absolute; display: block; }
.arte-marcas i { background: rgba(255, 255, 255, .3); }
.arte-marcas i.claro { background: rgba(11, 42, 36, .25); }
.arte-acoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; width: max-content; max-width: calc(100vw - 80px); }
.arte-acoes .so-icone { width: 36px; height: 36px; padding: 0; }

.relogio { font-size: 13px; font-weight: 600; color: var(--texto-3); font-variant-numeric: tabular-nums; padding: 3px 10px; border-radius: 999px; background: rgba(255, 255, 255, .06); }
.trabalhando .balao { display: flex; align-items: center; gap: 12px; }
.pontos { display: inline-flex; gap: 3px; margin-left: 3px; }
.pontos i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; animation: piscar 1.2s ease-in-out infinite; }
.pontos i:nth-child(2) { animation-delay: .15s; }
.pontos i:nth-child(3) { animation-delay: .3s; }
@keyframes piscar { 0%, 100% { opacity: .25; } 50% { opacity: 1; } }
.esboco { display: grid; place-items: end center; }
.esboco::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(100deg, rgba(180, 231, 23, 0) 30%, rgba(180, 231, 23, .1) 50%, rgba(180, 231, 23, 0) 70%);
  transform: translateX(-100%); animation: varrer 1.8s linear infinite;
}
@keyframes varrer { to { transform: translateX(100%); } }
.esboco-dica { position: relative; z-index: 1; margin: 0 0 16px; padding: 0 14px; font-size: 13px; color: var(--texto-3); text-align: center; }

/* ---------- compositor ---------- */
.compositor {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 15;
  padding: 30px clamp(12px, 3vw, 24px) max(14px, env(safe-area-inset-bottom));
  background: linear-gradient(180deg, rgba(6, 24, 20, 0) 0%, rgba(6, 24, 20, .9) 26%, var(--noite) 58%);
}
.compositor-dentro { max-width: calc(var(--coluna) - 32px); margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.opcoes { display: flex; align-items: center; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 2px; margin: -2px; }
.opcoes::-webkit-scrollbar { display: none; }
.segmento { display: inline-flex; gap: 2px; padding: 3px; flex: none; border-radius: 999px; background: var(--vidro); border: 1px solid var(--borda); }
.segmento button {
  display: inline-flex; align-items: center; gap: 7px;
  border: 0; border-radius: 999px; background: transparent; color: var(--texto-2);
  padding: 7px 12px; font-size: 14px; font-weight: 600; line-height: 1;
  transition: background-color 150ms ease, color 150ms ease;
}
.segmento button small { font-size: 11.5px; font-weight: 600; opacity: .6; }
.segmento button[aria-checked="true"] { background: var(--lima); color: var(--noite); }
.segmento button[aria-checked="true"] small { opacity: .7; }
@media (hover: hover) { .segmento button[aria-checked="false"]:hover { color: var(--texto); background: rgba(255, 255, 255, .06); } }
.forma { display: inline-block; flex: none; border: 1.6px solid currentColor; border-radius: 2.5px; }
.f-story { width: 9px; height: 15px; }
.f-post { width: 11px; height: 14px; }
.f-quadrado { width: 13px; height: 13px; }
.f-banner { width: 17px; height: 10px; }
.seletor { position: relative; flex: none; display: block; }
.seletor select {
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background: var(--vidro); border: 1px solid var(--borda); border-radius: 999px;
  padding: 9px 34px 9px 14px; font-size: 14px; font-weight: 600; line-height: 1.2; color: var(--texto);
}
.seletor select option { background: var(--noite-2); color: var(--texto); }
.seletor::after {
  content: ''; position: absolute; right: 14px; top: 50%; width: 7px; height: 7px; margin-top: -5px; pointer-events: none;
  border-right: 2px solid var(--texto-3); border-bottom: 2px solid var(--texto-3); transform: rotate(45deg);
}
.caixa {
  display: flex; align-items: flex-end; gap: 6px; padding: 7px;
  border-radius: 26px; background: rgba(11, 42, 36, .92); border: 1px solid var(--borda-2);
  box-shadow: 0 20px 50px -24px rgba(0, 0, 0, .85);
  transition: border-color 150ms ease;
}
.caixa:focus-within { border-color: rgba(180, 231, 23, .5); }
.campo { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.campo textarea {
  width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: var(--texto);
  padding: 11px 6px; font-size: 16px; line-height: 1.45; max-height: 168px;
}
.campo textarea::placeholder { color: var(--texto-3); }
.enviar { background: var(--lima); color: var(--noite); }
.enviar[disabled] { background: rgba(180, 231, 23, .22); color: rgba(6, 24, 20, .7); cursor: not-allowed; transform: none; }
.anexo-previa { position: relative; align-self: flex-start; margin: 6px 0 2px 4px; }
.anexo-previa img { display: block; height: 64px; width: auto; max-width: 140px; object-fit: cover; border-radius: 12px; border: 1px solid var(--borda-2); }
.anexo-previa button {
  position: absolute; top: -7px; right: -7px; width: 24px; height: 24px; padding: 0;
  display: grid; place-items: center; border-radius: 50%; border: 0; background: var(--texto); color: var(--noite);
}
.anexo-previa button svg { width: 13px; height: 13px; }
.compositor-nota { margin: 0; font-size: 12.5px; color: var(--texto-3); text-align: center; }

/* ---------- galeria ---------- */
.veu { position: fixed; inset: 0; z-index: 40; background: rgba(2, 10, 8, .6); opacity: 0; transition: opacity 220ms ease; }
.veu.aberto { opacity: 1; }
.galeria {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 41; width: min(400px, 100vw);
  display: flex; flex-direction: column; background: #0A231E; border-left: 1px solid var(--borda);
  box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .7);
  transform: translateX(100%); transition: transform 300ms var(--gaveta);
}
.galeria.aberta { transform: none; }
.galeria-topo { display: flex; align-items: center; justify-content: space-between; padding: 14px 12px 14px 22px; border-bottom: 1px solid var(--borda); }
.galeria-topo h2 { margin: 0; font-size: 18px; font-weight: 700; }
.galeria-vazia { margin: 0; padding: 24px 22px; color: var(--texto-3); }
.galeria-grade { flex: 1; overflow-y: auto; padding: 16px 22px 28px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; align-content: start; align-items: start; }
.miniatura {
  position: relative; display: block; width: 100%; padding: 0; overflow: hidden;
  aspect-ratio: 4 / 5; border-radius: 14px; border: 1px solid var(--borda); background: rgba(0, 0, 0, .25);
  transition: transform 160ms var(--sair), border-color 150ms ease;
}
.miniatura:active { transform: scale(.97); }
@media (hover: hover) { .miniatura:hover { border-color: rgba(180, 231, 23, .45); } }
.miniatura img { width: 100%; height: 100%; object-fit: contain; display: block; }
.miniatura span { position: absolute; left: 8px; bottom: 8px; padding: 3px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: rgba(6, 24, 20, .75); }

/* ---------- visor (arte ampliada) ---------- */
.visor {
  position: fixed; inset: 0; z-index: 50;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 64px 16px max(20px, env(safe-area-inset-bottom));
  background: rgba(3, 12, 10, .9); opacity: 0; transition: opacity 200ms ease;
}
.visor.aberto { opacity: 1; }
.visor-fechar { position: absolute; top: 12px; right: 12px; color: var(--texto); }
.visor-arte .arte { width: min(92vw, calc((100vh - 170px) * var(--arn, .5625))); width: min(92vw, calc((100dvh - 170px) * var(--arn, .5625))); }
.visor-arte .arte-quadro { transform: scale(.98); transition: transform 240ms var(--sair); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .9); }
.visor.aberto .arte-quadro { transform: none; }
.visor-acoes { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* ---------- cartões de estado (sem login, sem acesso, sem chave) ---------- */
.cartao-estado {
  max-width: 470px; margin: clamp(16px, 7vh, 72px) auto 0; padding: 30px 28px 28px; text-align: center;
  border-radius: 28px; background: var(--vidro); border: 1px solid var(--borda); box-shadow: var(--sombra);
  animation: entrar 300ms var(--sair) both;
}
.cartao-estado .bv-iva { width: 160px; margin: 0 auto; }
.cartao-estado h1 { margin: 12px 0 10px; font-size: 28px; line-height: 1.1; font-weight: 800; letter-spacing: -.02em; text-wrap: balance; }
.cartao-estado p { margin: 0 0 22px; color: var(--texto-2); text-wrap: pretty; }
.cartao-estado .acoes { display: flex; flex-direction: column; gap: 10px; }
.cartao-estado .voltar { display: inline-block; margin-top: 18px; font-size: 14px; color: var(--texto-3); }

/* ---------- aviso ---------- */
.aviso {
  position: fixed; left: 50%; top: 18px; z-index: 60; max-width: min(92vw, 460px);
  padding: 12px 18px; border-radius: 16px; font-size: 14.5px; font-weight: 600;
  background: var(--texto); color: var(--noite); box-shadow: var(--sombra);
  transform: translate(-50%, -8px); opacity: 0; transition: transform 220ms var(--sair), opacity 220ms ease;
}
.aviso.visivel { transform: translate(-50%, 0); opacity: 1; }

/* ---------- telas menores ---------- */
@media (max-width: 760px) {
  .topo { padding: 12px 14px; gap: 10px; }
  .marcas-topo { gap: 10px; }
  .marcas-topo .m-iva { height: 24px; }
  .marcas-topo i { height: 18px; }
  .marcas-topo .m-pref { height: 18px; }
  .topo-titulo, .btn-rotulo, .segmento button small { display: none; }
  .topo-acoes .btn { padding: 9px; }
  .segmento button { padding: 7px 11px; }
  .msg { gap: 10px; }
  .avatar { width: 32px; height: 32px; }
  .msg-eu .msg-corpo { max-width: 88%; }
  .arte[data-formato="story"] { --larg: 236px; }
  .arte[data-formato="post"] { --larg: 280px; }
  .arte[data-formato="quadrado"] { --larg: 300px; }
  .sugestoes { grid-template-columns: 1fr; }
  .bv-iva { width: 160px; }
  .bv-texto { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .esboco::after { display: none; }
}
