/* ===== Dominó (Atividade aberta numa call) =====
   Herda o topo, os botões, o saguão e as folhas do Império. O que é só daqui: a mesa
   de torneio, com tampo de couro e moldura de nogueira, e as pedras de marfim com
   pino de latão. Você fica sempre embaixo. */
.domino { position: fixed; inset: 0; z-index: 4; overflow: hidden; color: var(--im-marfim); background: #050b12; }
.domino.em-partida .im-saguao { display: none; }
.do-fundo { position: absolute; inset: 0; pointer-events: none;
  background: repeating-linear-gradient(90deg, rgba(230, 195, 106, .022) 0 1px, transparent 1px 58px), radial-gradient(120% 70% at 50% 30%, #12283a, #070f18 62%, #04080d); }
.do-luz { position: absolute; inset: 0; background: radial-gradient(64% 40% at 50% 44%, rgba(255, 226, 170, .2), transparent 74%); }
.do-palco { position: absolute; inset: calc(var(--im-pad) + 58px) max(8px, var(--in-right, 0px)) max(8px, var(--in-bottom, 0px)) max(8px, var(--in-left, 0px));
  display: grid; gap: 8px; grid-template-rows: auto minmax(0, 1fr) auto auto; }
.domino:not(.em-partida) .do-palco { grid-template-rows: minmax(0, 1fr); bottom: 44%; }
body[data-layout="pc"] .domino:not(.em-partida) .do-palco { left: 14px; right: 14px; bottom: 372px; }
.domino:not(.em-partida) :is(.do-placar, .do-mao, .do-acao) { display: none; }

/* ----- placar ----- */
.do-placar { position: relative; z-index: 3; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 2px 18px; padding: 6px 14px 7px; border-radius: 16px;
  border: 1px solid rgba(230, 195, 106, .36); background: linear-gradient(180deg, rgba(20, 34, 48, .94), rgba(6, 12, 19, .96)); box-shadow: inset 0 1px 0 rgba(255, 240, 200, .12), 0 10px 22px -14px #000; }
.do-time { display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline; min-width: 0; }
.do-time small { max-width: 72px; font-size: 11px; letter-spacing: .03em; color: var(--im-cinza); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.do-time b { font: 400 27px/1 var(--im-deco); color: var(--im-ouro-claro); }
.do-time.meu small { color: var(--im-ouro-claro); }
.do-luzes { grid-column: 1 / -1; display: flex; gap: 3px; margin-top: 3px; }
.do-luzes i { width: 7px; height: 7px; border-radius: 50%; background: rgba(244, 236, 216, .12); box-shadow: inset 0 0 0 1px rgba(230, 195, 106, .34); }
.do-luzes i.on { background: radial-gradient(circle at 38% 32%, #fff3c4, var(--im-ouro)); box-shadow: 0 0 6px var(--im-ouro); }
.do-alvo-txt { display: grid; justify-items: center; line-height: 1.05; padding-left: 14px; border-left: 1px solid var(--im-linha); }
.do-alvo-txt small { font-size: 10px; color: var(--im-cinza); white-space: nowrap; }
.do-alvo-txt b { font: 800 15px var(--im-sans); }
.do-perigo { flex-basis: 100%; text-align: center; font-size: 11.5px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: #ff8f7a; animation: do-alerta 1.3s ease-in-out infinite; }
@keyframes do-alerta { 50% { opacity: .55; } }

/* ----- mesa ----- */
.do-mesa { position: relative; min-height: 0; }
/* A mesa e as pedras são um plano só, inclinado de uma vez. Com um contexto 3D de
   verdade, o navegador ordena pedra por pedra e deixa de pintar algumas. */
.do-mundo { position: absolute; inset: 0; }
body:not(.leve) .do-mesa { perspective: 1100px; perspective-origin: 50% 18%; }
body:not(.leve) .do-mundo { transform: rotateX(24deg); }
/* Moldura de nogueira com filete de latão; dentro, couro azul-petróleo. */
.do-tampo { position: absolute; inset: 1% 3% 3%; border-radius: 26px; border: 11px solid transparent;
  background: repeating-linear-gradient(47deg, rgba(255, 255, 255, .011) 0 1px, transparent 1px 3px), radial-gradient(74% 62% at 50% 42%, #1e5266 0%, #123a4c 52%, #0a2433 100%) padding-box,
    linear-gradient(135deg, #5a361e, #2d170b 48%, #4c2c17) border-box;
  box-shadow: 0 0 0 1.5px rgba(230, 195, 106, .55), inset 0 0 0 1.5px rgba(230, 195, 106, .55), inset 0 0 58px rgba(0, 8, 14, .7), 0 26px 40px -12px #000; }
body:not(.leve) .do-tampo { box-shadow: 0 0 0 1.5px rgba(230, 195, 106, .55), inset 0 0 0 1.5px rgba(230, 195, 106, .55), inset 0 0 58px rgba(0, 8, 14, .7), 0 7px 0 #3a2011, 0 13px 0 #1d0f07, 0 42px 46px -6px #000; }
.do-tampo::before { content: ""; position: absolute; inset: 9px; border-radius: 15px; border: 1px solid rgba(230, 195, 106, .2); }
body:not(.leve) .do-tampo::after { content: ""; position: absolute; left: 12%; right: 12%; top: 5%; height: 40%; border-radius: 50%; background: radial-gradient(closest-side, rgba(255, 236, 196, .13), transparent); }
.do-emblema { position: absolute; left: 50%; top: 50%; width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%) rotate(45deg); border: 1.5px solid rgba(230, 195, 106, .12); border-radius: 14%; }
.do-camera { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transition: transform .5s cubic-bezier(.3,.7,.2,1); }
#do-cadeia, #do-alvos { position: absolute; left: 0; top: 0; width: 0; height: 0; }
#do-alvos { z-index: 950; }

/* ----- pedras ----- */
.do-pedra { position: relative; width: 44px; height: 88px; flex: none; border-radius: 8px;
  background: linear-gradient(145deg, #fffdf4 0%, #f3ebd8 44%, #dccfb1 100%);
  box-shadow: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 96, 54, .32), inset 0 -3px 5px rgba(120, 96, 54, .26), 0 7px 11px -5px rgba(0, 0, 0, .85); }
.do-pedra svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.do-pedra.verso { width: 16px; height: 32px; border-radius: 3px; background: linear-gradient(145deg, #27425a, #0e1e2d); box-shadow: inset 0 0 0 1px rgba(230, 195, 106, .6); }
.ba-voos .do-pedra { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) scale(0); }
.do-pedra.na-mesa { position: absolute; left: -13px; top: -26px; width: 26px; height: 52px; border-radius: 5px; transition: transform .5s cubic-bezier(.3,.7,.2,1), box-shadow .3s;
  --borda: inset 0 1px 0 #fff, inset 0 0 0 1px rgba(120, 96, 54, .34);
  --lado: var(--ex, 0px) var(--ey, 2px) 0 #b5a57e, calc(var(--ex, 0px) * 2) calc(var(--ey, 2px) * 2) 0 #6f6042, calc(var(--ex, 0px) * 3) calc(var(--ey, 2px) * 3) 3px rgba(0, 0, 0, .55);
  box-shadow: var(--borda), var(--lado); }
.do-pedra.na-mesa.ultima { box-shadow: var(--borda), var(--lado), 0 0 0 1.5px var(--im-ouro), 0 0 14px 1px rgba(230, 195, 106, .75); }
.do-pedra.miuda { width: 13px; height: 26px; border-radius: 2.5px; box-shadow: inset 0 0 0 .5px rgba(120, 96, 54, .5); }
.do-mao { position: relative; z-index: 3; display: flex; justify-content: center; align-items: flex-end; gap: 4px; min-height: 104px; padding-top: 12px; }
.do-pedra.grande { width: min(44px, calc((100vw - 34px) / var(--n, 7) - 4px)); height: auto; aspect-ratio: 1 / 2; transition: transform .13s ease, box-shadow .13s ease, filter .13s; }
.do-pedra.jogavel { cursor: grab; touch-action: none; box-shadow: inset 0 1px 0 #fff, 0 0 0 2px var(--im-ouro), 0 0 15px -2px var(--im-ouro); }
.do-pedra.apagada { filter: brightness(.48) saturate(.7); }
.do-pedra.escolhida { transform: translateY(-12px); box-shadow: inset 0 1px 0 #fff, 0 0 0 3px var(--im-ouro-claro), 0 0 22px -1px var(--im-ouro); }
.do-pedra.levada { visibility: hidden; }
.do-pedra.do-arrastando { position: fixed; z-index: 30; width: 52px; height: 104px; margin: -52px 0 0 -26px; pointer-events: none; transform: rotate(-4deg) scale(1.04); box-shadow: 0 0 0 2px var(--im-ouro-claro), 0 22px 28px -8px #000; }
.do-pedra.chega { animation: tr-chega .32s cubic-bezier(.2,.8,.3,1) both; animation-delay: calc(var(--i, 0) * .09s + var(--espera, 0s)); }
.do-acao { background: linear-gradient(180deg, rgba(20, 34, 48, .94), rgba(6, 12, 19, .96)); }

/* ----- as pontas: a pedra aparece transparente onde vai cair ----- */
.do-alvo { position: absolute; left: -13px; top: -26px; width: 26px; height: 52px; padding: 0; border: 0; background: none; cursor: pointer; }
.do-alvo::before { content: ""; position: absolute; inset: -12px; }
.do-pedra.fantasma { width: 26px; height: 52px; border-radius: 5px; opacity: .72; box-shadow: 0 0 0 2px var(--im-ouro-claro), 0 0 18px 2px var(--im-ouro); animation: do-fantasma 1s ease-in-out infinite; }
@keyframes do-fantasma { 50% { opacity: .38; } }

/* ----- lugares ----- */
.do-lugar { position: absolute; z-index: 2; display: flex; align-items: center; gap: 7px; max-width: 150px; padding: 3px 11px 3px 3px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(18, 30, 42, .95), rgba(6, 12, 18, .95)); box-shadow: 0 0 0 1px rgba(230, 195, 106, .3), 0 8px 14px -8px #000; }
.do-rosto { position: relative; display: block; flex: none; width: 34px; height: 34px; }
.do-rosto .ava { width: 34px; height: 34px; font-size: 12px; box-shadow: 0 0 0 1.5px rgba(244, 236, 216, .3); }
.do-anel { position: absolute; inset: -4px; width: 42px; height: 42px; transform: rotate(-90deg); fill: none; stroke: var(--im-ouro-claro); stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(0 0 3px var(--im-ouro)); }
.do-anel circle { stroke-dasharray: 100; animation: do-anel linear both; }
@keyframes do-anel { to { stroke-dashoffset: 100; stroke: #ff6b57; } }
.do-lugar.vez { box-shadow: 0 0 0 1.5px var(--im-ouro), 0 0 20px -2px var(--im-ouro); }
.do-lugar.fora { opacity: .55; filter: grayscale(.9); }
.do-lugar.lado-A .do-rosto .ava { box-shadow: 0 0 0 2px #f2b06a; }
.do-lugar.lado-B .do-rosto .ava { box-shadow: 0 0 0 2px #74beff; }
.do-conta { display: flex; flex-wrap: wrap; gap: 1.5px; margin-top: 2px; }
.do-conta i { width: 5px; height: 9px; border-radius: 1px; background: linear-gradient(145deg, #fffdf4, #cfc3a4); }
.do-lugar.t { top: 6px; left: 50%; transform: translateX(-50%); }
.do-lugar.b { bottom: 4px; left: 50%; transform: translateX(-50%); }
.do-lugar:is(.l, .r) { top: 42%; flex-direction: column; border-radius: 15px; padding: 6px; max-width: 70px; text-align: center; }
.do-lugar.l { left: 4px; }
.do-lugar.r { right: 4px; }
.do-lugar:is(.l, .r) .ba-nome { justify-items: center; }
.do-lugar:is(.l, .r) .ba-nome b { max-width: 58px; }
.do-lugar:is(.l, .r) .do-conta { justify-content: center; max-width: 54px; }
.do-aberta { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 94px; }
.do-grito.im-faixa > b { color: var(--im-ouro-claro); font-size: clamp(38px, 11.5vw, 80px); letter-spacing: .02em; }
.im-faixa.do-buchuda .im-vit-nome { font-size: clamp(38px, 11vw, 72px); color: #ffcf6e; text-shadow: 0 0 24px rgba(255, 170, 60, .8); }
#do-aviso { bottom: auto; top: 46%; z-index: 6; }
/* No PC a mesa fica no meio da tela, com a mão e a ação embaixo dela. */
body[data-layout="pc"] .domino.em-partida .do-palco { left: 14px; right: 14px; bottom: 12px; }
body[data-layout="pc"] .do-mesa { width: min(100%, 1180px); justify-self: center; }
body[data-layout="pc"] .do-lugar { zoom: 1.35; }
body[data-layout="pc"] .do-acao { width: min(100%, 680px); justify-self: center; }
body[data-layout="pc"] .do-placar { width: min(100%, 680px); justify-self: center; }
