/* O ambiente da mesa (PRD 33.48, jogo/ambiente.js): o clima dos presságios, as quinas vivas, a vela e a época.
   As camadas ficam sobre a mesa, sem receber cliques, entre a névoa (z 5) e a vinheta (z 6) */
#tela-mesa > .clima, #tela-mesa > .noite, #tela-mesa > .epoca { position: fixed; inset: 0; pointer-events: none; z-index: 5; overflow: hidden; }
#tela-mesa > .noite { z-index: 6; background: radial-gradient(ellipse at 50% 45%, rgba(4,5,12,.55), rgba(2,2,6,.95)); opacity: 0; transition: opacity 4s ease; }

/* ---------- O clima de cada presságio ---------- */
@keyframes am-deriva { from { transform: translateX(-6%); } to { transform: translateX(6%); } }
@keyframes am-pisca { 0%, 100% { opacity: .15; } 50% { opacity: var(--t, 1); } }
@keyframes am-raio { 0%, 86%, 89%, 93%, 100% { opacity: 0; } 87%, 91% { opacity: .55; } }
@keyframes am-cintila { 0%, 100% { opacity: 0; transform: scale(.4) rotate(0deg); } 45% { opacity: var(--t, 1); transform: scale(1) rotate(45deg); } }
@keyframes am-respira { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

/* Névoa Espessa: três bancos de névoa mais densos que a névoa de sempre */
.clima[data-clima="nevoa"] b { position: absolute; inset: -20%; animation: am-deriva 38s ease-in-out infinite alternate;
  background: radial-gradient(ellipse 45% 22% at 25% 65%, rgba(186,196,214,.16), transparent 70%), radial-gradient(ellipse 40% 18% at 78% 35%, rgba(186,196,214,.14), transparent 70%); }
.clima[data-clima="nevoa"] b:nth-child(2) { animation-duration: 52s; animation-direction: alternate-reverse; transform: translateY(12%); }
.clima[data-clima="nevoa"] b:nth-child(3) { animation-duration: 70s; background: radial-gradient(ellipse 60% 30% at 50% 90%, rgba(186,196,214,.18), transparent 70%); }
/* Lâminas Afiadas: tom avermelhado e relâmpagos ao longe, de vez em quando */
#tela-mesa.clima-laminas > .clima { background: radial-gradient(ellipse at 50% 40%, rgba(140,30,40,.05), rgba(110,18,28,.22)); }
.clima[data-clima="laminas"] .raio { position: absolute; inset: 0; opacity: 0; animation: am-raio 11s linear infinite;
  background: radial-gradient(ellipse 50% 35% at 82% 6%, rgba(255,214,214,.5), transparent 70%), radial-gradient(ellipse 30% 25% at 14% 10%, rgba(255,200,200,.25), transparent 70%); }
/* Silêncio Cósmico: estrelas que piscam (e o som abafado, em arte/som.js) */
#tela-mesa.clima-silencio > .clima { background: radial-gradient(ellipse at 50% 30%, rgba(60,50,120,.12), rgba(10,8,30,.25)); }
.clima[data-clima="silencio"] i { position: absolute; left: var(--x); top: var(--y); width: 2px; height: 2px; border-radius: 50%; background: #e9e4ff;
  box-shadow: 0 0 6px #b9adff; animation: am-pisca calc(3s + var(--t) * 3s) ease-in-out infinite; animation-delay: var(--d); }
/* Maré de Ouro: cintilação dourada pela mesa */
#tela-mesa.clima-mare > .clima { background: radial-gradient(ellipse at 50% 60%, rgba(230,190,90,.06), transparent 70%); }
.clima[data-clima="mare"] i { position: absolute; left: var(--x); top: var(--y); width: 9px; height: 9px; opacity: 0; animation: am-cintila calc(2.6s + var(--t) * 2s) ease-in-out infinite; animation-delay: var(--d);
  background: radial-gradient(circle, #fff3c9 0 1.5px, transparent 2px), linear-gradient(0deg, transparent 45%, rgba(240,207,134,.9) 50%, transparent 55%), linear-gradient(90deg, transparent 45%, rgba(240,207,134,.9) 50%, transparent 55%); }
/* Sol de Inverno: luz fria e branca vinda do alto */
.clima[data-clima="sol"] b { position: absolute; inset: 0; animation: am-respira 9s ease-in-out infinite;
  background: radial-gradient(ellipse 70% 45% at 50% -8%, rgba(200,226,255,.22), transparent 70%), linear-gradient(180deg, rgba(170,200,240,.07), rgba(120,150,200,.1)); }
/* Lua Cheia sobre a Névoa: o brilho da lua no alto */
.clima[data-clima="lua"] b { position: absolute; inset: 0; animation: am-respira 8s ease-in-out infinite;
  background: radial-gradient(circle at 88% 10%, rgba(240,236,220,.24) 0 3%, rgba(220,215,240,.1) 6%, transparent 22%); }

/* ---------- As quinas vivas: pequenas, por cima da arte e por baixo do nome ---------- */
@keyframes am-fumaca { 0% { opacity: 0; transform: translate(0, 0) scale(.5); } 20% { opacity: .55; } 100% { opacity: 0; transform: translate(14px, -60px) scale(1.8); } }
@keyframes am-escorre { 0% { opacity: 0; transform: translateY(-30%); } 30% { opacity: .7; } 100% { opacity: 0; transform: translateY(40%); } }
@keyframes am-vela { 0%, 100% { opacity: .75; transform: scale(1, 1); } 30% { opacity: 1; transform: scale(1.12, .92); } 55% { opacity: .65; transform: scale(.92, 1.08); } 80% { opacity: .95; } }
#tela-mesa .quina-viva { position: absolute; inset: 0; z-index: 1; pointer-events: none; overflow: hidden; border-radius: inherit; }
/* Backlund: fumaça subindo das chaminés */
#tela-mesa .quina-viva.backlund i { position: absolute; bottom: 52%; width: 22px; height: 22px; border-radius: 50%; filter: blur(5px);
  background: rgba(200,205,215,.6); animation: am-fumaca 5.5s ease-out infinite; }
#tela-mesa .quina-viva.backlund i:nth-child(1) { left: 22%; }
#tela-mesa .quina-viva.backlund i:nth-child(2) { left: 46%; animation-delay: -1.8s; }
#tela-mesa .quina-viva.backlund i:nth-child(3) { left: 70%; animation-delay: -3.6s; }
/* Névoa Cinzenta: névoa escorrendo de cima para baixo */
#tela-mesa .quina-viva.prata i { position: absolute; inset: 0 -10%; filter: blur(6px); animation: am-escorre 7s ease-in-out infinite;
  background: radial-gradient(ellipse 60% 30% at 50% 40%, rgba(214,218,228,.42), transparent 70%); }
#tela-mesa .quina-viva.prata i:nth-child(2) { animation-delay: -3.5s; background: radial-gradient(ellipse 50% 25% at 35% 55%, rgba(214,218,228,.35), transparent 70%); }
/* Tingen: moedas que cintilam */
#tela-mesa .quina-viva.tingen i { position: absolute; left: calc(15% + var(--x) * .7); top: calc(20% + var(--y) * .55); width: 10px; height: 10px; opacity: 0;
  animation: am-cintila calc(2.2s + var(--t) * 1.6s) ease-in-out infinite; animation-delay: var(--d);
  background: radial-gradient(circle, #fff6d6 0 1.5px, transparent 2px), linear-gradient(0deg, transparent 44%, #f0cf86 50%, transparent 56%), linear-gradient(90deg, transparent 44%, #f0cf86 50%, transparent 56%); }
/* Igreja da Meia-Noite: chamas de vela tremulando */
#tela-mesa .quina-viva.igreja i { position: absolute; bottom: 30%; width: 8px; height: 13px; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; transform-origin: bottom;
  background: radial-gradient(ellipse at 50% 70%, #fff4cf 0 25%, #f3b45a 55%, transparent 75%); box-shadow: 0 0 12px 4px rgba(243,180,90,.35); animation: am-vela 1.6s ease-in-out infinite; }
#tela-mesa .quina-viva.igreja i:nth-child(1) { left: 18%; } #tela-mesa .quina-viva.igreja i:nth-child(2) { left: 34%; animation-delay: -.5s; bottom: 26%; }
#tela-mesa .quina-viva.igreja i:nth-child(3) { right: 32%; animation-delay: -.9s; } #tela-mesa .quina-viva.igreja i:nth-child(4) { right: 16%; animation-delay: -1.3s; bottom: 27%; }
/* No celular, as quinas ficam com metade dos enfeites (leve) */
html.celular #tela-mesa .quina-viva.backlund i:nth-child(3), html.celular #tela-mesa .quina-viva.prata i:nth-child(2),
html.celular #tela-mesa .quina-viva.tingen i:nth-child(n+4), html.celular #tela-mesa .quina-viva.igreja i:nth-child(n+3) { display: none; }

/* ---------- A passagem do tempo: a vela da placa central ---------- */
@keyframes am-chama { 0%, 100% { transform: translateX(-50%) scale(1, 1); } 35% { transform: translateX(-52%) scale(1.08, .9); } 70% { transform: translateX(-48%) scale(.94, 1.1); } }
#tela-mesa .vela-tempo { position: absolute; left: 22px; bottom: 18px; z-index: 2; width: 22px; height: 86px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; pointer-events: auto; }
#tela-mesa .vela-tempo .cera { position: relative; width: 12px; height: calc(70px * var(--resta, 1)); border-radius: 3px 3px 1px 1px; transition: height 2.5s ease;
  background: linear-gradient(90deg, #cfc4ad, #f2ead8 45%, #b9ad94); box-shadow: inset 0 3px 2px rgba(255,255,255,.4); }
#tela-mesa .vela-tempo .pavio { position: absolute; left: 50%; top: -5px; width: 1.5px; height: 5px; background: #2a2018; transform: translateX(-50%); }
#tela-mesa .vela-tempo .chama { position: absolute; left: 50%; top: -19px; width: 9px; height: 15px; border-radius: 50% 50% 45% 45% / 65% 65% 35% 35%; transform-origin: bottom;
  background: radial-gradient(ellipse at 50% 72%, #fff7da 0 22%, #f6b552 55%, rgba(246,140,60,0) 78%); box-shadow: 0 0 16px 5px rgba(246,181,82,.35); animation: am-chama 1.4s ease-in-out infinite; }
#tela-mesa .vela-tempo .castical { width: 22px; height: 6px; border-radius: 2px; background: linear-gradient(#d8b97c, #7d6440); box-shadow: 0 2px 4px rgba(0,0,0,.6); }
#tela-mesa .vela-tempo.fim .chama { display: none; }
/* A vela é da mesa: some quando a placa central mostra outra coisa (a ficha de um jogador, o detalhe de uma casa, a mira ou uma cena) */
#tela-mesa .centro:is(.cordas-abertas, .mostrando, .mira-aberta, :has(.disputa-placa)) .vela-tempo { display: none; }
html.celular #tela-mesa .vela-tempo { bottom: auto; transform: translate(-50%, -50%) scale(.85); transform-origin: center; }

/* ---------- Detalhes por época ---------- */
@keyframes am-neve { from { transform: translate(0, -10vh); } to { transform: translate(4vw, 110vh); } }
@keyframes am-flutua { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
/* Halloween: abóboras na névoa, ao pé da mesa */
.epoca.halloween .abobora { position: absolute; bottom: 2.5vh; left: var(--x); width: 26px; height: 21px; border-radius: 48% 48% 44% 44%; opacity: .8;
  background: radial-gradient(circle at 34% 45%, #ffd27a 0 2.5px, transparent 3.5px), radial-gradient(circle at 66% 45%, #ffd27a 0 2.5px, transparent 3.5px),
    radial-gradient(ellipse 30% 12% at 50% 72%, #ffd27a 0 60%, transparent 70%), radial-gradient(ellipse at 40% 35%, #d77a2c, #8e3f12 75%);
  box-shadow: 0 0 14px rgba(255,160,60,.35); animation: am-flutua 4s ease-in-out infinite; animation-delay: var(--d); }
.epoca.halloween .abobora::before { content: ""; position: absolute; left: 50%; top: -5px; width: 3px; height: 6px; background: #4e5a2a; transform: translateX(-50%) rotate(8deg); border-radius: 1px; }
/* Natal: neve leve */
.epoca.natal i { position: absolute; left: var(--x); top: 0; width: calc(2px + var(--t) * 2.5px); height: calc(2px + var(--t) * 2.5px); border-radius: 50%; background: rgba(240,244,255,.8);
  animation: am-neve calc(9s + var(--t) * 8s) linear infinite; animation-delay: calc(var(--d) * 2); }
/* Ano Novo: brilhos dourados e prateados */
.epoca.anoNovo i { position: absolute; left: var(--x); top: var(--y); width: 12px; height: 12px; opacity: 0; animation: am-cintila calc(2.8s + var(--t) * 2s) ease-in-out infinite; animation-delay: var(--d);
  background: radial-gradient(circle, #fff 0 1.5px, transparent 2px), linear-gradient(0deg, transparent 45%, rgba(240,207,134,.95) 50%, transparent 55%), linear-gradient(90deg, transparent 45%, rgba(220,226,240,.95) 50%, transparent 55%); }

/* Reduzir movimento (do aparelho ou das opções): as camadas ficam paradas */
@media (prefers-reduced-motion: reduce) { #tela-mesa > .clima *, #tela-mesa .quina-viva *, #tela-mesa .vela-tempo *, .epoca * { animation: none !important; } .epoca.natal i { top: var(--y); } }
html.sem-animacoes .epoca.natal i { top: var(--y); }

/* ---------- A cortina do teatro (PRD 33.49, jogo/mesa.js cortina()) ---------- */
@keyframes am-cortina-esq { from { transform: translateX(0) skewX(0); } 60% { transform: translateX(-70%) skewX(4deg); } to { transform: translateX(-104%) skewX(0); } }
@keyframes am-cortina-dir { from { transform: translateX(0) skewX(0); } 60% { transform: translateX(70%) skewX(-4deg); } to { transform: translateX(104%) skewX(0); } }
@keyframes am-sanefa { from { transform: translateY(0); } to { transform: translateY(-110%); } }
#tela-mesa .tabuleiro > .cortina { position: absolute; inset: -14px; z-index: 30; pointer-events: none; overflow: hidden; border-radius: 8px; }
#tela-mesa .tabuleiro > .cortina .pano { position: absolute; top: 0; bottom: 0; width: 51%;
  background: linear-gradient(180deg, rgba(0,0,0,.25), transparent 18%, transparent 80%, rgba(0,0,0,.45)),
    repeating-linear-gradient(90deg, #4a0f1c 0 6px, #7e1a2c 22px, #a32a3c 30px, #7e1a2c 38px, #4a0f1c 56px);
  box-shadow: inset 0 0 60px rgba(0,0,0,.6); }
#tela-mesa .tabuleiro > .cortina .esq { left: 0; border-right: 3px solid #c2a066; transform-origin: left; }
#tela-mesa .tabuleiro > .cortina .dir { right: 0; border-left: 3px solid #c2a066; transform-origin: right; }
#tela-mesa .tabuleiro > .cortina .sanefa { position: absolute; left: 0; right: 0; top: 0; height: 64px;
  background: radial-gradient(ellipse 6% 100% at 50% 0, #c2a066 0 30%, transparent 32%) 0 100% / 12.5% 22px repeat-x,
    linear-gradient(180deg, #5c1222, #8e2234 70%, #5c1222); border-bottom: 2px solid #c2a066; box-shadow: 0 6px 18px rgba(0,0,0,.6); }
#tela-mesa .tabuleiro > .cortina.abrindo .esq { animation: am-cortina-esq var(--cortina-abre, 1.9s) cubic-bezier(.55,.05,.35,1) forwards; }
#tela-mesa .tabuleiro > .cortina.abrindo .dir { animation: am-cortina-dir var(--cortina-abre, 1.9s) cubic-bezier(.55,.05,.35,1) forwards; }
#tela-mesa .tabuleiro > .cortina.abrindo .sanefa { animation: am-sanefa calc(var(--cortina-abre, 1.9s) * .37) ease-in calc(var(--cortina-abre, 1.9s) * .79) forwards; }
/* Na vitória, fecha por trás da placa central, que fica à frente com o resumo */
#tela-mesa .tabuleiro > .cortina.atras { z-index: 8; }
#tela-mesa .tabuleiro:has(> .cortina.atras) > .centro { z-index: 9; }
#tela-mesa .tabuleiro > .cortina.fechando .esq { animation: am-cortina-esq var(--cortina-fecha, 1.6s) cubic-bezier(.55,.05,.35,1) reverse both; }
#tela-mesa .tabuleiro > .cortina.fechando .dir { animation: am-cortina-dir var(--cortina-fecha, 1.6s) cubic-bezier(.55,.05,.35,1) reverse both; }
#tela-mesa .tabuleiro > .cortina.fechando .sanefa { animation: am-sanefa calc(var(--cortina-fecha, 1.6s) * .37) ease-out reverse both; }

/* ---------- As vozes da mesa (PRD 33.50, jogo/falas.js) ---------- */
@keyframes am-narra { 0% { opacity: 0; transform: translateY(6px); } 12%, 82% { opacity: 1; transform: none; } 100% { opacity: 0; } }
@keyframes am-balao { 0% { opacity: 0; transform: translate(-50%, -88%) scale(.85); } 10%, 85% { opacity: 1; transform: translate(-50%, -100%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -106%); } }
/* O narrador: uma legenda em itálico no alto da placa central */
#tela-mesa .centro > .narrador { position: absolute; left: 60px; right: 340px; top: 12px; z-index: 3; pointer-events: none; text-align: center; opacity: 0;
  font: italic 17px/1.35 Literata, Georgia, serif; color: #f3e6c4; text-shadow: 0 1px 6px #000, 0 0 14px rgba(0,0,0,.9); }
#tela-mesa .centro > .narrador.diz { animation: am-narra 4.2s ease forwards; }
html.celular #tela-mesa .centro > .narrador { left: 30px; right: 30px; top: 18px; font-size: 34px; }
/* O balão da fala, sobre o peão do bot, na cor dele */
.balao-fala { position: fixed; z-index: 870; pointer-events: none; width: max-content; max-width: min(220px, calc(100vw - 16px)); padding: 7px 11px 8px; border-radius: 8px; transform: translate(-50%, -100%);
  font: italic 14px/1.3 Literata, Georgia, serif; color: #f3ead6; background: rgba(14,12,20,.95); border: 1px solid var(--cor, #c2a066);
  box-shadow: 0 6px 18px rgba(0,0,0,.7), 0 0 12px color-mix(in srgb, var(--cor, #c2a066) 35%, transparent); animation: am-balao 3.2s ease forwards; margin-top: -10px; }
.balao-fala small { display: block; margin-bottom: 2px; font: 700 9px Cinzel, serif; letter-spacing: .12em; font-style: normal; color: var(--cor, #c2a066); text-transform: uppercase; }
.balao-fala::after { content: ""; position: absolute; left: calc(50% + var(--seta, 0px)); bottom: -6px; width: 10px; height: 10px; background: inherit; border: inherit; border-top: 0; border-left: 0; transform: translateX(-50%) rotate(45deg); }
.balao-fala.rival { border-color: #e0727a; box-shadow: 0 6px 18px rgba(0,0,0,.7), 0 0 16px rgba(224,114,122,.5); }
/* O rival: o selo na ficha, ao lado do BOT */
#tela-mesa .selo-rival { display: inline-block; margin-left: 5px; padding: 0 5px; border-radius: 3px; vertical-align: 1px; font: 700 8.5px/1.6 Cinzel, serif; letter-spacing: .1em;
  color: #fde6e6; background: linear-gradient(#b8404c, #7e2430); border: 1px solid #4a1419; }
/* O temperamento do bot, no painel da carta */
#tela-mesa .carta-jogador .cj-jeito { margin: 4px 0 0; font-size: 13px; color: #cfc6b2; }
#tela-mesa .carta-jogador .cj-jeito b { color: var(--latao); font-weight: 700; }
html.celular #tela-mesa .carta-jogador .cj-jeito { font-size: 24px; }

/* ---------- Todas as jogadas da partida (PRD 33.52) ---------- */
#tela-mesa .registro h3 { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
#tela-mesa .registro .ver-todas { font: 700 9.5px Cinzel, serif; letter-spacing: .14em; padding: 3px 8px; border-radius: 3px; cursor: pointer; color: var(--latao); background: transparent; border: 1px solid rgba(194,160,102,.45); }
#tela-mesa .registro .ver-todas:hover { color: #f3ead6; border-color: var(--latao); }
html.celular #tela-mesa .registro .ver-todas { font-size: 20px; padding: 6px 14px; }
#tela-mesa .modal-caixa.registro-inteiro { display: block; width: min(760px, 94vw); padding: 30px 34px 24px; }
#tela-mesa .registro-inteiro .ri h4 { margin: 0 0 12px; text-align: center; }
#tela-mesa .ri-filtro { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
#tela-mesa .ri-filtro button { font: 700 10.5px Cinzel, serif; letter-spacing: .08em; padding: 6px 10px; border-radius: 3px; cursor: pointer; color: #cfc6b2; background: transparent; border: 1px solid var(--c, #3a4150); }
#tela-mesa .ri-filtro button[aria-pressed="true"] { color: #1a140b; background: var(--c, #c2a066); border-color: var(--c, #c2a066); }
#tela-mesa .ri-lista { max-height: 62vh; overflow-y: auto; padding-right: 8px; font-size: 15px; line-height: 1.45; color: #d9d4c7; }
#tela-mesa .ri-lista h5 { position: sticky; top: 0; margin: 10px 0 4px; padding: 4px 0; font: 700 11px Cinzel, serif; letter-spacing: .2em; color: var(--latao); background: #1a1720; border-bottom: 1px solid rgba(194,160,102,.25); }
#tela-mesa .ri-lista p { margin: 3px 0; }
#tela-mesa .ri-nota { display: block; margin-top: 10px; text-align: center; color: #8e8a80; }
html.celular #tela-mesa .modal-caixa.registro-inteiro { width: 100vw; padding: 24px 16px; }

/* ---------- Os acabamentos do peão (PRD 33.53, jogo/temas.js PEOES): a borda continua na cor do jogador ---------- */
.peao-amostra { display: grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; border: 4px solid var(--cor); color: #f6ecd6;
  background: radial-gradient(circle at 35% 30%, color-mix(in srgb, var(--cor) 55%, #2a2433), color-mix(in srgb, var(--cor) 22%, #0b0d12) 70%);
  box-shadow: 0 0 0 2px #0b0d12, 0 5px 10px rgba(0,0,0,.8), inset 0 1px 2px rgba(255,255,255,.35), inset 0 -3px 6px rgba(0,0,0,.5); }
.peao-amostra .simbolo { width: 30px; height: 30px; }
.tm-peao { position: relative; display: grid; place-items: center; height: 90px; }
#tela-mesa .peao[data-peao="prata"], .peao-amostra[data-peao="prata"] { color: #2b2f36;
  background: radial-gradient(circle at 32% 26%, #ffffff, #d5dae2 30%, #8a9099 70%, #4d525a); }
#tela-mesa .peao[data-peao="prata"] .simbolo, .peao-amostra[data-peao="prata"] .simbolo { filter: drop-shadow(0 1px 0 rgba(255,255,255,.6)); }
#tela-mesa .peao[data-peao="vitral"], .peao-amostra[data-peao="vitral"] { color: #fff6d6;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), transparent 35%),
    conic-gradient(from 20deg, #7a3fb8 0 60deg, #1c1a22 60deg 64deg, #2bb3b1 64deg 150deg, #1c1a22 150deg 154deg, #e6c47e 154deg 230deg, #1c1a22 230deg 234deg, #b8404c 234deg 316deg, #1c1a22 316deg 320deg, #7a3fb8 320deg); }
#tela-mesa .peao[data-peao="ebano"], .peao-amostra[data-peao="ebano"] { color: #e6c47e;
  background: radial-gradient(circle at 35% 28%, rgba(255,240,210,.22), transparent 40%),
    repeating-linear-gradient(105deg, #1a120c 0 3px, #2a1d14 3px 5px, #140d08 5px 8px), #1a120c; }

/* ---------- Temas das quinas (PRD 33.54): fora do Original, a arte entra sem o filtro de cor e no recorte do tema ---------- */
#tela-mesa .casa.quina.sem-filtro .arte, #tela-mesa .quadro-quina.sem-filtro, .quadro-quina.sem-filtro, .quina-regra .gravura.sem-filtro { filter: none !important; background-size: cover !important; }
/* 33.79: o .tm-item centraliza os filhos (justify-items), e a grade de quadradinhos vazios encolhia a quase zero; ocupa a largura do item */
.tm-quinas { width: 100%; justify-self: stretch; display: grid; grid-template-columns: repeat(4, 1fr); gap: 3px; height: 90px; position: relative; }
.tm-quinas i { border-radius: 3px; background: var(--img) center / cover no-repeat, #1c1a22; }
.tm-quinas.com-filtro i:nth-child(1) { filter: sepia(.35) brightness(.85) contrast(1.15); }
.tm-quinas.com-filtro i:nth-child(2) { filter: grayscale(1) brightness(.85) contrast(1.15) sepia(.1) hue-rotate(180deg); }
.tm-quinas.com-filtro i:nth-child(3) { filter: sepia(.7) saturate(1.3) brightness(.62) contrast(1.3); }
.tm-quinas.com-filtro i:nth-child(4) { filter: sepia(.2) saturate(.6) brightness(.6) contrast(1.2) hue-rotate(200deg); }
.tm-item:not(.livre) .tm-quinas i { filter: grayscale(1) brightness(.4); } /* bloqueado: apagado, como as cartas e os versos */
/* 33.61: sem espaço acima do peão, o balão abre embaixo dele, com a ponta para cima */
@keyframes am-balao-abaixo { 0% { opacity: 0; transform: translate(-50%, 0) scale(.85); } 10%, 85% { opacity: 1; transform: translate(-50%, 10px) scale(1); } 100% { opacity: 0; transform: translate(-50%, 16px); } }
.balao-fala.abaixo { margin-top: 0; animation-name: am-balao-abaixo; }
.balao-fala.abaixo::after { bottom: auto; top: -6px; transform: translateX(-50%) rotate(225deg); }

/* ---------- Segurar para ver (PRD 33.64): o resumo da casa ou da ficha no celular ---------- */
.resumo-toque { position: fixed; z-index: 880; max-width: min(260px, calc(100vw - 16px)); padding: 9px 12px; border-radius: 8px; pointer-events: none;
  font: 14px/1.35 Literata, Georgia, serif; color: #e9e2cf; background: rgba(14,12,20,.96); border: 1px solid #c2a066; box-shadow: 0 8px 22px rgba(0,0,0,.75); }
.resumo-toque[hidden] { display: none; }
.resumo-toque b { display: block; font: 700 13px Cinzel, serif; letter-spacing: .04em; color: #f3ead6; margin-bottom: 3px; }
.resumo-toque span { display: block; margin-top: 2px; }
.resumo-toque .nums, .resumo-toque span { white-space: normal; }
.resumo-toque svg { width: 13px; height: 13px; vertical-align: -2px; margin-right: 2px; }
.resumo-toque .arm { color: #c7a4f0; }
.resumo-toque i { font-style: normal; font-weight: 700; }
html.celular #tela-mesa .casa, html.celular #tela-mesa .jogador { -webkit-touch-callout: none; user-select: none; }

/* ---------- A disputa decisiva (PRD 33.64): a mesa escurece em volta da placa enquanto os dados giram ---------- */

#tela-mesa.decisiva .tabuleiro > .casa { filter: brightness(.38) saturate(.5); transition: filter .8s ease; }
#tela-mesa.decisiva .jogador:not(.ativo) { filter: brightness(.6); transition: filter .8s ease; }
