/* ==========================================================================
   BINGO DAS SÍLABAS — v2 · direção de arte "Quermesse à noite"
   Céu violeta com estrelinhas, lua com halo, varal de bandeirinhas e
   lâmpadas que piscam, cartela de papel creme com fichas de vidro.
   ========================================================================== */
:root { --ceu-1: #1E1548; --ceu-2: #4A3696; --papel-2: #6A4FC0; --primaria: #FF6FA0; --primaria-esc: #C93C70; --tinta: #2B2350; }
body { background: #2B1E5C; }
.n-sol { left: -6vmin; right: auto; top: -8vmin; width: 40vmin; height: 40vmin;
  background: radial-gradient(circle, #FFF9E6 0 15%, rgba(255, 240, 200, .5) 22%, rgba(180, 160, 255, .18) 45%, rgba(180, 160, 255, 0) 68%); }
.n-nuvens { opacity: .18; }
.n-vinheta { background: radial-gradient(ellipse at 50% 40%, rgba(0,0,0,0) 50%, rgba(10, 5, 30, .45) 100%); }
#festa { position: fixed; left: 0; right: 0; top: 0; height: 100%; z-index: 1; pointer-events: none; }
#festa svg { position: absolute; left: 0; top: 0; width: 100%; height: clamp(70px, 13vmin, 110px); }
.lamp { animation: lampada 2.4s ease-in-out infinite; }
.lamp.l1 { animation-delay: -.8s; } .lamp.l2 { animation-delay: -1.6s; }
@keyframes lampada { 50% { opacity: .45; } }
#festa.pisca .lamp, #festa.festao .lamp { animation: lampada .3s steps(2) infinite; }
.estrelinhas { position: absolute; inset: 0; }
.estrelinhas i { position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff; box-shadow: 0 0 6px #fff; animation: brilha 2.8s ease-in-out infinite; }
@keyframes brilha { 50% { opacity: .2; transform: scale(.6); } }

/* ---------------- menu ---------------- */
#menu { align-items: center; justify-content: center; }
.menu-caixa { display: flex; flex-direction: column; align-items: center; gap: clamp(10px, 2.2vh, 20px); padding: 16px; padding-top: clamp(60px, 12vmin, 100px); }
.logo { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.logo-bolas { display: flex; gap: clamp(4px, 1.2vmin, 10px); }
.logo-bolas b, .cartela-topo b, .fim-bingo b { display: inline-grid; place-items: center; border-radius: 50%; font-weight: 900; color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.25);
  background: radial-gradient(circle at 34% 28%, #fff 0 8%, var(--b1) 22%, var(--b2) 70%, var(--b3) 100%);
  box-shadow: inset 0 -5px 8px rgba(0,0,0,.2), 0 6px 14px rgba(0,0,0,.35); }
.logo-bolas b { width: clamp(52px, 11.5vmin, 88px); height: clamp(52px, 11.5vmin, 88px); font-size: clamp(30px, 6.6vmin, 50px); animation: bola-pula 2.4s ease-in-out infinite; }
.logo-bolas b:nth-child(2) { animation-delay: -.3s; } .logo-bolas b:nth-child(3) { animation-delay: -.6s; } .logo-bolas b:nth-child(4) { animation-delay: -.9s; } .logo-bolas b:nth-child(5) { animation-delay: -1.2s; }
@keyframes bola-pula { 0%, 60%, 100% { transform: translateY(0); } 30% { transform: translateY(-12px); } }
b:nth-child(5n+1) { --b1: #FF8FA8; --b2: #F2456E; --b3: #B5204A; }
b:nth-child(5n+2) { --b1: #FFD877; --b2: #F5A623; --b3: #B87400; }
b:nth-child(5n+3) { --b1: #7FEBC6; --b2: #1FB98A; --b3: #0D7E5D; }
b:nth-child(5n+4) { --b1: #8CC8FF; --b2: #3A8DF0; --b3: #1C5BB0; }
b:nth-child(5n+5) { --b1: #CDB0FF; --b2: #8C5CF0; --b3: #5933B8; }
.logo-sub { font-size: clamp(26px, 6vmin, 44px); font-weight: 900; color: #FFE7A3; text-shadow: 0 3px 0 #8C3B8F, 0 0 20px rgba(255, 200, 120, .6); }
.menu-lili { width: clamp(100px, 19vmin, 170px); aspect-ratio: 120 / 132; }
.menu-linha { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
.menu-linha .n-botao { font-size: 20px; }
@media (orientation: landscape) and (max-height: 520px) {
  .menu-caixa { display: grid; grid-template-columns: auto auto; grid-template-areas: "logo lili" "jogar lili" "hoje linha"; column-gap: 28px; row-gap: 10px; align-items: center; justify-items: center; padding-top: 70px; }
  .logo { grid-area: logo; } .menu-lili { grid-area: lili; } #btJogar { grid-area: jogar; } #hoje-menu { grid-area: hoje; } .menu-linha { grid-area: linha; }
  .logo-bolas b { width: 50px; height: 50px; font-size: 28px; } .logo-sub { font-size: 26px; }
}
.n-hoje { color: var(--tinta); }

/* ---------------- palco ---------------- */
.palco { position: absolute; left: 0; right: 0; bottom: 0; top: calc(max(10px, env(safe-area-inset-top)) + 92px);
  display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 12px;
  padding: 0 max(12px, env(safe-area-inset-right)) max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
@media (orientation: landscape) { .palco { grid-template-rows: minmax(0, 1fr); grid-template-columns: minmax(0, .62fr) minmax(0, 1.38fr); gap: 16px; } }

/* cantor: bola de bingo com a figura + espaços das sílabas */
.cantor { position: relative; display: flex; align-items: center; justify-content: center; gap: 14px; padding: 10px 14px; border-radius: 26px;
  background: linear-gradient(180deg, rgba(120, 95, 200, .55), rgba(60, 40, 130, .55)); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.22), 0 10px 30px rgba(0,0,0,.25); }
@media (orientation: landscape) { .cantor { flex-direction: column; } }
.bola { --tb: clamp(120px, 30vw, 190px); position: relative; width: var(--tb); height: var(--tb); border-radius: 50%; cursor: pointer; flex: none;
  background: radial-gradient(circle at 35% 28%, #FFFFFF 0 10%, #FFF6E6 30%, #F4DDBE 75%, #D9B48A 100%);
  box-shadow: inset 0 -10px 18px rgba(120, 70, 20, .25), inset 0 6px 10px rgba(255,255,255,.8), 0 0 0 6px #FF6FA0, 0 0 0 10px rgba(255, 111, 160, .35), 0 14px 30px rgba(0,0,0,.4); }
@media (orientation: landscape) { .bola { --tb: min(30vh, 26vw, 200px); } }
@media (orientation: portrait) and (min-height: 900px) { .bola { --tb: clamp(150px, 26vw, 230px); } }
.bola::after { content: ""; position: absolute; left: 16%; top: 9%; width: 36%; height: 22%; border-radius: 50%; background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,0)); transform: rotate(-24deg); pointer-events: none; }
.bola-fig { position: absolute; inset: 14%; }
.bola-fig .figura { width: 100%; height: 100%; overflow: visible; }
.bola.rola { animation: bola-rola .8s cubic-bezier(.25, 1.3, .5, 1) both; }
@keyframes bola-rola { from { transform: translateX(-140%) rotate(-360deg) scale(.6); } }
.bola.feliz { animation: bola-feliz .7s cubic-bezier(.3, 1.6, .5, 1) 2; }
@keyframes bola-feliz { 40% { transform: scale(1.12, .9); } 70% { transform: scale(.95, 1.06) translateY(-6%); } }
.bola.sai { transform: translateX(140%) rotate(200deg) scale(.6); opacity: 0; transition: transform .35s ease-in, opacity .35s; }
.cantor-info { display: flex; flex-direction: column; align-items: center; gap: 10px; }
@media (orientation: landscape) { .cantor-info { flex-direction: row; } }
.slots { display: flex; gap: 8px; transition: gap .4s; }
.slots.junta { gap: 1px; }
.slot { min-width: 60px; height: 60px; padding: 0 8px; border-radius: 16px; display: grid; place-items: center; font-size: 30px; font-weight: 900;
  color: rgba(255,255,255,.6); background: rgba(20, 10, 50, .35); box-shadow: inset 0 3px 8px rgba(0,0,0,.35); border: 2px dashed rgba(255,255,255,.3); }
.slot.agora { border-color: #FFE38A; color: #FFE38A; animation: n-pulso 1.4s ease-in-out infinite; }
.slot.cheio { color: #fff; border: 0; background: linear-gradient(160deg, #7FEBC6, #1FB98A 60%, #0D7E5D); box-shadow: inset 0 3px 0 rgba(255,255,255,.4), 0 4px 0 #0A5E46; animation: carimba .45s cubic-bezier(.3, 1.8, .5, 1); }
.lili-jogo { position: absolute; width: clamp(64px, 15vmin, 110px); aspect-ratio: 120 / 132; right: -6px; bottom: -14px; pointer-events: none; z-index: 2; }
@media (orientation: portrait) { .lili-jogo { right: auto; left: 2px; bottom: -8px; width: clamp(60px, 15vmin, 100px); } }

/* cartela */
.cartela { position: relative; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px 12px; border-radius: 26px;
  background: linear-gradient(180deg, #FFFDF5, #FFF1D6); box-shadow: inset 0 0 0 4px #fff, inset 0 0 0 7px #F7C9DA, 0 16px 40px rgba(0,0,0,.4); }
.cartela::before { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: .5;
  background: radial-gradient(circle at 20% 10%, rgba(255,255,255,.9), rgba(255,255,255,0) 40%), repeating-linear-gradient(0deg, rgba(200, 160, 120, .06) 0 2px, rgba(0,0,0,0) 2px 6px); }
.cartela-topo { display: flex; justify-content: center; gap: 8px; margin-bottom: 8px; }
.cartela-topo b { width: 30px; height: 30px; font-size: 17px; box-shadow: inset 0 -3px 5px rgba(0,0,0,.2), 0 3px 6px rgba(0,0,0,.2); }
@media (orientation: landscape) and (max-height: 520px) { .cartela-topo { display: none; } }
.grade { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); grid-template-rows: repeat(var(--rows, 4), minmax(0, 1fr)); gap: 10px; }
.casa { position: relative; min-height: 72px; min-width: 72px; border-radius: 18px; display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(180deg, #FFFFFF, #F6EEFF); box-shadow: inset 0 0 0 2.5px #E5D8FA, inset 0 -5px 0 #E7DDF7, 0 3px 0 #D9C9F2, 0 6px 12px rgba(90, 60, 150, .15);
  transition: transform .15s; container-type: size; }
.casa:active { transform: translateY(3px) scale(.98); }
.casa .sil { position: relative; z-index: 3; font-weight: 900; color: #3A2D7A; font-size: 34px; font-size: clamp(30px, min(46cqh, 34cqw), 64px); letter-spacing: .01em; }
.casa .ficha { position: absolute; inset: 9%; margin: auto; aspect-ratio: 1; max-height: 82%; max-width: 82%; border-radius: 50%; z-index: 2; display: grid; place-items: center;
  background: radial-gradient(circle at 34% 28%, rgba(255,255,255,.95) 0 6%, rgba(255,255,255,.35) 16%, rgba(255,255,255,0) 40%), radial-gradient(circle at 50% 50%, var(--fcor) 0 58%, rgba(0,0,0,.18) 100%);
  background-color: var(--fcor);
  box-shadow: inset 0 -4px 8px rgba(0,0,0,.18), 0 4px 10px rgba(0,0,0,.25); opacity: 0; transform: scale(2.2) rotate(-40deg); pointer-events: none; }
.casa .ficha svg { position: absolute; right: 6%; top: 6%; width: 26%; height: 26%; color: #fff; opacity: .95; filter: drop-shadow(0 1px 0 rgba(0,0,0,.2)); }
.casa.marcada .ficha { opacity: 1; transform: none; }
.casa.carimba .ficha { animation: ficha-cai .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes ficha-cai { from { opacity: 0; transform: scale(2.4) rotate(-50deg); } }
.casa.marcada .sil { color: #fff; text-shadow: 0 2px 0 rgba(0,0,0,.35); }
.casa.balanca { animation: casa-balanca .45s ease; }
@keyframes casa-balanca { 20% { transform: translateX(-8px) rotate(-3deg); } 50% { transform: translateX(7px) rotate(3deg); } 80% { transform: translateX(-3px); } }
.casa.dica { animation: casa-dica 1s ease-in-out 3; }
@keyframes casa-dica { 50% { transform: scale(1.07); box-shadow: inset 0 0 0 3px #FFC531, 0 0 24px rgba(255, 200, 50, .95); } }
.casa.linha { animation: casa-linha .8s ease; }
@keyframes casa-linha { 30% { transform: scale(1.1); box-shadow: 0 0 0 4px #FFE38A, 0 0 26px rgba(255, 220, 90, 1); } }
.casa.chega { animation: casa-chega .5s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes casa-chega { from { transform: scale(.2) rotate(-20deg); opacity: 0; } }
@keyframes carimba { from { transform: scale(1.8); opacity: 0; } }

/* faixa "LINHA!" */
.faixa { position: fixed; left: 50%; top: 42%; z-index: 20; padding: 12px 38px; border-radius: 999px; font-size: clamp(36px, 9vmin, 70px); font-weight: 900; color: #fff;
  background: linear-gradient(180deg, #FF8FB3, #FF4F8A); box-shadow: 0 0 0 5px #fff, 0 16px 40px rgba(0,0,0,.4); text-shadow: 0 3px 0 rgba(0,0,0,.2);
  transform: translate(-50%, -50%) scale(0) rotate(-8deg); pointer-events: none; }
.faixa.mostra { animation: faixa 1.9s cubic-bezier(.3, 1.6, .5, 1) both; }
@keyframes faixa { 0% { transform: translate(-50%, -50%) scale(0) rotate(-8deg); } 20%, 80% { transform: translate(-50%, -50%) scale(1) rotate(-4deg); } 100% { transform: translate(-50%, -50%) scale(0) rotate(4deg); } }

/* ---------------- BINGO! ---------------- */
#fim { align-items: center; justify-content: center; }
.fim-caixa { display: flex; flex-direction: column; align-items: center; gap: clamp(8px, 1.6vh, 16px); padding: 16px; padding-top: clamp(50px, 10vmin, 90px); width: min(100%, 780px); }
.fim-bingo { display: flex; gap: clamp(4px, 1.4vmin, 12px); }
.fim-bingo b { width: clamp(52px, 13vmin, 104px); height: clamp(52px, 13vmin, 104px); font-size: clamp(30px, 7.8vmin, 62px); animation: bingo-cai .7s cubic-bezier(.3, 1.6, .5, 1) both; }
.fim-bingo b:nth-child(1) { animation-delay: .2s; } .fim-bingo b:nth-child(2) { animation-delay: .42s; } .fim-bingo b:nth-child(3) { animation-delay: .64s; }
.fim-bingo b:nth-child(4) { animation-delay: .86s; } .fim-bingo b:nth-child(5) { animation-delay: 1.08s; }
.fim-bingo b:nth-child(6) { animation-delay: 1.3s; background: none; box-shadow: none; color: #FFE7A3; width: auto; text-shadow: 0 4px 0 #8C3B8F; }
@keyframes bingo-cai { 0% { transform: translateY(-120vh) rotate(-200deg); } 70% { transform: translateY(0) scale(1.15, .85); } 100% { transform: none; } }
.fim-lili { width: clamp(84px, 15vmin, 130px); aspect-ratio: 120 / 132; }
.fim-figs { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.fim-fig { width: clamp(76px, 12.5vmin, 100px); padding: 6px 4px 8px; border-radius: 18px; background: rgba(255,255,255,.94); box-shadow: var(--sombra-1); display: flex; flex-direction: column; align-items: center;
  animation: casa-chega .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.fim-fig .figura { width: 80%; aspect-ratio: 1; }
.fim-fig b { font-size: clamp(13px, 2.3vmin, 16px); font-weight: 900; }
.fim-acoes { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; justify-content: center; }
@media (orientation: landscape) and (max-height: 520px) {
  .fim-caixa { display: grid; grid-template-columns: auto 1fr; grid-template-areas: "bingo bingo" "lili figs" "hoje acoes"; column-gap: 18px; row-gap: 8px; justify-items: center; padding-top: 52px; }
  .fim-bingo { grid-area: bingo; } .fim-lili { grid-area: lili; width: 84px; } .fim-figs { grid-area: figs; } #hoje-fim { grid-area: hoje; } .fim-acoes { grid-area: acoes; flex-wrap: nowrap; }
  .fim-bingo b { width: 50px; height: 50px; font-size: 28px; } .fim-fig { width: 72px; }
  .fim-acoes .n-botao.grande { font-size: 22px; min-height: 76px; padding: 0 .8em; }
}

/* ---------------- coleção ---------------- */
#colecao { flex-direction: column; }
.col-caixa { position: absolute; inset: calc(max(10px, env(safe-area-inset-top)) + 92px) 0 0 0; overflow-y: auto; padding: 0 14px 24px; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.col-titulo { font-size: clamp(28px, 6vmin, 44px); font-weight: 900; color: #FFE7A3; text-shadow: 0 3px 0 #8C3B8F, 0 0 20px rgba(255, 200, 120, .5); }
.col-sub { font-size: 22px; color: #fff; font-weight: 900; margin-top: 6px; }
.col-trofeus { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; max-width: 700px; padding: 14px 18px; border-radius: 24px; background: rgba(255,255,255,.12); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.2); color: #fff; text-align: center; }
.trofeu { width: 40px; height: 40px; color: #FFC531; filter: drop-shadow(0 2px 0 #B87400) drop-shadow(0 0 10px rgba(255, 200, 60, .7)); animation: casa-chega .5s cubic-bezier(.3, 1.6, .5, 1) both; }
.trofeu svg { width: 100%; height: 100%; }
.col-numeros { width: 100%; font-size: 20px; margin-top: 6px; }
.col-vazio { font-size: 18px; }
.col-grade { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; width: min(100%, 980px); }
.col-item { min-height: 112px; border-radius: 18px; padding: 6px 4px 8px; display: flex; flex-direction: column; align-items: center; background: rgba(255,255,255,.94); box-shadow: var(--sombra-1); }
.col-item .figura { width: 74%; aspect-ratio: 1; }
.col-item b { font-size: 16px; font-weight: 900; }
.col-item.falta { background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 1.5px rgba(255,255,255,.18); }
.col-item.falta .figura { filter: brightness(0) invert(1) opacity(.16); }
.col-item.falta b { color: rgba(255,255,255,.5); }
#btMusica.desligado { opacity: .45; }
.bt-caixa { font-size: 26px; font-weight: 900; color: var(--tinta); }

/* celular em pé: o botão grande ocupa a linha, os redondos ficam juntos embaixo */
@media (orientation: portrait) and (max-width: 560px) {
  .fim-acoes { display: grid; grid-template-columns: auto auto; justify-content: center; gap: 14px; }
  #btDeNovo { grid-column: 1 / -1; justify-self: center; }
}
