/* Zovy Senha — menu, criar a senha, partida (tabuleiro de palpites + teclado), fim e sala ao vivo.
   Celular em pé: placar em cima, "seu cofre" numa faixa, palpites no meio e o teclado embaixo.
   Deitado e computador: palpites à esquerda (com "seu cofre" embaixo) e o teclado à direita.
   Base da sala ao vivo igual à dos outros jogos ao vivo (a partir de "base comum"). */
:root { --ink: #1E1338; --violet: #7C4DFF; --lime: #C6F432; --pink: #FF4FA3; --cyan: #2EE6FF; --gold: #FFB800; --orange: #FF8A3D; --red: #FF3B5C; --teal: #14B8A6; --soft: #cdbfff;
  --pg: #2FD36B; --py: #FFC21A;
  --disp: "Bricolage Grotesque", "Figtree", system-ui, sans-serif; --ui: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: #140b2c; }
body { font: 600 16px/1.35 var(--ui); color: #fff; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
input { -webkit-user-select: text; user-select: text; }
button { font: inherit; color: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.mono { font-family: var(--disp); letter-spacing: .08em; font-variant-numeric: tabular-nums; }
#app { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(circle at 50% 20%, #2f1d6b, #160c35 62%, #0f0824); }
/* fundo: números flutuando */
.bg { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg span { position: absolute; bottom: -60px; width: 46px; height: 46px; border: 2px solid rgb(255 255 255 / .09); border-radius: 12px; animation: bgUp 18s linear infinite; }
.bg span::after { content: "7"; position: absolute; inset: 0; display: grid; place-items: center; color: rgb(255 255 255 / .1); font: 800 24px/1 var(--disp); }
.bg span:nth-child(1) { left: 6%; animation-delay: -2s; } .bg span:nth-child(2) { left: 18%; animation-delay: -9s; width: 34px; height: 34px; } .bg span:nth-child(2)::after { content: "3"; font-size: 18px; }
.bg span:nth-child(3) { left: 33%; animation-delay: -5s; } .bg span:nth-child(3)::after { content: "0"; }
.bg span:nth-child(4) { left: 49%; animation-delay: -13s; width: 56px; height: 56px; } .bg span:nth-child(4)::after { content: "9"; font-size: 30px; }
.bg span:nth-child(5) { left: 63%; animation-delay: -1s; width: 30px; height: 30px; } .bg span:nth-child(5)::after { content: "1"; font-size: 16px; }
.bg span:nth-child(6) { left: 75%; animation-delay: -7s; } .bg span:nth-child(6)::after { content: "5"; }
.bg span:nth-child(7) { left: 87%; animation-delay: -15s; width: 38px; height: 38px; } .bg span:nth-child(7)::after { content: "2"; font-size: 20px; }
.bg span:nth-child(8) { left: 95%; animation-delay: -11s; } .bg span:nth-child(8)::after { content: "8"; }
@keyframes bgUp { from { transform: translateY(0) rotate(0); } to { transform: translateY(-115vh) rotate(160deg); } }
.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); }
.screen.panel { background: radial-gradient(circle at 50% 110%, rgb(20 184 166 / .3), transparent 60%), linear-gradient(165deg, #3a2290 0%, #241257 55%, #150b33 100%); }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px) scale(.985); } }
.icon-btn.off { background: #d9d1f2; color: #6b5f8f; }
.top-btns { display: flex; gap: 8px; margin-left: auto; }

/* ---------- cadeado (menu e fim) ---------- */
.padlock { position: relative; width: 132px; height: 150px; animation: lockIn .8s cubic-bezier(.2, 1.4, .4, 1) backwards, bob 3.6s 1s ease-in-out infinite; }
.padlock .shackle { position: absolute; left: 30px; top: 0; width: 72px; height: 74px; border: 13px solid #d6cdf2; border-bottom: 0; border-radius: 40px 40px 0 0; box-shadow: inset 0 0 0 3px var(--ink), 0 0 0 3px var(--ink); transition: transform .5s cubic-bezier(.2, 1.6, .4, 1); }
.padlock .body { position: absolute; left: 0; right: 0; bottom: 0; height: 92px; display: grid; place-items: center; background: linear-gradient(160deg, var(--gold), #f39a00); border: 4px solid var(--ink); border-radius: 24px; box-shadow: 0 8px 0 var(--ink), inset 0 -8px 0 rgb(0 0 0 / .12); }
.padlock .dial { display: flex; gap: 4px; padding: 5px; background: var(--ink); border-radius: 12px; }
.padlock .dial b { display: grid; place-items: center; width: 22px; height: 30px; color: var(--ink); background: #fff; border-radius: 6px; font: 800 20px/1 var(--disp); }
.padlock .dial b.roll { animation: dialRoll .45s cubic-bezier(.2, 1.4, .4, 1); }
@keyframes dialRoll { 0% { transform: translateY(-14px); opacity: 0; } }
@keyframes lockIn { from { transform: translateY(-60px) rotate(-12deg) scale(.6); opacity: 0; } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(3deg); } }

/* ---------- menu ---------- */
#menu { overflow-y: auto; }
.menu-body { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr); align-content: center; gap: 16px; width: 100%; max-width: 1000px; margin: 0 auto; padding: 10px 0; }
.hero { display: grid; justify-items: center; gap: 10px; text-align: center; }
.title { display: inline-grid; justify-items: center; gap: 4px; margin: 0; font: 800 clamp(42px, 12vw, 80px)/.92 var(--disp); white-space: nowrap; letter-spacing: -.02em; }
.title span { position: relative; padding: 6px 18px 12px; border: 4px solid var(--ink); border-radius: 22px; box-shadow: 0 8px 0 var(--ink); animation: signIn .7s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.title .t1 { color: #fff; background: var(--violet); font-size: .5em; transform: rotate(-4deg); }
.title .t2 { color: var(--ink); background: var(--lime); transform: rotate(-2deg); animation-delay: .15s; letter-spacing: .06em; }
@keyframes signIn { from { opacity: 0; transform: translateY(-40px) rotate(-10deg) scale(.5); } }
.tag { max-width: 460px; margin: 0; font-size: 15px; text-shadow: 0 2px 0 rgb(30 19 56 / .6); }
.tag b { color: var(--lime); }
.modes { display: grid; gap: 10px; }
.mode { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 11px 14px; text-align: left; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 0 6px 0 var(--ink); transition: transform .12s, box-shadow .12s; animation: pop .45s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.mode:nth-child(2) { animation-delay: .07s; } .mode:nth-child(3) { animation-delay: .14s; } .mode:nth-child(4) { animation-delay: .21s; }
.mode:hover { transform: translateY(-3px) rotate(-.6deg); box-shadow: 0 9px 0 var(--ink); }
.mode:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.m-ic { display: grid; place-items: center; width: 48px; height: 48px; border: 3px solid var(--ink); border-radius: 16px; }
.m-ic .zi { width: 25px; height: 25px; }
.m-bots .m-ic { background: var(--lime); } .m-local .m-ic { background: var(--gold); } .m-galera .m-ic { background: var(--pink); color: #fff; } .m-daily .m-ic { background: var(--cyan); }
.m-txt { display: grid; min-width: 0; }
.m-txt b { font: 800 21px/1.1 var(--disp); }
.m-txt small { color: #5d5182; font-size: 13px; font-weight: 700; }
.m-rec { display: grid; justify-items: end; font: 800 12px/1.2 var(--ui); color: #6b5f8f; text-align: right; }
.m-rec b { font: 800 22px/1 var(--disp); color: var(--ink); font-variant-numeric: tabular-nums; }
.m-rec .new { padding: 2px 8px; color: #fff; background: var(--pink); border: 2px solid var(--ink); border-radius: 99px; font-size: 11px; animation: beat 1.2s infinite; }
.m-rec .new.cy { color: var(--ink); background: var(--cyan); animation: none; }
.menu-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.menu-row .btn { padding: 9px 6px; white-space: nowrap; font-size: 13px; }
@media (max-width: 520px) { .padlock { zoom: .78; } .menu-body { gap: 12px; } }
@keyframes pop { from { transform: scale(.6); opacity: 0; } }
@keyframes beat { 50% { transform: scale(1.08); } }
@media (min-width: 860px) {
  .menu-body { grid-template-columns: 1.05fr 1fr; align-items: center; column-gap: 40px; }
  .hero { grid-row: 1 / 3; }
}
.lvl-pick { display: grid; gap: 8px; }
.btn.lvl { display: grid; grid-template-columns: 46px minmax(0, 1fr) auto; justify-items: start; align-items: center; gap: 10px; padding: 8px 12px; text-align: left; }
.btn.lvl img { width: 46px; height: 46px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.btn.lvl b { font: 800 19px/1.1 var(--disp); } .btn.lvl small { display: block; color: #6b5f8f; font-weight: 700; } .btn.lvl em { font-style: normal; color: #6b5f8f; font-size: 12px; }
.btn.lvl:nth-child(1) { background: #E6FFB8; } .btn.lvl:nth-child(2) { background: #FFF0C2; } .btn.lvl:nth-child(3) { background: #FFD3E8; }
.two-names { display: grid; gap: 10px; } .two-names label { display: grid; gap: 4px; font: 800 13px/1 var(--ui); color: #6b5f8f; text-transform: uppercase; }
.soft { color: #6b5f8f; } .small { font-size: 13px; }
.linkish { padding: 0; color: var(--violet); background: none; border: 0; font-weight: 800; text-decoration: underline; }
.modal-card .set-block > small { color: #6b5f8f; font: 800 12px/1 var(--ui); letter-spacing: .08em; }
.modal-card .row-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* ---------- casinhas da senha ---------- */
.slots { display: flex; justify-content: center; gap: 8px; }
.slot { position: relative; display: grid; place-items: center; width: 48px; height: 58px; color: var(--ink); background: #F4F0FF; border: 3px solid var(--ink); border-radius: 14px; box-shadow: inset 0 4px 0 rgb(30 19 56 / .1); font: 800 32px/1 var(--disp); }
.slot.full { background: #fff; box-shadow: 0 4px 0 var(--ink); animation: slotIn .22s cubic-bezier(.2, 1.8, .4, 1); }
.slot.cur::after { content: ""; position: absolute; left: 50%; bottom: 9px; width: 18px; height: 4px; background: var(--violet); border-radius: 4px; transform: translateX(-50%); animation: blink 1s steps(2) infinite; }
.slot.mask i { width: 14px; height: 14px; background: var(--ink); border-radius: 50%; }
@keyframes slotIn { from { transform: scale(.6) translateY(6px); } }
@keyframes blink { 50% { opacity: 0; } }
.slots.big .slot { width: clamp(52px, 15vw, 70px); height: clamp(64px, 18vw, 84px); font-size: clamp(36px, 10vw, 50px); border-radius: 18px; }
.slots.small .slot { width: 34px; height: 40px; font-size: 22px; border-width: 2px; border-radius: 10px; box-shadow: 0 3px 0 var(--ink); }
.slots.small .slot.mask i { width: 9px; height: 9px; }
.slots.locked .slot { background: var(--lime); }
.slots.clank { animation: clank .5s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes clank { 30% { transform: scale(1.08) rotate(-2deg); } 60% { transform: scale(.97) rotate(1deg); } }

/* ---------- teclado ---------- */
.keypad { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; width: 100%; max-width: 360px; margin: 0 auto; touch-action: manipulation; }
.key { position: relative; display: grid; place-items: center; height: 56px; padding: 0; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); font: 800 26px/1 var(--disp); transition: transform .08s, box-shadow .08s, background .15s; }
.key.down { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
.key:disabled { opacity: .35; cursor: default; }
.key .zi { width: 26px; height: 26px; }
.key.k-del { background: #FFE1EC; }
.key.k-ok { background: var(--lime); font-size: 22px; }
.key.k-ok:not(:disabled) { animation: okPulse 1.3s ease-in-out infinite; }
@keyframes okPulse { 50% { box-shadow: 0 5px 0 var(--ink), 0 0 0 6px rgb(198 244 50 / .35); } }
.key .nd { position: absolute; top: 5px; right: 6px; width: 9px; height: 9px; border-radius: 50%; }
.key.n1 { color: #9a8fc0; background: #ECE8F7; } .key.n1 b { text-decoration: line-through 3px var(--red); }
.key.n2 { background: #E6FFB8; } .key.n2 .nd { background: var(--pg); border: 2px solid var(--ink); }
.keypad.noting .key:not(.k-del):not(.k-ok) { border-style: dashed; }
.keypad.noting .key:disabled:not(.k-del):not(.k-ok) { opacity: 1; cursor: pointer; }
.keypad.noting .k-del, .keypad.noting .k-ok { opacity: .35; pointer-events: none; }

/* ---------- criar a senha ---------- */
#setup { overflow-y: auto; }
.timer { margin-left: auto; padding: 4px 12px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 99px; font: 800 16px/1.2 var(--disp); font-variant-numeric: tabular-nums; }
.timer.low { color: #fff; background: var(--red); animation: beat .5s infinite; }
.set-body { flex: 1; display: grid; align-content: center; gap: 18px; width: 100%; max-width: 820px; margin: 0 auto; }
.vault { display: grid; justify-items: center; gap: 10px; }
.vault-door { position: relative; display: grid; justify-items: center; gap: 10px; padding: 22px 22px 14px; background: radial-gradient(circle at 50% 0, #4a3a7a, #2a1e52); border: 4px solid var(--ink); border-radius: 30px; box-shadow: 0 10px 0 var(--ink), inset 0 0 0 6px rgb(255 255 255 / .06); }
.vault-door .bolt { position: absolute; width: 14px; height: 14px; background: #bfb3e6; border: 3px solid var(--ink); border-radius: 50%; }
.b1 { top: 10px; left: 10px; } .b2 { top: 10px; right: 10px; } .b3 { bottom: 10px; left: 10px; } .b4 { bottom: 10px; right: 10px; }
.set-help { margin: 0; max-width: 420px; text-align: center; color: #e6dcff; }
.set-help b { color: var(--lime); }
.pad-wrap { display: grid; gap: 12px; }
.set-actions { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; width: 100%; max-width: 360px; margin: 0 auto; }
.set-actions .btn.lime { font-size: 18px; }
.set-wait { margin: 0; padding: 12px; text-align: center; color: var(--ink); background: var(--lime); border: 3px solid var(--ink); border-radius: 16px; font-weight: 800; }
.mini-btn.eye { display: inline-flex; align-items: center; gap: 5px; }
.mini-btn .zi { width: 15px; height: 15px; }
@media (orientation: landscape) and (min-width: 700px) {
  .set-body { grid-template-columns: 1fr 1fr; align-items: center; column-gap: 30px; }
}
@media (max-height: 560px) {
  .vault-door { padding: 14px 18px 10px; } .set-body { gap: 10px; }
  .slots.big .slot { width: 52px; height: 60px; font-size: 34px; }
  .key { height: 46px; font-size: 22px; border-radius: 13px; } .keypad { gap: 6px; }
}

/* ---------- passar o aparelho ---------- */
.pass-body { flex: 1; display: grid; justify-items: center; align-content: center; gap: 10px; text-align: center; }
.pass-av { width: 110px; height: 110px; background: #fff; border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 8px 0 var(--ink); animation: pop .5s cubic-bezier(.2, 1.6, .4, 1); }
.pass-body small { color: var(--lime); font: 800 13px/1 var(--ui); letter-spacing: .14em; }
.pass-body h2 { margin: 0; font: 800 clamp(30px, 8vw, 46px)/1.05 var(--disp); }
.pass-body p { margin: 0 0 8px; max-width: 360px; color: #e6dcff; }

/* ---------- partida ---------- */
#play { padding-bottom: max(10px, env(safe-area-inset-bottom)); gap: 10px; }
.hud { display: grid; grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; width: 100%; max-width: 1100px; margin: 0 auto; flex: none; }
.pcard { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: center; gap: 8px; min-width: 0; padding: 4px 10px 4px 4px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 4px 0 var(--ink); transition: transform .2s, background .2s; }
.pcard.right { grid-template-columns: minmax(0, 1fr) 40px; padding: 4px 4px 4px 10px; text-align: right; }
.pcard.right img { order: 2; }
.pcard.on { background: var(--lime); transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.pcard img { width: 40px; height: 40px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 50%; }
.pc-t { display: grid; min-width: 0; } .pc-t b { overflow: hidden; font: 800 15px/1.15 var(--ui); text-overflow: ellipsis; white-space: nowrap; } .pc-t small { overflow: hidden; color: #6b5f8f; font: 700 11px/1.2 var(--ui); text-overflow: ellipsis; white-space: nowrap; }
.h-mid { display: grid; justify-items: center; gap: 3px; }
.h-turn { padding: 3px 10px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); font: 800 12px/1.2 var(--ui); letter-spacing: .06em; white-space: nowrap; }
.h-clock { min-width: 38px; padding: 1px 8px; text-align: center; color: #fff; background: var(--violet); border: 2px solid var(--ink); border-radius: 99px; font: 800 14px/1.3 var(--disp); font-variant-numeric: tabular-nums; }
.h-clock.danger { background: var(--red); animation: beat .5s infinite; }
body[data-mode="daily"] #pc1 { visibility: visible; }
.arena { flex: 1; min-height: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 10px; width: 100%; max-width: 1100px; margin: 0 auto; }
.board { grid-row: 2; display: flex; flex-direction: column; min-height: 0; padding: 10px 12px; }
.board-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 10px; margin-bottom: 8px; }
.board-head h2 { display: flex; align-items: center; gap: 6px; margin: 0; font: 800 19px/1.1 var(--disp); }
.board-head h2 .zi { width: 20px; height: 20px; color: var(--violet); }
.legend { display: inline-flex; align-items: center; gap: 5px; color: #6b5f8f; font: 800 11px/1 var(--ui); white-space: nowrap; }
.legend .pin { margin-left: 4px; }
.rows { display: grid; align-content: start; gap: 6px; margin: 0; padding: 0 2px 4px; list-style: none; overflow-y: auto; min-height: 0; flex: 1; scroll-behavior: smooth; }
.row { display: grid; grid-template-columns: 26px auto minmax(0, 1fr); grid-template-areas: "n d p" "n d t"; align-items: center; column-gap: 10px; padding: 6px 10px 6px 6px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; }
.row.new { animation: rowIn .35s cubic-bezier(.2, 1.4, .4, 1); }
.row .rn { grid-area: n; display: grid; place-items: center; width: 26px; height: 26px; color: #fff; background: var(--violet); border-radius: 50%; font: 800 13px/1 var(--ui); }
.row .rd { grid-area: d; display: flex; gap: 4px; }
.row .rd b { display: grid; place-items: center; width: 34px; height: 40px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 10px; font: 800 24px/1 var(--disp); }
.row.new .rd b { animation: flipIn .35s cubic-bezier(.2, 1.4, .4, 1) backwards; animation-delay: calc(var(--d) * 60ms); }
.row .rp { grid-area: p; display: flex; gap: 5px; }
.row .rt { grid-area: t; color: #6b5f8f; font: 700 11px/1.2 var(--ui); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row.win { background: #E6FFB8; } .row.win .rn { background: var(--pg); color: var(--ink); } .row.win .rt { color: #2a7a00; font-weight: 800; letter-spacing: .1em; }
.row.boom { animation: boom .6s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes rowIn { from { transform: translateY(14px) scale(.96); opacity: 0; } }
@keyframes flipIn { from { transform: rotateX(90deg); } }
@keyframes boom { 40% { transform: scale(1.05); box-shadow: 0 0 0 8px rgb(47 211 107 / .4); } }
.rows .empty { display: grid; gap: 4px; padding: 14px; text-align: center; color: #6b5f8f; background: #F4F0FF; border: 2px dashed #b9add9; border-radius: 14px; }
.rows .empty b { color: var(--ink); font: 800 17px/1.2 var(--disp); }
.pin { display: inline-block; width: 18px; height: 18px; border: 2px solid var(--ink); border-radius: 50%; vertical-align: -.25em; }
.pin.g { background: var(--pg); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .15); }
.pin.y { background: var(--py); box-shadow: inset 0 -3px 0 rgb(0 0 0 / .12); }
.pin.e { background: #fff; border-style: dashed; border-color: #b9add9; }
.pin.wait { transform: scale(0); }
.pin.pop { animation: pinPop .3s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes pinPop { from { transform: scale(0); } 60% { transform: scale(1.3); } }
.rp.sm { display: inline-flex; gap: 3px; vertical-align: -.2em; } .rp.sm .pin { width: 13px; height: 13px; }
.legend .pin, .modal-card .pin, .rows .empty .pin { width: 13px; height: 13px; }
.mine { grid-row: 1; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "h h" "s t"; align-items: center; gap: 4px 10px; padding: 8px 12px; cursor: pointer; }
.mine-head { grid-area: h; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.mine-head h3 { display: flex; align-items: center; gap: 6px; margin: 0; font: 800 15px/1.1 var(--disp); }
.mine-head h3 .zi { width: 17px; height: 17px; color: var(--gold); }
.mine .slots { grid-area: s; justify-content: start; gap: 4px; }
.mine .slots .slot { width: 28px; height: 34px; font-size: 19px; }
.mine-sub { grid-area: t; margin: 0; color: #4b3f74; font: 700 13px/1.3 var(--ui); }
.mine-sub b { color: var(--ink); }
.rows.mini { display: none; }
.rows.mini .row { grid-template-columns: 22px auto minmax(0, 1fr); padding: 4px 8px 4px 4px; column-gap: 8px; }
.rows.mini .row .rn { width: 22px; height: 22px; font-size: 11px; background: var(--pink); }
.rows.mini .row .rd b { width: 26px; height: 30px; font-size: 18px; }
.rows.mini .row .pin { width: 14px; height: 14px; }
.rows.mini .row .rt { display: none; }
.rows.in-modal { max-height: 60vh; }
.dock { position: relative; flex: none; display: grid; gap: 8px; width: 100%; max-width: 420px; margin: 0 auto; }
.guess-line { position: relative; display: flex; align-items: center; justify-content: center; gap: 10px; }
.guess-line .notes { position: absolute; right: 0; display: inline-flex; align-items: center; gap: 4px; }
.guess-line .notes[aria-pressed="true"] { color: var(--ink); background: var(--gold); }
.dock-cover { position: absolute; inset: 0; z-index: 2; display: grid; place-content: center; justify-items: center; gap: 6px; padding: 10px; text-align: center; color: #fff; background: rgb(20 11 44 / .72); border-radius: 18px; font: 800 17px/1.3 var(--ui); backdrop-filter: blur(2px); }
.dock-cover .dots { color: var(--lime); }
.dock.mine-turn .slots .slot:not(.full) { border-color: var(--ink); background: #fff; }
.msg { position: absolute; left: 50%; top: calc(max(8px, env(safe-area-inset-top)) + 60px); z-index: 30; width: min(92vw, 460px); padding: 9px 14px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); text-align: center; font-weight: 700; transform: translateX(-50%); pointer-events: none; animation: msgIn .35s cubic-bezier(.2, 1.6, .4, 1); }
.msg.turn { background: var(--lime); } .msg.alert { color: #fff; background: var(--red); } .msg.gold { background: var(--gold); }
@keyframes msgIn { from { transform: translate(-50%, -12px) scale(.9); opacity: 0; } }
.pause { position: absolute; inset: 0; z-index: 70; display: grid; place-items: center; background: rgb(30 19 56 / .72); backdrop-filter: blur(3px); }
.pause .card { display: grid; gap: 12px; width: min(92vw, 360px); text-align: center; }
.pause h2 { margin: 0; font: 800 28px/1 var(--disp); } .pause h2 .zi { width: 24px; height: 24px; }
.pause .row-chips { display: flex; justify-content: center; gap: 8px; }
.board { position: relative; }
body[data-mode="live"] .board { padding-bottom: 50px; }
.board .reacts-mini { position: absolute; right: 8px; bottom: 7px; z-index: 3; display: flex; gap: 4px; }
.board .reacts-mini button { width: 36px; height: 36px; padding: 3px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 12px; }
.board .reacts-mini button:active { transform: scale(.88); }
/* deitado e computador: palpites à esquerda, teclado à direita */
@media (orientation: landscape) and (min-width: 700px) {
  #play { display: none; }
  #play.on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(260px, 380px); grid-template-rows: auto minmax(0, 1fr); column-gap: 14px; row-gap: 10px; }
  #play .hud { grid-column: 1 / -1; }
  #play .arena { grid-column: 1; grid-row: 2; max-width: none; grid-template-rows: minmax(0, 1fr) auto; }
  #play .board { grid-row: 1; }
  #play .mine { grid-row: 2; }
  #play .dock { grid-column: 2; grid-row: 2; align-self: center; max-width: 380px; }
}
@media (min-width: 1000px) and (min-height: 600px) {
  #play.on { grid-template-columns: minmax(0, 1fr) 300px 380px; }
  #play .arena { grid-column: 1 / 3; grid-template-columns: minmax(0, 1fr) 300px; grid-template-rows: minmax(0, 1fr); }
  #play .board { grid-row: 1; grid-column: 1; }
  #play .mine { grid-row: 1; grid-column: 2; display: flex; flex-direction: column; align-items: stretch; gap: 8px; cursor: default; min-height: 0; }
  #play .mine .slots { justify-content: center; }
  #play .mine .slots .slot { width: 40px; height: 48px; font-size: 26px; }
  #play .rows.mini { display: grid; }
  #play .dock { grid-column: 3; }
  .key { height: 60px; }
}
body[data-mode="daily"] #play .arena { grid-template-columns: minmax(0, 1fr) !important; }
body[data-mode="daily"] #play .board { grid-column: 1 / -1 !important; }
@media (max-height: 560px) and (orientation: landscape) {
  #play { gap: 6px; padding-top: max(6px, env(safe-area-inset-top)); }
  .hud .pcard img { width: 30px; height: 30px; } .pcard { grid-template-columns: 30px minmax(0, 1fr); } .pcard.right { grid-template-columns: minmax(0, 1fr) 30px; }
  .board { padding: 6px 10px; } .board-head { margin-bottom: 4px; } .board-head h2 { font-size: 16px; } .legend { display: none; }
  .row { padding: 3px 8px 3px 4px; } .row .rd b { width: 28px; height: 32px; font-size: 20px; } .row .rt { display: none; } .row { grid-template-areas: "n d p" "n d p"; }
  .mine { padding: 5px 10px; } .mine-head h3 { font-size: 13px; }
  .key { height: 42px; font-size: 21px; border-radius: 12px; box-shadow: 0 4px 0 var(--ink); } .keypad { gap: 5px; }
  .slot { width: 40px; height: 46px; font-size: 26px; }
  .dock { gap: 6px; }
  .msg { top: 50px; font-size: 14px; padding: 6px 10px; }
}
@media (orientation: portrait) and (max-height: 720px) {
  .key { height: 48px; font-size: 23px; } .keypad { gap: 6px; } .slot { width: 42px; height: 50px; font-size: 28px; }
  .row .rd b { width: 30px; height: 34px; font-size: 21px; }
}
@media (orientation: portrait) and (max-width: 400px) {
  .pcard img { width: 32px; height: 32px; } .pcard { grid-template-columns: 32px minmax(0, 1fr); } .pcard.right { grid-template-columns: minmax(0, 1fr) 32px; } .pc-t b { font-size: 13px; } .hud { gap: 5px; }
  .h-turn { font-size: 10px; padding: 2px 7px; }
}

/* ---------- fim ---------- */
#over { overflow-y: auto; background: rgb(20 11 44 / .7); }
.over-wrap { display: grid; width: 100%; max-width: 540px; margin: auto; }
.over-card { display: grid; gap: 10px; padding: 18px; text-align: center; border-width: 4px; border-radius: 26px; box-shadow: 0 9px 0 var(--ink); animation: pop .4s cubic-bezier(.2, 1.6, .4, 1); }
.over-card .kicker { color: var(--violet); font: 800 12px/1 var(--ui); letter-spacing: .12em; }
.over-card h2 { margin: 0; font: 800 30px/1.05 var(--disp); }
.over-card .muted { margin: 0; color: #6b5f8f; font-weight: 700; }
.over-card .muted b { color: var(--ink); }
.ov-lock { position: relative; justify-self: center; width: 70px; height: 80px; }
.ov-lock .shackle { position: absolute; left: 16px; top: 0; width: 38px; height: 42px; border: 8px solid #cfc4ef; border-bottom: 0; border-radius: 24px 24px 0 0; box-shadow: inset 0 0 0 2px var(--ink), 0 0 0 2px var(--ink); transition: transform .5s .5s cubic-bezier(.2, 1.6, .4, 1); }
.ov-lock .body { position: absolute; left: 0; right: 0; bottom: 0; height: 48px; background: linear-gradient(160deg, var(--gold), #f39a00); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 5px 0 var(--ink); }
.ov-lock.open .shackle { transform: translateY(-12px) translateX(10px) rotate(18deg); animation: shOpen .7s .4s cubic-bezier(.2, 1.6, .4, 1) backwards; }
@keyframes shOpen { from { transform: none; } }
.ov-code { display: grid; justify-items: center; gap: 4px; }
.ov-code small { color: #6b5f8f; font: 800 11px/1 var(--ui); letter-spacing: .1em; text-transform: uppercase; }
.over-card .ov-code + .ov-code { margin-top: -2px; }
.over-card .ov-codes { display: flex; justify-content: center; gap: 16px; flex-wrap: wrap; }
.ov-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.ov-stats > div { display: grid; justify-items: center; gap: 2px; padding: 8px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 16px; }
.ov-stats > div.w { background: #F2FCCF; }
.ov-stats img { width: 44px; height: 44px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.ov-stats small { color: #6b5f8f; font-size: 12px; font-weight: 700; }
.over-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.over-actions .btn.wide { grid-column: 1 / -1; font-size: 19px; padding: 13px; }
.over-card .grid { display: grid; gap: 4px; justify-items: center; margin: 0 auto; padding: 8px 14px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 14px; }
.over-card .grid .rp { display: flex; gap: 4px; } .over-card .grid .pin { width: 15px; height: 15px; }
.over-card .next { margin: 0; font-size: 14px; }
.over-card .next .zi { width: 16px; height: 16px; vertical-align: -.2em; }
.reward .zi { width: 18px; height: 18px; vertical-align: -.25em; }
.vs-box { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 10px; }
.vs-box .vs { display: grid; place-items: center; width: 38px; height: 38px; color: #fff; background: var(--pink); border: 3px solid var(--ink); border-radius: 50%; animation: beat 1.3s infinite; }
.vs-box .vs .zi { width: 20px; height: 20px; }
.vs-p { position: relative; display: grid; justify-items: center; gap: 4px; padding: 10px 6px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 16px; text-align: center; min-width: 0; }
.vs-p.off { opacity: .45; } .vs-p.me { background: #F2FCCF; } .vs-p.empty { border-style: dashed; color: #6b5f8f; }
.vs-p img { width: 58px; height: 58px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.vs-p b { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vs-p .crown { position: absolute; top: -14px; left: 50%; transform: translateX(-50%) rotate(-8deg); }
.vs-p .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%; }
.vs-p .ghost { display: grid; place-items: center; width: 58px; height: 58px; border: 2px dashed #b9add9; border-radius: 50%; }
@media (max-height: 560px) {
  .menu-body { grid-template-columns: 1fr 1fr; column-gap: 16px; padding: 2px 0; gap: 8px; }
  .hero { grid-row: 1 / 3; gap: 6px; } .title { font-size: 40px; } .title span { padding: 3px 12px 7px; border-width: 3px; box-shadow: 0 5px 0 var(--ink); }
  .tag { display: none; } .padlock { zoom: .6; animation: none; }
  .mode { padding: 6px 10px; } .m-ic { width: 36px; height: 36px; } .m-ic .zi { width: 20px; height: 20px; } .m-txt b { font-size: 16px; } .m-txt small { display: none; } .modes { gap: 7px; } .mode { box-shadow: 0 4px 0 var(--ink); }
  .over-card { padding: 12px; gap: 6px; } .over-card h2 { font-size: 22px; } .ov-lock { display: none; }
  .ov-stats > div { padding: 4px 8px; } .ov-stats img { width: 32px; height: 32px; } .over-card .reward p { margin: 0; }
  .over-actions { grid-template-columns: 2fr 1fr 1fr; gap: 8px; } .over-actions .btn.wide { grid-column: auto; font-size: 17px; padding: 10px; } .over-actions .btn { padding: 9px 10px; }
  .over-wrap { max-width: 760px; }
  .pass-av { width: 70px; height: 70px; } .pass-body h2 { font-size: 28px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } .bg { display: none; } }

/* ================= base comum (botões, janelas, sala ao vivo) ================= */
/* ---------- 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; text-decoration: none; }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 var(--ink); }
.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 .zi { width: 1.1em; height: 1.1em; }
.btn:focus-visible, .icon-btn:focus-visible, .mode:focus-visible, .ans:focus-visible, .tab:focus-visible, .stk:focus-visible { outline: 3px solid var(--cyan); outline-offset: 3px; }
.icon-btn { display: grid; place-items: center; width: 42px; height: 42px; flex: none; padding: 0; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.icon-btn .zi { width: 22px; height: 22px; }
.icon-btn:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--ink); }
.pill { display: inline-block; padding: 1px 9px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1.4 var(--ui); }
.top { display: flex; align-items: center; gap: 10px; flex: none; }
.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; }


.bar { display: flex; align-items: center; gap: 10px; flex: none; width: 100%; max-width: 1100px; margin: 0 auto 10px; }
.bar-title { display: grid; } .bar-title small { color: var(--soft); font: 800 11px/1 var(--ui); letter-spacing: .12em; } .bar-title b { font: 800 22px/1.1 var(--disp); }

/* ---------- efeitos e janelas ---------- */
.confetti { position: absolute; inset: 0; z-index: 55; width: 100%; height: 100%; pointer-events: none; }
.toasts { position: absolute; top: calc(max(10px, env(safe-area-inset-top)) + 58px); 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 .t-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; background: var(--c, var(--lime)); border: 2px solid var(--ink); border-radius: 50%; }
.toast .t-ic .zi { width: 16px; height: 16px; } .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 h2 .zi { color: var(--gold); }
.modal-card ol { padding-left: 20px; } .modal-card li { margin-bottom: 8px; } .modal-card .fact small { color: #6b5f8f; }
.top-list { display: grid; gap: 6px; margin: 0 0 12px; padding: 0; list-style: none; }
.top-list li { display: flex; align-items: center; gap: 8px; 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; }
.plus { position: absolute; z-index: 60; width: 80px; text-align: center; color: var(--lime); font: 800 34px/1 var(--disp); -webkit-text-stroke: 2px var(--ink); paint-order: stroke fill; pointer-events: none; animation: plusUp 1.1s ease-out forwards; }
@keyframes plusUp { to { transform: translateY(-70px); opacity: 0; } }

/* ================= Com a galera (sala ao vivo): base da sala de espera, reações e pódio, igual ao Stop/Impostor/Mentira ================= */
.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; }
.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; }
/* ---------- 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); } }

.reacts { display: flex; gap: 4px; }
.reacts button { width: 44px; height: 44px; padding: 4px; background: rgb(255 255 255 / .1); border: 2px solid rgb(255 255 255 / .2); border-radius: 14px; transition: transform .12s, background .15s; }
.reacts button:hover { background: rgb(255 255 255 / .2); transform: translateY(-2px) rotate(-6deg); }
.reacts button.boing, .sus.boing { animation: boing .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes boing { 30% { transform: scale(1.12) rotate(3deg); } }
.reacts button:active { transform: scale(.85); }
/* ---------- 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; }
@keyframes wobble { 0%, 100% { transform: rotate(var(--rot)); } 50% { transform: rotate(calc(var(--rot) * -1)) translateY(-4px); } }

/* ---------- Com a galera: peças próprias ---------- */
.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%; }
.btn.big .ico .zi { width: 20px; height: 20px; }
.btn.big .t { font: 800 21px/1.1 var(--disp); }
.btn.big small { font: 700 13px/1.2 var(--ui); opacity: .8; }
.btn:disabled { opacity: .45; pointer-events: none; }
.m-galera .m-ic { background: var(--pink); color: #fff; }
.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; }
#gjoin { overflow-y: auto; }
.gj-body { flex: 1; display: grid; align-content: center; gap: 14px; width: 100%; max-width: 560px; margin: 0 auto; padding: 8px 0; }
.gj-hero { text-align: center; }
.gj-badge { display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; color: #fff; background: var(--pink); border: 3px solid var(--ink); border-radius: 99px; box-shadow: 0 4px 0 var(--ink); font: 800 13px/1.2 var(--ui); letter-spacing: .08em; animation: beat 1.4s infinite; }
.gj-hero h2 { margin: 12px 0 6px; font: 800 clamp(22px, 5.5vw, 30px)/1.15 var(--disp); }
.gj-hero h2 em { font-style: normal; color: var(--lime); }
.gj-hero p { margin: 0; color: #e6dcff; }
#globby, #gfinal { overflow-y: auto; }
.wait.dark { color: #6b5f8f; }
.round-tag { padding: 4px 10px; color: var(--ink); background: var(--lime); border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1.2 var(--ui); letter-spacing: .06em; white-space: nowrap; }
.gclock { position: relative; width: 50px; height: 50px; flex: none; background: #fff; border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 4px 0 var(--ink); }
.gclock svg { position: absolute; inset: 2px; width: calc(100% - 4px); height: calc(100% - 4px); transform: rotate(-90deg); }
.gclock .tc-bg { fill: none; stroke: #e5def7; stroke-width: 6; } .gclock .tc-fg { fill: none; stroke: var(--violet); stroke-width: 6; stroke-linecap: round; stroke-dasharray: 125.7; transition: stroke-dashoffset .15s linear; }
.gclock span { position: absolute; inset: 0; display: grid; place-items: center; color: var(--ink); font: 800 18px/1 var(--disp); }
.gclock.danger { background: var(--red); animation: beat .5s infinite; } .gclock.danger span { color: #fff; } .gclock.danger .tc-fg { stroke: #fff; }
#glive { align-items: center; }
.glive-main { flex: 1; min-height: 0; width: 100%; max-width: 1200px; display: grid; grid-template-columns: minmax(0, 1fr) 230px; gap: 12px; }
.gcount { position: absolute; inset: 0; z-index: 6; display: grid; place-content: center; justify-items: center; gap: 4px; pointer-events: none; }
.gcount b { display: grid; place-items: center; width: 110px; height: 110px; color: var(--ink); background: var(--gold); border: 5px solid var(--ink); border-radius: 50%; box-shadow: 0 8px 0 var(--ink); font: 800 64px/1 var(--disp); animation: pop .35s cubic-bezier(.2, 1.8, .4, 1); }
.gcount small { padding: 3px 12px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 99px; font: 800 14px/1.2 var(--ui); }
.gboard { align-self: center; padding: 10px; color: var(--ink); background: #fff; border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 6px 0 var(--ink); max-height: 100%; overflow-y: auto; }
.gboard h3 { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font: 800 17px/1 var(--disp); }
.gboard h3 .zi { color: var(--gold); }
.gboard ol { display: grid; gap: 5px; margin: 0; padding: 0; list-style: none; }
.gboard li { display: grid; grid-template-columns: 26px 28px minmax(0, 1fr) auto; align-items: center; gap: 6px; padding: 4px 6px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 12px; font: 800 13px/1.2 var(--ui); }
.gboard li.me { background: #F2FCCF; } .gboard li.out { opacity: .45; text-decoration: line-through; }
.boot { position: absolute; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center; gap: 10px; background: rgb(30 19 56 / .85); color: var(--soft); font-weight: 700; }
.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; }
.final-title .zi { color: var(--gold); width: .9em; height: .9em; vertical-align: -.08em; }
.rule-help { margin: 2px 0 0; color: #6b5f8f; font: 700 12px/1.35 var(--ui); }
.seg button .zi { width: 15px; height: 15px; vertical-align: -.2em; }
/* ---------- nível de ajuda (v1.192.0): Fácil = números coloridos; Médio = resultado em palavras; Difícil = só bolinhas ---------- */
.row .rd b.mg { background: var(--pg); }
.row .rd b.my { background: var(--py); }
.row .rd b.mx { color: #8a80a8; background: #E4DFF1; border-color: #8a80a8; text-decoration: line-through 2px rgb(138 128 168 / .55); }
.row .rd b.hold { color: var(--ink); background: #fff; border-color: var(--ink); text-decoration: none; }
.row .rd b.pop { animation: pinPop .3s cubic-bezier(.2, 1.8, .4, 1); }
.row .rt { display: flex; flex-wrap: wrap; gap: 3px 4px; white-space: normal; overflow: visible; }
.row:has(.rt:not(:empty)) { grid-template-areas: "n d p" "n t t"; row-gap: 5px; }
.row:has(.rt:not(:empty)) .rn { align-self: start; margin-top: 7px; }
.row .rt:empty { display: none; }
.row .rt.wait { visibility: hidden; }
.tw { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px 2px 5px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 99px; font: 800 11.5px/1.15 var(--ui); white-space: nowrap; }
.tw::before { content: ''; flex: none; width: 9px; height: 9px; border: 1.5px solid var(--ink); border-radius: 50%; }
.tw.g { background: #DDF8C4; } .tw.g::before { background: var(--pg); }
.tw.y { background: #FFF1C2; } .tw.y::before { background: var(--py); }
.tw.x { color: #6b5f8f; border-style: dashed; border-color: #b9add9; } .tw.x::before { border-style: dashed; border-color: #b9add9; }
.tw.w { background: var(--lime); letter-spacing: .1em; } .tw.w::before { display: none; }
.row.win .rt { letter-spacing: 0; }
.lg { display: inline-grid; place-items: center; width: 17px; height: 19px; margin: 0 2px 0 6px; color: var(--ink); border: 2px solid var(--ink); border-radius: 5px; font: 800 11px/1 var(--disp); vertical-align: -.25em; }
.lg.g { background: var(--pg); } .lg.y { background: var(--py); } .lg.x { color: #8a80a8; background: #E4DFF1; border-color: #8a80a8; }
.rows .empty .lg { width: auto; height: auto; padding: 0 4px; font: 800 12px/1.4 var(--ui); }
.help-demo { margin: 10px 0 4px; padding: 10px; background: #F4F0FF; border: 2px dashed #b9add9; border-radius: 14px; }
.help-demo p { margin: 0 0 4px; font: 600 14px/1.35 var(--ui); }
.help-demo small { display: block; margin-bottom: 6px; color: #6b5f8f; font: 700 12px/1.3 var(--ui); }
.help-demo .rows { overflow: visible; }
.help-demo .row { background: #fff; }
#helpDesc { margin: 6px 0 0; }
/* tela baixa (celular deitado): o texto vai na mesma linha, depois das bolinhas */
@media (max-height: 560px) and (orientation: landscape) {
  .row, .row:has(.rt:not(:empty)) { grid-template-columns: 26px auto auto minmax(0, 1fr); grid-template-areas: "n d p t"; row-gap: 0; }
  .row:has(.rt:not(:empty)) .rn { align-self: center; margin-top: 0; }
  .row .rt { display: flex; flex-wrap: wrap; gap: 2px 3px; }
  .row .rt:empty { display: none; }
  .tw { padding: 1px 6px 1px 4px; font-size: 10.5px; }
  .tw .lt { display: none; }
}

/* ---------- v1.247.0 (pedido do Ally): contadores no lugar das bolinhas + janela "Ver todos" ----------
   As 4 bolinhas ao lado dos números pareciam dizer a posição ("a 1ª verde = o 1º número está certo"). Agora são dois contadores à direita:
   verde = QUANTOS estão no lugar certo, amarelo = QUANTOS estão certos fora do lugar (zero fica apagado e tracejado). */
.row .rp { justify-content: flex-end; align-items: center; gap: 6px; padding-left: 6px; border-left: 2px dashed #cfc4ee; align-self: stretch; }
.ct { display: inline-grid; place-items: center; min-width: 32px; height: 32px; padding: 0 7px; color: var(--ink); border: 2px solid var(--ink); border-radius: 99px; font: 800 18px/1 var(--disp); font-variant-numeric: tabular-nums; box-shadow: inset 0 -3px 0 rgb(0 0 0 / .14); vertical-align: middle; }
.ct b { font: inherit; }
.ct.g { background: var(--pg); }
.ct.y { background: var(--py); }
.ct.z { color: #a59bc4; background: #fff; border: 2px dashed #b9add9; box-shadow: none; }
.ct.wait { transform: scale(0); }
.ct.pop { animation: pinPop .3s cubic-bezier(.2, 1.8, .4, 1); }
.ct.sm, .rp.sm .ct { min-width: 20px; height: 20px; padding: 0 5px; border-width: 1.5px; font-size: 12px; box-shadow: inset 0 -2px 0 rgb(0 0 0 / .14); vertical-align: -.2em; }
.legend .ct.sm { margin-left: 4px; }
.rp.sm { gap: 3px; }
.rows.mini .row .ct { min-width: 24px; height: 24px; padding: 0 5px; font-size: 14px; }
.over-card .grid .rp { gap: 3px; } .over-card .grid .ct { min-width: 20px; height: 20px; padding: 0 5px; border-width: 1.5px; font-size: 12px; }
@media (max-height: 560px) and (orientation: landscape) { .ct { min-width: 26px; height: 26px; font-size: 15px; } }
@media (orientation: portrait) and (max-height: 720px) { .row .ct { min-width: 28px; height: 28px; font-size: 16px; } }

/* "Ver todos" no tabuleiro: título + botão na 1ª linha, legenda embaixo */
.board-head h2 { margin-right: auto; }
.board-head .legend { flex-basis: 100%; }
.mini-btn.all { display: inline-flex; align-items: center; gap: 5px; box-shadow: 0 2px 0 var(--ink); cursor: pointer; }
.mini-btn.all[hidden] { display: none; }
.mini-btn.all:active { transform: translateY(2px); box-shadow: none; }

/* a janela: quase a tela toda, lista no tamanho grande (mesmo no celular baixo), rola sozinha */
.modal[data-kind="all"] .modal-card { display: flex; flex-direction: column; width: min(100%, 560px); height: min(90vh, 820px); height: min(90dvh, 820px); max-height: none; overflow: hidden; padding: 18px 14px 14px; }
.modal[data-kind="all"] .modal-card h2 { margin-bottom: 10px; }
.all-tabs { flex: none; margin-bottom: 8px; }
.all-tabs button small { display: inline-grid; place-items: center; min-width: 20px; height: 20px; margin-left: 3px; padding: 0 5px; color: var(--ink); background: #fff; border: 1.5px solid var(--ink); border-radius: 99px; font: 800 11px/1 var(--ui); }
.all-sub { flex: none; margin: 0 0 4px; color: #4b3f74; font: 700 13px/1.35 var(--ui); }
.all-legend { flex: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0 0 10px; color: #6b5f8f; font: 800 12px/1.4 var(--ui); }
.modal-card .rows { padding: 0 2px 4px; }
.modal-card .rows li { margin: 0; }
.rows.in-modal { flex: 1; min-height: 0; max-height: none; overflow-y: auto; gap: 8px; }
.rows.in-modal .row { padding: 7px 10px 7px 7px; }
.rows.in-modal .row .rd b { width: 36px; height: 42px; font-size: 25px; }
.rows.in-modal .row .ct { min-width: 32px; height: 32px; font-size: 18px; }
.rows.in-modal .row .rt { display: flex; }
.rows.in-modal .row .rt:empty { display: none; }
@media (max-width: 400px) { .rows.in-modal .row .rd b { width: 32px; height: 38px; font-size: 22px; } .rows.in-modal .row { column-gap: 8px; } }
@media (max-height: 560px) and (orientation: landscape) {
  .modal[data-kind="all"] .modal-card { height: 94vh; height: 94dvh; padding-top: 12px; }
  .modal[data-kind="all"] .modal-card h2 { font-size: 20px; margin-bottom: 6px; }
  .rows.in-modal .row, .rows.in-modal .row:has(.rt:not(:empty)) { grid-template-columns: 26px auto auto minmax(0, 1fr); grid-template-areas: "n d p t"; }
}
