/* Lorotaria - visual. Pensado primeiro para celular (360px). */

:root {
  --noite: #24124f;
  --noite-2: #3a1c86;
  --tinta: #1c0f3a;
  --creme: #fff6e0;
  --amarelo: #ffd23f;
  --rosa: #ff5a8a;
  --menta: #34e0b8;
  --azul: #62c9ff;
  --laranja: #ff9a3d;
  --fonte: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", "Segoe UI", Roboto, system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; background: var(--noite); overflow-x: hidden; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  font-family: var(--fonte);
  font-size: 18px;
  line-height: 1.35;
  color: var(--creme);
  /* sem fundo aqui: a cor fica no html e o desenho no ::before, senão o body cobriria o desenho */
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
/* fundo preso à tela (num elemento fixo, que funciona melhor no celular do que background-attachment) */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(circle at 12% 8%, rgba(255, 90, 138, .35), transparent 38%),
    radial-gradient(circle at 92% 30%, rgba(98, 201, 255, .25), transparent 40%),
    radial-gradient(circle at 30% 100%, rgba(52, 224, 184, .22), transparent 45%),
    radial-gradient(rgba(255, 255, 255, .08) 2px, transparent 2.5px) 0 0 / 26px 26px,
    linear-gradient(160deg, var(--noite-2), var(--noite) 55%);
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; touch-action: manipulation; }
h1, h2, p, ol, ul { margin: 0; padding: 0; }
ol, ul { list-style: none; }

.app {
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 14px 16px calc(20px + env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  overflow-x: clip; /* o carimbo entra grande e não pode criar rolagem lateral */
}
.app.travado { pointer-events: none; }

.tela {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* ---------- logo de bandeirinhas ---------- */

.logo {
  position: relative;
  display: flex;
  justify-content: center;
  gap: 3px;
  padding-top: 6px;
  filter: drop-shadow(0 4px 0 var(--tinta));
}
.logo::before {
  content: "";
  position: absolute;
  top: 3px; left: -6px; right: -6px;
  height: 4px;
  border-radius: 4px;
  background: var(--creme);
}
.logo span {
  flex: 1;
  max-width: 44px;
  padding: 10px 0 18px;
  text-align: center;
  font-weight: 900;
  font-size: clamp(20px, 6.6vw, 31px);
  line-height: 1;
  color: var(--tinta);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 80%, 0 100%);
  transform-origin: 50% 0;
  animation: balanca 2.6s ease-in-out infinite alternate;
  animation-delay: calc(var(--i) * -0.45s);
}
.logo .c1 { background: var(--amarelo); }
.logo .c2 { background: var(--rosa); }
.logo .c3 { background: var(--menta); }
.logo .c4 { background: var(--azul); }
.logo-pequena span { max-width: 30px; font-size: 18px; padding: 8px 0 14px; }

@keyframes balanca {
  from { transform: rotate(-4deg); }
  to { transform: rotate(4deg); }
}

/* ---------- peças comuns ---------- */

.btn {
  display: block;
  width: 100%;
  min-height: 56px;
  padding: 12px 18px;
  border: 3px solid var(--tinta);
  border-radius: 18px;
  background: var(--amarelo);
  color: var(--tinta);
  font-weight: 800;
  font-size: 1.1rem;
  line-height: 1.15;
  box-shadow: 0 5px 0 var(--tinta);
  transition: transform .08s, box-shadow .08s;
}
.btn:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--tinta); }
.btn small { display: block; margin-top: 4px; font-size: .78rem; font-weight: 600; opacity: .8; }
.btn-grande { min-height: 66px; font-size: 1.3rem; }
.btn-claro {
  background: rgba(255, 246, 224, .1);
  color: var(--creme);
  border: 2px solid rgba(255, 246, 224, .7);
  box-shadow: none;
}
.btn-claro:active { transform: scale(.98); box-shadow: none; }
.btn[disabled] { background: #b9b0d1; color: #5a4f7c; box-shadow: 0 5px 0 var(--tinta); cursor: default; }
.btn:focus-visible, .opcao-voto:focus-visible, .pacote:focus-visible, .seletor-item:focus-visible,
.link:focus-visible, .topo-sair:focus-visible, .topo-voltar:focus-visible, .btn-mini:focus-visible {
  outline: 3px solid var(--azul);
  outline-offset: 3px;
}

.link {
  align-self: center;
  background: none;
  border: 0;
  padding: 10px 14px;
  color: var(--creme);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.cartao {
  background: var(--creme);
  color: var(--tinta);
  border: 3px solid var(--tinta);
  border-radius: 20px;
  padding: 18px;
  box-shadow: 0 6px 0 var(--tinta);
}

.avatar {
  flex: none;
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border: 3px solid var(--tinta);
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
}
.avatar-grande { width: 62px; height: 62px; font-size: 34px; }
.avatar-gigante { width: 136px; height: 136px; font-size: 76px; border-width: 5px; box-shadow: 0 8px 0 var(--tinta); }

.ficha {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 4px 14px 4px 4px;
  background: var(--creme);
  color: var(--tinta);
  border: 2.5px solid var(--tinta);
  border-radius: 999px;
  font-size: 1rem;
  vertical-align: middle;
}
.ficha .avatar { width: 32px; height: 32px; font-size: 18px; border-width: 2.5px; }
.ficha b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ganho { font-style: normal; font-weight: 900; color: #d81e5b; }

.dica { text-align: center; font-size: 1rem; opacity: .92; }
.dica-menor { font-size: .9rem; opacity: .8; }
.erro { min-height: 1.4em; text-align: center; font-weight: 800; color: var(--amarelo); }
.erro:empty { min-height: 0; }
.aviso { text-align: center; font-weight: 700; color: var(--menta); }
.aviso:empty { display: none; }
.titulo-secao { margin-top: 10px; font-size: .85rem; letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.titulo-tela { text-align: center; font-size: 1.6rem; font-weight: 900; line-height: 1.15; }

.topo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 44px;
}
.topo-marca { font-weight: 900; letter-spacing: .04em; color: var(--amarelo); font-size: .95rem; }
.topo-rodada { font-weight: 800; font-size: .95rem; text-align: center; }
.selo-dobro {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--rosa);
  color: #fff;
  font-size: .72rem;
  text-transform: uppercase;
}
.topo-sair, .topo-voltar {
  width: 44px; height: 44px;
  border: 2px solid rgba(255, 246, 224, .5);
  border-radius: 50%;
  background: rgba(255, 246, 224, .08);
  font-size: 1.1rem;
  font-weight: 800;
}
.topo-vazio { width: 44px; }

/* ---------- início ---------- */

.capa { padding: 18px 0 6px; display: grid; gap: 18px; }
.lema { text-align: center; font-size: 1.15rem; font-weight: 700; padding: 0 8px; }

.pacotes { display: grid; gap: 10px; }
.pacote {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 18px;
  border: 3px solid var(--tinta);
  text-align: left;
}
.pacote-livre { background: var(--menta); color: var(--tinta); box-shadow: 0 5px 0 var(--tinta); }
.pacote-bloqueado {
  background: rgba(255, 246, 224, .1);
  border: 2px dashed rgba(255, 246, 224, .55);
  color: var(--creme);
}
.pacote-bloqueado:active { transform: scale(.98); }
.pacote-emoji { flex: none; font-size: 30px; line-height: 1; }
.pacote-bloqueado .pacote-emoji { filter: grayscale(.4); }
.pacote-texto { flex: 1; min-width: 0; }
.pacote-texto b { display: block; font-size: 1.05rem; }
.pacote-texto small { display: block; font-size: .82rem; opacity: .85; }
.etiqueta { flex: none; font-weight: 900; font-size: .8rem; }
.etiqueta-gratis {
  padding: 4px 10px;
  border-radius: 999px;
  background: var(--tinta);
  color: var(--creme);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.etiqueta-cadeado { font-size: 1.3rem; }
.rodape { margin-top: auto; padding-top: 10px; text-align: center; font-size: .8rem; opacity: .65; }

/* ---------- jogadores ---------- */

.lista-nomes { display: grid; gap: 10px; }
.linha-nome { display: flex; align-items: center; gap: 10px; }
.campo {
  width: 100%;
  min-width: 0;
  padding: 11px 14px;
  border: 3px solid var(--tinta);
  border-radius: 14px;
  background: var(--creme);
  color: var(--tinta);
  font-size: 1.1rem;
  font-weight: 700;
  outline: none;
}
.campo::placeholder { color: #9a8fb5; font-weight: 600; }
.campo:focus { box-shadow: 0 0 0 4px var(--azul); }
.btn-mini, .btn-mini-vazio { flex: none; width: 44px; height: 44px; }
.btn-mini {
  border: 2px solid rgba(255, 246, 224, .5);
  border-radius: 50%;
  background: transparent;
  font-weight: 800;
}
.seletor { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.seletor-item {
  padding: 10px 4px;
  border: 2px solid rgba(255, 246, 224, .55);
  border-radius: 16px;
  background: rgba(255, 246, 224, .08);
}
.seletor-item b { display: block; font-size: 1.6rem; line-height: 1.1; }
.seletor-item small { font-size: .78rem; opacity: .85; }
.seletor-item.ativo {
  background: var(--rosa);
  color: #fff;
  border: 3px solid var(--tinta);
  box-shadow: 0 4px 0 var(--tinta);
}
.tela-jogadores > .btn-grande { margin-top: auto; }

/* ---------- versão completa ---------- */

.cartao-venda { display: grid; gap: 12px; }
.venda-pacote { padding: 8px 12px; border-radius: 12px; background: #ffe6a3; font-size: .95rem; }
.venda-titulo { font-size: 1.7rem; font-weight: 900; line-height: 1.1; }
.venda-chamada { font-size: 1.1rem; }
.venda-lista { display: grid; gap: 8px; font-weight: 700; }
.venda-lista span { display: inline-block; width: 1.6em; }
.tela-completa > .btn-grande { margin-top: auto; }

/* ---------- pergunta ---------- */

.cartao-pergunta { display: grid; gap: 12px; }
.categoria {
  justify-self: start;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--rosa);
  color: #fff;
  font-size: .78rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.pergunta-texto { font-size: 1.55rem; font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; }
.cartao-compacto { padding: 14px; }
.cartao-compacto .pergunta-texto { font-size: 1.15rem; }
.pergunta-mini { font-size: .95rem; font-weight: 700; opacity: .85; text-align: center; overflow-wrap: anywhere; }
.faixa-dobro {
  align-self: center;
  padding: 6px 16px;
  border: 3px solid var(--tinta);
  border-radius: 999px;
  background: var(--rosa);
  color: #fff;
  font-weight: 900;
  transform: rotate(-2deg);
  box-shadow: 0 4px 0 var(--tinta);
}
.tela-pergunta > .btn-grande, .tela-passar > .btn-grande, .tela-opcoes > .btn-grande,
.tela-placar > .btn-grande, .tela-revelar > .btn-grande { margin-top: auto; }

/* ---------- passar o celular ---------- */

.progresso { text-align: center; font-size: .9rem; font-weight: 700; opacity: .8; }
.passar {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: center;
  padding: 10px 0;
}
.passar-rotulo { font-size: 1.2rem; font-weight: 700; }
.passar-nome {
  max-width: 100%;
  font-size: clamp(2.2rem, 12vw, 3.2rem);
  font-weight: 900;
  line-height: 1.05;
  color: var(--amarelo);
  text-shadow: 0 4px 0 var(--tinta);
  overflow-wrap: anywhere;
}
.passar-tarefa { font-size: 1.05rem; opacity: .9; }

/* ---------- escrever ---------- */

.vez { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; font-size: .95rem; }
.rotulo { font-weight: 800; font-size: .95rem; }
.campo-lorota {
  display: block;
  resize: none;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}
.campo-lorota::placeholder { text-transform: none; }
.contador { margin-top: -8px; text-align: right; font-size: .8rem; opacity: .7; }

/* ---------- opções e voto ---------- */

.opcoes { display: grid; gap: 12px; }
.opcao {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: 3px solid var(--tinta);
  border-radius: 18px;
  background: var(--creme);
  color: var(--tinta);
  text-align: left;
  box-shadow: 0 5px 0 var(--tinta);
}
.letra {
  flex: none;
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--tinta);
  color: var(--creme);
  font-weight: 900;
  font-size: 1rem;
}
.opcao-texto, .resposta {
  flex: 1;
  min-width: 0;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.opcao-texto { font-size: 1.1rem; line-height: 1.2; }
.opcao-voto { min-height: 62px; transition: transform .08s, box-shadow .08s, background .12s; }
.opcao-voto.marcada {
  background: var(--amarelo);
  transform: translateY(3px);
  box-shadow: 0 2px 0 var(--tinta), 0 0 0 4px var(--rosa);
}
.opcao-voto.marcada .letra { background: var(--rosa); color: #fff; }
.opcao-propria {
  background: rgba(255, 246, 224, .16);
  color: var(--creme);
  border: 2px dashed rgba(255, 246, 224, .5);
  box-shadow: none;
  opacity: .75;
}
.opcao-propria .letra { background: rgba(255, 246, 224, .3); }
.opcao-propria { flex-wrap: wrap; row-gap: 4px; }
.opcao-nota { flex: 0 0 100%; padding-left: 46px; font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.tela-votar > .btn-grande { position: sticky; bottom: 14px; margin-top: auto; }

/* ---------- revelação ---------- */

.rev-rotulo { text-align: center; font-size: 1.3rem; font-weight: 900; }
.rev-sub { text-align: center; font-weight: 800; font-size: 1.1rem; }
.rev-sub .ganho, .rev-ninguem { color: var(--amarelo); }
.palco { position: relative; margin-top: 12px; min-height: 96px; }
.cartao-resposta { padding: 26px 18px; text-align: center; }
.resposta { font-size: 1.55rem; line-height: 1.15; }
.cartao-verdade { background: var(--menta); }
.cartao-ignorada { padding: 12px 14px; display: grid; gap: 8px; background: #e9e1f7; box-shadow: 0 4px 0 var(--tinta); }
.cartao-ignorada .resposta { font-size: 1.1rem; }
.ignorada-autor { font-size: .85rem; font-weight: 700; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }

.carimbo {
  position: absolute;
  top: -16px; right: -4px;
  padding: 4px 14px;
  border: 4px solid currentColor;
  border-radius: 10px;
  background: var(--creme);
  font-size: 1.25rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .06em;
  transform: rotate(8deg);
  animation: carimba .38s cubic-bezier(.2, 1.4, .4, 1) both;
}
.carimbo-lorota { color: #d81e5b; }
.carimbo-verdade { color: #0b7d62; }
@keyframes carimba {
  from { opacity: 0; transform: rotate(-14deg) scale(2.6); }
  to { opacity: 1; transform: rotate(8deg) scale(1); }
}

.fichas { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; min-height: 44px; }
.fichas .ficha { animation: pula .4s cubic-bezier(.2, 1.5, .4, 1) both; }
.fichas-estaticas .ficha { animation: none; }
@keyframes pula {
  from { opacity: 0; transform: scale(.2) translateY(20px); }
  to { opacity: 1; transform: none; }
}
.autoria { display: grid; gap: 8px; text-align: center; font-weight: 800; }

.suspense {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-size: 44px;
  animation: some .3s 1.7s both;
}
.suspense span { animation: tambor .22s ease-in-out infinite alternate; }
.suspense i {
  width: 14px; height: 14px;
  border-radius: 50%;
  background: var(--amarelo);
  animation: quica .5s ease-in-out infinite alternate;
}
.suspense i:nth-child(3) { animation-delay: .15s; }
.suspense i:nth-child(4) { animation-delay: .3s; }
@keyframes some { to { opacity: 0; visibility: hidden; } }
@keyframes tambor { from { transform: rotate(-10deg) scale(1); } to { transform: rotate(10deg) scale(1.15); } }
@keyframes quica { from { transform: translateY(8px); opacity: .5; } to { transform: translateY(-8px); opacity: 1; } }

.vira { animation: vira .55s cubic-bezier(.2, 1.3, .4, 1) both; }
@keyframes vira {
  from { opacity: 0; transform: perspective(600px) rotateX(-88deg) scale(.9); }
  to { opacity: 1; transform: none; }
}

.curiosidade {
  padding: 12px 14px;
  border-left: 5px solid var(--amarelo);
  border-radius: 6px 14px 14px 6px;
  background: rgba(255, 246, 224, .12);
  font-size: .98rem;
}
.curiosidade:empty { display: none; }

.entra { animation: entra .45s cubic-bezier(.2, .9, .3, 1) both; }
@keyframes entra {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: none; }
}

/* ---------- placar e pódio ---------- */

.placar { display: grid; gap: 8px; }
.placar-linha {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border: 3px solid var(--tinta);
  border-radius: 16px;
  background: var(--creme);
  color: var(--tinta);
}
.placar-posicao { flex: none; width: 1.8em; font-weight: 900; }
.placar-nome { flex: 1; min-width: 0; display: grid; gap: 4px; }
.placar-nome b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.barra { display: block; height: 8px; border-radius: 8px; background: #e2d8c0; overflow: hidden; }
.barra i { display: block; height: 100%; min-width: 4px; border-radius: 8px; border-right: 2px solid var(--tinta); }
.placar-pontos { flex: none; text-align: right; font-weight: 900; font-size: 1.15rem; line-height: 1.1; }
.placar-pontos small { display: block; font-size: .78rem; font-weight: 800; color: #8d84a6; }
.placar-pontos small.subiu { color: #d81e5b; }

.tela-fim { position: relative; }
.podio { display: flex; align-items: flex-end; justify-content: center; gap: 8px; margin-top: 8px; }
.podio-coluna {
  position: relative;
  flex: 1;
  min-width: 0;
  max-width: 130px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.podio-nome { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; }
.podio-pontos { font-weight: 900; color: var(--amarelo); }
.podio-base {
  width: 100%;
  display: grid;
  place-items: center;
  border: 3px solid var(--tinta);
  border-bottom: 0;
  border-radius: 14px 14px 0 0;
  color: var(--tinta);
  font-size: 1.6rem;
  font-weight: 900;
}
.podio-1 .podio-base { height: 116px; background: var(--amarelo); }
.podio-2 .podio-base { height: 84px; background: var(--azul); }
.podio-3 .podio-base { height: 58px; background: var(--laranja); }
.podio-4 .podio-base, .podio-5 .podio-base { height: 44px; background: var(--creme); }
.coroa { font-size: 30px; line-height: 1; animation: balanca 1.2s ease-in-out infinite alternate; }

.confete { position: fixed; inset: 0; overflow: hidden; pointer-events: none; z-index: 5; }
.confete i {
  position: absolute;
  top: -24px;
  width: 10px; height: 16px;
  border-radius: 3px;
  animation: cai linear infinite;
}
@keyframes cai {
  from { transform: translateY(0) rotate(0); }
  to { transform: translateY(110vh) rotate(720deg); }
}

/* ---------- janelinha ---------- */

.modal-fundo {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(18, 8, 40, .82);
}
.modal {
  width: 100%;
  max-width: 420px;
  max-height: 100%;
  overflow: auto;
  display: grid;
  gap: 14px;
  animation: entra .25s both;
}
.modal h2 { font-size: 1.4rem; font-weight: 900; }
.modal .btn-claro { color: var(--tinta); border-color: var(--tinta); background: transparent; }
.regras { display: grid; gap: 10px; counter-reset: regra; font-size: .98rem; }
.regras li { position: relative; padding-left: 38px; counter-increment: regra; }
.regras li::before {
  content: counter(regra);
  position: absolute;
  left: 0; top: 0;
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--rosa);
  color: #fff;
  font-weight: 900;
  font-size: .9rem;
}

/* ---------- telas maiores e acessibilidade ---------- */

@media (min-width: 600px) {
  .app { padding-top: 28px; padding-bottom: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01s !important;
    animation-delay: 0s !important;
    animation-iteration-count: 1 !important;
    transition: none !important;
  }
  .confete { display: none; }
}
