:root {
  --bg: #0B3327; --felt: #12523D; --felt-edge: #1D6A51; --panel: #0F3F31; --line: #2E5E4E;
  --cream: #FFF8EC; --ink: #1E1A14; --muted: #B9CFC5; --dim: #6F9A89;
  --gold: #F2B33D; --gold-ink: #2A1D05; --red: #B3261E; --truco: #A3261E; --back: #8E2B2B;
  --head: 'Bricolage Grotesque', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: #F6EEDD; font-family: Inter, system-ui, sans-serif; -webkit-tap-highlight-color: transparent; }
button { font: inherit; cursor: pointer; }
button:disabled { cursor: default; opacity: .45; }
button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
#app { min-height: 100%; display: flex; flex-direction: column; max-width: 1100px; margin: 0 auto; }

/* Menu */
.menu { padding: 28px 20px; display: flex; flex-direction: column; gap: 18px; max-width: 460px; width: 100%; margin: 0 auto; }
.menu h1 { margin: 0; font-family: var(--head); font-size: 44px; font-weight: 800; letter-spacing: -.02em; }
.menu p { margin: 0; color: var(--muted); }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .06em; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; background: var(--panel); border-radius: 14px; padding: 4px; }
.seg button { height: 44px; border: 0; border-radius: 11px; background: transparent; color: var(--muted); font-weight: 600; }
.seg button[aria-pressed="true"] { background: var(--cream); color: var(--ink); font-weight: 700; }
.cta { height: 56px; border: 0; border-radius: 14px; background: var(--gold); color: var(--gold-ink); font-weight: 800; font-size: 18px; }
.ghost { height: 46px; border: 1px solid var(--line); border-radius: 12px; background: transparent; color: #F6EEDD; font-weight: 600; padding: 0 16px; }
.note { font-size: 13px; color: var(--muted); line-height: 1.5; }

/* Jogo */
.top { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 8px; }
.top .mode { font-size: 12px; font-weight: 700; color: var(--muted); letter-spacing: .04em; text-align: center; }
.score { display: flex; align-items: baseline; justify-content: center; gap: 10px; font-family: var(--head); }
.score b { font-size: 30px; font-weight: 800; }
.score small { font-family: Inter, sans-serif; font-size: 13px; color: var(--muted); }
.score i { color: var(--dim); font-style: normal; }
.vale { min-width: 48px; height: 46px; border-radius: 12px; background: var(--gold); color: var(--gold-ink); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; padding: 0 8px; }
.vale small { font-size: 10px; font-weight: 700; } .vale b { font-size: 19px; font-weight: 800; }
.iconbtn { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: #F6EEDD; display: flex; align-items: center; justify-content: center; }

.table { position: relative; flex: 1 1 auto; min-height: 380px; margin: 4px 10px; border-radius: 28px; background: var(--felt); border: 2px solid var(--felt-edge); overflow: hidden; }
@media (min-width: 760px) { .center { transform: translate(-50%, -46%); } }
@media (min-width: 760px) { .table { border-radius: 220px; border: 10px solid #3A2A17; min-height: 440px; margin: 8px 20px; } }
.seat { position: absolute; display: flex; flex-direction: column; align-items: center; gap: 6px; z-index: 2; }
.seat.top { top: 14px; left: 50%; transform: translateX(-50%); }
.seat.left { left: 8px; top: 20%; }
.seat.right { right: 8px; top: 20%; }
@media (min-width: 760px) { .seat.left { left: 7%; top: 38%; } .seat.right { right: 7%; top: 38%; } .seat.top { top: 22px; } }
.tag { font-size: 12px; font-weight: 600; background: var(--bg); padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.tag.turn { background: var(--gold); color: var(--gold-ink); font-weight: 700; }
.backs { display: flex; gap: 4px; }
@media (min-width: 760px) { .seat.left .backs, .seat.right .backs { flex-direction: column; } }
.back { width: 30px; height: 44px; border-radius: 6px; background: var(--back); border: 2px solid var(--cream); }
@media (min-width: 760px) { .seat.left .back, .seat.right .back { width: 44px; height: 30px; } }

.center { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -30%); display: flex; flex-direction: column; align-items: center; gap: 10px; width: 100%; }
.vira { display: flex; align-items: center; gap: 8px; font-size: 11px; font-weight: 700; color: var(--muted); }
.played { display: flex; gap: 8px; min-height: 104px; align-items: flex-start; justify-content: center; }
.played .who { font-size: 10px; color: var(--muted); text-align: center; margin-top: 4px; max-width: 64px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.played .won .card { box-shadow: 0 0 0 3px var(--gold), 0 6px 14px #0006; }
.vazas { display: flex; align-items: center; gap: 7px; background: var(--bg); padding: 5px 12px; border-radius: 999px; font-size: 11px; font-weight: 700; color: var(--muted); }
.dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--dim); }
.dot.us { background: var(--gold); border-color: var(--gold); }
.dot.them { background: var(--red); border-color: var(--red); }
.dot.tie { background: var(--muted); border-color: var(--muted); }

.card { width: 56px; height: 80px; border-radius: 9px; background: var(--cream); color: var(--ink); display: flex; flex-direction: column; justify-content: space-between; padding: 6px 7px; box-shadow: 0 6px 14px #0006; border: 0; line-height: 1; }
.card.red { color: var(--red); }
.card .r { font-size: 20px; font-weight: 800; }
.card .s { font-size: 24px; align-self: flex-end; }
.card.sm { width: 38px; height: 54px; padding: 4px 5px; } .card.sm .r { font-size: 15px; } .card.sm .s { font-size: 15px; }
.card.facedown { background: var(--back); border: 2px solid var(--cream); }
.card.manilha { box-shadow: 0 0 0 2px var(--gold) inset, 0 6px 14px #0006; }

.bar { padding: 8px 12px 14px; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.hand { display: flex; justify-content: center; gap: 10px; min-height: 140px; align-items: flex-end; }
.hand .card { width: 88px; height: 128px; padding: 9px 10px; transition: transform .12s; }
.hand .card .r { font-size: 30px; } .hand .card .s { font-size: 40px; }
.hand .card:not(:disabled):hover { transform: translateY(-8px); }
.hand .card:disabled { opacity: 1; filter: saturate(.85) brightness(.9); }
.partner { display: flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.btn { height: 48px; min-width: 104px; padding: 0 16px; border-radius: 12px; border: 0; font-weight: 700; font-size: 15px; }
.btn.truco { background: var(--truco); color: var(--cream); font-family: var(--head); font-weight: 800; font-size: 18px; }
.btn.ok { background: var(--felt); color: var(--cream); border: 1px solid var(--felt-edge); }
.btn.run { background: var(--cream); color: var(--ink); }
.btn.toggle { background: var(--panel); color: #F6EEDD; border: 1px solid var(--line); }
.btn.toggle[aria-pressed="true"] { background: var(--gold); color: var(--gold-ink); border-color: var(--gold); }
.status { min-height: 22px; font-size: 14px; color: var(--muted); text-align: center; padding: 0 12px; }
.status b { color: #F6EEDD; }

.prompt { width: min(100%, 440px); background: var(--cream); color: var(--ink); border-radius: 18px; padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; box-shadow: 0 14px 40px #0008; }
.prompt .big { font-family: var(--head); font-size: 32px; font-weight: 800; color: var(--truco); line-height: 1; }
.prompt small { color: #6A5E4B; font-size: 13px; }

.overlay { position: fixed; inset: 0; background: #000a; display: flex; align-items: center; justify-content: center; padding: 20px; z-index: 10; }
.endcard { width: min(100%, 400px); background: var(--bg); border: 1px solid var(--felt-edge); border-radius: 22px; padding: 26px 22px; display: flex; flex-direction: column; gap: 16px; text-align: center; }
.endcard h2 { margin: 0; font-family: var(--head); font-size: 38px; font-weight: 800; }
.endcard .final { font-family: var(--head); font-size: 46px; font-weight: 800; }
.log { font-size: 12px; color: var(--dim); text-align: center; min-height: 16px; }

/* Online */
.brand { font-family: var(--head); font-size: 24px; font-weight: 800; }
.topnav { display: flex; gap: 6px; align-items: center; }
.pill { height: 40px; padding: 0 14px; white-space: nowrap; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: #F6EEDD; font-weight: 700; }
.ghost.sm { height: 40px; padding: 0 12px; font-size: 14px; }
.menu.wide { max-width: 560px; }
.input { height: 50px; border-radius: 12px; border: 1px solid var(--line); background: var(--panel); color: #F6EEDD; padding: 0 14px; font: inherit; font-size: 16px; color-scheme: dark; }
.input:focus { outline: 3px solid var(--gold); outline-offset: 1px; }
.notice { background: var(--cream); color: var(--ink); border-radius: 12px; padding: 10px 14px; font-size: 14px; font-weight: 500; }
.bonus { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--gold); color: var(--gold-ink); border-radius: 16px; padding: 12px 14px; }
.bonus div { display: flex; flex-direction: column; gap: 2px; } .bonus small { font-size: 12px; }
.btn.dark { background: var(--gold-ink); color: var(--gold); min-width: 90px; }
.searching { background: var(--panel); border: 1px dashed var(--gold); border-radius: 12px; padding: 12px 14px; font-size: 14px; }
.tiers { display: flex; flex-direction: column; gap: 10px; }
.tier { display: flex; align-items: center; gap: 12px; background: var(--felt); border: 1px solid var(--felt-edge); border-radius: 16px; padding: 12px; }
.stake { width: 58px; height: 58px; border-radius: 14px; background: var(--bg); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; flex: none; }
.stake b { font-family: var(--head); font-size: 19px; font-weight: 800; } .stake small { font-size: 10px; color: var(--muted); }
.tinfo { flex: 1 1 auto; display: flex; flex-direction: column; gap: 3px; min-width: 0; } .tinfo small { font-size: 12px; color: var(--muted); }
.tier .btn { min-width: 96px; }
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank li { display: grid; grid-template-columns: 36px 1fr auto auto; gap: 10px; align-items: center; background: var(--panel); border-radius: 12px; padding: 10px 12px; }
.rank li.me { outline: 2px solid var(--gold); }
.rank .pos { font-family: var(--head); font-weight: 800; color: var(--muted); }
.rank .net { font-weight: 700; } .rank small { color: var(--dim); font-size: 12px; }
.up { color: #9FE3B8; } .down { color: #F0A39C; }
.delta { font-family: var(--head); font-size: 26px; font-weight: 800; }
.cd { color: var(--gold); font-weight: 700; }

/* Loja */
.btn.sm { height: 40px; min-width: 0; padding: 0 14px; font-size: 14px; }
.qr { align-self: center; width: 240px; height: 240px; background: #fff; border-radius: 16px; padding: 10px; }
.input.code { height: auto; padding: 12px 14px; font-family: ui-monospace, monospace; font-size: 13px; line-height: 1.4; resize: none; word-break: break-all; }
.topnav { flex-wrap: wrap; justify-content: flex-end; }

/* Lobby: pilha de fichas, vagas da Copa */
.stack { position: relative; width: 64px; height: 64px; flex: none; display: flex; flex-direction: column-reverse; align-items: center; justify-content: flex-start; padding-bottom: 6px; }
.stack i { display: block; width: 46px; height: 9px; margin-top: -3px; border-radius: 50%; background: var(--gold); border: 2px solid var(--gold-ink); box-shadow: inset 0 -2px 0 #0003; }
.stack i:nth-child(even) { background: var(--cream); }
.stack b { position: absolute; top: 2px; left: 0; right: 0; text-align: center; font-family: var(--head); font-size: 16px; font-weight: 800; }
.tier .btn { line-height: 1.1; }
.tier .btn small { font-size: 11px; font-weight: 600; opacity: .8; }
.gold { color: var(--gold); font-weight: 700; }
.live { display: inline-flex; align-items: center; gap: 6px; }
.live i { width: 8px; height: 8px; border-radius: 50%; background: #6EE7A0; display: inline-block; }
.vagas { height: 8px; border-radius: 999px; background: var(--bg); overflow: hidden; margin-top: 4px; }
.vagas span { display: block; height: 100%; background: var(--gold); border-radius: 999px; transition: width .3s; }
.vagas.big { height: 14px; }
.names { display: flex; flex-wrap: wrap; gap: 6px; }
.names span { background: var(--panel); border-radius: 999px; padding: 4px 10px; font-size: 13px; }
.dim { color: var(--dim); }

/* Chave da Copa */
.bracket { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; align-items: center; }
.round { display: flex; flex-direction: column; gap: 10px; justify-content: space-around; height: 100%; }
.round h3 { margin: 0; font-size: 11px; letter-spacing: .08em; color: var(--muted); text-transform: uppercase; text-align: center; }
.duel { background: var(--felt); border: 1px solid var(--felt-edge); border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; gap: 2px; font-size: 13px; min-width: 0; }
.duel div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.duel .win { color: var(--gold); font-weight: 700; }
.duel .lose { color: var(--dim); text-decoration: line-through; }
.duel.live { border-color: var(--gold); }
.duel small { font-size: 10px; color: var(--gold); }
.champ { background: var(--gold); color: var(--gold-ink); border-radius: 18px; padding: 16px; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.champ b { font-family: var(--head); font-size: 30px; font-weight: 800; }
@media (max-width: 480px) { .bracket { font-size: 12px; gap: 6px; } .duel { padding: 5px 6px; } }

/* =====================================================================
   Trucandoo — visual novo (lobby, perfil, mesa)
   ===================================================================== */
:root { --wood: #6B3B17; --wood2: #A0612A; --felt2: #0F5A3C; --gold2: #FFC93C; --disp: 'Baloo 2', 'Bricolage Grotesque', system-ui, sans-serif; }
body { background: radial-gradient(ellipse at 50% 0%, #17513B 0%, #0B2A1F 55%, #071B14 100%) fixed; }
#app { padding-bottom: 92px; }
body.in-game #app { padding-bottom: 0; }

/* Topo */
.tb { display: grid; grid-template-columns: 52px 1fr 108px; align-items: center; gap: 8px; padding: 10px 14px 0; }
.tb-r { display: flex; gap: 8px; justify-content: flex-end; }
.ic { width: 46px; height: 46px; border-radius: 14px; border: 1.5px solid #2E7A58; background: linear-gradient(#124A35, #0B3022); color: #F6EEDD; font-size: 20px; display: flex; align-items: center; justify-content: center; box-shadow: inset 0 1px 0 #ffffff14, 0 4px 10px #0006; }
.logo-btn { border: 0; background: none; padding: 0; justify-self: center; }
.logo-sm { height: 64px; width: auto; display: block; filter: drop-shadow(0 4px 8px #0008); }
.logo-big { width: min(78vw, 300px); height: auto; display: block; margin: 0 auto; filter: drop-shadow(0 8px 18px #000a); }
.tb2 { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px 14px 0; flex-wrap: wrap; }
.tb2-r { display: flex; gap: 6px; align-items: center; }
.online { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--muted); background: #0009; border: 1px solid #2E5E4E; padding: 6px 12px; border-radius: 999px; }
.online i { width: 9px; height: 9px; border-radius: 50%; background: #4ADE80; box-shadow: 0 0 8px #4ADE80; }

/* Menu lateral */
.drawer-bg { position: fixed; inset: 0; background: #000a; border: 0; z-index: 30; }
.drawer { position: fixed; top: 0; left: 0; bottom: 0; width: min(80vw, 300px); background: #0B2A1F; border-right: 2px solid #C9952B; z-index: 31; padding: 18px 14px; display: flex; flex-direction: column; gap: 6px; box-shadow: 8px 0 30px #000a; }
.drawer .logo-sm { height: 80px; align-self: center; margin-bottom: 10px; }
.drawer button { text-align: left; height: 50px; border-radius: 12px; border: 1px solid transparent; background: transparent; color: #F6EEDD; font-size: 16px; font-weight: 600; padding: 0 14px; }
.drawer button:hover { background: #ffffff10; border-color: #2E5E4E; }

/* Barra inferior */
.bnav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: grid; grid-template-columns: repeat(5, 1fr); align-items: end; padding: 8px 6px calc(8px + env(safe-area-inset-bottom)); background: linear-gradient(#0D3B2B, #07211A); border-top: 2px solid #C9952B; border-radius: 22px 22px 0 0; box-shadow: 0 -8px 24px #0009; max-width: 1100px; margin: 0 auto; }
.bnav button { border: 0; background: none; color: #CFE3D8; font-weight: 700; font-size: 12px; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 0; }
.bnav button span { font-size: 22px; line-height: 1; filter: grayscale(.4); }
.bnav button.on { color: var(--gold2); } .bnav button.on span { filter: none; }
.bnav .jogar { margin-top: -34px; }
.bnav .jogar span { width: 66px; height: 66px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 28px; color: #fff; filter: none; background: radial-gradient(circle at 35% 30%, #34C46F, #12773F); border: 4px solid #E7B43A; box-shadow: 0 0 0 4px #0B2A1F, 0 6px 18px #000a, 0 0 18px #FFC93C66; }
.bnav .jogar { color: var(--gold2); }

/* Bônus */
.bonus2 { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; background: linear-gradient(#13503A, #0C3627); border: 2px solid #C9952B; box-shadow: inset 0 1px 0 #ffffff18, 0 6px 16px #0007; }
.bonus2 .gift { font-size: 38px; filter: drop-shadow(0 3px 4px #0008); }
.bonus2 div { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.bonus2 b { font-family: var(--disp); font-size: 19px; line-height: 1.1; } .bonus2 em { font-style: normal; color: var(--gold2); }
.bonus2 small { color: var(--muted); font-size: 13px; }
.btn.gold { background: linear-gradient(#FFD86B, #E8A417); color: #3A2400; border-radius: 999px; min-width: 96px; font-family: var(--disp); font-size: 17px; box-shadow: inset 0 -3px 0 #0003, 0 4px 10px #0006; }

/* Paulista / Mineiro */
.seg2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: #0007; border: 1px solid #2E7A58; border-radius: 999px; padding: 4px; }
.seg2 button { height: 46px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); font-family: var(--disp); font-size: 18px; font-weight: 700; }
.seg2 button[aria-pressed="true"] { background: linear-gradient(#FFF6D8, #EAD9A2); color: #1E1A14; box-shadow: 0 3px 10px #0006; }

/* Cartões Mesa / Arena */
.modes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.modecard { position: relative; min-height: 168px; border-radius: 20px; border: 2px solid #2E7A58; background: radial-gradient(ellipse at 50% 30%, #1A6B4A, #0C3627 75%); color: #FFF8EC; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 2px; padding: 12px 8px; overflow: hidden; box-shadow: inset 0 1px 0 #ffffff18, 0 6px 16px #0007; }
.modecard.on { border-color: #FFC93C; box-shadow: 0 0 0 2px #FFC93C55, 0 0 22px #FFC93C55, inset 0 1px 0 #ffffff22; }
.modecard b { font-family: var(--disp); font-size: 28px; line-height: 1; text-shadow: 0 3px 0 #0007; }
.modecard.copa b { color: var(--gold2); }
.modecard small { color: #E8EFE9; font-size: 13px; }
.modecard .vs { font-size: 13px; border: 1px solid #ffffff44; border-radius: 999px; padding: 3px 12px; margin-top: 4px; }
.modecard .trophy { font-size: 54px; line-height: 1; filter: drop-shadow(0 6px 10px #000a); margin-bottom: 4px; }
.modecard .ribbon { background: linear-gradient(#E53935, #A81E1E); color: #fff; font-family: var(--disp); font-weight: 800; font-size: 16px; padding: 2px 16px; border-radius: 6px; box-shadow: 0 3px 0 #6E0F0F; margin: 2px 0 4px; }
.mtable { position: relative; width: 120px; height: 58px; margin-bottom: 6px; }
.mtable .top { position: absolute; left: 22px; right: 22px; top: 8px; height: 26px; border-radius: 50%; background: radial-gradient(ellipse at 50% 35%, #B57A3F, #7A4520); box-shadow: 0 4px 0 #4E2A10, 0 10px 14px #0008; }
.mtable .top::after { content: ''; position: absolute; left: 50%; top: 30px; width: 8px; height: 22px; margin-left: -4px; background: #5A3214; border-radius: 3px; }
.mtable .chair { position: absolute; top: 4px; width: 22px; height: 44px; border-radius: 6px 6px 2px 2px; background: linear-gradient(#8A5226, #5A3214); box-shadow: 0 6px 10px #0008; }
.mtable .chair.l { left: 2px; transform: skewY(-8deg); } .mtable .chair.r { right: 2px; transform: skewY(8deg); }
.note.info { font-size: 13px; }

/* Lista de mesas */
.lobby .tier { background: linear-gradient(#124733, #0B3326); border: 1px solid #2E7A58; border-radius: 16px; box-shadow: inset 0 1px 0 #ffffff12, 0 4px 12px #0006; }
.lobby .tinfo b { font-family: var(--disp); font-size: 20px; line-height: 1.1; }
.sbtn { min-width: 96px; height: 56px; border-radius: 14px; border: 1px solid #5BD38A; background: linear-gradient(#2FA45E, #17733D); color: #fff; font-family: var(--disp); font-weight: 800; font-size: 18px; line-height: 1.05; display: flex; flex-direction: column; align-items: center; justify-content: center; box-shadow: inset 0 -3px 0 #0003, 0 4px 10px #0007; }
.sbtn small { font-family: Inter, sans-serif; font-size: 12px; font-weight: 700; opacity: .9; }
.sbtn.cancel { background: linear-gradient(#FFF6D8, #E9DBAE); color: #1E1A14; border-color: #E9DBAE; }

/* Fichas de cassino */
.chips { position: relative; width: 64px; height: 50px; flex: none; }
.chips i { position: absolute; width: 38px; height: 14px; border-radius: 50%; background: var(--c1); border: 2px solid #0005; box-shadow: inset 0 -3px 0 #0004; }
.chips i::after { content: ''; position: absolute; inset: 2px 6px; border-radius: 50%; border: 2px dashed #fffc; }
.chips i:nth-child(1) { left: 2px; top: 30px; } .chips i:nth-child(2) { left: 2px; top: 22px; } .chips i:nth-child(3) { left: 22px; top: 26px; } .chips i:nth-child(4) { left: 14px; top: 10px; }
.chips.red { --c1: #D62F2F; } .chips.blue { --c1: #2563EB; } .chips.green { --c1: #16A34A; } .chips.black { --c1: #27272A; }
.chips.purple { --c1: #7C3AED; } .chips.orange { --c1: #EA7A12; } .chips.pink { --c1: #DB2777; } .chips.teal { --c1: #0D9488; }
.chips.gold { --c1: #D4A017; } .chips.navy { --c1: #1E3A8A; } .chips.wine { --c1: #7F1D1D; } .chips.silver { --c1: #9CA3AF; }

/* Perfil */
.mecard { display: flex; align-items: center; gap: 14px; background: linear-gradient(#124733, #0B3326); border: 1px solid #2E7A58; border-radius: 18px; padding: 16px; }
.mecard div { display: flex; flex-direction: column; } .mecard b { font-family: var(--disp); font-size: 24px; } .mecard small { color: var(--gold2); font-weight: 700; }

/* Avatar ilustrado */
.av { --h: 140; position: relative; flex: none; width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; background: radial-gradient(circle at 35% 30%, hsl(var(--h) 70% 62%), hsl(var(--h) 60% 32%)); border: 3px solid #E7B43A; box-shadow: 0 3px 8px #0008; overflow: hidden; }
.av b { font-family: var(--disp); font-size: 18px; color: #fff; text-shadow: 0 2px 0 #0006; z-index: 1; }
.av i { position: absolute; right: -2px; bottom: -8px; font-style: normal; font-size: 30px; color: #ffffff30; }
.av.big { width: 72px; height: 72px; } .av.big b { font-size: 28px; }

/* ===================== Mesa ===================== */
.g { display: flex; flex-direction: column; gap: 8px; padding: 8px 10px calc(10px + env(safe-area-inset-bottom)); max-width: 560px; margin: 0 auto; width: 100%; min-height: 100vh; }
.gtop { display: grid; grid-template-columns: 52px 1fr 52px; align-items: center; }
.gtop .logo-sm { height: 52px; justify-self: center; }
.vale2 { width: 50px; height: 46px; border-radius: 12px; background: linear-gradient(#FFD86B, #E8A417); color: #3A2400; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; box-shadow: inset 0 -3px 0 #0003; }
.vale2 small { font-size: 9px; font-weight: 800; } .vale2 b { font-family: var(--disp); font-size: 20px; }
.ginfo { display: grid; grid-template-columns: 1fr auto 1fr; gap: 6px; align-items: center; }
.gbox { background: linear-gradient(#124733, #0B3326); border: 1.5px solid #C9952B; border-radius: 12px; padding: 6px 8px; display: flex; flex-direction: column; align-items: center; text-align: center; min-width: 0; }
.gbox small { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.gbox b { font-family: var(--disp); font-size: 17px; color: var(--gold2); line-height: 1.1; }
.gbox .sc { font-size: 24px; color: #fff; } .gbox .sc i { font-style: normal; color: var(--gold2); font-size: 16px; }
.ppill { position: relative; display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: linear-gradient(#155C40, #0C3627); border: 2px solid #C9952B; box-shadow: 0 4px 10px #0007; }
.ppill div { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.ppill b { font-family: var(--disp); font-size: 15px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ppill small { font-size: 12px; color: var(--muted); } .ppill em { font-style: normal; color: var(--gold2); font-weight: 800; }
.ppill.turn { border-color: #FFE17A; box-shadow: 0 0 0 2px #FFC93C88, 0 0 18px #FFC93C66; }
.ppill.me { align-self: center; margin-top: -26px; z-index: 3; }
.dotonline { position: absolute; left: 36px; top: 34px; width: 12px; height: 12px; border-radius: 50%; background: #4ADE80; border: 2px solid #0B2A1F; }
.dotonline.off { background: #9CA3AF; }

.felt { position: relative; height: clamp(300px, 46vh, 420px); border-radius: 46% / 40%; background: radial-gradient(ellipse at 50% 45%, #1F7A52 0%, #135C3D 55%, #0D4A31 100%); border: 14px solid var(--wood); box-shadow: inset 0 0 0 3px #00000055, inset 0 0 40px #0009, 0 0 0 3px #C9952B, 0 14px 30px #000a; overflow: hidden; }
.felt::before { content: ''; position: absolute; inset: 14px; border-radius: inherit; border: 2px solid #ffffff14; pointer-events: none; }
.cback { width: 44px; height: 64px; border-radius: 6px; border: 3px solid #FFF8EC; background: repeating-linear-gradient(45deg, #C0262C 0 4px, #E0484E 4px 8px), #C0262C; box-shadow: 0 3px 6px #0007; }
.opp { position: absolute; display: flex; justify-content: center; z-index: 2; }
.opp.top { top: 10px; left: 0; right: 0; } .opp.left { left: 6px; top: 35%; } .opp.right { right: 6px; top: 35%; }
.opp .backs { display: flex; gap: 0; } .opp .backs .cback { margin-left: -14px; } .opp .backs .cback:first-child { margin-left: 0; }
.opp.left .backs, .opp.right .backs { flex-direction: column; } .opp.left .cback, .opp.right .cback { margin: -40px 0 0 0; } .opp.left .cback:first-child, .opp.right .cback:first-child { margin-top: 0; }
.deck { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; align-items: center; gap: 6px; }
.deck .cback { position: relative; } .deck .cback + .cback { margin-top: -66px; transform: translate(2px, -2px); }
.deck .cback:nth-child(3) { transform: translate(4px, -4px); }
.vira2 { display: flex; flex-direction: column; align-items: center; gap: 3px; margin-top: 4px; }
.vira2 > small { font-size: 10px; font-weight: 700; color: #E8EFE9; text-align: center; background: #0007; padding: 2px 6px; border-radius: 6px; }
.rodada { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: #0B3326dd; border: 1.5px solid #C9952B; border-radius: 12px; padding: 6px 10px; text-align: center; line-height: 1.1; }
.rodada small { display: block; font-size: 11px; color: var(--muted); } .rodada b { font-family: var(--disp); font-size: 20px; color: var(--gold2); } .rodada i { font-style: normal; font-size: 13px; color: #fff; }
.pile { position: absolute; left: 50%; top: 52%; transform: translate(-50%, -50%); display: flex; align-items: center; justify-content: center; }
.pile .pc { transform: rotate(var(--r)); margin: 0 -10px; transition: transform .2s; }
.pile .pc .card { width: 70px; height: 100px; } .pile .pc .card .r { font-size: 24px; } .pile .pc .card .s { font-size: 30px; }
.pile .pc.mine { transform: rotate(var(--r)) translateY(14px); }
.pile .pc.won .card { box-shadow: 0 0 0 3px var(--gold2), 0 0 20px #FFC93C, 0 6px 14px #0006; }
.gstatus { min-height: 20px; font-size: 13px; color: var(--muted); text-align: center; }
.gstatus b { color: var(--gold2); }

.myhand { display: flex; justify-content: center; align-items: flex-end; height: 150px; margin-top: -4px; position: relative; z-index: 2; }
.myhand .hc { margin: 0 -14px; transform: rotate(calc(var(--i) * 8deg)) translateY(calc(var(--i) * var(--i) * 6px)); transform-origin: 50% 120%; }
.myhand .card { width: 92px; height: 132px; padding: 9px 10px; transition: transform .12s; }
.myhand .card .r { font-size: 32px; } .myhand .card .s { font-size: 42px; }
.myhand .card:not(:disabled):hover, .myhand .card:not(:disabled):active { transform: translateY(-14px); }
.myhand .card:disabled { opacity: 1; filter: saturate(.75) brightness(.82); }

.banner { background: linear-gradient(#FFF6D8, #EFE0B4); color: #1E1A14; border-radius: 16px; padding: 10px 14px; display: flex; flex-direction: column; align-items: center; gap: 4px; text-align: center; box-shadow: 0 10px 26px #000a; }
.banner b { font-family: var(--disp); font-size: 30px; color: #B3261E; line-height: 1; }
.banner small { color: #5B4E38; font-size: 13px; }
.gbtns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.gbtn { height: 58px; border-radius: 14px; border: 2px solid #0004; font-family: var(--disp); font-weight: 800; font-size: 19px; letter-spacing: .02em; box-shadow: inset 0 -4px 0 #0003, 0 5px 12px #0008; }
.gbtn.truco { background: linear-gradient(#FFE17A, #E8A417); color: #3A2400; }
.gbtn.ok { background: linear-gradient(#3DB86B, #17733D); color: #fff; }
.gbtn.run { background: linear-gradient(#EF5350, #B3261E); color: #fff; }
.gbtn:disabled { filter: grayscale(.7) brightness(.6); opacity: .7; }
.banner .actions .gbtn { min-width: 120px; padding: 0 16px; }
.hidetog { align-self: center; height: 38px; border-radius: 999px; border: 1px solid #2E7A58; background: #0007; color: #F6EEDD; font-weight: 600; padding: 0 16px; }
.hidetog[aria-pressed="true"] { background: var(--gold2); color: #3A2400; border-color: var(--gold2); }
@media (max-width: 380px) { .myhand .card { width: 80px; height: 116px; } .gbtn { font-size: 16px; height: 52px; } .ppill b { max-width: 84px; } }
.card .r { display: flex; flex-direction: column; align-items: center; line-height: .9; }
.card .r small { font-size: .62em; line-height: 1; margin-top: 2px; }
.rodada small + b + small { margin-top: 2px; }
