/* Aparência das páginas "personalizar" e "painel" */
:root {
  --bg: #fffaf7; --surface: #ffffff; --blush: #f8e3e4; --beige: #f1e6da;
  --cherry: #b3122e; --wine: #6e0f22; --pink: #e8a3ad; --fg: #3b1d22; --muted: #7d5f63; --line: #ecd8d6;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--fg); font-family: "DM Sans", system-ui, sans-serif; line-height: 1.5; }
h1, h2, h3 { font-family: "Fraunces", Georgia, serif; color: var(--wine); line-height: 1.15; margin: 0; }
.faixa { background: var(--wine); color: #f3d3d8; text-align: center; font-size: 13px; padding: 6px 16px; }
.wrap { max-width: 1080px; margin: 0 auto; padding: 24px 16px 56px; }
.topo { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 24px; }
.marca { font-family: "Playfair Display", Georgia, serif; font-weight: 900; font-size: 24px; color: var(--cherry); text-decoration: none; }
.marca span { font-family: "Pinyon Script", cursive; font-weight: 400; font-size: 30px; color: var(--wine); }
.colunas { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; align-items: start; margin-top: 20px; }
.colunas > * { min-width: 0; }
.caixa { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.previa { position: sticky; top: 16px; }
canvas { width: 100%; height: auto; display: block; border-radius: 12px; }
#arte { border: 1px dashed var(--pink); }
label { display: flex; flex-direction: column; gap: 6px; font-weight: 700; font-size: 14px; }
label.linha { flex-direction: row; align-items: flex-start; font-weight: 400; }
input, select, textarea { font: inherit; font-weight: 400; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--fg); max-width: 100%; }
input[type="range"] { padding: 0; accent-color: var(--cherry); }
input[type="checkbox"] { margin-top: 4px; accent-color: var(--cherry); }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dupla > * { min-width: 0; }
.cores { display: flex; gap: 10px; flex-wrap: wrap; }
.cor { width: 36px; height: 36px; border-radius: 50%; border: 2px solid var(--line); cursor: pointer; padding: 0; }
.cor[aria-pressed="true"] { outline: 3px solid var(--cherry); outline-offset: 2px; }
.btn { font: inherit; font-weight: 700; background: var(--cherry); color: #fff; border: 2px solid var(--cherry); border-radius: 999px; padding: 12px 22px; cursor: pointer; text-decoration: none; display: inline-block; text-align: center; }
.btn.claro { background: transparent; color: var(--cherry); }
.btn:disabled { opacity: .5; cursor: wait; }
.total { background: var(--blush); border-radius: 14px; padding: 12px 16px; }
.total strong { font-family: "Fraunces", Georgia, serif; font-size: 26px; color: var(--cherry); }
.aviso { color: var(--cherry); font-weight: 700; min-height: 1.5em; margin: 0; }
.pequeno { font-size: 13px; color: var(--muted); margin: 0; }
.pequeno a { color: var(--cherry); }
.lista { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }
.pedido { display: grid; grid-template-columns: 1.2fr 1fr; gap: 20px; }
.pedido > * { min-width: 0; overflow-wrap: anywhere; }
.pedido img { width: 100%; border-radius: 12px; border: 1px solid var(--line); }
.info { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.info p { margin: 0; }
@media (max-width: 780px) {
  .colunas, .pedido { grid-template-columns: 1fr; }
  .previa { position: static; order: -1; } /* no celular a prévia vem primeiro */
}

/* seletor de cores arco-íris */
.cor.criar { background: conic-gradient(#f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.misturador { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; padding: 14px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; }
input[type="range"].arco { -webkit-appearance: none; appearance: none; width: 100%; height: 26px; border: 0; border-radius: 999px; cursor: pointer; background: linear-gradient(to right, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00); }
.arco::-webkit-slider-thumb { -webkit-appearance: none; width: 30px; height: 30px; border-radius: 50%; background: transparent; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--wine); }
.arco::-moz-range-thumb { width: 24px; height: 24px; border-radius: 50%; background: transparent; border: 4px solid #fff; box-shadow: 0 0 0 2px var(--wine); }
.quadro { position: relative; height: 170px; margin: 0 12px; border-radius: 6px; cursor: crosshair; touch-action: none; background-image: linear-gradient(to top, #000, transparent), linear-gradient(to right, #fff, transparent); }
.ponto { position: absolute; width: 24px; height: 24px; border-radius: 50%; border: 3px solid #fff; box-shadow: 0 0 0 2px rgba(0,0,0,.5); transform: translate(-50%, -50%); pointer-events: none; }
.amostra { height: 34px; border-radius: 10px; border: 1px solid var(--line); }
.info .mensagem { white-space: pre-line; font-size: 14px; background: var(--beige); border-radius: 12px; padding: 12px; margin-top: 8px; }
summary { cursor: pointer; font-size: 14px; }
.wrap.estreita { max-width: 560px; }
canvas.qr { width: 240px; max-width: 100%; align-self: center; border: 1px solid var(--line); }
.caixa input[readonly] { width: 100%; }
.pedido img.redonda { max-width: 260px; align-self: center; }
#botton, #aberta { max-width: 360px; margin: 0 auto; }
img.folha { width: 100%; max-width: 420px; align-self: center; border: 1px solid var(--line); }
.arrastavel { touch-action: none; cursor: grab; }
.arrastavel:active { cursor: grabbing; }
.modelo { padding: 8px 14px; font-size: 14px; }
.modelo[aria-pressed="true"] { background: var(--cherry); color: #fff; }
.guardada { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.guardada img { width: 56px; height: 56px; }

/* chaveiro: miniaturas dos dois lados */
#chaveiro { max-width: 360px; margin: 0 auto; }
.doisLados { display: flex; justify-content: center; gap: 16px; }
.doisLados button { font: inherit; font-weight: 700; color: var(--wine); width: 120px; padding: 8px; background: var(--bg); border: 2px solid var(--line); border-radius: 14px; cursor: pointer; }
.doisLados button[aria-pressed="true"] { border-color: var(--cherry); background: var(--blush); }
.doisLados button:disabled { cursor: default; }
.guardada img.redonda { border-radius: 50%; }

/* polaroids: a grande em cima e o kit de 6 embaixo */
#grande { max-width: 280px; margin: 0 auto; border-radius: 4px; border: 1px solid var(--line); box-shadow: 0 8px 20px rgba(60, 0, 15, .18); }
.kit { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; max-width: 320px; width: 100%; margin: 0 auto; }
.kit button { padding: 4px; background: var(--bg); border: 2px solid var(--line); border-radius: 8px; cursor: pointer; }
.kit button[aria-pressed="true"] { border-color: var(--cherry); background: var(--blush); }
.kit canvas { border-radius: 2px; }
.pedido img.polaroid { max-width: 220px; align-self: center; border-radius: 2px; }

/* calendário: ímãs compridos */
#grande.ima { max-width: 240px; }
.kit.doze { grid-template-columns: repeat(4, 1fr); gap: 8px; }
/* botõezinhos para escolher os dias em vermelho */
.dias { --destaque: #b3122e; display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; max-width: 360px; width: 100%; text-align: center; }
.dias span { font-size: 12px; font-weight: 700; color: var(--muted); }
.dias button { font: inherit; font-size: 14px; min-width: 0; height: 38px; padding: 0; background: #fff; color: var(--fg); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.dias button[aria-pressed="true"] { color: var(--destaque); font-weight: 700; background: var(--blush); border-color: var(--destaque); }

/* painel: folha pronta e impressão */
.folhas { width: 100%; }
.pedido .folhas img.folha { max-width: 340px; }
#impressao { display: none; }
@media print {
  body { background: #fff; }
  body > :not(#impressao) { display: none !important; }
  #impressao { display: block; }
  #impressao img { display: block; break-after: page; }
  #impressao img:last-child { break-after: auto; }
}

/* abanador */
#grande.leque { max-width: 360px; border: 0; box-shadow: none; filter: drop-shadow(0 8px 14px rgba(60, 0, 15, .25)); }

/* conta do cliente */
.mini { width: 110px; height: auto; border: 1px solid #e8a3ad; }
.mini.redonda { border-radius: 50%; }
.etapas { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; }
.etapas li { padding: 6px 12px; border-radius: 99px; background: #f1e6da; color: #7a6a66; font-size: .85rem; }
.etapas li.feita { background: #e8a3ad; color: #4a0a18; }
.etapas li.feita::before { content: "✓ "; }
.etapas li.atual { background: #b3122e; color: #fff; font-weight: 700; }
dialog.janela { width: min(440px, 92vw); max-height: 90vh; overflow: auto; }
dialog.janela::backdrop { background: rgba(60, 0, 15, .6); }