* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body {
  background: radial-gradient(circle at 20% -10%, #1f4d3d 0%, #123328 45%, #0d241c 100%);
  color: #f2ede0;
  font-family: 'Inter', system-ui, sans-serif;
}
#app { padding: 20px; min-height: 100vh; }
button, input, select { font-family: inherit; }

.topo { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; margin-bottom: 16px; }
.topo-titulo { display: flex; align-items: center; gap: 12px; }
.bola-logo {
  width: 44px; height: 44px; border-radius: 50%;
  background: #E7B84B; color: #2a2210; font-family: 'Fraunces', serif; font-weight: 700;
  display: flex; align-items: center; justify-content: center; font-size: 20px;
  box-shadow: 0 0 0 3px rgba(231,184,75,0.25);
}
.topo-titulo h1 { font-family: 'Fraunces', serif; font-size: 22px; font-weight: 700; margin: 0; letter-spacing: 0.2px; }
.topo-titulo p { margin: 2px 0 0; font-size: 13px; color: #b9c9bd; }

.abas { display: flex; gap: 6px; background: rgba(0,0,0,0.22); padding: 4px; border-radius: 10px; flex-wrap: wrap; }
.abas button { background: transparent; border: none; color: #cfe0d3; padding: 8px 14px; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 500; }
.abas button.ativa { background: #E7B84B; color: #2a2210; font-weight: 600; }

.faixa-ganhadores { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.chip-ganhador { background: linear-gradient(135deg,#E7B84B,#c9902e); color: #2a2210; padding: 7px 14px; border-radius: 20px; font-size: 13px; font-weight: 600; box-shadow: 0 3px 10px rgba(0,0,0,0.25); }

.conteudo { max-width: 1180px; margin: 0 auto; }
.vazio { color: #b9c9bd; font-size: 14px; padding: 20px; text-align: center; }

.tela-escolha-papel { min-height: 70vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; text-align: center; padding: 20px; }
.escolha-cabecalho { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.bola-logo-grande { width: 60px; height: 60px; font-size: 26px; }
.escolha-cabecalho h1 { font-family: 'Fraunces', serif; font-size: 26px; margin: 4px 0 0; }
.escolha-cabecalho p { color: #b9c9bd; font-size: 14px; margin: 0; }

.caixa-sala {
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 20px;
  width: 100%; max-width: 380px; display: flex; flex-direction: column; gap: 12px; text-align: left;
}
.caixa-sala label { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #cfe0d3; }

.escolha-cartoes { display: flex; gap: 16px; flex-wrap: wrap; justify-content: center; max-width: 620px; }
.escolha-cartao {
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 22px;
  width: 240px; display: flex; flex-direction: column; align-items: center; gap: 8px; cursor: pointer;
  color: #f2ede0; transition: transform 0.15s ease, background 0.15s ease;
}
.escolha-cartao:hover { transform: translateY(-4px); background: rgba(0,0,0,0.32); }
.escolha-emoji { font-size: 30px; }
.escolha-titulo { font-family: 'Fraunces', serif; font-size: 16px; font-weight: 700; }
.escolha-descricao { font-size: 12.5px; color: #b9c9bd; line-height: 1.4; }

.topo-jogador { align-items: flex-start; }
.status-jogador { display: flex; gap: 14px; background: rgba(0,0,0,0.2); border-radius: 10px; padding: 10px 16px; }
.status-jogador div { display: flex; flex-direction: column; align-items: center; }
.status-jogador strong { font-family: 'Fraunces', serif; font-size: 17px; }
.status-jogador span { font-size: 10px; color: #b9c9bd; }
.link-trocar-papel { display: block; margin: 26px auto 4px; background: transparent; border: none; color: #8fa295; font-size: 12px; cursor: pointer; text-decoration: underline; }
.link-trocar-papel:hover { color: #cfe0d3; }

.tela-auth { min-height: 70vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.form-auth {
  background: rgba(0,0,0,0.22); border: 1px solid rgba(255,255,255,0.1); border-radius: 14px; padding: 26px;
  width: 100%; max-width: 340px; display: flex; flex-direction: column; gap: 12px;
}
.form-auth h2 { font-family: 'Fraunces', serif; font-size: 19px; margin: 0; }
.form-auth p.subtitulo { font-size: 12.5px; color: #b9c9bd; margin: -6px 0 4px; line-height: 1.5; }
.form-auth label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #cfe0d3; }
.badge-sessao { font-size: 12px; color: #b9c9bd; }
.badge-sessao strong { color: #E7B84B; }
.btn-sair { background: transparent; border: 1px solid #6b5a3a; color: #e0c98a; padding: 6px 12px; border-radius: 7px; cursor: pointer; font-size: 12px; }
.btn-sair:hover { background: rgba(224,201,138,0.08); }
.faixa-sessao { display: flex; justify-content: flex-end; align-items: center; gap: 10px; margin: -8px 0 12px; }

.tela-chamada { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
@media (max-width: 760px) { .tela-chamada { grid-template-columns: 1fr; } }
.painel-esquerda { display: flex; flex-direction: column; gap: 14px; }
.bola-atual {
  width: 100%; aspect-ratio: 1; border-radius: 50%; border: 6px solid #3a3530;
  background: rgba(0,0,0,0.25); display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.bola-atual-numero { font-family: 'Fraunces', serif; font-size: 46px; font-weight: 700; }
.bola-atual-label { font-size: 11px; color: #b9c9bd; text-transform: lowercase; margin-top: 2px; }
.resumo { display: flex; justify-content: space-between; background: rgba(0,0,0,0.2); border-radius: 10px; padding: 10px 6px; }
.resumo div { display: flex; flex-direction: column; align-items: center; flex: 1; }
.resumo strong { font-family: 'Fraunces', serif; font-size: 18px; }
.resumo span { font-size: 10px; color: #b9c9bd; }
.btn-apagar-numero { background: transparent; border: 1px solid #7a4a44; color: #e6b3ac; padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }
.btn-reiniciar { background: transparent; border: 1px solid #6b5a3a; color: #e0c98a; padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }

.grade-bolas { display: grid; grid-template-columns: repeat(10, 1fr); gap: 7px; align-content: start; }
@media (max-width: 560px) { .grade-bolas { grid-template-columns: repeat(6, 1fr); } }
.bola {
  aspect-ratio: 1; border-radius: 50%; border: 2px solid #3a5b4a; background: rgba(0,0,0,0.2);
  color: #dfe8e0; font-size: 13px; font-weight: 600; cursor: pointer; transition: transform 0.12s ease;
}
.bola:hover { transform: scale(1.08); }
.bola.marcada { color: #fff8e6; box-shadow: 0 2px 8px rgba(0,0,0,0.35); cursor: default; }

.barra-filtros { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; margin-bottom: 16px; }
.filtro-botoes { display: flex; gap: 6px; background: rgba(0,0,0,0.2); padding: 4px; border-radius: 9px; flex-wrap: wrap; }
.filtro-botoes button { background: transparent; border: none; color: #cfe0d3; padding: 7px 12px; border-radius: 7px; font-size: 12.5px; cursor: pointer; }
.filtro-botoes button.ativo { background: #E7B84B; color: #2a2210; font-weight: 600; }
.busca-numero { background: rgba(0,0,0,0.2); border: 1px solid rgba(255,255,255,0.12); color: #f2ede0; border-radius: 8px; padding: 8px 10px; font-size: 13px; width: 190px; }

.grade-cartelas { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.cartela { background: #F4EFE2; color: #2a2210; border-radius: 12px; padding: 14px; position: relative; box-shadow: 0 6px 18px rgba(0,0,0,0.28); text-align: left; border: none; font-family: inherit; }
.cartela-disponivel { cursor: pointer; background: #E9E4D4; display: flex; flex-direction: column; width: 100%; }
.cartela-completa { outline: 3px solid #E7B84B; }
.cartela-quase { outline: 3px solid #D97706; }
.cartela-cabecalho { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.cartela-numero { font-family: 'Fraunces', serif; font-weight: 700; font-size: 15px; }
.cartela-dono { font-size: 12.5px; color: #5c5340; max-width: 60%; text-align: right; }
.tag-disponivel { font-size: 11px; color: #3f7a52; font-weight: 600; }
.cartela-linhas { display: flex; flex-direction: column; gap: 4px; }
.cartela-linha { display: flex; gap: 4px; }
.coluna-letra { flex: 1; text-align: center; font-family: 'Fraunces', serif; font-weight: 700; font-size: 12px; color: #5c5340; padding-bottom: 2px; }
.pedra { flex: 1; text-align: center; padding: 5px 0; border-radius: 6px; border: 1.5px solid #d8cfb8; font-size: 12px; font-weight: 600; background: #fffdf8; }
.pedra-livre { color: #7a715c; background: #f3efe1; }
.pedra-marcada { color: #fff8e6; }
.cartela-rodape { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 11px; color: #5c5340; }
.barra-progresso { flex: 1; height: 6px; border-radius: 4px; background: #e3dac0; overflow: hidden; }
.barra-preenchida { height: 100%; background: #E7B84B; }
.selo-bingo, .selo-quase { position: absolute; top: -10px; right: 10px; color: #fff; font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 12px; box-shadow: 0 3px 8px rgba(0,0,0,0.3); }
.selo-bingo { background: #B23A2E; }
.selo-quase { background: #D97706; }
.cta-escolher { margin-top: 10px; text-align: center; background: #2F7A63; color: #f2ede0; padding: 7px; border-radius: 7px; font-size: 12.5px; font-weight: 600; }

.modal-fundo { position: fixed; inset: 0; background: rgba(10,15,12,0.65); display: flex; align-items: center; justify-content: center; padding: 16px; z-index: 50; }
.modal-caixa { background: #F4EFE2; color: #2a2210; border-radius: 14px; padding: 20px; width: 100%; max-width: 360px; box-shadow: 0 20px 50px rgba(0,0,0,0.4); }
.modal-caixa h3 { font-family: 'Fraunces', serif; margin: 0 0 12px; font-size: 17px; }
.modal-label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: #5c5340; margin-bottom: 6px; }
.modal-botoes { display: flex; gap: 8px; margin-top: 10px; }
.btn-cancelar { flex: 1; background: transparent; border: 1px solid #b8ac8a; color: #5c5340; padding: 9px; border-radius: 8px; cursor: pointer; font-size: 13px; }

.erro { color: #ffb4a8; font-size: 12.5px; margin: 4px 0 0; }
input, select { background: #eee7d4; border: none; border-radius: 6px; padding: 8px 9px; font-size: 14px; color: #2a2210; }
input:focus, select:focus { outline: 2px solid #E7B84B; }
.btn-cadastrar { background: #E7B84B; color: #2a2210; border: none; padding: 10px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-top: 4px; }