/* Xadrez Divertido: estilo mobile-first */
* { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

:root {
  --raio: 16px;
}

/* ==================== TEMAS ==================== */
body[data-theme="classico"] {
  --bg1: #f8eeda; --bg2: #eeddc0; --texto: #4a3526; --painel: #fffaf0; --sombra: rgba(90, 60, 30, .18);
  --acento: #d08c47; --acento2: #8a5a2b;
  --sq-l: #f0d9b5; --sq-d: #b58863;
  --pw: #fffaf0; --pw-s: #6b4a2b; --pb: #4a3526; --pb-s: #241812;
}
body[data-theme="neon"] {
  --bg1: #0b0f1f; --bg2: #1a1033; --texto: #eaf6ff; --painel: #171d3d; --sombra: rgba(0, 229, 255, .25);
  --acento: #00e5ff; --acento2: #ff2ec4;
  --sq-l: #2b3568; --sq-d: #151b3d;
  --pw: #e8fbff; --pw-s: #00b3d6; --pb: #241a45; --pb-s: #ff2ec4;
}
body[data-theme="oceano"] {
  --bg1: #d6f3f7; --bg2: #9fdcee; --texto: #123c50; --painel: #f2fbfd; --sombra: rgba(14, 90, 130, .2);
  --acento: #0e8ab4; --acento2: #f4a340;
  --sq-l: #e6f7fb; --sq-d: #6fb9d8;
  --pw: #ffffff; --pw-s: #1d6f96; --pb: #17475e; --pb-s: #0b2c3b;
}
body[data-theme="floresta"] {
  --bg1: #e8f4dd; --bg2: #cfe8bd; --texto: #2c421f; --painel: #f7fbef; --sombra: rgba(60, 90, 40, .2);
  --acento: #5c9134; --acento2: #b5722f;
  --sq-l: #f0f5df; --sq-d: #7fae6a;
  --pw: #fbfff2; --pw-s: #557d3a; --pb: #2f4a26; --pb-s: #16240f;
}
body[data-theme="docinho"] {
  --bg1: #ffe3ef; --bg2: #ffd1e6; --texto: #7c2b55; --painel: #fff5f9; --sombra: rgba(220, 90, 150, .25);
  --acento: #f2549c; --acento2: #b56ef0;
  --sq-l: #fff0f6; --sq-d: #f7a8c9;
  --pw: #ffffff; --pw-s: #e86ca8; --pb: #a04f7d; --pb-s: #5e2244;
}
body[data-theme="jardim"] {
  --bg1: #fdeef1; --bg2: #e3f1de; --texto: #5a3a4e; --painel: #fefaf4; --sombra: rgba(160, 100, 120, .22);
  --acento: #c95d8f; --acento2: #6d9a5b;
  --sq-l: #fdf6ee; --sq-d: #cd8fa6;
  --pw: #fffdf8; --pw-s: #c37a95; --pb: #5d4157; --pb-s: #33202f;
}
body[data-theme="realeza"] {
  --bg1: #efe6fb; --bg2: #d9c6f4; --texto: #3c1e63; --painel: #f8f4ff; --sombra: rgba(120, 70, 190, .25);
  --acento: #8a4fd3; --acento2: #e3b341;
  --sq-l: #f3ecfd; --sq-d: #b493e0;
  --pw: #fdfaff; --pw-s: #9a6ad0; --pb: #46246e; --pb-s: #24103c;
}
body[data-theme="espaco"] {
  --bg1: #070a1a; --bg2: #141a3a; --texto: #e8ecff; --painel: #161d42; --sombra: rgba(90, 110, 255, .3);
  --acento: #7f8cff; --acento2: #ffd166;
  --sq-l: #26305e; --sq-d: #101636;
  --pw: #f0f4ff; --pw-s: #7787f0; --pb: #232b5c; --pb-s: #9aa8ff;
}
body[data-theme="fogogelo"] {
  --bg1: #fdeee4; --bg2: #dbeefb; --texto: #45322c; --painel: #fff8f2; --sombra: rgba(200, 100, 60, .2);
  --acento: #ff6b35; --acento2: #3aa0e8;
  --sq-l: #ffe3c9; --sq-d: #7fb3d9;
  --pw: #fff1e0; --pw-s: #e06a2b; --pb: #1d4e6e; --pb-s: #0e2c42;
}
body[data-theme="retro"] {
  --bg1: #1a1c2c; --bg2: #29366f; --texto: #f4f4f4; --painel: #333c57; --sombra: rgba(0, 0, 0, .4);
  --acento: #ffcd75; --acento2: #41a6f6;
  --sq-l: #a7f070; --sq-d: #38b764;
  --pw: #f4f4f4; --pw-s: #333c57; --pb: #29366f; --pb-s: #73eff7;
}

/* ==================== BASE ==================== */
html, body { height: 100%; }
body {
  font-family: 'Fredoka', 'Segoe UI', system-ui, sans-serif;
  background: linear-gradient(160deg, var(--bg1), var(--bg2));
  color: var(--texto);
  min-height: 100dvh;
  overflow-x: hidden;
  transition: background .5s;
}
button { font-family: inherit; cursor: pointer; border: none; color: inherit; }
.oculta { display: none !important; }
.espaco { flex: 1; }

.tela {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  max-width: 560px;
  margin: 0 auto;
  padding: 16px;
}

/* ==================== TELA INICIO ==================== */
.titulo { text-align: center; padding: 20px 0 8px; }
.titulo h1 { font-size: 2rem; font-weight: 700; letter-spacing: .5px; }
.subtitulo { opacity: .75; font-size: .95rem; margin-top: 4px; }
.titulo-pecas { font-size: 2.4rem; display: flex; justify-content: center; gap: 10px; }
.titulo-pecas span { display: inline-block; animation: quicar 1.6s ease-in-out infinite; }
.titulo-pecas span:nth-child(2) { animation-delay: .2s; }
.titulo-pecas span:nth-child(3) { animation-delay: .4s; }
@keyframes quicar {
  0%, 100% { transform: translateY(0) rotate(0); }
  40% { transform: translateY(-12px) rotate(-8deg); }
}

.secao { margin-top: 18px; }
.secao h2 { font-size: 1.05rem; font-weight: 600; margin-bottom: 10px; }

.grade-temas {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
  gap: 10px;
}
.cartao-tema {
  background: var(--painel);
  border-radius: var(--raio);
  padding: 10px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  box-shadow: 0 3px 10px var(--sombra);
  border: 3px solid transparent;
  transition: transform .15s, border-color .15s;
}
.cartao-tema:active { transform: scale(.94); }
.cartao-tema.ativo { border-color: var(--acento); transform: scale(1.04); }
.mini-tab {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 40px; height: 40px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2);
}
.tema-icone { font-size: 1.15rem; margin-top: -20px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.3)); }
.tema-nome { font-size: .72rem; font-weight: 600; text-align: center; line-height: 1.1; }

.modos { display: flex; flex-direction: column; gap: 10px; padding-bottom: 24px; }
.btn-modo {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--painel);
  border-radius: var(--raio);
  padding: 14px 16px;
  text-align: left;
  font-size: 1rem;
  box-shadow: 0 3px 10px var(--sombra);
  transition: transform .15s;
}
.btn-modo:active { transform: scale(.97); }
.btn-modo.destaque { border: 3px solid var(--acento); }
.btn-modo b { display: block; font-weight: 600; }
.btn-modo small { opacity: .7; font-size: .8rem; }
.modo-icone { font-size: 1.7rem; }

.caixa-entrar { display: flex; flex-wrap: wrap; gap: 8px; }
.caixa-entrar .btn-acao { flex: 1; }
.caixa-entrar input {
  flex: 1 1 100%;
  min-width: 0;
  border: 3px solid var(--acento);
  border-radius: var(--raio);
  padding: 12px;
  font-family: inherit;
  font-size: 1.3rem;
  font-weight: 700;
  text-align: center;
  letter-spacing: .4em;
  text-transform: uppercase;
  background: var(--painel);
  color: inherit;
  outline: none;
}

.btn-acao {
  background: var(--acento);
  color: #fff;
  border-radius: var(--raio);
  padding: 12px 18px;
  font-size: 1rem;
  font-weight: 600;
  box-shadow: 0 4px 12px var(--sombra);
  transition: transform .15s;
  text-decoration: none;
  text-align: center;
}
.btn-acao:active { transform: scale(.95); }
.btn-acao.whats { background: #25d366; }
.btn-fantasma { background: none; opacity: .7; padding: 12px; font-size: .95rem; }

/* ==================== TELA ESPERA ==================== */
#tela-espera { justify-content: center; align-items: center; }
.espera-caixa {
  background: var(--painel);
  border-radius: 24px;
  padding: 28px 22px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 14px;
  text-align: center;
  box-shadow: 0 8px 30px var(--sombra);
}
.espera-rotulo { font-size: .95rem; opacity: .8; }
.espera-codigo {
  font-size: 3rem;
  font-weight: 700;
  letter-spacing: .3em;
  color: var(--acento);
  text-indent: .3em;
}
.espera-pulso { font-size: .95rem; opacity: .85; }
.pontinhos i { font-style: normal; animation: piscar 1.2s infinite; }
.pontinhos i:nth-child(2) { animation-delay: .2s; }
.pontinhos i:nth-child(3) { animation-delay: .4s; }
@keyframes piscar { 0%, 100% { opacity: .2; } 50% { opacity: 1; } }
.espera-link {
  border: 2px dashed var(--acento);
  border-radius: 12px;
  padding: 10px;
  font-family: inherit;
  font-size: .8rem;
  text-align: center;
  background: transparent;
  color: inherit;
  outline: none;
}
.espera-botoes { display: flex; flex-direction: column; gap: 8px; }

/* ==================== TELA JOGO ==================== */
#tela-jogo { padding: 10px 8px calc(10px + env(safe-area-inset-bottom)); gap: 8px; }

.jogo-topo { display: flex; align-items: center; gap: 8px; }
.btn-icone {
  background: var(--painel);
  border-radius: 12px;
  width: 42px; height: 42px;
  font-size: 1.15rem;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 8px var(--sombra);
  transition: transform .15s;
  flex-shrink: 0;
}
.btn-icone:active { transform: scale(.9); }
.tag-sala {
  background: var(--painel);
  border-radius: 12px;
  padding: 10px 12px;
  font-weight: 700;
  letter-spacing: .05em;
  font-size: .9rem;
  box-shadow: 0 2px 8px var(--sombra);
  white-space: nowrap;
}
.tag-olhos {
  background: var(--painel);
  border-radius: 12px;
  padding: 10px 10px;
  font-size: .85rem;
  font-weight: 700;
  box-shadow: 0 2px 8px var(--sombra);
  white-space: nowrap;
}

/* pecas capturadas de cada lado */
.capturas {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0;
  min-height: 20px;
  padding: 0 6px;
}
.mini-peca {
  position: static !important;
  width: 19px !important;
  height: 19px !important;
  transition: none !important;
  display: inline-flex;
  margin-right: -4px;
}
.mini-peca svg { width: 100% !important; height: 100% !important; filter: none !important; }
.mini-peca .pc { stroke-width: 7 !important; }
.vantagem {
  font-size: .78rem;
  font-weight: 700;
  opacity: .75;
  margin-left: 10px;
}

.chips { display: flex; align-items: center; gap: 6px; }
.chip {
  background: var(--painel);
  border-radius: 999px;
  padding: 7px 12px;
  display: flex; align-items: center; gap: 6px;
  font-size: .85rem;
  font-weight: 600;
  border: 2px solid transparent;
  transition: border-color .3s, box-shadow .3s;
  white-space: nowrap;
}
.chip.ativo { border-color: var(--acento); box-shadow: 0 0 12px var(--sombra); }
.chip-cor { width: 13px; height: 13px; border-radius: 50%; border: 2px solid var(--pb-s); }
.chip-cor.branca { background: var(--pw); }
.chip-cor.preta { background: var(--pb); }
.status {
  flex: 1;
  text-align: center;
  font-size: .9rem;
  font-weight: 600;
  min-width: 0;
}

.area-tabuleiro { display: flex; justify-content: center; }
.tabuleiro {
  position: relative;
  width: min(100%, calc(100dvh - 290px));
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 30px var(--sombra);
  touch-action: none; /* permite arrastar peca sem rolar a pagina */
}
.tabuleiro.tremendo { animation: tremer .4s; }
@keyframes tremer {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px, 2px) rotate(-.6deg); }
  40% { transform: translate(6px, -2px) rotate(.6deg); }
  60% { transform: translate(-4px, 1px); }
  80% { transform: translate(4px, -1px); }
}

.camada-casas {
  position: absolute; inset: 0;
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
}
.casa { position: relative; transition: box-shadow .2s; }
.casa.clara { background: var(--sq-l); }
.casa.escura { background: var(--sq-d); }
.casa.selecionada { box-shadow: inset 0 0 0 4px var(--acento); }
.casa.alvo { box-shadow: inset 0 0 0 5px var(--acento); filter: brightness(1.15); }
.casa.ultimo::before {
  content: '';
  position: absolute; inset: 0;
  background: var(--acento);
  opacity: .28;
}
.casa.premove::after {
  content: '';
  position: absolute; inset: 0;
  background: #e5484d;
  opacity: .38;
}
.casa.marcada { box-shadow: inset 0 0 0 4px #eb4d4b; }
.casa.marcada::after {
  content: '';
  position: absolute; inset: 0;
  background: #eb4d4b;
  opacity: .28;
}
.casa.em-xeque {
  animation: pulso-xeque .7s infinite;
}
@keyframes pulso-xeque {
  0%, 100% { box-shadow: inset 0 0 0 4px #e5484d; }
  50% { box-shadow: inset 0 0 0 8px #e5484d; }
}
.dica {
  position: absolute;
  top: 50%; left: 50%;
  width: 30%; height: 30%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: var(--acento);
  opacity: .55;
  animation: aparecer-dica .25s;
  pointer-events: none;
}
.dica.captura {
  width: 84%; height: 84%;
  background: transparent;
  border: 4px dashed var(--acento);
  opacity: .8;
  animation: aparecer-dica .25s, girar 6s linear infinite;
}
@keyframes aparecer-dica { from { transform: translate(-50%, -50%) scale(0); } }
@keyframes girar { to { transform: translate(-50%, -50%) rotate(360deg); } }

.camada-setas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 7;
}
.camada-setas line {
  stroke: var(--acento2);
  stroke-width: .16;
  stroke-linecap: round;
  opacity: .85;
}
.camada-setas .ponta-path { fill: var(--acento2); }

.camada-pecas { position: absolute; inset: 0; pointer-events: none; }
.peca {
  position: absolute;
  width: 12.5%; height: 12.5%;
  display: flex; align-items: center; justify-content: center;
  transition: transform .28s cubic-bezier(.2, .8, .3, 1.25);
  will-change: transform;
}
.peca svg { width: 84%; height: 84%; filter: drop-shadow(0 2px 2px rgba(0, 0, 0, .25)); }
.peca .pc { stroke-width: 5; stroke-linejoin: round; stroke-linecap: round; }
.peca.w .pc { fill: var(--pw); stroke: var(--pw-s); }
.peca.b .pc { fill: var(--pb); stroke: var(--pb-s); }
.peca.w .pc-2 { fill: var(--pw-s); stroke: none; }
.peca.b .pc-2 { fill: var(--pb-s); stroke: none; }
.peca.andando { z-index: 5; }
.peca.andando svg { animation: pulinho .3s; }
@keyframes pulinho {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.25) rotate(4deg); }
}
.peca.arrastando { transition: none; z-index: 20; }
.peca.arrastando svg {
  transform: scale(1.2);
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, .35));
}
.peca.explodindo { z-index: 4; }
.peca.explodindo svg { animation: explodir .32s forwards; }
@keyframes explodir {
  to { transform: scale(2) rotate(30deg); opacity: 0; }
}
.peca.promovendo svg { animation: promover .55s; }
@keyframes promover {
  0% { transform: scale(0) rotate(-180deg); }
  70% { transform: scale(1.3); }
  100% { transform: scale(1); }
}

.camada-fx { position: absolute; inset: 0; pointer-events: none; overflow: visible; z-index: 10; }
.particula {
  position: absolute;
  transform: translate(-50%, -50%);
  z-index: 10;
}

/* explosao: voa em todas as direcoes (classico, neon, espaco) */
.part-explosao { animation: part-explosao var(--dur) ease-out var(--atraso) both; }
@keyframes part-explosao {
  to {
    transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy))) rotate(var(--rot)) scale(.3);
    opacity: 0;
  }
}

/* subir: flutua pra cima balancando (bolhas, chamas, poeira estelar) */
.part-subir { animation: part-subir var(--dur) ease-out var(--atraso) both; }
@keyframes part-subir {
  0% { transform: translate(-50%, -50%) scale(.5); opacity: 0; }
  15% { opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--sway)), calc(-50% + var(--dy))) scale(1.15);
    opacity: 0;
  }
}

/* cair: cai girando devagar (folhas, petalas, neve) */
.part-cair { animation: part-cair var(--dur) ease-in var(--atraso) both; }
@keyframes part-cair {
  0% { transform: translate(-50%, -50%) rotate(0); opacity: 1; }
  100% {
    transform: translate(calc(-50% + var(--sway)), calc(-50% + var(--dy))) rotate(var(--rot));
    opacity: 0;
  }
}

/* espiral: gira abrindo (docinho, realeza) */
.part-espiral { animation: part-espiral var(--dur) ease-out var(--atraso) both; }
@keyframes part-espiral {
  0% { transform: translate(-50%, -50%) rotate(var(--a0)) translateX(4px) scale(.6); opacity: 1; }
  100% {
    transform: translate(-50%, -50%) rotate(calc(var(--a0) + var(--giro))) translateX(var(--raio)) scale(1.1);
    opacity: 0;
  }
}

/* pixel: quadradinhos coloridos (retro) */
.part-pixel {
  border-radius: 2px;
  animation: part-explosao var(--dur) steps(7) var(--atraso) both;
}

/* anel de luz da captura em temas com flash */
.flash-anel {
  position: absolute;
  width: 12%; height: 12%;
  transform: translate(-50%, -50%) scale(.3);
  border: 4px solid var(--cor);
  border-radius: 50%;
  z-index: 9;
  animation: flash-anel .45s ease-out both;
}
@keyframes flash-anel {
  0% { transform: translate(-50%, -50%) scale(.3); opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(2.6); opacity: 0; }
}

.barra-emojis {
  display: flex;
  justify-content: center;
  gap: 6px;
  padding: 2px 0;
}
.btn-emoji {
  background: var(--painel);
  border-radius: 12px;
  width: 44px; height: 44px;
  font-size: 1.3rem;
  box-shadow: 0 2px 8px var(--sombra);
  transition: transform .12s;
}
.btn-emoji:active { transform: scale(1.25) rotate(-10deg); }
.btn-neymar { padding: 0; overflow: hidden; background: #fff; }
.btn-neymar img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: top center;
  pointer-events: none;
}

/* ==================== SOBREPOSICOES ==================== */
.fx-tela { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confete {
  position: fixed;
  top: -20px;
  border-radius: 3px;
  animation: cair var(--dur) linear var(--atraso) forwards;
  z-index: 90;
}
@keyframes cair {
  to { transform: translate(var(--sway), 105vh) rotate(720deg); opacity: .6; }
}
.confete-emoji { background: none !important; width: auto !important; height: auto !important; }
.emoji-voador {
  position: fixed;
  bottom: -60px;
  font-size: 3rem;
  animation: subir 2s ease-out forwards;
  z-index: 91;
}
@keyframes subir {
  0% { transform: translateY(0) scale(.6); opacity: 0; }
  15% { opacity: 1; transform: translateY(-14vh) scale(1.2); }
  100% { transform: translateY(-80vh) translateX(var(--sway)) scale(1); opacity: 0; }
}
.emoji-voador.reacao-img { bottom: -120px; }
.emoji-voador.reacao-img img {
  height: 130px;
  width: auto;
  filter: drop-shadow(0 6px 12px rgba(0, 0, 0, .35));
}

.banner {
  position: fixed; inset: 0;
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  z-index: 80;
}
.banner-caixa {
  background: var(--painel);
  border: 4px solid var(--acento);
  border-radius: 22px;
  padding: 16px 30px;
  text-align: center;
  box-shadow: 0 12px 40px var(--sombra);
}
.banner.anim .banner-caixa { animation: banner-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes banner-pop {
  from { transform: scale(0) rotate(-6deg); opacity: 0; }
}
.banner-texto { font-size: 1.6rem; font-weight: 700; }
.banner-sub { font-size: .95rem; opacity: .8; margin-top: 2px; }

.toast {
  position: fixed;
  top: 14px; left: 50%;
  transform: translateX(-50%);
  background: var(--painel);
  color: var(--texto);
  padding: 10px 18px;
  border-radius: 999px;
  font-family: 'Fredoka', system-ui, sans-serif;
  font-size: .9rem;
  font-weight: 600;
  box-shadow: 0 6px 20px var(--sombra);
  z-index: 95;
  animation: toast-entra .3s;
  transition: opacity .4s, transform .4s;
  max-width: 88vw;
  text-align: center;
}
.toast.sumir { opacity: 0; transform: translateX(-50%) translateY(-16px); }
@keyframes toast-entra { from { transform: translateX(-50%) translateY(-20px); opacity: 0; } }

.modal {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: center; justify-content: center;
  z-index: 85;
  padding: 20px;
}
.modal-caixa {
  background: var(--painel);
  border-radius: 22px;
  padding: 22px;
  text-align: center;
  width: 100%;
  max-width: 340px;
  box-shadow: 0 15px 50px rgba(0, 0, 0, .3);
  animation: banner-pop .4s cubic-bezier(.2, .9, .3, 1.4);
}
.modal-caixa h3 { font-size: 1.3rem; margin-bottom: 4px; }
.modal-caixa p { opacity: .8; font-size: .95rem; }
.promo-opcoes { display: flex; justify-content: center; gap: 8px; margin-top: 14px; }
.promo-peca {
  position: static !important;
  width: 64px !important; height: 64px !important;
  background: var(--sq-l);
  border-radius: 14px;
  transition: transform .15s;
}
.promo-peca:active { transform: scale(.9); }
.fim-botoes { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }

.campo-nome {
  width: 100%;
  border: 3px solid var(--acento);
  border-radius: 12px;
  padding: 12px;
  font-family: inherit;
  font-size: 1.05rem;
  font-weight: 600;
  text-align: center;
  background: transparent;
  color: inherit;
  outline: none;
  margin-top: 12px;
}
.escolha-cor { margin-top: 14px; }
.ops-cor { display: flex; gap: 8px; margin-top: 8px; }
.op-cor {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 4px;
  border-radius: 12px;
  border: 3px solid transparent;
  background: rgba(127, 127, 127, .12);
  font-weight: 600;
  font-size: .82rem;
  color: inherit;
  transition: transform .15s, border-color .15s;
}
.op-cor:active { transform: scale(.94); }
.op-cor.ativo { border-color: var(--acento); }

.placar-grande {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  margin-bottom: 12px;
}
.lista-historico { display: flex; flex-direction: column; gap: 6px; }
.item-hist {
  background: rgba(127, 127, 127, .12);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: .9rem;
  font-weight: 500;
}

.modo-espectador .barra-emojis { display: none; }

.folha {
  position: fixed; inset: 0;
  background: rgba(0, 0, 0, .45);
  display: flex; align-items: flex-end;
  z-index: 85;
}
.folha-caixa {
  background: var(--painel);
  border-radius: 24px 24px 0 0;
  padding: 20px 16px calc(24px + env(safe-area-inset-bottom));
  width: 100%;
  max-height: 70dvh;
  overflow-y: auto;
  animation: sobe-folha .3s ease-out;
}
.folha-caixa h3 { margin-bottom: 12px; }
@keyframes sobe-folha { from { transform: translateY(100%); } }

/* ==================== TELAS MAIORES ==================== */
@media (min-width: 700px) {
  .titulo h1 { font-size: 2.5rem; }
  .tabuleiro { width: min(100%, calc(100dvh - 250px), 620px); }
  .btn-modo:hover, .cartao-tema:hover, .btn-icone:hover, .btn-emoji:hover, .btn-acao:hover { transform: translateY(-2px); }
  .folha { align-items: center; justify-content: center; }
  .folha-caixa { max-width: 620px; border-radius: 24px; }
}
