/* =====================================================================
   Bingo da Família — visual de bingo de quermesse, feito pra celular
   ===================================================================== */

:root {
  --zoom: 1;
  --bg-1: #1a1442;
  --bg-2: #0d0a24;
  --surface: rgba(255, 255, 255, .07);
  --surface-2: rgba(255, 255, 255, .13);
  --line: rgba(255, 255, 255, .14);
  --text: #f8f5ff;
  --muted: #b8b0e8;
  --paper: #fff6dc;
  --paper-2: #fffdf5;
  --paper-line: #ecdcb3;
  --ink: #24183f;
  --gold: #ffc83d;
  --gold-2: #ffe07a;
  --gold-deep: #c98400;
  --dauber: #e3127a;
  --danger: #ff5a6e;
  --font: 'Baloo 2', 'Trebuchet MS', 'Segoe UI', system-ui, sans-serif;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
  --chat-h: 4.1rem;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }

html {
  font-size: calc(16px * var(--zoom));
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  overscroll-behavior: none;
  background: var(--bg-2);
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--font);
  font-weight: 500;
  color: var(--text);
  background:
    radial-gradient(60rem 30rem at 15% -5%, rgba(255, 71, 102, .18), transparent 60%),
    radial-gradient(50rem 30rem at 95% 10%, rgba(47, 123, 255, .2), transparent 60%),
    radial-gradient(120% 90% at 50% 0%, #2c2170 0%, var(--bg-1) 45%, var(--bg-2) 100%);
  background-attachment: fixed;
  overscroll-behavior: none;
}

button, a, [role="button"], label {
  touch-action: manipulation;
  -webkit-user-select: none;
  user-select: none;
  -webkit-touch-callout: none;
}

button { font: inherit; color: inherit; cursor: pointer; }
input, textarea, select { font: inherit; font-size: max(16px, 1rem); }
h1, h2, p { margin: 0; }

svg.i {
  width: 1.25em; height: 1.25em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}

/* ------------------------------------------------------------ botões */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  min-height: 3rem; padding: 0 1.15rem;
  border: 0; border-radius: 999px;
  font-weight: 700; font-size: 1.02rem; line-height: 1;
  text-decoration: none;
  transition: transform .12s var(--ease-out), box-shadow .12s var(--ease-out), filter .12s;
}
.btn:active { transform: translateY(2px) scale(.98); }

.btn-ouro {
  color: #3d2500;
  background: linear-gradient(180deg, var(--gold-2), var(--gold) 55%, #f5a800);
  box-shadow: 0 5px 0 var(--gold-deep), 0 10px 24px rgba(255, 180, 0, .25);
}
.btn-ouro:active { box-shadow: 0 2px 0 var(--gold-deep), 0 4px 12px rgba(255, 180, 0, .2); transform: translateY(3px); }

.btn-vidro { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }
.btn-zap { background: #1fb855; color: #fff; box-shadow: 0 4px 0 #11823a; }
.btn-zap:active { box-shadow: 0 1px 0 #11823a; transform: translateY(3px); }
.btn-perigo { background: rgba(255, 90, 110, .16); color: #ffb3bd; box-shadow: inset 0 0 0 1px rgba(255, 90, 110, .4); }

.btn-grande { width: 100%; min-height: 3.9rem; font-size: 1.32rem; font-weight: 800; }

.btn-mini {
  display: inline-flex; align-items: center; gap: .3rem;
  padding: .3rem .75rem; border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font-size: .85rem; font-weight: 700;
}
.btn-mini:active { transform: scale(.95); }

.ico {
  display: inline-flex; align-items: center; justify-content: center; gap: .2rem;
  min-width: 2.65rem; height: 2.65rem; padding: 0 .5rem;
  border: 0; border-radius: 999px;
  background: var(--surface-2); color: var(--text);
  font-size: 1rem; font-weight: 800;
  transition: transform .1s var(--ease-out), background .15s;
}
.ico:active { transform: scale(.92); background: rgba(255, 255, 255, .22); }
.ico.txt { font-size: 1.15rem; padding: 0 .55rem; }
.ico.txt sup { font-size: .7em; margin-left: 1px; }
.ico.desligado { color: var(--danger); }

@media (hover: hover) and (pointer: fine) {
  .btn-vidro:hover, .ico:hover, .btn-mini:hover { background: rgba(255, 255, 255, .2); }
  .btn-ouro:hover { filter: brightness(1.06); }
  .cel:hover:not(.livre):not(.marcada) { background: #fff; }
}

/* ------------------------------------------------------------ bolinhas */
.bola {
  --s: 3rem;
  --c: #2f7bff; --cl: #8fbaff; --cd: #1440a0;
  position: relative; flex: none;
  display: inline-grid; place-items: center;
  width: var(--s); height: var(--s);
  border-radius: 50%;
  font-size: calc(var(--s) * .36); line-height: 1;
  background:
    radial-gradient(circle at 30% 22%, rgba(255, 255, 255, .95) 0 5%, rgba(255, 255, 255, 0) 15%),
    radial-gradient(circle at 36% 30%, var(--cl) 0%, var(--c) 45%, var(--cd) 100%);
  box-shadow:
    inset calc(var(--s) * -.05) calc(var(--s) * -.08) calc(var(--s) * .14) rgba(0, 0, 0, .28),
    0 calc(var(--s) * .07) calc(var(--s) * .16) rgba(0, 0, 0, .38);
}
.bola > span {
  display: grid; place-items: center; align-content: center;
  width: 62%; height: 62%; border-radius: 50%;
  background: radial-gradient(circle at 42% 35%, #fff 0 55%, #ebe6f5 100%);
  box-shadow: inset 0 calc(var(--s) * -.02) calc(var(--s) * .04) rgba(0, 0, 0, .18);
  color: var(--ink);
}
.bola small { font-size: .42em; font-weight: 800; color: var(--cd); line-height: .9; }
.bola b { font-size: 1em; font-weight: 800; line-height: .92; letter-spacing: -.03em; }

.L-B { --c: #2f7bff; --cl: #8fbaff; --cd: #1440a0; }
.L-I { --c: #ff4766; --cl: #ff9fb1; --cd: #a3102d; }
.L-N { --c: #9b5cff; --cl: #ceb2ff; --cd: #5320b5; }
.L-G { --c: #12b981; --cl: #84e6c1; --cd: #066b49; }
.L-O { --c: #ff8a1f; --cl: #ffc48a; --cd: #ad4e00; }

/* ------------------------------------------------------------ avatares */
.av {
  --avc: #5b4bd6;
  display: inline-grid; place-items: center; flex: none;
  width: 2.3rem; height: 2.3rem; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .35), rgba(255, 255, 255, 0) 60%), var(--avc);
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .15);
  font-size: 1.35rem; line-height: 1;
}

/* ================================================================ INÍCIO */
.tela { display: block; }
main.tela {
  width: 100%; max-width: 64rem; margin: 0 auto;
  padding: 1rem min(1rem, 4vw) calc(var(--chat-h) + 1.5rem + env(safe-area-inset-bottom));
}

#tela-inicio { padding-bottom: calc(2rem + env(safe-area-inset-bottom)); padding-top: calc(1rem + env(safe-area-inset-top)); }
.inicio { max-width: 27rem; margin: 0 auto; }

.marca { text-align: center; padding: 1.2rem 0 1.4rem; }
.marca-bolas { display: flex; justify-content: center; gap: .35rem; margin-bottom: .6rem; }
.marca-bolas .bola { --s: min(3.3rem, 15vw); font-size: min(1.5rem, 7vw); animation: quica 2.4s var(--ease-out) infinite; animation-delay: calc(var(--i) * .14s); }
.marca-bolas .bola b { color: var(--cd); }
@keyframes quica {
  0%, 60%, 100% { transform: translateY(0); }
  30% { transform: translateY(-14px) rotate(-8deg); }
  45% { transform: translateY(0) scale(1.06, .94); }
}
.marca h1 {
  font-size: 3.6rem; font-weight: 800; line-height: .9; letter-spacing: -.02em;
  color: var(--gold);
  text-shadow: 0 3px 0 var(--gold-deep), 0 6px 0 #6b3f00, 0 12px 24px rgba(0, 0, 0, .45);
}
.marca h1 em {
  display: block; font-style: normal; font-size: .46em; font-weight: 700; letter-spacing: .02em;
  color: #fff; text-shadow: 0 2px 0 #5a2fb0, 0 6px 14px rgba(0, 0, 0, .4); margin-top: .35rem;
}

.cartao {
  background: linear-gradient(180deg, rgba(255, 255, 255, .09), rgba(255, 255, 255, .04));
  border: 1px solid var(--line);
  border-radius: 1.6rem;
  padding: 1.3rem min(1.1rem, 5vw) 1.4rem;
  box-shadow: 0 20px 50px rgba(0, 0, 0, .35);
}
.rotulo { display: block; font-weight: 700; font-size: 1.05rem; margin: 0 0 .45rem .2rem; color: #fff; }
.rotulo + .avatares { margin-top: 0; }
.campo {
  width: 100%; height: 3.4rem; padding: 0 1.1rem;
  border: 2px solid rgba(255, 255, 255, .16); border-radius: 1rem;
  background: rgba(10, 6, 34, .55); color: #fff;
  font-weight: 700; font-size: max(16px, 1.2rem);
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.campo::placeholder { color: rgba(255, 255, 255, .35); font-weight: 600; }
.campo:focus { border-color: var(--gold); box-shadow: 0 0 0 4px rgba(255, 200, 61, .2); }
#in-nome { margin-bottom: 1.2rem; }

.aviso-sala, .saudacao {
  text-align: center; font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; line-height: 1.25;
}
.aviso-sala b { color: var(--gold); letter-spacing: .08em; }
.aviso-sala.erro { color: #ffb3bd; }
.saudacao { color: var(--gold-2); }

.avatares { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: min(.6rem, 2.5vw); }
.avatares.todos { grid-template-columns: repeat(auto-fill, minmax(min(4.1rem, 18vw), 1fr)); }
.av-op {
  position: relative; height: min(5.3rem, 23vw); min-width: 0; padding: 0;
  border: 3px solid transparent; border-radius: 1.3rem;
  background: var(--surface); font-size: min(2.9rem, 12vw); line-height: 1;
  transition: transform .18s var(--spring), border-color .15s, background .15s;
}
.avatares.todos .av-op { height: min(4.2rem, 18vw); font-size: min(2.3rem, 10vw); }
.av-op:active { transform: scale(.92); }
.av-op[aria-checked="true"] {
  border-color: var(--gold);
  background: radial-gradient(circle at 50% 40%, rgba(255, 200, 61, .35), rgba(255, 200, 61, .08));
  transform: scale(1.04);
}
.av-op[aria-checked="true"]::after {
  content: '✓'; position: absolute; top: -.55rem; right: -.45rem;
  width: 1.6rem; height: 1.6rem; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--gold); color: #3d2500; font-size: 1rem; font-weight: 800;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.link-mais {
  display: block; margin: .55rem auto 1.3rem; padding: .35rem .8rem;
  border: 0; background: none; color: var(--muted); font-weight: 700; font-size: .95rem;
}

.ou { margin-top: 1.3rem; text-align: center; }
.ou > span { display: block; color: var(--muted); font-size: .92rem; font-weight: 600; margin-bottom: .55rem; }
.linha-codigo { display: flex; gap: .5rem; }
.campo-codigo { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: .3em; text-align: center; font-size: max(16px, 1.35rem); }
.campo-codigo::placeholder { letter-spacing: .3em; }
.linha-codigo .btn { flex: none; min-height: 3.4rem; border-radius: 1rem; }

.rodape-inicio { text-align: center; color: var(--muted); font-size: .9rem; margin-top: 1.2rem; }

/* ================================================================ TOPO
   Medidas em px de propósito: o A−/A+ aumenta o jogo, mas o topo fica
   do mesmo tamanho pra nunca sair da tela (e o A− continuar alcançável). */
.topo {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: calc(9px + env(safe-area-inset-top)) max(11px, env(safe-area-inset-right)) 9px max(11px, env(safe-area-inset-left));
  background: rgba(22, 17, 58, .86);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.chip-sala {
  display: inline-flex; align-items: baseline; gap: 6px; flex: none;
  height: 42px; padding: 0 14px; border: 0; border-radius: 999px;
  background: rgba(255, 200, 61, .14); box-shadow: inset 0 0 0 1px rgba(255, 200, 61, .35);
  line-height: 42px;
}
.chip-sala span { font-size: 13px; color: var(--muted); font-weight: 600; }
.chip-sala b { font-size: 18px; color: var(--gold); letter-spacing: .12em; font-weight: 800; }
.topo-acoes { display: flex; gap: 6px; }
.topo .ico { min-width: 42px; height: 42px; padding: 0 8px; font-size: 16px; }
.topo .ico.txt { font-size: 18px; padding: 0 9px; }
.topo svg.i { width: 20px; height: 20px; }
#bt-gente span { font-size: 15px; }

@media (max-width: 380px) {
  .topo-acoes { gap: 4px; }
  .topo .ico { min-width: 38px; height: 38px; padding: 0 6px; }
  .topo .ico.txt { padding: 0 7px; }
  .chip-sala { padding: 0 10px; height: 38px; line-height: 38px; }
  .chip-sala span { display: none; }
}

/* ================================================================ LOBBY */
#tela-lobby { max-width: 34rem; }

.convite {
  position: relative; text-align: center;
  padding: 1.3rem min(1.1rem, 5vw) 1.2rem;
  border-radius: 1.5rem;
  background:
    radial-gradient(circle at 0 50%, var(--bg-1) 0 .9rem, transparent .95rem),
    radial-gradient(circle at 100% 50%, var(--bg-1) 0 .9rem, transparent .95rem),
    linear-gradient(160deg, #3a2b8f, #251c66);
  box-shadow: inset 0 0 0 2px rgba(255, 200, 61, .45), 0 18px 40px rgba(0, 0, 0, .35);
}
.convite-rotulo { color: var(--muted); font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .14em; }
.convite-codigo { display: flex; justify-content: center; gap: .45rem; margin: .45rem 0 .8rem; }
.convite-codigo span {
  display: grid; place-items: center;
  width: min(3.3rem, 17vw); height: min(4rem, 21vw); border-radius: .9rem;
  background: var(--paper); color: var(--ink);
  font-size: min(2.4rem, 12vw); font-weight: 800;
  box-shadow: 0 4px 0 #d9c58e, 0 10px 18px rgba(0, 0, 0, .3);
  animation: pop .5s var(--spring) both; animation-delay: calc(var(--i) * .07s);
}
.convite-texto { font-weight: 700; margin-bottom: .7rem; }
.convite-botoes { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; }
.convite-botoes .btn { min-height: 2.9rem; padding: 0 1rem; font-size: .98rem; }

.qr {
  width: 12rem; max-width: 70vw; margin: 1rem auto 0; padding: .7rem;
  background: #fff; border-radius: 1rem; box-shadow: 0 8px 20px rgba(0, 0, 0, .3);
}
.qr svg { display: block; width: 100%; height: auto; }
.qr p { color: var(--ink); font-size: .85rem; font-weight: 700; margin-top: .35rem; }

.bloco {
  margin-top: 1rem; padding: 1.1rem min(1rem, 4vw) 1.15rem;
  border-radius: 1.4rem; background: var(--surface); border: 1px solid rgba(255, 255, 255, .08);
}
.bloco h2 {
  display: flex; align-items: center; gap: .5rem;
  font-size: 1.18rem; font-weight: 800; margin-bottom: .8rem;
}
.bloco h2 .btn-mini { margin-left: auto; }
.contador {
  display: inline-grid; place-items: center; min-width: 1.8rem; height: 1.8rem; padding: 0 .45rem;
  border-radius: 999px; background: var(--gold); color: #3d2500; font-size: 1rem;
}

.chegaram { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(5rem, 1fr)); gap: .7rem .4rem; }
.chegaram li { position: relative; display: flex; flex-direction: column; align-items: center; gap: .3rem; text-align: center; }
.chegaram li.novo { animation: pop .55s var(--spring) both; }
.chegaram .av { width: 3.5rem; height: 3.5rem; font-size: 2.1rem; }
.chegaram li span { font-weight: 700; font-size: .95rem; line-height: 1.1; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chegaram li.off { opacity: .45; }
.chegaram .voce { margin-top: -.3rem; font-size: .75rem; font-weight: 800; color: var(--gold); text-transform: uppercase; letter-spacing: .08em; }
.coroa { position: absolute; top: -.7rem; left: 50%; margin-left: .5rem; font-size: 1.15rem; transform: rotate(18deg); filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .4)); }

.segmentos { display: grid; grid-template-columns: repeat(3, 1fr); gap: .45rem; margin-bottom: 1rem; }
.segmentos button {
  display: flex; flex-direction: column; align-items: center; gap: .1rem;
  padding: .6rem .3rem; border: 2px solid transparent; border-radius: 1rem;
  background: var(--surface-2); line-height: 1.1;
}
.segmentos b { font-size: min(1.02rem, 4.4vw); }
.segmentos small { font-size: min(.8rem, 3.6vw); color: var(--muted); font-weight: 600; }
.segmentos button[aria-pressed="true"] { border-color: var(--gold); background: rgba(255, 200, 61, .16); }
.segmentos button[aria-pressed="true"] small { color: var(--gold-2); }
.dica { color: var(--muted); font-size: .9rem; text-align: center; margin-top: .75rem; }

.esperando { text-align: center; padding: 1.6rem 1rem .4rem; }
.esperando p { font-size: 1.2rem; font-weight: 700; }
.pontinhos { display: flex; justify-content: center; gap: .45rem; margin-bottom: .6rem; }
.pontinhos i { width: .8rem; height: .8rem; border-radius: 50%; background: var(--gold); animation: pontinho 1.2s ease-in-out infinite; }
.pontinhos i:nth-child(2) { animation-delay: .15s; background: #ff4766; }
.pontinhos i:nth-child(3) { animation-delay: .3s; background: #2f7bff; }
@keyframes pontinho { 0%, 80%, 100% { transform: translateY(0); opacity: .5; } 40% { transform: translateY(-10px); opacity: 1; } }

.link-tv {
  display: flex; align-items: center; justify-content: center; gap: .5rem;
  margin: 1.3rem auto 0; padding: .7rem; color: var(--muted); font-weight: 700; text-decoration: none;
}

/* ================================================================ LOCUTOR */

.locutor {
  position: relative;
  max-width: 30rem; margin: 0 auto .8rem;
  padding: .8rem min(.8rem, 3vw) .7rem;
  border-radius: 1.5rem;
  background: linear-gradient(170deg, rgba(255, 255, 255, .1), rgba(255, 255, 255, .03));
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 14px 34px rgba(0, 0, 0, .3);
}
.locutor-palco { display: flex; align-items: center; gap: .8rem; }
.locutor-info { flex: 1; min-width: 0; }
.frase { font-size: 1.12rem; font-weight: 800; line-height: 1.15; color: var(--gold-2); min-height: 2.6em; display: flex; align-items: center; }
.contagem-pedras { color: var(--muted); font-weight: 600; font-size: .92rem; margin-top: .15rem; }
.contagem-pedras b { color: #fff; font-size: 1.1rem; }

.locutor-trilho { display: flex; align-items: center; gap: .5rem; margin-top: .65rem; }
.ultimas { display: flex; gap: .35rem; flex: 1; min-width: 0; overflow: hidden; height: 2.5rem; align-items: center; }
.ultimas .bola { --s: 2.35rem; }
.ultimas .bola:first-child { animation: entra-trilho .45s var(--ease-out); }
.ultimas .bola:nth-child(n+6) { display: none; }
.ultimas-vazio { color: var(--muted); font-size: min(.9rem, 3.6vw); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@keyframes entra-trilho { from { transform: translateX(-70%) scale(.5); opacity: 0; } }

/* globo */
.globo { --g: min(5rem, 22vw); position: relative; flex: none; width: var(--g); height: calc(var(--g) * 1.2); }
.globo-vidro {
  position: absolute; left: 0; top: 0; width: var(--g); height: var(--g);
  border-radius: 50%; overflow: hidden;
  background: radial-gradient(circle at 34% 28%, rgba(255, 255, 255, .4), rgba(255, 255, 255, .07) 42%, rgba(140, 110, 255, .16) 100%);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .3), inset -6px -10px 18px rgba(0, 0, 0, .3), 0 8px 22px rgba(0, 0, 0, .35);
}
.globo-vidro i {
  position: absolute; left: 38%; top: 46%; width: 24%; height: 24%;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, .95) 0 9%, var(--c) 48%, #1c1240 130%);
  animation: rola var(--t) linear infinite var(--sentido, normal), pula calc(var(--t) * .37) ease-in-out infinite alternate;
  animation-delay: var(--d), var(--d);
}
@keyframes rola { from { transform: rotate(0deg) translateX(var(--r)); } to { transform: rotate(360deg) translateX(var(--r)); } }
@keyframes pula { from { translate: 0 18%; } to { translate: 0 -55%; } }
.gaiola { position: absolute; inset: 0; width: 100%; height: 100%; fill: none; stroke: rgba(255, 224, 140, .55); stroke-width: 1.6; }
.gaiola ellipse { transform-box: fill-box; transform-origin: center; animation: meridiano 3.2s linear infinite; }
.gaiola ellipse:nth-of-type(2) { animation-delay: -1.6s; }
@keyframes meridiano { 0% { transform: scaleX(1); } 50% { transform: scaleX(-1); } 100% { transform: scaleX(1); } }
.globo-pe {
  position: absolute; left: 50%; bottom: 0; width: 62%; height: 26%;
  transform: translateX(-50%);
  background: linear-gradient(180deg, #ffe08a, #d49512);
  clip-path: polygon(32% 0, 68% 0, 100% 100%, 0 100%);
  border-radius: 3px;
}
.globo.gira .globo-vidro i { animation-duration: .45s, .2s; }
.globo.gira .gaiola ellipse { animation-duration: .5s; }
.globo.gira .globo-vidro { animation: chacoalha .18s linear infinite; }
@keyframes chacoalha { 50% { transform: rotate(4deg); } }

/* pedra da vez */
.bola-atual { --s: min(6rem, 27vw); position: relative; flex: none; width: var(--s); height: var(--s); }
.bola-atual .bola { --s: min(6rem, 27vw); }
.bola-atual .bola.entra { animation: sai-do-globo .8s var(--spring) both; }
@keyframes sai-do-globo {
  0% { transform: translate(var(--dx, -90px), var(--dy, 0)) scale(.22) rotate(-260deg); opacity: 0; }
  15% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
.bola-vazia {
  width: 100%; height: 100%; border-radius: 50%;
  display: grid; place-items: center;
  border: 3px dashed rgba(255, 255, 255, .25);
  color: rgba(255, 255, 255, .4); font-size: 2.4rem; font-weight: 800;
}

/* suspense do "tô amarrado" */
.locutor.suspense { box-shadow: 0 0 0 2px rgba(255, 138, 31, .7), 0 0 40px rgba(255, 138, 31, .35); animation: brasa 1s ease-in-out infinite; }
.locutor.suspense .frase { color: #ffb066; }
.locutor.suspense .bola-atual { animation: treme-leve .12s linear infinite; }
@keyframes brasa { 50% { box-shadow: 0 0 0 3px rgba(255, 138, 31, .95), 0 0 60px rgba(255, 90, 31, .5); } }
@keyframes treme-leve { 25% { transform: translate(1px, -1px) rotate(-1deg); } 75% { transform: translate(-1px, 1px) rotate(1deg); } }

.faixa-status {
  position: absolute; inset: 0; z-index: 2;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .6rem;
  border-radius: inherit;
  background: rgba(13, 10, 36, .84);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  font-size: 1.3rem; font-weight: 800; text-align: center; padding: 1rem;
  animation: aparece .25s ease-out;
}
.faixa-status.leve { background: rgba(13, 10, 36, .6); -webkit-backdrop-filter: none; backdrop-filter: none; }
.faixa-status small { font-size: .95rem; color: var(--muted); font-weight: 700; }
.faixa-status .btn { min-height: 2.8rem; }
.frase.entra { animation: frase-entra .45s var(--ease-out); }
@keyframes frase-entra { from { transform: translateY(8px); opacity: 0; } }

/* ================================================================ CARTELA */
.cartela {
  position: relative;
  max-width: 30rem; margin: 0 auto;
  padding: .65rem;
  border-radius: 1.45rem;
  background:
    repeating-linear-gradient(0deg, rgba(150, 110, 40, .025) 0 2px, transparent 2px 4px),
    var(--paper);
  color: var(--ink);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), 0 3px 0 #d8c48c, 0 20px 44px rgba(0, 0, 0, .45);
}
.cartela::before {
  content: ''; position: absolute; inset: .3rem;
  border: 2px dashed rgba(36, 24, 63, .1); border-radius: 1.2rem; pointer-events: none;
}
.cartela-cab, .grade { position: relative; display: grid; grid-template-columns: repeat(5, 1fr); gap: .32rem; }
.cartela-cab { margin-bottom: .32rem; }
.cartela-cab span {
  display: grid; place-items: center; height: 2.3rem; border-radius: .75rem;
  font-size: 1.55rem; font-weight: 800; color: #fff;
  background: linear-gradient(180deg, var(--cl), var(--c) 60%);
  box-shadow: inset 0 -3px 0 var(--cd);
  text-shadow: 0 2px 0 var(--cd);
}

.cel {
  position: relative; display: block; width: 100%;
  aspect-ratio: 1;
  border: 0; border-radius: .8rem; padding: 0;
  background: var(--paper-2);
  box-shadow: inset 0 0 0 1.5px var(--paper-line), 0 2px 0 #e3cf9b;
  color: var(--ink);
  font-weight: 800; font-size: min(1.85rem, 10.5vw); line-height: 1;
  transition: transform .1s var(--ease-out), background .15s;
}
@supports not (aspect-ratio: 1) { .cel { height: 0; padding-bottom: 100%; } }
.cel > span { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.cel:active { transform: scale(.92); }

.cel.livre { background: linear-gradient(145deg, #ffe07a, #ffb81c); box-shadow: inset 0 0 0 1.5px #e9a400, 0 2px 0 #c98400; color: #7a4600; cursor: default; }
.cel.livre > span { font-size: .5em; display: flex; flex-direction: column; align-items: center; justify-content: center; letter-spacing: .06em; }
.cel.livre > span::before { content: '★'; font-size: 1.9em; line-height: .9; }

/* carimbo de tinta (dauber) */
.cel.marcada::after {
  content: ''; position: absolute; inset: 9%; z-index: 2;
  border-radius: 47% 53% 50% 50% / 52% 46% 54% 48%;
  background: radial-gradient(circle at 42% 38%, rgba(255, 70, 160, .78), rgba(227, 18, 122, .86) 60%, rgba(180, 0, 90, .9));
  mix-blend-mode: multiply;
  transform: rotate(var(--rot, 0deg));
  pointer-events: none;
}
.cel.carimbou::after { animation: carimbo .26s var(--ease-out); }
@keyframes carimbo { 0% { transform: scale(1.6) rotate(var(--rot, 0deg)); opacity: 0; } 60% { opacity: 1; } 100% { transform: scale(1) rotate(var(--rot, 0deg)); } }

.cel.mosca { background: #f1ead8; box-shadow: inset 0 0 0 1.5px #ddd0b0; }
.cel.mosca > span { color: #b4a78a; text-decoration: line-through; text-decoration-thickness: 3px; text-decoration-color: rgba(120, 100, 70, .45); }
.cel .bicho { position: absolute; z-index: 3; width: 52%; right: -10%; top: -12%; pointer-events: none; }
.cel.pousou .bicho { animation: pouso .9s var(--ease-out); }
@keyframes pouso {
  0% { transform: translate(-60px, -50px) rotate(-30deg) scale(.6); opacity: 0; }
  30% { transform: translate(-20px, -30px) rotate(20deg); opacity: 1; }
  50% { transform: translate(-28px, -6px) rotate(-15deg); }
  70% { transform: translate(-6px, -12px) rotate(10deg); }
  100% { transform: none; }
}

.cel.treme { animation: treme .38s linear; }
@keyframes treme { 20% { transform: translateX(-6px) rotate(-3deg); } 40% { transform: translateX(6px) rotate(3deg); } 60% { transform: translateX(-4px); } 80% { transform: translateX(3px); } }

.cartela.mini { max-width: 18rem; padding: .45rem; border-radius: 1.1rem; }
.cartela.mini .cartela-cab span { height: 1.5rem; font-size: 1rem; border-radius: .5rem; }
.cartela.mini .cartela-cab, .cartela.mini .grade { gap: .2rem; }
.cartela.mini .cartela-cab { margin-bottom: .2rem; }
.cartela.mini .cel { font-size: 1.05rem; border-radius: .5rem; }
.cartela.mini::before { display: none; }

/* ================================================================ MESA (tela do jogo)
   A mesa ocupa exatamente o espaço entre o topo e o chat: nada de rolar a
   tela durante o jogo. O app.js mede o espaço que sobra e define --cel
   (tamanho de cada casa) pra cartela ficar o maior possível.
   Medidas em px: o A−/A+ aqui só aumenta os números dentro das casas. */
#tela-jogo {
  display: flex; flex-direction: column; gap: 8px;
  max-width: none; height: 100vh; overflow: hidden;
  padding: 8px max(10px, env(safe-area-inset-right)) 6px max(10px, env(safe-area-inset-left));
}
#tela-jogo .locutor { flex: none; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 10px; border-radius: 18px; }
#tela-jogo .locutor-palco { gap: 10px; }
#tela-jogo .globo { --g: 58px; }
#tela-jogo .bola-atual, #tela-jogo .bola-atual .bola { --s: 80px; }
#tela-jogo .frase { font-size: 18px; min-height: 2.3em; }
#tela-jogo .contagem-pedras { font-size: 13px; }
#tela-jogo .contagem-pedras b { font-size: 16px; }
#tela-jogo .locutor-trilho { margin-top: 8px; gap: 6px; height: 40px; }
#tela-jogo .ultimas { height: 40px; gap: 5px; }
#tela-jogo .ultimas .bola { --s: 34px; }
#tela-jogo .ultimas-vazio { font-size: 13px; }
#tela-jogo .faixa-status { font-size: 20px; }
#tela-jogo .faixa-status small { font-size: 14px; }

.ico-painel { flex: none; min-width: 40px; width: 40px; height: 40px; padding: 0; font-size: 16px; }
.ico-painel svg.i { width: 20px; height: 20px; }

.btn-amarrado {
  flex: none; height: 40px; padding: 0 13px;
  border: 0; border-radius: 999px;
  font-size: 15px; font-weight: 800; color: #fff; white-space: nowrap;
  background: linear-gradient(180deg, #ffa24d, #e85f0c);
  box-shadow: 0 3px 0 #a33f00;
  transition: transform .12s var(--ease-out), filter .2s, opacity .2s;
}
.btn-amarrado:active { transform: translateY(2px) scale(.97); }
.btn-amarrado[aria-disabled="true"] { filter: grayscale(.9) brightness(.75); opacity: .5; box-shadow: none; }
.btn-amarrado.pronto { animation: chama 1.1s ease-in-out infinite; }
.btn-amarrado.feito { opacity: .85; filter: saturate(.7); }
@keyframes chama { 50% { transform: scale(1.06); box-shadow: 0 3px 0 #a33f00, 0 0 0 4px rgba(255, 176, 102, .45), 0 0 24px rgba(255, 138, 31, .8); } }
@media (max-width: 359px) {
  .btn-amarrado { padding: 0 10px; font-size: 13px; }
  #tela-jogo .ultimas .bola { --s: 30px; }
}
/* Celular de tela baixa (ex.: Samsung mais simples com a barra do navegador):
   locutor mais enxuto pra sobrar altura pra cartela */
@media (max-height: 640px) {
  .topo { padding-top: calc(6px + env(safe-area-inset-top)); padding-bottom: 6px; }
  .chat { padding-top: 6px; padding-bottom: calc(6px + env(safe-area-inset-bottom)); }
}
@media (max-height: 640px) and (max-aspect-ratio: 1/1) {
  #tela-jogo { gap: 6px; padding-top: 6px; }
  #tela-jogo .locutor { padding: 6px 8px; border-radius: 14px; }
  #tela-jogo .globo { --g: 46px; }
  #tela-jogo .bola-atual, #tela-jogo .bola-atual .bola { --s: 62px; }
  #tela-jogo .frase { font-size: 16px; min-height: 0; }
  #tela-jogo .locutor-trilho { margin-top: 6px; height: 36px; }
  #tela-jogo .ultimas { height: 36px; }
  #tela-jogo .ultimas .bola { --s: 30px; }
  .btn-amarrado { height: 36px; font-size: 14px; }
  .ico-painel { width: 36px; min-width: 36px; height: 36px; }
}

.area-cartela { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; }

.cartela.ajustada { --gap: 4px; max-width: none; margin: 0; padding: 8px; border-radius: calc(var(--cel, 56px) * .3); }
.cartela.ajustada::before { inset: 3px; border-radius: calc(var(--cel, 56px) * .26); }
.cartela.ajustada .cartela-cab,
.cartela.ajustada .grade { grid-template-columns: repeat(5, var(--cel, 56px)); gap: var(--gap); }
.cartela.ajustada .cartela-cab { margin-bottom: var(--gap); }
.cartela.ajustada .cartela-cab span { height: calc(var(--cel, 56px) * .45); font-size: calc(var(--cel, 56px) * .36); border-radius: calc(var(--cel, 56px) * .18); }
.cartela.ajustada .cel {
  width: var(--cel, 56px); height: var(--cel, 56px); padding-bottom: 0;
  border-radius: calc(var(--cel, 56px) * .2);
  font-size: min(calc(var(--cel, 56px) * .44 * var(--zoom)), calc(var(--cel, 56px) * .6));
}

.assistindo { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; width: 100%; max-width: 30rem; margin: 0 auto; text-align: center; }
.assistindo > p { font-size: 17px; line-height: 1.3; margin-bottom: .9rem; }

/* ================================================================ PAINEL 1-75 */
.painel {
  display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(16, auto); grid-auto-flow: column;
  gap: .25rem .4rem;
}
.painel .pl {
  display: grid; place-items: center; height: 2rem; border-radius: .6rem;
  font-weight: 800; font-size: 1.15rem; color: #fff;
  background: linear-gradient(180deg, var(--cl), var(--c)); text-shadow: 0 1px 0 var(--cd);
}
.painel .pn {
  display: grid; place-items: center; height: 1.85rem; border-radius: 999px;
  font-weight: 700; font-size: 1rem; color: rgba(255, 255, 255, .28);
  background: rgba(255, 255, 255, .04);
}
.painel .pn.saiu { color: #fff; background: var(--c); box-shadow: inset 0 -2px 0 var(--cd); }
.painel .pn.ultima { background: #fff; color: var(--ink); box-shadow: 0 0 0 3px var(--c), 0 0 18px var(--c); animation: pop .5s var(--spring); }

/* ================================================================ CHAT + BOLHAS */
.chat {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  padding: .55rem max(.75rem, env(safe-area-inset-right)) calc(.55rem + env(safe-area-inset-bottom)) max(.75rem, env(safe-area-inset-left));
  background: linear-gradient(to top, rgba(13, 10, 36, .98) 65%, rgba(13, 10, 36, 0));
}
.chat-linha { display: flex; align-items: center; gap: .45rem; max-width: 40rem; margin: 0 auto; }
.campo-chat { flex: 1; min-width: 0; height: min(3rem, 13vw); border-radius: 999px; padding: 0 1.1rem; font-size: max(16px, 1rem); }
.ico-reacao, .ico-enviar { width: min(3rem, 13vw); height: min(3rem, 13vw); min-width: min(3rem, 13vw); }
.ico-reacao svg.i, .ico-enviar svg.i { width: 1.45rem; height: 1.45rem; }
.ico-enviar { background: var(--gold); color: #3d2500; }
.reacoes { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; max-width: 40rem; margin: 0 auto .55rem; animation: sobe-folha .25s var(--ease-out); }
.reacoes button { width: 2.9rem; height: 2.9rem; border: 0; border-radius: 50%; background: var(--surface-2); font-size: 1.55rem; line-height: 1; }
.reacoes button:active { transform: scale(.85); }

.bolhas { position: fixed; left: 0; right: 0; bottom: calc(var(--chat-h) + env(safe-area-inset-bottom)); height: 0; z-index: 40; pointer-events: none; }
.bolha {
  position: absolute; bottom: 0; left: var(--x, 4%);
  display: flex; align-items: center; gap: .5rem;
  max-width: min(84vw, 23rem);
  padding: .45rem .9rem .45rem .45rem;
  border-radius: 1.3rem 1.3rem 1.3rem .35rem;
  background: #fff; color: var(--ink);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .4);
  animation: sobe 7s linear forwards;
}
.bolha p { font-size: 1rem; line-height: 1.2; font-weight: 600; overflow-wrap: anywhere; }
.bolha p b { display: block; font-size: .8rem; color: #6b4fd8; font-weight: 800; }
.bolha.grito { background: linear-gradient(180deg, #ffb066, #ff8a1f); color: #3a1800; }
.bolha.grito p b { color: #5a2400; }
.bolha.sistema { background: #2c2370; color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .15), 0 10px 24px rgba(0, 0, 0, .4); }
.bolha.sistema p b { color: var(--gold-2); }
@keyframes sobe {
  0% { transform: translateY(24px) scale(.6); opacity: 0; }
  6% { transform: translateY(0) scale(1.04); opacity: 1; }
  9% { transform: translateY(-4px) scale(1); }
  78% { opacity: 1; }
  100% { transform: translateY(-42vh); opacity: 0; }
}
.reacao-voa {
  position: absolute; bottom: 0; left: var(--x, 50%);
  display: flex; flex-direction: column; align-items: center;
  font-size: 2.8rem; line-height: 1;
  animation: voa 3.4s var(--ease-out) forwards;
}
.reacao-voa small { font-size: .78rem; font-weight: 800; color: #fff; background: rgba(0, 0, 0, .45); padding: .1rem .45rem; border-radius: 999px; margin-top: .2rem; white-space: nowrap; }
@keyframes voa {
  0% { transform: translateY(20px) scale(.3); opacity: 0; }
  12% { transform: translateY(-20px) scale(1.25); opacity: 1; }
  35% { transform: translate(-12px, -14vh) rotate(-10deg); }
  60% { transform: translate(12px, -26vh) rotate(8deg); opacity: 1; }
  100% { transform: translate(-6px, -40vh) scale(.9); opacity: 0; }
}

/* ================================================================ AVISOS */
.avisos {
  position: fixed; left: 0; right: 0; top: calc(4.2rem + env(safe-area-inset-top)); z-index: 70;
  display: flex; flex-direction: column; align-items: center; gap: .4rem; pointer-events: none; padding: 0 1rem;
}
.aviso {
  max-width: 26rem; padding: .7rem 1.2rem; border-radius: 1.2rem;
  background: rgba(22, 17, 58, .97); color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .16), 0 10px 26px rgba(0, 0, 0, .45);
  font-weight: 700; font-size: 1.05rem; text-align: center; line-height: 1.2;
  animation: aviso-entra .3s var(--spring);
}
.aviso.erro { box-shadow: inset 0 0 0 2px rgba(255, 90, 110, .7), 0 10px 26px rgba(0, 0, 0, .45); }
.aviso.ok { box-shadow: inset 0 0 0 2px rgba(18, 185, 129, .7), 0 10px 26px rgba(0, 0, 0, .45); }
.aviso.sai { animation: aviso-sai .25s var(--ease-out) forwards; }
@keyframes aviso-entra { from { transform: translateY(-14px) scale(.9); opacity: 0; } }
@keyframes aviso-sai { to { transform: translateY(-10px); opacity: 0; } }

/* ================================================================ FOLHA (bottom sheet) */
.folha { position: fixed; inset: 0; z-index: 60; }
.folha-fundo { position: absolute; inset: 0; background: rgba(5, 3, 20, .62); animation: aparece .2s ease-out; }
.folha-painel {
  position: absolute; left: 0; right: 0; bottom: 0;
  max-width: 34rem; max-height: 86vh; max-height: 86dvh; margin: 0 auto;
  overflow-y: auto; overscroll-behavior: contain;
  padding: 1.3rem 1.1rem calc(1.3rem + env(safe-area-inset-bottom));
  border-radius: 1.7rem 1.7rem 0 0;
  background: linear-gradient(180deg, #2a2168, #1c1648);
  box-shadow: 0 -10px 40px rgba(0, 0, 0, .5);
  animation: sobe-folha .34s var(--ease-out);
}
.folha-x { position: absolute; top: .8rem; right: .8rem; }
.folha h2 { font-size: 1.35rem; font-weight: 800; margin-bottom: 1rem; padding-right: 3rem; }
.folha h3 { font-size: 1rem; color: var(--muted); font-weight: 700; margin: 1.3rem 0 .55rem; text-transform: uppercase; letter-spacing: .08em; }
.folha .btn { width: 100%; margin-top: .5rem; }
@keyframes sobe-folha { from { transform: translateY(40px); opacity: 0; } }
@keyframes aparece { from { opacity: 0; } }

.lista-jog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .45rem; }
.lista-jog li {
  display: flex; align-items: center; gap: .7rem;
  padding: .55rem .7rem; border-radius: 1rem; background: var(--surface);
}
.lista-jog .av { width: 2.8rem; height: 2.8rem; font-size: 1.7rem; }
.lista-jog .nome { flex: 1; min-width: 0; }
.lista-jog .nome b { display: block; font-size: 1.08rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lista-jog .nome small { color: var(--muted); font-size: .88rem; font-weight: 600; }
.lista-jog .nome small.quente { color: #ffb066; font-weight: 800; }
.lista-jog .pts { text-align: center; font-weight: 800; font-size: 1.3rem; color: var(--gold); line-height: 1; }
.lista-jog .pts small { display: block; font-size: .68rem; color: var(--muted); font-weight: 700; }
.lista-jog li.off { opacity: .5; }
.lista-jog .remover { min-width: 2.2rem; height: 2.2rem; padding: 0; }
.ponto-on { display: inline-block; width: .55rem; height: .55rem; border-radius: 50%; background: #22c55e; margin-right: .3rem; vertical-align: middle; }
.ponto-off { background: #6b6690; }

.chave {
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  width: 100%; padding: .85rem 1rem; margin-bottom: .45rem;
  border: 0; border-radius: 1rem; background: var(--surface); text-align: left;
  font-size: 1.05rem; font-weight: 700;
}
.chave .trilho { position: relative; flex: none; width: 3.1rem; height: 1.8rem; border-radius: 999px; background: rgba(255, 255, 255, .2); transition: background .2s; }
.chave .trilho::after { content: ''; position: absolute; top: .2rem; left: .2rem; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: #fff; transition: transform .2s var(--ease-out); }
.chave[aria-checked="true"] .trilho { background: #12b981; }
.chave[aria-checked="true"] .trilho::after { transform: translateX(1.3rem); }

.tamanho { display: flex; align-items: center; gap: .6rem; }
.tamanho .ico { width: 3.2rem; height: 3.2rem; font-size: 1.3rem; }
.tamanho-barra { flex: 1; height: .6rem; border-radius: 999px; background: rgba(255, 255, 255, .15); overflow: hidden; }
.tamanho-barra i { display: block; height: 100%; background: var(--gold); border-radius: inherit; transition: width .2s var(--ease-out); }

/* ================================================================ CONTAGEM / FAIXA / FESTA */
.contagem { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(8, 5, 26, .78); animation: aparece .25s; }
.contagem div { text-align: center; }
.contagem p { font-size: 1.6rem; font-weight: 800; color: var(--gold-2); }
.contagem b { display: block; font-size: 9rem; line-height: 1; font-weight: 800; color: #fff; text-shadow: 0 8px 0 #5320b5, 0 20px 40px rgba(0, 0, 0, .5); }
.contagem b.pulsa { animation: conta .9s var(--ease-out); }
@keyframes conta { 0% { transform: scale(2.2); opacity: 0; } 30% { transform: scale(.95); opacity: 1; } 100% { transform: scale(1); } }


.festa {
  position: fixed; inset: 0; z-index: 85;
  display: grid; justify-items: center; align-items: start;
  padding: calc(1rem + env(safe-area-inset-top)) 1rem 1rem;
  overflow-y: auto; overscroll-behavior: contain;
  background:
    radial-gradient(circle at 50% 22%, rgba(255, 200, 61, .26), rgba(255, 200, 61, 0) 55%),
    rgba(12, 8, 34, .96);
  animation: aparece .3s;
}
.festa-caixa { width: min(100%, 26rem); margin: auto 0; text-align: center; padding: .5rem 0 calc(1rem + env(safe-area-inset-bottom)); }
.festa-titulo { display: flex; justify-content: center; gap: .25rem; margin-bottom: 1rem; }
.festa-titulo .bola { --s: min(3.6rem, 16vw); font-size: min(1.7rem, 7.5vw); animation: pula-letra .9s var(--spring) both; animation-delay: calc(var(--i) * .09s); }
.festa-titulo .bola b { color: var(--cd); }
.festa-titulo.menor .bola { --s: min(3rem, 14vw); }
@keyframes pula-letra { 0% { transform: translateY(-80px) scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }
.vencedor { display: flex; flex-direction: column; align-items: center; gap: .3rem; margin-bottom: .8rem; }
.vencedor .av { width: 6.5rem; height: 6.5rem; font-size: 4rem; box-shadow: 0 0 0 5px var(--gold), 0 0 50px rgba(255, 200, 61, .6); animation: festeja 1.4s ease-in-out infinite; }
.vencedor b { font-size: 2rem; font-weight: 800; line-height: 1.05; margin-top: .5rem; }
.vencedor small { color: var(--gold-2); font-size: 1.1rem; font-weight: 700; }
.vencedores-lado { display: flex; justify-content: center; gap: 1.2rem; flex-wrap: wrap; }
.vencedores-lado .vencedor .av { width: 4.6rem; height: 4.6rem; font-size: 2.8rem; }
.vencedores-lado .vencedor b { font-size: 1.4rem; }
@keyframes festeja { 50% { transform: translateY(-8px) rotate(-4deg) scale(1.04); } }
.festa .cartela.mini { margin: .9rem auto; }
.festa-placar, .festa-moscas { margin: 1rem 0; text-align: left; }
.festa-placar h3, .festa-moscas h3 { font-size: .9rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .5rem; text-align: center; }
.festa-moscas .festa-espera { text-align: center; margin-top: 0; }
.lista-jog li.quente { background: rgba(255, 138, 31, .16); box-shadow: inset 0 0 0 2px rgba(255, 138, 31, .55); }
.lista-jog .quente { color: #ffb066; font-weight: 800; }
.mosca-qtd {
  display: inline-flex; align-items: center; gap: .2rem; flex: none;
  min-width: 2.4rem; height: 2.2rem; padding: 0 .6rem; border-radius: 999px;
  background: rgba(255, 255, 255, .12); font-weight: 800; font-size: 1.05rem;
}
.mosca-qtd::before { content: '🪰'; font-size: .9em; }
.festa .btn { width: 100%; margin-top: .5rem; }
.festa-espera { color: var(--muted); font-weight: 700; margin-top: .8rem; }

.ativar { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: rgba(8, 5, 26, .85); padding: 2rem; }
.ativar .btn { max-width: 24rem; }

.confete { position: fixed; inset: 0; z-index: 90; pointer-events: none; width: 100%; height: 100%; display: none; }

@keyframes pop { 0% { transform: scale(.3); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ================================================================ TELA DEITADA (celular de lado, tablet, computador)
   Locutor de um lado, cartela do outro, usando toda a altura. */
@media (min-aspect-ratio: 1/1) {
  #tela-jogo { flex-direction: row; align-items: center; gap: 16px; }
  #tela-jogo .locutor { width: 42%; max-width: 480px; margin: 0; }
  #tela-jogo .area-cartela, #tela-jogo .assistindo { flex: 1; align-self: stretch; }
}
@media (min-aspect-ratio: 1/1) and (min-height: 560px) {
  #tela-jogo .globo { --g: 96px; }
  #tela-jogo .bola-atual, #tela-jogo .bola-atual .bola { --s: 130px; }
  #tela-jogo .frase { font-size: 24px; }
  #tela-jogo .contagem-pedras { font-size: 15px; }
  #tela-jogo .ultimas .bola { --s: 40px; }
  #tela-jogo .locutor { padding: 16px; }
  #tela-jogo .locutor-palco { gap: 16px; }
  #tela-jogo .locutor-trilho { margin-top: 14px; height: 44px; }
  .btn-amarrado { height: 44px; font-size: 17px; padding: 0 18px; }
}

/* ================================================================ TELÃO */
.tv { max-width: none !important; min-height: 100vh; min-height: 100dvh; padding: 2vh 2.2vw !important; display: flex !important; flex-direction: column; gap: 2vh; }
.tv[hidden] { display: none !important; }
.tv-topo { display: flex; align-items: center; justify-content: space-between; gap: 2vw; }
.tv-topo h1 { font-size: clamp(1.8rem, 3.6vw, 4rem); font-weight: 800; color: var(--gold); line-height: .9; text-shadow: 0 3px 0 var(--gold-deep), 0 10px 20px rgba(0, 0, 0, .4); }
.tv-topo h1 em { font-style: normal; color: #fff; font-size: .55em; margin-left: .3em; text-shadow: 0 2px 0 #5a2fb0; }
.tv-convite { display: flex; align-items: center; gap: 1.2vw; background: var(--surface); border-radius: 1.2rem; padding: .6rem .6rem .6rem 1.2rem; }
.tv-convite p { color: var(--muted); font-weight: 700; font-size: clamp(.8rem, 1.1vw, 1.3rem); }
.tv-convite b { font-size: clamp(1.1rem, 1.9vw, 2.3rem); color: var(--gold); letter-spacing: .02em; }
.qr-tv { width: clamp(5rem, 8vw, 10rem); margin: 0; padding: .4rem; border-radius: .7rem; }

.tv-corpo { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr) minmax(0, .75fr); gap: 1.6vw; min-height: 0; }
.tv-locutor, .tv-painel, .tv-jogadores { background: var(--surface); border: 1px solid rgba(255, 255, 255, .08); border-radius: 1.6rem; padding: 2vh 1.5vw; min-height: 0; }
.tv-locutor { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2vh; text-align: center; }
.tv-palco { display: flex; align-items: center; justify-content: center; gap: 2vw; }
.tv-palco .globo { --g: clamp(5rem, 9.5vw, 13rem); }
.tv-palco .bola-atual, .tv-palco .bola-atual .bola { --s: clamp(9rem, 17vw, 22rem); }
.tv-frase { justify-content: center; font-size: clamp(1.3rem, 2.3vw, 3rem); min-height: 2.4em; }
.tv-ultimas { justify-content: center; height: auto; overflow: visible; flex: none; }
.tv-ultimas .bola { --s: clamp(2.6rem, 4.2vw, 5rem); }
.tv-ultimas .bola:nth-child(n+6) { display: inline-grid; }
.tv-locutor.suspense { box-shadow: 0 0 0 3px rgba(255, 138, 31, .8), 0 0 60px rgba(255, 138, 31, .35); animation: brasa 1s ease-in-out infinite; }
.tv-locutor.suspense .tv-frase { color: #ffb066; }
.tv-status { color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.8rem); font-weight: 700; }

.painel-grande { grid-template-columns: 1.25fr repeat(15, minmax(0, 1fr)); grid-template-rows: repeat(5, 1fr); grid-auto-flow: row; gap: 1.2vh .35vw; height: 100%; }
.painel-grande .pl, .painel-grande .pn { height: auto; min-height: 0; font-size: clamp(.8rem, 1.45vw, 2.3rem); border-radius: .7rem; letter-spacing: -.03em; }
.painel-grande .pl { font-size: clamp(1rem, 1.9vw, 2.8rem); }
.tv-painel { display: flex; }
.tv-painel .painel { flex: 1; }

.tv-jogadores { overflow: hidden; display: flex; flex-direction: column; }
.tv-jogadores h2 { font-size: clamp(1.1rem, 1.7vw, 2rem); margin-bottom: 1.2vh; }
.tv-jogadores ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 1vh; overflow: hidden; }
.tv-jogadores li { display: flex; align-items: center; gap: .8vw; padding: .8vh .6vw; border-radius: 1rem; background: var(--surface); font-size: clamp(.9rem, 1.3vw, 1.6rem); }
.tv-jogadores li.quente { background: rgba(255, 138, 31, .22); box-shadow: inset 0 0 0 2px rgba(255, 138, 31, .6); animation: brasa 1s ease-in-out infinite; }
.tv-jogadores .av { width: clamp(2.2rem, 3vw, 3.8rem); height: clamp(2.2rem, 3vw, 3.8rem); font-size: clamp(1.3rem, 1.9vw, 2.4rem); }
.tv-jogadores .nome { flex: 1; min-width: 0; }
.tv-jogadores .nome b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tv-jogadores .nome small { color: var(--muted); font-weight: 600; font-size: .8em; }
.tv-jogadores .pts { font-weight: 800; color: var(--gold); font-size: 1.3em; }

.tv-espera { text-align: center; }
.tv-espera .codigo-gigante { font-size: clamp(4rem, 12vw, 14rem); font-weight: 800; letter-spacing: .1em; color: var(--gold); line-height: 1; text-shadow: 0 6px 0 var(--gold-deep), 0 20px 40px rgba(0, 0, 0, .4); }
.tv-espera p { font-size: clamp(1.2rem, 2vw, 2.4rem); font-weight: 700; color: var(--muted); }

@media (max-width: 900px) {
  .tv-corpo { grid-template-columns: 1fr; }
  .tv-painel .painel { grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(16, auto); grid-auto-flow: column; }
  .tv-topo { flex-direction: column; }
}

/* ================================================================ MOVIMENTO REDUZIDO */
@media (prefers-reduced-motion: reduce) {
  .marca-bolas .bola, .globo-vidro i, .gaiola ellipse, .btn-acao.pronto, .vencedor .av, .locutor.suspense, .locutor.suspense .bola-atual { animation: none !important; }
  .bolha { animation-duration: 9s; }
}
