:root {
  --bg: #fdf1e3;
  --card: #ffffff;
  --orange: #ffa153;
  --orange-dark: #d9531e;
  --purple: #8e5ba6;
  --ink: #2b2230;
  --muted: #6b6170;
  --line: #e7dccf;
  --error: #c62828;
  --radius: 10px;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
}
* { box-sizing: border-box; }
body { margin: 0; }
.wrap { max-width: 680px; margin: 0 auto; padding: 12px 12px 48px; }

.banner { display: block; width: 100%; height: auto; border-radius: var(--radius); margin-bottom: 12px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin: 0 0 12px;
}
.intro { border-top: 10px solid var(--orange); }
.intro h1 { font-size: 1.75rem; margin: 0 0 12px; color: var(--purple); letter-spacing: -.01em; }
.intro p { line-height: 1.55; }
.info { margin: 16px 0; display: grid; gap: 8px; }
.info div { display: grid; grid-template-columns: 90px 1fr; gap: 8px; }
.info dt { font-weight: 600; color: var(--purple); }
.info dd { margin: 0; }
.preco { line-height: 1.5; background: #fff4ea; border-radius: 8px; padding: 10px 12px; }
.req-note { color: var(--error); font-size: .85rem; margin: 12px 0 0; }
.req { color: var(--error); }

fieldset.card { min-width: 0; }
.field > label:not(.opt), .field > legend { display: block; font-weight: 500; line-height: 1.45; margin-bottom: 14px; padding: 0; }
fieldset.field legend { float: left; width: 100%; }
fieldset.field legend + * { clear: both; }

input:not([type=radio]), textarea {
  width: 100%;
  font: inherit;
  color: inherit;
  border: 0;
  border-bottom: 1px solid var(--line);
  padding: 8px 2px;
  background: transparent;
  transition: border-color .15s;
}
textarea { resize: vertical; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
input:focus, textarea:focus { outline: none; border-color: var(--purple); box-shadow: 0 1px 0 var(--purple); }
textarea:focus { box-shadow: 0 0 0 1px var(--purple); }

.opt { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; cursor: pointer; line-height: 1.4; }
.opt input[type=radio] { accent-color: var(--purple); width: 18px; height: 18px; margin: 1px 0 0; flex: none; }
.opt-outro { align-items: center; }
.opt-outro .inline { flex: 1; padding: 4px 2px; }
.opt.esgotado { opacity: .5; cursor: not-allowed; }
.vagas { color: var(--muted); font-size: .8rem; margin-left: 4px; white-space: nowrap; }

.error { color: var(--error); font-size: .85rem; margin: 8px 0 0; min-height: 0; }
.error:empty { display: none; }
.field.invalid { border-color: var(--error); }

.form-error { background: #fdecea; color: var(--error); border-radius: 8px; padding: 12px 14px; }

.actions { display: flex; justify-content: space-between; align-items: center; margin-top: 4px; }
button { font: inherit; cursor: pointer; }
#submit {
  background: var(--orange-dark); color: #fff; border: 0; border-radius: 6px;
  padding: 10px 26px; font-weight: 600;
}
#submit:hover { filter: brightness(1.07); }
#submit:disabled { opacity: .6; cursor: progress; }
.link { background: none; border: 0; color: var(--orange-dark); font-weight: 500; }

.sucesso { border-top: 10px solid var(--purple); text-align: center; padding: 32px 22px; }
.sucesso h2 { color: var(--purple); margin-top: 0; }
.sucesso a { color: var(--orange-dark); font-weight: 600; }

@media (max-width: 480px) {
  .card { padding: 16px; }
  .intro h1 { font-size: 1.45rem; }
  .info div { grid-template-columns: 1fr; gap: 0; }
}

.rodape { text-align: center; margin-top: 40px; padding-top: 28px; border-top: 1px dashed var(--line); color: var(--muted); }
.rodape img { width: 150px; height: auto; display: block; margin: 0 auto 12px; }
.rodape p { margin: 0; font-size: .85rem; line-height: 1.6; }
.voltar {
  display: inline-block; margin-top: 16px; padding: 8px 18px; border-radius: 999px;
  border: 1.5px solid var(--purple); color: var(--purple); font-weight: 600; font-size: .9rem; text-decoration: none;
}
.voltar:hover { background: var(--purple); color: #fff; }
.rodape-logo { display: inline-block; }

.pix { text-align: center; border-top: 10px solid #32bcad; padding: 28px 22px; }
.pix h2 { color: var(--purple); margin: 0 0 6px; font-size: 1.3rem; }
.pix-valor { font-size: 1.6rem; font-weight: 700; margin: 4px 0 14px; }
.pix-valor small { display: block; font-size: .85rem; font-weight: 500; color: var(--muted); }
#pix-qr { width: 240px; height: 240px; max-width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 8px; background: #fff; }
.pix-dica { color: var(--muted); font-size: .9rem; line-height: 1.5; }
.pix-copia { display: flex; gap: 8px; max-width: 460px; margin: 0 auto; }
.pix-copia input { flex: 1; min-width: 0; font-family: ui-monospace, monospace; font-size: .8rem; border: 1px solid var(--line); border-radius: 8px; padding: 10px; }
.pix-copia button { flex: none; background: var(--purple); color: #fff; border: 0; border-radius: 8px; padding: 10px 14px; font-weight: 600; }
.pix-copia button.ok { background: #2e7d32; }
.pix-status { margin: 18px 0 4px; font-weight: 600; color: var(--orange-dark); display: inline-flex; align-items: center; gap: 8px; }
.pix-status.pago { color: #2e7d32; }
.pix-status.erro { color: var(--error); }
.pix-expira, .pix-alt { font-size: .85rem; color: var(--muted); margin: 6px 0 0; }
.pix-alt a { color: var(--orange-dark); font-weight: 600; }
.spinner { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }
