/* Zovy Battle Brasil — estratégia no mapa do Brasil, no visual "figurinha" do Zovy com tabuleiro pintado. A base (botões, cartões, sala de espera,
   modal, avisos) é a mesma dos outros jogos ao vivo (copiada do Buraco); o que é só deste jogo (mapa, peças, dados, painel) vem depois. */
: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-cards { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.bg-cards 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; }


/* sala de espera e fim */
.watchers { margin-top: 8px; color: #6b5f8f; font: 700 13px/1.4 var(--ui); }
.watchers img { width: 26px; height: 26px; margin-left: 4px; vertical-align: middle; border: 2px solid var(--ink); border-radius: 50%; }
.players li.bot { background: #EEF6FF; border-style: dashed; }
.players li.bot .ico { display: grid; place-items: center; width: 54px; height: 54px; color: var(--ink); background: #fff; border: 2px solid var(--ink); border-radius: 50%; font: 800 22px/1 var(--disp); }
.players li.bot.off { opacity: .6; background: transparent; }
.players .pill { font-size: 10px; }
.final-head { display: grid; justify-items: center; gap: 6px; text-align: center; padding-top: 34px; }
.final-head .big { font: 800 clamp(34px, 9vw, 62px)/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 .who { position: relative; display: flex; justify-content: center; }
.final-head .who img { width: clamp(70px, 18vw, 110px); height: clamp(70px, 18vw, 110px); background: #fff; border: 4px solid var(--ink); border-radius: 50%; box-shadow: 0 6px 0 var(--ink); animation: popUp .7s .2s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.final-head .who img + img { margin-left: -16px; }
.final-head .who .crw { position: absolute; left: 50%; top: -30px; width: 52px; transform: translateX(-50%) rotate(-8deg); color: var(--gold); animation: popUp .6s .7s cubic-bezier(.2, 1.6, .4, 1) backwards; }
.flist li { grid-template-columns: 30px auto minmax(0, 1fr) auto; }
.flist .duo-av { display: flex; } .flist .duo-av img + img { margin-left: -12px; }
.flist small { display: block; color: #6b5f8f; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.final-stats { margin: 10px 0 0; color: #4b3f74; font-weight: 700; font-size: 14px; }


/* =====================================================================
   Zovy Battle Brasil: o que é só deste jogo
   ===================================================================== */
:root { --sea: #0E5A6B; --sea-d: #0A3540; --parch: #E8C98A; --wood: #3B2412; }
#app { background: radial-gradient(circle at 85% 0, rgb(255 214 120 / .18), transparent 45%), radial-gradient(circle at 0 100%, rgb(46 230 255 / .16), transparent 50%), linear-gradient(165deg, #12606f 0%, #0c3f4c 55%, #082a33 100%); }
.bg-sea { position: absolute; inset: 0; pointer-events: none; opacity: .5; background: repeating-radial-gradient(circle at 50% 120%, transparent 0 38px, rgb(255 255 255 / .05) 38px 40px); }

/* menu */
.hero { display: grid; justify-items: center; gap: 6px; text-align: center; }
.hero-map { position: relative; width: min(300px, 70vw); height: clamp(96px, 22vw, 140px); }
.hero-map img { position: absolute; bottom: 0; width: clamp(88px, 21vw, 128px); height: auto; border-radius: 50%; filter: drop-shadow(0 6px 0 rgb(0 0 0 / .35)); animation: medIn .7s cubic-bezier(.2, 1.5, .4, 1) backwards, medBob 4s ease-in-out infinite; }
.hero-map .m1 { left: 0; transform: rotate(-8deg); animation-delay: .05s, .9s; } .hero-map .m2 { left: 50%; margin-left: calc(clamp(88px, 21vw, 128px) / -2); bottom: 10px; z-index: 1; animation-delay: .15s, 1.4s; } .hero-map .m3 { right: 0; transform: rotate(8deg); animation-delay: .25s, 1.9s; }
@keyframes medIn { from { opacity: 0; translate: 0 50px; scale: .6; } }
@keyframes medBob { 50% { translate: 0 -7px; } }
.hero-sign { display: block; margin: 4px 0 0; font: 800 clamp(38px, 11vw, 74px)/.92 var(--disp); letter-spacing: -.02em; color: #FFE9A8; text-shadow: 0 3px 0 #8a4b12, 0 7px 0 rgb(0 0 0 / .35); -webkit-text-stroke: 2px #5a2e0a; paint-order: stroke fill; }
.hero-sign small { display: block; margin-bottom: 4px; font: 800 clamp(13px, 3.4vw, 18px)/1 var(--ui); letter-spacing: .5em; color: var(--lime); -webkit-text-stroke: 0; text-shadow: 0 2px 0 rgb(0 0 0 / .4); }
.hero-sign em { font-style: normal; color: var(--lime); -webkit-text-stroke: 2px #2a4a08; text-shadow: 0 3px 0 #2a4a08, 0 7px 0 rgb(0 0 0 / .35); }
.tag { max-width: 520px; margin: 4px auto 0; color: #e6f6f8; }
.colors { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.colors button { width: 40px; height: 40px; padding: 0; background: var(--c); border: 3px solid var(--ink); border-radius: 50%; box-shadow: 0 3px 0 var(--ink); }
.colors button.on { outline: 4px solid var(--lime); outline-offset: 2px; }

/* ---------- a mesa ---------- */
#mesa { padding-left: max(6px, env(safe-area-inset-left)); padding-right: max(6px, env(safe-area-inset-right)); gap: 6px; }
.hud { display: flex; align-items: center; gap: 6px; flex: none; }
.hud .icon-btn { flex: none; width: 40px; height: 40px; }
.hud .icon-btn.off { opacity: .55; }
.hud-players { flex: 1; min-width: 0; display: flex; gap: 5px; justify-content: center; }
.pl { position: relative; flex: 0 1 150px; min-width: 0; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 1px 5px; padding: 3px 8px 3px 3px; color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 99px; box-shadow: 0 3px 0 var(--ink); font: 800 12px/1.05 var(--ui); transition: transform .2s; }
.pl img { grid-row: 1 / 3; width: 30px; height: 30px; background: #fff; border: 3px solid var(--c); border-radius: 50%; }
.pl b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl small { display: flex; gap: 5px; font: 800 11px/1 var(--ui); color: #5b4f84; white-space: nowrap; overflow: hidden; }
.pl small i { display: inline-flex; align-items: center; gap: 1px; font-style: normal; } .pl small .cds { color: #b3541e; }
.pl small svg { flex: none; }
.pl.turn { background: var(--lime); transform: translateY(-2px) scale(1.05); z-index: 1; }
.pl.turn::after { content: ""; position: absolute; inset: -5px; border: 3px solid var(--lime); border-radius: 99px; opacity: .7; animation: plPulse 1.4s ease-out infinite; pointer-events: none; }
@keyframes plPulse { to { inset: -11px; opacity: 0; } }
.pl.out { opacity: .45; filter: grayscale(1); }
/* celular em pé com 4 ou mais na mesa: só o avatar e os números */
@media (max-aspect-ratio: 1/1) {
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl b { display: none; }
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl { display: block; padding: 3px; flex: none; }
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl img { display: block; }
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl small { position: absolute; right: -5px; bottom: -6px; min-width: 18px; height: 18px; padding: 0 4px; justify-content: center; align-items: center; color: #fff; background: var(--ink); border: 2px solid #fff; border-radius: 99px; font-size: 11px; overflow: visible; }
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl small i + i, .hud-players:not([data-n="2"]):not([data-n="3"]) .pl small svg { display: none; }
  .hud-players:not([data-n="2"]):not([data-n="3"]) .pl small .cds { display: none; }
  .hud-players[data-n="6"] .pl { padding-right: 4px; } .hud-players[data-n="6"] .pl img { width: 24px; height: 24px; border-width: 2px; }
}

.board-wrap { flex: 1; min-height: 0; min-width: 0; display: grid; place-items: center; container-type: size; }
.board { position: relative; width: min(100cqw, 100cqh); height: min(100cqw, 100cqh); border: 4px solid var(--wood); border-radius: 18px; box-shadow: 0 6px 0 rgb(0 0 0 / .35), inset 0 0 0 2px #7a4f22; overflow: hidden; background: var(--sea); }
#map { display: block; width: 100%; height: 100%; user-select: none; -webkit-user-select: none; touch-action: manipulation; }
#map .uf { stroke: #2b1707; stroke-width: 2.6; stroke-linejoin: round; fill-opacity: .7; cursor: pointer; transition: fill .45s, fill-opacity .25s; }
#map .uf:hover { fill-opacity: .8; }
#map .uf.dim { fill-opacity: .5; }
#map .uf.sel { fill-opacity: .88; }
#map .uf.flash { animation: ufFlash .7s ease-out; }
@keyframes ufFlash { 0%, 30% { fill: #fff; fill-opacity: .95; } }
#map .hl { fill: none; stroke-linejoin: round; pointer-events: none; }
#map .hl.sel { stroke: #fff; stroke-width: 7; filter: drop-shadow(0 0 6px #fff); }
#map .hl.atk { stroke: #ff3b3b; stroke-width: 6; stroke-dasharray: 14 9; animation: dash 1s linear infinite; }
#map .hl.own { stroke: var(--lime); stroke-width: 6; stroke-dasharray: 14 9; animation: dash 1s linear infinite; }
#map .hl.can { stroke: rgb(255 255 255 / .85); stroke-width: 3.5; stroke-dasharray: 3 9; stroke-linecap: round; animation: dash 1.6s linear infinite; }
#map .hl.goal { stroke: var(--gold); stroke-width: 7; filter: drop-shadow(0 0 5px #ffb800); }
@keyframes dash { to { stroke-dashoffset: -46; } }
#map .lead { stroke: #2b1707; stroke-width: 3; stroke-linecap: round; opacity: .75; pointer-events: none; }
#map .lead-dot { fill: #2b1707; pointer-events: none; }
#map .tk { cursor: pointer; transition: transform .2s; }
#map .tk .ring { fill: #1E1338; }
#map .tk .disc { stroke: rgb(255 255 255 / .55); stroke-width: 2; }
#map .tk text { font: 800 34px/1 "Bricolage Grotesque", "Figtree", sans-serif; fill: #fff; stroke: #1E1338; stroke-width: 6; paint-order: stroke fill; text-anchor: middle; dominant-baseline: central; pointer-events: none; }
#map .tk.big text { font-size: 28px; }
#map .tk .uf-name { font: 800 17px/1 "Figtree", sans-serif; stroke-width: 4.5; fill: #FFF3C4; letter-spacing: .04em; }
#map .tk.pop .tk-in { animation: tkPop .45s cubic-bezier(.2, 1.8, .4, 1); }
@keyframes tkPop { 0% { transform: scale(1); } 40% { transform: scale(1.45); } }
#map .tk.hit .tk-in { animation: tkHit .4s; }
@keyframes tkHit { 20% { transform: translate(-7px, 3px) rotate(-8deg); } 55% { transform: translate(6px, -2px) rotate(6deg); } }
#map .tk-in { transform-box: fill-box; transform-origin: center; }
#map .flt { font: 800 40px/1 "Bricolage Grotesque", sans-serif; stroke: #1E1338; stroke-width: 7; paint-order: stroke fill; text-anchor: middle; pointer-events: none; animation: fltUp 1.1s ease-out forwards; }
@keyframes fltUp { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-70px); } }
#map .arrow { fill: none; stroke-width: 12; stroke-linecap: round; pointer-events: none; filter: drop-shadow(0 3px 0 rgb(0 0 0 / .4)); animation: arrIn .9s ease-out forwards; }
#map .arrow-head { pointer-events: none; animation: arrIn .9s ease-out forwards; }
@keyframes arrIn { 0% { opacity: 0; } 15%, 70% { opacity: 1; } 100% { opacity: 0; } }
.round-pill { position: absolute; left: 8px; top: 8px; display: flex; gap: 6px; align-items: center; padding: 4px 10px; color: #FFF3C4; background: rgb(43 23 7 / .82); border: 2px solid #7a4f22; border-radius: 99px; font: 800 12px/1.2 var(--ui); pointer-events: none; }
.round-pill b { color: var(--lime); }

/* dados */
.dicebox { position: absolute; left: 50%; bottom: 10px; z-index: 3; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; padding: 8px 12px; color: var(--ink); background: rgb(255 251 240 / .96); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); transform: translateX(-50%); animation: diceIn .25s cubic-bezier(.2, 1.5, .4, 1); pointer-events: none; white-space: nowrap; }
@keyframes diceIn { from { opacity: 0; transform: translateX(-50%) translateY(20px) scale(.9); } }
.dicebox .side { display: grid; justify-items: center; gap: 4px; }
.dicebox .side small { display: flex; align-items: center; gap: 4px; font: 800 11px/1 var(--ui); max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
.dicebox .side small i { width: 10px; height: 10px; border-radius: 50%; background: var(--c); border: 1.5px solid var(--ink); }
.dicebox .ds { display: flex; gap: 4px; min-height: 30px; }
.dicebox .vs { font: 800 16px/1 var(--disp); color: #6b5f8f; }
.dicebox .loss { font: 800 13px/1 var(--ui); color: #d1263f; min-height: 13px; }
.die { position: relative; width: 30px; height: 30px; background: var(--c, #fff); border: 2.5px solid var(--ink); border-radius: 8px; box-shadow: 0 2px 0 var(--ink); display: grid; grid-template: repeat(3, 1fr) / repeat(3, 1fr); padding: 3px; }
.die i { width: 5px; height: 5px; margin: auto; border-radius: 50%; background: #fff; box-shadow: 0 0 0 1px rgb(0 0 0 / .35); visibility: hidden; }
.die i.on { visibility: visible; }
.die.lose { opacity: .45; transform: scale(.88); }
.die.roll { animation: dieRoll .5s ease-out; }
@keyframes dieRoll { 0% { transform: translateY(-26px) rotate(-200deg) scale(.7); opacity: 0; } 60% { transform: translateY(3px) rotate(12deg); opacity: 1; } }

/* painel de baixo */
.dock { flex: none; display: grid; gap: 6px; padding: 8px; color: var(--ink); background: var(--paper); border: 3px solid var(--ink); border-radius: 20px; box-shadow: 0 5px 0 var(--ink); }
.steps { display: flex; gap: 4px; align-items: center; }
.steps .st { flex: 1; display: flex; align-items: center; justify-content: center; gap: 5px; padding: 4px 6px; color: #7b7399; background: #EEE9FF; border: 2px solid transparent; border-radius: 10px; font: 800 12px/1.1 var(--ui); white-space: nowrap; }
.steps .st i { display: grid; place-items: center; width: 18px; height: 18px; color: #fff; background: #b9b1d8; border-radius: 50%; font: 800 11px/1 var(--ui); font-style: normal; }
.steps .st.on { color: var(--ink); background: var(--lime); border-color: var(--ink); } .steps .st.on i { background: var(--ink); }
.steps .st.done { color: #3f8f2f; } .steps .st.done i { background: #3f8f2f; }
.steps .who { flex: 1.4; display: flex; align-items: center; gap: 6px; min-width: 0; font: 800 13px/1.1 var(--ui); }
.steps .who img { width: 26px; height: 26px; border: 3px solid var(--c); border-radius: 50%; background: #fff; flex: none; }
.steps .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dock .hint { margin: 0; min-height: 1.3em; font: 700 14px/1.3 var(--ui); color: #3b2f66; text-align: center; }
.dock .hint b { color: var(--ink); }
.panel { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; min-height: 46px; }
.panel:empty { display: none; }
.panel .pool { display: flex; align-items: center; gap: 6px; font: 800 15px/1 var(--ui); }
.panel .pool b { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; color: #fff; background: var(--c, var(--violet)); border: 3px solid var(--ink); border-radius: 50%; font: 800 20px/1 var(--disp); box-shadow: 0 3px 0 var(--ink); }
.panel .qty { display: flex; gap: 4px; }
.panel .qty button, .panel .stepper button { min-width: 42px; height: 40px; padding: 0 10px; color: var(--ink); background: #fff; border: 2.5px solid var(--ink); border-radius: 12px; box-shadow: 0 3px 0 var(--ink); font: 800 15px/1 var(--ui); }
.panel .qty button.on { background: var(--lime); }
.panel .stepper { display: flex; align-items: center; gap: 6px; } .panel .stepper b { min-width: 30px; text-align: center; font: 800 22px/1 var(--disp); }
.panel .duel { display: flex; align-items: center; gap: 8px; font: 800 15px/1.1 var(--ui); }
.panel .duel .t { display: grid; justify-items: center; gap: 2px; }
.panel .duel .t b { display: grid; place-items: center; min-width: 34px; height: 34px; padding: 0 6px; color: #fff; background: var(--c); border: 3px solid var(--ink); border-radius: 50%; font: 800 17px/1 var(--disp); -webkit-text-stroke: .5px var(--ink); }
.panel .duel .t small { font: 800 11px/1 var(--ui); color: #5b4f84; }
.panel .duel .x { font-size: 18px; } .panel .odds { font: 800 12px/1 var(--ui); color: #5b4f84; }
.panel .btn { padding: 9px 12px; font-size: 14px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); }
.btn.red { background: #FF4B4B; color: #fff; } .btn.gold { background: var(--gold); }
.acts { display: grid; grid-template-columns: auto auto minmax(0, 1fr); gap: 6px; }
.btn.act-b { position: relative; padding: 10px 12px; font-size: 14px; border-radius: 14px; box-shadow: 0 4px 0 var(--ink); white-space: nowrap; }
.btn.act-b:disabled { opacity: .45; box-shadow: 0 2px 0 var(--ink); transform: translateY(2px); cursor: default; }
.btn.act-b .cnt { display: grid; place-items: center; min-width: 22px; height: 22px; padding: 0 5px; color: #fff; background: var(--pink); border: 2px solid var(--ink); border-radius: 99px; font: 800 12px/1 var(--ui); }
.btn.act-b .cnt.warn { background: var(--red); animation: cntPulse .8s ease-in-out infinite; }
@keyframes cntPulse { 50% { transform: scale(1.25); } }
#mesa.myturn #btnNext:not(:disabled) { animation: nextGlow 1.6s ease-in-out infinite; }
@keyframes nextGlow { 50% { box-shadow: 0 4px 0 var(--ink), 0 0 0 5px rgb(198 244 50 / .45); } }
#dock.timed { border-image: none; background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(90deg, var(--violet) var(--p, 100%), #d9d2f5 0) border-box; border-color: transparent; }
#dock.timed.low { background: linear-gradient(var(--paper), var(--paper)) padding-box, linear-gradient(90deg, var(--red) var(--p, 100%), #f5d2d8 0) border-box; }

/* cartas e objetivo (modal) */
.goal-card { display: grid; gap: 8px; padding: 14px; background: linear-gradient(160deg, #FFF3C4, #FFD98A); border: 3px solid var(--ink); border-radius: 18px; box-shadow: 0 5px 0 var(--ink); text-align: center; }
.goal-card .seal { justify-self: center; display: grid; place-items: center; width: 54px; height: 54px; color: #fff; background: #C2261F; border: 3px solid var(--ink); border-radius: 50%; }
.goal-card p { margin: 0; font: 800 18px/1.25 var(--disp); color: var(--ink); }
.goal-card small { font: 700 13px/1.3 var(--ui); color: #6b4a12; }
.regs { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 6px; margin-top: 10px; }
.regs span { display: flex; justify-content: space-between; gap: 6px; padding: 6px 10px; background: #F4F0FF; border: 2px solid var(--ink); border-radius: 12px; font: 800 13px/1.2 var(--ui); }
.regs span b { color: #3f8f2f; } .regs span.mine { background: var(--lime); }
.hand-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; margin: 10px 0; }
.tc { position: relative; display: grid; justify-items: center; gap: 4px; padding: 8px 6px 7px; color: var(--ink); background: linear-gradient(170deg, #FFFDF4, #F3E3B8); border: 3px solid var(--ink); border-radius: 14px; box-shadow: 0 4px 0 var(--ink); font: 800 12px/1.15 var(--ui); text-align: center; transition: transform .15s; }
.tc img { width: 64px; height: 64px; }
.tc small { font: 800 10px/1 var(--ui); color: #3f8f2f; min-height: 10px; }
.tc.on { transform: translateY(-8px); background: var(--lime); }
.tc.new { animation: tcNew .6s cubic-bezier(.2, 1.5, .4, 1); }
@keyframes tcNew { from { transform: translateY(40px) rotate(-10deg); opacity: 0; } }
#btnTrade { display: block; width: 100%; text-align: center; } #btnTrade .t { display: block; font-size: 18px; } #btnTrade small { display: block; margin-top: 3px; }
.trade-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: center; }
.shout { position: absolute; inset: 0; z-index: 30; display: grid; place-items: center; pointer-events: none; }
.shout span { padding: 0 12px; font: 800 clamp(34px, 9vw, 72px)/1 var(--disp); color: var(--lime); -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill; text-shadow: 0 6px 0 var(--ink); text-align: center; animation: shoutIn 1.5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.shout span.bad { color: #ffb3c4; }
@keyframes shoutIn { 0% { opacity: 0; transform: scale(.4) rotate(-6deg); } 18% { opacity: 1; transform: scale(1.08) rotate(-3deg); } 75% { opacity: 1; transform: scale(1) rotate(-3deg); } 100% { opacity: 0; transform: scale(1.15) rotate(-3deg); } }
.flist li i.dot { display: inline-block; width: 12px; height: 12px; margin-right: 5px; border: 2px solid var(--ink); border-radius: 50%; background: var(--c); vertical-align: -1px; }
.final-goal { display: block; margin: 8px 0 0; padding: 8px 12px; background: #FFF3C4; border: 2px solid var(--ink); border-radius: 12px; color: var(--ink); font: 700 13.5px/1.3 var(--ui); }

/* ---------- computador e celular deitado: mapa à esquerda, painel à direita ---------- */
@media (min-aspect-ratio: 1/1) {
  #mesa.on { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, 340px); grid-template-rows: auto minmax(0, 1fr); gap: 8px 12px; }
  .board-wrap { grid-column: 1; grid-row: 1 / 3; height: 100%; }
  .hud { grid-column: 2; grid-row: 1; flex-wrap: wrap; }
  .hud-players { order: 5; flex: 1 0 100%; flex-direction: column; gap: 5px; }
  .hud .icon-btn#btnQuit { margin-right: auto; }
  .pl { flex: none; grid-template-columns: auto minmax(0, 1fr) auto; padding: 4px 12px 4px 4px; font-size: 14px; }
  .pl small { grid-row: auto; font-size: 12.5px; }
  .pl img { grid-row: auto; width: 32px; height: 32px; }
  .pl.turn { transform: translateX(-4px) scale(1.03); }
  .dock { grid-column: 2; grid-row: 2; align-self: end; }
  .acts { grid-template-columns: 1fr 1fr; } .acts #btnNext { grid-column: 1 / 3; }
}
@media (min-aspect-ratio: 1/1) and (max-height: 520px) {
  .screen { padding-top: max(5px, env(safe-area-inset-top)); padding-bottom: max(5px, env(safe-area-inset-bottom)); }
  #mesa.on { grid-template-columns: minmax(0, 1fr) minmax(230px, 300px); gap: 4px 8px; }
  .hud .icon-btn { width: 32px; height: 32px; }
  .pl { padding: 1px 8px 1px 2px; font-size: 12px; box-shadow: 0 2px 0 var(--ink); } .pl img { width: 22px; height: 22px; border-width: 2px; }
  .hud-players { gap: 3px; }
  .dock { padding: 5px; gap: 3px; border-radius: 14px; } .dock .hint { font-size: 12px; min-height: 0; }
  .steps .st { padding: 2px 4px; font-size: 10.5px; } .steps .st i { width: 15px; height: 15px; font-size: 10px; }
  .panel { min-height: 0; gap: 5px; } .panel .btn, .btn.act-b { padding: 6px 8px; font-size: 12px; } .panel .qty button, .panel .stepper button { height: 32px; min-width: 34px; font-size: 13px; }
  .panel .pool b { min-width: 30px; height: 30px; font-size: 15px; } .panel .duel .t b { min-width: 26px; height: 26px; font-size: 13px; }
  .die { width: 24px; height: 24px; padding: 2px; } .die i { width: 4px; height: 4px; } .dicebox { padding: 5px 9px; }
  .tag { display: none; } .hero-map { height: 70px; } .hero-map img { width: 66px; } .hero-map .m2 { margin-left: -33px; }
  #menu .btn.big small { display: none; }
  #menu .menu-body { grid-template-columns: minmax(0, .85fr) minmax(0, 1fr); align-items: center; align-content: center; column-gap: 16px; row-gap: 6px; padding: 2px 0; }
  #menu .hero { grid-column: 1; grid-row: 1 / 4; } .hero-sign { font-size: min(44px, 12vh); }
  #menu .me-card { grid-column: 2; padding: 6px 10px; gap: 10px; } #menu .me-card .av-big { width: 48px; height: 48px; } #menu .me-card small { display: none; }
  #menu .menu-actions { grid-column: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; } #menu .menu-actions .btn.big { padding: 7px 10px; } #menu .menu-actions .join, #menu .menu-actions .menu-row, #menu .menu-actions .pub, #menu .menu-body > .pub { grid-column: 1 / 3; } #menu .menu-body > .pub { grid-column: 2; } #menu .join.card .join-row { margin-top: 0; }
  #menu .join.card { padding: 6px; } #menu .join.card label { display: none; } #menu #inpCode { min-width: 0; flex: 1; font-size: 17px; letter-spacing: .12em; padding: 5px 4px; } #menu .join-row .btn { padding: 7px 10px; font-size: 13px; flex: none; }
  #menu .menu-row .btn { padding: 4px 4px; font-size: 12.5px; } #menu .menu-actions .btn.big .t { font-size: 17px; } #menu .menu-actions .btn.big .ico { width: 34px; height: 34px; } #menu .pub.card { padding: 5px 10px; gap: 4px; }
  .final-head .big { font-size: 30px; } .final-head .who img { width: 56px; height: 56px; } .final-wrap { gap: 8px; } .final-head { padding-top: 24px; }
  .final-cols { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
}
@media (max-width: 400px) { .steps .st { font-size: 11px; padding: 4px 3px; } .btn.act-b { padding: 9px 9px; font-size: 13px; } }
@media (prefers-reduced-motion: reduce) {
  .hero-map img, #map .hl, .pl.turn::after, #mesa.myturn #btnNext, .die.roll, #map .tk.pop .tk-in, #map .tk.hit .tk-in { animation: none !important; }
}
.final-goal .zi { width: 16px; height: 16px; vertical-align: -.2em; }
