/* /perfil — gerador de foto de perfil com a faixa da campanha.
   Herda tokens, .tile e .btn de /styles.css; aqui só o que é desta página. */

.wrap-perfil { padding-top: 20px; }

.voltar {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 13.5px; font-weight: 700; color: var(--ink-2);
  padding: 6px 10px 6px 4px; margin-left: -4px; border-radius: 999px;
}
.voltar svg { width: 16px; height: 16px; }
.voltar:hover { color: var(--orange); }

.perfil-hero { margin: 12px 0 26px; }
.perfil-hero h1 {
  font-size: clamp(28px, 8vw, 36px); line-height: 1.05;
  letter-spacing: -.03em; font-weight: 900;
}
.perfil-hero p {
  margin-top: 10px; max-width: 44ch;
  font-size: 15px; color: var(--ink-2); text-wrap: pretty;
}

/* ===== Passos ===== */
.passo { margin-bottom: 28px; }
.passo-titulo {
  display: flex; align-items: center; gap: 9px;
  font-size: 17px; font-weight: 800; letter-spacing: -.02em;
  margin-bottom: 12px;
}
.passo-n {
  display: grid; place-items: center;
  width: 24px; height: 24px; flex: none;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: 13px; font-weight: 900;
}

/* ===== Escolha da faixa ===== */
.molduras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; }
.moldura {
  display: grid; gap: 7px; padding: 7px 7px 9px;
  border-radius: 14px; background: var(--white);
  border: 2px solid var(--line); box-shadow: var(--shadow);
  transition: border-color .18s ease, transform .15s ease, background .18s ease;
}
.moldura:hover { transform: translateY(-2px); }
.moldura:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; }
.moldura[aria-checked="true"] {
  border-color: var(--orange); background: var(--orange-soft);
}
/* O fundo laranja aqui é só palco pra miniatura: a moldura é transparente
   em cima, então sem ele a faixa flutuaria no branco e não se leria. */
.moldura-art {
  display: block; position: relative; overflow: hidden;
  border-radius: 9px; background: var(--orange);
  aspect-ratio: 1;
}
.moldura-art img { width: 100%; height: 100%; }
.moldura-nome {
  font-size: 11.5px; font-weight: 700; color: var(--ink-2);
  line-height: 1.2; text-align: center;
}
.moldura-nome b { color: var(--ink); }
.moldura[aria-checked="true"] .moldura-nome,
.moldura[aria-checked="true"] .moldura-nome b { color: var(--orange-dark); }

/* ===== Palco (canvas) ===== */
.palco {
  position: relative; width: 100%; max-width: 380px; margin: 0 auto;
  aspect-ratio: 1; border-radius: 18px; overflow: hidden;
  background:
    repeating-conic-gradient(#efe6dd 0 25%, #f8f2ec 0 50%) 0 0 / 26px 26px;
  box-shadow: var(--shadow);
  touch-action: none;         /* o pan/pinch é nosso, não do scroll da página */
  user-select: none; -webkit-user-select: none;
}
.palco canvas { display: block; width: 100%; height: 100%; }
.palco.is-vazio canvas { visibility: hidden; }
.palco.tem-foto { cursor: grab; }
.palco.tem-foto.arrastando { cursor: grabbing; }
.palco.arrasta-over { outline: 3px dashed var(--orange); outline-offset: -6px; }

/* A máscara escurece o que o app vai cortar. Cor sólida por cima, buraco no
   meio via box-shadow gigante — funciona em todo navegador que importa. */
.palco-mascara {
  position: absolute; inset: 0; pointer-events: none;
  opacity: 0; transition: opacity .22s ease;
}
.palco[data-formato="circulo"].tem-foto .palco-mascara { opacity: 1; }
.palco-mascara::before {
  content: ""; position: absolute; inset: 0;
  border-radius: 50%;
  box-shadow: 0 0 0 9999px rgba(253, 246, 239, .78);
}

.solta {
  position: absolute; inset: 0; display: grid; place-content: center;
  justify-items: center; gap: 4px; padding: 24px; text-align: center;
  cursor: pointer; background: var(--bg-2);
}
.palco.tem-foto .solta { display: none; }
.solta input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.solta-ic {
  display: grid; place-items: center; width: 52px; height: 52px;
  margin-bottom: 6px; border-radius: 16px;
  background: var(--orange-soft); color: var(--orange);
}
.solta-ic svg { width: 26px; height: 26px; }
.solta strong { font-size: 15.5px; font-weight: 800; letter-spacing: -.01em; }
.solta small { font-size: 12.5px; color: var(--ink-2); }
.solta:hover .solta-ic { background: var(--orange); color: #fff; }
.solta input:focus-visible ~ .solta-ic { outline: 3px solid var(--blue); outline-offset: 3px; }

.palco-dica {
  /* No TOPO: embaixo ela cairia justo em cima da faixa, escondendo o lockup
     que a pessoa está ali pra conferir. */
  position: absolute; left: 50%; top: 10px; transform: translateX(-50%);
  padding: 5px 12px; border-radius: 999px;
  background: rgba(22, 17, 13, .62); color: #fff;
  font-size: 11.5px; font-weight: 600; white-space: nowrap;
  pointer-events: none; transition: opacity .4s ease;
}

/* ===== Controles ===== */
.controles { max-width: 380px; margin: 14px auto 0; display: grid; gap: 12px; }

.zoom { display: grid; grid-template-columns: 34px 1fr 34px; align-items: center; gap: 10px; }
.zoom-btn {
  width: 34px; height: 34px; border-radius: 10px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 19px; font-weight: 700; line-height: 1;
  display: grid; place-items: center; color: var(--ink-2);
}
.zoom-btn:hover { border-color: var(--orange); color: var(--orange); }
.zoom input[type="range"] { width: 100%; accent-color: var(--orange); height: 22px; }

.controles-linha { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.mini {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 9px 6px; border-radius: 11px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.mini svg { width: 15px; height: 15px; flex: none; }
.mini:hover { border-color: var(--orange); color: var(--orange); }

.formatos {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 12px; background: var(--white);
  border: 1px solid var(--line);
}
.formato {
  padding: 8px 6px; border-radius: 9px;
  font-size: 12.5px; font-weight: 700; color: var(--ink-2);
}
.formato.is-on { background: var(--blue-soft); color: var(--blue); }

.nota-formato { font-size: 12px; color: var(--ink-2); line-height: 1.45; text-align: center; }

/* ===== Ações ===== */
.btn-laranja { background: var(--orange); color: #fff; width: 100%; box-shadow: var(--shadow-lift); }
.btn-laranja:hover:not(:disabled) { background: var(--orange-dark); }
.btn-laranja:disabled, .btn-azul:disabled { opacity: .45; cursor: not-allowed; box-shadow: none; }
.btn-azul { background: var(--blue); color: #fff; width: 100%; }
.btn-azul:hover:not(:disabled) { background: var(--blue-dark); }
.btn svg { width: 18px; height: 18px; flex: none; }

.privacidade {
  display: flex; align-items: flex-start; gap: 8px;
  margin-top: 14px; font-size: 12.5px; color: var(--ink-2); line-height: 1.45;
}
.privacidade svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--green); }

.ajuda {
  margin-top: 16px; padding: 14px 16px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--r); box-shadow: var(--shadow);
}
.ajuda summary { font-size: 14px; font-weight: 800; cursor: pointer; letter-spacing: -.01em; }
.ajuda summary::-webkit-details-marker { display: none; }
.ajuda summary::after { content: " ↓"; color: var(--orange); }
.ajuda[open] summary::after { content: " ↑"; }
.ajuda p { margin-top: 10px; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.ajuda strong { color: var(--ink); }
.ajuda-ios { padding-top: 10px; border-top: 1px dashed var(--line-2); }

.tile-fim { margin-top: 30px; }

/* Aviso curto (erro de arquivo, etc.) */
.aviso {
  margin-top: 12px; padding: 11px 14px; border-radius: 12px;
  background: #fff2f0; border: 1px solid #f7c7bf; color: #a32a10;
  font-size: 13px; font-weight: 600;
}

@media (prefers-reduced-motion: reduce) {
  .moldura, .palco-mascara, .palco-dica { transition: none; }
  .moldura:hover { transform: none; }
}
