/* Zovy Truco — mesa de feltro no visual "figurinha" do Zovy. A base (botões, cartões, sala de espera, modal, avisos) é a mesma dos outros jogos ao vivo (Impostor/Stop);
   o que é só do Truco (mesa, cartas, placar, pedidos) vem depois. Funciona no celular em pé, deitado (tela baixa) e no computador. */
:root { --ink: #1E1338; --violet: #7C4DFF; --lime: #C6F432; --pink: #FF4FA3; --cyan: #2EE6FF; --gold: #FFB800; --orange: #FF8A3D; --red: #FF3B5C; --soft: #cdbfff;
  --paper: #FFFBF0; --line: #BFD7FF; --margin: #FF8DA8;
  --disp: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; --hand: "Patrick Hand", "Comic Sans MS", cursive; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--ink); }
body { font: 600 16px/1.35 var(--ui); color: #fff; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
#app { position: fixed; inset: 0; overflow: hidden;
  background: radial-gradient(circle at 88% 0, rgb(198 244 50 / .16), transparent 42%), radial-gradient(circle at 0 100%, rgb(255 79 163 / .28), transparent 46%), linear-gradient(165deg, #3a2290 0%, #241257 55%, var(--ink) 100%); }
#app::before { content: ""; position: absolute; inset: 0; opacity: .4; pointer-events: none; background: radial-gradient(rgb(255 255 255 / .2) 1.3px, transparent 1.5px) 0 0 / 22px 22px; }
.screen { position: absolute; inset: 0; display: none; flex-direction: column; padding: max(10px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(10px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left)); }
.screen.on { display: flex; animation: screenIn .32s cubic-bezier(.2, .9, .3, 1.2); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }

/* letras flutuando no fundo */
.bg-suits { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-suits span { position: absolute; bottom: -80px; font: 800 var(--s, 48px)/1 var(--disp); color: rgb(255 255 255 / .07); animation: floatUp var(--d, 18s) linear infinite; animation-delay: var(--w, 0s); }
@keyframes floatUp { to { transform: translateY(-120vh) rotate(var(--r, 40deg)); } }

/* ---------- botões e peças básicas ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 16px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); font: 800 16px/1.1 var(--ui); transition: transform .12s, box-shadow .12s, filter .12s; }
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.btn:focus-visible, .icon-btn:focus-visible, .mini-btn:focus-visible, .stop-btn:focus-visible, .chip:focus-visible, .vote-btn:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.btn.lime { background: var(--lime); } .btn.pink { background: var(--pink); color: #fff; } .btn.violet { background: var(--violet); color: #fff; }
.btn.small { padding: 8px 12px; font-size: 14px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn.big { display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center; text-align: left; padding: 12px 16px; }
.btn.big .ico { grid-row: 1 / 3; display: grid; place-items: center; width: 44px; height: 44px; background: rgb(255 255 255 / .6); border: 3px solid var(--ink); border-radius: 50%; font-size: 18px; }
.btn.big .t { font: 800 21px/1.1 var(--disp); }
.btn.big small { font: 700 13px/1.2 var(--ui); opacity: .8; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); font: 800 18px/1 var(--ui); }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.mini-btn { padding: 4px 10px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1.3 var(--ui); }
.mini-btn[aria-pressed="true"] { background: var(--pink); color: #fff; }
.card { background: #fff; color: var(--ink); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); padding: 14px; }
.card h2, .card h3 { margin: 0; font: 800 20px/1.1 var(--disp); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.card-head small { color: #6b5f8f; font-size: 12px; }
.pill { display: inline-block; padding: 2px 10px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1.4 var(--ui); white-space: nowrap; vertical-align: middle; }
.pill.violet { background: var(--violet); color: #fff; } .pill.pink { background: var(--pink); color: #fff; } .pill.gold { background: var(--gold); }
input[type=text], input:not([type]) { width: 100%; min-width: 0; padding: 11px 14px; color: var(--ink); background: #F4F0FF; border: 3px solid var(--ink); border-radius: 14px; font: 700 16px/1.2 var(--ui); outline: none; }
input:focus { background: #fff; box-shadow: 0 0 0 3px var(--cyan); }
.dots { display: inline-flex; gap: 4px; vertical-align: middle; }
.dots i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: dot 1s infinite; } .dots i:nth-child(2) { animation-delay: .15s; } .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dot { 50% { transform: translateY(-5px); opacity: .5; } }
.wait { padding: 12px; text-align: center; color: #e6dcff; font-weight: 700; }

/* ---------- menu ---------- */
.top { display: flex; align-items: center; gap: 10px; flex: none; position: relative; z-index: 1; }
.logo { height: 32px; width: auto; }
.chip-orig { padding: 3px 12px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); font: 800 12px/1.3 var(--ui); letter-spacing: .1em; }
.top .icon-btn { margin-left: auto; }
#menu { overflow-y: auto; }
.menu-body { position: relative; flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 14px; width: 100%; max-width: 980px; margin: 0 auto; padding: 10px 0; }
.hero { text-align: center; }
.hero-sign { display: inline-flex; align-items: flex-end; gap: clamp(4px, 1.2vw, 10px); }
.hero-sign span, .hero-sign b { display: grid; place-items: center; width: clamp(54px, 15vw, 96px); height: clamp(62px, 17vw, 110px); color: var(--ink); background: var(--lime); border: 4px solid var(--ink); border-radius: 18px; box-shadow: 0 7px 0 var(--ink); font: 800 clamp(40px, 11vw, 74px)/1 var(--disp);
  animation: signIn .7s cubic-bezier(.2, 1.6, .4, 1) backwards, wobble 4s ease-in-out infinite; }
.hero-sign span:nth-child(1) { --rot: -6deg; background: var(--lime); animation-delay: 0s, .2s; }
.hero-sign span:nth-child(2) { --rot: 4deg; background: var(--cyan); animation-delay: .08s, .6s; }
.hero-sign span:nth-child(3) { --rot: -3deg; background: var(--gold); animation-delay: .16s, 1s; }
.hero-sign span:nth-child(4) { --rot: 6deg; background: #fff; animation-delay: .24s, 1.4s; }
.hero-sign b { --rot: -8deg; width: auto; padding: 0 10px; background: var(--red); color: #fff; animation-delay: .4s, 1.8s; }
@keyframes signIn { from { opacity: 0; transform: translateY(-60px) rotate(30deg) scale(.4); } }
@keyframes wobble { 0%, 100% { transform: rotate(var(--rot)); } 50% { transform: rotate(calc(var(--rot) * -1)) translateY(-4px); } }
.tag { max-width: 520px; margin: 16px auto 0; color: #e6dcff; font-size: clamp(15px, 3.8vw, 18px); }
.tag b { color: var(--lime); }
.me-card { display: flex; align-items: center; gap: 14px; }
.av-big { position: relative; flex: none; width: 76px; height: 76px; padding: 0; background: #F4F0FF; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 4px 0 var(--ink); }
.av-big img { width: 100%; height: 100%; border-radius: 50%; }
.av-big .dice { position: absolute; right: -6px; bottom: -4px; display: grid; place-items: center; width: 30px; height: 30px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 50%; font-size: 16px; }
.av-big:active { transform: rotate(-12deg) scale(.95); }
.av-big.roll img { animation: roll .45s; } @keyframes roll { 40% { transform: scale(.6) rotate(-40deg); } }
.av-big[disabled] .dice { display: none; }
.me-fields { flex: 1; min-width: 0; display: grid; gap: 4px; }
.me-fields label, .join label { font: 800 13px/1 var(--ui); color: #6b5f8f; letter-spacing: .04em; text-transform: uppercase; }
.me-fields small { color: #6b5f8f; font-size: 12px; }
.me-fields .lvl { display: flex; align-items: center; gap: 8px; }
.menu-actions { display: grid; gap: 12px; }
.join-row { display: flex; gap: 8px; margin-top: 6px; }
#inpCode { text-transform: uppercase; letter-spacing: .35em; font: 800 22px/1 var(--disp); text-align: center; }
.menu-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.menu-row .btn { padding: 9px 6px; }
@media (min-width: 860px) {
  .menu-body { grid-template-columns: 1.1fr 1fr; align-items: center; column-gap: 34px; }
  .hero { grid-row: 1 / 3; }
}

/* ---------- barra de cima ---------- */
.bar { display: flex; align-items: center; gap: 10px; flex: none; margin-bottom: 10px; }
.bar-title { flex: 1; min-width: 0; display: grid; }
.bar-title small { color: var(--soft); font: 800 11px/1 var(--ui); letter-spacing: .12em; }
.bar-title b { font: 800 20px/1.1 var(--disp); }

/* ---------- sala de espera ---------- */
#lobby { overflow-y: auto; }
.lobby-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; width: 100%; max-width: 1100px; margin: 0 auto; }
.lobby-grid .col { display: grid; gap: 14px; align-content: start; min-width: 0; }
@media (min-width: 860px) { .lobby-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.code-card { text-align: center; background: var(--violet); color: #fff; }
.code-head { display: flex; align-items: center; justify-content: space-between; }
.code-head small { font: 800 12px/1 var(--ui); letter-spacing: .12em; opacity: .85; }
.code-tiles { display: flex; justify-content: center; gap: 10px; margin: 12px 0 14px; }
.code-tiles span { display: grid; place-items: center; width: clamp(54px, 16vw, 74px); height: clamp(62px, 18vw, 84px); color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 6px 0 var(--ink); font: 800 clamp(36px, 10vw, 52px)/1 var(--disp); animation: tileIn .5s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.code-tiles span:nth-child(2) { animation-delay: .07s; } .code-tiles span:nth-child(3) { animation-delay: .14s; } .code-tiles span:nth-child(4) { animation-delay: .21s; }
@keyframes tileIn { from { transform: scale(.2) rotate(-30deg); opacity: 0; } }
.code-tiles.hide span { color: transparent; text-shadow: 0 0 14px rgb(30 19 56 / .7); }
.code-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.invite { margin: 10px 0 0; font-size: 13px; opacity: .85; word-break: break-all; }
.invite.hide { filter: blur(6px); user-select: none; }
.players { display: grid; grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.players li { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px 8px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 16px; text-align: center; animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.players li.off { opacity: .45; }
.players li.me { background: #F2FCCF; }
.players img { width: 54px; height: 54px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.players b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.players .crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-8deg); }
.players .kick { position: absolute; top: 4px; right: 4px; display: grid; place-items: center; width: 24px; height: 24px; padding: 0; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 50%; font-size: 12px; }
.players .kick:hover { color: #fff; background: var(--red); }
.players .tagme { font-size: 11px; color: #6b5f8f; }
@keyframes pop { from { transform: scale(.5); opacity: 0; } }
.settings { display: grid; gap: 12px; }
.set-block { display: grid; gap: 6px; min-width: 0; }
.set-block > small { color: #6b5f8f; font: 800 12px/1 var(--ui); letter-spacing: .08em; }
.set-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; align-items: end; }
.packs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.packs button { display: grid; justify-items: center; gap: 2px; padding: 8px 4px; color: var(--ink); background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; font: 800 12px/1.1 var(--ui); }
.packs .pk-ic { display: grid; place-items: center; width: 30px; height: 30px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 10px; font-size: 17px; }
.packs button.on .pk-ic { background: var(--lime); }
.packs button.on { background: var(--gold); box-shadow: 0 3px 0 var(--ink); transform: translateY(-2px); }
.cats { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; color: #6b5f8f; background: #fff; border: 2px dashed #b9add9; border-radius: 99px; font: 700 14px/1.2 var(--ui); }
.chip.on { color: var(--ink); background: var(--lime); border: 2px solid var(--ink); }
.chip.custom.on { background: var(--cyan); }
.chip .x { font-size: 12px; opacity: .7; }
.cat-add { display: flex; gap: 6px; margin-top: 4px; }
.cat-add input { padding: 8px 12px; }
.seg { display: flex; padding: 3px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; }
.seg button { flex: 1; padding: 7px 4px; color: var(--ink); background: none; border: 0; border-radius: 10px; font: 800 14px/1 var(--ui); }
.seg button.on { background: var(--violet); color: #fff; }
.switch { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; cursor: pointer; }
.switch input { position: absolute; opacity: 0; }
.switch span { grid-row: 1 / 3; position: relative; width: 50px; height: 28px; background: #d9d1f2; border: 2px solid var(--ink); border-radius: 99px; transition: background .2s; }
.switch span::after { content: ""; position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; transition: transform .2s; }
.switch input:checked + span { background: var(--pink); } .switch input:checked + span::after { transform: translateX(22px); }
.switch input:focus-visible + span { outline: 3px solid var(--cyan); outline-offset: 2px; }
.switch b { font-size: 14px; } .switch small { color: #6b5f8f; font-size: 12px; }
.rules-view { display: grid; gap: 8px; }
.rules-view .cats .chip { pointer-events: none; }
.rv-row { display: flex; flex-wrap: wrap; gap: 6px; }
.start { width: 100%; }
.start .ico { animation: pulse 1.2s infinite; } @keyframes pulse { 50% { transform: scale(1.12); } }
/* ---------- final ---------- */
#final { overflow-y: auto; }
.final-wrap { width: 100%; max-width: 980px; margin: 0 auto; display: grid; gap: 14px; }
.final-title { margin: 6px 0 0; text-align: center; font: 800 clamp(32px, 8vw, 48px)/1 var(--disp); text-shadow: 0 4px 0 rgb(0 0 0 / .3); }
.podium { display: flex; align-items: flex-end; justify-content: center; gap: clamp(8px, 2vw, 18px); min-height: 260px; padding-top: 10px; }
.pod { display: grid; justify-items: center; gap: 6px; width: clamp(96px, 26vw, 170px); }
.pod img { width: clamp(64px, 16vw, 96px); height: clamp(64px, 16vw, 96px); background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 5px 0 var(--ink); animation: popUp .6s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.pod b { max-width: 100%; overflow: hidden; font: 800 16px/1.1 var(--ui); text-overflow: ellipsis; white-space: nowrap; }
.pod .step { display: grid; place-items: start center; width: 100%; padding-top: 10px; color: var(--ink); border: 3px solid var(--ink); border-bottom: 0; border-radius: 16px 16px 0 0; font: 800 34px/1 var(--disp); transform-origin: bottom; animation: rise .8s cubic-bezier(.2, 1.2, .4, 1) backwards; }
.pod .step small { display: block; font: 800 14px/1.4 var(--ui); }
.pod.p1 .step { height: 150px; background: var(--gold); animation-delay: .9s; } .pod.p1 img { animation-delay: 1.5s; width: clamp(76px, 19vw, 116px); height: clamp(76px, 19vw, 116px); }
.pod.p2 .step { height: 110px; background: #e3e8f5; animation-delay: .5s; } .pod.p2 img { animation-delay: 1.1s; }
.pod.p3 .step { height: 80px; background: #f3c49b; animation-delay: .1s; } .pod.p3 img { animation-delay: .7s; }
.pod.p1 .crown { animation: popUp .6s 1.8s cubic-bezier(.2, 1.6, .4, 1) backwards, wobble 3s 2.4s infinite; --rot: -6deg; }
@keyframes rise { from { transform: scaleY(0); } }
@keyframes popUp { from { transform: translateY(40px) scale(.3); opacity: 0; } }
.final-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 14px; }
@media (min-width: 760px) { .final-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.final-cols h3 { margin-bottom: 10px; }
.flist { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.flist li { display: grid; grid-template-columns: 30px 34px minmax(0, 1fr) auto; align-items: center; gap: 8px; padding: 6px 10px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; font-weight: 800; }
.flist li.me { background: #F2FCCF; }
.flist img { width: 34px; height: 34px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.flist span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.reward { display: grid; gap: 8px; min-height: 40px; }
.reward .xp-big { font: 800 40px/1 var(--disp); color: var(--violet); } .reward .xp-big small { font-size: 18px; }
.reward p { margin: 0; } .reward .soft { color: #6b5f8f; } .reward .gold { color: #b47a00; font-weight: 800; }
.reward .row-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.btn-mini { display: inline-block; padding: 6px 12px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 99px; font: 800 13px/1.2 var(--ui); text-decoration: none; }
.btn-mini.ghost { background: #fff; }
.final-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

/* ---------- efeitos ---------- */
.fx { position: absolute; inset: 0; z-index: 50; overflow: hidden; pointer-events: none; }
.float { position: absolute; bottom: 70px; display: grid; justify-items: center; animation: floatR 2.6s ease-out forwards; }
.float .fr { display: block; width: 58px; height: 58px; filter: drop-shadow(0 4px 0 rgb(0 0 0 / .3)); }
.float img { width: 26px; height: 26px; margin-top: -6px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
@keyframes floatR { 0% { transform: translateY(20px) scale(.3); opacity: 0; } 12% { transform: translateY(0) scale(1.15); opacity: 1; } 100% { transform: translate(var(--dx, 0), -60vh) scale(.9); opacity: 0; } }
.confetti { position: absolute; inset: 0; z-index: 55; width: 100%; height: 100%; pointer-events: none; }
.toasts { position: absolute; top: max(10px, env(safe-area-inset-top)); left: 50%; z-index: 85; display: grid; gap: 6px; width: min(92vw, 420px); transform: translateX(-50%); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 8px; padding: 9px 14px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); font-weight: 800; animation: toastIn .35s cubic-bezier(.2, 1.6, .4, 1); }
.toast img { width: 26px; height: 26px; border: 2px solid var(--ink); border-radius: 50%; }
.toast .t-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 50%; }
.toast.ic-alert .t-ic, .toast.ic-lock .t-ic, .toast.ic-exit .t-ic { color: #fff; background: var(--red); }
.toast.ic-crown .t-ic, .toast.ic-party .t-ic { background: var(--gold); }
.toast.out { opacity: 0; transform: translateY(-10px); transition: .3s; }
@keyframes toastIn { from { transform: translateY(-20px) scale(.9); opacity: 0; } }
.modal { position: absolute; inset: 0; z-index: 80; display: grid; place-items: center; padding: 16px; background: rgb(30 19 56 / .75); backdrop-filter: blur(3px); }
.modal-card { position: relative; width: min(100%, 520px); max-height: 88vh; overflow-y: auto; padding: 20px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); animation: pop .35s cubic-bezier(.2, 1.6, .4, 1); }
.modal-x { position: absolute; top: 10px; right: 10px; width: 36px; height: 36px; box-shadow: 0 3px 0 var(--ink); }
.modal-card h2 { margin: 0 40px 12px 0; font: 800 26px/1.1 var(--disp); }
.modal-card ol { padding-left: 20px; } .modal-card li { margin-bottom: 8px; }
.qr { display: grid; place-items: center; padding: 14px; background: #fff; border: 3px solid var(--ink); border-radius: 18px; }
.qr svg { width: min(70vw, 280px); height: auto; }
.top-list { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.top-list li { display: flex; align-items: center; gap: 8px; color: var(--ink); padding: 6px 10px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; font-weight: 800; }
.top-list img { width: 30px; height: 30px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.top-list b { margin-left: auto; }
.boot { position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; background: var(--ink); color: var(--soft); font-weight: 700; transition: opacity .3s; }
.boot.gone { opacity: 0; pointer-events: none; }
.boot .err { max-width: 420px; padding: 0 16px; text-align: center; color: #fff; }

/* ---------- ícones SVG (v1.76) ---------- */
.icon-btn .zi { width: 22px; height: 22px; }
.btn .zi { width: 1.1em; height: 1.1em; }
.btn.big .ico .zi { width: 20px; height: 20px; }
.mini-btn { display: inline-flex; align-items: center; gap: 5px; }
.modal-card h2 .zi, .final-title .zi { color: var(--gold); }
.final-title .zi { width: .9em; height: .9em; vertical-align: -.08em; }
.reward p .zi { width: 18px; height: 18px; vertical-align: -.25em; }
.boot .err .zi { color: var(--red); }
.pill .zi, .seg .zi { width: 14px; height: 14px; vertical-align: -.18em; }

/* =====================================================================
   Só do Truco
   ===================================================================== */
:root { --felt: #13804F; --felt2: #0B5E3A; --wood: #8A4B22; --wood2: #5E2F12; --redc: #E0193F; --us: var(--lime); --them: var(--pink);
  --cw: min(25vw, 112px); --tw: min(18vw, 84px); }
.bg-suits span { color: rgb(255 255 255 / .06); }
.bg-suits svg { width: var(--s, 48px); height: var(--s, 48px); display: block; }

/* ---------- menu ---------- */
.hero-cards { position: relative; height: clamp(150px, 34vw, 230px); margin: 0 auto -6px; width: min(100%, 420px); }
.hero-cards .cd { position: absolute; left: 50%; bottom: 0; --cw: clamp(84px, 20vw, 128px); transform-origin: 50% 120%; animation: fanIn .8s cubic-bezier(.2, 1.4, .4, 1) backwards; }
.hero-cards .cd:nth-child(1) { transform: translateX(-50%) rotate(-24deg); animation-delay: .05s; }
.hero-cards .cd:nth-child(2) { transform: translateX(-50%) rotate(-8deg); animation-delay: .15s; }
.hero-cards .cd:nth-child(3) { transform: translateX(-50%) rotate(8deg); animation-delay: .25s; }
.hero-cards .cd:nth-child(4) { transform: translateX(-50%) rotate(24deg); animation-delay: .35s; }
@keyframes fanIn { from { transform: translateX(-50%) translateY(60px) rotate(0) scale(.6); opacity: 0; } }
.hero-cards .cd:hover { filter: brightness(1.04); }
.hero-title { margin: 0; }
.hero-title b { display: inline-block; padding: 4px 22px 8px; color: #fff; background: var(--red); border: 4px solid var(--ink); border-radius: 20px; box-shadow: 0 8px 0 var(--ink);
  font: 800 clamp(52px, 15vw, 96px)/1 var(--disp); letter-spacing: -.02em; transform: rotate(-4deg); animation: stampIn .6s .5s cubic-bezier(.2, 1.8, .4, 1) backwards, wobble 4s 1.4s ease-in-out infinite; --rot: -4deg; }
@keyframes stampIn { from { transform: scale(2.4) rotate(12deg); opacity: 0; } }
@keyframes wobble { 0%, 100% { transform: rotate(var(--rot)); } 50% { transform: rotate(calc(var(--rot) * -1)) translateY(-4px); } }
.menu-actions .btn.big.pink small { opacity: .92; }

/* ---------- cartas ---------- */
.cd { position: relative; display: block; flex: none; width: var(--cw); height: calc(var(--cw) * 1.46); color: var(--ink); background: #FFFDF6; border: max(2px, calc(var(--cw) * .028)) solid var(--ink);
  border-radius: calc(var(--cw) * .12); box-shadow: 0 calc(var(--cw) * .04) 0 var(--ink); overflow: hidden; font-family: var(--disp); user-select: none; }
.cd.red { color: var(--redc); }
.cd .cr { position: absolute; top: 5%; left: 7%; display: grid; justify-items: center; line-height: .9; font-weight: 800; font-size: calc(var(--cw) * .27); }
.cd .cr svg { width: calc(var(--cw) * .2); height: calc(var(--cw) * .2); margin-top: 2px; }
.cd .cr.b { top: auto; left: auto; bottom: 5%; right: 7%; transform: rotate(180deg); }
.cd .cm { position: absolute; inset: 22% 18%; display: grid; place-items: center; }
.cd .cm > svg { width: 100%; height: auto; max-height: 100%; }
.cd .face { position: absolute; inset: 20% 17%; display: grid; place-items: center; border: max(1.5px, calc(var(--cw) * .02)) solid currentColor; border-radius: calc(var(--cw) * .08);
  background: repeating-linear-gradient(45deg, rgb(124 77 255 / .07) 0 6px, transparent 6px 12px); }
.cd .face b { font-size: calc(var(--cw) * .44); line-height: 1; }
.cd .face svg { position: absolute; width: 30%; }
.cd .face .ft { top: 6%; } .cd .face .fb { bottom: 6%; transform: rotate(180deg); }
.cd .face .crw { position: absolute; top: -2%; width: 46%; color: var(--gold); filter: drop-shadow(0 1px 0 var(--ink)); }
.cd.mani { background: linear-gradient(160deg, #FFF6D6, #FFE7A0); box-shadow: 0 calc(var(--cw) * .04) 0 var(--ink), 0 0 0 calc(var(--cw) * .03) var(--gold); }
.cd .tag-m { position: absolute; left: 50%; bottom: 3%; transform: translateX(-50%); padding: 1px 6px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 99px; font: 800 calc(var(--cw) * .1)/1.25 var(--ui); white-space: nowrap; letter-spacing: .04em; }
.cd .tag-m + .cr.b { display: none; }
.cd.back { background: var(--violet); border-color: var(--ink); }
.cd.back::before { content: ""; position: absolute; inset: 7%; border: max(1.5px, calc(var(--cw) * .02)) solid rgb(255 255 255 / .55); border-radius: calc(var(--cw) * .08);
  background: radial-gradient(circle at 50% 50%, var(--pink) 0 18%, transparent 19%), repeating-linear-gradient(45deg, rgb(255 255 255 / .16) 0 4px, transparent 4px 10px); }
.cd.back::after { content: "Z"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -54%); color: #fff; font: 800 calc(var(--cw) * .3)/1 var(--disp); text-shadow: 0 2px 0 var(--ink); }
.cd.blind::after { content: "?"; }

/* ---------- mesa ---------- */
#mesa { padding-bottom: max(6px, env(safe-area-inset-bottom)); gap: 6px; }
.hud { position: relative; z-index: 6; display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; align-items: center; gap: 8px; flex: none; }
.score { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 8px; align-items: center; min-width: 0; padding: 4px 10px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink); }
.score small { grid-column: 1; font: 800 11px/1 var(--ui); letter-spacing: .1em; padding: 2px 6px; background: var(--us); border: 2px solid var(--ink); border-radius: 99px; justify-self: start; }
.score.them small { background: var(--them); color: #fff; }
.score b { grid-row: 1 / 3; grid-column: 2; justify-self: end; font: 800 30px/1 var(--disp); }
.score b.bump { animation: bump .6s cubic-bezier(.2, 1.8, .4, 1); } @keyframes bump { 40% { transform: scale(1.5); color: var(--violet); } }
.beans { grid-column: 1; display: grid; grid-template-columns: repeat(6, 9px); gap: 2px 3px; margin-top: 4px; }
.beans i { width: 9px; height: 6px; background: #e8e2f7; border: 1.5px solid #c8bde6; border-radius: 50%; }
.beans i.on { background: #7a4019; border-color: var(--ink); box-shadow: inset 2px -1px 0 rgb(255 255 255 / .35); animation: beanIn .4s cubic-bezier(.2, 1.8, .4, 1) backwards; }
@keyframes beanIn { from { transform: translateY(-14px) scale(.4); opacity: 0; } }
.hud-mid { display: grid; justify-items: center; gap: 4px; }
.worth { display: flex; align-items: baseline; gap: 6px; padding: 4px 14px; color: var(--ink); background: var(--gold); border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.worth small { font: 800 11px/1 var(--ui); letter-spacing: .1em; }
.worth b { font: 800 24px/1 var(--disp); }
.worth.up { animation: bump .6s cubic-bezier(.2, 1.8, .4, 1); }
.worth.hot { background: var(--red); color: #fff; }
.tricks { display: flex; gap: 6px; }
.tricks i { width: 14px; height: 14px; background: rgb(255 255 255 / .18); border: 2px solid rgb(255 255 255 / .5); border-radius: 50%; }
.tricks i.w { background: var(--us); border-color: var(--ink); } .tricks i.l { background: var(--them); border-color: var(--ink); } .tricks i.t { background: #fff; border-color: var(--ink); }

.board { position: relative; flex: 1; min-height: 0; }
.felt { position: absolute; inset: 9% 6% 4%; border: 4px solid var(--ink); border-radius: 46px; box-shadow: 0 0 0 10px var(--wood), 0 0 0 13px var(--ink), 0 14px 0 13px var(--wood2), 0 14px 0 16px var(--ink);
  background: radial-gradient(ellipse at 50% 40%, #1E9C62 0%, var(--felt) 45%, var(--felt2) 100%); overflow: hidden; }
.felt::before { content: ""; position: absolute; inset: 0; opacity: .18; background: repeating-radial-gradient(circle at 30% 20%, rgb(0 0 0 / .25) 0 1px, transparent 1px 3px); pointer-events: none; }
.felt-logo { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); display: grid; justify-items: center; color: rgb(255 255 255 / .1); font: 800 clamp(34px, 9vw, 64px)/1 var(--disp); letter-spacing: .08em; pointer-events: none; }
.felt-logo small { font-size: .35em; letter-spacing: .5em; }
.vira { position: absolute; top: 8px; left: 10px; z-index: 2; display: grid; justify-items: center; gap: 3px; color: #fff; }
.vira small { font: 800 10px/1 var(--ui); letter-spacing: .14em; opacity: .9; }
.vira .vira-card .cd { --cw: min(11vw, 52px); transform: rotate(-8deg); }
.vira .mani { padding: 2px 7px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 99px; font: 800 10px/1.2 var(--ui); white-space: nowrap; }
.special { position: absolute; top: 8px; right: 10px; z-index: 2; padding: 4px 10px; color: #fff; background: var(--ink); border: 2px solid #fff; border-radius: 99px; font: 800 12px/1.2 var(--ui); }
.table-cards { position: absolute; inset: 0; }
.tc { position: absolute; transform: translate(-50%, -50%); }
.tc .cd { --cw: var(--tw); transform: rotate(var(--rot, 0deg)); }
.tc.win .cd { box-shadow: 0 calc(var(--cw) * .04) 0 var(--ink), 0 0 0 4px var(--lime), 0 0 24px 6px rgb(198 244 50 / .7); }
.tc.p0 { left: 50%; top: 66%; } .tc.p1 { left: 70%; top: 50%; } .tc.p2 { left: 50%; top: 34%; } .tc.p3 { left: 30%; top: 50%; }
.two .tc.p1 { left: 50%; top: 34%; }
.tc.sweep { transition: left .45s ease-in, top .45s ease-in, opacity .45s ease-in .1s; opacity: 0; }

/* lugares em volta da mesa */
.seats { position: absolute; inset: 0; pointer-events: none; }
.seat { position: absolute; display: grid; justify-items: center; gap: 2px; width: 92px; transform: translate(-50%, -50%); pointer-events: auto; }
.seat.r1 { left: calc(100% - 46px); top: 52%; } .seat.r2 { left: 50%; top: 9%; } .seat.r3 { left: 46px; top: 52%; }
.two .seat.r1 { left: 50%; top: 9%; }
.seat.r0 { left: 50%; top: calc(100% - 10px); width: auto; grid-auto-flow: column; align-items: center; gap: 6px; }
.seat .av { position: relative; width: 54px; height: 54px; }
.seat .av img { width: 100%; height: 100%; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); }
.seat.us .av img { background: #F2FCCF; } .seat.them .av img { background: #FFE4F1; }
.seat .ring { position: absolute; inset: -6px; border-radius: 50%; background: conic-gradient(var(--lime) var(--p, 100%), rgb(255 255 255 / .15) 0); -webkit-mask: radial-gradient(circle, transparent 58%, #000 60%); mask: radial-gradient(circle, transparent 58%, #000 60%); opacity: 0; transition: opacity .2s; }
.seat.turn .ring { opacity: 1; }
.seat.turn.low .ring { background: conic-gradient(var(--red) var(--p, 100%), rgb(255 255 255 / .15) 0); }
.seat.turn .av img { animation: turnPulse 1.2s ease-in-out infinite; }
@keyframes turnPulse { 50% { transform: scale(1.07); } }
.seat .nm { max-width: 92px; padding: 1px 8px; overflow: hidden; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1.3 var(--ui); white-space: nowrap; text-overflow: ellipsis; }
.seat.us .nm { background: var(--us); } .seat.them .nm { background: var(--them); color: #fff; }
.seat .nm .zi { width: 12px; height: 12px; vertical-align: -.15em; }
.seat.off { opacity: .55; }
.seat .backs { display: flex; height: 28px; margin-top: 2px; }
.seat .backs .cd { --cw: 22px; margin-left: -9px; border-width: 2px; box-shadow: none; } .seat .backs .cd:first-child { margin-left: 0; }
.seat .backs .cd::after { font-size: 9px; }
.seat .dealer { position: absolute; top: -6px; right: 14px; display: grid; place-items: center; width: 22px; height: 22px; color: var(--ink); background: var(--gold); border: 2px solid var(--ink); border-radius: 50%; font: 800 11px/1 var(--ui); }
.seat.r0 .dealer { position: static; }
.say { position: absolute; z-index: 9; left: 50%; bottom: calc(100% + 4px); transform: translateX(-50%); max-width: 200px; padding: 6px 12px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 4px 0 var(--ink);
  font: 800 14px/1.15 var(--ui); white-space: nowrap; animation: sayIn .35s cubic-bezier(.2, 1.8, .4, 1); pointer-events: none; }
.say::after { content: ""; position: absolute; left: 50%; bottom: -9px; width: 12px; height: 12px; background: inherit; border-right: 3px solid var(--ink); border-bottom: 3px solid var(--ink); transform: translateX(-50%) rotate(45deg); }
.say.call { background: var(--red); color: #fff; font: 800 20px/1 var(--disp); }
.say.sign { background: var(--cyan); }
.seat.r2 .say, .two .seat.r1 .say { bottom: auto; top: calc(100% + 6px); } .seat.r2 .say::after, .two .seat.r1 .say::after { bottom: auto; top: -9px; transform: translateX(-50%) rotate(225deg); }
.seat.r1 .say { left: auto; right: 10px; transform: none; } .seat.r1 .say::after { left: auto; right: 24px; transform: rotate(45deg); }
.seat.r3 .say { left: 10px; transform: none; } .seat.r3 .say::after { left: 24px; transform: rotate(45deg); }
.two .seat.r1 .say { left: 50%; right: auto; transform: translateX(-50%); } .two .seat.r1 .say::after { left: 50%; right: auto; transform: translateX(-50%) rotate(225deg); }
.seat.r0 .say { bottom: calc(100% + 12px); }
@keyframes sayIn { from { transform: translateX(-50%) scale(.3); opacity: 0; } }
.seat.r1 .say, .seat.r3 .say { animation-name: sayIn2; } @keyframes sayIn2 { from { transform: scale(.3); opacity: 0; } }

/* faixa do fim da mão */
.banner { position: absolute; left: 50%; top: 50%; z-index: 8; transform: translate(-50%, -50%); display: grid; justify-items: center; gap: 2px; min-width: 210px; padding: 12px 22px; color: var(--ink); background: var(--lime); border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 7px 0 var(--ink); text-align: center; animation: bannerIn .5s cubic-bezier(.2, 1.6, .4, 1); }
.banner.them { background: var(--pink); color: #fff; } .banner.tie { background: #fff; }
.banner b { font: 800 34px/1 var(--disp); } .banner small { font: 800 14px/1.2 var(--ui); }
@keyframes bannerIn { from { transform: translate(-50%, -50%) scale(.3) rotate(-10deg); opacity: 0; } }

/* ---------- parte de baixo: botões e a mão ---------- */
.dock { position: relative; z-index: 7; display: grid; justify-items: center; gap: 6px; flex: none; }
.acts { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; flex-wrap: wrap; }
.btn.truco { display: grid; justify-items: center; gap: 0; padding: 6px 20px 7px; color: #fff; background: var(--red); font: 800 24px/1 var(--disp); animation: trucoGlow 1.6s ease-in-out infinite; }
.btn.truco small { font: 800 11px/1.2 var(--ui); opacity: .9; }
@keyframes trucoGlow { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 6px rgb(255 59 92 / .35); } }
.btn.cover[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: #fff; }
.icon-btn.talk, .icon-btn.sign { width: 44px; height: 44px; }
.icon-btn.sign { background: var(--cyan); }
.hand { display: flex; justify-content: center; align-items: flex-end; gap: clamp(6px, 2vw, 14px); min-height: calc(var(--cw) * 1.46 + 10px); padding-top: 10px; }
.hand .slot { position: relative; padding: 0; background: none; border: 0; border-radius: calc(var(--cw) * .12); transition: transform .18s cubic-bezier(.2, 1.4, .4, 1); }
.hand .slot:nth-child(1) { transform: rotate(-5deg) translateY(4px); } .hand .slot:nth-child(3) { transform: rotate(5deg) translateY(4px); }
.hand.can .slot:hover, .hand .slot.sel { transform: translateY(-16px) rotate(0); }
.hand .slot.sel .cd { box-shadow: 0 calc(var(--cw) * .04) 0 var(--ink), 0 0 0 4px var(--lime); }
.hand:not(.can) .slot { filter: saturate(.75) brightness(.92); cursor: default; }
.hand.cov .slot .cd { outline: 3px dashed #fff; outline-offset: 3px; }
.hand .slot.deal { animation: dealIn .5s cubic-bezier(.2, 1.3, .4, 1) backwards; }
@keyframes dealIn { from { transform: translateY(-60vh) rotate(180deg) scale(.4); opacity: 0; } }
.hand .slot:focus-visible { outline: 3px solid var(--cyan); outline-offset: 4px; }
.hint { min-height: 1.3em; margin: 0; color: #e6dcff; font: 700 14px/1.3 var(--ui); text-align: center; }
.hint b { color: var(--lime); }

/* bandeja de bordões e sinais */
.tray { position: absolute; left: 50%; bottom: calc(var(--cw) * 1.46 + 96px); z-index: 30; transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; width: min(94vw, 480px); padding: 10px; background: #fff; border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 6px 0 var(--ink); animation: pop .3s cubic-bezier(.2, 1.6, .4, 1); }
.tray h4 { flex-basis: 100%; margin: 0 0 2px; color: var(--ink); font: 800 13px/1.2 var(--ui); text-align: center; }
.tray button { padding: 7px 12px; color: var(--ink); background: #F4F0FF; border: 2px solid var(--ink); border-radius: 99px; font: 800 14px/1.1 var(--ui); }
.tray button:hover { background: var(--lime); }
.tray.signs button { background: #E6FBFF; }

/* pedido de truco (resposta) e mão de onze */
.callbox { position: absolute; left: 50%; bottom: max(14px, env(safe-area-inset-bottom)); z-index: 40; transform: translateX(-50%); display: grid; justify-items: center; gap: 10px; width: min(94vw, 460px); padding: 14px; color: var(--ink); background: #fff; border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink); animation: callIn .4s cubic-bezier(.2, 1.6, .4, 1); }
.callbox h3 { margin: 0; font: 800 26px/1 var(--disp); text-align: center; }
.callbox h3 em { font-style: normal; color: var(--red); }
.callbox p { margin: 0; text-align: center; font-weight: 700; color: #4b3f74; }
.callbox .cb-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; width: 100%; }
.callbox .cb-row .btn { flex: 1 1 120px; font-size: 18px; }
.callbox .btn.go { background: var(--lime); } .callbox .btn.run { background: #fff; } .callbox .btn.up { background: var(--red); color: #fff; }
.callbox .partner { display: flex; gap: 8px; }
.callbox .partner .cd { --cw: min(17vw, 70px); }
.callbox .cb-time { width: 100%; height: 8px; background: #eee8fb; border: 2px solid var(--ink); border-radius: 99px; overflow: hidden; }
.callbox .cb-time i { display: block; height: 100%; width: var(--p, 100%); background: var(--violet); transition: width .2s linear; }
.callbox.wait { width: auto; padding: 10px 16px; flex-direction: row; }
@keyframes callIn { from { transform: translateX(-50%) translateY(40px) scale(.8); opacity: 0; } }

/* grito na tela: TRUCO! SEIS! DESCE! */
.shout { position: absolute; inset: 0; z-index: 60; display: grid; place-items: center; pointer-events: none; }
.shout span { padding: 6px 26px 10px; color: #fff; background: var(--red); border: 5px solid var(--ink); border-radius: 26px; box-shadow: 0 10px 0 var(--ink); font: 800 clamp(64px, 18vw, 140px)/1 var(--disp); letter-spacing: -.02em; animation: shout 1.25s cubic-bezier(.2, 1.6, .4, 1) forwards; }
.shout span.go { background: var(--lime); color: var(--ink); } .shout span.run { background: #fff; color: var(--ink); } .shout span.onze { background: var(--gold); color: var(--ink); font-size: clamp(40px, 11vw, 84px); }
.shout small { display: block; margin-top: 4px; font: 800 .2em/1.2 var(--ui); letter-spacing: .02em; text-align: center; }
@keyframes shout { 0% { transform: scale(3) rotate(-14deg); opacity: 0; } 18% { transform: scale(.92) rotate(-6deg); opacity: 1; } 26% { transform: scale(1.05) rotate(-4deg); } 80% { transform: scale(1) rotate(-4deg); opacity: 1; } 100% { transform: scale(.8) rotate(-4deg) translateY(-30px); opacity: 0; } }
.board.shake { animation: shake .4s; } @keyframes shake { 20%, 60% { transform: translate(-6px, 2px); } 40%, 80% { transform: translate(6px, -2px); } }

/* ---------- sala de espera: a mesa com os lugares ---------- */
.seat-map { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seat-map .team { display: grid; gap: 8px; padding: 10px; border: 3px solid var(--ink); border-radius: 18px; }
.seat-map .team.us { background: #F2FCCF; } .seat-map .team.them { background: #FFE4F1; }
.seat-map .team h4 { margin: 0; font: 800 14px/1 var(--ui); letter-spacing: .08em; }
.chair { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 8px; min-height: 52px; padding: 5px 8px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 14px; text-align: left; font: 800 14px/1.15 var(--ui); }
.chair img { width: 40px; height: 40px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 50%; }
.chair span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chair small { display: block; color: #6b5f8f; font: 700 11px/1.2 var(--ui); }
.chair.free { background: rgb(255 255 255 / .6); border-style: dashed; }
.chair.free .plus { display: grid; place-items: center; width: 40px; height: 40px; border: 2px dashed var(--ink); border-radius: 50%; font-size: 20px; }
.chair.me { box-shadow: 0 0 0 3px var(--violet); }
.chair.bot { background: #F4F0FF; }
.chair.off { opacity: .5; }
.watchers { margin-top: 10px; color: #6b5f8f; font: 700 13px/1.3 var(--ui); }
.watchers:empty { display: none; }
.watchers img { width: 26px; height: 26px; vertical-align: middle; border: 2px solid var(--ink); border-radius: 50%; margin-right: 2px; }
#btnShuffle { justify-self: start; }

/* ---------- configurar a partida contra robôs (janela) ---------- */
.setup { display: grid; gap: 14px; }
.setup .seg button { padding: 10px 6px; }
.setup .btn.big { width: 100%; }

/* ---------- fim ---------- */
.final-head { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 6px; }
.final-head .big { font: 800 clamp(40px, 11vw, 70px)/1 var(--disp); text-shadow: 0 5px 0 rgb(0 0 0 / .3); }
.final-head .big.win { color: var(--lime); } .final-head .big.lose { color: #ffd0e6; }
.final-head .cup { width: clamp(90px, 22vw, 140px); color: var(--gold); filter: drop-shadow(0 6px 0 rgb(0 0 0 / .3)); animation: popUp .7s .2s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.final-head .cup svg { width: 100%; height: auto; }
.final-head .teams { display: flex; align-items: center; gap: 12px; }
.final-head .teams img { width: 46px; height: 46px; margin-left: -10px; background: #fff; border: 3px solid var(--ink); border-radius: 50%; }
.final-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; text-align: center; }
.final-score b { font: 800 56px/1 var(--disp); }
.final-score small { display: block; font: 800 13px/1.2 var(--ui); letter-spacing: .08em; }
.final-score .vs { color: #6b5f8f; font: 800 16px/1 var(--ui); }
.final-stats { margin-top: 10px; color: #4b3f74; font-weight: 700; font-size: 14px; }

/* ---------- celular em pé ---------- */
@media (max-width: 560px) {
  .hud { gap: 5px; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr) auto; }
  .hud .icon-btn { width: 38px; height: 38px; }
  .score { padding: 3px 7px; } .score b { font-size: 24px; } .beans { grid-template-columns: repeat(6, 7px); } .beans i { width: 7px; height: 5px; }
  .worth { padding: 3px 10px; } .worth b { font-size: 20px; }
  .felt { inset: 11% 3% 3%; border-radius: 34px; }
  .seat { width: 76px; } .seat .av { width: 44px; height: 44px; } .seat .nm { max-width: 76px; font-size: 11px; }
  .seat.r1 { left: calc(100% - 34px); } .seat.r3 { left: 34px; }
  .seat .backs .cd { --cw: 18px; margin-left: -8px; } .seat .backs { height: 24px; }
  .tc.p1 { left: 68%; } .tc.p3 { left: 32%; }
  .say { font-size: 13px; max-width: 150px; }
}
/* computador */
@media (min-width: 900px) and (min-height: 640px) {
  :root { --cw: 118px; --tw: 92px; }
  #mesa .board { width: 100%; max-width: 1080px; margin: 0 auto; }
  .seat { width: 110px; } .seat .av { width: 66px; height: 66px; } .seat .nm { font-size: 13px; max-width: 110px; }
  .seat.r1 { left: calc(100% - 60px); } .seat.r3 { left: 60px; }
}
/* ---------- telas baixas (celular deitado) ---------- */
@media (max-height: 520px) {
  :root { --cw: min(13.5vh, 86px); --tw: min(12vh, 70px); }
  :root { --cw: calc((100vh - 150px) / 2.1); --tw: calc((100vh - 120px) / 3.4); }
  .menu-body { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 16px; padding: 2px 0; }
  .hero { grid-row: 1 / 4; } .hero-cards { height: 120px; } .hero-cards .cd { --cw: 70px; } .hero-title b { font-size: 48px; } .tag { margin-top: 8px; font-size: 14px; }
  .me-card { padding: 8px 12px; } .av-big { width: 54px; height: 54px; } .me-fields small { display: none; }
  .btn.big { padding: 7px 12px; } .btn.big .ico { width: 34px; height: 34px; } .btn.big .t { font-size: 18px; } .btn.big small { font-size: 12px; }
  .join.card { padding: 8px 12px; } .menu-actions { gap: 7px; }
  #mesa { display: none; } #mesa.on { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto minmax(0, 1fr); column-gap: 10px; row-gap: 4px; }
  .hud { grid-column: 1 / 3; } .hud .icon-btn { width: 36px; height: 36px; }
  .score { padding: 2px 8px; } .score b { font-size: 22px; } .beans { display: none; } .score { grid-template-columns: auto auto; }
  .worth { padding: 2px 10px; } .worth b { font-size: 18px; } .tricks i { width: 11px; height: 11px; }
  .board { grid-row: 2; grid-column: 1; }
  .felt { inset: 4% 9% 6%; border-radius: 30px; box-shadow: 0 0 0 6px var(--wood), 0 0 0 9px var(--ink); }
  .seat { width: 70px; } .seat .av { width: 38px; height: 38px; } .seat .nm { max-width: 70px; font-size: 10px; } .seat .backs { display: none; }
  .seat.r1 { left: calc(100% - 30px); top: 50%; } .seat.r3 { left: 30px; top: 50%; } .seat.r2, .two .seat.r1 { top: 12%; }
  .seat.r0 { top: calc(100% - 12px); }
  .dock { grid-row: 2; grid-column: 2; align-content: center; width: calc(var(--cw) * 3 + 30px); max-width: 46vw; }
  .hand { min-height: calc(var(--cw) * 1.46 + 6px); padding-top: 8px; }
  .acts { min-height: 38px; gap: 6px; } .btn.truco { font-size: 20px; padding: 4px 14px 5px; }
  .hint { font-size: 12px; }
  .callbox { width: min(60vw, 420px); padding: 10px; gap: 6px; } .callbox h3 { font-size: 22px; } .callbox .cb-row .btn { font-size: 16px; padding: 8px; } .callbox .partner .cd { --cw: 48px; }
  .tray { bottom: auto; top: 60px; left: auto; right: 10px; transform: none; width: min(46vw, 380px); }
  .banner b { font-size: 26px; } .banner { padding: 8px 16px; }
  .shout span { font-size: clamp(54px, 16vh, 100px); }
}

/* ---------- acertos de layout ---------- */
.hud { width: 100%; max-width: 860px; margin: 0 auto; }
.score { width: 100%; max-width: 250px; } .score.them { justify-self: start; } #scoreUs { justify-self: end; }
.felt { top: 13%; }
.seat.r2, .two .seat.r1 { top: 13%; }
@media (max-width: 560px) { .felt { top: 14%; } .seat.r2, .two .seat.r1 { top: 13%; } }
@media (max-height: 520px) { .felt { top: 4%; } .seat.r2, .two .seat.r1 { top: 11%; } }
/* a resposta do truco não pode cobrir as minhas cartas */
.callbox { bottom: calc(var(--cw) * 1.46 + 64px); }
@media (max-height: 520px) {
  .callbox { left: calc((100% - (var(--cw) * 3 + 30px)) / 2); bottom: 10px; width: min(56vw, 440px); }
  .tag { display: none; }
  .final-head .big { font-size: 34px; } .final-head .cup { width: 56px; } .final-wrap { gap: 8px; }
  .final-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .final-score b { font-size: 40px; }
}
/* menu em quadro baixo (notebook com a página do jogo, celular deitado): sem as linhas pequenas dos botões, para caber sem rolar */
@media (max-height: 520px) {
  #menu .btn.big small { display: none; }
  #menu .btn.big .ico { grid-row: auto; }
  #menu .menu-row .btn { padding: 5px 4px; font-size: 13px; }
  #menu .join.card label { display: none; }
  #menu .hero-cards { height: min(120px, 22vh); }
}
