:root {
  --cream: #fbf6ec;
  --paper: #fffdf8;
  --gold: #c8922e;
  --gold-soft: #f1dfb8;
  --ink: #3a2a1c;
  --ink-soft: #6f5d4c;
  --line: #e8dcc6;
  --ok: #2f6b4a;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  line-height: 1.55;
}
a { color: #8a5f12; }
.wrap { max-width: 1040px; margin: 0 auto; padding: 0 20px; }

header { padding: 18px 0; }
.top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand svg { width: 34px; height: 34px; }
.brand span { font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; letter-spacing: .01em; }
.badge {
  margin-left: auto; font-size: .78rem; color: var(--ink-soft);
  border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px; background: var(--paper);
}
.conta { display: flex; align-items: center; gap: 10px; font-size: .9rem; color: var(--ink-soft); }

.hero {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(217,164,65,.38), transparent 60%),
    radial-gradient(700px 380px at 0% 0%, rgba(241,223,184,.7), transparent 65%);
  padding: 36px 0 56px;
}
.grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 44px; align-items: start; }
h1 {
  font-family: Georgia, "Times New Roman", serif; font-weight: 400;
  font-size: clamp(2rem, 4.6vw, 3.2rem); line-height: 1.12; margin: 24px 0 16px;
}
h1 em { font-style: italic; color: var(--gold); }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 34em; margin: 0 0 26px; }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; }
.num {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: var(--gold-soft); color: var(--ink); font-weight: 600;
  display: grid; place-items: center; font-family: Georgia, serif;
}
.steps strong { display: block; }
.steps small { color: var(--ink-soft); font-size: .95rem; }

.card {
  background: var(--paper); border: 1px solid var(--line); border-radius: 18px;
  padding: 26px; box-shadow: 0 18px 40px -24px rgba(90,60,20,.35);
}
.card h2, .meus h2 { font-family: Georgia, serif; font-weight: 400; font-size: 1.5rem; margin: 0 0 4px; }
p.sub { margin: 0 0 20px; color: var(--ink-soft); font-size: .95rem; }
label { display: block; font-weight: 600; font-size: .95rem; margin: 16px 0 6px; }
label .hint { font-weight: 400; color: var(--ink-soft); }
input[type="text"], input[type="email"], textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px;
}
textarea { min-height: 92px; resize: vertical; }
input:focus, textarea:focus, .drop:focus-within { outline: 2px solid var(--gold); outline-offset: 1px; }

.drop {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  border: 1.5px dashed #d9c7a3; border-radius: 12px; padding: 14px; background: #fffaf0;
  font-weight: 400; margin: 0;
}
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.thumb {
  flex: none; width: 64px; height: 64px; border-radius: 10px; background: var(--gold-soft);
  display: grid; place-items: center; overflow: hidden; color: var(--gold);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.drop b { display: block; }
.drop span.small { color: var(--ink-soft); font-size: .9rem; }

.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: .9rem; color: var(--ink-soft); margin-top: 18px; }
.check input { margin-top: 4px; flex: none; width: 18px; height: 18px; accent-color: var(--gold); }

button {
  margin-top: 22px; width: 100%; font: inherit; font-weight: 600; font-size: 1.05rem;
  color: #fff; background: var(--gold); border: 0; border-radius: 12px; padding: 14px 18px; cursor: pointer;
}
button:hover { background: #b6831f; }
button:disabled { opacity: .6; cursor: wait; }
button.sec { background: #fff; color: var(--ink); border: 1px solid var(--line); margin-top: 10px; }
button.sec:hover { background: #fff8ea; }
button.link { width: auto; margin: 0; padding: 0; background: none; color: #8a5f12; font-size: .9rem; font-weight: 600; text-decoration: underline; }

.ou { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: .85rem; margin: 20px 0 6px; }
.ou::before, .ou::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.note { font-size: .85rem; color: var(--ink-soft); margin: 12px 0 0; }
.status {
  display: none; margin-top: 16px; padding: 14px 16px; border-radius: 12px;
  background: #eef6f0; border: 1px solid #cfe3d6; color: var(--ok); font-size: .95rem;
}
.status.show { display: block; }
.status.err { background: #fbeeee; border-color: #ecc9c9; color: #8a2c2c; }

.meus { padding: 34px 20px 10px; }
/* Histórico em linha do tempo */
.lista { list-style: none; padding: 0 0 0 22px; margin: 0; display: grid; gap: 22px; border-left: 2px solid var(--gold-soft); }
.pedido {
  position: relative; background: var(--paper); border: 1px solid var(--line);
  border-radius: 16px; padding: 18px; box-shadow: 0 12px 30px -24px rgba(90,60,20,.4);
}
.pedido::before {
  content: ""; position: absolute; left: -31px; top: 22px; width: 14px; height: 14px;
  border-radius: 50%; background: var(--gold); border: 3px solid var(--cream);
}
.pedido-topo { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.data { color: var(--ink-soft); font-size: .9rem; }
.pedido-texto { margin: 10px 0 14px; }
.pedido-texto b { font-family: Georgia, serif; font-weight: 400; font-size: 1.25rem; }
.pedido-texto p { margin: 4px 0 0; color: var(--ink-soft); }
.pedido-fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 14px; }
.quadro { margin: 0; }
.quadro img, .quadro .vazio {
  display: block; width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 12px;
  background: var(--gold-soft);
}
.quadro .vazio {
  display: grid; place-items: center; text-align: center; padding: 12px;
  color: var(--ink-soft); font-size: .9rem; border: 1.5px dashed #d9c7a3; background: #fffaf0;
}
/* a foto original aparece inteira (sem cortar o rosto) */
.pedido-fotos .quadro:first-child img { object-fit: contain; background: #f3ead8; }
.quadro .ver { all: unset; display: block; width: 100%; cursor: zoom-in; border-radius: 12px; }
.quadro .ver:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.quadro .ver:hover img { filter: brightness(1.04); }

/* Visor de foto */
.visor {
  position: fixed; inset: 0; z-index: 50; background: rgba(30, 20, 10, .92);
  display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 18px;
}
.visor-area { max-width: 100%; max-height: calc(100vh - 90px); overflow: hidden; display: grid; place-items: center; }
.visor-area img { max-width: 100%; max-height: calc(100vh - 90px); border-radius: 10px; cursor: zoom-in; display: block; }
.visor.zoom .visor-area { overflow: auto; width: 100%; height: calc(100vh - 90px); place-items: start; }
.visor.zoom .visor-area img { max-width: none; max-height: none; width: 200%; cursor: zoom-out; border-radius: 0; }
.visor-legenda { color: #f3e6cc; font-size: .9rem; margin: 12px 0 0; text-align: center; }
.visor-fechar {
  position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; margin: 0; padding: 0;
  border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font-size: 1.8rem; line-height: 1;
}
.visor-fechar:hover { background: rgba(255,255,255,.26); }
/* Progresso da criação */
.progresso { margin-top: 14px; }
.progresso-trilho { height: 10px; border-radius: 999px; background: var(--gold-soft); overflow: hidden; }
.progresso-barra {
  height: 100%; width: 0; border-radius: 999px; transition: width 1s linear;
  background: linear-gradient(90deg, #d9a441, var(--gold));
}
.progresso-texto { margin: 6px 0 0; font-size: .9rem; color: var(--ink-soft); }
.aviso { margin: 12px 0 0; font-size: .9rem; color: #8a2c2c; }
.pedido > button.sec { width: auto; padding: 10px 18px; font-size: .95rem; }

.quadro figcaption { font-size: .85rem; color: var(--ink-soft); margin-top: 6px; }
.pill { font-size: .78rem; border-radius: 999px; padding: 3px 10px; background: var(--gold-soft); white-space: nowrap; }
.pill.st-pronto { background: #dff0e5; color: var(--ok); }
.pill.st-erro { background: #fbeeee; color: #8a2c2c; }

footer { border-top: 1px solid var(--line); padding: 22px 0 34px; color: var(--ink-soft); font-size: .9rem; margin-top: 40px; }

.doc { max-width: 760px; padding: 20px 20px 40px; }
.doc h1 { font-size: 2rem; }
.doc h2 { font-family: Georgia, serif; font-weight: 400; margin-top: 28px; }

@media (max-width: 820px) {
  .grid { grid-template-columns: 1fr; gap: 30px; }
  .hero { padding-top: 12px; }
  .badge { display: none; }
  .conta { margin-left: auto; }
}
