:root {
  --ink: #1C1917;
  --ink-2: #44403C;
  --muted: #57534E;
  --faint: #78716C;
  --line: #E7E5E4;
  --line-2: #D6D3D1;
  --soft: #F5F5F4;
  --softer: #FAFAF9;
  --bg: #FFFFFF;
  --accent: #C2410C;
  --accent-ink: #9A3412;
  --accent-soft: #FFF7ED;
  --accent-chip: #FFEDD5;
  --ok: #15803D;
  --ok-soft: #DCFCE7;
  --warn: #B45309;
  --warn-soft: #FEF3C7;
  --error: #B91C1C;
  --error-soft: #FEE2E2;
  --radius: 14px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 16px; line-height: 1.5; }
img { max-width: 100%; display: block; }
a { color: var(--accent); }
a:hover { color: var(--accent-ink); }
h1, h2, h3 { letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
p { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #FB923C; outline-offset: 2px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- topo ---------- */
.topbar { height: 60px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 16px; gap: 12px; position: sticky; top: 0; background: var(--bg); z-index: 20; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 800; font-size: 17px; letter-spacing: -0.02em; }
.brand:hover { color: var(--ink); }
.brand-mark { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
.topnav { display: flex; gap: 4px; }
.topnav a { color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; padding: 12px 8px; }
.topnav a:hover { color: var(--ink); }

.backbar { height: 56px; display: flex; align-items: center; gap: 4px; padding: 0 8px; border-bottom: 1px solid var(--line); }
.backbar a.icon-btn { width: 44px; height: 44px; display: grid; place-items: center; color: var(--ink); border-radius: 10px; }
.backbar .title { font-weight: 700; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.demo-banner { background: var(--warn-soft); color: #78350F; font-size: 13px; font-weight: 600; text-align: center; padding: 8px 16px; }

/* ---------- layout ---------- */
.narrow { max-width: 480px; margin: 0 auto; padding: 24px 20px 40px; }
.container { max-width: 1100px; margin: 0 auto; padding: 20px 20px 120px; }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.lead { font-size: 15px; color: var(--muted); }
.h1 { font-size: 24px; font-weight: 800; }
.h2 { font-size: 20px; font-weight: 800; }
.footer { text-align: center; font-size: 12px; color: var(--faint); padding: 24px 16px 32px; }
.footer a { color: var(--faint); }

/* ---------- botões ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: var(--radius); border: 1.5px solid transparent; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; background: none; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-ink); color: #fff; }
.btn-primary[disabled] { background: var(--line); color: var(--muted); cursor: not-allowed; }
.btn-outline { border-color: var(--line-2); color: var(--ink); background: #fff; font-weight: 600; font-size: 15px; }
.btn-outline:hover { border-color: var(--faint); color: var(--ink); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; }
.link-btn { background: none; border: 0; color: var(--accent); font-weight: 600; cursor: pointer; padding: 10px 0; font-size: 14px; }

/* ---------- avisos ---------- */
.flash { border-radius: 12px; padding: 12px 14px; font-size: 14px; font-weight: 600; margin-bottom: 16px; }
.flash-error { background: var(--error-soft); color: #7F1D1D; }
.flash-success { background: var(--ok-soft); color: #14532D; }
.note { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--muted); }
.note svg { flex-shrink: 0; margin-top: 1px; }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.chip-live { background: rgba(255,255,255,0.14); color: #fff; }
.chip-live::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: #4ADE80; }
.chip-save { background: var(--accent-chip); color: var(--accent-ink); }

/* ---------- formulários ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { height: 50px; border: 1.5px solid var(--line-2); border-radius: 12px; padding: 0 14px; font-size: 16px; background: #fff; width: 100%; }
.input:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(194, 65, 12, 0.15); }
.input.has-error { border-color: var(--error); }
.field-error { color: var(--error); font-size: 13px; font-weight: 600; }
.hint { font-size: 12px; color: var(--muted); }
.check { display: flex; gap: 12px; align-items: flex-start; background: var(--soft); border-radius: 12px; padding: 14px; cursor: pointer; font-size: 13px; color: var(--ink-2); }
.check input { width: 22px; height: 22px; margin: 0; flex-shrink: 0; accent-color: var(--accent); }

.segmented { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; inset: 0; }
.choice span { display: flex; flex-direction: column; gap: 2px; min-height: 64px; padding: 12px 14px; border-radius: 12px; border: 2px solid var(--line); background: #fff; cursor: pointer; }
.choice span b { font-size: 15px; }
.choice span small { font-size: 12px; color: var(--muted); }
.choice input:checked + span { border-color: var(--accent); background: var(--accent-soft); }
.choice input:focus-visible + span { outline: 3px solid #FB923C; outline-offset: 2px; }

/* ---------- capa do evento ---------- */
.cover { position: relative; min-height: 300px; background: #292524; color: #fff; display: flex; flex-direction: column; justify-content: flex-end; padding: 24px 20px; overflow: hidden; }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.55; }
.cover > *:not(img) { position: relative; }
.cover .kicker { color: #E7E5E4; font-size: 13px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; margin-top: 14px; }
.cover h1 { color: #fff; font-size: 32px; font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 6px; }
.cover .date { color: #E7E5E4; font-size: 14px; }

/* ---------- selfie ---------- */
.selfie-ring { width: 220px; height: 220px; margin: 0 auto; border-radius: 50%; background: var(--soft); border: 3px dashed #A8A29E; display: grid; place-items: center; overflow: hidden; color: var(--faint); }
.selfie-ring img { width: 100%; height: 100%; object-fit: cover; }
.spinner { width: 28px; height: 28px; border: 3px solid rgba(255,255,255,0.4); border-top-color: #fff; border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- galeria ---------- */
.tabs { display: flex; gap: 8px; margin: 4px 0 16px; flex-wrap: wrap; }
.tab { padding: 10px 16px; border-radius: 999px; border: 1.5px solid var(--line-2); text-decoration: none; color: var(--ink); font-size: 14px; font-weight: 600; }
.tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.packs { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin-bottom: 18px; }
.pack { display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-height: 64px; padding: 14px 16px; border-radius: var(--radius); border: 2px solid var(--line); background: var(--softer); cursor: pointer; text-align: left; }
.pack.on { border-color: var(--accent); background: var(--accent-soft); }
.pack .t { font-size: 15px; font-weight: 700; }
.pack .d { font-size: 13px; color: var(--muted); margin-top: 2px; }
.dot { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #A8A29E; background: #fff; flex-shrink: 0; display: grid; place-items: center; color: #fff; }
.on .dot, .tile.on .dot { background: var(--accent); border-color: var(--accent); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; } }
.tile { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--soft); border: 3px solid transparent; }
.tile img { width: 100%; height: 100%; object-fit: cover; }
.tile.on { border-color: var(--accent); }
.tile .pick { position: absolute; inset: 0; background: none; border: 0; padding: 0; cursor: pointer; }
.tile .dot { position: absolute; top: 8px; right: 8px; background: rgba(0,0,0,0.3); border-color: #fff; }
.tile.on .dot { background: var(--accent); border-color: var(--accent); }
.tile .zoom { position: absolute; left: 8px; bottom: 8px; width: 40px; height: 40px; border-radius: 10px; background: rgba(0,0,0,0.5); color: #fff; display: grid; place-items: center; border: 0; cursor: pointer; }
.tile.readonly .pick { cursor: zoom-in; }
.tile.readonly .dot { display: none; }
.empty { text-align: center; padding: 48px 16px; color: var(--muted); }
.pager { display: flex; justify-content: center; gap: 8px; margin-top: 20px; flex-wrap: wrap; }
.pager a, .pager span { min-width: 44px; height: 44px; display: grid; place-items: center; border-radius: 10px; border: 1.5px solid var(--line-2); text-decoration: none; color: var(--ink); font-weight: 600; padding: 0 10px; }
.pager span.current { background: var(--ink); color: #fff; border-color: var(--ink); }

.buybar { position: fixed; left: 0; right: 0; bottom: 0; background: #fff; border-top: 1px solid var(--line); z-index: 30; }
.buybar-inner { max-width: 1100px; margin: 0 auto; height: 84px; padding: 0 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.buybar .count { font-size: 13px; color: var(--muted); }
.buybar .total { font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.nudge { display: flex; align-items: center; justify-content: center; gap: 6px; width: 100%; min-height: 44px; border: 0; border-top: 1px solid #FED7AA; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; cursor: pointer; padding: 6px 16px; }
.nudge u { font-weight: 800; }

.lightbox { position: fixed; inset: 0; background: rgba(12, 10, 9, 0.94); z-index: 50; display: none; align-items: center; justify-content: center; padding: 16px; }
.lightbox.open { display: flex; }
.lightbox img { max-width: 100%; max-height: 82vh; border-radius: 8px; }
.lightbox .close { position: absolute; top: 12px; right: 12px; width: 48px; height: 48px; border-radius: 50%; border: 0; background: rgba(255,255,255,0.15); color: #fff; font-size: 26px; cursor: pointer; }

/* ---------- checkout / pedido ---------- */
.summary { display: flex; align-items: center; gap: 14px; background: var(--soft); border-radius: var(--radius); padding: 14px; }
.thumbs { display: flex; }
.thumbs img, .thumbs div { width: 44px; height: 44px; border-radius: 8px; border: 2px solid var(--soft); object-fit: cover; background: var(--faint); }
.thumbs > * + * { margin-left: -18px; }
.summary .grow { flex: 1; min-width: 0; }
.summary .price { font-size: 16px; font-weight: 800; white-space: nowrap; }
.row-between { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.account-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border: 1.5px solid var(--line-2); border-radius: 12px; overflow: hidden; }
.account-tabs label { text-align: center; padding: 12px; font-size: 14px; font-weight: 600; cursor: pointer; }
.account-tabs input { position: absolute; opacity: 0; }
.account-tabs input:checked + span { color: var(--accent-ink); }
.account-tabs label:has(input:checked) { background: var(--accent-soft); }
.qr { width: 240px; height: 240px; margin: 0 auto; border: 1.5px solid var(--line); border-radius: 16px; display: grid; place-items: center; padding: 10px; }
.qr img { width: 100%; height: 100%; image-rendering: pixelated; }
.status-line { display: flex; align-items: center; gap: 12px; background: var(--soft); border-radius: 12px; padding: 14px; font-size: 13px; color: var(--ink-2); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: #F59E0B; flex-shrink: 0; animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: 0.3; } }

.success-badge { width: 64px; height: 64px; border-radius: 50%; background: var(--ok-soft); color: var(--ok); display: grid; place-items: center; margin: 0 auto; }
.dl-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
@media (min-width: 640px) { .dl-list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dl-item { position: relative; border-radius: 12px; overflow: hidden; background: var(--soft); aspect-ratio: 3 / 4; }
.dl-item img { width: 100%; height: 100%; object-fit: cover; }
.dl-item a { position: absolute; right: 8px; bottom: 8px; width: 44px; height: 44px; border-radius: 12px; background: #fff; color: var(--ink); display: grid; place-items: center; box-shadow: 0 1px 4px rgba(0,0,0,0.2); }

.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.order-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.badge { font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.badge-ok { background: var(--ok-soft); color: #166534; }
.badge-wait { background: var(--warn-soft); color: #92400E; }
.badge-off { background: var(--soft); color: var(--muted); }
.prose h2 { font-size: 18px; margin: 18px 0 6px; }
.prose p { margin: 0 0 10px; color: var(--ink-2); font-size: 15px; }
