:root {
  --bg: #060708;
  --bg-2: #0d0f11;
  --panel: #131619;
  --panel-2: #1a1e22;
  --line: #2a2f35;
  --text: #eceff1;
  --muted: #8a9299;
  --silver: #d3d8dc;
  --silver-2: #9aa3aa;
  --metal: linear-gradient(135deg, #f4f6f7 0%, #b9c1c7 38%, #7f8a92 62%, #dfe4e7 100%);
  --accent: #d3d8dc;
  --accent-ink: #0b0c0e;
  --danger: #e0605a;
  --ok: #53c18a;
  --felt: #2a3036;
  --felt-2: #0f1113;
  --rail: #050506;
  --card: #fbfbf8;
  --red: #d02f35;
  --black: #1a1d21;
  --radius: 12px;
  --seat-w: 120px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 700px at 50% 0%, #1a1d21 0%, var(--bg) 60%);
  color: var(--text);
  font: 15px/1.4 Inter, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input { font: inherit; color: inherit; }
.muted { color: var(--muted); }

/* ---------- Topbar ---------- */
.topbar {
  height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(6, 7, 8, .88);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 20;
}
.brand { display: flex; align-items: center; gap: 10px; background: none; border: 0; padding: 0; }
.brand-mark { width: 36px; height: 36px; display: block; border-radius: 50%; object-fit: cover; }
.brand-name { font-weight: 500; letter-spacing: .2px; color: var(--silver); }
.brand-name b { color: var(--text); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.wallet {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--panel); border: 1px solid var(--line);
  font-weight: 600; font-variant-numeric: tabular-nums;
}
/* Ficha de poker genérica: miolo colorido, anel claro e listras na borda */
.chip-dot, .chip {
  --c: #c0392b;
  width: 18px; height: 18px; border-radius: 50%; flex: none; display: inline-block;
  background:
    radial-gradient(circle, var(--c) 0 34%, rgba(255, 255, 255, .85) 35% 40%, transparent 41%),
    repeating-conic-gradient(#f2f2f2 0 16deg, var(--c) 16deg 45deg);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25), 0 1px 2px rgba(0, 0, 0, .6);
}
.chip.c2 { --c: #1f5fbf; }
.chip.c3 { --c: #1e8a4c; }
.chip.c4 { --c: #232323; }
.chip.c5 { --c: #7b3fa6; }
.buy-steps { margin: 14px 0 4px; padding-left: 20px; display: grid; gap: 6px; font-size: 14px; }
.row a.btn { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.sound-btn { font-size: 15px; padding-inline: 8px; }
/* Pilha de fichas: cada ficha a mais aparece um pouco acima da anterior */
.chips { position: relative; display: inline-flex; flex-direction: column-reverse; align-items: center; flex: none; }
.chips .chip + .chip { margin-bottom: -14px; }
.chips .chip:not(:first-child) { box-shadow: 0 0 0 1px rgba(201, 209, 214, .35), 0 2px 2px rgba(0, 0, 0, .7); }
.me { display: flex; align-items: center; gap: 8px; font-weight: 500; background: none; border: 0; padding: 4px 6px; border-radius: 999px; }
button.me:hover { background: var(--panel); }
.avatar {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 700; color: #0b1411;
  flex: none;
}
.avatar.sm { width: 28px; height: 28px; font-size: 13px; }
.avatar.photo { background-size: cover !important; background-position: center !important; color: transparent; }
.avatar.xl { width: 88px; height: 88px; font-size: 30px; }

/* Perfil */
.profile-head { display: flex; align-items: center; gap: 16px; margin: 14px 0 6px; }
.profile-head .btn-col { display: grid; gap: 6px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch {
  width: 32px; height: 32px; border-radius: 50%; border: 2px solid transparent; padding: 0;
  box-shadow: inset 0 0 0 2px rgba(0,0,0,.25);
}
.swatch.on { border-color: var(--text); }
.swatch:focus-visible { outline: 2px solid var(--silver); outline-offset: 2px; }
.profile-section { margin-top: 18px; display: grid; gap: 8px; }
.profile-section > label, .profile-section > .lbl { font-size: 13px; color: var(--muted); }
.profile-section .inline { display: flex; gap: 8px; }
.profile-section .inline input { flex: 1; }
.modal-card.profile { max-width: 440px; }
details.pw-change summary { cursor: pointer; font-weight: 600; font-size: 14px; list-style: none; }
details.pw-change summary::-webkit-details-marker { display: none; }
details.pw-change summary::before { content: '▸ '; color: var(--muted); }
details.pw-change[open] summary::before { content: '▾ '; }
details.pw-change .fields { display: grid; gap: 8px; margin-top: 10px; }

/* ---------- Botões ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--panel-2);
  padding: 9px 16px; border-radius: 10px;
  font-weight: 600;
  transition: background .15s, transform .05s;
}
.btn:hover { background: #242a2f; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.primary { background: var(--metal); border-color: #c4cbd0; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { background: #3a1d1c; border-color: #5a2a28; color: #ffb4ae; }
.btn.danger:hover { background: #4a2422; }
.btn.ghost { background: transparent; }
.btn.big { padding: 13px 18px; font-size: 16px; width: 100%; }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 18px; padding: 4px 8px; }

/* ---------- Login ---------- */
.screen { min-height: calc(100vh - 56px); }
#screen-login { display: grid; place-items: center; padding: 24px 16px; }
.login-card {
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 32px 24px;
  text-align: center;
  box-shadow: 0 30px 80px rgba(0,0,0,.4);
}
.login-mark { width: 120px; height: 120px; margin: 0 auto 14px; display: block; border-radius: 50%; object-fit: cover; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.login-card h1 { margin: 0; font-size: 26px; }
.login-card form { text-align: left; margin-top: 24px; display: grid; gap: 8px; }
.login-card label { font-size: 13px; color: var(--muted); }
input[type=text], input:not([type]), input[type=number], input[type=email], input[type=password], input[type=tel] {
  background: var(--bg-2); border: 1px solid var(--line);
  border-radius: 10px; padding: 12px 14px; outline: none; width: 100%;
}
input:focus { border-color: var(--silver-2); }
.login-card .btn.big { margin-top: 8px; }
.auth-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 22px;
  background: var(--bg-2); border: 1px solid var(--line); border-radius: 12px; padding: 4px;
}
.auth-tabs button { background: none; border: 0; border-radius: 9px; padding: 9px; font-weight: 600; color: var(--muted); }
.auth-tabs button.on { background: var(--panel-2); color: var(--text); box-shadow: 0 1px 0 rgba(255,255,255,.04) inset; }
.auth-title { margin: 22px 0 0; font-size: 18px; }
.login-card form { margin-top: 18px; gap: 14px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 13px; color: var(--muted); }
.pw { position: relative; }
.pw input { padding-right: 76px; }
.peek {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); font-size: 12px; font-weight: 600; padding: 6px 8px;
}
.peek:hover { color: var(--text); }
.hint-line { font-size: 12px; color: var(--muted); }
.upper { text-transform: uppercase; letter-spacing: 2px; }
.upper::placeholder { text-transform: none; letter-spacing: normal; }
.form-msg { margin: 0; padding: 10px 12px; border-radius: 10px; font-size: 14px; background: #2b1a19; border: 1px solid #5a2a28; color: #ffd2cd; }
.form-msg.ok { background: #13261c; border-color: #25563a; color: #bfeccf; }
.auth-links { display: flex; justify-content: center; margin-top: 14px; }
.link { background: none; border: 0; color: var(--silver); font-size: 14px; text-decoration: underline; text-underline-offset: 3px; padding: 4px; }
.link:hover { color: var(--text); }
.fine { font-size: 12px; color: var(--muted); margin: 18px 0 0; }

/* ---------- Lobby ---------- */
.lobby { max-width: 900px; margin: 0 auto; padding: 28px 16px 60px; }
.lobby-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.lobby-head h2 { margin: 0; font-size: 24px; }
.table-list { display: grid; gap: 12px; }
.lobby-section { font-size: 16px; margin: 26px 0 10px; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.lobby-section .muted { font-size: 13px; font-weight: 400; }
.empty-lobby { padding: 18px; border: 1px dashed var(--line); border-radius: var(--radius); text-align: center; font-size: 14px; }
.sng-row { grid-template-columns: 1fr auto auto; }
.sng-row .entrants { font-size: 12px; color: var(--muted); margin-top: 4px; }
.sng-row .actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.badge-live { font-size: 11px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase; padding: 2px 8px; border-radius: 999px; border: 1px solid var(--line); color: var(--silver); margin-left: 6px; vertical-align: middle; }
.standings { display: grid; gap: 2px; font-size: 14px; }
.standings .me { color: var(--text); font-weight: 700; }
.confirm-lines { display: grid; grid-template-columns: 1fr auto; gap: 6px 12px; margin: 14px 0 4px; font-size: 14px; }
.confirm-lines span:nth-child(even) { text-align: right; font-variant-numeric: tabular-nums; }
.confirm-lines .total { font-weight: 700; border-top: 1px solid var(--line); padding-top: 6px; }
.notice {
  background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--silver);
  border-radius: var(--radius); padding: 14px 16px; margin-bottom: 14px; color: var(--muted); font-size: 14px;
}
.notice b { color: var(--text); display: block; margin-bottom: 2px; }
#panel-link { text-decoration: none; color: inherit; }
.table-row {
  display: grid; grid-template-columns: 1fr auto auto auto; align-items: center; gap: 20px;
  padding: 16px 18px; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
}
.table-row h3 { margin: 0 0 2px; font-size: 17px; }
.table-row .stat { text-align: right; font-variant-numeric: tabular-nums; }
.table-row .stat small { display: block; color: var(--muted); font-size: 12px; }
.seat-pips { display: flex; gap: 3px; justify-content: flex-end; margin-top: 4px; }
.seat-pips i { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.seat-pips i.on { background: var(--ok); }

/* ---------- Mesa ---------- */
.game { display: flex; height: calc(100vh - 56px); height: calc(100dvh - 56px); }
.game-main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.table-bar {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 10px 16px; flex-wrap: wrap;
}
.table-info { display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.table-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.felt-wrap {
  position: relative; flex: 1; min-height: 0;
  margin: 8px 16px;
}
.felt {
  position: absolute; inset: 9% 8%;
  border-radius: 50% / 50%;
  background:
    radial-gradient(ellipse at 50% 40%, var(--felt) 0%, var(--felt-2) 75%);
  border: 14px solid var(--rail);
  outline: 2px solid #3a4046; outline-offset: -8px;
  box-shadow:
    0 0 0 2px #59626a,
    inset 0 0 60px rgba(0,0,0,.45),
    0 25px 60px rgba(0,0,0,.55);
}
.felt-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(38%, 260px); aspect-ratio: 1; border-radius: 50%;
  background: url(logo.jpg) center / cover no-repeat;
  opacity: .08; pointer-events: none; mix-blend-mode: screen;
}
.center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
}
.pot {
  min-height: 26px; display: inline-flex; align-items: center; gap: 8px;
  padding: 3px 12px 3px 5px; border-radius: 999px;
  background: rgba(0,0,0,.35); font-weight: 700; font-variant-numeric: tabular-nums;
}
.pot:empty { visibility: hidden; }
.board { display: flex; gap: 6px; min-height: 86px; }
.result .rake { font-size: 12px; font-weight: 500; color: var(--muted); }
.result { min-height: 22px; font-weight: 600; color: var(--accent); text-align: center; padding: 0 8px; }

/* Cartas */
.card {
  width: 60px; height: 84px; border-radius: 8px;
  background: var(--card); color: var(--black);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(0,0,0,.35);
  font-weight: 800; line-height: 1;
  position: relative;
}
.card .r { font-size: 26px; }
.card .s { font-size: 23px; margin-top: 2px; }
.card.red { color: var(--red); }
/* Verso das cartas: logo do Prata Poker sobre grafite, com moldura prata */
.card.back,
.card.flip::after,
.card.deal-flip::after {
  background: url(logo.jpg) center / 82% auto no-repeat, #050506;
  border: 2px solid #9aa7ae;
  box-shadow: inset 0 0 0 2px #050506, inset 0 0 0 3px rgba(201, 209, 214, .35), 0 2px 6px rgba(0, 0, 0, .35);
}
.card.new { animation: deal .25s ease-out; }
.card.dim { filter: brightness(.55); }
.card.win { box-shadow: 0 0 0 3px #f4f6f7, 0 4px 12px rgba(0,0,0,.4); transform: translateY(-4px); }
@keyframes deal { from { transform: translateY(-10px) scale(.9); opacity: 0; } }

/* Carta virando: mostra o verso (::after) até a metade do giro e depois a face. */
.card.flip { animation: flip .5s ease-in-out backwards; }
.card.flip::after {
  content: ''; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit;
  opacity: 0; animation: flip-back .5s linear backwards; animation-delay: inherit;
}
@keyframes flip { 0% { transform: perspective(400px) rotateY(0); } 50% { transform: perspective(400px) rotateY(90deg); } 100% { transform: perspective(400px) rotateY(0); } }
@keyframes flip-back { 0%, 49.9% { opacity: 1; } 50%, 100% { opacity: 0; } }

/* Board: cada carta chega virada para baixo (do alto da mesa) e só então desvira. */
.card.deal-flip { animation: deal-flip .8s ease-out backwards; }
.card.deal-flip::after {
  content: ''; position: absolute; inset: 0; box-sizing: border-box; border-radius: inherit;
  opacity: 0; animation: deal-flip-back .8s linear backwards; animation-delay: inherit;
}
@keyframes deal-flip {
  0% { opacity: 0; transform: perspective(400px) translateY(-50px) scale(.75) rotateY(0); }
  40% { opacity: 1; transform: perspective(400px) translateY(0) scale(1) rotateY(0); }
  70% { transform: perspective(400px) rotateY(90deg); }
  100% { transform: perspective(400px) rotateY(0); }
}
@keyframes deal-flip-back { 0%, 69.9% { opacity: 1; } 70%, 100% { opacity: 0; } }
@keyframes fade-in { from { opacity: 0; } }

/* Indicador da mão atual do jogador, no canto da mesa */
.my-hand {
  position: absolute; left: 8px; bottom: 8px; z-index: 4;
  display: grid; gap: 1px; padding: 8px 12px; border-radius: 10px;
  background: rgba(15, 17, 19, .92); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.35); max-width: 46%;
}
.my-hand.at-seat { bottom: auto; transform: translateY(-50%); max-width: none; white-space: nowrap; padding: 5px 10px; }
.my-hand span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.my-hand b { font-size: 14px; font-weight: 700; }
@media (max-width: 700px) {
  .my-hand { left: 4px; bottom: 4px; padding: 6px 9px; }
  .my-hand b { font-size: 12px; }
}

/* Distribuição: a carta no lugar fica escondida até a carta "voando" chegar. */
.card.pending { visibility: hidden; }
#fx { position: absolute; inset: 0; pointer-events: none; z-index: 5; }
.card.fly { position: absolute; left: 0; top: 0; margin: 0; }

/* Animação reduzida: sem giro nem voo, mas o board continua saindo uma carta por vez. */
@media (prefers-reduced-motion: reduce) {
  .card.flip, .card.flip::after, .card.new, .card.deal-flip::after { animation: none; }
  .card.deal-flip { animation: fade-in .25s ease-out backwards; }
}

/* Assentos */
.seat {
  position: absolute; width: var(--seat-w);
  transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center;
  z-index: 2;
}
.seat .hole { display: flex; gap: 3px; height: 52px; margin-bottom: -8px; z-index: 1; }
.seat .hole .card { width: 37px; height: 52px; border-radius: 6px; }
.seat .hole .card .r { font-size: 17px; }
.seat .hole .card .s { font-size: 15px; }
.plate {
  position: relative; z-index: 2;
  width: 100%;
  background: rgba(15, 17, 19, .96); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px 8px 7px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 6px 18px rgba(0,0,0,.35);
}
.plate .avatar { width: 30px; height: 30px; font-size: 13px; }
.plate .who { min-width: 0; flex: 1; }
.plate .nm { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plate .st { font-size: 13px; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.seat.me .plate { border-color: var(--silver-2); }
.seat.turn .plate { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(211,216,220,.35), 0 6px 18px rgba(0,0,0,.35); }
.seat.folded .plate, .seat.out .plate { opacity: .5; }
.seat.winner .plate { border-color: var(--ok); box-shadow: 0 0 0 2px rgba(83,193,138,.4); }
/* Cronômetro da vez: linha em volta do retângulo do nome, que vai se apagando */
.ring { position: absolute; left: -3px; top: -3px; pointer-events: none; overflow: visible; z-index: 3; }
.ring rect { fill: none; stroke: var(--accent); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100 100; transition: stroke .3s; }
.ring.low rect { stroke: #f0a73a; }
.ring.bank rect { stroke: var(--danger); }
/* Time bank: quadradinho ao lado do jogador com a contagem */
.tb-box {
  position: absolute; top: 50%; transform: translateY(-10%); z-index: 4;
  display: grid; place-items: center; gap: 1px; min-width: 58px; padding: 5px 7px;
  background: rgba(40, 10, 10, .95); border: 1px solid var(--danger); border-radius: 10px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5); animation: tb-pulse 1s ease-in-out infinite;
}
.tb-box.right { left: calc(100% + 6px); }
.tb-box.left { right: calc(100% + 6px); }
.tb-box small { font-size: 9px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: #ffb3b3; white-space: nowrap; }
.tb-box b { font-size: 18px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
@keyframes tb-pulse { 50% { box-shadow: 0 0 0 3px rgba(229, 72, 77, .35), 0 4px 14px rgba(0, 0, 0, .5); } }
@media (max-width: 560px) { .tb-box { min-width: 44px; padding: 3px 5px; } .tb-box b { font-size: 14px; } .tb-box small { font-size: 8px; } }
.tag {
  position: absolute; bottom: -10px; left: 50%; transform: translateX(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: .4px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 999px;
  background: var(--panel-2); border: 1px solid var(--line); color: var(--silver);
  white-space: nowrap; z-index: 3;
}
.tag.win { background: var(--ok); color: #06210f; border-color: var(--ok); }
.tag.allin { background: var(--danger); color: #fff; border-color: var(--danger); }
.dealer {
  position: absolute; width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: #111; font-size: 11px; font-weight: 800;
  display: grid; place-items: center; box-shadow: 0 2px 4px rgba(0,0,0,.4);
  transform: translate(-50%, -50%); z-index: 3;
}
.bet {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 5px;
  font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums;
  background: rgba(0,0,0,.4); padding: 2px 8px 2px 3px; border-radius: 999px;
  z-index: 3;
}
.hand-name { font-size: 11px; color: var(--accent); margin-top: 12px; font-weight: 600; text-align: center; }
.empty-seat {
  position: absolute; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 4px; z-index: 2;
}
.empty-seat .sit {
  width: 64px; height: 64px; border-radius: 50%;
  border: 2px dashed rgba(201,209,214,.35); background: rgba(6,7,8,.5);
  color: var(--silver); font-size: 12px; font-weight: 600;
}
.empty-seat .sit:hover { border-color: var(--accent); color: var(--accent); }
.empty-seat .addbot { font-size: 11px; background: none; border: 0; color: var(--muted); padding: 2px 6px; }
.empty-seat .addbot:hover { color: var(--text); }
.botx {
  position: absolute; top: -6px; right: -6px; z-index: 4;
  width: 20px; height: 20px; border-radius: 50%; border: 1px solid var(--line);
  background: var(--panel-2); color: var(--muted); font-size: 11px; line-height: 1; padding: 0;
  display: none;
}
.seat:hover .botx { display: block; }

/* Barra de ação */
.action-bar {
  min-height: 76px;
  padding: 10px 16px calc(12px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: rgba(6,7,8,.94);
  display: flex; align-items: center; justify-content: center; gap: 10px; flex-wrap: wrap;
}
.action-bar .hint { color: var(--muted); }
.act-buttons { display: flex; gap: 8px; }
.act-buttons .btn { min-width: 108px; padding: 12px 14px; font-size: 15px; }
.act-fold { background: #3a1d1c; border-color: #5a2a28; }
.act-raise { background: var(--metal); border-color: #c4cbd0; color: var(--accent-ink); }
.act-raise:hover { background: var(--metal) !important; filter: brightness(1.08); }
.raise-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: center; }
.raise-box input[type=range] { width: 180px; accent-color: var(--accent); }
.raise-box input[type=number] { width: 96px; padding: 9px 10px; text-align: right; }
.presets { display: flex; gap: 4px; }

/* Chat */
.chat {
  width: 300px; border-left: 1px solid var(--line); background: var(--bg-2);
  display: flex; flex-direction: column;
}
.chat-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600;
}
#chat-close { display: none; }
.chat-log { flex: 1; overflow-y: auto; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.chat-log .m b { color: var(--silver); font-weight: 600; margin-right: 4px; }
.chat-log .sys { color: var(--muted); font-size: 12px; }
.chat-form { display: flex; gap: 6px; padding: 10px; border-top: 1px solid var(--line); }
.chat-form input { padding: 9px 12px; }
.table-bar-right { display: flex; gap: 8px; align-items: center; }
.chat-fab { display: none; position: relative; }
.badge {
  position: absolute; top: -2px; right: -2px; min-width: 18px; height: 18px; border-radius: 9px;
  background: var(--danger); color: #fff; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; padding: 0 4px;
}

/* Modal e avisos */
.modal {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 16px;
}
.modal-card {
  width: 100%; max-width: 380px; max-height: calc(100dvh - 32px); overflow-y: auto;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px;
}
.modal-card h3 { margin: 0 0 4px; }
.modal-card .amount { font-size: 30px; font-weight: 800; color: var(--accent); text-align: center; margin: 16px 0 6px; font-variant-numeric: tabular-nums; }
.modal-card input[type=range] { width: 100%; accent-color: var(--accent); }
.modal-card .range-labels { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.modal-card .row { display: flex; gap: 8px; margin-top: 18px; }
.modal-card .row .btn { flex: 1; }
.conn {
  position: fixed; top: 64px; left: 50%; transform: translateX(-50%); z-index: 60;
  background: var(--danger); color: #fff; padding: 6px 14px; border-radius: 999px; font-weight: 600; font-size: 13px;
}
.toasts { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%); z-index: 70; display: grid; gap: 6px; }
.toast {
  background: #2b1a19; border: 1px solid #5a2a28; color: #ffd2cd;
  padding: 9px 14px; border-radius: 10px; font-size: 14px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
  animation: deal .2s ease-out;
}
.toast.info { background: var(--panel-2); border-color: var(--line); color: var(--text); }

/* ---------- Responsivo ---------- */
@media (max-width: 1000px) {
  .chat {
    position: fixed; right: 0; top: 56px; bottom: 0; z-index: 30; width: min(340px, 100vw);
    transform: translateX(100%); transition: transform .2s;
    box-shadow: -20px 0 40px rgba(0,0,0,.4);
  }
  .chat.open { transform: none; }
  #chat-close { display: block; }
  .chat-fab { display: block; }
}
@media (max-width: 700px) {
  :root { --seat-w: 88px; }
  body { font-size: 14px; }
  .brand-name { display: none; }
  .topbar .me span:last-child { display: none; }
  .table-row { grid-template-columns: 1fr auto; gap: 10px 16px; }
  .table-row .stat.buyin { display: none; }
  .table-row .btn, .sng-row .actions { grid-column: 1 / -1; }
  .sng-row .actions .btn { flex: 1; }
  .felt-wrap { margin: 4px 6px; }
  .felt { inset: 8% 12%; border-width: 10px; border-radius: 45% / 30%; }
  .card { width: 46px; height: 65px; }
  .card .r { font-size: 20px; } .card .s { font-size: 17px; }
  .board { gap: 3px; min-height: 67px; }
  .seat .hole { height: 44px; margin-bottom: -4px; }
  .seat .hole .card { width: 31px; height: 44px; border-radius: 5px; }
  .seat .hole .card .r { font-size: 14px; } .seat .hole .card .s { font-size: 12px; }
  .plate { padding: 5px 6px; gap: 5px; }
  .plate .avatar { width: 22px; height: 22px; font-size: 11px; }
  .plate .nm, .plate .st { font-size: 11px; }
  .bet { font-size: 11px; }
  .empty-seat .sit { width: 48px; height: 48px; font-size: 11px; }
  .act-buttons .btn { min-width: 0; flex: 1; padding: 12px 8px; }
  .act-buttons { width: 100%; }
  .raise-box { width: 100%; }
  .raise-box input[type=range] { flex: 1; width: auto; }
  .table-bar { padding: 8px 10px; }
  .table-info { gap: 8px; font-size: 13px; }
}

/* Multimesa: escolher qual mesa assistir */
.table-pick { background: var(--panel, #111); color: inherit; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font: inherit; font-size: 13px; }

/* Topo no celular: cabe carteira + Adquirir fichas + som */
@media (max-width: 560px) {
  .topbar-right { gap: 6px; }
  #buy-chips { padding: 5px 9px; font-size: 12px; }
  .wallet { padding: 5px 9px; }
}

/* Omaha: 4 cartas por jogador, sobrepostas */
.seat .hole.four { gap: 0; }
.seat .hole.four .card { width: 34px; height: 48px; margin-left: -9px; }
.seat .hole.four .card:first-child { margin-left: 0; }
.seat .hole.four .card .r { font-size: 15px; } .seat .hole.four .card .s { font-size: 13px; }
@media (max-width: 700px) {
  .seat .hole.four { height: 40px; }
  .seat .hole.four .card { width: 28px; height: 40px; margin-left: -8px; }
  .seat .hole.four .card .r { font-size: 13px; } .seat .hole.four .card .s { font-size: 11px; }
}
.game-tag { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 999px; margin-right: 4px;
  background: rgba(155, 110, 255, .18); color: #c9b3ff; border: 1px solid rgba(155, 110, 255, .45); }
