/* Rifa online — estilos da página pública e do pedido */
:root {
  --creme: #f7f2e8;
  --papel: #fffdf8;
  --tinta: #1b2a20;
  --suave: #5c6b60;
  --linha: #e3dccb;
  --mata: #173d2a;
  --mata-2: #23573b;
  --ambar: #f0b429;
  --ambar-escuro: #8a5a00;
  --livre-bg: #dff3e4;
  --livre-tx: #116338;
  --livre-bd: #a9dcb8;
  --res-bg: #ffe08a;
  --res-tx: #6b4a00;
  --res-bd: #f0c341;
  --pago-bg: #d93a3a;
  --pago-tx: #ffffff;
  --raio: 14px;
  --titulo: "Bitter", Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--creme);
  color: var(--tinta);
  font: 16px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  padding-bottom: env(safe-area-inset-bottom);
}
.wrap { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 16px; }
h1, h2 { font-family: var(--titulo); line-height: 1.15; margin: 0; }
h2 { font-size: 1.25rem; }
a { color: var(--mata-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
[hidden] { display: none !important; }

/* ---------- topo ---------- */
.hero {
  background: var(--mata);
  color: #f4efe2;
  padding: 28px 0 30px;
  border-bottom: 6px solid var(--ambar);
}
.selo {
  display: inline-block; margin: 0 0 12px;
  font-size: .75rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--mata); background: var(--ambar); padding: 4px 10px; border-radius: 999px;
}
.hero h1 { font-size: clamp(1.9rem, 7vw, 3rem); font-weight: 800; text-wrap: balance; }
.chamada { font-family: var(--titulo); font-size: 1.15rem; color: var(--ambar); margin: 6px 0 12px; }
.historia { margin: 0 0 20px; max-width: 62ch; color: #dfe7dc; }
.premio {
  display: grid; gap: 2px;
  background: #0f2c1e; border: 1px solid #2d6045; border-radius: var(--raio);
  padding: 16px 18px; margin-bottom: 16px;
}
.premio-rotulo { font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--ambar); }
.premio-nome { font-family: var(--titulo); font-size: clamp(1.7rem, 6.5vw, 2.4rem); font-weight: 800; line-height: 1.1; }
.premio-detalhe { color: #cfd9cc; font-size: .95rem; }
.fatos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.fatos div { background: rgba(255, 255, 255, .07); border-radius: 12px; padding: 10px 12px; min-width: 0; }
.fatos dt { font-size: .7rem; letter-spacing: .1em; text-transform: uppercase; color: #a9bfae; }
.fatos dd { margin: 2px 0 0; font-weight: 700; font-size: 1.02rem; overflow-wrap: anywhere; }
.fatos small { display: block; font-weight: 400; font-size: .72rem; color: #a9bfae; }

/* ---------- avisos, passos, placar ---------- */
main.wrap { padding-top: 18px; padding-bottom: 120px; }
.aviso {
  background: #fff4cf; border: 1px solid var(--res-bd); color: #5a3f00;
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; font-size: .95rem;
}
.aviso a { color: inherit; font-weight: 700; }
.aviso-neutro { background: #ecefe6; border-color: #cfd6c4; color: #2f3b30; }
.passos ol { list-style: none; counter-reset: p; margin: 0 0 16px; padding: 0; display: grid; gap: 8px; }
.passos li {
  counter-increment: p; position: relative; background: var(--papel); border: 1px solid var(--linha);
  border-radius: 12px; padding: 10px 12px 10px 46px; font-size: .95rem;
}
.passos li::before {
  content: counter(p); position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  width: 24px; height: 24px; border-radius: 50%; background: var(--mata); color: #fff;
  font-weight: 700; font-size: .8rem; display: grid; place-items: center;
}
@media (min-width: 720px) { .passos ol { grid-template-columns: repeat(3, 1fr); } }
.placar { margin-bottom: 14px; }
.barra { display: flex; height: 10px; border-radius: 999px; overflow: hidden; background: var(--livre-bd); }
#barra-pagos { background: var(--pago-bg); width: 0; transition: width .4s; }
#barra-reservados { background: var(--res-bd); width: 0; transition: width .4s; }
.legenda { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 0 0; padding: 0; font-size: .9rem; color: var(--suave); }
.legenda b { color: var(--tinta); }
.cor { display: inline-block; width: 14px; height: 14px; border-radius: 4px; vertical-align: -2px; margin-right: 5px; border: 1px solid transparent; }
.cor.livre { background: var(--livre-bg); border-color: var(--livre-bd); }
.cor.reservado { background: var(--res-bg); border-color: var(--res-bd); }
.cor.pago { background: var(--pago-bg); }

/* ---------- ferramentas ---------- */
.ferramentas {
  position: sticky; top: 0; z-index: 5; background: var(--creme);
  padding: 10px 0 8px; margin: 0 -16px; padding-left: 16px; padding-right: 16px;
  border-bottom: 1px solid var(--linha);
}
.linha { display: flex; gap: 8px; align-items: center; }
.busca { flex: 1; min-width: 0; }
input[type="text"], input[type="tel"], input[type="search"], input[type="password"], input[type="number"], select, textarea {
  width: 100%; font: inherit; color: inherit; background: #fff;
  border: 1.5px solid #cfc7b3; border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible, a:focus-visible, summary:focus-visible {
  outline: 3px solid var(--ambar); outline-offset: 2px;
}
.chave { display: flex; align-items: center; gap: 6px; font-size: .9rem; white-space: nowrap; min-height: 44px; }
.chave input { width: 20px; height: 20px; accent-color: var(--mata); }
.faixas { display: flex; gap: 6px; overflow-x: auto; padding: 8px 0 2px; scrollbar-width: none; }
.faixas::-webkit-scrollbar { display: none; }
.chip {
  flex: none; font: inherit; font-size: .85rem; font-variant-numeric: tabular-nums;
  border: 1.5px solid #cfc7b3; background: #fff; color: var(--tinta);
  border-radius: 999px; padding: 6px 12px; min-height: 36px; cursor: pointer;
}
.chip.ativo { background: var(--mata); border-color: var(--mata); color: #fff; }

/* ---------- botões ---------- */
.btn {
  font: inherit; font-weight: 700; border: 0; border-radius: 10px; padding: 10px 16px; min-height: 44px;
  cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-destaque { background: var(--ambar); color: #2b1d00; }
.btn-escuro { background: var(--mata); color: #fff; }
.btn-claro { background: #fff; color: var(--mata); border: 1.5px solid var(--mata); white-space: nowrap; }
.btn-fantasma { background: transparent; color: inherit; text-decoration: underline; padding-left: 8px; padding-right: 8px; }
.btn-perigo { background: #fff; color: #a32020; border: 1.5px solid #d9a0a0; }
.btn-cheio { width: 100%; }

/* ---------- grade ---------- */
.grade {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(46px, 1fr)); gap: 5px;
  margin-top: 12px;
}
.n {
  font: inherit; font-weight: 700; font-size: .86rem; font-variant-numeric: tabular-nums;
  height: 42px; padding: 0; border-radius: 9px; cursor: pointer;
  background: var(--livre-bg); color: var(--livre-tx); border: 1.5px solid var(--livre-bd);
  transition: transform .08s;
}
.n:active { transform: scale(.94); }
.n.r { background: var(--res-bg); color: var(--res-tx); border-color: var(--res-bd); cursor: not-allowed; }
.n.p { background: var(--pago-bg); color: var(--pago-tx); border-color: var(--pago-bg); cursor: not-allowed; text-decoration: line-through; text-decoration-thickness: 1px; }
.n.sel { background: var(--mata); color: #fff; border-color: var(--mata); box-shadow: 0 0 0 3px var(--ambar); }
.n.pisca { animation: pisca .9s ease-out; }
@keyframes pisca { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
.grade.so-livres .n.r, .grade.so-livres .n.p, .n.fora { display: none; }
.vazio { text-align: center; color: var(--suave); padding: 24px 0; }
.ao-vivo { font-size: .8rem; color: var(--suave); margin: 10px 0 0; display: flex; align-items: center; gap: 6px; }
.pulso { width: 8px; height: 8px; border-radius: 50%; background: #2fa35c; animation: pulso 1.8s infinite; }
@keyframes pulso { 0% { box-shadow: 0 0 0 0 rgba(47, 163, 92, .6); } 100% { box-shadow: 0 0 0 9px rgba(47, 163, 92, 0); } }

/* ---------- blocos ---------- */
.bloco { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; margin-top: 18px; }
.bloco h2 { margin-bottom: 10px; }
.noticia { margin: 0 0 16px; }
.noticia p { margin: 0 0 8px; }
.noticia .fonte { font-size: .88rem; color: var(--suave); margin: 0; }
.bloco details summary { cursor: pointer; list-style: none; display: flex; align-items: center; justify-content: space-between; }
.bloco details summary::-webkit-details-marker { display: none; }
.bloco details summary::after { content: "+"; font-size: 1.5rem; font-weight: 700; color: var(--mata-2); }
.bloco details[open] summary::after { content: "–"; }
.bloco details summary h2 { margin: 0; }
.regulamento { margin-top: 12px; color: #2f3b30; font-size: .95rem; }
.consulta { display: flex; gap: 8px; }
.consulta input { flex: 1; min-width: 0; }
.pedido-mini { border-top: 1px solid var(--linha); padding: 10px 0 0; margin-top: 10px; font-size: .95rem; }
.pedido-mini a { font-weight: 700; }
.contato { text-align: center; margin: 22px 0 0; }
.rodape { text-align: center; color: var(--suave); font-size: .85rem; padding: 24px 0 110px; }
.rodape p { margin: 4px 0; }

/* ---------- pílulas e etiquetas ---------- */
.pilulas { display: flex; flex-wrap: wrap; gap: 6px; }
.pilula {
  font-weight: 700; font-variant-numeric: tabular-nums; font-size: .9rem;
  background: var(--mata); color: #fff; border-radius: 8px; padding: 4px 9px;
}
.etiqueta { display: inline-block; font-size: .78rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.et-aguardando { background: var(--res-bg); color: var(--res-tx); }
.et-analise { background: #d8e6ff; color: #173e7a; }
.et-pago { background: #cdeed7; color: #0f5c32; }
.et-cancelado, .et-expirado, .et-recusado { background: #eee6e6; color: #6b3a3a; }

/* ---------- carrinho fixo ---------- */
.carrinho {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--mata); color: #fff; box-shadow: 0 -6px 24px rgba(0, 0, 0, .25);
  padding: 10px 0 calc(10px + env(safe-area-inset-bottom));
}
.carrinho-in { display: flex; align-items: center; gap: 8px; }
.carrinho-info { flex: 1; min-width: 0; display: grid; line-height: 1.25; }
.carrinho-info span { color: var(--ambar); font-weight: 700; }

/* ---------- diálogo ---------- */
.dlg {
  border: 0; padding: 0; width: min(520px, 100%); max-width: 100%; max-height: 100dvh;
  border-radius: 18px 18px 0 0; margin: auto auto 0; background: var(--papel); color: var(--tinta);
}
@media (min-width: 640px) { .dlg { border-radius: 18px; margin: auto; } }
.dlg::backdrop { background: rgba(10, 25, 17, .6); }
.dlg form { display: flex; flex-direction: column; max-height: 100dvh; }
.dlg header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 6px; }
.fechar { font: inherit; font-size: 1.7rem; line-height: 1; background: none; border: 0; width: 44px; height: 44px; cursor: pointer; color: var(--suave); }
.dlg-corpo { padding: 6px 16px 10px; overflow: auto; display: grid; gap: 12px; }
.dlg footer { padding: 10px 16px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--linha); }
.dlg label { display: grid; gap: 4px; font-weight: 600; font-size: .92rem; }
.dica { font-weight: 400; font-size: .8rem; color: var(--suave); }
.resumo { background: #f1ecdd; border-radius: 12px; padding: 12px; }
.resumo-total { display: flex; justify-content: space-between; margin: 10px 0 0; }
.aceite { display: flex !important; grid-template-columns: none; align-items: flex-start; gap: 8px; font-weight: 400 !important; }
.aceite input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--mata); flex: none; }
.nota { font-size: .86rem; color: var(--suave); margin: 0; }
.erro { background: #fde3e3; color: #8a1c1c; border-radius: 10px; padding: 10px 12px; margin: 0; font-size: .92rem; }
.erro a { color: inherit; font-weight: 700; }
.isca { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

.toast {
  position: fixed; left: 50%; bottom: 96px; transform: translateX(-50%); z-index: 40;
  background: #1b2a20; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: .92rem;
  max-width: calc(100% - 32px); box-shadow: 0 8px 24px rgba(0, 0, 0, .3); text-align: center;
}

/* ---------- página do pedido ---------- */
.pedido-topo { background: var(--mata); color: #f4efe2; padding: 18px 0; border-bottom: 6px solid var(--ambar); }
.pedido-topo a { color: var(--ambar); font-size: .9rem; }
.pedido-topo h1 { font-size: 1.5rem; margin-top: 6px; }
.pedido main.wrap { padding-top: 16px; padding-bottom: 60px; max-width: 620px; }
.cartao { background: var(--papel); border: 1px solid var(--linha); border-radius: var(--raio); padding: 16px; margin-bottom: 14px; }
.cartao h2 { margin-bottom: 8px; }
.status-grande { font-family: var(--titulo); font-size: 1.35rem; font-weight: 800; margin: 8px 0 4px; }
.relogio { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.6rem; font-family: var(--titulo); }
.valor-pix { font-family: var(--titulo); font-size: 2rem; font-weight: 800; margin: 2px 0 10px; }
.campo-copia { display: flex; gap: 8px; align-items: stretch; margin: 6px 0 12px; }
.campo-copia output, .campo-copia code {
  flex: 1; min-width: 0; background: #f1ecdd; border-radius: 10px; padding: 10px 12px;
  font: 600 .98rem/1.35 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere;
}
.campo-copia code.longo { font-size: .72rem; font-weight: 400; max-height: 5.4em; overflow: auto; }
.rotulo { font-size: .72rem; letter-spacing: .1em; text-transform: uppercase; color: var(--suave); font-weight: 700; }
.qr { width: 220px; max-width: 100%; margin: 6px auto 12px; background: #fff; padding: 8px; border-radius: 12px; border: 1px solid var(--linha); }
.qr svg { display: block; width: 100%; height: auto; }
.envio input[type="file"] { width: 100%; font: inherit; padding: 10px; border: 1.5px dashed #b9b09a; border-radius: 12px; background: #fff; margin: 6px 0 10px; }
.progresso { height: 8px; background: #e8e1d0; border-radius: 999px; overflow: hidden; margin-top: 10px; }
.progresso span { display: block; height: 100%; width: 0; background: var(--mata-2); transition: width .2s; }
.acoes { display: grid; gap: 8px; margin-top: 6px; }
.ok-grande { background: #cdeed7; border-color: #9fd9b3; }
