/* Buraco · RGBP Games */
:root {
  --bg: #0b2a21;
  --felt: #12402f;
  --panel: rgba(9, 30, 24, 0.82);
  --panel2: rgba(255, 255, 255, 0.06);
  --line: rgba(255, 255, 255, 0.1);
  --text: #eef5f0;
  --muted: #a9c2b6;
  --accent: #ffcb57;
  --accent2: #ffb020;
  --good: #4fd18b;
  --bad: #ff7a6b;
  --red: #d0343a;
  --black: #1c1f26;
  --cw: 60px;
  --mw: 32px;
  --r: 14px;
  --shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
  --c-azul: #4c9cff; --c-laranja: #ff9a3d; --c-roxo: #a77bff; --c-verde: #3fd08a; --c-rosa: #ff6fae; --c-amarelo: #f5d142;
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body {
  font: 15px/1.4 system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
  color: var(--text);
  background: var(--bg) url('../assets/felt.webp') center / cover fixed;
  overscroll-behavior: none;
}
body::before { content: ''; position: fixed; inset: 0; background: radial-gradient(ellipse at 50% 35%, rgba(0,0,0,0) 0%, rgba(0,0,0,.42) 100%); pointer-events: none; z-index: 0; }
#app { position: relative; z-index: 1; min-height: 100%; }
h1, h2, h3 { margin: 0 0 .4em; font-weight: 700; letter-spacing: -.01em; }
h1 { font-size: 1.7rem; } h2 { font-size: 1.1rem; }
p { margin: .3em 0 .7em; }
.muted { color: var(--muted); } .small { font-size: .85rem; } .center { text-align: center; justify-content: center; }
.row { display: flex; align-items: center; } .gap { gap: 8px; } .wrap { flex-wrap: wrap; } .grow { flex: 1; min-width: 0; }
.grow b, .grow small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow small { color: var(--muted); font-size: .8rem; }

/* ---------- controles ---------- */
.btn {
  font: inherit; font-weight: 600; color: var(--text); background: rgba(255,255,255,.1); border: 1px solid var(--line);
  border-radius: 12px; padding: 10px 16px; cursor: pointer; transition: background .15s, transform .08s, opacity .15s; touch-action: manipulation;
}
.btn:hover { background: rgba(255,255,255,.16); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .4; cursor: default; transform: none; }
.btn.primary { background: linear-gradient(180deg, var(--accent), var(--accent2)); color: #2b1d00; border-color: transparent; box-shadow: 0 3px 12px rgba(255,176,32,.25); }
.btn.primary:hover { filter: brightness(1.05); }
.btn.danger { color: #ffd2cc; border-color: rgba(255,122,107,.4); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 11px; font-size: .85rem; border-radius: 10px; }
.btn.big { padding: 13px 20px; font-size: 1.02rem; width: 100%; }
.row .btn.big { width: auto; flex: 1; }
.link-btn { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; margin-top: 8px; }
.icon-btn { font-size: 1.05rem; width: 38px; height: 38px; border-radius: 11px; border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--text); cursor: pointer; display: inline-grid; place-items: center; position: relative; }
.rgbp-home { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 12px; border-radius: 999px; text-decoration: none; font-weight: 700; font-size: 15px; line-height: 1; color: #2b1d00; background: linear-gradient(180deg, var(--accent), var(--accent2)); box-shadow: 0 2px 10px rgba(255,176,32,.3); flex: none; touch-action: manipulation; }
.rgbp-home svg { width: 22px; height: 22px; display: block; flex: none; }
.rgbp-home.corner { position: fixed; top: calc(env(safe-area-inset-top) + 12px); left: calc(env(safe-area-inset-left) + 12px); z-index: 20; }
.nav-btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; min-width: 44px; padding: 0 14px; border-radius: 999px; font: 700 14px/1 system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif; border: 1px solid rgba(255,203,87,.65); background: rgba(255,203,87,.2); color: var(--accent); cursor: pointer; touch-action: manipulation; flex: none; }
.nav-btn:hover { background: rgba(255,203,87,.3); }
.nav-confirm { margin-top: 14px; }
.icon-btn.on { color: var(--accent); }
.icon-btn .badge { position: absolute; top: -4px; right: -4px; background: var(--bad); color: #fff; font-size: .68rem; min-width: 17px; height: 17px; border-radius: 9px; display: grid; place-items: center; padding: 0 4px; }
.sound-btns { display: flex; gap: 6px; }
.input, .select { font: inherit; color: var(--text); background: rgba(0,0,0,.28); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; width: 100%; outline: none; }
.input:focus, .select:focus { border-color: var(--accent); }
.select option { background: #123; }
.input.shake { animation: shake .35s; border-color: var(--bad); }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.lbl { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 14px 0 6px; }
.seg { display: flex; gap: 4px; background: rgba(0,0,0,.25); padding: 4px; border-radius: 13px; margin: 6px 0; flex-wrap: wrap; }
.seg button { flex: 1; font: inherit; font-weight: 600; color: var(--muted); background: transparent; border: 0; border-radius: 10px; padding: 9px 8px; cursor: pointer; min-width: 64px; }
.seg button small { display: block; font-weight: 400; font-size: .72rem; }
.seg button.on { background: rgba(255,255,255,.14); color: var(--text); box-shadow: inset 0 0 0 1px rgba(255,203,87,.5); }
.seg.small button { padding: 7px 6px; font-size: .88rem; }
.toggle { display: flex; gap: 12px; align-items: center; padding: 10px 0; cursor: pointer; }
.toggle input { display: none; }
.toggle .sw { flex: none; width: 44px; height: 26px; border-radius: 13px; background: rgba(255,255,255,.18); position: relative; transition: background .2s; }
.toggle .sw::after { content: ''; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform .2s; }
.toggle input:checked + .sw { background: var(--good); }
.toggle input:checked + .sw::after { transform: translateX(18px); }
.toggle small { display: block; }
.pill { font-size: .78rem; padding: 3px 9px; border-radius: 20px; background: rgba(255,255,255,.1); }
.tag { font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; padding: 2px 6px; border-radius: 6px; background: rgba(255,255,255,.14); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; background: var(--muted); flex: none; }
.dot.c-azul { background: var(--c-azul); } .dot.c-laranja { background: var(--c-laranja); } .dot.c-roxo { background: var(--c-roxo); }
.dot.c-verde { background: var(--c-verde); } .dot.c-rosa { background: var(--c-rosa); } .dot.c-amarelo { background: var(--c-amarelo); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: .8rem; margin: 10px 0; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.avatar { border-radius: 50%; background: #e9efe9; object-fit: cover; flex: none; display: block; }

/* ---------- estrutura ---------- */
.screen { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.center-screen { align-items: center; justify-content: center; padding: 20px; }
.topbar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(5, 20, 16, .55); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-title { flex: 1; min-width: 0; line-height: 1.15; }
.top-title b { display: block; font-size: 1rem; } .top-title small { color: var(--muted); font-size: .78rem; display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-actions { display: flex; gap: 6px; align-items: center; }
.brand { display: flex; gap: 10px; align-items: center; flex: 1; }
.brand img { width: 38px; height: 38px; border-radius: 10px; }
.brand b { display: block; font-size: 1.1rem; line-height: 1; } .brand small { color: var(--muted); font-size: .75rem; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; box-shadow: var(--shadow); backdrop-filter: blur(6px); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.panel-head h2 { margin: 0; }
.count { font-size: .8rem; background: var(--good); color: #062; padding: 1px 8px; border-radius: 10px; font-weight: 700; }
.count:empty { display: none; }
.foot { text-align: center; color: var(--muted); font-size: .75rem; padding: 16px; }
.loading { display: grid; place-items: center; min-height: 60vh; color: var(--muted); }

/* home */
.welcome { width: min(420px, 100%); text-align: center; }
.welcome .btn.big { margin-top: 18px; }
.logo-big { width: 88px; height: 88px; border-radius: 22px; box-shadow: var(--shadow); }
.av-picker { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; justify-items: center; }
.av-picker button { border: 2px solid transparent; border-radius: 50%; padding: 2px; background: none; cursor: pointer; }
.av-picker button.on { border-color: var(--accent); }
.home-grid { display: grid; gap: 14px; padding: 14px; width: 100%; max-width: 1180px; margin: 0 auto; grid-template-columns: 1fr; }
@media (min-width: 860px) { .home-grid { grid-template-columns: 1.1fr 1fr; } .play-panel { grid-row: span 2; } .links-panel { grid-column: 1 / -1; } }
.play-panel .btn.big { margin-top: 10px; }
.join-row { gap: 8px; margin-top: 10px; } .join-row .input { text-transform: uppercase; letter-spacing: .15em; }
.list { display: flex; flex-direction: column; gap: 6px; max-height: 320px; overflow: auto; }
.list-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; background: var(--panel2); border-radius: 12px; }
.list .empty { padding: 10px 4px; }
.status { font-size: .74rem; padding: 3px 8px; border-radius: 10px; white-space: nowrap; }
.status.ok { background: rgba(79,209,139,.18); color: var(--good); } .status.busy { background: rgba(255,122,107,.16); color: var(--bad); } .status.idle { background: rgba(255,203,87,.15); color: var(--accent); }
.links-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.tile { font: inherit; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px 8px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 2px; }
.tile:hover { background: rgba(255,255,255,.1); }
.tile-ico { font-size: 1.5rem; } .tile small { color: var(--muted); font-size: .74rem; }
.profile-chip { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 24px; border: 1px solid var(--line); background: rgba(255,255,255,.07); color: var(--text); cursor: pointer; font: inherit; text-align: left; }
.pc-txt b { display: block; font-size: .85rem; line-height: 1.1; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pc-txt small { color: var(--muted); font-size: .7rem; display: block; }
.xpbar { height: 4px; border-radius: 2px; background: rgba(255,255,255,.15); margin-top: 3px; overflow: hidden; min-width: 70px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--good)); }
@media (max-width: 520px) { .pc-txt { display: none; } .profile-chip { padding: 2px; } }

/* perfil / ranking */
.profile-head { display: flex; gap: 14px; align-items: center; margin-bottom: 10px; }
.lv-badge { display: inline-block; background: var(--accent); color: #2b1d00; font-weight: 800; border-radius: 8px; padding: 1px 7px; font-size: .8rem; }
.level-line { margin: 6px 0; } .level-line .xpbar { height: 8px; border-radius: 4px; }
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 10px 0; }
.stat { background: var(--panel2); border-radius: 12px; padding: 10px; text-align: center; }
.stat b { display: block; font-size: 1.2rem; } .stat small { color: var(--muted); font-size: .72rem; }
.rank-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0; }
.rank-card { background: var(--panel2); border-radius: 12px; padding: 10px; }
.rank-table, .rules-table, .score-table, .standings { width: 100%; border-collapse: collapse; font-size: .9rem; }
.rank-table td, .rank-table th, .rules-table td, .rules-table th, .score-table td, .score-table th, .standings td, .standings th { padding: 7px 6px; border-bottom: 1px solid var(--line); text-align: left; }
th { color: var(--muted); font-weight: 600; font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.rk-name { display: flex; align-items: center; gap: 8px; }
.my-rank td { background: rgba(255,203,87,.1); }
.ranking .seg { margin-bottom: 10px; }

/* modais e toasts */
.modal-back { position: fixed; inset: 0; background: rgba(0,0,0,.5); display: grid; place-items: center; z-index: 100; padding: 14px; opacity: 0; transition: opacity .2s; }
.modal-back.in { opacity: 1; }
.modal { position: relative; width: min(440px, 100%); max-height: calc(100dvh - 28px); overflow: auto; background: #10342a; border: 1px solid var(--line); border-radius: 18px; padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.5); transform: translateY(10px) scale(.98); transition: transform .2s; }
.modal-back.in .modal { transform: none; }
.modal.wide { width: min(600px, 100%); }
.modal-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; border-radius: 50%; border: 0; background: rgba(255,255,255,.1); color: var(--text); font-size: 1.2rem; cursor: pointer; }
.menu-list { display: flex; flex-direction: column; gap: 8px; } .menu-list .btn { text-align: left; }
#toasts { position: fixed; left: 50%; top: 64px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 6px; align-items: center; pointer-events: none; width: min(92vw, 460px); }
.toast { background: rgba(10, 30, 24, .95); border: 1px solid var(--line); border-radius: 12px; padding: 10px 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(-8px); transition: all .25s; text-align: center; font-size: .92rem; }
.toast.in { opacity: 1; transform: none; }
.toast.error { border-color: rgba(255,122,107,.6); color: #ffd9d3; }
#conn-banner { position: fixed; bottom: 0; left: 0; right: 0; z-index: 300; background: #8a3b14; color: #fff; text-align: center; padding: 6px; font-size: .85rem; }

/* sala */
.room-grid { display: grid; gap: 14px; padding: 14px; width: 100%; max-width: 1180px; margin: 0 auto; grid-template-columns: 1fr; }
@media (min-width: 900px) { .room-grid { grid-template-columns: 1fr 340px; } .room-side { position: sticky; top: 14px; height: calc(100dvh - 100px); } }
.room-main { display: flex; flex-direction: column; gap: 14px; }
.room-side { display: flex; flex-direction: column; min-height: 300px; padding: 10px; }
.link-box { background: rgba(0,0,0,.3); border-radius: 10px; padding: 10px; margin: 8px 0 10px; overflow-x: auto; }
.link-box code { font-size: .85rem; color: var(--accent); white-space: nowrap; }
.teams-grid { display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.teams-grid.n3, .teams-grid.n5, .teams-grid.n6 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
@media (max-width: 520px) { .teams-grid { grid-template-columns: 1fr; } }
.team-card, .slot-team { background: var(--panel2); border-radius: 12px; padding: 10px; border-top: 3px solid var(--muted); }
.team-card.c-azul, .slot-team.c-azul { border-color: var(--c-azul); } .team-card.c-laranja, .slot-team.c-laranja { border-color: var(--c-laranja); }
.team-card.c-roxo, .slot-team.c-roxo { border-color: var(--c-roxo); } .team-card.c-verde, .slot-team.c-verde { border-color: var(--c-verde); }
.team-card.c-rosa, .slot-team.c-rosa { border-color: var(--c-rosa); } .team-card.c-amarelo, .slot-team.c-amarelo { border-color: var(--c-amarelo); }
.team-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.slot-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; }
.slot-row + .slot-row { border-top: 1px dashed var(--line); }
.slot-me { font-weight: 700; color: var(--accent); }
.slots-grid { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.champion { text-align: center; } .trophy { font-size: 3.5rem; }
.champ-view h3 { font-size: .95rem; margin-top: 12px; }
.games { display: flex; flex-direction: column; gap: 4px; }
.game-row { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 10px; background: var(--panel2); font-size: .88rem; }
.game-row .grow { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* chat */
.chat-panel { display: flex; flex-direction: column; gap: 6px; height: 100%; min-height: 0; flex: 1; }
.chat-tabs { display: flex; gap: 4px; }
.chat-tabs button { flex: 1; font: inherit; font-size: .85rem; color: var(--muted); background: transparent; border: 0; border-bottom: 2px solid transparent; padding: 6px; cursor: pointer; }
.chat-tabs button.on { color: var(--text); border-color: var(--accent); }
.chat-list { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; min-height: 120px; padding: 2px; }
.msg { background: var(--panel2); padding: 6px 9px; border-radius: 10px; font-size: .88rem; align-self: flex-start; max-width: 92%; }
.msg.mine { align-self: flex-end; background: rgba(255,203,87,.14); }
.msg b { margin-right: 6px; font-size: .8rem; color: var(--accent); }
.msg small { color: var(--muted); font-size: .68rem; margin-left: 6px; }
.log { font-size: .82rem; color: var(--muted); display: flex; gap: 6px; }
.log small { opacity: .6; flex: none; }
.log.canastra, .log.win, .log.morto { color: var(--accent); } .log.sys { color: #9fd3ff; }
.emote-row { display: flex; gap: 2px; flex-wrap: wrap; justify-content: center; }
.emo { font-size: 1.25rem; background: none; border: 0; cursor: pointer; padding: 3px 5px; border-radius: 8px; }
.emo:hover { background: rgba(255,255,255,.1); }
.chat-form { display: flex; gap: 6px; } .chat-form .input { padding: 8px 10px; }

/* ---------- cartas ---------- */
.card {
  --w: var(--cw);
  width: var(--w); height: calc(var(--w) * 1.4); border-radius: calc(var(--w) * .1);
  background: linear-gradient(160deg, #ffffff 0%, #f6f3ea 100%);
  box-shadow: 0 1px 2px rgba(0,0,0,.35), 0 3px 8px rgba(0,0,0,.18);
  color: var(--black); position: relative; user-select: none; -webkit-user-select: none; flex: none;
  border: 1px solid rgba(0,0,0,.18);
}
.card.s-H, .card.s-D, .mini.s-H, .mini.s-D { color: var(--red); }
.four-color .card.s-D, .four-color .mini.s-D { color: #1d6fd1; }
.four-color .card.s-C, .four-color .mini.s-C { color: #178045; }
.card .corner { position: absolute; top: 4%; left: 7%; display: flex; flex-direction: column; align-items: center; line-height: .95; }
.card .corner b { font-size: calc(var(--w) * .3); font-weight: 800; letter-spacing: -.04em; }
.card .corner i { font-style: normal; font-size: calc(var(--w) * .24); }
.card .corner.br { top: auto; left: auto; bottom: 4%; right: 7%; transform: rotate(180deg); }
.card .pip { position: absolute; inset: 0; display: grid; place-items: center; font-size: calc(var(--w) * .52); padding-top: 6%; }
.card.face .pip { inset: 18% 20%; border-radius: 6px; background: rgba(0,0,0,.04); border: 1px solid rgba(0,0,0,.08); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: calc(var(--w) * .28); line-height: 1; padding: 0; }
.face-letter { font-weight: 800; font-size: calc(var(--w) * .34); font-family: Georgia, 'Times New Roman', serif; }
.card.joker { background: linear-gradient(160deg, #fff 0%, #f3ecff 100%); color: #6a3fd1; }
.card.joker .joker-word { position: absolute; bottom: 12%; left: 0; right: 0; text-align: center; font-size: calc(var(--w) * .13); font-weight: 800; letter-spacing: .04em; }
.card.joker .pip { font-size: calc(var(--w) * .5); }
.card.back { background: #1b4a8a url('../assets/back.webp') center / cover; border: 2px solid #fff; }
.card.empty { background: rgba(0,0,0,.18); border: 2px dashed rgba(255,255,255,.2); box-shadow: none; }
/* em jogos baixados: pequenas, sobrepostas */
.mini {
  width: var(--mw); height: calc(var(--mw) * 1.36); border-radius: calc(var(--mw) * .14); background: #fbf9f3;
  box-shadow: 0 1px 2px rgba(0,0,0,.35); display: flex; flex-direction: column; align-items: flex-start; padding: 2px 0 0 calc(var(--mw) * .1);
  color: var(--black); line-height: .95; flex: none; border: 1px solid rgba(0,0,0,.15); position: relative;
}
.mini b { font-size: calc(var(--mw) * .42); font-weight: 800; letter-spacing: -.05em; }
.mini i { font-style: normal; font-size: calc(var(--mw) * .38); }
.mini.joker { color: #6a3fd1; }
.mini.wild { background: #fff3cf; }
.mini.wild::after { content: ''; position: absolute; inset: auto 2px 2px auto; width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); }
.minis { display: flex; }
.minis .mini + .mini { margin-left: calc(var(--mw) * -.5); }

/* ---------- mesa ---------- */
.screen.game { height: 100vh; height: 100dvh; overflow: hidden; }
.game-top { padding: 6px 10px; padding-top: max(6px, env(safe-area-inset-top)); gap: 8px; }
.game-top .top-title { flex: 0 1 auto; max-width: 34%; }
.scorebox { flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.sc { text-align: center; line-height: 1.05; padding: 3px 10px; border-radius: 10px; background: rgba(0,0,0,.25); border-bottom: 3px solid var(--muted); min-width: 64px; }
.sc small { display: block; font-size: .68rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.sc b { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.sc i { display: block; font-style: normal; font-size: .7rem; color: var(--muted); }
.sc.c-azul { border-color: var(--c-azul); } .sc.c-laranja { border-color: var(--c-laranja); } .sc.c-roxo { border-color: var(--c-roxo); }
.sc.c-verde { border-color: var(--c-verde); } .sc.c-rosa { border-color: var(--c-rosa); } .sc.c-amarelo { border-color: var(--c-amarelo); }
.vs { color: var(--muted); }
.game-body { flex: 1; display: flex; min-height: 0; position: relative; }
.game-main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.drawer { width: 0; overflow: hidden; transition: width .25s; background: rgba(5, 20, 16, .7); border-left: 1px solid var(--line); display: flex; }
.drawer .chat-panel { padding: 10px; width: 320px; flex: none; }
.chat-open .drawer { width: 320px; }
@media (max-width: 1099px) {
  .drawer { position: absolute; right: 0; top: 0; bottom: 0; z-index: 40; width: min(340px, 88vw) !important; transform: translateX(105%); transition: transform .25s; box-shadow: -10px 0 30px rgba(0,0,0,.4); background: rgba(8, 28, 22, .97); }
  .drawer .chat-panel { width: 100%; }
  .chat-open .drawer { transform: none; }
}

.board {
  flex: 1; min-height: 0; display: grid; gap: 6px; padding: 6px 8px;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1.25fr);
  grid-template-areas: "left top right" "theirs theirs theirs" "center center center" "ours ours ours";
}
.board.n2 { grid-template-areas: "top top top" "theirs theirs theirs" "center center center" "ours ours ours"; }
.pos-top { grid-area: top; justify-self: center; } .pos-left { grid-area: left; } .pos-right { grid-area: right; justify-self: end; }
.theirs { grid-area: theirs; } .ours { grid-area: ours; } .center { grid-area: center; }
@media (orientation: landscape) and (min-width: 700px) {
  .board.n4 { grid-template-columns: minmax(120px, auto) 1fr minmax(120px, auto); grid-template-rows: auto minmax(0, 1fr) auto minmax(0, 1.25fr);
    grid-template-areas: "left top right" "left theirs right" "left center right" "left ours right"; }
  .pos-left, .pos-right { align-self: center; }
}
.seat { display: flex; }
.chip { display: flex; align-items: center; gap: 8px; background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 30px; padding: 4px 10px 4px 4px; position: relative; transition: box-shadow .2s, background .2s; max-width: 100%; }
.chip.active { background: rgba(255,203,87,.14); box-shadow: 0 0 0 2px rgba(255,203,87,.6), 0 0 18px rgba(255,203,87,.25); }
.chip-txt { min-width: 0; line-height: 1.1; }
.chip-txt b { display: block; font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 120px; }
.chip-txt small { display: block; font-size: .68rem; color: var(--muted); white-space: nowrap; }
.chip-txt small:empty { display: none; }
.av-wrap { position: relative; flex: none; }
.chip .avatar { border: 2px solid var(--muted); }
.chip.c-azul .avatar { border-color: var(--c-azul); } .chip.c-laranja .avatar { border-color: var(--c-laranja); } .chip.c-roxo .avatar { border-color: var(--c-roxo); }
.chip.c-verde .avatar { border-color: var(--c-verde); } .chip.c-rosa .avatar { border-color: var(--c-rosa); } .chip.c-amarelo .avatar { border-color: var(--c-amarelo); }
.ring { position: absolute; inset: -4px; border-radius: 50%; display: none; }
.ring.on { display: block; background: conic-gradient(var(--accent) calc(var(--p, 1) * 360deg), rgba(255,255,255,.1) 0); -webkit-mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); mask: radial-gradient(circle, transparent calc(50% - 3px), #000 calc(50% - 2px)); }
.ring.on.low { background: conic-gradient(var(--bad) calc(var(--p, 1) * 360deg), rgba(255,255,255,.1) 0); }
.lvl { position: absolute; bottom: -4px; right: -6px; background: var(--accent); color: #2b1d00; font-size: .62rem; font-weight: 800; border-radius: 7px; padding: 0 4px; border: 1.5px solid #10342a; }
.cnt { display: flex; align-items: center; gap: 4px; font-weight: 700; font-size: .9rem; font-variant-numeric: tabular-nums; }
.mini-back { display: inline-block; width: 12px; height: 16px; border-radius: 2px; background: #1b4a8a url('../assets/back.webp') center / cover; border: 1px solid #fff; }
.morto-tag { background: var(--c-roxo); color: #fff; }
.emote-bubble { position: absolute; top: -26px; left: 22px; font-size: 1.7rem; opacity: 0; pointer-events: none; }
.emote-bubble.show { animation: emote 2.2s ease; }
@keyframes emote { 0% { opacity: 0; transform: translateY(8px) scale(.6); } 12% { opacity: 1; transform: translateY(-4px) scale(1.15); } 22% { transform: none; } 80% { opacity: 1; } 100% { opacity: 0; transform: translateY(-14px); } }

.melds { background: rgba(0,0,0,.16); border: 1px solid rgba(255,255,255,.06); border-radius: 14px; padding: 5px 8px 8px; overflow-y: auto; min-height: 0; }
.melds.ours { background: rgba(0,0,0,.22); }
.melds-head { display: flex; align-items: center; gap: 8px; font-size: .8rem; margin-bottom: 5px; position: sticky; top: -5px; background: inherit; }
.melds-head small { color: var(--muted); font-size: .72rem; } .melds-head small.ok { color: var(--good); font-weight: 700; }
.melds-head b { font-size: .85rem; }
.meld-list { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.meld { position: relative; padding: 8px; border-radius: 10px; border: 1.5px solid transparent; transition: border-color .15s, background .15s, transform .15s; min-height: calc(var(--mw) * 1.36 + 16px); }
.ours .meld { cursor: pointer; }
.ours .meld::after { content: ''; position: absolute; inset: -10px; z-index: 1; }
.meld.fits { border-color: var(--accent); background: rgba(255,203,87,.15); animation: pulse 1.4s infinite; padding: 10px; box-shadow: 0 0 0 2px rgba(255,203,87,.35); }
@keyframes pulse { 50% { box-shadow: 0 0 0 4px rgba(255,203,87,.2); } }
.meld.drop-hover, .new-meld.drop-hover { border-color: var(--good) !important; background: rgba(79,209,139,.2) !important; transform: scale(1.04); }
.meld.canastra { background: rgba(255,255,255,.07); }
.meld.c-suja { border-color: #8aa4b8; } .meld.c-limpa { border-color: var(--accent); } .meld.c-500 { border-color: var(--c-roxo); } .meld.c-real { border-color: #ff5a5a; box-shadow: 0 0 12px rgba(255,90,90,.35); }
.can-badge { position: absolute; top: -7px; right: -5px; font-size: .58rem; font-weight: 800; text-transform: uppercase; padding: 1px 5px; border-radius: 6px; background: #8aa4b8; color: #10202b; }
.c-limpa .can-badge { background: var(--accent); color: #2b1d00; } .c-500 .can-badge { background: var(--c-roxo); color: #fff; } .c-real .can-badge { background: #ff5a5a; color: #fff; }
.meld.fresh { animation: pop .45s ease; } .meld.grew { animation: grew .45s ease; }
@keyframes pop { 0% { transform: scale(.6); opacity: 0; } 70% { transform: scale(1.06); } 100% { transform: none; opacity: 1; } }
@keyframes grew { 40% { transform: scale(1.08); } }
.meld.shine::before { content: ''; position: absolute; inset: 0; border-radius: 8px; background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.6) 50%, transparent 70%); background-size: 250% 100%; animation: shine 1.2s ease; pointer-events: none; z-index: 2; }
@keyframes shine { from { background-position: 120% 0; } to { background-position: -120% 0; } }
.new-meld { min-height: calc(var(--mw) * 1.9 + 20px); min-width: calc(var(--mw) * 3.8); border: 2px dashed rgba(255,255,255,.28); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; color: var(--muted); font-size: .8rem; padding: 10px 14px; text-align: center; }
.new-meld small { font-size: .68rem; color: var(--muted); font-weight: 400; }
.new-meld.fits { color: var(--accent); border-color: var(--accent); }
.is-dragging .new-meld, .ours.drop-ready .new-meld { border-color: var(--accent); color: var(--accent); background: rgba(255,203,87,.1); }
.ours.drop-ready { box-shadow: inset 0 0 0 2px rgba(255,203,87,.4); background: rgba(255,203,87,.07); }
.ours.extend-ready { box-shadow: inset 0 0 0 2px rgba(255,203,87,.25); }
.ours.drop-hover { box-shadow: inset 0 0 0 2px var(--good); background: rgba(79,209,139,.1); }
@media (max-width: 700px) {
  .ours .meld { padding: 10px; }
  .ours .meld::after { inset: -12px; }
  .new-meld { min-width: min(100%, calc(var(--mw) * 5)); min-height: calc(var(--mw) * 2.2 + 24px); }
}
.empty-melds { padding: 4px 2px; }

.center { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.piles { display: flex; align-items: flex-end; justify-content: center; gap: 18px; }
.pile { --w: calc(var(--cw) * .78); background: none; border: 0; padding: 0 0 14px; position: relative; cursor: pointer; color: var(--text); font: inherit; border-radius: 10px; }
.pile-zone { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; min-width: 108px; min-height: 138px; padding: 18px 22px 28px; margin: -6px 2px 0; border-radius: 18px; border: 2px solid transparent; background: none; color: inherit; font: inherit; cursor: pointer; touch-action: manipulation; transition: background .15s, box-shadow .15s, border-color .15s; }
.pile-zone .pile { pointer-events: none; }
.pile-zone.discard-zone { min-width: 124px; min-height: 156px; padding: 20px 26px 32px; border-color: rgba(255,255,255,.16); background: rgba(0,0,0,.14); }
.zone-hint { position: absolute; left: 6px; right: 6px; bottom: 4px; text-align: center; font-size: .66rem; line-height: 1.15; color: var(--muted); opacity: 0; pointer-events: none; }
.pile-zone.active, .pile-zone.drop-ready { background: rgba(255,203,87,.12); border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,203,87,.28), 0 0 22px rgba(255,203,87,.3); }
.pile-zone.drop-ready .zone-hint, .pile-zone.active .zone-hint { opacity: 1; color: var(--accent); font-weight: 700; }
.pile-zone.drop-hover, .is-dragging .discard-zone.drop-ready.drop-hover { background: rgba(79,209,139,.2) !important; border-color: var(--good) !important; box-shadow: 0 0 0 3px var(--good), 0 0 18px rgba(79,209,139,.35); }
.pile-zone.drop-hover .zone-hint { color: var(--good); opacity: 1; }
@media (max-width: 700px) {
  .pile-zone, .pile-zone.discard-zone { min-width: 132px; min-height: 168px; padding: 22px 28px 36px; }
}
.pile .card { --w: calc(var(--cw) * .78); }
.pile .stack { position: relative; width: var(--w); height: calc(var(--w) * 1.4); }
.pile .stack .card { position: absolute; left: 0; top: 0; }
.pile .stack .s2 { transform: translate(2px, -2px); } .pile .stack .s3 { transform: translate(4px, -4px); }
.pile .stack .s1 { z-index: 2; }
.pile-count { position: absolute; top: -6px; right: -8px; background: #10342a; border: 1px solid var(--line); border-radius: 10px; font-size: .7rem; padding: 0 6px; z-index: 3; font-variant-numeric: tabular-nums; }
.pile-label { position: absolute; bottom: -2px; left: 0; right: 0; text-align: center; font-size: .66rem; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.pile.active .stack, .pile.active .fan { box-shadow: 0 0 0 3px var(--accent), 0 0 20px rgba(255,203,87,.4); border-radius: 8px; }
.pile.active .pile-label { color: var(--accent); }
.discard.open { max-width: 58vw; }
.fan { display: flex; padding-right: 2px; }
.fan .card { --w: calc(var(--cw) * .66); }
.fan .card + .card { margin-left: calc(var(--cw) * -.66 * var(--ov, .6)); }
.drop-hover.pile .stack, .drop-hover .fan { box-shadow: 0 0 0 3px var(--good); }
.mortos { display: flex; gap: 4px; }
.morto { position: relative; padding-bottom: 14px; }
.morto .card { --w: calc(var(--cw) * .56); transform: rotate(90deg) translateX(10%); margin: 0 calc(var(--cw) * .1); }
.morto span { position: absolute; bottom: -2px; left: 0; right: 0; text-align: center; font-size: .62rem; color: var(--muted); text-transform: uppercase; }
.center-status { font-size: .82rem; color: var(--muted); min-height: 1.2em; text-align: center; }
.banner { position: absolute; top: 40%; left: 50%; transform: translate(-50%, -50%) scale(.7); background: rgba(10,30,24,.95); border: 1px solid var(--line); color: var(--text); font-weight: 800; font-size: 1.15rem; padding: 10px 20px; border-radius: 14px; opacity: 0; pointer-events: none; white-space: nowrap; z-index: 20; box-shadow: var(--shadow); transition: all .25s; }
.banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.banner.good { border-color: var(--good); color: #d7ffe8; } .banner.bad { border-color: var(--bad); }
.reopen { position: absolute; bottom: -6px; z-index: 15; }

.away-bar { display: flex; gap: 10px; align-items: center; justify-content: center; background: rgba(138,59,20,.85); padding: 6px 10px; font-size: .88rem; }
.action-bar { display: flex; align-items: center; gap: 8px; padding: 4px 10px; min-height: 48px; }
.my-chip .chip { padding-right: 10px; }
.hint { flex: 1; font-size: .84rem; color: var(--muted); min-width: 0; line-height: 1.25; }
.act-btns { display: flex; gap: 6px; }
.btn.act { padding: 8px 12px; font-size: .88rem; }
.expand-toggle {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px; font-size: .88rem; font-weight: 700;
  border: 1.5px solid var(--accent); color: var(--accent);
  background: rgba(255,203,87,.14); border-radius: 12px;
  box-shadow: 0 0 0 1px rgba(255,203,87,.15);
}
.expand-toggle:hover { filter: brightness(1.08); background: rgba(255,203,87,.22); }
.expand-toggle.on {
  background: linear-gradient(180deg, var(--accent), var(--accent2));
  color: #2b1d00; border-color: transparent; box-shadow: 0 3px 10px rgba(255,176,32,.28);
}
.expand-ico { display: inline-flex; width: 18px; height: 18px; }
.expand-ico svg { width: 18px; height: 18px; display: block; }
@media (max-width: 600px) {
  .action-bar { flex-wrap: wrap; row-gap: 2px; padding: 2px 8px; }
  .my-chip .chip-txt { display: none; }
  .my-chip .chip { padding: 2px; }
  .hint { font-size: .78rem; flex-basis: 0; }
  .expand-toggle { margin-left: auto; padding: 7px 10px; font-size: .82rem; }
  .act-btns { width: 100%; justify-content: flex-end; }
  .btn.act { padding: 7px 10px; font-size: .82rem; flex: 1; }
  .btn.act.ghost { flex: 0 0 auto; }
  .game-top .top-title { display: none; }
  .game-top .sound-btns { display: none; }
  .chip-txt b { max-width: 78px; font-size: .78rem; }
  .pos-left .chip-txt small, .pos-right .chip-txt small { display: none; }
}
.hand-wrap { padding: 0 0 max(6px, env(safe-area-inset-bottom)); position: relative; touch-action: none; }
.hand { position: relative; margin: 0 auto; min-height: 40px; }
.card.in-hand { --w: var(--hw, var(--cw)); position: absolute; cursor: grab; transition: left .2s ease, top .15s ease, transform .15s; touch-action: none; }
.card.in-hand.sel { box-shadow: 0 0 0 3px var(--accent), 0 8px 18px rgba(0,0,0,.4); }
.card.in-hand.fresh { box-shadow: 0 0 0 3px var(--good), 0 6px 14px rgba(0,0,0,.3); }
.card.in-hand.sel.fresh { box-shadow: 0 0 0 3px var(--accent), 0 8px 18px rgba(0,0,0,.4); }
.card.in-hand.dragging { opacity: .35; }
.card.deal-in { animation: dealin .45s backwards ease-out; }
@keyframes dealin { from { transform: translateY(-60vh) rotate(-12deg) scale(.6); opacity: 0; } }
@media (hover: hover) { .card.in-hand:not(.sel):hover { transform: translateY(-6px); } }
.spectate { text-align: center; color: var(--muted); padding: 14px; }
.drag-ghost { position: fixed; left: 0; top: 0; z-index: 500; pointer-events: none; display: flex; filter: drop-shadow(0 10px 18px rgba(0,0,0,.45)); }
.drag-ghost .card + .card { margin-left: calc(var(--cw) * -.6); }
.flying { position: fixed !important; left: 0; top: 0; z-index: 400; pointer-events: none; transition: transform .42s cubic-bezier(.3,.7,.3,1), opacity .42s ease-in; }

/* resultado */
.result-modal .modal { width: min(560px, 100%); }
.result-head { text-align: center; margin-bottom: 8px; }
.result-head h1 { font-size: 1.9rem; margin: 0; }
.score-table .total td { font-weight: 800; border-top: 2px solid var(--line); }
.score-table .grand td { font-weight: 800; color: var(--accent); }
.score-table th.c-azul { color: var(--c-azul); } .score-table th.c-laranja { color: var(--c-laranja); } .score-table th.c-roxo { color: var(--c-roxo); }
.score-table th.c-verde { color: var(--c-verde); } .score-table th.c-rosa { color: var(--c-rosa); } .score-table th.c-amarelo { color: var(--c-amarelo); }
.score-table th:not(:first-child) { text-align: right; }
.can-list { display: inline-flex; gap: 3px; flex-wrap: wrap; justify-content: flex-end; }
.cb { font-style: normal; font-size: .66rem; font-weight: 800; padding: 1px 5px; border-radius: 5px; background: #8aa4b8; color: #10202b; }
.cb.c-limpa { background: var(--accent); color: #2b1d00; } .cb.c-500 { background: var(--c-roxo); color: #fff; } .cb.c-real { background: #ff5a5a; color: #fff; }
.progress2 { display: flex; flex-direction: column; gap: 6px; margin: 12px 0; }
.pbar { position: relative; height: 22px; background: rgba(255,255,255,.08); border-radius: 11px; overflow: hidden; }
.pbar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--muted); border-radius: 11px; transition: width .8s; }
.pbar.c-azul i { background: var(--c-azul); } .pbar.c-laranja i { background: var(--c-laranja); } .pbar.c-roxo i { background: var(--c-roxo); }
.pbar.c-verde i { background: var(--c-verde); } .pbar.c-rosa i { background: var(--c-rosa); } .pbar.c-amarelo i { background: var(--c-amarelo); }
.pbar span { position: relative; font-size: .78rem; font-weight: 700; padding-left: 10px; line-height: 22px; text-shadow: 0 1px 2px rgba(0,0,0,.6); }
.xp-line { text-align: center; margin: 10px 0; font-weight: 700; color: var(--good); }
.xp-line .up { color: var(--good); } .xp-line .down { color: var(--bad); } .lvup { color: var(--accent); }
.result .row { margin-top: 12px; }
.result > .link-btn { display: block; margin: 10px auto 0; }
.countdown { margin-top: 8px; }

/* telas baixas (celular deitado) */
@media (max-height: 480px) {
  .topbar.game-top { padding: 4px 8px; padding-top: max(4px, env(safe-area-inset-top)); }
  .icon-btn { width: 32px; height: 32px; }
  .nav-btn { min-height: 44px; padding: 0 12px; }
  .sc { padding: 1px 8px; } .sc small { display: none; }
  .board { gap: 4px; padding: 3px 6px; }
  .action-bar { min-height: 38px; padding: 0 8px; }
  .chip .avatar { width: 32px; height: 32px; }
  .center-status { display: none; }
}

.mini.ten b { letter-spacing: -.12em; font-size: calc(var(--mw) * .36); margin-left: -1px; }
.card.ten .corner b { letter-spacing: -.1em; font-size: calc(var(--w) * .26); }
@media (orientation: portrait), (max-width: 699px) {
  .board.n4 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .board.n4 .seat { min-width: 0; justify-self: stretch; }
  .board.n4 .seat .chip { width: 100%; padding-right: 6px; gap: 5px; }
  .board.n4 .seat .chip-txt { flex: 1; }
  .board.n4 .seat .chip-txt small { display: none; }
  .board.n4 .seat .avatar { width: 34px; height: 34px; }
  .board.n4 .pos-top { order: 0; }
}
.result .row { flex-direction: column; align-items: stretch; }
.result .row .btn.big { width: 100%; flex: none; }
.chip .morto-tag { position: absolute; top: -7px; right: 6px; font-size: .55rem; padding: 1px 4px; }
.select.small { width: auto; max-width: 46%; padding: 6px 8px; font-size: .84rem; border-radius: 10px; }
.list-row.invite { flex-wrap: wrap; } .list-row.invite .grow { flex-basis: calc(100% - 60px); }
.game-row .w { font-weight: 800; color: var(--accent); } .game-row.current { box-shadow: inset 0 0 0 1px var(--accent); }
.standings tr.champ td { color: var(--accent); font-weight: 700; }
/* celular deitado: jogos lado a lado, monte no meio */
@media (orientation: landscape) and (max-height: 500px) {
  .board, .board.n4 { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); grid-template-areas: "left top right" "theirs center ours"; }
  .board.n2 { grid-template-areas: "top top top" "theirs center ours"; }
  .pos-left { justify-self: start; align-self: auto; } .pos-right { justify-self: end; align-self: auto; }
  .center { justify-content: center; }
  /* monte, mortos e lixo numa fileira só: empilhados ficavam mais altos que a linha e subiam por cima do adversário */
  .piles { gap: 8px; flex-wrap: nowrap; align-items: center; }
  .center { justify-content: safe center; min-height: 0; }
  .pile-zone, .pile-zone.discard-zone { min-width: 92px; min-height: 0; padding: 6px 12px 20px; margin: 0 2px; }
  .chip { padding: 2px 8px 2px 2px; } .chip-txt small { display: none; }
  .melds-head small:first-of-type { display: none; }
  .action-bar .my-chip .chip-txt { display: none; }
}
.champ-banner { display: flex; align-items: center; gap: 12px; justify-content: center; margin: 12px 0 4px; padding: 10px 14px; border-radius: 14px; background: linear-gradient(90deg, rgba(255,203,87,.18), rgba(255,203,87,.05)); border: 1px solid rgba(255,203,87,.45); }
.champ-banner > span { font-size: 2rem; } .champ-banner small { display: block; color: var(--muted); font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; } .champ-banner b { font-size: 1.1rem; color: var(--accent); }

.banner-offline { background: rgba(255,203,87,.12); border: 1px solid rgba(255,203,87,.4); color: var(--accent); border-radius: 12px; padding: 8px 12px; font-size: .86rem; margin: 0 0 10px; }
.btn.accent-outline { border-color: var(--accent); color: var(--accent); background: rgba(255,203,87,.08); margin-bottom: 8px; }
.foot small { display: block; margin-top: 6px; font-size: .78rem; color: var(--muted); }
.offline-pill { font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--accent); }

/* Mao ampliada: duas fileiras maiores; o tabuleiro encolhe para nao sobrepor */
.hand-expanded .hand-wrap {
  background: rgba(0,0,0,.22);
  box-shadow: inset 0 8px 16px rgba(0,0,0,.12);
  padding-top: 6px;
  z-index: 3;
}
.hand-expanded .board { gap: 4px; padding: 4px 6px; min-height: 0; overflow: hidden; }
.hand-expanded .melds { padding: 3px 6px 5px; }
.hand-expanded .melds-head { margin-bottom: 3px; font-size: .76rem; }
.hand-expanded .pile-zone { min-width: 92px; min-height: 118px; padding: 8px 12px 22px; margin: 0; }
.hand-expanded .pile-zone.discard-zone { min-width: 100px; min-height: 126px; padding: 10px 14px 24px; }
.hand-expanded .center-status { font-size: .76rem; min-height: 1em; }
.hand-expanded .new-meld { min-width: calc(var(--mw) * 3.2); min-height: calc(var(--mw) * 1.6 + 12px); padding: 6px 10px; }
@media (max-width: 700px) {
  .hand-expanded .pos-top .chip-txt, .hand-expanded .pos-left .chip-txt small, .hand-expanded .pos-right .chip-txt small { display: none; }
  .hand-expanded .chip { padding: 2px 8px 2px 2px; }
  .hand-expanded .melds-head small:first-of-type { display: none; }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hand-expanded .game-top { padding: 2px 8px; }
  .hand-expanded .board, .hand-expanded.screen .board.n4 { gap: 2px; padding: 1px 4px; overflow: hidden; }
  .hand-expanded .center { min-height: 0; gap: 0; }
  .hand-expanded .pile, .hand-expanded .morto { padding-bottom: 11px; }
  .hand-expanded .pile-zone, .hand-expanded .pile-zone.discard-zone {
    min-width: 68px; min-height: 0; margin: 0;
    height: calc(var(--cw) * 0.78 * 1.4 + 20px);
    padding: 1px 5px 3px; overflow: hidden;
  }
  .hand-expanded .zone-hint { display: none; } /* o aviso ja aparece na barra de acoes */
  .hand-expanded .center-status { display: none; }
  .hand-expanded .action-bar { min-height: 34px; padding: 0 6px; position: relative; z-index: 5; }
  .hand-expanded .new-meld { min-height: calc(var(--mw) * 1.1 + 2px); padding: 2px 6px; font-size: .72rem; }
  .hand-expanded .melds { padding: 0 2px; min-height: 0; overflow: hidden; }
  .hand-expanded .hand-wrap { padding-top: 2px; }
}

.foot .upd-btn { display: inline-flex; margin: 10px auto 0; min-height: 44px; }

/* alvos de toque de pelo menos 44px (revisão mobile) */
.icon-btn, .topbar.game-top .icon-btn { width: 44px; height: 44px; }
.seg button { min-height: 44px; }
.btn { min-height: 44px; }
.btn.small { min-height: 40px; }
.btn.act { min-height: 44px; }
.modal-x { width: 44px; height: 44px; top: 6px; right: 6px; }
.emo { min-width: 40px; min-height: 40px; }
.profile-chip { min-height: 44px; }
@media (max-height: 480px) { .icon-btn { width: 40px; height: 40px; } }
@media (orientation: landscape) and (max-height: 500px) {
  .zone-hint { display: none; } /* o aviso já aparece na barra de ações; aqui cobria o nome da pilha */
  .action-bar { min-height: 46px; }
}
