/* LIVE BINGO — área do jogador. Leve: sem fontes externas, sem blur, sem animações infinitas. */
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Medium.woff") format("woff"); font-weight: 500 600; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("/fonts/Poppins-Bold.woff") format("woff"); font-weight: 700 900; font-display: swap; }
/* LIVE BINGO — área do jogador. Cores da versão escura/acinzentada (V5.6); posição dos elementos no estilo do Live Bingo antigo.
   Escuro = padrão; Claro e Automático no ☰ MENU. */
:root {
  --font-title: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --bg: #0b0f1d;
  --bg2: #10162a;
  --panel: #141b33;
  --panel2: #1a2240;
  --line: #263056;
  --line2: #33406d;
  --text: #e9edf9;
  --muted: #8c97bb;
  --accent: #4f7cff;
  --accent2: #3b63e0;
  --mark: #3f6bff;
  --mark-grad: linear-gradient(180deg, #5b84ff 0%, #3f6bff 100%);
  --gold: #e8b64a;
  --gold2: #f4cf7a;
  --gold-ink: #2a1e05;
  --gold-soft: rgba(232, 182, 74, .13);
  --teal: #43c1d6;
  --teal-soft: rgba(67, 193, 214, .12);
  --green: #33c27a;
  --prize-green: #3ddc84;
  --buy-green: #22c55e;
  --buy-green-dark: #15803d;
  --buy-green-soft: rgba(34, 197, 94, .12);
  --red: #ef5a6f;
  --radius: 16px;
  --b: #4f8bff; --i: #ef5a6f; --n: #cfd6ea; --g: #33c27a; --o: #f0a33a;
  --auth-glow: #1c2650;
  --ok-text: #b8f5d4;
  --run-text: #cbd8ff;
  --board-num: #5d6893;
  --overlay: rgba(4, 6, 14, .78);
  --card-head: #1f2a4d;
  --card-head-text: #dfe6fb;
  --card-body: #10162a;
  --cell-bg: #182040;
  --page-glow: radial-gradient(900px 500px at 50% -15%, rgba(79, 124, 255, .10), transparent 65%);
  --shadow: 0 8px 24px rgba(0, 0, 0, .25);
  color-scheme: dark;
}
/* MODO CLARO: só troca as variáveis de cor (sem recarregar, sem servidor). */
:root[data-theme="light"] {
  --bg: #f1f3fa;
  --bg2: #e6eaf5;
  --panel: #ffffff;
  --panel2: #eef1f9;
  --line: #d3d9ea;
  --line2: #bcc5dd;
  --text: #141a2e;
  --muted: #59627f;
  --accent: #3f6bff;
  --accent2: #2f57e0;
  --mark: #3f6bff;
  --gold: #e8b64a;
  --gold2: #f4cf7a;
  --gold-ink: #2a1e05;
  --gold-soft: rgba(232, 182, 74, .22);
  --teal: #12839a;
  --teal-soft: rgba(18, 131, 154, .12);
  --green: #1f9d5f;
  --prize-green: #15803d;
  --buy-green: #15803d;
  --buy-green-dark: #166534;
  --buy-green-soft: rgba(21, 128, 61, .10);
  --red: #d63e55;
  --n: #3a4262;
  --auth-glow: #dfe5ff;
  --ok-text: #11743f;
  --run-text: #2445b8;
  --board-num: #7a83a6;
  --overlay: rgba(20, 26, 46, .55);
  --card-head: #e3e8f6;
  --card-head-text: #1d2540;
  --card-body: #f7f8fc;
  --cell-bg: #eef1f9;
  --page-glow: none;
  --shadow: 0 6px 20px rgba(20, 26, 46, .08);
  color-scheme: light;
}
:root[data-theme="light"] .card.t1 .cn { color: #9a6a00; }
:root[data-theme="light"] .card-g i.nd { color: #9a6a00; }
:root[data-theme="light"] .site-closed { background: rgba(241, 243, 250, .97); }
:root[data-theme="light"] .player-off { background: radial-gradient(600px 300px at 50% 30%, #e6e0ff, #f1f3fa); }
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.4 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
button { font: inherit; color: inherit; cursor: pointer; }
input, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 10px; padding: 10px 16px; font-weight: 650;
  background: var(--panel2); transition: background-color .15s, border-color .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .55; cursor: default; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--accent2); }
.btn-gold { background: var(--gold); color: var(--gold-ink); }
.btn-gold:hover:not(:disabled) { background: var(--gold2); }
.btn-ghost { background: transparent; border-color: var(--line2); color: var(--muted); }
.btn-ghost:hover { color: var(--text); border-color: var(--muted); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { width: 100%; }

/* ---------- marca ---------- */
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: .02em; }
.brand-ball {
  width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center;
  background: var(--gold); color: var(--bg); font-size: 15px; box-shadow: inset 0 0 0 5px var(--gold), inset 0 0 0 7px var(--bg);
}
.brand-name { font-size: 17px; }
.brand-lg .brand-ball { width: 42px; height: 42px; font-size: 20px; }
.brand-lg .brand-name { font-size: 24px; }

/* ---------- login ---------- */
.auth { min-height: 100%; display: grid; place-items: center; padding: 24px 16px;
  background: radial-gradient(1200px 600px at 50% -10%, var(--auth-glow) 0%, var(--bg) 60%); }
.auth-card { width: 100%; max-width: 400px; background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 28px 24px; }
.auth-sub { color: var(--muted); margin: 10px 0 18px; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--bg2); border-radius: 10px; padding: 4px; margin-bottom: 16px; }
.seg-btn { background: none; border: 0; padding: 8px; border-radius: 8px; color: var(--muted); font-weight: 600; }
.seg-btn.on { background: var(--panel2); color: var(--text); }
.form { display: grid; gap: 12px; }
.form label { display: grid; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 600; }
.form input, .chat-form input, .stepper input, textarea {
  background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); outline: none; width: 100%;
}
.form input:focus, .chat-form input:focus, textarea:focus { border-color: var(--accent); }
.opt { font-weight: 400; }
.form-err { color: var(--red); min-height: 1em; margin: 0; font-size: 13px; }

/* ---------- topo ---------- */
.top {
  position: sticky; top: 0; z-index: 20; height: 58px; display: flex; align-items: center; gap: 16px;
  padding: 0 20px; background: var(--bg2); border-bottom: 1px solid var(--line);
}
.top-mid { flex: 1; display: flex; justify-content: center; }
.top-right { display: flex; align-items: center; gap: 14px; }
.who { font-weight: 600; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pill { padding: 5px 12px; border-radius: 999px; font-size: 13px; font-weight: 700; background: var(--panel2); color: var(--muted); border: 1px solid var(--line2); }
.pill.st-sales { color: var(--ok-text); background: rgba(51, 194, 122, .14); border-color: rgba(51, 194, 122, .4); }
.pill.st-running { color: var(--run-text); background: rgba(79, 124, 255, .16); border-color: rgba(79, 124, 255, .45); }
.pill.st-finished { color: var(--muted); }
.conn { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); }
.conn i { width: 8px; height: 8px; border-radius: 50%; background: var(--o); }
.conn.on i { background: var(--green); }
.conn.on { color: var(--ok-text); }

/* ---------- layout ---------- */
.layout {
  display: grid; gap: 16px; padding: 16px 20px 20px;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
  height: calc(100vh - 58px); height: calc(100dvh - 58px);
}
.col-left { display: flex; flex-direction: column; gap: 14px; min-width: 0; min-height: 0; overflow-y: auto; }
.col-right { display: flex; flex-direction: column; gap: 12px; min-width: 0; min-height: 0; }
.stage { display: grid; gap: 12px; align-content: start; min-width: 0; }
.tabs { display: flex; gap: 6px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 5px; }
.tab { flex: 1; background: none; border: 0; padding: 8px 10px; border-radius: 8px; font-weight: 650; color: var(--muted); display: inline-flex; justify-content: center; align-items: center; gap: 8px; }
.tab.on { background: var(--panel2); color: var(--text); }
.tab-board { display: none; }
.badge { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--line); font-size: 12px; color: var(--text); }
.badge-dot { min-width: 9px; width: 9px; height: 9px; padding: 0; background: var(--gold); }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); min-height: 0; min-width: 0; }
.panel-board { padding: 12px; }
.panel-cards, .panel-chat { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
body[data-tab="chat"] .panel-cards { display: none; }
body:not([data-tab="chat"]) .panel-chat { display: none; }

/* ---------- player ---------- */
.player { background: #000; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.player-box { position: relative; aspect-ratio: 16 / 9; max-height: max(220px, min(46vh, calc(100dvh - 440px))); width: 100%; }
.player-box iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.player-off { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; padding: 20px;
  background: radial-gradient(600px 300px at 50% 30%, #18204a, #070a14); color: var(--muted); }
.player-off b { display: block; color: var(--text); font-size: 18px; margin-bottom: 6px; }
.player-off .live-ico { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--line2); display: grid; place-items: center; margin: 0 auto 12px; }
.player-off .live-ico::after { content: ""; border-left: 16px solid var(--muted); border-top: 10px solid transparent; border-bottom: 10px solid transparent; margin-left: 4px; }

.winner-banner { background: var(--gold); color: var(--gold-ink); border-radius: 12px; padding: 12px 16px; font-weight: 750; display: flex; gap: 12px; align-items: center; }
.winner-banner small { font-weight: 600; opacity: .85; }

/* ---------- prêmio e bolas ---------- */
.info { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.prize, .balls { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.prize-main { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin: 4px 0 8px; }
.prize-main strong { font-size: 24px; letter-spacing: -.01em; }
.prize-value { font-size: 22px; font-weight: 800; color: var(--gold); font-variant-numeric: tabular-nums; }
.chip { display: inline-block; padding: 4px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line2); font-size: 12.5px; font-weight: 650; }
.prize-next { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.prize-showcase { display: grid; grid-template-columns: repeat(auto-fit, minmax(115px, 1fr)); gap: 8px; margin-top: 10px; }
.prize-show-item { border: 1px solid var(--line2); background: var(--bg2); border-radius: 10px; padding: 8px 10px; display: grid; gap: 2px; }
.prize-show-item span { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 800; }
.prize-show-item strong { font-size: 20px; color: var(--buy-green); line-height: 1.1; text-shadow: 0 1px 0 rgba(255,255,255,.15); }
:root[data-theme="light"] .prize-show-item strong { text-shadow: 0 1px 0 #fff; }
.balls { display: flex; align-items: center; gap: 14px; }
.ball-last { width: 86px; height: 86px; border-radius: 50%; display: grid; place-items: center; align-content: center;
  background: var(--panel2); border: 4px solid var(--line2); flex: none; }
.ball-last .ball-l { font-size: 13px; font-weight: 800; letter-spacing: .1em; color: var(--muted); line-height: 1; }
.ball-last .ball-n { font-size: 36px; font-weight: 850; line-height: 1; font-variant-numeric: tabular-nums; }
.ball-recent { display: flex; gap: 6px; }
.ball-sm { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 14px;
  background: var(--panel2); border: 2px solid var(--line2); font-variant-numeric: tabular-nums; }
.ball-count { display: grid; text-align: center; min-width: 56px; }
.ball-count strong { font-size: 22px; }
.ball-count span { font-size: 12px; color: var(--muted); }
.c-B { border-color: var(--b) !important; } .c-I { border-color: var(--i) !important; } .c-N { border-color: var(--n) !important; }
.c-G { border-color: var(--g) !important; } .c-O { border-color: var(--o) !important; }
.ball-last.c-B .ball-l { color: var(--b); } .ball-last.c-I .ball-l { color: var(--i); } .ball-last.c-N .ball-l { color: var(--n); }
.ball-last.c-G .ball-l { color: var(--g); } .ball-last.c-O .ball-l { color: var(--o); }

/* ---------- quadro de pedras ---------- */
.board { display: grid; gap: 5px; }
.brow { display: grid; grid-template-columns: 28px repeat(15, minmax(0, 1fr)); gap: 4px; align-items: center; }
.brow > b { font-weight: 850; text-align: center; font-size: 14px; }
.brow:nth-child(1) > b { color: var(--b); } .brow:nth-child(2) > b { color: var(--i); } .brow:nth-child(3) > b { color: var(--n); }
.brow:nth-child(4) > b { color: var(--g); } .brow:nth-child(5) > b { color: var(--o); }
.bcell { min-width: 0; height: 26px; border-radius: 6px; display: grid; place-items: center; font-size: 12.5px; font-weight: 650; color: var(--board-num); background: var(--bg2); font-variant-numeric: tabular-nums; }
.bcell.on { background: var(--mark); color: #fff; }
.bcell.last { background: var(--gold); color: var(--gold-ink); }

/* ---------- cartelas ---------- */
.buy-hero { margin: 12px 14px 4px; padding: 14px; border: 1px solid rgba(34,197,94,.4); background: var(--buy-green-soft); border-radius: 14px; display: grid; grid-template-columns: auto minmax(0,1fr) auto; gap: 12px; align-items: center; }
.buy-hero-ico { width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: rgba(34,197,94,.15); font-size: 24px; }
.buy-hero-copy { display: grid; gap: 2px; min-width: 0; }
.buy-hero-copy strong { font-size: 18px; letter-spacing: .02em; }
.buy-hero-copy span { color: var(--muted); font-size: 13px; }
.buy-hero-btn { background: var(--buy-green); border-color: var(--buy-green); color: #fff; font-weight: 900; padding: 11px 18px; }
.buy-hero-btn:hover:not(:disabled) { background: var(--buy-green-dark); border-color: var(--buy-green-dark); }
.cards-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px 6px; }
.cards-title { display: grid; }
.cards-title strong { font-size: 16px; }
.cards-title .muted { font-size: 12.5px; }
.filters { display: flex; gap: 6px; padding: 0 14px 10px; flex-wrap: wrap; min-width: 0; }
.fchip { white-space: nowrap; background: var(--bg2); border: 1px solid var(--line); border-radius: 999px; padding: 4px 11px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fchip b { color: var(--text); margin-left: 3px; }
.fchip.on { border-color: var(--accent); color: var(--text); }
.fstat { cursor: default; color: var(--text); }
.cards-scroll { position: relative; flex: 1; overflow-y: auto; overflow-x: hidden; padding: 4px 14px 14px; overscroll-behavior: contain; }
.cards-inner { position: relative; }
.empty { text-align: center; padding: 40px 16px; }

.card {
  position: absolute; left: 0; top: 0; contain: layout paint;
  background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 10px;
}
.card-h { height: 24px; display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; font-size: 12.5px; }
.card-h .cn { white-space: nowrap; font-weight: 750; color: var(--muted); font-variant-numeric: tabular-nums; }
.card-h .tag { white-space: nowrap; font-size: 11px; font-weight: 800; letter-spacing: .06em; padding: 3px 8px; border-radius: 6px; }
.card-g { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 4px; }
.card-g b { height: 14px; font-size: 11px; font-weight: 850; text-align: center; line-height: 14px; color: var(--muted); margin-bottom: 0; }
.card-g i {
  font-style: normal; height: var(--cell, 30px); border-radius: 7px; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; background: var(--panel); color: var(--text); font-variant-numeric: tabular-nums;
}
.card-g i.fr { color: var(--gold); font-size: 13px; }
.card-g i.m { background: var(--mark); color: #fff; }
.card-g i.nd { box-shadow: inset 0 0 0 2px var(--gold); color: var(--gold2); }

/* faltando 2 */
.card.t2 { border-color: rgba(67, 193, 214, .55); }
.card.t2 .tag { background: var(--teal-soft); color: var(--teal); }
/* armada (faltando 1): destaque dourado */
.card.t1 { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--bg2) 38%); }
.card.t1 .tag { background: var(--gold); color: var(--gold-ink); }
.card.t1 .cn { color: var(--gold2); }
/* bingo: cartela inteira destacada */
.card.t0 { background: var(--gold); border-color: var(--gold2); }
.card.t0 .cn, .card.t0 .card-g b { color: var(--gold-ink); }
.card.t0 .tag { background: var(--gold-ink); color: var(--gold2); }
.card.t0 .card-g i { background: rgba(42, 30, 5, .12); color: var(--gold-ink); }
.card.t0 .card-g i.m { background: rgba(42, 30, 5, .28); color: var(--gold-ink); }
.card.t0 .card-g i.w { background: var(--gold-ink); color: var(--gold2); }

/* ---------- chat ---------- */
.chat-list { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; }
.msg { background: var(--bg2); border-radius: 10px; padding: 7px 10px; max-width: 92%; align-self: flex-start; word-wrap: break-word; }
.msg b { font-size: 12.5px; color: var(--teal); margin-right: 6px; }
.msg time { font-size: 11px; color: var(--muted); margin-left: 6px; }
.msg.staff { background: var(--gold-soft); border: 1px solid rgba(232, 182, 74, .35); }
.msg.staff b { color: var(--gold); }
.msg.mine { align-self: flex-end; background: rgba(79, 124, 255, .16); }
.chat-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.chat-off { padding: 10px 14px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- modais ---------- */
.modal { position: fixed; inset: 0; z-index: 50; background: var(--overlay); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.modal-card { position: relative; width: 100%; max-width: 560px; background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; padding: 24px; }
.modal-card h2 { margin: 0 0 6px; font-size: 22px; }
.modal-x { position: absolute; top: 10px; right: 12px; width: 34px; height: 34px; border-radius: 50%; background: var(--panel2); border: 0; font-size: 20px; line-height: 1; color: var(--muted); }
.packs { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 10px; margin: 16px 0; }
.pack { background: var(--bg2); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px; text-align: left; display: grid; gap: 2px; }
.pack strong { font-size: 18px; }
.pack .pp { color: var(--buy-green); font-weight: 900; text-shadow: 0 1px 0 rgba(255,255,255,.12); }
:root[data-theme="light"] .pack .pp { text-shadow: 0 1px 0 #fff; }
.pack .pu { font-size: 11.5px; color: var(--muted); }
.pack.on { border-color: var(--buy-green); background: var(--buy-green-soft); box-shadow: inset 0 0 0 1px rgba(34,197,94,.10); }
.qty { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.stepper { display: flex; align-items: center; gap: 6px; }
.stepper button { width: 38px; height: 38px; border-radius: 10px; background: var(--panel2); border: 1px solid var(--line2); font-size: 18px; }
.stepper input { width: 84px; text-align: center; padding: 8px; }
.stepper.on input { border-color: var(--gold); }
.buy-total { display: flex; justify-content: space-between; align-items: baseline; padding: 14px 0; border-top: 1px solid var(--line); margin-bottom: 8px; }
.buy-total strong { font-size: 24px; color: var(--gold); }
.buy-note { margin: -6px 0 10px; font-size: 13px; color: var(--green, #3ecf8e); font-weight: 600; }
.buy-note .bn-bonus { color: var(--gold); }
.promo-tiers { margin: 10px 0 0; padding: 9px 12px; border: 1px dashed var(--gold); border-radius: 10px; background: var(--gold-soft); font-size: 12.5px; line-height: 1.45; }
.promo-tiers b { color: var(--gold); }
.pix { display: grid; grid-template-columns: 220px 1fr; gap: 18px; margin-top: 16px; align-items: start; }
.pix img { background: #fff; border-radius: 12px; padding: 8px; width: 220px; height: 220px; }
.pix-side { display: grid; gap: 10px; }
.pix-amount { font-size: 26px; font-weight: 850; color: var(--buy-green); }
.pix textarea { font-size: 12px; resize: none; }
.pix-wait { display: flex; align-items: center; gap: 8px; margin: 0; font-weight: 600; }
.dot-wait { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); }
.buy-ok { text-align: center; }
.ok-mark { width: 64px; height: 64px; margin: 4px auto 12px; border-radius: 50%; background: var(--green); color: #fff; font-size: 34px; display: grid; place-items: center; font-weight: 800; }
.bingo-card { text-align: center; background: var(--gold); color: var(--gold-ink); border-color: var(--gold2); }
.bingo-title { font-size: 54px; font-weight: 900; letter-spacing: .04em; }
.bingo-card .btn-gold, .bingo-card .btn-gold:hover:not(:disabled) { background: var(--gold-ink); color: var(--gold2); }

.toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 60; background: var(--panel2); border: 1px solid var(--line2);
  padding: 11px 16px; border-radius: 12px; font-weight: 600; max-width: calc(100% - 32px); }
.toast.err { border-color: var(--red); }

/* ---------- celular / tablet ----------
   Layout de "aplicativo": vídeo, prêmio e última pedra ficam SEMPRE visíveis no alto;
   só a aba ativa (cartelas, pedras ou chat) rola. O jogador acompanha a live e as cartelas juntos. */
.video-toggle { display: none; }
.pill-short { display: none; }
@media (max-width: 900px) {
  body.app-on { overflow: hidden; }
  .top { height: 54px; padding: 0 10px; gap: 8px; }
  .top-mid { justify-content: flex-start; min-width: 0; }
  .who, .conn span, .pill-game, .pill-long, .top .brand-name { display: none; }
  .pill-short { display: inline; }
  .pill { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
  .top-right { gap: 8px; }
  .video-toggle { display: inline-flex; }
  .layout {
    display: flex; flex-direction: column; height: calc(100vh - 54px); height: calc(100dvh - 54px);
    padding: 8px 8px 10px; gap: 8px; overflow: hidden;
  }
  .col-left, .col-right { display: contents; }
  .stage { order: 1; gap: 8px; flex: none; }
  .tabs { order: 2; flex: none; padding: 4px; }
  .panel { order: 3; }
  .player-box { max-height: none; }
  body.video-off .player { display: none; }
  /* sem live: o espaço do vídeo vira uma faixa fina */
  .stage.no-live .player-box { aspect-ratio: auto; height: 46px; }
  .stage.no-live .player-off { padding: 0 14px; place-items: center start; }
  .stage.no-live .player-off > div { display: flex; gap: 8px; align-items: baseline; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stage.no-live .player-off .live-ico { display: none; }
  .stage.no-live .player-off b { display: inline; font-size: 14px; margin: 0; }
  .stage.no-live .player-off span { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
  /* prêmio (esquerda) + última pedra (direita) numa faixa só */
  .info { grid-template-columns: minmax(0, 1fr) auto; gap: 8px; }
  .prize { padding: 8px 10px; min-width: 0; }
  .eyebrow { font-size: 10px; }
  .prize-main { margin: 1px 0 4px; gap: 6px; }
  .prize-main strong { font-size: 16px; }
  .prize-value { font-size: 15px; }
  .chip { font-size: 11px; padding: 2px 7px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .prize-next { display: none; }
  .prize-next.prize-showcase { display: grid; }
  .balls { display: grid; grid-template-columns: auto auto; grid-template-areas: "last count" "last recent"; column-gap: 8px; row-gap: 4px; padding: 6px 10px; align-content: center; }
  .ball-last { grid-area: last; width: 54px; height: 54px; border-width: 3px; }
  .ball-last .ball-n { font-size: 22px; }
  .ball-last .ball-l { font-size: 10px; }
  .ball-recent { grid-area: recent; gap: 3px; }
  .ball-recent .ball-sm:nth-child(n+4) { display: none; }
  .ball-sm { width: 24px; height: 24px; font-size: 10.5px; border-width: 1.5px; }
  .ball-count { grid-area: count; display: flex; gap: 4px; align-items: baseline; min-width: 0; text-align: left; }
  .ball-count strong { font-size: 15px; }
  .ball-count span { font-size: 11px; }
  .winner-banner { padding: 8px 10px; font-size: 12.5px; }
  .winner-banner small { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
  .tab { padding: 7px 6px; }
  .tab-board { display: inline-flex; }
  .panel-board, .panel-cards, .panel-chat { display: none !important; }
  body[data-tab="board"] .panel-board { display: block !important; flex: 1; min-height: 0; overflow-y: auto; }
  body[data-tab="cards"] .panel-cards { display: flex !important; flex: 1; min-height: 0; }
  body[data-tab="chat"] .panel-chat { display: flex !important; flex: 1; min-height: 0; }
  .brow { grid-template-columns: 22px repeat(15, minmax(0, 1fr)); gap: 3px; }
  .bcell { height: 30px; font-size: 11px; }
  .cards-head { padding: 10px 10px 6px; }
  .buy-hero { margin: 8px 10px 2px; grid-template-columns: auto 1fr; padding: 11px; gap: 9px; }
  .buy-hero-ico { width: 38px; height: 38px; font-size: 21px; }
  .buy-hero-copy strong { font-size: 16px; }
  .buy-hero-copy span { font-size: 12px; }
  .buy-hero-btn { grid-column: 1 / -1; width: 100%; padding: 11px 12px; font-size: 14px; }
  .prize-showcase { display: grid !important; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 5px; margin-top: 6px; }
  .prize-show-item { padding: 6px; }
  .prize-show-item span { font-size: 8.5px; }
  .prize-show-item strong { font-size: 15px; }
  .filters { padding: 0 10px 8px; gap: 5px; }
  .fchip { font-size: 11.5px; padding: 3px 8px; }
  .cards-scroll { padding: 2px 8px 8px; }
  .chat-form { padding: 8px; }
  .pix { grid-template-columns: 1fr; justify-items: center; }
  .modal-card { padding: 20px 16px; }
}
/* cartelas compactas (2 por linha no celular) */
.cards-inner.compact .card { padding: 8px; border-radius: 10px; }
.cards-inner.compact .card-h { height: 20px; margin-bottom: 4px; font-size: 12px; }
.cards-inner.compact .card-h .tag { font-size: 9.5px; padding: 2px 6px; letter-spacing: .04em; }
.cards-inner.compact .card-g { gap: 3px; }
.cards-inner.compact .card-g b { height: 12px; line-height: 12px; font-size: 10px; }
.cards-inner.compact .card-g i { font-size: 13px; border-radius: 6px; }

/* versão 4 */
.per-row { display: none; margin-left: auto; }
.panel-cards { overflow: clip; }
@media (max-width: 900px) { .per-row { display: inline-block; } }
.site-closed { position: fixed; inset: 0; z-index: 80; background: rgba(5, 8, 18, .97); display: grid; place-items: center; padding: 20px; text-align: center; }
.site-status-card { width: min(540px, 100%); background: var(--panel); border: 1px solid var(--line2); border-radius: 22px; padding: 28px 24px; box-shadow: 0 20px 70px rgba(0,0,0,.28); display: grid; justify-items: center; gap: 10px; }
.site-status-logo { width: 112px; height: 112px; border-radius: 20px; object-fit: cover; margin-bottom: 4px; }
.site-status-badge { font-size: 11px; font-weight: 900; letter-spacing: .12em; color: var(--muted); }
.site-status-icon { font-size: 34px; line-height: 1; }
.site-status-card h1 { margin: 0; font-size: clamp(23px, 5vw, 32px); line-height: 1.15; }
.site-status-card p { margin: 2px 0; font-size: 16px; line-height: 1.55; max-width: 460px; }
.site-status-card small { color: var(--muted); margin-top: 4px; }
.prize-pending { display: inline-block; margin-top: 6px; background: var(--gold); color: #2a1e05; font-weight: 800; border-radius: 8px; padding: 3px 10px; font-size: 13px; }

/* ---------- v5: logo, menu, histórico, PIX ---------- */
.logo-login { display: block; width: 200px; height: 200px; margin: 0 auto 6px; border-radius: 22px; object-fit: cover; box-shadow: 0 10px 40px rgba(124, 58, 237, .35); }
.auth-card .auth-sub { text-align: center; }
.logo-top { width: 44px; height: 44px; border-radius: 10px; object-fit: cover; flex: none; }
.menu-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line2); background: var(--panel2); font-weight: 800; font-size: 14px; letter-spacing: .04em; flex: none; }
.menu-btn:hover { border-color: var(--accent); }
.drawer { position: fixed; inset: 0; z-index: 70; }
.drawer-back { position: absolute; inset: 0; background: var(--overlay); opacity: 0; transition: opacity .18s; }
.drawer-panel { position: absolute; top: 0; bottom: 0; left: 0; width: min(320px, 86vw); background: var(--panel); border-right: 1px solid var(--line2); padding: 14px 12px calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 6px; overflow-y: auto; transform: translateX(-102%); transition: transform .18s ease-out; }
.drawer.open .drawer-back { opacity: 1; }
.drawer.open .drawer-panel { transform: none; }
.drawer-head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 12px; border-bottom: 1px solid var(--line); margin-bottom: 6px; }
.logo-drawer { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
.drawer-who { display: grid; min-width: 0; flex: 1; }
.drawer-who b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drawer-x { width: 36px; height: 36px; border-radius: 50%; border: 0; background: var(--panel2); font-size: 22px; line-height: 1; color: var(--muted); }
.drawer-item { display: flex; align-items: center; gap: 12px; width: 100%; text-align: left; padding: 13px 12px; border: 0; border-radius: 10px; background: none; font-weight: 700; font-size: 15px; }
.drawer-item:hover, .drawer-item:focus-visible { background: var(--panel2); }
.di { width: 22px; text-align: center; color: var(--gold); }
.drawer-opt { padding: 10px 12px; border-radius: 10px; background: var(--bg2); margin: 4px 0; }
.drawer-label { display: flex; gap: 12px; font-weight: 700; margin-bottom: 8px; }
.seg-sm { margin: 0; grid-auto-flow: column; grid-auto-columns: 1fr; grid-template-columns: none; }
.seg-sm .seg-btn { padding: 7px 4px; font-size: 13px; }
.drawer-hint { margin: 6px 0 0; }
.drawer-out { margin-top: auto; color: var(--red); }
.hist-card { max-width: 620px; }
.hist-empty { text-align: center; color: var(--muted); padding: 24px 0; }
.hist-item { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 10px 0; background: var(--bg2); display: grid; gap: 8px; }
.hist-item.won { border-color: var(--gold); }
.hi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.hi-st { font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--panel2); color: var(--muted); white-space: nowrap; }
.hi-st.st-running { color: var(--run-text); }
.hi-game { font-weight: 700; }
.you-won { background: var(--gold); color: var(--gold-ink); border-radius: 12px; padding: 10px 12px; display: grid; gap: 2px; font-size: 14px; }
.yw-title { font-weight: 900; letter-spacing: .05em; font-size: 15px; }
.yw-card { font-weight: 800; font-size: 16px; }
.yw-val { font-weight: 900; font-size: 16px; margin-top: 2px; }
.hist-prizes { display: grid; gap: 4px; font-size: 13.5px; }
.hp { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; align-items: baseline; }
.hp b { white-space: nowrap; }
.hp-v { font-weight: 700; color: var(--gold); white-space: nowrap; }
:root[data-theme="light"] .hp-v { color: #9a6a00; }
#histDetail h2 { margin: 12px 0 2px; }
#histDetail h3 { font-size: 15px; margin: 16px 0 8px; }
.mini-wrap { display: flex; justify-content: center; margin: 8px 0; }
.card.mini { position: relative; width: 240px; padding: 10px; border: 1px solid var(--gold2); border-radius: 12px; --cell: 34px; }
.hist-balls { display: flex; flex-wrap: wrap; gap: 6px; }
.hb { width: 40px; height: 44px; border-radius: 10px; border: 2px solid var(--line2); display: grid; place-items: center; align-content: center; background: var(--panel); }
.hb small { font-size: 9px; color: var(--muted); line-height: 1; }
.hb b { font-size: 15px; line-height: 1.1; }
.pix-now { background: var(--bg2); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin-bottom: 12px; display: grid; gap: 4px; font-weight: 700; }
.form select { background: var(--bg2); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; color: var(--text); width: 100%; font: inherit; }
.row-btns { display: flex; gap: 10px; flex-wrap: wrap; }
@media (max-width: 900px) {
  .menu-btn { height: 36px; padding: 0 10px; font-size: 13px; }
  .menu-btn span { display: inline; }
  .logo-top { width: 38px; height: 38px; }
  #logout { display: none; }
  .logo-login { width: 170px; height: 170px; }
}
/* v5.7: o botão MENU mantém ícone e texto em qualquer largura */


/* ---------- v5.3.2: compra limpa + rolagem móvel com somente a live fixa ---------- */
/* Enquanto as vendas estão abertas, a compra/cartelas são a tela principal. */
body.sales-open .tabs { display: none !important; }
body.sales-open .balls { display: none !important; }
body.sales-open .info { grid-template-columns: minmax(0,1fr); }
body.sales-open .prize { text-align: center; padding: 18px 20px; }
body.sales-open .prize-main { justify-content: center; margin: 5px 0 8px; }
body.sales-open .prize-main strong { font-size: clamp(24px, 3vw, 32px); }
body.sales-open .prize-showcase { grid-template-columns: repeat(auto-fit, minmax(120px,1fr)); gap: 10px; }
body.sales-open .prize-show-item { padding: 10px 12px; }
body.sales-open .prize-show-item strong { font-size: clamp(24px, 3vw, 32px); }
body.sales-open .panel-board, body.sales-open .panel-chat { display: none !important; }
body.sales-open .panel-cards { display: flex !important; }

@media (max-width: 900px) {
  /* A página volta a ter um único scroll. Cabeçalho, prêmio, compra e cartelas rolam juntos. */
  body.app-on { overflow-x: hidden; overflow-y: auto; }
  .top { position: static; height: 54px; transition: height .16s ease, padding .16s ease; }
  .layout { height: auto; min-height: calc(100dvh - 54px); overflow: visible; padding-bottom: 18px; }
  .col-left, .col-right, .stage { display: contents; }

  /* ÚNICO elemento fixo ao rolar: janela da live. */
  .player { order: 1; position: sticky; top: 0; z-index: 18; box-shadow: 0 8px 20px rgba(0,0,0,.12); transition: width .16s ease, border-radius .16s ease; }
  .winner-banner { order: 2; }
  .info { order: 3; }
  .tabs { order: 4; }
  .panel-board, .panel-cards, .panel-chat { order: 5; }

  /* Sem segundo scroll dentro de Minhas cartelas: virtualização segue o scroll da página. */
  .panel-cards { overflow: visible; flex: none; }
  .cards-scroll { overflow: visible; flex: none; min-height: 180px; overscroll-behavior: auto; }
  body[data-tab="cards"] .panel-cards { display: flex !important; }
  body[data-tab="board"] .panel-board { display: block !important; overflow: visible; }
  body[data-tab="chat"] .panel-chat { display: flex !important; min-height: 62dvh; }

  /* Vendas abertas: prêmio grande, sem última pedra e sem Cartelas/Pedras/Chat. */
  body.sales-open .info { display: block; }
  body.sales-open .prize { padding: 13px 12px; }
  body.sales-open .prize-main strong { font-size: 22px; }
  body.sales-open .prize-showcase { grid-template-columns: repeat(3, minmax(0,1fr)); gap: 7px; margin-top: 8px; }
  body.sales-open .prize-show-item { padding: 8px 5px; }
  body.sales-open .prize-show-item span { font-size: 9px; }
  body.sales-open .prize-show-item strong { font-size: clamp(20px, 6vw, 28px); }

  /* Ao começar a rolar, a live fica menor e compra/cabeçalho ficam compactos. */
  body.scroll-compact .player-box { height: 138px; aspect-ratio: auto; }
  body.scroll-compact .stage.no-live .player-box { height: 38px; }
  body.scroll-compact .info .prize { padding: 7px 9px; }
  body.scroll-compact .eyebrow { font-size: 9px; }
  body.scroll-compact .prize-main { margin: 0 0 3px; }
  body.scroll-compact .prize-main strong { font-size: 15px; }
  body.scroll-compact .prize-value { font-size: 14px; }
  body.scroll-compact .prize-showcase { margin-top: 4px; gap: 4px; }
  body.scroll-compact .prize-show-item { padding: 5px 4px; }
  body.scroll-compact .prize-show-item span { font-size: 8px; }
  body.scroll-compact .prize-show-item strong { font-size: 16px; }

  /* A área de compra permanece no tamanho normal durante a rolagem. */

  /* A barra superior também perde altura antes de sair da tela; ela NÃO fica fixa. */
  body.scroll-compact .top { height: 46px; padding-top: 0; padding-bottom: 0; }
  body.scroll-compact .logo-top { width: 32px; height: 32px; }
  body.scroll-compact .menu-btn { height: 32px; }

  /* Aviso público de bingo continua no fluxo (só a live é sticky). */
  .winner-banner { margin-top: 0; }
}

/* V5.5 · próxima partida e pré-jogo organizado */
.next-game{display:flex;align-items:center;justify-content:space-between;gap:14px;padding:12px 16px;border:1px solid var(--line);border-radius:14px;background:var(--panel);margin-top:10px}.next-game>div{display:grid;gap:3px}.next-game span{font-size:10px;font-weight:800;letter-spacing:.12em;color:var(--muted)}.next-game strong{font-size:18px}.next-game-time{text-align:right}.next-game-time strong{color:var(--buy-green);font-size:20px;font-variant-numeric:tabular-nums}
body.pre-game .info{grid-template-columns:minmax(0,1fr)}body.pre-game .prize{text-align:center;display:grid;justify-items:center;padding:20px 18px}body.pre-game .prize-main{justify-content:center;width:100%}body.pre-game .prize-main strong{font-size:clamp(28px,5vw,42px)}body.pre-game .prize-showcase{width:min(760px,100%);margin-left:auto;margin-right:auto}body.pre-game .balls{display:none}
@media(max-width:720px){.next-game{margin:8px 0 0;padding:10px 12px}.next-game strong{font-size:15px}.next-game-time strong{font-size:17px}body.pre-game .prize{padding:15px 10px}body.pre-game .prize-main strong{font-size:27px}}

/* V5.5: pré-jogo — valores realmente centralizados e grandes, inclusive com apenas 1 prêmio. */
body.pre-game .prize-showcase{display:grid;grid-template-columns:repeat(auto-fit,minmax(170px,1fr));gap:10px;justify-content:center}
body.pre-game .prize-show-item{display:grid;place-items:center;text-align:center;min-height:82px;border-radius:14px}
body.pre-game .prize-show-item strong{font-size:clamp(25px,4.8vw,38px);line-height:1.08}
@media(max-width:720px){body.pre-game .prize-showcase{grid-template-columns:1fr;gap:7px}body.pre-game .prize-show-item{min-height:68px;padding:9px 8px}body.pre-game .prize-show-item strong{font-size:28px}}

/* V5.5.1 — conferência pública da cartela vencedora */
.winner-banner-title { font-size: 18px; font-weight: 950; flex: none; }
.winner-banner-main { min-width: 0; display: grid; gap: 8px; }
.winner-actions { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.winner-view-btn { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; padding: 5px 9px; font: inherit; font-size: 11.5px; font-weight: 800; cursor: pointer; }
.winner-view-btn:hover { background: rgba(255,255,255,.12); }
.prize-won-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 5px; }
.prize-next-line { margin-top: 5px; }
.prize-won-line .winner-view-btn { color: var(--gold2); border-color: rgba(232,182,74,.55); }
.winner-card-modal { max-width: 520px; text-align: center; }
.winner-proof-head { display: grid; justify-items: center; gap: 4px; padding-right: 22px; }
.winner-proof-head h2 { margin: 2px 0 0; font-size: 23px; }
.winner-proof-prize { color: var(--gold); font-size: 18px; }
.winner-proof-card { margin: 16px 0 8px; }
.winner-proof-card .card.mini { width: min(290px, 100%); --cell: 40px; }
.winner-proof-note { text-align: center; margin: 6px 0 0; }
@media (max-width: 600px) {
  .winner-banner { align-items: flex-start; flex-wrap: wrap; }
  .winner-banner-title { width: 100%; }
  .winner-view-btn { min-height: 34px; }
  .winner-proof-card .card.mini { --cell: 36px; }
}

/* =====================================================================
   V5.7 — LAYOUT "LIVE BINGO" (posição dos elementos como no Live Bingo antigo)
   com as cores escuras/acinzentadas da V5.6. Leve: sem blur, sem animação contínua.
   ===================================================================== */
body { background: var(--page-glow), var(--bg); background-attachment: fixed; }
h1, h2, h3, .btn, .tab, .menu-btn, .prize-main strong, .prize-value, .ball-last .ball-n, .cards-title strong, .card-h, .card-g, .bingo-title, .pill { font-family: var(--font-title); }
.btn { border-radius: 12px; font-weight: 700; }
.btn-gold { background: linear-gradient(180deg, var(--gold2), var(--gold)); }

/* topo: MENU | logo | situação | cartelas + comprar */
.top { height: 68px; padding: 0 18px; gap: 14px; background: var(--bg2); border-bottom: 1px solid var(--line); }
.menu-btn { height: 50px; width: 64px; padding: 0; display: grid; place-items: center; align-content: center; gap: 0; border-radius: 14px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); }
.menu-btn .mb-ico { font-size: 21px; line-height: 1; }
.menu-btn .mb-txt { font-size: 10.5px; letter-spacing: .12em; font-weight: 800; line-height: 1.15; color: var(--muted); }
.menu-btn:hover { border-color: var(--accent); }
.logo-top { width: 50px; height: 50px; border-radius: 12px; }
.icon-btn { width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel2); font-size: 18px; display: none; place-items: center; }
.icon-btn.off { opacity: .55; }
.cards-box { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line2); background: var(--panel); border-radius: 14px; padding: 5px 5px 5px 12px; }
.cb-info { display: grid; line-height: 1.1; }
.cb-info small { font: 800 9.5px var(--font-title); letter-spacing: .1em; color: var(--muted); }
.cb-info b { font: 800 18px var(--font-title); }
.cb-buy { border: 0; border-radius: 11px; padding: 7px 12px; background: var(--buy-green); color: #fff; font: 800 13px var(--font-title); display: grid; justify-items: center; line-height: 1; gap: 2px; }
.cb-buy:hover { background: var(--buy-green-dark); }
.cb-buy span { font-size: 16px; }
.age-banner { margin: 10px 20px 0; display: flex; align-items: center; justify-content: center; gap: 10px; padding: 6px 12px; border-radius: 12px;
  border: 1px solid rgba(239, 90, 111, .35); background: rgba(239, 90, 111, .08); font: 800 12px var(--font-title); letter-spacing: .08em; color: #ffb3bf; }
:root[data-theme="light"] .age-banner { color: #b4233b; background: #fff1f3; }
.age-banner b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; background: #d63e55; color: #fff; font-size: 12.5px; letter-spacing: 0; flex: none; }

/* layout */
.layout { height: calc(100vh - 112px); height: calc(100dvh - 112px); padding-top: 12px; }
.panel, .prize, .balls, .next-game { border-radius: var(--radius); box-shadow: var(--shadow); }
.player { border-radius: var(--radius); }
.tabs { border-radius: 14px; padding: 5px; }
.tab { border-radius: 10px; font-weight: 700; }
.tab.on { background: var(--accent); color: #fff; }
.tab.on .badge { background: rgba(255, 255, 255, .22); color: #fff; }

/* PRÊMIO: rótulo em cima, valor grande no meio, nome e forma embaixo */
.prize { text-align: center; padding: 16px 18px; }
.prize .eyebrow { font: 800 12px var(--font-title); letter-spacing: .16em; color: var(--muted); }
.prize-main { flex-direction: column-reverse; align-items: center; gap: 2px; margin: 2px 0 8px; }
.prize-main strong { font-size: 18px; font-weight: 700; color: var(--text); }
.prize-value { font-size: clamp(30px, 3.4vw, 44px); font-weight: 800; color: var(--prize-green); line-height: 1.05; }
.chip { border-radius: 999px; padding: 4px 12px; }
.prize-show-item { border-radius: 14px; }
.prize-show-item strong { color: var(--prize-green); font-family: var(--font-title); }
.prize-pending { border-radius: 999px; padding: 4px 12px; }

/* ÚLTIMA pedra em destaque grande + quantidade de pedras + últimas */
.balls { gap: 16px; padding: 14px 18px; }
.ball-last { width: 96px; height: 96px; border-width: 5px; background: radial-gradient(circle at 35% 30%, #ffffff 0%, #eef2ff 35%, #c9d3f2 100%); color: #10162a;
  box-shadow: 0 10px 24px rgba(0, 0, 0, .3); }
.ball-last .ball-l { font: 800 11px var(--font-title); letter-spacing: .12em; }
.ball-last .ball-n { font-size: 40px; color: #10162a; }
.ball-sm { font-family: var(--font-title); }
.ball-count strong { font: 800 28px var(--font-title); }
.ball-count span { font-weight: 700; }

/* quadro de pedras */
.bcell { background: var(--cell-bg); border-radius: 8px; font-family: var(--font-title); }

/* compra */
.buy-hero { border-radius: 16px; }
.buy-hero-btn { border-radius: 12px; font-family: var(--font-title); font-size: 15px; }
.pack { border-radius: 14px; }

/* "Minhas cartelas" */
.cards-head { padding: 14px 14px 6px; }
.cards-title strong { font-size: 17px; }
.fchip { border-radius: 999px; font-family: var(--font-title); font-weight: 700; }
.fchip b { color: var(--gold2); }
:root[data-theme="light"] .fchip b { color: #9a6a00; }

/* CARTELAS: faixa de título "Cartela N" + etiqueta, letras B I N G O em destaque, estrela dourada */
.card { background: var(--card-body); border: 1px solid var(--line2); border-radius: 14px; padding: 10px; overflow: hidden; }
.card-h { height: 36px; margin: -10px -10px 8px; padding: 0 10px 0 12px; background: var(--card-head); color: var(--card-head-text); font-size: 13.5px; border-bottom: 1px solid var(--line); }
.card-h .cn { color: var(--card-head-text); font-weight: 700; }
.card-h .tag { background: var(--panel); color: var(--muted); border: 1px solid var(--line2); border-radius: 999px; padding: 2px 9px; font-size: 10.5px; letter-spacing: .02em; font-weight: 800; }
.card-g { gap: 4px; }
.card-g b { height: 16px; line-height: 16px; border-radius: 6px; background: var(--panel2); color: var(--muted); font-size: 10.5px; font-weight: 800; }
.card-g i { background: var(--cell-bg); border-radius: 8px; color: var(--text); font-weight: 700; }
.card-g i.fr { background: var(--gold-soft); color: var(--gold); }
.card-g i.m { background: var(--mark-grad); color: #fff; }
/* faltando 2 */
.card.t2 { border-color: rgba(67, 193, 214, .55); }
.card.t2 .card-h { background: var(--teal-soft); }
.card.t2 .tag { background: var(--teal-soft); color: var(--teal); border-color: transparent; }
/* armada: destaque dourado */
.card.t1 { border-color: var(--gold); background: linear-gradient(180deg, var(--gold-soft), var(--card-body) 40%); }
.card.t1 .card-h { background: rgba(232, 182, 74, .2); }
.card.t1 .tag { background: var(--gold); color: var(--gold-ink); border-color: transparent; }
.card.t1 .cn { color: var(--gold2); }
:root[data-theme="light"] .card.t1 .cn { color: #9a6a00; }
/* BINGO: cartela inteira dourada (só até a conferência) */
.card.t0 { background: var(--gold); border-color: var(--gold2); }
.card.t0 .card-h { background: rgba(42, 30, 5, .14); border-bottom-color: transparent; }
.card.t0 .cn { color: var(--gold-ink); }
.card.t0 .tag { background: var(--gold-ink); color: var(--gold2); border-color: transparent; }
.card.t0 .card-g b { background: rgba(42, 30, 5, .14); color: var(--gold-ink); }
.card.t0 .card-g i { background: rgba(42, 30, 5, .12); color: var(--gold-ink); }
.card.t0 .card-g i.m { background: rgba(42, 30, 5, .28); color: var(--gold-ink); }
.card.t0 .card-g i.w, .card.t0 .card-g i.fr { background: var(--gold-ink); color: var(--gold2); }
.card.mini .card-h { margin: -10px -10px 8px; }
/* compactas (2 por linha no celular) */
.cards-inner.compact .card { padding: 8px; border-radius: 12px; }
.cards-inner.compact .card-h { height: 28px; margin: -8px -8px 6px; padding: 0 8px; font-size: 12px; }
.cards-inner.compact .card-h .tag { font-size: 9px; padding: 1px 6px; }
.cards-inner.compact .card-g b { height: 13px; line-height: 13px; font-size: 9.5px; border-radius: 4px; }
.cards-inner.compact .card-g i { border-radius: 6px; font-size: 13px; }

/* menu lateral e janelas */
.drawer-item { border-radius: 12px; font-family: var(--font-title); font-weight: 600; }
.drawer-opt { border-radius: 12px; }
.seg-btn.on { background: var(--accent); color: #fff; }
.modal-card { border-radius: 20px; }
.auth-card { border-radius: 22px; }
.winner-banner { border-radius: 14px; }

/* celular */
@media (max-width: 900px) {
  .top { height: 62px; padding: 0 10px; gap: 8px; }
  .menu-btn { height: 46px; width: 56px; border-radius: 13px; }
  .menu-btn .mb-ico { font-size: 19px; }
  .menu-btn .mb-txt { font-size: 9.5px; }
  .logo-top { width: 42px; height: 42px; }
  .top-mid { display: none; }
  .top-right { margin-left: auto; gap: 6px; }
  .icon-btn { display: grid; }
  .cards-box { padding: 4px 4px 4px 10px; border-radius: 13px; }
  .cb-info b { font-size: 16px; }
  .cb-buy { padding: 6px 9px; font-size: 11.5px; }
  .age-banner { margin: 8px 8px 0; padding: 4px 10px; font-size: 10.5px; letter-spacing: .05em; }
  .age-banner b { width: 24px; height: 24px; font-size: 10.5px; }
  .layout { height: auto; padding-top: 8px; }
  /* prêmio em cima (largura toda), última pedra logo abaixo */
  .info { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .prize { padding: 10px 12px; }
  .prize .eyebrow { font-size: 10.5px; }
  .prize-value { font-size: 30px; }
  .prize-main strong { font-size: 15px; }
  .balls { grid-template-columns: auto minmax(0, 1fr); grid-template-areas: "last count" "last recent"; padding: 10px 14px; column-gap: 14px; justify-content: start; }
  .ball-last { width: 70px; height: 70px; border-width: 4px; }
  .ball-last .ball-n { font-size: 28px; }
  .ball-last .ball-l { font-size: 9px; }
  .ball-count strong { font-size: 24px; }
  .ball-count span { font-size: 13px; }
  .ball-recent .ball-sm:nth-child(n+4) { display: grid; }
  .ball-recent .ball-sm:nth-child(n+6) { display: none; }
  .ball-sm { width: 30px; height: 30px; font-size: 12px; }
  body.scroll-compact .top { height: 54px; }
  body.scroll-compact .menu-btn { height: 40px; width: 50px; }
  body.scroll-compact .logo-top { width: 36px; height: 36px; }
  body.scroll-compact .prize-value { font-size: 22px; }
  body.scroll-compact .ball-last { width: 54px; height: 54px; }
  body.scroll-compact .ball-last .ball-n { font-size: 22px; }
}
@media (max-width: 380px) {
  .cb-info small { display: none; }
  .cards-box { padding-left: 8px; }
  .menu-btn { width: 50px; }
}
html { text-rendering: geometricPrecision; } /* posicionamento sem arredondar: evita espaços tortos na Poppins em tamanhos pequenos */
/* contagem regressiva entre o PRÊMIO e "Comprar cartelas" */
.next-game { margin-top: 0; }
@media (max-width: 900px) { .next-game { order: 3; margin: 0; } }
@media (max-width: 900px) {
  .next-game { flex-direction: column; align-items: center; text-align: center; gap: 6px; padding: 12px; }
  .next-game > div { justify-items: center; }
  .next-game-time { text-align: center; }
  .next-game strong { font-size: 17px; }
  .next-game-time strong { font-size: 24px; white-space: nowrap; }
}
/* compra: VALOR a pagar em cima, grande; quantidade de cartelas embaixo */
.pack { gap: 1px; padding: 12px 12px 10px; }
.pack .pp { order: 0; font: 800 22px var(--font-title); line-height: 1.1; }
.pack .pq { order: 1; font: 700 14.5px var(--font-title); color: var(--text); }
.pack .pu { order: 2; }
.buy-total { flex-direction: column; align-items: center; justify-content: center; gap: 0; text-align: center; padding: 14px 0 12px; }
.buy-total small { font: 800 10.5px var(--font-title); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.buy-total strong { font: 800 34px var(--font-title); line-height: 1.15; color: var(--gold); }
.buy-total span { font: 700 15px var(--font-title); color: var(--text); }

/* ---------- DOURADO (no lugar do amarelo) e aviso de BINGO organizado ---------- */
:root {
  --gold-rich: linear-gradient(135deg, #f8e3a3 0%, #e6bf5c 38%, #c8962e 72%, #a87a1c 100%);
  --gold-rich-ink: #2b1b00;
  --gold-rich-line: #f3d27e;
  --blue-card: linear-gradient(135deg, #1d3a8a 0%, #1e4fbf 55%, #2563eb 100%);
}
/* botão Gerar PIX */
.btn-gold, #buyGo { background: var(--gold-rich); color: var(--gold-rich-ink); border: 1px solid var(--gold-rich-line); box-shadow: 0 6px 18px rgba(200, 150, 46, .3); text-shadow: 0 1px 0 rgba(255, 255, 255, .35); }
.btn-gold:hover:not(:disabled), #buyGo:hover:not(:disabled) { filter: brightness(1.06); background: var(--gold-rich); }
/* janela "BINGO!" de quem ganhou */
.bingo-card { background: var(--gold-rich); color: var(--gold-rich-ink); border-color: var(--gold-rich-line); }
.bingo-card .btn-gold, .bingo-card .btn-gold:hover:not(:disabled) { background: var(--gold-rich-ink); color: #f8e3a3; border-color: transparent; text-shadow: none; }
/* cartela que bingou: dourada */
.card.t0 { background: var(--gold-rich); border-color: var(--gold-rich-line); box-shadow: 0 0 0 2px rgba(230, 191, 92, .35), 0 8px 20px rgba(168, 122, 28, .35); }
.card.t0 .card-h { background: rgba(43, 27, 0, .16); }
.card.t0 .cn, .card.t0 .card-g b { color: var(--gold-rich-ink); }
.card.t0 .tag { background: var(--gold-rich-ink); color: #f8e3a3; }
.card.t0 .card-g i { background: rgba(43, 27, 0, .1); color: var(--gold-rich-ink); }
.card.t0 .card-g i.m { background: rgba(43, 27, 0, .26); color: var(--gold-rich-ink); }
.card.t0 .card-g i.w, .card.t0 .card-g i.fr { background: var(--gold-rich-ink); color: #f8e3a3; }
.prize-pending { background: var(--gold-rich); color: var(--gold-rich-ink); }

/* aviso de BINGO */
.winner-banner { display: grid; gap: 10px; padding: 14px 16px; border-radius: 16px; font-weight: 600; align-items: stretch; }
.winner-banner.wb-others { background: var(--blue-card); color: #fff; border: 1px solid rgba(147, 197, 253, .45); box-shadow: 0 10px 26px rgba(30, 79, 191, .35); }
.winner-banner.wb-mine { background: var(--gold-rich); color: var(--gold-rich-ink); border: 1px solid var(--gold-rich-line); box-shadow: 0 10px 26px rgba(168, 122, 28, .4); }
.wb-head { display: flex; align-items: center; gap: 12px; }
.wb-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgba(255, 255, 255, .16); flex: none; }
.wb-mine .wb-ico { background: rgba(43, 27, 0, .12); }
.wb-title { display: grid; min-width: 0; line-height: 1.15; flex: 1; }
.wb-title b { font: 900 22px var(--font-title); letter-spacing: .03em; }
.wb-title small { font: 600 13.5px var(--font-title); opacity: .92; }
.wb-status { flex: none; font: 800 11px var(--font-title); letter-spacing: .06em; text-transform: uppercase; padding: 5px 10px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.wb-mine .wb-status { background: rgba(43, 27, 0, .14); }
.wb-prize { font: 800 12px var(--font-title); letter-spacing: .06em; text-transform: uppercase; opacity: .9; }
.wb-list { display: grid; gap: 6px; }
.wb-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(255, 255, 255, .12); }
.wb-mine .wb-row { background: rgba(43, 27, 0, .1); }
.wb-row.me { outline: 2px solid currentColor; outline-offset: -2px; }
.wb-name { font: 700 15px var(--font-title); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wb-card { font: 700 13px var(--font-title); opacity: .9; font-variant-numeric: tabular-nums; }
.wb-row .winner-view-btn { border: 1px solid currentColor; background: transparent; color: inherit; border-radius: 999px; padding: 5px 11px; font: 800 12px var(--font-title); min-height: 32px; }
.wb-others .wb-row .winner-view-btn { background: #fff; color: #1e3a8a; border-color: #fff; }
.wb-more, .wb-split { font-size: 12.5px; opacity: .9; }
.wb-foot { margin: 0; font-size: 13px; opacity: .92; }
@media (max-width: 900px) {
  .winner-banner { padding: 12px; gap: 8px; }
  .winner-banner small { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .wb-ico { width: 38px; height: 38px; font-size: 20px; }
  .wb-title b { font-size: 19px; }
  .wb-row { grid-template-columns: minmax(0, 1fr) auto; }
  .wb-row .winner-view-btn { grid-column: 2; grid-row: 1 / span 2; }
  .wb-card { grid-column: 1; }
}
