/* =========================================================
   Convitinho — estilos
   Paleta "Kinder Kind": #A3EDF8 #FBD15F #FF6EB8 #E0BDFF #BDE22A
   ========================================================= */
:root {
  --azul: #A3EDF8;
  --amarelo: #FBD15F;
  --rosa: #FF6EB8;
  --lilas: #E0BDFF;
  --verde: #BDE22A;
  --rosa-escuro: #D9428F;
  --tinta: #3B2A5C;
  --tinta-2: #6A5A86;
  --papel: #FCFAFF;
  --linha: #ECE3F8;
  --branco: #FFFFFF;
  --ok: #2F8F4E;
  --erro: #C0264F;
  --fonte-titulo: "Fredoka", "Nunito", system-ui, sans-serif;
  --fonte-texto: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-grande: 34px;
  --r-medio: 20px;
  --r-pequeno: 14px;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--fonte-texto);
  font-size: 17px;
  line-height: 1.5;
  color: var(--tinta);
  background:
    radial-gradient(900px 500px at -10% -10%, rgba(224,189,255,.45), transparent 60%),
    radial-gradient(700px 500px at 110% 10%, rgba(163,237,248,.5), transparent 60%),
    radial-gradient(800px 600px at 50% 120%, rgba(251,209,95,.25), transparent 60%),
    var(--papel);
  background-attachment: fixed;
  min-height: 100vh;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
img, canvas { max-width: 100%; display: block; }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--rosa); outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.pular { position: absolute; left: -999px; top: 8px; background: var(--tinta); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; }
.pular:focus { left: 12px; }
.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }

/* ---------- topo ---------- */
.topo { padding: 18px 0 6px; padding-top: max(18px, env(safe-area-inset-top)); }
.topo-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.logo {
  font-family: var(--fonte-titulo); font-weight: 700; font-size: clamp(30px, 5vw, 42px);
  text-decoration: none; letter-spacing: .5px; line-height: 1;
  display: inline-flex; filter: drop-shadow(0 3px 0 rgba(59,42,92,.14));
}
.logo { align-items: center; }
.logo-base { display: inline-flex; }
.logo-base span { display: inline-block; -webkit-text-stroke: 1px rgba(59,42,92,.08); }
.logo-base span:nth-child(odd) { transform: translateY(-2px) rotate(-3deg); }
.logo-base span:nth-child(even) { transform: translateY(2px) rotate(3deg); }
.logo-extra {
  display: inline-block; margin-left: 10px; padding: .12em .5em .16em;
  font-size: .56em; font-weight: 700; letter-spacing: .3px; color: #fff;
  background: var(--rosa); border-radius: 999px; transform: rotate(-5deg) translateY(-2px);
  box-shadow: 0 3px 0 var(--rosa-escuro); -webkit-text-stroke: 0;
}
.logo .l0 { color: var(--azul); } .logo .l1 { color: var(--amarelo); } .logo .l2 { color: var(--rosa); }
.logo .l3 { color: var(--lilas); } .logo .l4 { color: var(--verde); }
.topo-preco { margin: 0; font-size: 15px; color: var(--tinta-2); }
.topo-preco strong { color: var(--tinta); }
.topo-oferta { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.topo-pagar { padding: 9px 16px; font-size: 14px; box-shadow: 0 3px 0 var(--rosa-escuro); }
.topo-pagar.livre { background: #E9F7DC; color: var(--ok); box-shadow: 0 3px 0 #BFE3A1; }

.aviso-teste {
  background: var(--amarelo); color: var(--tinta); text-align: center;
  font-weight: 800; font-size: 14px; padding: 8px 16px;
}
.aviso-teste code { background: rgba(255,255,255,.6); padding: 1px 6px; border-radius: 6px; }

.abertura { padding: 22px 0 26px; max-width: 760px; margin-left: max(16px, calc((100% - 1180px) / 2)); }
.abertura h1 {
  font-family: var(--fonte-titulo); font-weight: 600;
  font-size: clamp(28px, 4.2vw, 46px); line-height: 1.1; letter-spacing: -.5px;
  margin: 0 0 12px; text-wrap: balance;
}
.abertura p { margin: 0; font-size: 18px; color: var(--tinta-2); max-width: 60ch; }

/* ---------- editor ---------- */
.editor {
  display: grid; gap: 28px;
  grid-template-columns: minmax(300px, 400px) 1fr;
  grid-template-areas: "palco painel" "palco baixar";
  align-items: start;
  padding-bottom: 40px;
}
.palco { grid-area: palco; position: sticky; top: 16px; min-width: 0; }
.painel { grid-area: painel; min-width: 0; }
.baixar { grid-area: baixar; min-width: 0; }
body { overflow-x: clip; }
.barra-movel { display: none; }

.moldura {
  position: relative; margin: 14px 18px 30px 8px;
  border-radius: 28px; overflow: hidden; background: #fff;
  box-shadow: 0 0 0 10px #fff, 16px 18px 0 10px var(--amarelo), 0 30px 60px -20px rgba(59,42,92,.35);
  transform: rotate(-1.2deg);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.moldura:hover { transform: rotate(0deg); }
.moldura canvas { width: 100%; height: auto; }
.selo-previa {
  position: absolute; top: 14px; right: 14px;
  background: var(--tinta); color: #fff; font-weight: 800; font-size: 13px;
  padding: 4px 12px; border-radius: 999px; letter-spacing: .3px;
}
.selo-previa.livre { background: var(--ok); }

.palco-controles { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 8px; }
.palco-botoes { display: flex; gap: 10px; }
.redondo {
  width: 48px; height: 48px; border-radius: 50%; border: 2px solid var(--linha); background: #fff;
  display: grid; place-items: center; box-shadow: 0 3px 0 var(--linha); transition: transform .1s;
}
.redondo:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--linha); }
.redondo svg { width: 22px; height: 22px; fill: var(--tinta); }
.redondo[aria-pressed="true"] { background: var(--lilas); border-color: var(--lilas); box-shadow: 0 3px 0 #C29AEB; }
#btnAnimar .ic-play { display: none; }
#btnAnimar[aria-pressed="false"] .ic-play { display: inline; }
#btnAnimar[aria-pressed="false"] .ic-pausa { display: none; }
#btnSom .ic-onda { opacity: .25; }
#btnSom[aria-pressed="true"] .ic-onda { opacity: 1; }

.segmento { display: inline-flex; background: #fff; border: 2px solid var(--linha); border-radius: 999px; padding: 4px; gap: 2px; }
.segmento button {
  border: 0; background: transparent; border-radius: 999px; padding: 7px 12px;
  font-weight: 800; font-size: 14px; color: var(--tinta-2); display: flex; flex-direction: column; align-items: center; line-height: 1.1;
}
.segmento button small { font-weight: 700; font-size: 11px; opacity: .7; }
.segmento button[aria-checked="true"] { background: var(--tinta); color: #fff; }
.segmento.pequeno { margin-bottom: 14px; }
.segmento.pequeno button { flex-direction: row; padding: 8px 16px; }

/* ---------- painel ---------- */
.painel, .baixar {
  background: #fff; border-radius: var(--r-grande);
  box-shadow: 0 1px 0 var(--linha), 0 20px 50px -30px rgba(59,42,92,.35);
}
.painel { padding: 10px 26px 28px; }
.abas {
  display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -26px 18px; padding: 12px 26px 12px; border-bottom: 2px dashed var(--linha);
  position: sticky; top: 0; background: #fff; z-index: 2; border-radius: var(--r-grande) var(--r-grande) 0 0;
}
.abas::-webkit-scrollbar { display: none; }
.abas button {
  flex: none; border: 0; background: var(--papel); border-radius: 999px;
  padding: 10px 16px; font-weight: 800; font-size: 15px; color: var(--tinta-2);
  transition: background .15s, color .15s;
}
.abas button:hover { background: #F3ECFC; }
.abas button[aria-selected="true"] { background: var(--rosa); color: #fff; box-shadow: 0 3px 0 var(--rosa-escuro); }

.aba h2 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 26px; margin: 4px 0 4px; }
.dica { color: var(--tinta-2); font-size: 15px; margin: 0 0 16px; }
.rotulo { font-weight: 800; font-size: 15px; margin: 18px 0 8px; }

/* temas */
.grade-temas { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 14px; }
.tema {
  border: 3px solid transparent; background: var(--papel); border-radius: var(--r-medio);
  padding: 6px 6px 10px; text-align: center; font-weight: 800; font-size: 14px;
  transition: transform .15s, border-color .15s;
}
.tema:hover { transform: translateY(-3px); }
.tema canvas { width: 100%; aspect-ratio: 9/16; border-radius: 14px; margin-bottom: 8px; background: #eee; }
.tema[aria-checked="true"] { border-color: var(--rosa); background: #FFF0F8; }

/* chamada do Estúdio */
.estudio-cta { display: flex; gap: 16px; align-items: center; margin: 4px 0 18px; padding: 18px 20px; border-radius: 24px;
  background: linear-gradient(120deg, #FFF0F8, #F1E6FF 55%, #E3F7FF); border: 2px dashed var(--lilas); }
.estudio-cta-txt { flex: 1; min-width: 0; }
.estudio-cta b { font-family: var(--fonte-titulo); font-weight: 600; font-size: 20px; }
.estudio-cta p { margin: 4px 0 12px; font-size: 14.5px; color: var(--tinta-2); }
.estudio-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
.estudio-botoes .btn { padding: 10px 16px; font-size: 14px; }
.card-meu { width: 120px; flex: none; }
.nota-estudio { background: #FFF6DB; border-radius: 12px; padding: 10px 12px; }
@media (max-width: 520px) { .estudio-cta { flex-direction: column; align-items: stretch; padding: 16px 14px; } .estudio-botoes .btn { flex: 1; } .card-meu { width: 110px; align-self: center; } }

/* coleções de temas */
.selo-novo { display: inline-block; background: var(--verde); color: var(--tinta); font-size: 11px; font-weight: 900; padding: 2px 8px; border-radius: 999px; vertical-align: 2px; margin-left: 4px; letter-spacing: .3px; }
.mini-dica { margin: -4px 0 12px; font-size: 14px; }
.aba > .rotulo:first-of-type { margin-top: 6px; }

/* modelos exclusivos */
#blocoModelos .rotulo:first-child { margin-top: 0; }
.variacoes-cli { display: flex; flex-wrap: wrap; gap: 10px; }
.variacoes-cli button { display: flex; align-items: center; gap: 8px; border: 2px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 14px 6px 6px; font-weight: 800; font-size: 14px; }
.variacoes-cli button i { width: 26px; height: 26px; border-radius: 50%; box-shadow: inset 0 0 0 2px rgba(255,255,255,.7); }
.variacoes-cli button[aria-checked="true"] { border-color: var(--rosa); background: #FFF0F8; }
.formato-fixo { margin: 0; font-size: 13px; font-weight: 700; color: var(--tinta-2); max-width: 20ch; line-height: 1.3; }

/* campos */
.campos { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 14px 16px; }
.campos > * { min-width: 0; grid-column: span 3; }
.campo { display: flex; flex-direction: column; gap: 6px; font-weight: 800; font-size: 14px; min-width: 0; }
.campos > .campo.largo { grid-column: 1 / -1; }
.campos > .c-nome { grid-column: span 4; }
.campos > .c-idade { grid-column: span 2; }
.campo input[type=date], .campo input[type=time] { min-height: 48px; -webkit-appearance: none; appearance: none; }
.campo input, .campo textarea {
  width: 100%; border: 2px solid var(--linha); border-radius: var(--r-pequeno);
  padding: 12px 14px; font-weight: 600; font-size: 16px; background: var(--papel);
  transition: border-color .15s, box-shadow .15s, background .15s; resize: vertical;
}
.campo input:focus, .campo textarea:focus { outline: none; border-color: var(--lilas); background: #fff; box-shadow: 0 0 0 4px rgba(224,189,255,.45); }
#c-nome { font-family: var(--fonte-titulo); font-size: 22px; font-weight: 600; }
.sugestoes { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.sugestoes button {
  border: 2px dashed var(--lilas); background: #fff; border-radius: 999px;
  padding: 5px 12px; font-size: 13px; font-weight: 700; color: var(--tinta-2);
}
.sugestoes button:hover { background: #F7EFFF; }

/* foto */
.foto-area { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.foto-previa {
  width: 150px; height: 150px; border-radius: 50%; overflow: hidden; flex: none;
  display: grid; place-items: center; background: var(--papel); border: 3px dashed var(--lilas);
  color: var(--tinta-2); font-weight: 700; font-size: 14px;
}
.foto-previa img { width: 100%; height: 100%; object-fit: cover; }
.foto-acoes { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }

/* fontes */
.filtros { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.filtros button {
  border: 2px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 14px;
  font-weight: 800; font-size: 14px; color: var(--tinta-2);
}
.filtros button[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.grade-fontes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.fonte {
  border: 2px solid var(--linha); background: #fff; border-radius: var(--r-pequeno);
  padding: 12px 10px 10px; text-align: center; min-height: 92px;
  display: flex; flex-direction: column; justify-content: center; gap: 4px; overflow: hidden;
}
.fonte .amostra { font-size: 28px; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fonte small { font-size: 12px; font-weight: 700; color: var(--tinta-2); }
.fonte:hover { border-color: var(--lilas); }
.fonte[aria-checked="true"] { border-color: var(--rosa); background: #FFF0F8; box-shadow: 0 3px 0 var(--rosa); }

/* cores */
.paletas { display: flex; gap: 10px; flex-wrap: wrap; }
.paleta {
  border: 2px solid var(--linha); background: #fff; border-radius: var(--r-pequeno); padding: 8px 10px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start; font-size: 13px; font-weight: 800;
}
.paleta .pontos { display: flex; }
.paleta .pontos i { width: 20px; height: 20px; border-radius: 50%; border: 2px solid #fff; margin-right: -6px; box-shadow: 0 0 0 1px var(--linha); }
.paleta:hover { border-color: var(--lilas); }
.papel-cor { margin-top: 16px; }
.papel-cor p { margin: 0 0 8px; font-weight: 800; font-size: 14px; }
.amostras { display: flex; flex-wrap: wrap; gap: 7px; align-items: center; }
.amostras button {
  width: 32px; height: 32px; border-radius: 50%; border: 3px solid #fff;
  box-shadow: 0 0 0 1.5px var(--linha); padding: 0;
}
.amostras button[aria-checked="true"] { box-shadow: 0 0 0 3px var(--tinta); }
.cor-livre { position: relative; width: 32px; height: 32px; border-radius: 50%; overflow: hidden; box-shadow: 0 0 0 1.5px var(--linha);
  background: conic-gradient(#FF6EB8, #FBD15F, #BDE22A, #A3EDF8, #E0BDFF, #FF6EB8); }
.cor-livre input { position: absolute; inset: -8px; width: 48px; height: 48px; opacity: 0; cursor: pointer; }
.opcoes { margin-top: 22px; display: flex; flex-direction: column; gap: 14px; }
.chave { display: flex; align-items: center; gap: 12px; font-weight: 700; cursor: pointer; }
.chave input { position: absolute; opacity: 0; }
.chave span { width: 46px; height: 28px; border-radius: 999px; background: var(--linha); position: relative; flex: none; transition: background .2s; }
.chave span::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.15); transition: transform .2s; }
.chave input:checked + span { background: var(--verde); }
.chave input:checked + span::after { transform: translateX(18px); }
.chave input:focus-visible + span { outline: 3px solid var(--rosa); outline-offset: 2px; }
.faixa { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; max-width: 320px; }
.faixa input { accent-color: var(--rosa); }

/* música */
.lista-musicas { display: grid; gap: 10px; }
.musica {
  display: flex; align-items: center; gap: 14px; border: 2px solid var(--linha); background: #fff;
  border-radius: var(--r-medio); padding: 10px 14px; text-align: left; cursor: pointer;
}
.musica[aria-checked="true"] { border-color: var(--rosa); background: #FFF0F8; }
.musica .tocar {
  width: 42px; height: 42px; flex: none; border-radius: 50%; border: 0;
  background: var(--amarelo); display: grid; place-items: center; box-shadow: 0 3px 0 #D9AE36;
}
.musica .tocar svg { width: 16px; height: 16px; fill: var(--tinta); }
.musica .tocar.ativo { background: var(--rosa); box-shadow: 0 3px 0 var(--rosa-escuro); }
.musica .tocar.ativo svg { fill: #fff; }
.musica b { display: block; font-size: 16px; }
.musica span { font-size: 13px; color: var(--tinta-2); font-weight: 600; }
.musica .sem { background: var(--linha); box-shadow: none; }

/* ---------- download ---------- */
.baixar { padding: 26px; }
.baixar-cab { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.baixar h2 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 26px; margin: 0 0 4px; }
.status-lib { margin: 0; color: var(--tinta-2); max-width: 46ch; }
.status-lib.livre { color: var(--ok); font-weight: 700; }
.formatos-dl { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; }
.formatos-dl button {
  border: 2px solid var(--linha); background: var(--papel); border-radius: var(--r-medio);
  padding: 14px 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; position: relative;
  transition: transform .12s, border-color .15s;
}
.formatos-dl button:hover { transform: translateY(-2px); border-color: var(--lilas); }
.formatos-dl b { font-family: var(--fonte-titulo); font-size: 20px; font-weight: 600; }
.formatos-dl span { font-size: 12.5px; color: var(--tinta-2); font-weight: 700; }
.formatos-dl button::after {
  content: ""; position: absolute; top: 8px; right: 8px; width: 16px; height: 16px;
  background: no-repeat center/contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%236A5A86' d='M17 9V7A5 5 0 007 7v2H5v13h14V9h-2zM9 7a3 3 0 016 0v2H9V7z'/%3E%3C/svg%3E");
  opacity: .6;
}
.baixar.livre .formatos-dl button::after { display: none; }
.baixar.livre .formatos-dl button { background: #F4FBE3; border-color: #DDEFB0; }
.compartilhar { margin-top: 22px; padding-top: 18px; border-top: 2px dashed var(--linha); }
.compartilhar > p:first-child { font-weight: 800; margin: 0 0 10px; }
.botoes-comp { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 10px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: 999px; padding: 12px 20px; font-weight: 800; font-size: 15px;
  text-decoration: none; transition: transform .1s, box-shadow .1s; cursor: pointer; white-space: nowrap;
}
.btn:active { transform: translateY(3px); }
.primario { background: var(--rosa); color: #fff; box-shadow: 0 5px 0 var(--rosa-escuro); }
.primario:active { box-shadow: 0 2px 0 var(--rosa-escuro); }
.primario:disabled { opacity: .6; cursor: wait; }
.secundario { background: #fff; color: var(--tinta); border: 2px solid var(--linha); box-shadow: 0 3px 0 var(--linha); }
.fantasma { background: transparent; color: var(--tinta-2); text-decoration: underline; text-underline-offset: 3px; }
.zap { background: #25D366; color: #073B1E; box-shadow: 0 3px 0 #1AA34F; }
.tg { background: #2AABEE; color: #fff; box-shadow: 0 3px 0 #1C8BC4; }
.grande { font-size: 17px; padding: 15px 26px; font-family: var(--fonte-titulo); font-weight: 600; letter-spacing: .2px; }
.largo { width: 100%; }

/* ---------- rodapé ---------- */
.rodape { padding: 10px 0 40px; color: var(--tinta-2); font-size: 14px; text-align: center; }
.rodape p { margin: 4px auto; max-width: 70ch; }
.rodape a { color: var(--tinta); font-weight: 700; }

/* ---------- modais ---------- */
.modal { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; padding: 16px; }
.modal-fundo { position: absolute; inset: 0; background: rgba(43,28,70,.55); backdrop-filter: blur(3px); }
.modal-caixa {
  position: relative; background: #fff; border-radius: 30px; padding: 28px;
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  box-shadow: 0 30px 80px rgba(20,10,40,.35); animation: surgir .25s cubic-bezier(.2,.9,.3,1.2);
}
.modal-caixa.estreita { width: min(400px, 100%); text-align: center; }
@keyframes surgir { from { transform: translateY(20px) scale(.97); opacity: 0; } }
.fechar {
  position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%;
  border: 0; background: var(--papel); font-size: 26px; line-height: 1; color: var(--tinta-2);
}
.modal h3 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 24px; margin: 0 0 6px; line-height: 1.15; padding-right: 30px; }
.pag-cab { display: flex; gap: 18px; align-items: center; margin-bottom: 18px; }
.pag-cab canvas { width: 96px; border-radius: 14px; flex: none; box-shadow: 0 0 0 5px #fff, 6px 8px 0 5px var(--amarelo); transform: rotate(-3deg); margin: 6px 10px 10px 4px; }
.valor { font-family: var(--fonte-titulo); font-weight: 700; font-size: 34px; margin: 0; color: var(--rosa-escuro); }
.valor.pequeno { font-size: 24px; margin-bottom: 12px; }
.inclui { margin: 8px 0 0; padding: 0; list-style: none; font-size: 14px; font-weight: 700; color: var(--tinta-2); }
.inclui li { padding-left: 22px; position: relative; margin: 3px 0; }
.inclui li::before { content: ""; position: absolute; left: 0; top: 5px; width: 13px; height: 13px; border-radius: 50%; background: var(--verde); box-shadow: inset 0 0 0 3px #fff, 0 0 0 1.5px var(--verde); }
#formPag { display: grid; gap: 14px; }
.erro { background: #FFE8EF; color: var(--erro); font-weight: 700; font-size: 14px; padding: 10px 14px; border-radius: 12px; margin: 0; }
.mini { font-size: 13px; color: var(--tinta-2); margin: 14px 0 0; text-align: center; }
.qr { display: grid; place-items: center; margin: 0 auto 14px; width: 220px; height: 220px; border-radius: 20px; border: 3px solid var(--linha); overflow: hidden; background: #fff; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.qr .qr-teste { font-weight: 800; color: var(--tinta-2); text-align: center; padding: 20px; font-size: 14px; }
.copia { display: flex; gap: 8px; margin-bottom: 14px; }
.copia input { flex: 1; min-width: 0; border: 2px solid var(--linha); border-radius: 12px; padding: 10px 12px; font-size: 13px; background: var(--papel); }
.passos-pix { margin: 0 0 14px; padding-left: 22px; font-size: 14px; color: var(--tinta-2); font-weight: 600; }
.aguardando { display: flex; align-items: center; gap: 10px; justify-content: center; font-weight: 800; font-size: 14px; background: #FFF8E1; border-radius: 12px; padding: 10px; margin: 0 0 8px; }
.bolinha { width: 12px; height: 12px; border-radius: 50%; background: var(--amarelo); animation: pulsar 1s infinite alternate; }
@keyframes pulsar { to { transform: scale(1.5); background: var(--rosa); } }
.ok-icone { font-size: 64px; text-align: center; animation: pular .6s ease 2; }
@keyframes pular { 50% { transform: translateY(-14px) rotate(-8deg); } }
[data-etapa="ok"] { text-align: center; }
[data-etapa="ok"] .copia { text-align: left; }
.barra { height: 14px; background: var(--linha); border-radius: 999px; overflow: hidden; margin-top: 14px; }
.barra span { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--azul), var(--lilas), var(--rosa), var(--amarelo), var(--verde)); border-radius: 999px; transition: width .2s; }

.aviso {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0)); transform: translate(-50%, 140%);
  background: var(--tinta); color: #fff; font-weight: 800; padding: 12px 22px; border-radius: 999px;
  z-index: 300; transition: transform .3s cubic-bezier(.2,.9,.3,1.2), visibility .3s; visibility: hidden; max-width: calc(100% - 32px); text-align: center; font-size: 15px;
}
.aviso.ver { transform: translate(-50%, 0); visibility: visible; }

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .editor { grid-template-columns: minmax(0, 1fr); grid-template-areas: "palco" "painel" "baixar"; gap: 18px; }
  .palco { position: static; width: 100%; display: flex; flex-direction: column; align-items: center; }
  .moldura { width: min(300px, 74vw); margin: 16px auto 26px; transform: none;
    box-shadow: 0 0 0 8px #fff, 10px 12px 0 8px var(--amarelo), 0 24px 50px -20px rgba(59,42,92,.35); }
  .moldura:hover { transform: none; }
  .palco-controles { justify-content: center; flex-wrap: wrap; gap: 12px 16px; width: 100%; margin-top: 4px; }
  .formatos-dl { grid-template-columns: repeat(3, 1fr); }
  .abertura { padding: 8px 0 6px; text-align: center; margin-inline: auto; }
  .abertura p { margin-inline: auto; }

  /* barra fixa no rodapé do celular */
  .barra-movel {
    display: flex; align-items: center; gap: 10px;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 14px calc(10px + env(safe-area-inset-bottom, 0));
    background: rgba(255,255,255,.96); backdrop-filter: blur(8px);
    box-shadow: 0 -8px 24px -12px rgba(59,42,92,.35); border-radius: 22px 22px 0 0;
    transition: transform .3s ease;
  }
  .barra-movel .ver {
    display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
    border: 0; background: transparent; padding: 0; text-align: left; font-weight: 800; font-size: 14px; color: var(--tinta);
  }
  .barra-movel canvas { width: 40px; height: auto; border-radius: 8px; box-shadow: 0 0 0 3px #fff, 0 2px 8px rgba(59,42,92,.3); flex: none; }
  .barra-movel .ver span { line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .barra-movel .ver small { display: block; font-weight: 700; color: var(--tinta-2); font-size: 12px; }
  .barra-movel .btn { flex: none; padding: 12px 18px; font-size: 15px; }
  body { padding-bottom: calc(84px + env(safe-area-inset-bottom, 0)); }
  .aviso { bottom: calc(96px + env(safe-area-inset-bottom, 0)); }
  .rodape { padding-bottom: 20px; }
}
@media (max-width: 520px) {
  body { font-size: 16px; }
  .wrap { width: calc(100% - 24px); }
  .topo { padding-top: max(12px, env(safe-area-inset-top)); }
  .topo-in { justify-content: center; text-align: center; gap: 6px; }
  .topo-preco { font-size: 13px; }
  .topo-oferta { justify-content: center; gap: 8px; }
  .topo-pagar { padding: 7px 14px; font-size: 13px; }
  .aviso-teste { font-size: 12.5px; padding: 7px 12px; }
  .abertura h1 { font-size: 27px; margin-bottom: 8px; }
  .abertura p { font-size: 15.5px; }
  .painel { padding: 4px 14px 20px; border-radius: 24px; }
  .abas { margin: 0 -14px 14px; padding: 10px 14px; gap: 5px; }
  .abas button { padding: 9px 13px; font-size: 14px; }
  .aba h2, .baixar h2 { font-size: 22px; }
  .baixar { padding: 20px 14px; border-radius: 24px; }
  .baixar-cab { margin-bottom: 14px; }
  .baixar-cab > div { width: 100%; }
  .baixar-cab .btn { width: 100%; }
  .campos { gap: 12px 10px; }
  .sugestoes { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 2px -14px 0; padding: 2px 14px 4px; }
  .sugestoes::-webkit-scrollbar { display: none; }
  .sugestoes button { flex: none; white-space: nowrap; }
  .campo input, .campo textarea { padding: 11px 12px; }
  .grade-temas { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .tema { font-size: 12px; padding: 4px 4px 8px; border-radius: 14px; }
  .tema canvas { border-radius: 10px; margin-bottom: 6px; }
  .grade-fontes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .fonte { min-height: 80px; padding: 10px 6px 8px; }
  .fonte .amostra { font-size: 24px; }
  .filtros { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -14px 14px; padding: 0 14px; }
  .filtros::-webkit-scrollbar { display: none; }
  .filtros button { flex: none; }
  .segmento.pequeno { display: flex; width: 100%; }
  .segmento.pequeno button { flex: 1; padding: 8px 6px; font-size: 13px; }
  .amostras button, .cor-livre { width: 34px; height: 34px; }
  .formatos-dl { gap: 8px; }
  .formatos-dl button { padding: 12px 4px; border-radius: 16px; }
  .formatos-dl b { font-size: 18px; }
  .formatos-dl span { font-size: 11.5px; }
  .botoes-comp { display: grid; grid-template-columns: 1fr 1fr; }
  .botoes-comp .btn { width: 100%; }
  .foto-area { justify-content: center; }
  .foto-acoes { align-items: center; }

  /* modais como "folha" que sobe do rodapé */
  .modal { align-items: end; padding: 0; }
  .modal-caixa { width: 100%; max-height: 92vh; border-radius: 26px 26px 0 0; padding: 22px 18px calc(22px + env(safe-area-inset-bottom, 0)); animation-name: subir; }
  .modal-caixa.estreita { width: 100%; }
  .pag-cab { gap: 14px; }
  .pag-cab canvas { width: 70px; }
  .valor { font-size: 28px; }
  .qr { width: 200px; height: 200px; }
}
@keyframes subir { from { transform: translateY(40px); opacity: 0; } }
@media (max-width: 360px) {
  .abas button { padding: 8px 11px; font-size: 13px; }
  .barra-movel .btn { padding: 11px 14px; font-size: 14px; }
  .barra-movel .ver small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .moldura { transform: none; }
}

/* ---------- seletor de fontes visual ---------- */
.fs-botao { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--linha); background: #fff; border-radius: 14px; padding: 8px 12px; cursor: pointer; min-height: 52px; text-align: left; }
.fs-botao:hover { border-color: var(--lilas); }
.fs-amostra { font-size: 24px; line-height: 1.15; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fs-seta { flex: none; font-family: var(--fonte-texto); font-size: 12.5px; font-weight: 800; color: #fff; background: var(--rosa); border-radius: 999px; padding: 4px 10px; }
.fs-fundo { position: fixed; inset: 0; z-index: 200; background: rgba(43,28,70,.5); display: grid; place-items: center; padding: 16px; animation: fsEntra .18s ease; }
.fs-fundo.saindo { opacity: 0; transition: opacity .18s; }
@keyframes fsEntra { from { opacity: 0; } }
.fs-folha { background: #fff; border-radius: 26px; width: min(680px, 100%); max-height: min(86vh, 760px); display: flex; flex-direction: column; overflow: hidden; box-shadow: 0 30px 80px rgba(20,10,40,.35); }
.fs-topo { display: flex; justify-content: space-between; align-items: center; padding: 16px 18px 6px; font-family: var(--fonte-titulo); font-size: 20px; }
.fs-fechar { width: 40px; height: 40px; border-radius: 50%; border: 0; background: var(--papel); font-size: 26px; line-height: 1; color: var(--tinta-2); cursor: pointer; }
.fs-chips { display: flex; gap: 6px; overflow-x: auto; padding: 6px 18px 12px; scrollbar-width: none; flex: none; }
.fs-chips::-webkit-scrollbar { display: none; }
.fs-chips button { flex: none; border: 2px solid var(--linha); background: #fff; border-radius: 999px; padding: 6px 13px; font-weight: 800; font-size: 13.5px; color: var(--tinta-2); cursor: pointer; }
.fs-chips button[aria-pressed="true"] { background: var(--tinta); border-color: var(--tinta); color: #fff; }
.fs-grade { overflow-y: auto; padding: 4px 18px 18px; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; -webkit-overflow-scrolling: touch; }
.fs-item { border: 2px solid var(--linha); background: #fff; border-radius: 16px; padding: 12px 10px 10px; display: flex; flex-direction: column; align-items: center; gap: 4px; cursor: pointer; min-height: 84px; justify-content: center; }
.fs-item:hover { border-color: var(--lilas); }
.fs-item[aria-pressed="true"] { border-color: var(--rosa); background: #FFF0F8; box-shadow: 0 3px 0 var(--rosa); }
.fs-texto { font-size: 30px; line-height: 1.15; color: var(--tinta); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.fs-item small { font-size: 12px; font-weight: 800; color: var(--tinta-2); }
@media (max-width: 600px) {
  .fs-fundo { place-items: end stretch; padding: 0; }
  .fs-folha { width: 100%; max-height: 88vh; border-radius: 24px 24px 0 0; padding-bottom: env(safe-area-inset-bottom, 0); }
  .fs-grade { grid-template-columns: 1fr 1fr; gap: 8px; padding: 4px 12px 16px; }
  .fs-texto { font-size: 26px; }
}

/* atalhos embaixo da capa e próximo passo */
.palco-atalhos { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; margin-top: 14px; }
.palco-atalhos .btn { flex: 1 1 auto; }
#btnVerTemas { font-family: var(--fonte-titulo); font-weight: 600; font-size: 16px; }
.proximo-passo { margin-top: 18px; padding: 16px 18px; border-radius: 20px; background: linear-gradient(135deg, #FFF0F8, #F1EAFF); border: 2px dashed var(--lilas); display: grid; gap: 10px; }
.proximo-passo b { font-family: var(--fonte-titulo); font-weight: 600; font-size: 19px; }
.proximo-botoes { display: flex; gap: 8px; flex-wrap: wrap; }
@media (max-width: 520px) { .proximo-botoes .btn, .palco-atalhos .btn { width: 100%; } }
.pisca-destaque { animation: piscaDestaque 1.2s ease 2; border-radius: 22px; }
@keyframes piscaDestaque { 50% { box-shadow: 0 0 0 6px rgba(255,110,184,.35); } }

/* galeria no fim da página */
.galeria-final { background: #fff; border-radius: var(--r-grande); padding: 26px; margin-bottom: 40px; box-shadow: 0 1px 0 var(--linha), 0 20px 50px -30px rgba(59,42,92,.35); }
.galeria-final h2 { font-family: var(--fonte-titulo); font-weight: 600; font-size: 28px; margin: 0 0 4px; }
.gal-titulo { font-family: var(--fonte-titulo); font-weight: 600; font-size: 19px; margin: 20px 0 10px; }
.galeria-final .grade-temas { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
.galeria-final .tema canvas { aspect-ratio: auto; height: auto; }
.gal-minha { background: #FFF0F8; }
@media (max-width: 520px) { .galeria-final { padding: 20px 14px; border-radius: 24px; } .galeria-final .grade-temas { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* botão grande "Criar um convite do zero" */
.abertura-cta { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 20px; }
.btn-zero {
  display: inline-flex; align-items: center; gap: 14px; text-align: left; cursor: pointer;
  border: 0; border-radius: 26px; padding: 16px 26px 16px 18px; color: #fff;
  background: linear-gradient(120deg, var(--rosa) 0%, #C77DFF 55%, #6FD3E6 100%);
  background-size: 180% 100%; background-position: 0 0;
  box-shadow: 0 6px 0 #B84E97, 0 18px 40px -14px rgba(255,110,184,.8);
  transition: transform .15s ease, background-position .6s ease, box-shadow .15s ease;
}
.btn-zero:hover { background-position: 100% 0; transform: translateY(-2px); }
.btn-zero:active { transform: translateY(4px); box-shadow: 0 2px 0 #B84E97, 0 10px 24px -14px rgba(255,110,184,.8); }
.btn-zero-ico { font-size: 34px; line-height: 1; display: grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: rgba(255,255,255,.25); animation: brilhaZero 2.4s ease-in-out infinite; }
@keyframes brilhaZero { 0%, 100% { transform: rotate(-8deg) scale(1); } 50% { transform: rotate(8deg) scale(1.1); } }
.btn-zero-txt b { display: block; font-family: var(--fonte-titulo); font-weight: 600; font-size: 24px; line-height: 1.1; text-shadow: 0 2px 0 rgba(59,42,92,.18); }
.btn-zero-txt small { display: block; font-size: 14.5px; font-weight: 700; opacity: .95; margin-top: 3px; }
.abertura-ou { font-weight: 800; color: var(--tinta-2); font-size: 15px; }
@media (max-width: 900px) { .abertura-cta { justify-content: center; } }
@media (max-width: 520px) {
  .btn-zero { width: 100%; padding: 14px 16px; gap: 12px; }
  .btn-zero-ico { width: 48px; height: 48px; font-size: 28px; }
  .btn-zero-txt b { font-size: 20px; }
  .btn-zero-txt small { font-size: 13px; }
  .abertura-ou { width: 100%; text-align: center; }
}
@media (prefers-reduced-motion: reduce) { .btn-zero-ico { animation: none; } }
