/* mecha.games — design system do handoff "Modern Casino" (docs/design/HANDOFF.md).
   Dois temas compartilham a mesma estrutura; só os tokens mudam.
   Tema padrão: 2a "Emerald Club" (dark premium). Alternativo: 2b "Clubhouse". */

:root,
[data-theme="emerald"] {
  --bg: #0c1210;
  --sur: #141c18;
  --sur2: #1d2822;
  --line: #28352b;
  --ink: #edf3ec;
  --dim: #8ba496;
  --acc: #e0bd72;
  --acc2: #c39b45;
  --onacc: #241a06;
  --grn: #35c37d;
  --ongrn: #08130c;
  --felt1: #1e6f47;
  --felt2: #0c3a26;
  --rail: #3d5847;
  --rail-edge: rgba(0, 0, 0, 0.65);
  --disp: "Space Grotesk", sans-serif;
}

[data-theme="clubhouse"] {
  --bg: #eff0ea;
  --sur: #ffffff;
  --sur2: #f4f4ee;
  --line: #dfe0d6;
  --ink: #182b20;
  --dim: #71816f;
  --acc: #c8992d;
  --acc2: #a97f1d;
  --onacc: #fff;
  --grn: #127a4c;
  --ongrn: #fff;
  --felt1: #1f8654;
  --felt2: #0f5c38;
  --rail: rgba(0, 0, 0, 0.22);
  --rail-edge: rgba(0, 0, 0, 0.08);
  --disp: "Space Grotesk", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body { height: 100%; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: "Archivo", sans-serif;
  -webkit-font-smoothing: antialiased;
}

.app { min-height: 100dvh; display: flex; flex-direction: column; }
/* páginas de app (lobby/mesa) travam na viewport; listas internas rolam */
.fixed-page { height: 100dvh; overflow: hidden; }

/* ---------- header / nav ---------- */
.mlogo { font-family: var(--disp); font-size: 24px; line-height: 1; letter-spacing: -0.01em; color: var(--ink); text-decoration: none; }
.mlg2 { color: var(--grn); }
.mtop { display: flex; align-items: center; justify-content: space-between; padding: 16px 16px 10px; }
.fx { display: flex; } .ac { align-items: center; } .f1 { flex: 1; }
.gap8 { gap: 8px; } .gap10 { gap: 10px; } .gap12 { gap: 12px; }
.tc { text-align: center; }

.mchips { display: flex; align-items: center; gap: 8px; background: var(--sur2); border: 1px solid var(--line); border-radius: 999px; padding: 7px 13px; font-weight: 700; font-size: 14px; }
.mcoin { width: 16px; height: 16px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a8, #d9a927); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.14); }
.mava { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--grn), var(--felt2)); display: flex; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; }

.mtabs { display: flex; gap: 6px; padding: 4px 16px 12px; }
.mtab { padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--dim); background: var(--sur); border: 1px solid var(--line); text-decoration: none; cursor: pointer; transition: background 180ms ease-out, color 180ms ease-out; }
.mtab.on { background: var(--grn); border-color: var(--grn); color: var(--ongrn); }

/* ---------- lobby ---------- */
.mh2 { font-family: var(--disp); font-size: 22px; padding: 8px 16px 10px; display: flex; align-items: baseline; justify-content: space-between; font-weight: 400; }
.mhint { font-size: 12px; color: var(--dim); font-family: "Archivo", sans-serif; }

.ggrid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 16px 4px; }
.gcard { position: relative; height: 104px; border-radius: 14px; padding: 12px; display: flex; flex-direction: column; justify-content: flex-end; background: radial-gradient(130% 130% at 20% 0%, var(--felt1), var(--felt2)); color: #fff; overflow: hidden; border: 1px solid rgba(255, 255, 255, 0.14); text-decoration: none; }
a.mjoin { text-decoration: none; }
.gname { font-family: var(--disp); font-size: 19px; }
.gtag { font-size: 12px; opacity: 0.75; }
.gsuit { position: absolute; top: 10px; right: 12px; font-size: 22px; opacity: 0.5; }
.gcard.lk { opacity: 0.9; filter: saturate(0.4) brightness(0.85); }
.gpro { position: absolute; top: 10px; left: 12px; font-size: 10px; font-weight: 800; letter-spacing: 0.06em; background: rgba(255, 255, 255, 0.92); color: #1a2b20; padding: 3px 8px; border-radius: 999px; }

.mrl { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 0 16px; min-height: 0; }
.mroom { display: flex; align-items: center; gap: 12px; background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 12px; flex-shrink: 0; }
.mrg { width: 40px; height: 40px; flex-shrink: 0; border-radius: 10px; background: radial-gradient(130% 130% at 25% 0%, var(--felt1), var(--felt2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 12px; }
.mrn { font-weight: 600; font-size: 14px; display: flex; gap: 6px; align-items: center; white-space: nowrap; overflow: hidden; }
.mrm { font-size: 12px; color: var(--dim); margin-top: 2px; white-space: nowrap; }
.mlive { width: 7px; height: 7px; flex-shrink: 0; border-radius: 50%; background: #2ee06f; box-shadow: 0 0 0 3px rgba(46, 224, 111, 0.16); }
.mpro { font-size: 10px; font-weight: 700; color: var(--acc); border: 1px solid var(--acc); padding: 1px 6px; border-radius: 999px; }
.mjoin { background: var(--grn); color: var(--ongrn); font-weight: 700; font-size: 13px; border-radius: 999px; padding: 8px 16px; flex-shrink: 0; border: 0; cursor: pointer; transition: filter 180ms ease-out; }
.mjoin:hover { filter: brightness(1.08); }

.mcta { margin: 12px 16px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; background: linear-gradient(120deg, var(--acc), var(--acc2)); color: var(--onacc); border-radius: 14px; padding: 13px; font-weight: 800; font-size: 15px; border: 0; cursor: pointer; width: calc(100% - 32px); }
.mctas { font-weight: 600; font-size: 12px; opacity: 0.85; white-space: nowrap; }

.mnav { display: flex; border-top: 1px solid var(--line); background: var(--sur); padding: 10px 8px 16px; }
.mni { flex: 1; display: flex; flex-direction: column; gap: 5px; align-items: center; font-size: 12px; font-weight: 600; color: var(--dim); padding: 4px 0; text-decoration: none; }
.mni.on { color: var(--grn); }
.mnd { width: 5px; height: 5px; border-radius: 50%; background: var(--grn); opacity: 0; }
.on .mnd { opacity: 1; }

/* ---------- poker table ---------- */
.pkt { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--line); background: var(--sur); }
.pkb { font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none; }
.pkh { font-size: 13px; color: var(--dim); }

/* ambiente atrás da mesa: luminária + malha de "carpete" + vinheta (por tema) */
.mfelt {
  flex: 1; position: relative; overflow: hidden;
  background:
    radial-gradient(85% 60% at 50% 26%, rgba(53, 195, 125, 0.12), transparent 62%),
    radial-gradient(130% 95% at 50% 115%, rgba(0, 0, 0, 0.55), transparent 55%),
    repeating-linear-gradient(60deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-60deg, rgba(255, 255, 255, 0.028) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, #0a100d, #0b1411 55%, #091009);
}
[data-theme="clubhouse"] .mfelt {
  background:
    radial-gradient(85% 60% at 50% 26%, rgba(18, 122, 76, 0.10), transparent 62%),
    radial-gradient(130% 95% at 50% 115%, rgba(0, 0, 0, 0.14), transparent 55%),
    repeating-linear-gradient(60deg, rgba(24, 43, 32, 0.05) 0 1px, transparent 1px 26px),
    repeating-linear-gradient(-60deg, rgba(24, 43, 32, 0.05) 0 1px, transparent 1px 26px),
    linear-gradient(180deg, #e7e8e0, #eff0ea 55%, #e3e4da);
}
/* aro largo ("rail") da mesa: --rail/--rail-edge por tema (tokens no topo) —
   no escuro o preto translúcido sumia; agora é um tom acima do fundo */
.moval { position: absolute; inset: 22px 12px 34px; border-radius: 150px; background: radial-gradient(130% 120% at 50% 25%, var(--felt1), var(--felt2)); box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.14), inset 0 24px 70px rgba(0, 0, 0, 0.35), 0 0 0 10px var(--rail), 0 0 0 12px var(--rail-edge), 0 30px 80px rgba(0, 0, 0, 0.45); }

.mpot { position: absolute; top: 330px; left: 50%; transform: translateX(-50%); display: flex; align-items: baseline; gap: 7px; background: rgba(0, 0, 0, 0.45); border-radius: 999px; padding: 6px 14px; z-index: 5; }
.mpotl { font-size: 10px; font-weight: 800; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.65); }
.mpotv { font-size: 16px; font-weight: 700; color: #ffd977; }

.mbd { position: absolute; top: 212px; left: 50%; transform: translateX(-50%); display: flex; gap: 6px; z-index: 5; }
.mcd { position: relative; width: 38px; height: 54px; border-radius: 7px; background: #fdfdf8; color: #20262e; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); font-weight: 700; container-type: size; overflow: hidden; }
/* cantos opostos (rank + naipe pequeno) e naipe grande no centro */
.mcd .cr { position: absolute; top: 5%; left: 7%; display: flex; flex-direction: column; align-items: center; line-height: 0.95; font-weight: 800; font-size: 24cqh; font-family: "Archivo", sans-serif; }
.mcd .cr i { font-style: normal; font-size: 72%; margin-top: 1cqh; }
.mcd .cr.br { top: auto; left: auto; bottom: 5%; right: 7%; transform: rotate(180deg); }
.mcd .pip { font-size: 42cqh; font-family: "Archivo", sans-serif; }
.mcd .r { font-size: 17px; font-family: "Archivo", sans-serif; }
.mcd .s { font-size: 13px; margin-top: 1px; font-family: "Archivo", sans-serif; }
.mcd.red { color: #d3364b; }
.mcd.bk { background: linear-gradient(150deg, #2f8f5c, #12492d); background-image: var(--card-back, none); background-size: cover; background-position: center; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35), inset 0 0 0 2px rgba(255, 255, 255, 0.35); }
.mcd.bk .cr, .mcd.bk .pip { display: none; }
.bk .r, .bk .s { display: none; }

.mhh { display: flex; gap: 6px; }
.mhh .mcd { width: 52px; height: 72px; border-radius: 9px; }
.mhh .r { font-size: 23px; }
.mhh .s { font-size: 17px; }

.mdl { position: absolute; top: 302px; left: 70%; width: 22px; height: 22px; border-radius: 50%; background: #fff; color: #1c2430; font-size: 11px; font-weight: 800; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); z-index: 6; }

.mseat { position: absolute; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 6; }
.mrow2 { display: flex; gap: 4px; height: 40px; }
.mmc { width: 28px; height: 40px; border-radius: 5px; background: linear-gradient(150deg, #2f8f5c, #12492d); background-image: var(--card-back, none); background-size: cover; background-position: center; border: 1px solid rgba(255, 255, 255, 0.4); }
.mavc { width: 64px; height: 64px; flex-shrink: 0; border-radius: 50%; background: rgba(0, 0, 0, 0.4); border: 2px solid rgba(255, 255, 255, 0.3); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; overflow: hidden; }
.mavc img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
/* avatar maior SEM descer o conjunto: cresce para cima e fica meio atrás do
   nome/cartas (margens negativas compensam os 18px extras; tag/cartas por cima) */
.mseat .mavc { margin: -8px 0 -10px; }
.mseat .mtag, .mseat .mrow2 { position: relative; z-index: 2; }
.mtag { max-width: 84px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background: rgba(0, 0, 0, 0.45); color: #fff; border-radius: 999px; padding: 2px 8px; font-size: 10px; font-weight: 600; }
.mchip2 { background: rgba(0, 0, 0, 0.45); color: #ffd977; border-radius: 999px; padding: 1px 7px; font-size: 11px; font-weight: 700; }
.mtb { display: none; width: 46px; height: 4px; border-radius: 2px; background: rgba(0, 0, 0, 0.5); overflow: hidden; margin-top: 2px; }
.mtb span { display: block; height: 100%; width: 100%; background: #4ade80; animation: deplete linear forwards; }
.on2 .mtb { display: block; }
.on2 .mavc { border-color: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28); }
.fd { opacity: 0.45; }

/* posições dos assentos — mobile (mp6/mp7: laterais intermediárias, usadas
   só em mesas com 6-7 oponentes) */
.mp1 { top: 16px; left: 8px; }
.mp2 { top: 8px; left: 50%; transform: translateX(-50%); }
.mp3 { top: 16px; right: 8px; }
.mp4 { top: 228px; right: 2px; }
.mp5 { top: 228px; left: 2px; }
.mp6 { top: 120px; left: 0; }
.mp7 { top: 120px; right: 0; }

.mhero { padding: 12px 16px 16px; border-top: 1px solid var(--line); background: var(--sur); display: flex; flex-direction: column; gap: 10px; }
.myou { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; }
.mstk { font-size: 24px; font-weight: 700; line-height: 1.15; }
.mbl { font-size: 13px; color: var(--dim); min-height: 20px; }
.mbtn { position: relative; overflow: hidden; flex: 1; padding: 12px 10px; border-radius: 12px; font-weight: 700; font-size: 14px; text-align: center; background: var(--sur2); border: 1px solid var(--line); color: var(--ink); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; cursor: pointer; transition: filter 160ms ease-out, background 160ms ease-out, transform 130ms ease-out, border-color 130ms ease-out, box-shadow 160ms ease-out; }
/* na vez do herói o botão da ação automática (check/fold do timeout) vai
   "enchendo" da esquerda p/ direita — substitui a barrinha de tempo */
.mbtn .tfill { position: absolute; inset: 0; transform-origin: left; transform: scaleX(0); background: linear-gradient(180deg, rgba(74, 222, 128, 0.38), rgba(74, 222, 128, 0.2)); animation: btnfill linear forwards; pointer-events: none; }
/* o preenchimento usa a cor do PRÓPRIO botão: Fold enche de vinho */
.mbtn.fd2 .tfill { background: linear-gradient(180deg, rgba(221, 84, 104, 0.38), rgba(221, 84, 104, 0.2)); }
@keyframes btnfill { to { transform: scaleX(1); } }
.mbtn:not(:disabled):hover { filter: brightness(1.2); border-color: var(--grn); box-shadow: 0 4px 14px rgba(0, 0, 0, 0.28); }
.mbtn.fd2:not(:disabled):hover { border-color: #dd5468; box-shadow: 0 6px 16px rgba(221, 84, 104, 0.25); }
.mbtn.rs:not(:disabled):hover { filter: brightness(1.12); box-shadow: 0 6px 18px rgba(53, 195, 125, 0.4); }
.mbtn:not(:disabled):active { filter: brightness(0.88); transition-duration: 60ms; }
.fd2 { color: #dd5468; }
.rs { background: var(--grn); border-color: var(--grn); color: var(--ongrn); }
.rsv { font-size: 12px; font-weight: 600; opacity: 0.8; }

.mrange { -webkit-appearance: none; appearance: none; flex: 1; height: 6px; border-radius: 3px; background: var(--line); outline: none; }
.mrange::-webkit-slider-thumb { -webkit-appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--grn); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); cursor: pointer; }
.mrange::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--grn); border: 3px solid #fff; box-shadow: 0 1px 5px rgba(0, 0, 0, 0.3); cursor: pointer; }
.mrv { font-size: 15px; font-weight: 700; min-width: 48px; text-align: right; }

/* ---------- flash messages ---------- */
.flash { padding: 6px 16px; display: flex; flex-direction: column; gap: 6px; }
.flashmsg { background: var(--sur2); border: 1px solid var(--grn); color: var(--ink); border-radius: 10px; padding: 9px 13px; font-size: 13px; animation: dealIn 300ms backwards; }

/* botão de ação primária verde (Criar conta, Entrar, Claim, Adicionar fichas...) —
   fora do media query desktop: também estiliza no mobile */
.dclaim { margin-top: 12px; background: var(--grn); color: var(--ongrn); text-align: center; padding: 11px; border-radius: 10px; font-weight: 700; cursor: pointer; border: 0; font-family: "Archivo", sans-serif; font-size: 14px; }
.dclaim:hover { filter: brightness(1.08); }

/* ---------- auth ---------- */
.authpage { align-items: center; justify-content: center; padding: 24px 16px; }
.authcard { width: 100%; max-width: 400px; background: var(--sur); border: 1px solid var(--line); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
.authcard .dct { font-family: var(--disp); font-size: 26px; font-weight: 400; margin: 8px 0 2px; }
.flabel { font-size: 12px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.05em; margin-top: 10px; display: block; }
.finput { width: 100%; margin-top: 5px; background: var(--sur2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 13px; color: var(--ink); font-family: "Archivo", sans-serif; font-size: 14px; outline: none; box-sizing: border-box; }
.finput:focus { border-color: var(--grn); }
.fbtn { width: 100%; border: 0; cursor: pointer; font-size: 15px; margin-top: 16px; font-family: "Archivo", sans-serif; }
.ferr { color: #dd5468; font-size: 12px; margin-top: 5px; }
.fhint { font-size: 13px; color: var(--dim); text-align: center; margin-top: 8px; }
.fhint a { color: var(--grn); font-weight: 600; text-decoration: none; }
.authcard form { display: block; }

/* ---------- animações e extras da mesa ---------- */
.table-page { height: 100dvh; }
.table-page .mfelt { min-height: 0; }

@keyframes deplete { from { width: 100%; } to { width: 0%; } }

@keyframes dealIn {
  from { opacity: 0; transform: translateY(-34px) scale(0.55); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.deal-in { animation: dealIn 380ms cubic-bezier(0.2, 0.8, 0.3, 1) backwards; }

/* flip 3D das cartas (tamanhos ampliados p/ legibilidade) */
.pflip { position: relative; perspective: 600px; width: 46px; height: 64px; }
.pflip .pface, .pflip .pback { position: absolute; inset: 0; width: 100%; height: 100%; backface-visibility: hidden; transition: transform 420ms cubic-bezier(0.35, 0, 0.25, 1); }
.pflip .pface { transform: rotateY(180deg); }
.pflip .pback { transform: rotateY(0deg); }
.pflip.up .pface { transform: rotateY(0deg); }
.pflip.up .pback { transform: rotateY(-180deg); }
.mbd .pflip { width: 46px; height: 64px; }
.mbd .r { font-size: 21px; }
.mbd .s { font-size: 16px; }
.mhh .pflip { width: 62px; height: 86px; }
.mhh .r { font-size: 27px; }
.mhh .s { font-size: 20px; }
.mhh .pflip .mcd { width: 100%; height: 100%; }
.mbd .pflip .mcd { width: 100%; height: 100%; }

/* cartas reveladas no showdown (oponentes) */
.mrow2.sd { height: 54px; }
.mrow2.sd .pflip { width: 38px; height: 54px; }
.mrow2.sd .pflip .mcd { width: 100%; height: 100%; border-radius: 6px; }

/* ficha voando para o pote */
.chipfly { position: absolute; z-index: 20; width: 18px; height: 18px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #ffe9a8, #d9a927); box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4), inset 0 0 0 2px rgba(0, 0, 0, 0.14); pointer-events: none; }

/* banner de vencedor */
.banner { position: absolute; top: 46%; left: 50%; transform: translate(-50%, -50%); z-index: 30; background: rgba(0, 0, 0, 0.75); color: #ffd977; border: 1px solid rgba(255, 217, 119, 0.4); border-radius: 999px; padding: 10px 22px; font-weight: 700; font-size: 15px; white-space: nowrap; box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5); }
.pop-enter-active { transition: all 260ms cubic-bezier(0.2, 0.8, 0.3, 1); }
.pop-leave-active { transition: all 200ms ease-in; }
.pop-enter-from, .pop-leave-to { opacity: 0; transform: translate(-50%, -50%) scale(0.7); }

.wtag { background: rgba(0, 0, 0, 0.6); color: #2ee06f; border-radius: 999px; padding: 2px 8px; font-size: 11px; font-weight: 800; animation: dealIn 300ms backwards; }

/* aposta corrente do assento na rodada */
.mbet { background: rgba(0, 0, 0, 0.55); color: #ffd977; border: 1px solid rgba(255, 217, 119, 0.45); border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; animation: dealIn 250ms backwards; }

/* assento do herói (avatar + anel de vez) */
.hero-seat { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.hero-seat .mavc { width: 72px; height: 72px; font-size: 19px; background: linear-gradient(135deg, var(--grn), var(--felt2)); border: 2px solid rgba(255, 255, 255, 0.35); }
.hero-seat.on2 .mavc { border-color: #4ade80; box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28); animation: heroPulse 1.4s ease-in-out infinite; }
@keyframes heroPulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(74, 222, 128, 0.28); }
  50% { box-shadow: 0 0 0 7px rgba(74, 222, 128, 0.12); }
}
/* painel do herói ganha borda quando é a vez dele */
.mhero.turn { border-top: 2px solid #4ade80; }

/* timer do herói (mobile) */
/* timer do herói: altura fixa SEMPRE reservada (não muda o layout → não pisca);
   fica no topo do painel. A barra só aparece quando é a vez. */

/* balão de pré-ação (ícone de pessoa + fala) — faixa mobile e barra desktop */
.dstat-row { display: flex; align-items: center; gap: 10px; }
.dstat-ava { width: 34px; height: 34px; flex: 0 0 34px; border-radius: 50%; background: var(--sur2); border: 1px solid var(--grn); color: var(--grn); display: flex; align-items: center; justify-content: center; animation: dealIn 240ms backwards; }
.dstat-ava.ok { border-color: #4ade80; color: #4ade80; }
.dstat-ico { width: 19px; height: 19px; }
.dstat { font-size: 13px; color: var(--dim); }
.dstat.balloon { position: relative; background: var(--sur2); border: 1px solid var(--grn); color: var(--ink); border-radius: 12px; padding: 9px 14px; font-weight: 600; box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22), 0 0 0 3px rgba(74, 222, 128, 0.1); animation: dealIn 240ms backwards; }
.dstat.balloon::before { content: ""; position: absolute; left: -6px; top: 50%; margin-top: -5px; width: 10px; height: 10px; background: var(--sur2); border-left: 1px solid var(--grn); border-bottom: 1px solid var(--grn); transform: rotate(45deg); }
.dstat.balloon.ok { border-color: #4ade80; color: #4ade80; box-shadow: none; }
.dstat.balloon.ok::before { border-color: #4ade80; }

/* faixa entre a mesa e o painel do herói (mobile): altura SEMPRE reservada —
   o balão aparece/some dentro dela sem redimensionar a mesa */
/* padding lateral simétrico mantém o balão longe dos botões flutuantes (taunts) */
.pre-strip { flex: 0 0 56px; height: 56px; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 0 62px; background: var(--sur); border-top: 1px solid var(--line); }
.pre-strip .dstat.balloon { font-size: 12px; padding: 8px 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pre-strip .dstat-ava { width: 30px; height: 30px; flex: 0 0 30px; }
.pre-strip .dstat-ico { width: 17px; height: 17px; }

/* mobile: os 3 botões dividem a linha em terços exatos, sem variar com o texto */
.mhero .mbtn { flex: 1 1 0; min-width: 0; white-space: nowrap; overflow: hidden; }

/* botão de pré-ação selecionado (em espera para a vez) */
.mbtn.pre { outline: 2px solid #4ade80; outline-offset: -2px; box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.18); position: relative; }
.mbtn.pre::after { content: "⏳"; position: absolute; top: 3px; right: 6px; font-size: 16px; filter: drop-shadow(0 1px 2px rgba(0,0,0,.5)); }

.mbtn:disabled { opacity: 0.45; cursor: default; filter: none; }
.mrange:disabled { opacity: 0.5; }

/* botão do dealer acompanha o assento do dealer (0 = herói) */
.mdl { transition: top 400ms ease, left 400ms ease, right 400ms ease; }
.mdl.dlr0 { top: auto; bottom: 14px; left: 58%; }
.mdl.dlr1 { top: 96px; left: 96px; }
.mdl.dlr2 { top: 88px; left: 56%; }
.mdl.dlr3 { top: 96px; left: calc(100% - 118px); }
.mdl.dlr4 { top: 252px; left: calc(100% - 108px); }
.mdl.dlr5 { top: 252px; left: 92px; }

/* ---------- blackjack ---------- */
.bj-dealer { position: absolute; top: 44px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 5; }
.bj-cards { display: flex; gap: 6px; }
.bj-cards .pflip { width: 44px; height: 62px; }
.bj-cards.sm .pflip, .mini-card { width: 34px; height: 48px; }
.bj-boxes { position: absolute; bottom: 46px; left: 0; right: 0; display: flex; justify-content: center; align-items: flex-end; gap: 14px; padding: 0 10px; z-index: 5; flex-wrap: wrap; }
.bj-box { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 8px; border-radius: 14px; }
.bj-box.active { background: rgba(74, 222, 128, 0.08); box-shadow: 0 0 0 2px rgba(74, 222, 128, 0.35); }
.bj-box.me .mtag { border: 1px solid var(--acc); color: var(--acc); }
.bj-hand { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 4px; border-radius: 10px; }
.bj-hand.turn { outline: 2px solid #4ade80; outline-offset: 2px; }
.bj-meta { display: flex; align-items: center; gap: 6px; }
.bj-total { background: rgba(0, 0, 0, 0.5); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 700; }
.bj-result { border-radius: 999px; padding: 1px 8px; font-size: 11px; font-weight: 800; animation: dealIn 300ms backwards; }
.bj-result.win, .bj-result.blackjack { background: rgba(46, 224, 111, 0.25); color: #2ee06f; }
.bj-result.lose { background: rgba(221, 84, 104, 0.25); color: #dd5468; }
.bj-result.push { background: rgba(255, 217, 119, 0.25); color: #ffd977; }
.bj-chip { width: 52px; height: 52px; border-radius: 50%; border: 2px dashed rgba(255, 217, 119, 0.6); background: radial-gradient(circle at 35% 30%, #ffe9a8, #d9a927); color: #241a06; font-weight: 800; font-size: 11px; cursor: pointer; transition: transform 150ms ease-out; }
.bj-chip:hover { transform: translateY(-3px); }
.bj-empty { padding: 8px 14px; }

/* barra do dono da mesa (blackjack ainda usa) */
.botbar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 16px; background: var(--sur); border-bottom: 1px solid var(--line); }
.botbar form { margin: 0; }

/* painel de opções da mesa (canto) */
.table-tools { position: fixed; right: 14px; bottom: 172px; z-index: 40; }
.table-tools summary { list-style: none; cursor: pointer; width: 44px; height: 44px; border-radius: 50%; background: var(--sur2); border: 1px solid var(--line); color: var(--ink); display: flex; align-items: center; justify-content: center; font-size: 20px; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); }
.table-tools summary::-webkit-details-marker { display: none; }
.table-tools[open] summary { background: var(--grn); color: var(--ongrn); border-color: var(--grn); }
.tt-body { position: absolute; right: 0; bottom: 52px; width: 260px; background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 12px; box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45); display: flex; flex-direction: column; gap: 6px; }
.tt-title { font-size: 12px; font-weight: 700; color: var(--dim); }
.tt-sec { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em; color: var(--dim); margin-top: 6px; }
.tt-row { display: flex; align-items: center; gap: 8px; margin: 0; }
.tt-bot { flex: 1; font-size: 13px; font-weight: 600; }
.tt-x { border: 0; background: rgba(221, 84, 104, 0.15); color: #dd5468; width: 24px; height: 24px; border-radius: 6px; cursor: pointer; font-weight: 800; }
.tt-sel { flex: 1; margin: 0; padding: 8px 10px; }
.tt-leave { width: 100%; border: 1px solid var(--line); background: var(--sur2); color: #dd5468; font-weight: 700; padding: 10px; border-radius: 10px; cursor: pointer; margin-top: 6px; }
@media (min-width: 900px) { .table-tools { bottom: 92px; } }

/* ---------- landing (visitante não logado) ---------- */
.lp { min-height: 100dvh; display: flex; flex-direction: column; }
.lp-nav { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--sur); position: sticky; top: 0; z-index: 10; }
.lp-ghost { padding: 9px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid var(--line); background: var(--sur2); text-decoration: none; white-space: nowrap; transition: filter 180ms ease-out; }
.lp-ghost:hover { filter: brightness(1.1); }
.lp-cta { display: inline-block; background: var(--grn); color: var(--ongrn); font-weight: 700; font-size: 15px; border-radius: 999px; padding: 13px 26px; text-decoration: none; white-space: nowrap; border: 0; cursor: pointer; transition: filter 180ms ease-out; }
.lp-cta:hover { filter: brightness(1.08); }
.lp-cta.sm { font-size: 13px; padding: 9px 16px; }
.lp-cta.gold { background: linear-gradient(120deg, var(--acc), var(--acc2)); color: var(--onacc); }

.thm { position: relative; width: 48px; height: 24px; flex-shrink: 0; border-radius: 999px; border: 1px solid var(--line); background: var(--sur2); cursor: pointer; padding: 0; transition: border-color 180ms ease-out; }
.thm:hover { border-color: var(--grn); }
.thm .mk { position: absolute; top: 50%; transform: translateY(-50%); color: var(--dim); opacity: 0.85; }
.thm .mk-sun { left: 7px; }
.thm .mk-moon { right: 8px; }
.thm-knob { position: absolute; top: 2px; left: 2px; width: 20px; height: 20px; border-radius: 50%; background: var(--grn); color: var(--ongrn); display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3); transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1); }
.thm-knob svg { position: absolute; transition: transform 320ms cubic-bezier(0.4, 0, 0.2, 1), opacity 200ms ease-out; }
.thm-knob .ic-sun { opacity: 1; transform: rotate(0) scale(1); }
.thm-knob .ic-moon { opacity: 0; transform: rotate(90deg) scale(0.4); }
[data-theme="emerald"] .thm-knob { transform: translateX(24px); }
[data-theme="emerald"] .thm-knob .ic-sun { opacity: 0; transform: rotate(-90deg) scale(0.4); }
[data-theme="emerald"] .thm-knob .ic-moon { opacity: 1; transform: rotate(0) scale(1); }

.lp-hero { position: relative; overflow: hidden; text-align: center; padding: 52px 16px 44px; background: radial-gradient(120% 110% at 50% -10%, var(--sur2), var(--bg)); border-bottom: 1px solid var(--line); }
.lp-kicker { font-size: 12px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--grn); }
.lp-h1 { font-family: var(--disp); font-weight: 400; font-size: clamp(36px, 7vw, 62px); line-height: 1.05; margin: 12px auto 0; max-width: 700px; letter-spacing: -0.01em; }
.lp-h1 em { font-style: normal; color: var(--grn); }
.lp-sub { font-size: 15px; color: var(--dim); max-width: 520px; margin: 14px auto 0; line-height: 1.55; }
.lp-ctas { display: flex; gap: 10px; justify-content: center; margin-top: 24px; flex-wrap: wrap; }
.lp-note { font-size: 12px; color: var(--dim); margin-top: 12px; }

.lp-fan { display: flex; justify-content: center; margin-top: 34px; height: 96px; }
.lp-fan .mcd { width: 58px; height: 82px; border-radius: 9px; margin: 0 -8px; }
.lp-fan .r { font-size: 24px; }
.lp-fan .s { font-size: 18px; }
.lp-fan .mcd:nth-child(1) { transform: rotate(-14deg) translateY(10px); }
.lp-fan .mcd:nth-child(2) { transform: rotate(-6deg) translateY(2px); }
.lp-fan .mcd:nth-child(3) { transform: rotate(2deg); }
.lp-fan .mcd:nth-child(4) { transform: rotate(10deg) translateY(6px); }
.lp-fan .mcd:nth-child(5) { transform: rotate(18deg) translateY(16px); }

.lp-sec { width: 100%; max-width: 1020px; margin: 0 auto; padding: 30px 16px 6px; }
.lp-sec .mh2 { padding: 0 0 12px; }
.lp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.lp-grid .gcard { height: 112px; }

.lp-rooms { display: flex; flex-direction: column; gap: 8px; }
.lp-rooms .mjoin { text-decoration: none; }

.lp-feats { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-feat { background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.lp-feat .fi { font-size: 22px; }
.lp-feat .ft, .lp-plan .ft { font-family: var(--disp); font-size: 20px; font-weight: 400; margin: 8px 0 4px; }
.lp-feat .fd3 { font-size: 13px; color: var(--dim); line-height: 1.5; }

.lp-pro { display: grid; grid-template-columns: 1fr; gap: 12px; }
.lp-plan { background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: flex; flex-direction: column; }
.lp-plan.hot { border-color: var(--acc); box-shadow: 0 0 0 1px var(--acc); }
.lp-plan .lp-price { font-family: var(--disp); font-size: 30px; font-weight: 400; margin: 4px 0 10px; }
.lp-plan .lp-perk { padding: 4px 0; font-size: 14px; }
.lp-plan .lp-cta { margin-top: 14px; text-align: center; }

.lp-foot { margin-top: 34px; border-top: 1px solid var(--line); background: var(--sur); padding: 22px 16px 30px; text-align: center; }
.lp-foot .legal { font-size: 12px; color: var(--dim); max-width: 620px; margin: 10px auto 0; line-height: 1.6; }

@media (min-width: 900px) {
  .lp-nav { padding: 12px 22px; }
  .lp-hero { padding: 76px 22px 60px; }
  .lp-grid { grid-template-columns: repeat(4, 1fr); }
  .lp-grid .gcard { height: 124px; }
  .lp-feats { grid-template-columns: repeat(3, 1fr); }
  .lp-pro { grid-template-columns: 1fr 1fr; }
  .lp-fan .mcd { width: 70px; height: 98px; margin: 0 -9px; }
}

/* ---------- desktop (≥ 900px) ---------- */
.dnav, .dbody, .drail, .dtable, .dhero, .dact { display: none; }

@media (min-width: 900px) {
  .mob-only { display: none !important; }

  .dnav { display: flex; align-items: center; gap: 18px; padding: 12px 22px; border-bottom: 1px solid var(--line); background: var(--sur); }
  .dnavt { font-size: 14px; color: var(--dim); font-weight: 500; }
  .dtabs { display: flex; gap: 4px; }
  .dcta { display: flex; align-items: center; gap: 8px; background: linear-gradient(120deg, var(--acc), var(--acc2)); color: var(--onacc); padding: 10px 18px; border-radius: 999px; font-weight: 700; font-size: 14px; border: 0; cursor: pointer; }
  .dctas { font-size: 10px; font-weight: 800; letter-spacing: 0.08em; background: rgba(255, 255, 255, 0.28); padding: 2px 6px; border-radius: 999px; }

  .dbody { flex: 1; display: flex; gap: 20px; padding: 18px 22px; min-height: 0; }
  .dmain { flex: 1; display: flex; flex-direction: column; min-width: 0; }
  .dmain .mh2 { padding: 4px 2px 12px; }
  .dgr { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; padding: 0; }
  .dgr .gcard { height: 118px; }

  .dtable { display: block; flex: 1; min-height: 0; overflow: auto; background: var(--sur); border: 1px solid var(--line); border-radius: 14px; }
  .drow { display: grid; grid-template-columns: 2.4fr 0.9fr 1fr 0.9fr 0.7fr 74px; gap: 10px; align-items: center; padding: 11px 16px; border-top: 1px solid var(--line); font-size: 14px; }
  .drow.hd { border-top: none; color: var(--dim); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; padding: 12px 16px 8px; }
  .drn { font-weight: 600; white-space: nowrap; }
  .ddim { color: var(--dim); }

  .drail { width: 300px; flex-shrink: 0; display: flex; flex-direction: column; gap: 14px; }
  .dcard { background: var(--sur); border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
  .dct { font-family: var(--disp); font-size: 24px; margin-bottom: 10px; font-weight: 400; }
  .dct2 { font-family: var(--disp); font-size: 20px; margin-bottom: 6px; font-weight: 400; }
  .dperk { font-size: 14px; padding: 3px 0; color: var(--ink); }
  .dprice { margin-top: 10px; font-weight: 700; font-size: 15px; }
  .dup { margin-top: 10px; background: linear-gradient(120deg, var(--acc), var(--acc2)); color: var(--onacc); text-align: center; padding: 12px; border-radius: 10px; font-weight: 700; cursor: pointer; }

  /* mesa desktop */
  .moval { inset: 40px 150px 120px; border-radius: 230px; }
  .mpot { top: 364px; }
  .mbd { top: 228px; gap: 8px; }
  .mbd .mcd { width: 46px; height: 66px; border-radius: 8px; }
  .mbd .r { font-size: 21px; }
  .mbd .s { font-size: 16px; }
  .mdl { top: 330px; left: 60%; }

  .mp1 { top: 52px; left: 230px; right: auto; }
  .mp2 { top: 22px; }
  .mp3 { top: 52px; right: 230px; left: auto; }
  .mp4 { top: 255px; right: 80px; }
  .mp5 { top: 255px; left: 80px; }
  .mp6 { top: 152px; left: 26px; }
  .mp7 { top: 152px; right: 26px; }

  .dhero { display: flex; position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%); align-items: center; gap: 16px; z-index: 6; }
  .dhh { display: flex; gap: 8px; }
  .dhh .mcd { width: 72px; height: 100px; border-radius: 10px; }
  .dhh .r { font-size: 32px; }
  .dhh .s { font-size: 24px; }
  .mbd .pflip { width: 56px; height: 80px; }
  .mbd .r { font-size: 26px; }
  .mbd .s { font-size: 20px; }
  .dhh .pflip { width: 72px; height: 100px; }

  .mrow2 { height: 46px; gap: 5px; }
  .mmc { width: 32px; height: 46px; }
  .mrow2.sd { height: 60px; }
  .mrow2.sd .pflip { width: 42px; height: 60px; }

  .mdl.dlr0 { top: auto; bottom: 140px; left: 56%; }
  .mdl.dlr1 { top: 150px; left: 320px; }
  .mdl.dlr2 { top: 120px; left: 56%; }
  .mdl.dlr3 { top: 150px; left: calc(100% - 340px); }
  .mdl.dlr4 { top: 300px; left: calc(100% - 220px); }
  .mdl.dlr5 { top: 300px; left: 210px; }

  .dact { display: flex; align-items: center; gap: 14px; padding: 14px 22px; border-top: 1px solid var(--line); background: var(--sur); }
  /* frames de largura estável: aviso (elástico, corta excesso) | quantia (fixa) | botões (fixos).
     O balão aparecer/sumir não move o slider nem os botões. */
  .dact .dstat-row { flex: 1 1 0; min-width: 0; overflow: hidden; }
  .dr { flex: 0 0 260px; max-width: 260px; }
  .dact .mrv { flex: 0 0 76px; min-width: 76px; }
  /* largura fixa: "Check", "Call 12,500" ou "Check/Fold" — o botão não muda */
  .dbtn { flex: 0 0 150px; width: 150px; flex-direction: row; justify-content: center; padding: 12px 8px; gap: 6px; white-space: nowrap; overflow: hidden; }
}

/* pilha gráfica do pote (abaixo do board, acima do pill) */
.pot-chips { position: absolute; top: 282px; left: 50%; transform: translateX(-50%); display: flex; gap: 7px; align-items: flex-end; height: 42px; z-index: 5; pointer-events: none; }
.chip-stack { position: relative; width: 24px; height: 42px; }
.pot-chip { position: absolute; left: 0; width: 24px; height: 14px; border-radius: 50%; box-shadow: 0 2px 3px rgba(0, 0, 0, 0.35), inset 0 -2px 0 rgba(0, 0, 0, 0.25); border: 2px dashed rgba(255, 255, 255, 0.55); animation: dealIn 220ms backwards; }
.pot-chip.c-gold { background: radial-gradient(circle at 35% 30%, #ffe9a8, #d9a927); }
.pot-chip.c-red { background: radial-gradient(circle at 35% 30%, #ff9d9d, #c22f42); }
.pot-chip.c-blue { background: radial-gradient(circle at 35% 30%, #9dc4ff, #2f5ec2); }
.pot-chip.c-green { background: radial-gradient(circle at 35% 30%, #a8f0c2, #1f8654); }
.pot-chip.c-dark { background: radial-gradient(circle at 35% 30%, #8f9bb0, #232c3b); }
@media (min-width: 900px) {
  .pot-chips { top: 316px; }
}

/* botão de som */
.sound-btn { border: 1px solid var(--line); background: var(--sur2); color: var(--ink); border-radius: 999px; width: 34px; height: 34px; cursor: pointer; font-size: 15px; line-height: 1; display: flex; align-items: center; justify-content: center; padding: 0; }
.sound-btn:hover { filter: brightness(1.15); }

/* cartas do herói quando ele deu fold: inutilizadas visualmente */
.dhh.folded, .mhh.folded { position: relative; filter: grayscale(1) brightness(0.55); opacity: 0.6; }
.dhh.folded .pflip, .mhh.folded .pflip { transform: rotate(-6deg); transition: transform 300ms ease-out, filter 300ms; }
.dhh.folded .pflip:last-of-type, .mhh.folded .pflip:last-of-type { transform: rotate(5deg) translateX(-8px); }
.fold-stamp { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-12deg); background: rgba(221, 84, 104, 0.92); color: #fff; font-weight: 800; font-size: 13px; letter-spacing: 0.12em; padding: 3px 10px; border-radius: 6px; border: 2px solid rgba(255, 255, 255, 0.55); pointer-events: none; z-index: 3; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4); }

/* pílula da carteira + botão adicionar fichas (topo da mesa) */
.wallet-pill { display: flex; align-items: center; gap: 6px; background: linear-gradient(120deg, var(--acc), var(--acc2)); color: var(--onacc); border: 0; border-radius: 999px; padding: 7px 13px; font-weight: 800; font-size: 13px; cursor: pointer; white-space: nowrap; }
.wallet-pill:hover { filter: brightness(1.08); }
.wp-plus { background: rgba(255, 255, 255, 0.28); border-radius: 999px; padding: 1px 7px; font-size: 12px; font-weight: 800; }
.pkb.aslink { background: none; border: 0; cursor: pointer; }

/* modais (<dialog>) */
/* o reset "* { margin: 0 }" mata o margin:auto padrão do <dialog>; sem isso o
   popup gruda no canto — restaurado aqui para centralizar na viewport */
.modal { border: 0; background: transparent; padding: 0; color: var(--ink); margin: auto; animation: dealIn 200ms backwards; }
.modal::backdrop { background: rgba(0, 0, 0, 0.55); backdrop-filter: blur(3px); }
.modal-card { background: var(--sur); border: 1px solid var(--line); border-radius: 16px; padding: 22px; width: min(92vw, 380px); display: flex; flex-direction: column; gap: 12px; box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5); }
.modal-title { font-family: var(--disp); font-size: 22px; font-weight: 400; }
.modal-text { font-size: 14px; color: var(--dim); line-height: 1.5; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 4px; }

/* flash na página da mesa (toast no topo) */
.table-flash { position: fixed; top: 60px; left: 50%; transform: translateX(-50%); z-index: 60; display: flex; flex-direction: column; gap: 6px; max-width: 90vw; }
.table-flash .flashmsg { animation: dealIn 300ms backwards; }
.table-flash .error { border-color: #dd5468; }

/* aviso de pré-ação cancelada (aposta subiu) */
.notice-toast { position: absolute; top: 20%; left: 50%; transform: translateX(-50%); z-index: 32; background: rgba(221, 84, 104, 0.92); color: #fff; border-radius: 12px; padding: 10px 18px; font-weight: 700; font-size: 13px; max-width: 88%; text-align: center; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); }

/* seletor de verso das cartas no painel da mesa */
.cb-btn { width: 34px; height: 48px; border-radius: 6px; border: 2px solid var(--line); background-size: cover; background-position: center; background-color: #123; cursor: pointer; padding: 0; transition: transform 140ms ease-out, border-color 140ms; }
.cb-btn:hover { transform: translateY(-2px); }
.cb-btn.on { border-color: var(--grn); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.25); }

/* modal de escolha de avatar (preset em static/images, salvo no perfil) */
.av-preview { display: flex; align-items: center; gap: 14px; margin-bottom: 6px; }
.av-big { flex: 0 0 84px; width: 84px; height: 84px; border-radius: 50%; border: 3px solid var(--grn); background-size: cover; background-position: center; background-color: rgba(0, 0, 0, 0.35); display: flex; align-items: center; justify-content: center; font-weight: 800; font-size: 26px; color: #fff; }
.av-grid { display: grid; grid-template-columns: repeat(5, 52px); gap: 10px; justify-content: center; margin: 14px 0 4px; max-height: 300px; overflow-y: auto; padding: 4px; }
.av-opt { width: 52px; height: 52px; border-radius: 50%; border: 2px solid var(--line); background-size: cover; background-position: center; cursor: pointer; padding: 0; transition: transform 120ms ease-out, border-color 120ms; }
.av-opt:hover { transform: scale(1.08); }
.av-opt.on { border-color: var(--grn); box-shadow: 0 0 0 3px rgba(74, 222, 128, 0.3); }

/* botão do dealer como badge DENTRO do assento (acompanha a nova ordem visual) */
.mseat { }
.mseat .mdl.inseat, .hero-seat .mdl.inseat { position: absolute; top: -4px; right: -8px; left: auto; bottom: auto; width: 18px; height: 18px; font-size: 10px; z-index: 7; }
.hero-seat { position: relative; }

/* fold dos oponentes: cartas ficam cinzas/tortas com carimbo (igual ao herói) */
.mrow2 { position: relative; }
.mrow2.fldv .mmc { filter: grayscale(1) brightness(0.55); opacity: 0.7; transition: transform 300ms ease-out, filter 300ms; }
.mrow2.fldv .mmc:first-child { transform: rotate(-9deg); }
.mrow2.fldv .mmc:last-of-type { transform: rotate(8deg) translateX(-3px); }
.fold-stamp.mini { font-size: 7px; padding: 1px 4px; border-width: 1px; letter-spacing: 0.08em; border-radius: 4px; }

/* textos do painel ⚙ quebram linha (o .mrm global é nowrap) */
.tt-body .mrm { white-space: normal; line-height: 1.35; }

/* provocações (efeitos sonoros) — coluna acima do botão ⚙ */
.taunts { position: fixed; right: 14px; bottom: 226px; display: flex; flex-direction: column; gap: 8px; z-index: 40; }
.taunt-btn { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--sur2); font-size: 20px; cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.35); transition: transform 140ms ease-out; padding: 0; line-height: 1; }
.taunt-btn:hover:not(:disabled) { transform: translateY(-2px); }
.taunt-btn:disabled { opacity: 0.35; cursor: default; }
@media (min-width: 900px) { .taunts { bottom: 146px; } }

/* destaque das cartas que formam a melhor mão do herói */
.pflip.hl .pface { outline: 2px solid #ffd977; outline-offset: -2px; box-shadow: 0 0 0 3px rgba(255, 217, 119, 0.35), 0 3px 12px rgba(255, 217, 119, 0.25); }

/* selo suave com o nome do jogo atual ("Par", "Flush"...) acima das cartas */
.hand-label { position: absolute; top: -24px; left: 50%; transform: translateX(-50%); background: rgba(255, 217, 119, 0.92); color: #241a06; font-size: 11px; font-weight: 800; letter-spacing: 0.04em; padding: 3px 10px; border-radius: 999px; white-space: nowrap; z-index: 8; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.35); pointer-events: none; }
/* variante inline (mobile): mora na coluna de fichas, ao lado das cartas */
.hand-label.inline { position: static; transform: none; display: inline-block; }
.dhh, .mhh { position: relative; }
.pop2-enter-active { transition: all 240ms cubic-bezier(0.2, 0.8, 0.3, 1); }
.pop2-leave-active { transition: all 150ms ease-in; position: absolute; }
.pop2-enter-from, .pop2-leave-to { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.8); }
.hand-label.inline.pop2-enter-from, .hand-label.inline.pop2-leave-to { transform: translateY(6px) scale(0.8); }
