/* Site público no formato de cartaz: foto do casal ao fundo, moldura com o título,
   cartela de corações e informações em pílulas brancas. */
@font-face {
  font-family: 'Montserrat';
  font-weight: 800;
  font-display: swap;
  src: url(/fonts/montserrat-800.woff2) format('woff2');
}
@font-face {
  font-family: 'Alex Brush';
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/alex-brush.woff2) format('woff2');
}
@font-face {
  font-family: 'Great Vibes';
  font-weight: 400;
  font-display: swap;
  src: url(/fonts/great-vibes.woff2) format('woff2');
}

:root {
  --preto: #0f0f10;
  --vermelho-x: #e3121f;
  --escolhido: #e8173c;
  --primaria: #0f0f10;
  --primaria-clara: #2c2c31;
  --destaque: #e8173c;
  --largura: 560px;
  --titulo: 'Montserrat', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}

body.site { background: #111; color: #fff; min-height: 100svh; }
body.site.com-carrinho { padding-bottom: 116px; }

/* ---------- Fundo ---------- */
.fundo-pagina { position: fixed; inset: 0; z-index: -2; overflow: hidden; background: #111; }
.fundo-pagina img {
  width: 100%; height: 100%; object-fit: cover;
  filter: blur(30px) brightness(.42) saturate(1.15); transform: scale(1.15);
}
.poster {
  position: relative; isolation: isolate; width: min(var(--largura), 100%);
  min-height: 100svh; margin: 0 auto; box-shadow: 0 0 90px rgba(0, 0, 0, .55);
}
.poster-foto {
  position: fixed; top: 0; bottom: 0; left: 50%; z-index: -1;
  width: min(var(--largura), 100%); transform: translateX(-50%); overflow: hidden; background: #222;
}
.poster-foto img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; }

/* ---------- Moldura do título ---------- */
.topo { min-height: 50svh; padding: max(14px, env(safe-area-inset-top)) 16px 0; }
.moldura {
  position: relative; max-width: 430px; margin: 0 auto; padding: 14px 14px 12px;
  background: linear-gradient(160deg, #fffaf2 0%, #fff3ea 55%, #fde9e4 100%);
  color: #5c0f22; text-align: center; border-radius: 26px;
  box-shadow: 0 18px 40px rgba(60, 10, 20, .35), 0 0 0 1px rgba(255, 255, 255, .7) inset;
}
.moldura::before {
  content: ''; position: absolute; inset: 6px; border: 1.5px solid #c9a15e;
  border-radius: 20px; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(201, 161, 94, .18) inset;
}
.moldura::after {
  content: ''; position: absolute; left: 50%; bottom: -13px; width: 30px; height: 28px;
  transform: translateX(-50%); background: #d81b3f;
  -webkit-mask: url(/img/coracao.svg) center / contain no-repeat;
  mask: url(/img/coracao.svg) center / contain no-repeat;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, .3));
}
.ponta { display: none; }
.moldura h1 {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin: 2px 0 0; color: #8a1630; font-family: var(--titulo); font-weight: 800;
  font-size: clamp(11px, 3.4vw, 15px); line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; white-space: nowrap;
}
.moldura h1::before, .moldura h1::after {
  content: ''; flex: 0 1 30px; min-width: 10px; height: 1.5px; background: linear-gradient(90deg, transparent, #c9a15e);
}
.moldura h1::after { background: linear-gradient(90deg, #c9a15e, transparent); }
.nomes {
  margin: 0; font-family: 'Alex Brush', 'Great Vibes', 'Snell Roundhand', cursive; font-weight: 400;
  font-size: clamp(28px, 9vw, 48px); line-height: 1.2; color: #3d0a16; white-space: nowrap;
}

/* ---------- Cartela ---------- */
.conteudo { padding: 0 12px calc(20px + env(safe-area-inset-bottom)); }
.dica {
  width: fit-content; max-width: 100%; margin: 0 auto 12px; padding: 8px 18px; border-radius: 999px;
  font: 800 .95rem / 1.2 var(--titulo); text-align: center; white-space: nowrap;
  animation: dica-pisca 2.6s ease-in-out infinite;
}
.dica { display: flex; align-items: center; gap: 10px; }
.dica-coracao {
  position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 35px; margin: -6px -6px -6px 0;
  filter: drop-shadow(0 3px 5px rgba(0, 0, 0, .45));
}
.dica-coracao::before {
  content: ''; position: absolute; inset: 0; background: rgba(0, 0, 0, .55);
  -webkit-mask: url(/img/coracao.svg) center / contain no-repeat;
  mask: url(/img/coracao.svg) center / contain no-repeat;
}
.dica-coracao b { position: relative; margin-top: -3px; font: 800 .82rem / 1 var(--titulo); color: #fff; font-variant-numeric: tabular-nums; }
.dica-coracao.descansando { animation: dica-respira 1.8s ease-in-out infinite; }
@keyframes dica-respira { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .45; transform: scale(.92); } }
@keyframes dica-pisca {
  0%, 40% { background: #e8173c; color: #fff; box-shadow: 0 0 0 3px rgba(232, 23, 60, .35), 0 8px 24px rgba(232, 23, 60, .5); }
  55%, 85% { background: rgba(0, 0, 0, .7); color: #ff4d6a; box-shadow: 0 0 0 2px rgba(232, 23, 60, .7), 0 8px 20px rgba(0, 0, 0, .35); }
  100% { background: #e8173c; color: #fff; box-shadow: 0 0 0 3px rgba(232, 23, 60, .35), 0 8px 24px rgba(232, 23, 60, .5); }
}
@media (prefers-reduced-motion: reduce) { .dica { animation: none; background: #e8173c; color: #fff; } }
.grade { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px 6px; }
@media (min-width: 600px) { .grade { grid-template-columns: repeat(10, 1fr); gap: 2px 4px; } }
.grade .carregando { grid-column: 1 / -1; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 14px; }

/* Cada número é um coração. */
.num {
  position: relative; display: grid; place-items: center; aspect-ratio: 1 / .93; min-width: 0;
  padding: 0 0 9%; border: 0; background: none; color: #fff; cursor: pointer;
  font: 800 clamp(16px, 4.8vw, 20px) / 1 var(--titulo); font-variant-numeric: tabular-nums;
  filter: drop-shadow(0 0 1px rgba(255, 255, 255, .85)) drop-shadow(0 3px 5px rgba(0, 0, 0, .4));
  -webkit-tap-highlight-color: transparent; touch-action: manipulation;
}
@media (min-width: 600px) { .num { font-size: 16px; } }
.num::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: var(--cor, var(--preto));
  -webkit-mask: url(/img/coracao.svg) center / contain no-repeat;
  mask: url(/img/coracao.svg) center / contain no-repeat;
  transition: transform .15s ease, background .15s ease;
}
.num:hover:not(:disabled)::before { transform: scale(1.07); }
.num:active:not(:disabled)::before { transform: scale(.93); }
.num.meu { --cor: var(--escolhido); }
.num.meu::before { transform: scale(1.1); }
.num:disabled, .num.ocupado { color: #fff; cursor: not-allowed; }
.num.ocupado span { opacity: .9; }
.num.ocupado::after {
  content: ''; position: absolute; inset: 4% 8% 10%;
  background: url(/img/x.svg) center / contain no-repeat;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .5));
}
.num:focus-visible { outline: 3px solid #fff; outline-offset: 0; border-radius: 12px; }

/* Legenda */
.legenda-site {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; width: fit-content;
  margin: 14px auto 0; padding: 7px 14px; border-radius: 999px; background: rgba(0, 0, 0, .62);
  font-size: .82rem; font-weight: 600; -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
}
.legenda-site span { display: inline-flex; align-items: center; gap: 6px; }
.mini {
  position: relative; display: inline-block; width: 17px; height: 16px; background: #000;
  -webkit-mask: url(/img/coracao.svg) center / contain no-repeat;
  mask: url(/img/coracao.svg) center / contain no-repeat;
  box-shadow: inset 0 0 0 1px #fff;
}
.mini.escolhido { background: var(--escolhido); }
.mini.x { background: #000 url(/img/x.svg) center / 80% no-repeat; }

/* ---------- Cartões de informação (mesmo estilo do quadro do título) ---------- */
.infos { display: grid; gap: 12px; margin-top: 20px; }
.cartao {
  position: relative; display: block; width: 100%; margin: 0; padding: 14px 18px 13px; border: 0;
  border-radius: 22px; text-align: center; color: #5c0f22; font: inherit;
  background: linear-gradient(160deg, #fffaf2 0%, #fff3ea 55%, #fde9e4 100%);
  box-shadow: 0 12px 28px rgba(40, 6, 14, .35);
}
.cartao::before {
  content: ''; position: absolute; inset: 5px; border: 1.5px solid #c9a15e; border-radius: 17px; pointer-events: none;
}
.rotulo {
  display: flex; align-items: center; justify-content: center; gap: 8px; margin-bottom: 4px;
  font: 800 .7rem / 1.2 var(--titulo); letter-spacing: .2em; text-transform: uppercase; color: #a8783a;
}
.rotulo::before, .rotulo::after { content: ''; flex: 0 1 26px; height: 1.5px; background: linear-gradient(90deg, transparent, #c9a15e); }
.rotulo::after { background: linear-gradient(90deg, #c9a15e, transparent); }
.cartao .texto { margin: 0; font-weight: 700; font-size: .95rem; line-height: 1.35; color: #3d0a16; }
.cartao .selo {
  display: inline-block; margin-top: 8px; padding: 4px 14px; border-radius: 999px;
  background: #8a1630; color: #fff4ea; font: 800 .78rem / 1.4 var(--titulo); letter-spacing: .12em; text-transform: uppercase;
}
.cartao .valor { display: block; font: 800 clamp(1.35rem, 6.4vw, 1.7rem) / 1.15 var(--titulo); color: #8a1630; white-space: nowrap; }
.data-sorteio { display: block; margin-top: 6px; font-weight: 700; font-size: .85rem; }
.cartao.premios p {
  margin: 0; font-weight: 700; font-size: 1rem; line-height: 1.5; color: #3d0a16; white-space: pre-line;
}

/* Pix: pisca branco e verde para chamar atenção. */
.cartao.pix { cursor: pointer; animation: pix-pisca 1.4s ease-in-out infinite; }
.cartao.pix small {
  display: block; margin-top: 4px; font: 800 .66rem / 1 var(--titulo); letter-spacing: .14em; text-transform: uppercase; opacity: .75;
}
.cartao.pix .rotulo, .cartao.pix .valor, .cartao.pix small { color: inherit; transition: color .25s; }
@keyframes pix-pisca {
  0%, 42% { background: #ffffff; color: #0f6b32; box-shadow: 0 12px 28px rgba(40, 6, 14, .35); }
  50%, 92% { background: #16a34a; color: #ffffff; box-shadow: 0 0 0 4px rgba(22, 163, 74, .35), 0 12px 30px rgba(22, 163, 74, .55); }
  100% { background: #ffffff; color: #0f6b32; }
}
.cartao.pix::before { border-color: currentColor; opacity: .5; }
.cartao.pix .rotulo::before, .cartao.pix .rotulo::after { background: currentColor; opacity: .5; }
@media (prefers-reduced-motion: reduce) { .cartao.pix { animation-duration: 3s; } }

/* ---------- Outras cartelas (discreto, no final) ---------- */
.cartelas { margin: 30px auto 4px; text-align: center; opacity: .78; }
.cartelas p {
  margin: 0 0 6px; font-size: .7rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .8);
}
.cartelas div { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.cartelas button {
  width: 38px; height: 38px; border: 1px solid rgba(255, 255, 255, .55); border-radius: 50%;
  background: rgba(0, 0, 0, .45); color: #fff; font: 800 .8rem / 1 var(--titulo); cursor: pointer;
}
.cartelas button.ativa { background: #fff; border-color: #fff; color: var(--preto); }

/* ---------- Barra de números escolhidos ---------- */
.carrinho {
  position: fixed; left: 50%; bottom: 0; z-index: 20; width: min(var(--largura), 100%);
  transform: translateX(-50%); padding: 12px 14px calc(12px + env(safe-area-inset-bottom));
  background: rgba(10, 10, 12, .96); color: #fff; border-radius: 18px 18px 0 0;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, .35);
}
.carrinho-inner { display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.carrinho-info { min-width: 0; }
.carrinho-nums { font-size: .85rem; color: #c9c9d1; max-height: 2.6em; overflow: hidden; word-break: break-word; }
.carrinho-acoes { display: flex; gap: 8px; flex-shrink: 0; }
.carrinho .btn-sec { color: #fff; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .6); }
.btn-reservar { background: var(--escolhido); }
.btn-reservar:hover { background: #c4102f; }
@media (max-width: 420px) {
  .carrinho-inner { flex-direction: column; align-items: stretch; }
  .carrinho-acoes .btn { flex: 1; }
}

/* ---------- Diálogos ---------- */
.site .dialogo h2 { font-family: var(--titulo); font-weight: 800; font-size: 1.35rem; }
.pix-box {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: .8rem 0;
  padding: .8rem; border-radius: 12px; background: #f4f4f6;
}
.pix-box span { width: 100%; font-size: .85rem; color: var(--texto-suave); }
.pix-box code { flex: 1 1 100%; max-height: 4.6em; overflow: auto; font-size: .8rem; font-weight: 700; word-break: break-all; }
.instrucoes { color: var(--texto-suave); font-size: .95rem; }
.site .dlg-resumo { background: #f4f4f6; }

/* ---------- Tela grande (computador) ---------- */
.btn-tela {
  position: fixed; top: 14px; right: 16px; z-index: 30; padding: 9px 16px; border: 1px solid rgba(255, 255, 255, .5);
  border-radius: 999px; background: rgba(0, 0, 0, .55); color: #fff; font: 800 .85rem / 1 var(--titulo);
  cursor: pointer; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
}
.btn-tela:hover { background: rgba(0, 0, 0, .75); }
@media (min-width: 900px) {
  body.tela-grande .poster {
    display: grid; grid-template-columns: minmax(340px, 38%) 1fr; grid-template-rows: auto 1fr; gap: 0 36px;
    width: min(1320px, calc(100vw - 48px)); padding: 24px 0 40px; box-shadow: none;
  }
  body.tela-grande .poster-foto {
    position: sticky; top: 24px; left: auto; z-index: 0; grid-column: 1; grid-row: 1 / span 2;
    width: auto; height: calc(100vh - 48px); transform: none; border-radius: 28px;
    box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  }
  body.tela-grande .topo { grid-column: 2; min-height: 0; padding: 8px 0 26px; }
  body.tela-grande .moldura { max-width: 640px; padding: 18px 26px 14px; }
  body.tela-grande .moldura h1 { font-size: 19px; }
  body.tela-grande .nomes { font-size: 58px; }
  body.tela-grande .conteudo { grid-column: 2; padding: 0; }
  body.tela-grande .grade { grid-template-columns: repeat(10, 1fr); gap: 6px 8px; }
  body.tela-grande .num { font-size: clamp(16px, 1.45vw, 24px); }
  body.tela-grande .infos { grid-template-columns: 1fr 1fr; }
  body.tela-grande .infos .premios { grid-row: span 2; display: flex; flex-direction: column; justify-content: center; }
  body.tela-grande .infos .pix { grid-column: 1 / -1; }
  body.tela-grande .carrinho { width: min(1320px, calc(100vw - 48px)); }
}

/* ---------- Cartela "Em breve" ---------- */
.cartelas button.breve { opacity: .55; border-style: dashed; }
.cartelas button.breve.ativa { opacity: 1; }
body.cartela-breve .dica, body.cartela-breve .legenda-site { display: none; }
.em-breve {
  grid-column: 1 / -1; display: grid; justify-items: center; gap: 10px; margin: 6px 0; padding: 34px 20px;
  border-radius: 24px; text-align: center; color: #5c0f22;
  background: linear-gradient(160deg, #fffaf2 0%, #fff3ea 55%, #fde9e4 100%); box-shadow: 0 14px 34px rgba(40, 6, 14, .35);
}
.em-breve strong { font: 400 clamp(44px, 13vw, 64px) / 1.1 'Alex Brush', 'Great Vibes', cursive; color: #8a1630; }
.em-breve span { font-weight: 700; color: #3d0a16; }
.btn-ir {
  margin-top: 4px; padding: 12px 20px; border: 0; border-radius: 999px; background: #e8173c; color: #fff;
  font: 800 .9rem / 1.2 var(--titulo); cursor: pointer; box-shadow: 0 8px 20px rgba(232, 23, 60, .35);
}

/* ---------- Aviso de internet (vermelho piscando) ---------- */
@keyframes alerta-pisca {
  0%, 100% { background: #e3121f; box-shadow: 0 0 0 4px rgba(227, 18, 31, .35), 0 12px 30px rgba(227, 18, 31, .5); }
  50% { background: #7a0a12; box-shadow: 0 0 0 2px rgba(227, 18, 31, .2), 0 8px 20px rgba(0, 0, 0, .4); }
}
.aviso-rede {
  position: fixed; top: max(10px, env(safe-area-inset-top)); left: 50%; z-index: 60; transform: translateX(-50%);
  width: min(540px, calc(100% - 20px)); padding: 14px 18px; border-radius: 18px; color: #fff; text-align: center;
  font: 800 1.02rem / 1.35 var(--titulo); animation: alerta-pisca 1.1s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .aviso-rede { animation: none; background: #e3121f; } }
.cartao .selo:empty { display: none; }

.ok-whats { display: contents; }
#dlg-ok .dlg-acoes { justify-content: center; }
