:root {
  --sand: #efe6d6;
  --sand-2: #e6dac4;
  --paper: #f8f3ea;
  --ink: #1b1712;
  --ink-2: #4a4136;
  --muted: #7a6e5f;
  --line: #d9ccb5;
  --line-2: #cbbb9f;
  --sun: #e2502c;
  --sun-soft: #f6d2c3;
  --green: #2f7a4b;
  --display: "Bricolage Grotesque", "Instrument Sans", system-ui, sans-serif;
  --text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; color: var(--ink);
  font: 16px/1.5 var(--text); -webkit-font-smoothing: antialiased; overflow-x: hidden;
  /* grão de areia muito leve, em CSS puro */
  background-color: var(--sand);
  background-image:
    radial-gradient(rgba(120, 96, 60, .05) 1px, transparent 1.2px),
    radial-gradient(rgba(255, 255, 255, .28) 1px, transparent 1.2px);
  background-size: 7px 7px, 11px 11px; background-position: 0 0, 3px 5px;
}
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; text-decoration: none; }
b { font-weight: 700; }
.mono { font-family: var(--mono); font-size: 12px; }
[aria-disabled="true"] { opacity: .35; pointer-events: none; }

/* ---------- barra ---------- */
.bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 28px; background: rgba(239, 230, 214, .94);
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--display); font-weight: 800; font-size: 21px; letter-spacing: -.02em; display: flex; align-items: center; gap: 9px; }
.brand-mark { width: 13px; height: 26px; fill: var(--ink); transform: rotate(14deg); flex: none; }
.brand-logo { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; flex: none; background: #fff; border: 1px solid var(--line-2); }
.brand-logo.small { width: 22px; height: 22px; border-radius: 6px; }
.links { display: flex; align-items: center; gap: 8px; }
.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 38px; min-width: 38px; padding: 0 15px; border-radius: 999px; font-weight: 600; font-size: 14px;
  border: 1px solid var(--line-2); background: var(--paper); white-space: nowrap;
  transition: background .15s ease, border-color .15s ease;
}
.pill:hover { border-color: var(--ink-2); }
.pill.icon { padding: 0; }
.pill svg { width: 15px; height: 15px; }
.pill.on { background: #fff; }
.pill.on::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); }
.pill.dark { background: var(--ink); color: var(--paper); border-color: var(--ink); padding: 0 18px; }
.pill.dark:hover { background: #000; }

/* ---------- hero ---------- */
.hero {
  display: grid; grid-template-columns: 1.05fr .95fr; align-items: center; gap: 48px;
  max-width: 1160px; margin: 0 auto; padding: 64px 28px 56px;
}
.kicker {
  display: inline-flex; align-items: center; gap: 8px; margin: 0 0 18px;
  font: 500 12px/1 var(--mono); color: var(--ink-2); letter-spacing: .02em;
  padding: 7px 11px 7px 9px; border: 1px solid var(--line-2); border-radius: 999px; background: var(--paper);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 3px var(--sun-soft); animation: pulse 2s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 5px rgba(226, 80, 44, .12); } }
h1 {
  font-family: var(--display); font-size: clamp(56px, 8.4vw, 118px); line-height: .88;
  letter-spacing: -.05em; font-weight: 800; margin: 0 0 24px;
}
.sub { color: var(--ink-2); font-size: 19px; line-height: 1.55; margin: 0 0 30px; max-width: 480px; }
.sub b { color: var(--ink); }
.cta { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 58px; padding: 0 30px; border-radius: 999px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--paper); font-size: 17px; font-weight: 700;
  transition: transform .12s ease, background .15s ease; white-space: nowrap;
}
.btn svg { width: 22px; height: 22px; flex: none; }
.btn:hover { background: #000; }
.btn:active { transform: scale(.98); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn.ghost:hover { border-color: var(--ink); }
.btn.grow { flex: 1; height: 54px; }
.btn.small { height: 44px; padding: 0 22px; font-size: 15px; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.btn:disabled { opacity: .5; pointer-events: none; }
.note { margin: 0; font-size: 13px; color: var(--muted); max-width: 150px; line-height: 1.35; }
.ca {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 9px 12px; border: 1px dashed var(--line-2); border-radius: 10px; background: transparent;
  font: 500 12.5px var(--mono); color: var(--ink-2);
}
.ca:hover { border-color: var(--ink-2); }
.ca-label { font-weight: 700; color: var(--ink); }
#caText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-copy { color: var(--muted); border-left: 1px solid var(--line); padding-left: 10px; }

.hero-art { position: relative; min-height: 470px; }
.sand {
  position: absolute; inset: 0; border-radius: 28px; overflow: hidden;
  background:
    radial-gradient(120% 90% at 30% 20%, #f6eedf 0%, transparent 60%),
    linear-gradient(160deg, #eadfca, #dccdb1);
  border: 1px solid var(--line);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), inset 0 -40px 80px rgba(120, 90, 50, .12);
}
.sand::after { /* ondulações de areia */
  content: ""; position: absolute; inset: -20%;
  background: repeating-radial-gradient(ellipse at 110% 120%, transparent 0 26px, rgba(120, 92, 52, .07) 27px 29px, transparent 30px 44px);
}
.step { position: absolute; width: 74px; height: 148px; fill: #b8a482; filter: drop-shadow(0 1px 0 rgba(255,255,255,.7)) drop-shadow(0 -1px 1px rgba(90, 64, 30, .25)); opacity: 0; animation: press .9s cubic-bezier(.2,.7,.2,1) forwards; z-index: 1; }
.step.s1 { left: 14%; bottom: 3%; transform: rotate(24deg) scaleX(-1); animation-delay: .1s; }
.step.s2 { left: 34%; bottom: 16%; transform: rotate(26deg); animation-delay: .5s; }
.step.s3 { left: 38%; bottom: 40%; transform: rotate(24deg) scaleX(-1); animation-delay: .9s; }
.step.s4 { left: 58%; bottom: 53%; transform: rotate(26deg); animation-delay: 1.3s; }
@keyframes press { from { opacity: 0; } 40% { opacity: 1; fill: #8f7b5a; } to { opacity: .95; } }

/* vencedor da última ronda: a foto ocupa o quadrado inteiro, com uma placa por cima */
.winner-photo {
  position: absolute; inset: 0; z-index: 1; padding: 0; border: 1px solid var(--line); border-radius: 28px; overflow: hidden;
  background: var(--sand-2); cursor: zoom-in;
}
.winner-photo img { width: 100%; height: 100%; object-fit: cover; display: block; animation: fade .5s ease; }
.winner-photo::after { /* escurece o topo para a placa ler bem sobre qualquer foto */
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(27, 23, 18, .28), transparent 34%);
}
.sign {
  position: absolute; left: 22px; top: 22px; z-index: 2; max-width: calc(100% - 44px);
  display: flex; flex-direction: column; padding: 12px 16px 12px; pointer-events: none;
  background: #fbf8f2; border-radius: 6px; transform: rotate(-2.5deg);
  box-shadow: 0 1px 1px rgba(60, 40, 15, .12), 0 16px 30px -16px rgba(60, 40, 15, .55);
}
.sign::before, .sign::after { /* parafusos da placa */
  content: ""; position: absolute; top: 50%; width: 7px; height: 7px; margin-top: -3.5px; border-radius: 50%;
  background: var(--line-2); box-shadow: inset 1px 1px 0 rgba(255,255,255,.6);
}
.sign::before { left: 5px; } .sign::after { right: 5px; }
.sign-title { font: 500 11px var(--mono); color: var(--sun); letter-spacing: .04em; text-transform: uppercase; }
.sign-cap { font: 800 22px/1.15 var(--display); letter-spacing: -.02em; padding-top: 3px; }
.sign-sub { font: 500 12px var(--mono); color: var(--muted); padding-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.ticket {
  position: absolute; right: -14px; bottom: 28px; z-index: 2; width: 270px;
  background: var(--paper); border: 1px solid var(--line-2); border-radius: 16px;
  box-shadow: 0 18px 40px -18px rgba(60, 40, 15, .35); padding: 6px 18px; transform: rotate(-2deg);
}
.ticket::before, .ticket::after { /* entalhes de talão */
  content: ""; position: absolute; top: 50%; width: 14px; height: 14px; border-radius: 50%;
  background: var(--sand-2); border: 1px solid var(--line-2); transform: translateY(-50%);
}
.ticket::before { left: -8px; } .ticket::after { right: -8px; }
.t-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 12px 0; border-bottom: 1px dashed var(--line); }
.t-row:last-child { border-bottom: 0; }
.t-row span { font-size: 13px; color: var(--muted); }
.t-row b { font: 700 19px var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }

/* ---------- regras ---------- */
.how { max-width: 1160px; margin: 0 auto 64px; padding: 0 28px; display: grid; grid-template-columns: 3fr 1fr; gap: 24px; align-items: stretch; }
.how .rules { margin: 0; padding: 0; }
.how .phone-card { margin: 0; flex-direction: column; align-items: flex-start; gap: 12px; }
.how .phone-card span { font-size: 13.5px; }
.rules {
  max-width: 1160px; margin: 0 auto 36px; padding: 0 28px;
  display: grid; grid-template-columns: repeat(3, 1fr);
}
.rule { display: flex; gap: 16px; padding: 24px 26px 24px 0; border-top: 2px solid var(--ink); }
.rule + .rule { padding-left: 26px; border-left: 1px solid var(--line); }
.rule-n { font: 500 13px var(--mono); color: var(--sun); padding-top: 4px; }
.rule h3 { margin: 0 0 6px; font: 700 21px var(--display); letter-spacing: -.02em; }
.rule p { margin: 0; color: var(--ink-2); font-size: 15px; line-height: 1.55; }
.rule b { color: var(--ink); }

/* ---------- telemóvel ---------- */
.phone-card {
  max-width: 1104px; margin: 0 auto 52px; display: flex; align-items: center; gap: 22px;
  padding: 18px 22px; border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper);
}
.phone-card img { width: 104px; height: 104px; flex: none; }
.phone-card b { display: block; font: 700 18px var(--display); letter-spacing: -.01em; margin-bottom: 3px; }
.phone-card span { color: var(--ink-2); font-size: 15px; }

/* ---------- ranking ---------- */
.rank-wrap { max-width: 1160px; margin: 0 auto 64px; padding: 0 28px; }
.rank-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; margin-bottom: 20px; flex-wrap: wrap; }
h2 { font: 800 clamp(34px, 4.4vw, 50px)/1 var(--display); letter-spacing: -.04em; margin: 0 0 8px; }
.rank-sub { margin: 0; color: var(--ink-2); max-width: 460px; }
.rank-stats { display: flex; border: 1px solid var(--line-2); border-radius: 16px; background: var(--paper); overflow: hidden; }
.stat { display: flex; flex-direction: column; gap: 2px; padding: 12px 22px; min-width: 128px; border: 0; background: none; text-align: left; }
.stat + .stat { border-left: 1px solid var(--line); }
.stat span { font-size: 12px; color: var(--muted); }
.stat b { font: 700 24px var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
button.stat:hover { background: #fff; }
#roundLeft.hot { color: var(--sun); }

.rank-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 20px; align-items: start; }
.board { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper); overflow: hidden; }
.board:empty { display: none; }
.board li { display: grid; grid-template-columns: 34px 58px 1fr auto auto; align-items: center; gap: 14px; padding: 12px 16px; }
.board li + li { border-top: 1px solid var(--line); }
.board li:first-child { background: linear-gradient(90deg, rgba(226, 80, 44, .07), transparent 70%); }
.rk { font: 800 22px var(--display); color: var(--muted); text-align: center; }
.board li:first-child .rk { color: var(--sun); }
.board img { width: 58px; height: 58px; border-radius: 12px; object-fit: cover; cursor: zoom-in; background: var(--sand-2); }
.who b { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.who span { font: 500 12px var(--mono); color: var(--muted); }
.lead { font: 700 10.5px var(--text); letter-spacing: .06em; text-transform: uppercase; color: #fff; background: var(--sun); padding: 3px 7px; border-radius: 6px; }
.vc { font: 800 26px var(--display); text-align: right; line-height: 1; font-variant-numeric: tabular-nums; }
.vc small { display: block; font: 500 11px var(--text); color: var(--muted); }
.vote-btn { height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 700; font-size: 14px; }
.vote-btn:hover { background: #000; }
.board-empty {
  margin: 0; padding: 42px 24px; text-align: center; color: var(--muted);
  border: 1px dashed var(--line-2); border-radius: 18px;
}

.winners { border: 1px solid var(--line-2); border-radius: 18px; background: var(--paper); padding: 18px 18px 8px; }
.winners h3 { margin: 0 0 8px; font: 700 18px var(--display); letter-spacing: -.01em; }
.winners ul { list-style: none; margin: 0; padding: 0; }
.winners li { display: grid; grid-template-columns: 42px 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.winners li.muted { display: block; color: var(--muted); font-size: 14px; border: 0; padding: 6px 0 14px; }
.winners img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: var(--sand-2); }
.w-main b { display: block; font-size: 14.5px; }
.w-main span { font: 500 11.5px var(--mono); color: var(--muted); }
.w-amt { text-align: right; font: 700 14px var(--mono); white-space: nowrap; }
.w-amt a { display: block; font: 500 11px var(--text); color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.w-amt small { font: 500 11.5px var(--text); color: var(--muted); }

/* ---------- parede ---------- */
.wall-wrap { max-width: 1160px; margin: 0 auto; padding: 0 28px 80px; }
.wall-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; border-bottom: 2px solid var(--ink); padding-bottom: 12px; }
.wall-head h2 { margin: 0; }
.count { font: 500 14px var(--mono); color: var(--muted); }
.count b { color: var(--ink); }
.wall { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 16px; }
/* cada foto é uma prova impressa: margem de papel e legenda por baixo */
.tile {
  position: relative; display: flex; flex-direction: column; padding: 8px 8px 0; border: 0; border-radius: 4px;
  background: #fbf8f2; transform: rotate(var(--tilt, 0deg)); text-align: left;
  box-shadow: 0 1px 1px rgba(60, 40, 15, .12), 0 12px 24px -16px rgba(60, 40, 15, .55);
  transition: transform .2s ease, box-shadow .2s ease;
}
.tile:hover { transform: rotate(0) translateY(-3px); box-shadow: 0 1px 1px rgba(60, 40, 15, .12), 0 18px 30px -16px rgba(60, 40, 15, .6); }
.frame { display: block; aspect-ratio: 1; border-radius: 2px; overflow: hidden; background: var(--sand-2); }
.tile img { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s ease; display: block; }
.tile img.in { opacity: 1; }
.tile.new { animation: drop .5s cubic-bezier(.2,.8,.2,1.2); }
@keyframes drop { from { transform: translateY(-14px) scale(.9); opacity: 0; } }
.cap { display: flex; align-items: center; justify-content: space-between; gap: 8px; height: 40px; }
.num { font: 500 12px var(--mono); color: var(--ink-2); }
.tvote {
  font-size: 12.5px; font-weight: 700; color: var(--ink); padding: 4px 11px; border-radius: 999px;
  border: 1px solid var(--line-2); transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.tvote:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.del { position: absolute; right: 8px; top: 8px; width: 28px; height: 28px; border-radius: 50%; border: 0; background: var(--sun); color: #fff; font-size: 13px; }
.empty { text-align: center; padding: 60px 20px; color: var(--muted); }
.empty svg { width: 34px; height: 68px; fill: var(--line-2); transform: rotate(10deg); }
.empty p { margin: 12px 0 0; }
.more { height: 1px; }

.foot {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  max-width: 1160px; margin: 0 auto; padding: 22px 28px 40px; border-top: 1px solid var(--line);
  color: var(--muted); font-size: 14px;
}
.foot span:first-child { display: inline-flex; align-items: center; gap: 9px; }
.foot .brand-mark { width: 9px; height: 18px; fill: var(--muted); }
.foot-dev { font: 500 12px var(--mono); }
.foot-dev a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- câmara ---------- */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(27, 23, 18, .6); display: grid; place-items: center; padding: 16px; backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.sheet[hidden], .viewer[hidden] { display: none; }
.sheet-card { width: min(460px, 100%); max-height: 100%; overflow: auto; background: var(--paper); border-radius: 24px; padding: 16px; box-shadow: 0 30px 80px -30px rgba(0,0,0,.6); }
.sheet-top { display: flex; justify-content: space-between; align-items: center; padding: 2px 4px 12px; font: 700 19px var(--display); letter-spacing: -.01em; }
.x { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line-2); background: transparent; font-size: 14px; }
.x.light { position: fixed; top: 16px; right: 16px; background: rgba(255,255,255,.12); color: #fff; border-color: rgba(255,255,255,.25); }
.viewfinder { position: relative; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: #0f0d0a; }
.viewfinder video, .viewfinder canvas { width: 100%; height: 100%; object-fit: cover; display: block; }
video.mirror { transform: scaleX(-1); }
.guide { position: absolute; inset: 8%; width: 84%; height: 84%; pointer-events: none; }
.hint { position: absolute; left: 0; right: 0; bottom: 12px; margin: 0; text-align: center; color: #fff; font-size: 13px; font-weight: 600; text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.checking { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 12px; align-items: center; justify-content: center; background: rgba(15, 13, 10, .55); color: #fff; font-weight: 600; }
.checking[hidden], .cam-error[hidden] { display: none; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid rgba(255,255,255,.3); border-top-color: #fff; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.cam-error { position: absolute; inset: 0; display: flex; flex-direction: column; gap: 14px; align-items: center; justify-content: center; padding: 24px; text-align: center; color: #eee; }
.cam-error p { margin: 0; }
.reject { margin: 12px 4px 0; padding: 10px 12px; border-radius: 10px; background: var(--sun-soft); color: #8a2a12; font-size: 14px; }
.controls { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 4px 4px; }
.controls[hidden] { display: none; }
.ctl-spacer, .ctl { width: 46px; height: 46px; }
.ctl { border-radius: 50%; border: 1px solid var(--line-2); background: transparent; display: grid; place-items: center; }
.ctl svg { width: 22px; height: 22px; }
.shutter { width: 74px; height: 74px; border-radius: 50%; border: 4px solid var(--ink); background: var(--paper); box-shadow: inset 0 0 0 4px var(--paper), inset 0 0 0 40px var(--sun); transition: transform .1s ease; }
.shutter:active { transform: scale(.93); }
.shutter:disabled { opacity: .35; }
.wallet-row { padding: 14px 4px 0; }
.wallet-row[hidden] { display: none; }
.wallet-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.wallet-row label span { font-weight: 400; color: var(--muted); }
.wallet-row input { width: 100%; height: 46px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line-2); background: #fff; font: 500 13px var(--mono); color: var(--ink); }
.wallet-row input:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
.wallet-row input.bad { border-color: var(--sun); outline-color: var(--sun); }
.wallet-connected { margin: 0; font-size: 14px; color: var(--ink-2); }
.wallet-connected code { font-family: var(--mono); font-size: 12.5px; background: var(--sand); padding: 2px 6px; border-radius: 6px; }
.fine { margin: 12px 4px 2px; font-size: 12.5px; color: var(--muted); text-align: center; }

/* ---------- visualizador ---------- */
.viewer { position: fixed; inset: 0; z-index: 60; background: rgba(15, 13, 10, .92); display: grid; place-items: center; padding: 20px; }
.viewer figure { margin: 0; max-width: min(640px, 100%); }
.viewer img { width: 100%; border-radius: 18px; display: block; }
.viewer figcaption { display: flex; align-items: center; gap: 14px; justify-content: space-between; padding-top: 14px; color: #efe6d6; font-weight: 700; }
.viewer figcaption .mono { color: #a89a86; font-weight: 500; margin-right: auto; }

/* ---------- vencedor ---------- */
.reveal { position: fixed; inset: 0; z-index: 65; display: grid; place-items: center; padding: 16px; background: rgba(27, 23, 18, .72); animation: fade .3s ease; }
@keyframes fade { from { opacity: 0; } }
.reveal-card {
  position: relative; width: min(420px, 100%); max-height: 100%; overflow: auto; text-align: center;
  background: var(--sand); border-radius: 24px; padding: 26px 22px 20px; box-shadow: 0 40px 90px -30px rgba(0,0,0,.7);
  animation: rise .5s cubic-bezier(.2,.8,.2,1.1);
}
@keyframes rise { from { transform: translateY(24px) scale(.96); opacity: 0; } }
.reveal-kicker { margin: 0 0 4px; font: 500 12px var(--mono); color: var(--sun); letter-spacing: .02em; }
.reveal h2 { margin: 0 0 18px; font-size: clamp(34px, 8vw, 44px); }
.reveal-print {
  display: flex; flex-direction: column; width: 78%; margin: 0 auto 18px; padding: 10px 10px 0; border-radius: 4px;
  background: #fbf8f2; transform: rotate(-2deg); box-shadow: 0 1px 1px rgba(60, 40, 15, .12), 0 22px 40px -20px rgba(60, 40, 15, .6);
  animation: stamp .6s .15s cubic-bezier(.2,.8,.2,1.3) backwards;
}
@keyframes stamp { from { transform: rotate(-9deg) scale(1.15); opacity: 0; } }
.reveal-print img { width: 100%; height: 100%; object-fit: cover; display: block; }
.reveal-facts { display: grid; grid-template-columns: 1fr 1fr; margin: 0 0 18px; border: 1px solid var(--line-2); border-radius: 14px; background: var(--paper); text-align: left; }
.reveal-facts div { padding: 10px 14px; }
.reveal-facts div + div { border-left: 1px solid var(--line); }
.reveal-facts dt { font-size: 12px; color: var(--muted); }
.reveal-facts dd { margin: 0; font: 700 17px var(--display); }
.reveal-facts dd.mono { font: 500 13px var(--mono); padding-top: 3px; }
.reveal-facts dd a { font: 500 11px var(--text); color: var(--muted); text-decoration: underline; margin-left: 6px; }
.reveal .btn.grow { width: 100%; flex: none; }
.reveal-x { display: inline-block; margin: -6px 0 14px; font-size: 14px; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.w-main span a { text-decoration: underline; text-underline-offset: 2px; }
.reveal-timer { position: absolute; left: 0; bottom: 0; height: 3px; background: var(--sun); border-radius: 0 3px 0 24px; }

/* ---------- avisos ---------- */
.toasts {
  position: fixed; right: 20px; bottom: 20px; z-index: 80; width: min(380px, calc(100% - 32px));
  display: flex; flex-direction: column; gap: 10px; pointer-events: none;
}
.toast {
  --tone: var(--ink-2); --tone-bg: var(--sand);
  position: relative; display: grid; grid-template-columns: 34px 1fr 24px; gap: 12px; align-items: start;
  padding: 13px 12px 14px 13px; overflow: hidden; pointer-events: auto;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line-2); border-radius: 14px;
  box-shadow: 0 1px 1px rgba(60, 40, 15, .08), 0 18px 40px -18px rgba(60, 40, 15, .5);
  animation: toast-in .32s cubic-bezier(.2,.8,.2,1.15);
}
.toast.out { animation: toast-out .22s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }
.toast.t-ok { --tone: var(--green); --tone-bg: #dcebdd; }
.toast.t-warn { --tone: #b7791f; --tone-bg: #f6e6c6; }
.toast.t-err { --tone: #b2351a; --tone-bg: var(--sun-soft); }
.toast.t-info { --tone: var(--ink-2); --tone-bg: var(--sand-2); }
.t-icon { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--tone-bg); color: var(--tone); }
.t-icon svg { width: 18px; height: 18px; }
.t-body { min-width: 0; padding-top: 1px; }
.t-body b { display: block; font: 700 15px/1.25 var(--display); letter-spacing: -.01em; }
.t-body span { display: block; margin-top: 2px; font-size: 13.5px; line-height: 1.4; color: var(--ink-2); overflow-wrap: anywhere; }
.t-x { width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 11px; line-height: 1; }
.t-x:hover { background: var(--sand); color: var(--ink); }
.toast::after { /* barra do tempo que falta */
  content: ""; position: absolute; left: 0; bottom: 0; height: 3px; width: 100%; background: var(--tone); opacity: .55;
  transform-origin: left; animation: toast-life var(--life, 3200ms) linear forwards;
}
.toast.hold::after { animation-play-state: paused; }
@keyframes toast-life { to { transform: scaleX(0); } }
@media (max-width: 560px) {
  .toasts { right: 16px; left: 16px; bottom: 16px; width: auto; }
}

/* ---------- responsivo ---------- */
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 40px; }
  .hero-art { min-height: 340px; }
  .ticket { right: 14px; bottom: 16px; }
  .rules { grid-template-columns: 1fr; }
  .how { grid-template-columns: 1fr; }
  .rule + .rule { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .rank-grid { grid-template-columns: 1fr; }
  .phone-card { display: none; }
}
@media (max-width: 560px) {
  .bar { padding: 10px 16px; }
  .hide-sm { display: none; }
  .hero, .rules, .rank-wrap, .wall-wrap, .foot { padding-left: 16px; padding-right: 16px; }
  .sub { font-size: 17px; }
  .note { max-width: none; }
  .hero-art { min-height: 300px; }
  .ticket { width: auto; left: 16px; right: 16px; transform: none; }
  .step { width: 54px; height: 108px; }
  .hero-art { min-height: 400px; }
  .sign { left: 14px; top: 14px; padding: 10px 14px; }
  .sign-cap { font-size: 18px; }
  .rank-stats { width: 100%; }
  .stat { min-width: 0; flex: 1; padding: 10px 14px; }
  .stat b { font-size: 19px; }
  .board li { grid-template-columns: 22px 48px 1fr auto; gap: 10px; padding: 10px 12px; }
  .board img { width: 48px; height: 48px; }
  .board .vc { display: none; }
  .wall { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .step { opacity: .95; }
}
