/* Páginas do Gerador de objetos: prévia grande + passos numerados */
@font-face { font-family: "G-arredondado"; src: url("/assets/fonts-3d/LilitaOne-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "G-forte"; src: url("/assets/fonts-3d/ArchivoBlack-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "G-elegante"; src: url("/assets/fonts-3d/Pacifico-Regular.ttf") format("truetype"); font-display: swap; }
@font-face { font-family: "G-estreito"; src: url("/assets/fonts-3d/BebasNeue-Regular.ttf") format("truetype"); font-display: swap; }

.gen { gap: 18px; }
.genwrap { display: flex; flex-wrap: wrap; gap: 22px; align-items: flex-start; }
.preview { flex: 3 1 560px; min-width: 0; overflow: hidden; display: flex; flex-direction: column; border-radius: 22px; position: sticky; top: 16px; }
.stage { position: relative; height: min(68vh, 600px); min-height: 360px; background: radial-gradient(circle at 50% 35%, var(--surface), var(--sunk)); }
.stage canvas { display: block; position: absolute; inset: 0; touch-action: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; color: var(--subtle); margin: 0; }
.stagebar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line); }
.fit { font-size: 14px; font-weight: 700; }
.fit.ok { color: var(--ok-fg); }
.fit.bad { color: var(--danger); }
.gen .steps { padding: 0; margin: 0; list-style: none; }
.steps { flex: 2 1 360px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.step { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; border-radius: 18px; }
.sh { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.sh i { font-style: normal; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-fg); display: grid; place-items: center; font-size: 14px; flex: none; }
.step textarea { font: inherit; font-size: 20px; font-weight: 600; color: var(--fg); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; resize: vertical; min-height: 54px; }
.styles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.styles button { font: inherit; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 12px 8px; border-radius: 14px; cursor: pointer; background: var(--surface); color: var(--fg); border: 1px solid var(--line-strong); }
.styles button[aria-checked="true"] { border: 2px solid var(--link); background: var(--primary-soft); }
.styles .aa { font-size: 30px; line-height: 1.15; }
.styles small { font-size: 13px; font-weight: 600; color: var(--muted); }
.colorrow { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.colorrow > span { width: 56px; font-size: 14px; font-weight: 600; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; }
.swatches button { width: 34px; height: 34px; border-radius: 50%; cursor: pointer; border: 1px solid var(--line-strong); }
.swatches button[aria-checked="true"] { outline: 3px solid var(--fg); outline-offset: 2px; }
.more { padding: 14px 20px; border-radius: 16px; }
.more summary { cursor: pointer; font-weight: 700; }
.moregrid { display: grid; gap: 14px; padding-top: 14px; }
.rangef { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.rangef b { float: right; color: var(--link); }
.rangef input { accent-color: var(--primary); }
.field2 { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; }
.check { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 14px; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
.btn.big { font-size: 17px; font-weight: 800; padding: 16px; border-radius: 14px; }
.center { text-align: center; }
.linkbtn { font: inherit; background: none; border: 0; padding: 0; color: var(--link); font-weight: 700; cursor: pointer; text-decoration: underline; }
@media (max-width: 960px) { .preview { position: static; } .stage { height: 380px; } }
.note { margin: 0; font-size: 14px; line-height: 1.5; background: var(--warn-bg); color: var(--warn-fg); border-radius: 12px; padding: 10px 14px; }
.step input[type="text"], .step input[type="tel"], .step input[type="number"], .moregrid input[type="text"] { font: inherit; font-size: 18px; font-weight: 600; color: var(--fg); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: 10px 14px; width: 100%; box-sizing: border-box; }
.step label.lf { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 14px; color: var(--muted); }
.dims { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.dims input { text-align: center; }
.step .seg { align-self: flex-start; }
.hint { display: block; font-size: 13px; font-weight: 500; line-height: 1.45; color: var(--subtle); }
.rangef .hint { margin-top: -2px; }
.check { align-items: flex-start; }
.check > span { display: flex; flex-direction: column; gap: 2px; }
.dims.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dims input { font: inherit; font-size: 18px; font-weight: 600; color: var(--fg); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: 8px 10px; width: 100%; box-sizing: border-box; }
.rf-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.numbox { width: 86px; font: inherit; font-size: 17px; font-weight: 700; text-align: center; color: var(--fg); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 10px; padding: 5px 6px; }
.numbox:focus { border-color: var(--link); outline: none; }
.drag-hint { background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; color: var(--fg); }
.step .btn.secondary { align-self: flex-start; }
.field2 select { width: 100%; max-width: 100%; min-width: 0; text-overflow: ellipsis; }

/* campos que aparecem ao marcar uma opção (QR Code) */
.sub { display: flex; flex-direction: column; gap: 10px; padding-left: 28px; }
.sub[hidden] { display: none; }
.grp { display: flex; flex-direction: column; gap: 10px; }
.grp[hidden] { display: none; }
/* passos numerados sozinhos (os escondidos não contam) */
.steps { counter-reset: passo; }
.steps > .step:not([hidden]) { counter-increment: passo; }
.sh i.n::before { content: counter(passo); }
/* linhas de rede social: rede + perfil */
.netrow { display: grid; grid-template-columns: minmax(0, 150px) minmax(0, 1fr); gap: 8px; align-items: start; }
.netrow > :not(select) { grid-column: 2; }
.netrow > span.small { align-self: center; }
.netrow select { font: inherit; font-size: 16px; font-weight: 600; color: var(--fg); background: var(--surface); border: 2px solid var(--line-strong); border-radius: 12px; padding: 10px; min-width: 0; }

/* modelos prontos no topo dos passos */
.prontos { background: var(--primary-soft); border-color: transparent; }
.prontos-l { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.prontos-l button { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); cursor: pointer; }
.prontos-l button b { font-size: 15px; }
.prontos-l button span { font-size: 13px; color: var(--muted); line-height: 1.35; }
.prontos-l button:hover { border-color: var(--link); }
.prontos-l button[aria-pressed="true"] { border: 2px solid var(--link); padding: 9px 11px; }

/* continuar de onde parou */
.volta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; background: var(--ok-bg); border: 1px solid var(--ok-line); border-radius: 16px; padding: 14px 18px; }
.volta p { margin: 0; flex: 1 1 280px; font-size: 16px; line-height: 1.5; color: var(--fg); overflow-wrap: anywhere; }
.volta .btn { flex: none; }

/* ---------- linhas de texto (várias linhas, cada uma com o seu tamanho) ---------- */
.linhas { display: grid; gap: 12px; }
.linhas .mais-l { display: grid; gap: 12px; }
.linhas .mais-l:empty { display: none; }
.lin { display: grid; grid-template-columns: minmax(0, 1fr) auto 40px; gap: 8px; align-items: end; }
.lin label, .lin .tam { display: grid; gap: 4px; min-width: 0; }
.lin .nm { font-size: 13px; font-weight: 600; color: var(--muted); }
.lin input[type="text"] { width: 100%; min-width: 0; }
.tamn { display: flex; align-items: stretch; height: 44px; border: 2px solid var(--line-strong); border-radius: 10px; overflow: hidden; background: var(--surface); }
.tamn button { width: 34px; border: 0; background: transparent; color: var(--fg); font: inherit; font-size: 20px; cursor: pointer; }
.tamn button:hover { background: var(--sunk); }
.step .tamn input[type="number"], .tamn input { width: 52px; height: 100%; border: 0; border-radius: 0; box-shadow: none; background: transparent; color: var(--fg); font: inherit; font-size: 17px; font-weight: 700; text-align: center; font-variant-numeric: tabular-nums; -moz-appearance: textfield; padding: 0; }
.tamn input::-webkit-outer-spin-button, .tamn input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.tamn:focus-within { border-color: var(--link); }
.xl { width: 40px; height: 44px; border: 2px solid var(--line-strong); background: transparent; color: var(--muted); border-radius: 10px; font-size: 17px; cursor: pointer; }
.xl:hover { color: var(--danger); border-color: var(--danger); }
.addl { justify-self: start; background: transparent; color: var(--link); border: 2px dashed var(--link); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 700; cursor: pointer; }
.addl:hover { background: var(--primary-soft); }
.tudo-l { padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 420px) { .lin { grid-template-columns: minmax(0, 1fr) auto; } .lin .xl, .lin .xvazio { grid-column: 2; justify-self: end; } }
.lf-t { font-weight: 600; font-size: 14px; color: var(--muted); }

/* coluna simples que some com [hidden] */
.pilha { display: grid; gap: 10px; }
.pilha[hidden] { display: none; }

/* Montar (vista de cima) — cartão de visita e QR Code */
.montarbar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 1px solid var(--line); }
.montarbar .seg { flex-wrap: wrap; }
.montarbar [hidden] { display: none; }
.stage canvas.montar { z-index: 2; cursor: default; outline: none; }
.stage canvas.montar[hidden] { display: none; }
.stage canvas.montar:focus-visible { box-shadow: inset 0 0 0 3px var(--primary); }
.montarsel { display: grid; gap: 10px; padding: 12px 16px; border-top: 1px solid var(--line); }
.montarsel[hidden] { display: none; }
.montarsel .ms-dica { margin: 0; color: var(--muted); font-size: 15px; }
.montarsel .ms-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16px; }
.montarsel .ms-acoes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.montarsel .setas { display: flex; gap: 4px; }
.montarsel .setas button { width: 40px; height: 36px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--fg); font-size: 17px; cursor: pointer; }
.montarsel .setas button:hover { border-color: var(--primary); }
.montarsel .linkbtn { justify-self: start; }
.logo-cor > span { width: auto; min-width: 56px; display: inline-flex; align-items: center; gap: 6px; }
.logo-cor .chipo { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 1px solid var(--line-strong); }
.swatches button.sem { background: var(--surface); color: var(--muted); font-size: 15px; font-weight: 700; }
#logoDrop.over { outline: 3px dashed var(--primary); outline-offset: -6px; }
#logoTem .imgprev { display: flex; align-items: center; gap: 12px; cursor: pointer; }
#logoTem .imgprev img { width: 72px; height: 72px; object-fit: contain; border-radius: 10px; border: 1px solid var(--line); background: var(--surface); }
.rangef .rf-ends { display: flex; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
