/* ==========================================================
   APURAÇÃO — camada de jogo (complementa apuracao.css, não altera o layout)
   ========================================================== */

.card__art { container-type: inline-size; }
.card__label { position: relative; overflow: hidden; }
.card { cursor: pointer; }

/* ---------- camada de efeito sobre o desenho ---------- */
.jg-fx {
  position: absolute; inset: 0; z-index: 2;
  display: grid; place-items: center;
  pointer-events: none; opacity: 0;
  transition: opacity .25s var(--suave);
}
.jg-play .jg-fx { opacity: 1; }
.ico { transition: opacity .35s var(--suave), transform .35s var(--suave); }
.jg-play .ico { opacity: .16; transform: scale(.92); }

.jg-placar {
  display: flex; align-items: center; gap: 1.6cqw;
  padding: 2.4cqw 4cqw; border-radius: 5cqw;
  background: var(--tinta); color: var(--laranja-2);
  box-shadow: 0 2cqw 5cqw -2cqw rgba(0,0,0,.45);
  transform: scale(.4) translateY(10%); opacity: 0;
}
.jg-play .jg-placar { animation: jg-surge .55s cubic-bezier(.2,1.6,.4,1) forwards; }
.jg-dig {
  display: inline-grid; place-items: center;
  width: 12cqw; height: 16cqw; border-radius: 2.4cqw;
  background: #1f1f1f; box-shadow: 0 0 0 .5cqw #2a2a2a inset;
  font-size: 12cqw; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums;
}
.jg-dig.ok { color: #fff; background: var(--laranja); animation: jg-tic .35s var(--suave); }
.jg-placar--num { flex-direction: column; gap: .4cqw; padding: 2.6cqw 6cqw 2.2cqw; }
.jg-num { font-size: 15cqw; line-height: 1; font-weight: 900; font-variant-numeric: tabular-nums; color: #fff; }
.jg-sub { font-size: 3.6cqw; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--laranja-2); }
.jg-hex {
  padding: 2.6cqw 4.6cqw; border-radius: 4cqw;
  background: var(--tinta); color: var(--laranja-2);
  font: 900 7.4cqw/1 ui-monospace, "SFMono-Regular", Consolas, monospace; letter-spacing: .06em; white-space: nowrap;
  transform: scale(.4); opacity: 0;
}
.jg-play .jg-hex { animation: jg-surge .5s cubic-bezier(.2,1.6,.4,1) forwards; }
.jg-hex.ok { color: #fff; box-shadow: 0 0 0 1cqw var(--laranja) inset; }

.jg-selo {
  position: absolute; right: 7%; bottom: 9%;
  padding: 1.4cqw 3cqw; border: 1.2cqw solid var(--laranja); border-radius: 3cqw;
  background: #fff; color: var(--laranja-esc);
  font-size: 5.4cqw; font-weight: 900; letter-spacing: .06em; line-height: 1; white-space: nowrap;
  transform: rotate(-12deg) scale(2.6); opacity: 0;
}
.jg-selo.ok { animation: jg-carimbo .45s cubic-bezier(.3,1.4,.5,1) forwards; }

/* brilho que atravessa o rótulo */
.card__label::after {
  content: ""; position: absolute; top: -20%; bottom: -20%; left: -40%; width: 30%;
  background: linear-gradient(100deg, rgba(255,255,255,0), rgba(255,255,255,.55), rgba(255,255,255,0));
  transform: translateX(-120%) skewX(-18deg); pointer-events: none;
}
.jg-play .card__label::after { animation: jg-brilho 1s .15s var(--suave); }
.jg-forte .card__art { animation: jg-tremor .5s var(--suave); }

/* ---------- explosão ---------- */
.jg-burst { position: absolute; width: 0; height: 0; z-index: 6; pointer-events: none; }
.jg-anel {
  position: absolute; left: -24px; top: -24px; width: 48px; height: 48px;
  border-radius: 50%; border: 5px solid var(--laranja);
  animation: jg-anel .8s cubic-bezier(.15,.7,.3,1) forwards;
}
.jg-anel--2 { border-color: var(--tinta); border-width: 3px; animation-delay: .12s; opacity: 0; }
.jg-p {
  position: absolute; left: -6px; top: -6px; width: 12px; height: 12px;
  background: var(--cor, var(--laranja)); border-radius: 3px;
  box-shadow: 0 0 0 1.5px rgba(17,17,17,.08);
  animation: jg-voa 1s cubic-bezier(.12,.75,.3,1) forwards; opacity: 0;
}
.jg-p--1 { border-radius: 50%; }
.jg-p--2 { width: 5px; height: 16px; left: -2.5px; top: -8px; border-radius: 3px; }
.jg-p--3 { border-radius: 0; clip-path: polygon(50% 0, 100% 100%, 0 100%); }

/* ---------- conquista ---------- */
.jg-ok {
  position: absolute; top: 16px; right: 16px; z-index: 4;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px 6px 9px; border-radius: 999px;
  background: var(--tinta); color: #fff;
  font-size: .78rem; font-weight: 900; letter-spacing: .08em;
  box-shadow: 0 6px 14px -6px rgba(0,0,0,.5);
  animation: jg-pop .5s cubic-bezier(.2,1.6,.4,1);
  pointer-events: none;
}
.jg-ok::before {
  content: ""; width: 14px; height: 14px; border-radius: 50%; background: var(--laranja);
  box-shadow: inset 0 0 0 3px var(--laranja);
}

.jg-toast {
  position: fixed; left: 50%; bottom: calc(18px + env(safe-area-inset-bottom)); z-index: 9998;
  display: grid; gap: 4px; justify-items: center; text-align: center;
  min-width: min(92vw, 300px); max-width: 92vw;
  padding: 14px 22px 12px; border-radius: 22px;
  background: var(--tinta); color: #fff;
  box-shadow: 0 20px 40px -18px rgba(0,0,0,.55);
  transform: translate(-50%, 140%); opacity: 0;
  transition: transform .5s cubic-bezier(.2,1.4,.4,1), opacity .3s;
  pointer-events: none;
}
.jg-toast.vis { transform: translate(-50%, 0); opacity: 1; }
.jg-toast__t { font-size: 1.15rem; font-weight: 900; color: var(--laranja-2); }
.jg-toast__x { font-size: .95rem; font-weight: 700; }
.jg-pips { display: flex; gap: 8px; margin-top: 6px; }
.jg-pips i { width: 26px; height: 7px; border-radius: 4px; background: #3a3a3a; transition: background .3s; }
.jg-pips i.on { background: var(--laranja); }

.jg-confete { position: fixed; inset: 0; z-index: 9999; pointer-events: none; overflow: hidden; }
.jg-c {
  position: absolute; top: -24px; width: 10px; height: 14px; border-radius: 2px;
  background: var(--cor); animation-name: jg-cai; animation-timing-function: cubic-bezier(.25,.6,.4,1); animation-fill-mode: forwards;
}

/* ---------- aguardando ---------- */
.jg-contagem {
  display: grid; justify-items: center; gap: 4px;
  width: fit-content; margin: clamp(18px, 3.4vh, 34px) auto 0;
  padding: 12px clamp(22px, 4vw, 40px) 12px;
  border-radius: 26px; background: rgba(255,255,255,.9);
  box-shadow: 0 10px 24px -14px rgba(120,70,30,.3), 0 1px 4px rgba(120,70,30,.05);
  text-align: center;
}
.jg-contagem__r { font-size: clamp(.85rem, 1.4vw, 1rem); letter-spacing: .1em; text-transform: uppercase; color: #6b6460; }
.jg-contagem__v { font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1; font-weight: 900; color: var(--laranja); font-variant-numeric: tabular-nums; letter-spacing: .03em; }
.jg-contagem__d { font-size: clamp(.8rem, 1.3vw, .95rem); font-weight: 700; color: var(--tinta); }
.jg-contagem.quase .jg-contagem__v { animation: jg-pulso .5s ease-in-out infinite alternate; }
.jg-contagem.zero .jg-contagem__v { color: var(--tinta); }
.aguardando .cards { margin-top: clamp(24px, 4.5vh, 52px); }

.jg-trava {
  position: absolute; inset: 0; z-index: 3;
  display: grid; place-items: center; align-content: center; gap: 2cqw;
  background: rgba(247,245,243,.55);
  pointer-events: none;
}
.jg-trava svg { width: 20cqw; height: auto; animation: jg-balanca 2.4s ease-in-out infinite alternate; transform-origin: 50% 0; }
.jg-trava b { padding: 1.2cqw 3.4cqw; border-radius: 999px; background: var(--tinta); color: #fff; font-size: 5cqw; font-weight: 900; letter-spacing: .06em; }
.aguardando .card { cursor: not-allowed; }
.aguardando .ico { filter: grayscale(.5); opacity: .55; }
.jg-nao .card__art { animation: jg-nao .45s var(--suave); }

/* ---------- aviso LGPD ---------- */
.aviso-lgpd {
  max-width: 66ch; margin: clamp(26px, 4.5vh, 48px) auto 0; text-align: center;
  font-size: clamp(.72rem, 1.1vw, .82rem); line-height: 1.5; font-weight: 600; color: #7a716b;
}
.links.reveal + .aviso-lgpd.reveal { animation-delay: .7s; }

/* página "ainda não disponível" */
.pg-aviso { margin: 0; min-height: 100vh; display: grid; place-items: center; background: #f7f5f3; color: #111;
  font-family: ui-rounded, "Nunito", "Segoe UI", system-ui, Arial, sans-serif; text-align: center; padding: 24px; }
.pg-aviso main { background: #fff; border-radius: 28px; padding: 36px 28px; max-width: 30rem; box-shadow: 0 14px 34px -14px rgba(120,70,30,.28); }
.pg-aviso h1 { color: #ff6a0d; margin: 0 0 10px; }
.pg-aviso a { display: inline-block; margin-top: 14px; padding: 12px 22px; border-radius: 18px; background: #ff6a0d; color: #fff; font-weight: 900; text-decoration: none; }

/* ---------- celular ---------- */
@media (max-width: 720px) {
  .jg-ok { top: 10px; right: 12px; font-size: .64rem; padding: 4px 9px 4px 7px; }
  .jg-ok::before { width: 11px; height: 11px; }
  .jg-selo { right: 4%; bottom: 6%; font-size: 9cqw; border-width: 1.6cqw; }
  .jg-dig { width: 22cqw; height: 30cqw; font-size: 22cqw; }
  .jg-num { font-size: 26cqw; }
  .jg-sub { display: none; }
  .jg-hex { font-size: 12cqw; letter-spacing: .02em; white-space: normal; width: 74cqw; text-align: center; line-height: 1.15; padding: 3cqw; }
  .jg-trava svg { width: 34cqw; }
  .jg-trava b { font-size: 10cqw; }
}

/* ---------- animações ---------- */
@keyframes jg-surge { to { transform: none; opacity: 1; } }
@keyframes jg-tic { 0% { transform: scale(1.35); } 100% { transform: scale(1); } }
@keyframes jg-carimbo { 0% { transform: rotate(-12deg) scale(2.6); opacity: 0; } 60% { transform: rotate(-12deg) scale(.92); opacity: 1; } 100% { transform: rotate(-12deg) scale(1); opacity: 1; } }
@keyframes jg-brilho { to { transform: translateX(520%) skewX(-18deg); } }
@keyframes jg-tremor { 0%,100% { transform: none; } 20% { transform: translateX(-4px) rotate(-1deg); } 40% { transform: translateX(4px) rotate(1deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
@keyframes jg-anel { 0% { transform: scale(.2); opacity: 1; } 100% { transform: scale(6); opacity: 0; } }
@keyframes jg-voa {
  0% { transform: translate(0,0) scale(0) rotate(0); opacity: 1; }
  15% { opacity: 1; }
  100% { transform: translate(var(--dx), var(--dy)) scale(var(--s)) rotate(var(--rot)); opacity: 0; }
}
@keyframes jg-pop { 0% { transform: scale(0); } 100% { transform: scale(1); } }
@keyframes jg-cai { to { transform: translate(var(--x), 112vh) rotate(var(--rot)); } }
@keyframes jg-pulso { from { transform: scale(1); } to { transform: scale(1.08); } }
@keyframes jg-balanca { from { transform: rotate(-6deg); } to { transform: rotate(6deg); } }
@keyframes jg-nao { 0%,100% { transform: none; } 20% { transform: translateX(-10px); } 40% { transform: translateX(9px); } 60% { transform: translateX(-6px); } 80% { transform: translateX(4px); } }

@media (prefers-reduced-motion: reduce) {
  .jg-fx, .jg-burst, .jg-confete { display: none !important; }
  .jg-play .ico { opacity: 1; transform: none; }
}
