:root {
  --page: #0d0d0d;
  --lg-surface-1: #161615;
  --lg-surface-2: #1f1f1d;
  --border: rgba(255, 255, 255, 0.12);
  --lg-text: #ffffff;
  --text-2: #c3c2b7;
  --text-3: #898781;
  --lg-accent: #3ecf8e;
  --good: #3ba55c;
  --lg-warn: var(--accent-soft);
  --bad: #e66767;
  --radius: 14px;
}
:root[data-theme="light"] {
  --page: #f4f3ef;
  --lg-surface-1: #ffffff;
  --lg-surface-2: #ecebe5;
  --border: rgba(0, 0, 0, 0.14);
  --lg-text: #1a1a19;
  --text-2: #45443f;
  --text-3: #75736c;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --page: #f4f3ef;
    --lg-surface-1: #ffffff;
    --lg-surface-2: #ecebe5;
    --border: rgba(0, 0, 0, 0.14);
    --lg-text: #1a1a19;
    --text-2: #45443f;
    --text-3: #75736c;
  }
}

* { box-sizing: border-box; }
html, body { margin: 0; background: var(--page); color: var(--lg-text); }
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.45; -webkit-text-size-adjust: 100%; }
h1, h2, h3 { margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.wrap { max-width: 720px; margin: 0 auto; padding: 16px; }
.hidden { display: none !important; }
.muted { color: var(--text-3); }
.small { font-size: 13px; }

.card { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; margin-bottom: 14px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-2); margin-bottom: 12px; }

.btn { appearance: none; border: 1px solid var(--border); background: var(--lg-surface-2); color: var(--lg-text); border-radius: 10px; padding: 10px 14px; font-weight: 600; cursor: pointer; min-height: 44px; }
.btn:hover { filter: brightness(1.15); }
.btn:disabled { opacity: 0.45; cursor: default; }
.btn-primary { background: var(--lg-accent); border-color: var(--lg-accent); color: #fff; }
.btn-danger { border-color: var(--bad); color: var(--bad); }
.btn-small { min-height: 34px; padding: 6px 10px; font-size: 13px; }
.row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.row > .grow { flex: 1 1 140px; }
input[type="text"], input[type="number"], input[type="password"], select, textarea {
  width: 100%; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; min-height: 44px;
}
textarea { min-height: 90px; resize: vertical; }
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--text-2); flex: 1 1 160px; }

/* ---------- sala (celular e TV) ---------- */
.room-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.room-name { font-size: 20px; font-weight: 700; }
.chip { display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--lg-surface-2); border: 1px solid var(--border); color: var(--text-2); white-space: nowrap; }
.chip-running { background: rgba(59, 165, 92, 0.18); border-color: var(--good); color: var(--good); }
.chip-paused { background: rgba(79, 134, 247, 0.16); border-color: var(--lg-warn); color: var(--lg-warn); }
.chip-break { background: rgba(62, 207, 142, 0.18); border-color: var(--lg-accent); color: #8fe3bb; }
.chip-finished { border-color: var(--bad); color: var(--bad); }

.banner { background: rgba(79, 134, 247, 0.14); border: 1px solid var(--lg-warn); border-radius: 12px; padding: 10px 14px; margin-bottom: 14px; font-weight: 600; }
.banner-alert { position: fixed; top: 10px; left: 12px; right: 12px; z-index: 40; margin: 0 auto; max-width: 696px; text-align: center; background: #14304f; border-color: var(--lg-accent); box-shadow: 0 6px 24px rgba(0, 0, 0, 0.45); animation: pulse 1s ease-in-out 4; }
@keyframes pulse { 50% { transform: scale(1.02); } }

.clock-card { text-align: center; padding: 22px 12px 18px; container-type: inline-size; }
.level-label { font-size: 14px; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.08em; }
.countdown { --cdsz: min(calc(92cqw / 2.78), 168px); display: flex; justify-content: center; align-items: center; height: calc(var(--cdsz) * 1.08); font-size: min(calc(92cqw / var(--em, 2.78)), 168px); font-weight: 800; line-height: 1; white-space: nowrap; margin: 6px 0 4px; }
.countdown .dg { display: inline-block; width: 0.62em; text-align: center; }
.countdown .sep { display: inline-block; width: 0.34em; text-align: center; }
.countdown.low { color: var(--lg-warn); }
.countdown.paused { opacity: 0.55; }
.progress { height: 8px; background: var(--lg-surface-2); border-radius: 999px; overflow: hidden; margin: 10px auto 0; max-width: 520px; }
.progress > i { display: block; height: 100%; background: var(--lg-accent); width: 0; transition: width 0.4s linear; }

.blinds { text-align: center; container-type: inline-size; }
.blinds-main { --bsz: min(calc(90cqw / 4.2), 78px); height: calc(var(--bsz) * 1.1); font-size: min(calc(90cqw / var(--bem, 5)), 78px); line-height: 1.1; display: flex; align-items: center; justify-content: center; font-weight: 800; white-space: nowrap; overflow: hidden; font-variant-numeric: tabular-nums; }
.blinds-main small { font-size: 0.34em; font-weight: 600; color: var(--text-3); margin: 0 0.25em; }
.blinds-sub { color: var(--text-2); font-size: 15px; margin-top: 2px; }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.info { min-width: 0; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 12px; }
.info .k { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.info .v { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.info .s { font-size: 12px; color: var(--text-2); }
.info .k, .info .v, .info .s { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.info .v, .info .s { min-height: 1.3em; }
.chip { min-width: 9ch; text-align: center; }

.players-count { font-size: 26px; font-weight: 800; }
.players-count small { font-size: 14px; font-weight: 500; color: var(--text-3); }
.plist { list-style: none; padding: 0; margin: 10px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 6px; }
.plist li { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; justify-content: space-between; gap: 8px; font-size: 14px; }
.plist li.out { color: var(--text-3); text-decoration: line-through; }
.plist li.out span:last-child { text-decoration: none; font-weight: 700; }
.champion { background: rgba(59, 165, 92, 0.16); border: 1px solid var(--good); border-radius: 12px; padding: 12px 14px; font-weight: 700; margin-bottom: 8px; }

table.struct { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.struct th, table.struct td { padding: 7px 8px; text-align: right; border-bottom: 1px solid var(--border); }
table.struct th:first-child, table.struct td:first-child { text-align: left; }
table.struct th { color: var(--text-3); font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
table.struct tr.now td { background: rgba(62, 207, 142, 0.18); font-weight: 700; }
table.struct tr.brk td { color: var(--text-3); font-style: italic; }
details > summary { cursor: pointer; font-weight: 700; color: var(--text-2); }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.conn { font-size: 12px; color: var(--text-3); text-align: center; margin: 4px 0 12px; }
.conn.bad { color: var(--bad); }


/* ---------- admin ---------- */
.qr-box { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.qr-box img { width: 190px; height: 190px; background: #fff; padding: 8px; border-radius: 12px; image-rendering: pixelated; }
.link-box { word-break: break-all; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; background: var(--lg-surface-2); padding: 8px 10px; border-radius: 8px; border: 1px solid var(--border); }
.player-row { display: flex; align-items: center; gap: 8px; padding: 6px 0; border-bottom: 1px solid var(--border); }
.player-row .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.player-row.out .nm { color: var(--text-3); text-decoration: line-through; }
.struct-edit td, .struct-edit th { padding: 4px 3px; }
.struct-edit input, .struct-edit select { min-height: 36px; padding: 6px 8px; }
.struct-edit input[type="number"] { min-width: 70px; }
.msg { margin-top: 8px; font-size: 13px; }
.msg.err { color: var(--bad); }
.msg.ok { color: var(--good); }

/* mesas e assentos */
.tbl { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-top: 10px; }
.tbl-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; gap: 8px; }
.seats { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 6px; }
.seat { display: flex; gap: 8px; align-items: center; background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 7px 9px; font-size: 14px; min-width: 0; }
.seat i { font-style: normal; font-size: 11px; font-weight: 700; color: var(--text-3); width: 16px; text-align: center; flex: none; }
.seat span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.seat.free { opacity: 0.45; border-style: dashed; }
.seat.mine, .plist li.mine { border-color: var(--lg-accent); background: rgba(62, 207, 142, 0.18); font-weight: 700; }
.sub-title { margin: 14px 0 0; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-3); }
.me-seat { font-size: 16px; line-height: 1.5; }
.mvlist { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.mvlist li { padding: 6px 10px; background: var(--lg-surface-2); border-radius: 8px; border: 1px solid var(--border); }
.mvlist li.mine { border-color: var(--lg-accent); background: rgba(62, 207, 142, 0.18); }

.mv-select { width: auto; min-height: 34px; padding: 4px 8px; font-size: 13px; }

/* login e salas do organizador */
.rooms-list { display: flex; flex-direction: column; gap: 8px; }
.room-link { display: flex; justify-content: space-between; gap: 10px; align-items: center; padding: 12px 14px; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; color: var(--lg-text); text-decoration: none; }
.room-link:hover { border-color: var(--lg-accent); }
.room-link .muted { font-size: 13px; }

/* classificação do torneio */
.stand { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.stand-row { display: grid; grid-template-columns: 3.2em minmax(90px, 1.2fr) minmax(60px, 1.6fr) auto 3.4em; gap: 8px; align-items: center; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; font-size: 14px; }
.stand-row.mine { border-color: var(--lg-accent); background: rgba(62, 207, 142, 0.18); }
.stand-row .rk { text-align: center; font-weight: 800; color: var(--text-3); }
.stand-row .nm { display: flex; flex-direction: column; min-width: 0; }
.stand-row .nm b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stand-row .nm i { font-style: normal; font-size: 11px; color: var(--text-3); }
.stand-row .bar { height: 8px; background: var(--lg-surface-1); border-radius: 999px; overflow: hidden; }
.stand-row .bar u { display: block; height: 100%; background: var(--lg-accent); text-decoration: none; border-radius: 999px; }
.stand-row .ch { font-variant-numeric: tabular-nums; font-size: 13px; text-align: right; white-space: nowrap; }
.stand-row .pct { white-space: nowrap; min-width: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-2); }
.outlist { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.out-row { display: grid; grid-template-columns: 38px 1fr; gap: 2px 10px; align-items: baseline; padding: 6px 10px; background: var(--lg-surface-2); border-radius: 8px; border: 1px solid var(--border); }
.out-row .muted { grid-column: 2; font-size: 12px; }
.out-row.paid { border-color: var(--good); }
.out-row b { color: var(--text-2); }
.hint-line { margin: 8px 0 0; font-size: 13px; color: var(--text-3); }
@media (max-width: 520px) { .stand-row { grid-template-columns: 3.2em 1fr auto 3.4em; } .stand-row .bar { display: none; } }

.chips-input { width: 92px; min-height: 34px; padding: 4px 8px; font-size: 13px; }

/* jogadores no painel: nome em cima, controles embaixo */
.player-card { padding: 10px 0; border-bottom: 1px solid var(--border); }
.pc-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin-bottom: 8px; }
.pc-name { font-size: 16px; }
.pc-where { font-size: 13px; color: var(--text-3); }
.pc-ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.player-card.out .pc-name { color: var(--text-3); text-decoration: line-through; }

/* =====================================================================================
   MODO TV / tela cheia
   Nada aqui depende do tamanho do texto: cada bloco tem altura própria (em dvh) e o texto
   é dimensionado pelo bloco (unidades cq), então o relógio não faz nada "se mexer".
   Celular em pé: tempo e blinds em cima, classificação rolando embaixo.
   Celular deitado / TV: tempo à esquerda, torneio e mesas à direita.
   ===================================================================================== */
:root { --vh: 1vh; }
@supports (height: 1dvh) { :root { --vh: 1dvh; } }

body.tv { overflow: hidden; }
body.tv .wrap { max-width: none; height: calc(100 * var(--vh)); padding: 8px 12px; display: flex; flex-direction: column; gap: 8px; overflow: hidden; }
body.tv .toolbar { position: fixed; top: 6px; right: 8px; z-index: 30; margin: 0; opacity: 0.55; }
body.tv .toolbar:hover { opacity: 1; }
body.tv #btn-wake { display: none; }
body.tv .toolbar .btn { min-height: 30px; padding: 2px 10px; font-size: 12px; }
body.tv #join-card, body.tv #moves-card, body.tv #structure-card { display: none; }
body.tv .card { margin: 0; padding: 8px 10px; }

body.tv .room-head { flex: 0 0 auto; margin: 0; padding-right: 92px; align-items: center; }
body.tv .room-head > div { min-width: 0; }
body.tv .room-name { font-size: clamp(16px, calc(3 * var(--vh)), 34px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.tv #room-code { display: none; }
body.tv .chip { font-size: clamp(11px, calc(2 * var(--vh)), 20px); padding: 3px 12px; min-width: 11ch; }

/* avisos viram faixas por cima da tela, pra não empurrar nada quando aparecem */
/* o aviso do admin fica no rodapé, empurrando só a lista que rola (o relógio e os blocos de cima não se mexem) */
body.tv #message { position: static; order: 99; flex: 0 0 auto; margin: 0; text-align: center; }
body.tv #alert-banner { position: fixed; left: 12px; right: 12px; top: 44px; z-index: 26; margin: 0; text-align: center; animation: none; }
body.tv .conn { position: fixed; left: 12px; top: 4px; z-index: 25; margin: 0; font-size: 11px; }

body.tv .tv-grid { flex: 1 1 0; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
body.tv .tv-grid > div { display: flex; flex-direction: column; gap: 8px; min-height: 0; }
body.tv .tv-grid > div:first-child { flex: 0 0 auto; }
body.tv .tv-grid > div:last-child { flex: 1 1 0; overflow-y: auto; overflow-x: hidden; }

/* relógio */
body.tv .clock-card { height: calc(29 * var(--vh)); container-type: size; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 1cqh; padding: 4px 8px; }
body.tv .level-label { font-size: clamp(11px, 6cqh, 26px); white-space: nowrap; }
body.tv .countdown { --cdsz: min(calc(94cqw / 2.78), 62cqh); font-size: min(calc(94cqw / var(--em, 2.78)), 62cqh); margin: 0; }
body.tv .progress { width: 80%; max-width: none; height: clamp(4px, 2.4cqh, 14px); margin: 0; }

/* blinds */
body.tv .blinds { height: calc(14 * var(--vh)); container-type: size; display: flex; flex-direction: column; justify-content: center; padding: 4px 8px; }
body.tv .blinds h2 { font-size: clamp(9px, 11cqh, 18px); margin: 0 0 1cqh; }
body.tv .blinds-main { height: auto; font-size: min(calc(92cqw / var(--bem, 5)), 46cqh); line-height: 1.05; min-height: 0; }
body.tv .blinds-sub { font-size: clamp(9px, 11cqh, 22px); min-height: 1.2em; margin: 0; }

/* próximo nível, intervalo, tempo de jogo, mesa */
body.tv .info-card { height: calc(16 * var(--vh)); padding: 4px; }
body.tv .info-card .info-grid { height: 100%; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 6px; }
body.tv .info { container-type: size; padding: 3px 8px; display: flex; flex-direction: column; justify-content: center; overflow: hidden; }
body.tv .info .k { font-size: clamp(9px, 17cqh, 16px); }
body.tv .info .v { font-size: clamp(13px, 36cqh, 44px); min-height: 0; }
body.tv .info .s { font-size: clamp(9px, 17cqh, 15px); min-height: 0; }

/* torneio e mesas */
body.tv .card h2 { font-size: 12px; margin-bottom: 6px; }
body.tv #tourney-card .info { container-type: normal; padding: 4px 8px; }
body.tv #tourney-card .info .k { font-size: 10px; }
body.tv #tourney-card .info .v { font-size: 18px; }
body.tv #tourney-card .info .s { display: none; }
body.tv .stand-row { font-size: clamp(13px, calc(2.2 * var(--vh)), 26px); }
body.tv .out-row, body.tv .plist li, body.tv .seat { font-size: clamp(12px, calc(2 * var(--vh)), 22px); }
body.tv .players-count { font-size: clamp(18px, calc(3.4 * var(--vh)), 44px); }

@media (min-aspect-ratio: 5/4) {
  body.tv .tv-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 12px; }
  body.tv .tv-grid > div:first-child { display: grid; grid-template-rows: minmax(0, 40fr) minmax(0, 22fr) minmax(0, 28fr); gap: 8px; min-height: 0; }
  body.tv .clock-card, body.tv .blinds, body.tv .info-card { height: auto; min-height: 0; }
  body.tv .tv-grid > div:last-child { overflow-y: auto; }
}

@container (max-height: 100px) { body.tv .blinds h2 { display: none; } body.tv .blinds-main { font-size: min(calc(92cqw / var(--bem, 5)), 52cqh); } }
@container (max-height: 64px) { body.tv .info .s { display: none; } }
body.tv #message { font-size: 14px; padding: 6px 10px; border-radius: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* =====================================================================================
   PAINEL DO ADMIN (celular primeiro): barra fixa com o relógio, abas embaixo,
   cartões compactos e seções que abrem e fecham.
   ===================================================================================== */
body.has-tabbar { padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.slots { display: flex; justify-content: center; }
.slots .dg { display: inline-block; width: 0.62em; text-align: center; }
.slots .sep { display: inline-block; width: 0.34em; text-align: center; }

.apbar { position: sticky; top: 0; z-index: 20; margin: 0 -16px 12px; padding: 8px 16px; background: var(--page); border-bottom: 1px solid var(--border); }
.apbar-top { display: flex; align-items: center; gap: 10px; }
.apbar-back { font-size: 28px; line-height: 1; padding: 0 8px 4px 0; text-decoration: none; color: var(--text-2); }
.apbar-title { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.apbar-title b { font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.apbar-title small { color: var(--text-3); font-size: 12px; }
.apbar-clock { display: flex; align-items: center; gap: 12px; margin-top: 6px; }
.apbar-time { font-size: 32px; font-weight: 800; line-height: 1; width: 3.2ch; min-width: 100px; justify-content: flex-start; }
.apbar-sub { flex: 1; min-width: 0; display: flex; flex-direction: column; font-size: 12px; color: var(--text-2); }
.apbar-sub span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 1.3em; }
.apbar-play { min-width: 60px; min-height: 46px; font-size: 20px; padding: 0 14px; }
.apbar .msg { margin: 4px 0 0; }
.apbar .msg:empty { display: none; }

.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; background: var(--lg-surface-1); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; appearance: none; border: 0; background: transparent; color: var(--text-3); padding: 8px 2px 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; font-weight: 700; cursor: pointer; min-height: 60px; }
.tabbar button .ic { font-size: 21px; line-height: 1; filter: grayscale(1); opacity: 0.7; }
.tabbar button.on { color: var(--lg-accent); box-shadow: inset 0 3px 0 var(--lg-accent); }
.tabbar button.on .ic { filter: none; opacity: 1; }

.pane-head { margin: 4px 0 10px; }
.pane-head h2 { font-size: 18px; text-transform: none; letter-spacing: 0; color: var(--lg-text); margin: 0; }

/* aba Jogo */
.clock-card .ctl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ctl-wide { grid-column: 1 / -1; min-height: 58px; font-size: 19px; }
.adj-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.adj-grid .btn { padding: 8px 0; }
.linkdanger { margin-top: 12px; background: none; border: 0; color: var(--bad); font-size: 13px; text-decoration: underline; cursor: pointer; padding: 10px; min-height: 40px; }
.statline { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 12px; }
.stat { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 999px; padding: 7px 13px; font-size: 13px; color: var(--text-2); }
.stat b { color: var(--lg-text); }
.two-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
.btn-block { width: 100%; margin-top: 10px; }

/* filtro de jogadores */
.seg { display: flex; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 3px; margin-bottom: 12px; }
.seg button { flex: 1; border: 0; background: transparent; color: var(--text-2); padding: 9px 4px; border-radius: 9px; font-weight: 700; cursor: pointer; min-height: 42px; font-size: 14px; }
.seg button.on { background: var(--lg-accent); color: #fff; }

/* seções que abrem e fecham */
details.acc { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 14px; margin-bottom: 12px; }
details.acc > summary { list-style: none; cursor: pointer; padding: 14px 16px; font-weight: 700; display: flex; justify-content: space-between; align-items: center; min-height: 54px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: "›"; font-size: 22px; color: var(--text-3); transform: rotate(90deg); transition: transform 0.15s; }
details.acc[open] > summary::after { transform: rotate(-90deg); }
details.acc > .acc-body { padding: 0 16px 16px; }
details.acc.danger > summary { color: var(--bad); }
.sep-line { border: 0; border-top: 1px solid var(--border); margin: 16px 0 6px; }

/* cartão de jogador */
.pcard { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 10px 12px; margin-bottom: 8px; }
.pcard.out { opacity: 0.8; }
.pc-row { display: flex; align-items: center; gap: 8px; }
.pc-id { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.pc-name { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard.out .pc-name { color: var(--text-3); text-decoration: line-through; }
.pc-where { font-size: 12px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pcard .chips-input { width: 84px; flex: none; min-height: 40px; padding: 6px 8px; text-align: right; font-size: 15px; }
.pcard .btn-small { min-height: 40px; flex: none; }
.btn-danger-soft { border-color: rgba(230, 103, 103, 0.55); color: var(--bad); }
.pc-more { margin-top: 4px; }
.pc-more > summary { list-style: none; font-size: 12px; color: var(--text-3); cursor: pointer; padding: 6px 0 2px; }
.pc-more > summary::-webkit-details-marker { display: none; }
.pc-more > summary::before { content: "▸ "; }
.pc-more[open] > summary::before { content: "▾ "; }
.pc-more-body { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding-top: 8px; }
.pc-more-body select { min-height: 42px; font-size: 13px; padding: 6px 8px; }
.pc-more-body .btn-danger { grid-column: 1 / -1; }

/* mesas */
.reg-toggle { width: 100%; min-height: 54px; border-radius: 14px; border: 1px solid var(--good); background: rgba(59, 165, 92, 0.14); color: var(--lg-text); font-weight: 700; font-size: 15px; cursor: pointer; margin-bottom: 10px; }
.reg-toggle.reg-closed { border-color: var(--bad); background: rgba(230, 103, 103, 0.14); }
.tcard { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 12px; margin-bottom: 10px; }
.tc-row { display: flex; gap: 8px; align-items: center; }
.tc-row input { flex: 1; min-width: 0; }
.tc-row select { width: 120px; flex: none; }
.tc-seats { font-size: 13px; color: var(--text-2); line-height: 1.6; margin: 10px 0; word-break: break-word; }
.tc-foot { justify-content: space-between; }
.addtable { display: flex; gap: 10px; align-items: flex-end; margin-top: 4px; }
.addtable .field { flex: 1; }

/* estrutura de blinds */
.preset-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.lvl-list { display: flex; flex-direction: column; gap: 10px; margin: 12px 0; }
.lvl { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; }
.lvl.brk { border-style: dashed; }
.lvl-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.lvl-acts { display: flex; gap: 6px; }
.lvl-acts .btn { min-width: 40px; }
.lvl-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.lvl-f { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-3); min-width: 0; }
.lvl-f input { min-height: 42px; padding: 6px 10px; font-size: 16px; }
.cfg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 10px; }
@media (min-width: 760px) {
  .tabbar { max-width: 760px; left: 50%; transform: translateX(-50%); border-radius: 14px 14px 0 0; border: 1px solid var(--border); border-bottom: 0; }
}

/* =====================================================================================
   GUIA DAS MÃOS (guia.html): celular primeiro. Tópicos que abrem e fecham (details.acc),
   cartas desenhadas em CSS e textos curtos.
   ===================================================================================== */
.guide-top { display: flex; align-items: center; gap: 10px; margin: 4px 0 4px; }
.guide-title { font-size: 20px; }
.guide-lead { margin: 0 0 12px; font-size: 13px; }
.guide p { margin: 8px 0 0; font-size: 15px; }
.guide .guide-hint { font-size: 13px; color: var(--text-3); margin: 0 0 8px; }
.guide .acc-body > .guide-hint:last-child { margin: 10px 0 0; }
.guide-list { margin: 10px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 15px; }

.hand { display: flex; gap: 3px; flex-wrap: nowrap; }
.hand-center { justify-content: center; margin-top: 8px; }
.pk {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 34px; height: 46px; border-radius: 6px; background: #fbfaf6; color: #1a1a19;
  border: 1px solid rgba(0, 0, 0, 0.25); box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
  font-weight: 800; font-size: 15px; line-height: 1; font-variant-numeric: tabular-nums; flex: none;
}
.pk i { font-style: normal; font-size: 16px; margin-top: 2px; }
.pk.r { color: #c8292b; }
.pk.dim { opacity: 0.35; }

.formula { display: flex; align-items: center; justify-content: center; gap: 8px; flex-wrap: wrap; text-align: center; }
.formula-part { display: flex; flex-direction: column; align-items: center; gap: 4px; }
.formula-part small { color: var(--text-3); font-size: 12px; }
.formula-op { font-size: 22px; font-weight: 800; color: var(--text-3); }
.guide .formula-eq { text-align: center; margin: 12px 0 0; }
.guide .hand-name { text-align: center; font-weight: 700; color: var(--good); margin: 6px 0 0; }

/* ranking: nome e frase à esquerda, cartas pequenas à direita, uma linha por jogo */
.rank { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.rank-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; column-gap: 8px; align-items: center; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 8px 10px; }
.rank-head { display: flex; align-items: center; gap: 8px; font-size: 15px; min-width: 0; }
.rank-head b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-n { flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--lg-accent); color: #fff; font-weight: 800; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.rank-row .hand { grid-column: 2; grid-row: 1 / span 2; }
.guide .rank-row p { grid-column: 1; margin: 2px 0 0 30px; font-size: 12px; color: var(--text-3); line-height: 1.3; }
.rank .pk { width: 24px; height: 33px; font-size: 12px; border-radius: 4px; }
.rank .pk i { font-size: 12px; margin-top: 1px; }
details.more { margin-top: 10px; }
details.more > summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--lg-accent); }

.ex { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px; margin-bottom: 8px; display: flex; flex-direction: column; gap: 6px; }
.ex-line { display: flex; align-items: center; gap: 8px; }
.ex-k { width: 40px; flex: none; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); }
.ex-res { font-size: 13px; color: var(--text-2); white-space: nowrap; }
.ex-res.win { color: var(--good); font-weight: 700; }
.ex-ans > summary { cursor: pointer; font-size: 14px; color: var(--lg-accent); font-weight: 700; padding: 4px 0; }
.guide .ex-ans p { margin: 4px 0 0; font-size: 14px; }

/* linha do tempo de uma mão */
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0; counter-reset: st; }
.steps li { counter-increment: st; display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 15px; }
.steps li::before { content: counter(st); flex: none; width: 20px; height: 20px; border-radius: 50%; background: var(--lg-surface-2); border: 1px solid var(--border); font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center; color: var(--text-2); align-self: center; }
.steps li b { flex: none; width: 82px; }
.steps li span { color: var(--text-2); font-size: 13px; }
.acts { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.act { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 8px 10px; display: flex; flex-direction: column; font-size: 15px; }
.act span { font-size: 12px; color: var(--text-3); }
@media (max-width: 360px) { .pk { width: 30px; height: 41px; font-size: 13px; } .pk i { font-size: 14px; } .rank .pk { width: 21px; height: 30px; font-size: 11px; } }
body.tv #btn-guide { display: none; }

/* caixa do admin */
.cx-card .pc-row { margin-bottom: 6px; }
.cx-due { font-weight: 700; color: var(--lg-warn); white-space: nowrap; font-size: 14px; }
.cx-due.ok { color: var(--good); }
.cx-entry { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 6px 0; border-top: 1px solid var(--border); font-size: 14px; }
.cx-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--text-2); }
.cx-pay { width: 128px; flex: none; min-height: 38px; padding: 4px 8px; font-size: 13px; }
.cx-pay.paid { border-color: var(--good); color: var(--good); font-weight: 700; }
.cx-bal { white-space: nowrap; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--text-2); }
.cx-bal.pos { color: var(--good); font-weight: 700; }
.cx-bal.neg { color: var(--bad); }
.cx-text { white-space: pre-wrap; font-size: 13px; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; margin: 10px 0 0; font-family: inherit; color: var(--text-2); }
.tabbar button { min-width: 0; }

/* rebuy e add-on: oferta no celular do jogador e painel de todos (inclusive TV) */
.offer { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.offer-row { background: rgba(62, 207, 142, 0.12); border: 1px solid var(--lg-accent); border-radius: 12px; padding: 10px 12px; display: flex; flex-direction: column; gap: 8px; }
.offer-row p { margin: 0; font-size: 15px; }
.offer-row.pending { background: rgba(79, 134, 247, 0.12); border-color: var(--lg-warn); }
.offer-row .btn-primary { min-height: 50px; font-size: 16px; }
.rb-status { font-size: 20px; font-weight: 800; font-variant-numeric: tabular-nums; }
.rb-sub { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.rb-reqs { margin-top: 10px; }
.rb-reqs:empty { display: none; }
#rb-card.rb-addon { border-color: var(--good); background: rgba(59, 165, 92, 0.12); }
#rb-card.rb-addon .rb-status { color: var(--good); }
body.tv .rb-status { font-size: clamp(16px, calc(3.2 * var(--vh)), 40px); }
body.tv .rb-sub { font-size: clamp(11px, calc(1.8 * var(--vh)), 20px); }
body.tv .rb-reqs li { font-size: clamp(12px, calc(2 * var(--vh)), 22px); }

/* pedidos de rebuy/add-on no topo do painel do admin */
.apbar-reqs { margin-top: 8px; background: rgba(79, 134, 247, 0.12); border: 1px solid var(--lg-warn); border-radius: 12px; padding: 8px 10px; max-height: 40vh; overflow-y: auto; }
.apbar-reqs-title { font-weight: 800; font-size: 14px; margin-bottom: 4px; }
.req-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--border); }
.req-row:first-child { border-top: 0; }
.req-info { display: flex; flex-direction: column; min-width: 0; font-size: 14px; }
.req-info b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.req-info span { font-size: 12px; color: var(--text-2); }
.req-pay { grid-column: 1; min-height: 38px; padding: 4px 8px; font-size: 13px; }
.req-btns { grid-column: 2; grid-row: 1 / span 2; display: flex; flex-direction: column; gap: 6px; }
.req-btns .btn { min-width: 86px; }

/* aviso do topo: fundo sempre escuro, então o texto é sempre claro (no tema claro ficava escuro sobre escuro) */
.banner-alert { color: #fff; display: flex; flex-direction: column; gap: 3px; padding: 12px 16px; }
.banner-alert .alert-title { font-size: 17px; font-weight: 800; line-height: 1.25; }
.banner-alert .alert-detail { font-size: 14px; font-weight: 500; line-height: 1.35; color: rgba(255, 255, 255, 0.88); }
.banner-alert.alert-money { background: #143d25; border-color: var(--good); }
.banner-alert.alert-warn { background: #4a3608; border-color: var(--lg-warn); }
body.tv #alert-banner .alert-title { font-size: clamp(16px, calc(3 * var(--vh)), 36px); }
body.tv #alert-banner .alert-detail { font-size: clamp(12px, calc(2 * var(--vh)), 24px); }

/* =====================================================================================
   MODO TV "gameficado": feltro, cartões de vidro, relógio com barra que muda de cor,
   prêmio que conta, classificação animada, letreiro e eventos em tela cheia (tv-fx.mjs).
   ===================================================================================== */
.tv-only, .ticker { display: none; }
body.tv .tv-only { display: inline-flex; align-items: center; }

/* feltro (o texto da TV é sempre claro, nos dois temas do aparelho) */
body.tv {
  --lg-text: #ffffff; --text-2: #dbe7df; --text-3: #a3bcad;
  --lg-surface-1: rgba(0, 0, 0, 0.34); --lg-surface-2: rgba(255, 255, 255, 0.07); --border: rgba(255, 255, 255, 0.14);
  --felt-1: #2a7a4b; --felt-2: #17583a; --felt-3: #0a2b1c; --glow: rgba(79, 134, 247, 0.55);
  background: radial-gradient(ellipse at 50% 38%, var(--felt-1) 0%, var(--felt-2) 46%, var(--felt-3) 100%) fixed;
  color: var(--lg-text);
}
body.tv[data-felt="azul"] { --felt-1: #2d629c; --felt-2: #18416d; --felt-3: #0a1b33; }
body.tv[data-felt="preto"] { --felt-1: #3a3833; --felt-2: #1f1e1b; --felt-3: #0a0a09; }
/* naipes gigantes bem apagados no fundo */
body.tv::before { content: "♠"; position: fixed; right: -4vh; bottom: -14vh; font-size: 70vh; line-height: 1; color: rgba(255, 255, 255, 0.035); pointer-events: none; z-index: 0; }
body.tv::after { content: "♥"; position: fixed; left: -6vh; top: -16vh; font-size: 52vh; line-height: 1; color: rgba(255, 255, 255, 0.03); pointer-events: none; z-index: 0; }
body.tv .wrap { position: relative; z-index: 1; }
body.tv .card { background: var(--lg-surface-1); border-color: var(--border); box-shadow: 0 8px 28px rgba(0, 0, 0, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.06); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
body.tv .info { background: rgba(255, 255, 255, 0.06); }

/* relógio: dígitos com brilho, barra grossa que vai de verde a vermelho, pulso nos 10 s finais */
body.tv .countdown { text-shadow: 0 0 24px rgba(255, 255, 255, 0.18), 0 4px 0 rgba(0, 0, 0, 0.35); }
body.tv .countdown.low { color: var(--lg-warn); text-shadow: 0 0 28px rgba(79, 134, 247, 0.45); }
.countdown.final { color: var(--bad); animation: tick-pulse 1s ease-in-out infinite; }
@keyframes tick-pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.progress > i.p-ok { background: var(--good); }
.progress > i.p-mid { background: var(--lg-warn); }
.progress > i.p-end { background: var(--bad); }
.progress > i.p-break { background: var(--lg-accent); }
body.tv .progress { background: rgba(0, 0, 0, 0.35); height: clamp(6px, 3.6cqh, 18px); box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.5); }
body.tv .progress > i { box-shadow: 0 0 12px currentColor; transition: width 0.4s linear, background 0.6s; }

/* blinds como uma placa dourada */
body.tv .blinds { border-color: rgba(79, 134, 247, 0.55); background: linear-gradient(180deg, rgba(79, 134, 247, 0.14), rgba(0, 0, 0, 0.3)); }
body.tv .blinds h2 { color: var(--accent-soft); }
body.tv .blinds-main { color: var(--text); text-shadow: 0 0 18px var(--glow); }

/* prêmio em destaque e "pulinho" quando sobe */
body.tv #stake-v { color: var(--accent-soft); }
.fx-bump { animation: bump 0.5s ease-out 3; }
@keyframes bump { 50% { transform: scale(1.12); } }

/* classificação: líder dourado, setas de quem subiu/desceu */
body.tv .stand-row { transition: background 0.4s; will-change: transform; }
body.tv .stand-row.leader { border-color: rgba(79, 134, 247, 0.7); background: linear-gradient(90deg, rgba(79, 134, 247, 0.22), rgba(0, 0, 0, 0.2)); }
body.tv .stand-row.leader .bar u { background: linear-gradient(90deg, var(--accent-soft), var(--accent-soft)); }
.stand-row .rk.up { color: var(--good); }
.stand-row .rk.down { color: var(--bad); }
.stand-row .rk { white-space: nowrap; }

/* letreiro do rodapé */
body.tv .ticker { display: block; order: 100; flex: 0 0 auto; overflow: hidden; white-space: nowrap; border-top: 1px solid rgba(79, 134, 247, 0.45); background: rgba(0, 0, 0, 0.45); margin: 0 -12px -8px; padding: 6px 0; font-size: clamp(13px, calc(2.4 * var(--vh)), 28px); font-weight: 600; color: var(--accent-soft); }
.ticker-track { display: inline-block; padding-left: 100%; animation: ticker 60s linear infinite; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-100%); } }

/* eventos em tela cheia */
.tvfx { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 4vh 4vw; background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.82)); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); animation: fx-fade 0.3s ease-out; }
.tvfx.tvfx-leaving { animation: fx-fade-out 0.45s ease-in forwards; }
.tvfx-box { text-align: center; color: #fff; max-width: 92vw; animation: fx-pop 0.6s cubic-bezier(.2, 1.4, .4, 1); }
.tvfx-icon { font-size: clamp(48px, 16vh, 180px); line-height: 1.1; filter: drop-shadow(0 6px 18px rgba(0, 0, 0, 0.5)); }
.tvfx-title { font-size: clamp(34px, 11vh, 150px); font-weight: 900; line-height: 1.05; letter-spacing: 0.01em; text-shadow: 0 0 30px var(--fx, rgba(255, 255, 255, 0.35)), 0 6px 0 rgba(0, 0, 0, 0.4); overflow-wrap: anywhere; }
.tvfx-sub { margin-top: 1.6vh; font-size: clamp(16px, 4vh, 48px); font-weight: 600; color: rgba(255, 255, 255, 0.86); }
.tvfx-blinds, .tvfx-break { --fx: rgba(79, 134, 247, 0.8); }
.tvfx-blinds .tvfx-title { color: var(--text); animation: fx-flip 0.8s cubic-bezier(.2, .9, .3, 1.2); }
.tvfx-leaving .tvfx-box { animation: none; }
.tvfx-ko { --fx: rgba(230, 103, 103, 0.9); }
.tvfx-ko .tvfx-title { color: #ffd6d6; }
.tvfx-rebuy { --fx: rgba(59, 165, 92, 0.9); }
.tvfx-rebuy .tvfx-title { color: #c9f2d6; }
.tvfx-bubble { --fx: rgba(110, 200, 255, 0.9); }
.tvfx-bubble .tvfx-icon { animation: fx-bob 1.6s ease-in-out infinite; }
.tvfx-money, .tvfx-champion { --fx: rgba(79, 134, 247, 0.95); }
.tvfx-money .tvfx-title, .tvfx-champion .tvfx-title { color: var(--accent-soft); }
.tvfx-champion .tvfx-icon { animation: fx-bob 2s ease-in-out infinite; }
.tvfx-final { --fx: rgba(176, 122, 217, 0.95); }
.tvfx-final .tvfx-title { letter-spacing: 0.08em; color: #e6d2f7; }
.tvfx-confetti { position: fixed; inset: 0; z-index: 80; pointer-events: none; }
@keyframes fx-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes fx-fade-out { to { opacity: 0; } }
@keyframes fx-pop { 0% { transform: scale(0.6); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
@keyframes fx-flip { 0% { transform: perspective(800px) rotateX(-90deg); opacity: 0; } 100% { transform: perspective(800px) rotateX(0); opacity: 1; } }
@keyframes fx-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-3vh); } }

/* quem pediu menos movimento no aparelho: sem animação */
@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; padding-left: 0; }
  .countdown.final, .fx-bump, .tvfx, .tvfx-box, .tvfx-title, .tvfx-icon { animation: none !important; }
}

/* =====================================================================================
   PÓDIO com bonequinhos (podium.mjs): 2º · 1º · 3º, degraus ouro/prata/bronze
   ===================================================================================== */
.podium-card { overflow: hidden; }
.podium { display: grid; grid-template-columns: 1fr 1.15fr 1fr; align-items: end; gap: 6px; padding-top: 14px; }
.pod-col { display: flex; flex-direction: column; align-items: center; min-width: 0; text-align: center; }
.pod-fig { width: 62%; max-width: 92px; margin-bottom: 2px; }
.pod-1 .pod-fig { width: 72%; max-width: 112px; animation: pod-bounce 1.8s ease-in-out infinite; transform-origin: bottom center; }
.avatar { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.35)); }
.pod-name { font-weight: 800; font-size: 15px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pod-info { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pod-badges { display: flex; gap: 4px; margin-top: 2px; }
.pod-badge { font-size: 11px; padding: 1px 6px; border-radius: 999px; background: var(--lg-surface-2); border: 1px solid var(--border); }
.pod-step { width: 100%; margin-top: 6px; border-radius: 10px 10px 0 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; padding-top: 6px; color: rgba(0, 0, 0, 0.72); box-shadow: inset 0 2px 0 rgba(255, 255, 255, 0.45), 0 6px 14px rgba(0, 0, 0, 0.25); }
.pod-n { font-size: 22px; font-weight: 900; line-height: 1; }
.pod-prize { font-size: 11px; font-weight: 700; margin-top: 3px; }
.pod-1 .pod-step { height: 84px; background: linear-gradient(180deg, #ffe18a, #f2b52a 60%, #c98a0a); }
.pod-2 .pod-step { height: 60px; background: linear-gradient(180deg, #f1f3f5, #c4c9cf 60%, #8f969e); }
.pod-3 .pod-step { height: 44px; background: linear-gradient(180deg, #f2c49b, #cd8a4f 60%, #9a5b2a); }
.pod-col.mine .pod-name { color: var(--lg-accent); }
.pod-new .pod-fig { animation: pod-jump 0.9s cubic-bezier(.2, 1.6, .4, 1), pod-bounce 1.8s ease-in-out 0.9s infinite; }
.podium-foot { margin-top: 10px; font-size: 13px; color: var(--text-2); text-align: center; }
.podium-foot:empty { display: none; }
@keyframes pod-bounce { 0%, 100% { transform: translateY(0) rotate(0); } 25% { transform: translateY(-4px) rotate(-2deg); } 75% { transform: translateY(-4px) rotate(2deg); } }
@keyframes pod-jump { 0% { transform: translateY(-60px) scale(0.6); opacity: 0; } 100% { transform: translateY(0) scale(1); opacity: 1; } }

/* na TV o pódio cresce com a tela */
body.tv .podium-card { flex: 0 0 auto; background: radial-gradient(ellipse at 50% 100%, rgba(79, 134, 247, 0.18), transparent 70%), var(--lg-surface-1); }
body.tv .podium { gap: 1vw; padding-top: 2vh; }
body.tv .pod-fig { max-width: 15vh; }
body.tv .pod-1 .pod-fig { max-width: 19vh; }
body.tv .pod-name { font-size: clamp(14px, calc(2.6 * var(--vh)), 32px); }
body.tv .pod-info { font-size: clamp(11px, calc(1.8 * var(--vh)), 22px); }
body.tv .pod-badge { font-size: clamp(10px, calc(1.6 * var(--vh)), 18px); }
body.tv .pod-n { font-size: clamp(18px, calc(4 * var(--vh)), 48px); }
body.tv .pod-prize { font-size: clamp(10px, calc(1.6 * var(--vh)), 20px); }
body.tv .pod-1 .pod-step { height: 12vh; }
body.tv .pod-2 .pod-step { height: 8.5vh; }
body.tv .pod-3 .pod-step { height: 6vh; }
body.tv .podium-foot { font-size: clamp(12px, calc(1.9 * var(--vh)), 22px); color: var(--accent-soft); }
@media (prefers-reduced-motion: reduce) { .pod-1 .pod-fig, .pod-new .pod-fig { animation: none !important; } }
.pod-info { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pod-bb { font-size: 11px; color: var(--text-3); }
body.tv .pod-bb { font-size: clamp(10px, calc(1.5 * var(--vh)), 18px); }
/* TV: botões do canto só com ícone, e o cabeçalho reserva espaço pra eles */
body.tv .toolbar .btn { min-width: 34px; justify-content: center; }
body.tv .room-head { padding-right: 140px; }

/* =====================================================================================
   PÓDIO estilo palco de cassino: estatuetas de metal, degraus pretos laqueados com borda
   de metal, naipe gravado e holofote no 1º (substitui o visual "desenho" de antes)
   ===================================================================================== */
.pod-1 .pod-fig, .pod-new .pod-fig { animation: none; }
.pod-col { position: relative; }
.pod-1::before { content: ""; position: absolute; left: 50%; top: -14px; width: 150%; height: 115%; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 0%, rgba(255, 236, 170, 0.28), rgba(255, 236, 170, 0.08) 45%, transparent 70%); pointer-events: none; z-index: 0; }
.pod-col > * { position: relative; z-index: 1; }
.avatar { filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.55)); }
.pod-name { font-weight: 700; letter-spacing: 0.01em; }
.pod-1 .pod-name { color: var(--accent-soft); }
.pod-step { position: relative; overflow: hidden; color: inherit; background: linear-gradient(180deg, #2a2b2f 0%, #121316 70%, #0b0c0e 100%) !important; border-top: 3px solid var(--metal, #c9ced4); box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12), 0 10px 22px rgba(0, 0, 0, 0.45); border-radius: 6px 6px 0 0; }
.pod-1 .pod-step { --metal: #f2c14e; }
.pod-2 .pod-step { --metal: #c9ced4; }
.pod-3 .pod-step { --metal: #c98a55; }
.pod-n { font-family: var(--mm-display); font-weight: 700; background: linear-gradient(180deg, #fff, var(--metal)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.pod-suit { position: absolute; right: 6%; bottom: -10%; font-size: 260%; line-height: 1; color: rgba(255, 255, 255, 0.05); pointer-events: none; }
.pod-2 .pod-suit, .pod-3 .pod-suit { color: rgba(230, 103, 103, 0.08); }
.pod-prize { color: rgba(255, 255, 255, 0.82); font-weight: 600; letter-spacing: 0.02em; }
.pod-badge { text-transform: uppercase; letter-spacing: 0.06em; font-size: 9px; font-weight: 700; color: var(--accent-soft); background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(246, 210, 122, 0.45); border-radius: 4px; padding: 1px 5px; }
body.tv .pod-badge { font-size: clamp(9px, calc(1.3 * var(--vh)), 15px); }
.pod-new .pod-fig { animation: pod-rise 0.9s cubic-bezier(.2, .9, .3, 1); }
@keyframes pod-rise { 0% { transform: translateY(16px); opacity: 0; filter: brightness(2); } 100% { transform: translateY(0); opacity: 1; filter: none; } }

/* =====================================================================================
   PREMIAÇÃO (dinheiro): total, de onde vem, divisão, quanto já foi pago e QR do Pix.
   TV larga: terceira coluna. Celular e TV em pé: depois das outras.
   ===================================================================================== */
.tv-money { display: flex; flex-direction: column; }
.mn-total { font-size: 34px; font-weight: 900; line-height: 1.1; color: var(--accent-soft); font-variant-numeric: tabular-nums; }
.mn-calc { margin-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.mn-row { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; }
.mn-row b { color: var(--lg-text); font-weight: 600; white-space: nowrap; }
.mn-row.mn-fee b { color: var(--bad); }
.mn-split { margin-top: 12px; display: flex; flex-direction: column; gap: 4px; }
.mn-place { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 8px; padding: 6px 10px; border-radius: 8px; background: var(--lg-surface-2); border: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.mn-place b { font-size: 16px; }
.mn-pl { font-weight: 800; color: var(--text-2); }
.mn-p1 { border-color: rgba(79, 134, 247, 0.6); } .mn-p1 .mn-pl { color: var(--accent-soft); }
.mn-p2 .mn-pl { color: #c9ced4; }
.mn-p3 .mn-pl { color: #c98a55; }
.mn-pct { font-size: 12px; color: var(--text-3); }
.mn-hint { font-size: 13px; color: var(--text-3); }
.mn-paid { margin-top: 12px; }
.mn-paid-head { display: flex; justify-content: space-between; font-size: 14px; }
.mn-bar { height: 10px; border-radius: 999px; background: var(--lg-surface-2); border: 1px solid var(--border); overflow: hidden; margin: 6px 0 4px; }
.mn-bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--good), #6fd08f); transition: width 0.8s ease; }
.mn-paid-sub { font-size: 12px; color: var(--text-2); }
.mn-pix { margin-top: 14px; display: flex; gap: 12px; align-items: center; padding-top: 12px; border-top: 1px solid var(--border); }
.mn-pix img { width: 132px; height: 132px; flex: none; background: #fff; padding: 6px; border-radius: 10px; image-rendering: pixelated; }
.mn-pix-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; color: var(--text-2); }
.mn-pix-info b { font-size: 16px; color: var(--lg-text); }
.mn-pix-key { word-break: break-all; font-size: 12px; color: var(--text-3); }

/* TV: o card de dinheiro cresce com a tela; o botão de copiar some (ninguém copia da TV) */
body.tv #btn-pix-copy { display: none; }
body.tv #t-prizes { display: none; }
body.tv .money-card { background: radial-gradient(ellipse at 50% 0%, rgba(79, 134, 247, 0.14), transparent 65%), var(--lg-surface-1); }
body.tv .mn-total { font-size: clamp(26px, calc(6.5 * var(--vh)), 84px); text-shadow: 0 0 22px rgba(79, 134, 247, 0.35); }
body.tv .mn-row, body.tv .mn-paid-sub, body.tv .mn-pix-info { font-size: clamp(11px, calc(1.8 * var(--vh)), 22px); }
body.tv .mn-place { padding: 0.6vh 10px; }
body.tv .mn-place b { font-size: clamp(14px, calc(2.6 * var(--vh)), 32px); }
body.tv .mn-paid-head { font-size: clamp(12px, calc(2 * var(--vh)), 24px); }
body.tv .mn-bar { height: clamp(8px, 1.4vh, 16px); }
body.tv .mn-pix img { width: clamp(110px, 22vh, 260px); height: clamp(110px, 22vh, 260px); }
body.tv .mn-pix-info b { font-size: clamp(14px, calc(2.6 * var(--vh)), 32px); }

/* layout da TV com 3 colunas: o meio (pódio, torneio, jogadores) rola; a de dinheiro também */
body.tv .tv-grid > div:nth-child(2) { flex: 1 1 0; min-height: 0; overflow-y: auto; overflow-x: hidden; }
body.tv .tv-grid > div.tv-money { flex: 0 1 auto; max-height: 38%; min-height: 0; overflow-y: auto; overflow-x: hidden; gap: 8px; }
@media (min-aspect-ratio: 5/4) {
  body.tv .tv-grid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) minmax(0, 0.85fr); }
  body.tv .tv-grid > div.tv-money { max-height: none; overflow-y: auto; }
}
/* TV: colunas rolam sozinhas (tv-autoscroll em room.mjs), então a barra de rolagem só atrapalha */
body.tv .tv-grid > div:not(:first-child) { scrollbar-width: none; }
body.tv .tv-grid > div:not(:first-child)::-webkit-scrollbar { display: none; }
/* TV em pé (mais alta que larga): relógio, blinds e infos em cima, ocupando a largura toda;
   embaixo, pódio/classificação e dinheiro/jogadores LADO A LADO (antes a coluna do pódio ficava
   espremida com altura zero entre as outras e sumia) */
@media (max-aspect-ratio: 1249/1000) {
  body.tv .tv-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); gap: 8px; }
  body.tv .tv-grid > div:first-child { grid-column: 1 / -1; }
  body.tv .tv-grid > div:nth-child(2), body.tv .tv-grid > div.tv-money { min-height: 0; max-height: none; overflow-y: auto; }
}

/* =====================================================================================
   LOGIN (auth-ui.mjs): Google em destaque, abas Entrar / Criar conta
   ===================================================================================== */
.auth { max-width: 380px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.auth-logo { width: 64px; height: 64px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: transparent; }
.auth-logo-img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 0 10px rgba(79, 134, 247, 0.45)); }
.auth-title { font-size: 22px; font-weight: 800; }
.auth-sub { margin: 4px 0 0; font-size: 14px; color: var(--text-2); }
.auth-google { display: flex; align-items: center; justify-content: center; gap: 10px; width: 100%; min-height: 50px; background: #fff; color: #1f1f1f; border-color: #dadce0; font-size: 15px; }
.auth-google:hover { filter: none; background: #f5f6f7; }
.auth-or { display: flex; align-items: center; gap: 10px; color: var(--text-3); font-size: 12px; text-transform: uppercase; letter-spacing: 0.06em; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.auth-tabs { margin: 0; }
.auth-form { display: flex; flex-direction: column; gap: 10px; }
.auth-form .field { flex: none; }
.pass-wrap { position: relative; display: block; }
.pass-wrap input { padding-right: 84px; }
.pass-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); border: 0; background: var(--lg-surface-1); color: var(--text-2); font-size: 12px; font-weight: 700; padding: 6px 10px; border-radius: 8px; cursor: pointer; }
.auth-submit { min-height: 50px; font-size: 16px; margin-top: 2px; }
.auth-link { background: none; border: 0; color: var(--lg-accent); font-size: 14px; cursor: pointer; padding: 6px; align-self: center; }
.auth-form .msg { text-align: center; }

/* sala: quem está conectado, Pix pra receber e aviso de prêmio */
.join-who { margin: 0 0 10px; }
.auth-link.inline { padding: 0; font-size: inherit; }
.me-pix { margin-top: 10px; font-size: 14px; color: var(--text-2); }
.me-pix > summary { cursor: pointer; }
.me-pix b { color: var(--lg-text); word-break: break-all; }
.prize-me { margin-top: 10px; padding: 10px 12px; border-radius: 12px; border: 1px solid var(--accent-soft); background: rgba(79, 134, 247, 0.14); font-weight: 700; }

/* fechamento: Pix de cada premiado */
.cx-pix { display: flex; gap: 10px; align-items: center; padding: 8px 0 12px; border-bottom: 1px solid var(--border); }
.cx-pix-qr { width: 104px; height: 104px; flex: none; background: #fff; padding: 4px; border-radius: 8px; image-rendering: pixelated; }
.cx-pix-info { display: flex; flex-direction: column; gap: 4px; min-width: 0; font-size: 13px; }
.cx-pix-key { color: var(--text-2); word-break: break-all; }
.cx-pix-none { font-size: 13px; color: var(--lg-warn); }
/* o título do login não herda o estilo de cabeçalho pequeno dos cards */
.card .auth .auth-title { font-size: 22px; font-weight: 800; text-transform: none; letter-spacing: 0; color: var(--lg-text); margin: 0; }

/* =====================================================================================
   PÁGINA INICIAL (index.html): apresentação + código da sala + login
   ===================================================================================== */
.lp-body { background: radial-gradient(ellipse at 20% 0%, rgba(42, 122, 75, 0.22), transparent 55%), var(--page); min-height: 100vh; }
.lp { max-width: 1040px; margin: 0 auto; padding: 28px 16px 40px; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 32px; align-items: start; }
.lp-brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 18px; }
.lp-logo { width: 40px; height: 40px; margin: 0; font-size: 22px; border-radius: 11px; }
.lp-title { font-size: clamp(28px, 4.2vw, 44px); line-height: 1.12; font-weight: 900; margin: 22px 0 12px; letter-spacing: -0.01em; }
.lp-lead { font-size: 17px; color: var(--text-2); margin: 0 0 22px; max-width: 520px; }
.lp-feats { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.lp-feats li { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; }
.lp-feats b { font-size: 15px; }
.lp-feats span { font-size: 13px; color: var(--text-2); line-height: 1.4; }
.lp-guide { display: inline-block; margin-top: 18px; color: var(--lg-accent); font-weight: 600; text-decoration: none; }
.lp-guide:hover { text-decoration: underline; }
.lp-side { display: flex; flex-direction: column; gap: 0; }
.lp-code h2 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--lg-text); }
.lp-code input { text-transform: uppercase; letter-spacing: 0.12em; font-weight: 700; }
.lp-me-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.lp-avatar { width: 46px; height: 46px; margin: 0; font-size: 20px; font-weight: 800; }
.lp-hello { font-size: 18px; font-weight: 800; }
.lp-cta { text-decoration: none; text-align: center; display: block; margin-bottom: 8px; }
#lp-me .muted { margin: 0 0 10px; }
@media (max-width: 820px) {
  .lp { grid-template-columns: 1fr; gap: 18px; padding-top: 18px; }
  .lp-hero { display: contents; }
  .lp-brand { order: 0; }
  .lp-title { order: 1; margin: 6px 0 0; }
  .lp-lead { order: 2; margin: 0; }
  .lp-side { order: 3; }
  .lp-feats { order: 4; }
  .lp-guide { order: 5; margin: 0; }
}
@media (max-width: 420px) { .lp-feats { grid-template-columns: 1fr; } }
/* botão de som na barra do relógio do painel */
.apbar-sound { min-width: 46px; min-height: 46px; padding: 0 10px; font-size: 18px; }
.apbar-sound.on { border-color: var(--good); background: rgba(59, 165, 92, 0.16); }

/* =====================================================================================
   VISUAL SÓBRIO (substitui o anterior): página inicial escura de cassino, dourado só nos
   detalhes, título serifado, sem emoji; login com abas sublinhadas e botão dourado.
   ===================================================================================== */
:root { --gold: var(--accent-soft); --gold-ink: var(--accent-soft); }
:root[data-theme="light"] { --gold-ink: #8a6a2a; }
@media (prefers-color-scheme: light) { :root:not([data-theme="dark"]) { --gold-ink: #8a6a2a; } }

.auth-logo { width: 64px; height: 64px; margin: 0 auto 10px; display: flex; align-items: center; justify-content: center; background: transparent; }
.card .auth .auth-title, .auth-title { font-family: var(--mm-display); font-size: 25px; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--lg-text); }
.auth-sub { color: var(--text-3); }
.auth-google { border-radius: 10px; font-weight: 600; }
.auth-tabs.seg { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: 0; padding: 0; gap: 0; }
.auth-tabs.seg button { background: transparent; color: var(--text-3); border-radius: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; min-height: 40px; font-weight: 600; }
.auth-tabs.seg button.on { background: transparent; color: var(--lg-text); border-bottom-color: var(--gold); }
.auth-submit, .btn.auth-submit, .btn-primary.auth-submit { background: var(--gold); border-color: var(--gold); color: #17140e; font-weight: 700; letter-spacing: 0.01em; }
.auth-submit:hover { filter: brightness(1.06); }
.auth-link { color: var(--gold-ink); }
.pass-eye { background: transparent; color: var(--text-3); }

/* ---- página inicial: sempre escura ---- */
.lp-body {
  --page: #0b0d0c; --lg-surface-1: rgba(255, 255, 255, 0.035); --lg-surface-2: rgba(255, 255, 255, 0.06); --border: rgba(255, 255, 255, 0.09);
  --lg-text: #f3efe6; --text-2: #b9b3a6; --text-3: #847e72; --gold-ink: var(--accent-soft);
  color: var(--lg-text); background: radial-gradient(ellipse 70% 55% at 15% 0%, rgba(30, 86, 56, 0.35), transparent 70%), radial-gradient(ellipse 50% 40% at 100% 100%, rgba(79, 134, 247, 0.06), transparent 70%), #0b0d0c;
}
.lp-body input[type="text"], .lp-body input[type="password"] { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); color: var(--lg-text); }
.lp-body input::placeholder { color: #6f6a60; }
.lp { padding-top: 48px; gap: 56px; align-items: center; min-height: 100vh; }
.lp-brand { gap: 10px; font-size: 13px; font-weight: 700; letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold); }
.lp-spade { font-size: 18px; letter-spacing: 0; }
.lp-title { font-family: var(--mm-display); font-weight: 500; font-size: clamp(34px, 5vw, 58px); line-height: 1.06; letter-spacing: -0.01em; margin: 26px 0 16px; }
.lp-title em { font-style: italic; color: var(--gold); }
.lp-lead { font-size: 17px; line-height: 1.55; color: var(--text-2); max-width: 500px; margin: 0 0 30px; }
.lp-feats { display: flex; flex-direction: column; gap: 0; max-width: 500px; }
.lp-feats li { background: transparent; border: 0; border-top: 1px solid var(--border); border-radius: 0; padding: 14px 0; flex-direction: row; gap: 16px; align-items: flex-start; }
.lp-feats li:last-child { border-bottom: 1px solid var(--border); }
.lp-feats li > div { display: flex; flex-direction: column; gap: 3px; }
.lp-feats b { font-size: 15px; font-weight: 600; color: var(--lg-text); }
.lp-feats span { font-size: 14px; color: var(--text-2); }
.lp-suit { font-size: 18px; line-height: 1.3; width: 18px; flex: none; color: var(--gold) !important; }
.lp-suit.red { color: #b85c50 !important; }
.lp-guide { color: var(--gold); font-weight: 500; margin-top: 22px; font-size: 14px; }
.lp-side { gap: 16px; }
.lp-panel { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 16px; padding: 24px; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35); }
.lp-label { font-size: 11px; font-weight: 700; letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3); margin-bottom: 10px; }
.lp-code-row { display: flex; gap: 8px; }
.lp-code-row input { flex: 1; min-width: 0; text-transform: uppercase; letter-spacing: 0.3em; font-weight: 700; font-size: 18px; text-align: center; }
.lp-btn-ghost { background: transparent; border: 1px solid rgba(79, 134, 247, 0.55); color: var(--gold); font-weight: 700; }
.lp-btn-ghost:hover { filter: none; background: rgba(79, 134, 247, 0.08); }
.lp-note { font-size: 13px; color: var(--text-3); margin: 10px 0 0; }
.lp-avatar { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: flex; align-items: center; justify-content: center; font-family: var(--mm-display); font-size: 20px; flex: none; }
.lp-hello { font-family: var(--mm-display); font-size: 22px; }
.lp-cta { margin: 6px 0 10px; text-decoration: none; text-align: center; display: block; }
#lp-me .lp-note { margin: 0 0 12px; }
@media (max-width: 820px) {
  .lp { padding-top: 26px; gap: 22px; min-height: 0; }
  .lp-title { margin: 14px 0 0; }
  .lp-lead { margin: 0; }
}

/* =====================================================================================
   ÁREA DO ORGANIZADOR (/admin fora do painel): mesmo visual escuro da página inicial
   ===================================================================================== */
.adm-body .wrap { max-width: 1040px; padding-top: 22px; }
.adm-body select { background: rgba(255, 255, 255, 0.05); border-color: rgba(255, 255, 255, 0.12); color: var(--lg-text); }
.adm-body select option { background: #15171a; color: #f3efe6; }
.adm-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 28px; }
.adm-brand { text-decoration: none; }
.adm-user { font-size: 13px; color: var(--text-3); display: flex; align-items: center; gap: 10px; }
.adm-narrow { max-width: 440px; margin: 6vh auto 0; }
.adm-hero { margin-bottom: 22px; }
.adm-title { font-family: var(--mm-display); font-weight: 500; font-size: clamp(30px, 4vw, 44px); line-height: 1.1; margin: 4px 0 8px; }
.adm-title-sm { font-size: 28px; }
.adm-lead { color: var(--text-2); font-size: 16px; margin: 0; }
.adm-grid { display: grid; grid-template-columns: minmax(0, 360px) minmax(0, 1fr); gap: 20px; align-items: start; margin-bottom: 20px; }
.adm-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 10px; }
.adm-form .field { flex: none; color: var(--text-2); }
.adm-rooms-head { display: flex; justify-content: space-between; align-items: baseline; }
.adm-room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.adm-room { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 8px; transition: border-color 0.2s; }
.adm-room:hover { border-color: rgba(79, 134, 247, 0.45); }
.adm-room-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.adm-room-name { font-family: var(--mm-display); font-size: 20px; color: var(--lg-text); text-decoration: none; line-height: 1.2; min-width: 0; overflow-wrap: anywhere; }
.adm-room-name:hover { color: var(--gold); }
.adm-status { flex: none; font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; border: 1px solid var(--border); color: var(--text-3); }
.adm-status.on { color: #7fd39b; border-color: rgba(127, 211, 155, 0.45); }
.adm-status.paused { color: var(--gold); border-color: rgba(79, 134, 247, 0.45); }
.adm-status.done { color: #a39d91; }
.adm-room-meta { font-size: 13px; color: var(--text-3); letter-spacing: 0.02em; }
.adm-room-acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 4px; }
.adm-room-acts .btn { text-decoration: none; text-align: center; }
.adm-empty { border: 1px dashed var(--border); border-radius: 14px; padding: 28px 18px; text-align: center; color: var(--text-2); }
.adm-users { display: flex; flex-direction: column; }
.adm-user-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.adm-user-id { flex: 1 1 180px; }
.adm-plan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.adm-plan-info { font-size: 12px; color: var(--text-3); }
.adm-user-id { display: flex; flex-direction: column; min-width: 0; }
.adm-user-id span { font-size: 12px; color: var(--text-3); overflow: hidden; text-overflow: ellipsis; }
.adm-user-row select { width: auto; min-height: 38px; }
@media (max-width: 760px) { .adm-grid { grid-template-columns: 1fr; } .adm-top { margin-bottom: 18px; } }

/* ---- página inicial: prévia da TV e "como funciona" ---- */
.lp { min-height: 88vh; }
.lp-more { max-width: 1040px; margin: 0 auto; padding: 40px 16px 30px; }
.lp-center { text-align: center; }
.lp-h2 { font-family: var(--mm-display); font-weight: 500; font-size: clamp(24px, 3.2vw, 36px); text-align: center; line-height: 1.2; margin: 8px auto 28px; max-width: 700px; }
.mock { border: 1px solid rgba(79, 134, 247, 0.28); border-radius: 18px; padding: 14px; background: radial-gradient(ellipse at 50% 30%, #1d6a42 0%, #134a2e 50%, #0a2619 100%); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55), inset 0 0 0 6px #0c0d0d; color: #fff; }
.mock-bar { display: flex; justify-content: space-between; align-items: center; font-weight: 700; font-size: 14px; padding: 2px 4px 12px; }
.mock-chip { font-size: 11px; color: #7fd39b; border: 1px solid rgba(127, 211, 155, 0.5); border-radius: 999px; padding: 2px 10px; }
.mock-grid { display: grid; grid-template-columns: 1.1fr 1fr 0.9fr; gap: 10px; }
.mock-col { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.mock-card { background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 12px; padding: 12px 14px; min-width: 0; }
.mock-card small { display: block; font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255, 255, 255, 0.6); margin-bottom: 6px; }
.mock-clock { text-align: center; }
.mock-clock b { display: block; font-size: clamp(40px, 7vw, 76px); font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.mock-clock i { display: block; height: 7px; border-radius: 9px; background: rgba(0, 0, 0, 0.4); margin-top: 10px; overflow: hidden; }
.mock-clock u { display: block; height: 100%; width: 58%; background: #3ba55c; }
.mock-blinds { text-align: center; border-color: rgba(79, 134, 247, 0.5); background: linear-gradient(180deg, rgba(79, 134, 247, 0.16), rgba(0, 0, 0, 0.3)); }
.mock-blinds b { font-size: clamp(26px, 4vw, 42px); color: var(--text); font-weight: 800; }
.mock-blinds b span { color: rgba(255, 255, 255, 0.45); font-size: 0.5em; margin: 0 4px; }
.mock-blinds em { display: block; font-style: normal; font-size: 11px; color: rgba(255, 255, 255, 0.6); margin-top: 4px; }
.mock-steps { display: grid; grid-template-columns: 1fr 1.1fr 1fr; align-items: end; gap: 5px; }
.ms { display: flex; flex-direction: column; align-items: center; text-align: center; font-size: 12px; }
.ms b { font-size: 13px; }
.ms span { color: rgba(255, 255, 255, 0.6); font-size: 10px; }
.ms i { width: 100%; margin-top: 4px; font-style: normal; font-family: var(--mm-display); font-weight: 700; display: flex; justify-content: center; padding-top: 4px; border-radius: 5px 5px 0 0; background: linear-gradient(180deg, #2a2b2f, #0e0f11); border-top: 2px solid var(--m); color: var(--m); }
.ms1 { --m: var(--accent-soft); } .ms1 i { height: 46px; font-size: 18px; } .ms1 b { color: var(--accent-soft); }
.ms2 { --m: #c9ced4; } .ms2 i { height: 32px; font-size: 15px; }
.ms3 { --m: #c98a55; } .ms3 i { height: 24px; font-size: 14px; }
.mock-rows p { display: grid; grid-template-columns: 16px 46px 1fr auto; align-items: center; gap: 6px; margin: 4px 0; font-size: 12px; }
.mock-rows p span { color: rgba(255, 255, 255, 0.5); }
.mock-rows p em { height: 5px; border-radius: 5px; background: linear-gradient(90deg, #3ecf8e var(--w), transparent var(--w)); }
.mock-rows p:first-of-type em { background: linear-gradient(90deg, var(--accent-soft) var(--w), transparent var(--w)); }
.mock-rows p b { font-size: 11px; color: rgba(255, 255, 255, 0.8); font-weight: 600; }
.mock-prize > b { display: block; font-size: clamp(24px, 3.4vw, 36px); color: var(--accent-soft); font-weight: 900; margin-bottom: 6px; }
.mock-prize p { display: flex; gap: 8px; margin: 3px 0; font-size: 12px; }
.mock-prize p span { color: var(--accent-soft); width: 18px; }
.mock-paid { margin-top: 8px; font-size: 11px; color: rgba(255, 255, 255, 0.7); }
.mock-paid i { display: block; height: 6px; border-radius: 6px; background: rgba(255, 255, 255, 0.1); margin-top: 4px; overflow: hidden; }
.mock-paid u { display: block; height: 100%; width: 81%; background: #3ba55c; }
.mock-pix { display: flex; gap: 10px; align-items: center; font-size: 11px; }
.mock-pix b { display: block; font-size: 13px; }
.mock-pix span { color: rgba(255, 255, 255, 0.65); }
.mock-qr { width: 54px; height: 54px; flex: none; border-radius: 6px; background:
  conic-gradient(#111 25%, #fff 0 50%, #111 0 75%, #fff 0) 0 0 / 9px 9px; border: 4px solid #fff; }
.lp-steps { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.lp-steps li { border-top: 1px solid var(--border); padding-top: 16px; }
.lp-steps li > span { font-family: var(--mm-display); font-size: 28px; color: var(--gold); display: block; line-height: 1; margin-bottom: 8px; }
.lp-steps b { font-size: 17px; }
.lp-steps p { color: var(--text-2); font-size: 14px; line-height: 1.55; margin: 6px 0 0; }
.lp-foot { text-align: center; color: var(--text-3); font-size: 13px; margin-top: 52px; padding-top: 20px; border-top: 1px solid var(--border); }
.lp-foot .lp-spade { color: var(--gold); }
@media (max-width: 820px) {
  .lp { min-height: 0; }
  .mock-grid { grid-template-columns: 1fr 1fr; }
  .mock-col:last-child { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; }
  .lp-steps { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  .mock-grid { grid-template-columns: 1fr; }
  .mock-col:last-child { grid-template-columns: 1fr; }
  .mock-rows { display: none; }
}
.lp { min-height: min(88vh, 780px); }
/* botões do cartão de sala: mesma altura e alinhados */
.adm-room-acts .btn { min-height: 36px; padding: 6px 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; line-height: 1; }
.adm-room-acts .auth-submit { flex: 1 1 auto; }

/* =====================================================================================
   PALETA ÚNICA: grafite + dourado (TV, página inicial, área do organizador).
   Sem azul e sem verde; vermelho só pro urgente (últimos segundos). Feltro verde/azul
   continuam como opção no 🎨 da TV, mas o padrão é o grafite.
   ===================================================================================== */
:root { --gold-hi: var(--accent-soft); --gold-lo: #8f6f33; --ink: #17140e; }

/* ---- TV ---- */
body.tv {
  --lg-accent: var(--accent-soft); --good: var(--accent-soft); --lg-warn: #e0a63a;
  --felt-1: #26241f; --felt-2: #161512; --felt-3: #090908; --glow: rgba(79, 134, 247, 0.5);
}
body.tv[data-felt="preto"] { --felt-1: #26241f; --felt-2: #161512; --felt-3: #090908; }
body.tv[data-felt="verde"] { --felt-1: #2a7a4b; --felt-2: #17583a; --felt-3: #0a2b1c; }
body.tv[data-felt="azul"] { --felt-1: #2d629c; --felt-2: #18416d; --felt-3: #0a1b33; }
body.tv[data-felt="preto"], body.tv:not([data-felt]) {
  background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(79, 134, 247, 0.12), transparent 70%),
    radial-gradient(ellipse at 50% 38%, var(--felt-1) 0%, var(--felt-2) 46%, var(--felt-3) 100%) fixed;
}
body.tv .chip-running { background: rgba(79, 134, 247, 0.14); border-color: var(--gold); color: var(--gold-hi); }
body.tv .chip-break { background: rgba(255, 255, 255, 0.06); border-color: rgba(255, 255, 255, 0.35); color: #e8e3d8; }
body.tv .chip-paused { background: rgba(224, 166, 58, 0.14); }
body.tv .progress > i.p-ok, body.tv .progress > i.p-break { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
body.tv .progress > i.p-mid { background: #e0a63a; }
body.tv .stand-row .bar u { background: var(--text-soft); }
body.tv .stand-row.leader .bar u { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
body.tv .stand-row .rk.up { color: var(--gold-hi); }
body.tv .seat.mine, body.tv .plist li.mine, body.tv .stand-row.mine, body.tv .mvlist li.mine { border-color: var(--gold); background: rgba(79, 134, 247, 0.14); }
body.tv .mn-bar > i { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
body.tv #rb-card.rb-addon { border-color: var(--gold); background: rgba(79, 134, 247, 0.12); }
body.tv #rb-card.rb-addon .rb-status { color: var(--gold-hi); }
body.tv .champion { background: rgba(79, 134, 247, 0.14); border-color: var(--gold); color: var(--gold-hi); }
body.tv .banner { background: rgba(79, 134, 247, 0.12); border-color: rgba(79, 134, 247, 0.6); color: #f3efe6; }
body.tv .out-row.paid { border-color: rgba(79, 134, 247, 0.6); }
body.tv .ticker { color: var(--gold-hi); border-top-color: rgba(79, 134, 247, 0.4); }
/* avisos do topo e eventos em tela cheia, na mesma paleta */
body.tv .banner-alert, body.tv .banner-alert.alert-money { background: #1b1915; border-color: var(--gold); }
body.tv .banner-alert.alert-warn { background: #2a1d0b; border-color: #e0a63a; }
.tvfx-rebuy { --fx: rgba(79, 134, 247, 0.9); }
.tvfx-rebuy .tvfx-title { color: var(--gold-hi); }
.tvfx-bubble { --fx: rgba(230, 225, 214, 0.75); }
.tvfx-final { --fx: rgba(79, 134, 247, 0.95); }
.tvfx-final .tvfx-title { color: var(--gold-hi); }

/* ---- página inicial e área do organizador ---- */
.lp-body { background: radial-gradient(ellipse 70% 55% at 15% 0%, rgba(79, 134, 247, 0.10), transparent 70%), radial-gradient(ellipse 50% 40% at 100% 100%, rgba(79, 134, 247, 0.05), transparent 70%), #0b0b0a; }
.mock { background: radial-gradient(ellipse 60% 45% at 50% 0%, rgba(79, 134, 247, 0.14), transparent 70%), radial-gradient(ellipse at 50% 38%, #26241f 0%, #161512 50%, #090908 100%); }
.mock-chip { color: var(--gold-hi); border-color: rgba(79, 134, 247, 0.55); }
.mock-clock u, .mock-paid u { background: linear-gradient(90deg, var(--gold-lo), var(--gold-hi)); }
.mock-rows p em { background: linear-gradient(90deg, #8a857a var(--w), transparent var(--w)); }
.mock-rows p:first-of-type em { background: linear-gradient(90deg, var(--gold-hi) var(--w), transparent var(--w)); }
.adm-status.on { color: var(--gold-hi); border-color: rgba(79, 134, 247, 0.55); }
.adm-status.paused { color: #e0a63a; border-color: rgba(224, 166, 58, 0.5); }
/* ícones dos avisos em tela cheia: símbolos em dourado (sem emoji colorido) */
.tvfx-icon { font-family: var(--mm-display); font-variant-emoji: text; color: var(--gold-hi); line-height: 1; filter: none; text-shadow: 0 0 30px rgba(79, 134, 247, 0.45); }
.tvfx-ko .tvfx-icon { color: #e07a6e; text-shadow: 0 0 30px rgba(224, 122, 110, 0.4); }
.tvfx-ko .tvfx-title { color: #f3e6e2; }
.tvfx-blinds .tvfx-title { color: #f6e7c1; }
.ticker { font-variant-emoji: text; }
/* bloco "Rebuy e add-on" no cartão Sua vaga (sempre visível pro jogador) */
.offer { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.offer-title { font-size: 11px; font-weight: 700; letter-spacing: 0.16em; text-transform: uppercase; color: var(--text-3); }
.offer-info { margin: 0; font-size: 14px; color: var(--text-2); }
.offer-row { background: rgba(79, 134, 247, 0.10); border-color: var(--gold); }
.offer-row.pending { background: rgba(224, 166, 58, 0.10); border-color: #e0a63a; }
.offer-row .btn-primary { background: var(--gold); border-color: var(--gold); color: var(--ink); }
/* página inicial logado: atalho pra mesa atual */
.lp-myroom { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; margin-bottom: 12px; border-radius: 12px; border: 1px solid rgba(79, 134, 247, 0.45); background: rgba(79, 134, 247, 0.07); text-decoration: none; color: var(--lg-text); }
.lp-myroom:hover { background: rgba(79, 134, 247, 0.12); }
.lp-myroom b { font-family: var(--mm-display); font-size: 20px; font-weight: 500; }
/* aviso de rebuy/add-on no celular também na paleta (antes era verde) */
.banner-alert.alert-money { background: #1b1915; border-color: var(--gold); }

/* card de conversão pós-eliminação no celular do jogador */
.me-out-promo {
  margin-top: 14px;
  padding: 16px;
  border-radius: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  display: flex;
  flex-direction: column;
  gap: 8px;
  text-align: left;
}
.me-out-promo.hidden { display: none !important; }
.me-promo-badge {
  align-self: flex-start;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(79, 134, 247, 0.16);
  color: var(--accent);
}
.me-promo-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
}
.me-promo-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--text-dim);
}
.me-promo-btn {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  text-decoration: none;
}
.me-promo-tag {
  background: rgba(0, 0, 0, 0.25);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 800;
}
body.tv .me-out-promo { display: none !important; }

/* ---- Modo Liga & Ranking de Temporada ---- */
.adm-league {
  background: var(--surface-1, #161615);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius, 14px);
  padding: 16px;
}
.adm-league-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 16px;
}
.adm-league-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.adm-league-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  background: var(--lg-surface-2, #1f1f1d);
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  margin-bottom: 16px;
}
.adm-league-stage-add {
  display: flex;
  gap: 8px;
  flex: 1 1 240px;
}
.adm-league-table-wrap {
  overflow-x: auto;
  margin-top: 10px;
}
.adm-league-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.adm-league-table th,
.adm-league-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}
.adm-league-table th {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-3, #898781);
}
.adm-stage-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.adm-stage-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 14px;
  background: var(--lg-surface-2, #1f1f1d);
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
  border-radius: 10px;
}
.adm-stage-info {
  display: flex;
  gap: 8px;
  align-items: center;
}

/* Ranking na sala / TV */
.room-league-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 10px;
}
.room-league-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  background: var(--lg-surface-2, #1f1f1d);
  border-radius: 8px;
  font-size: 14px;
  border: 1px solid var(--border, rgba(255, 255, 255, 0.12));
}
.room-league-row.rank-1 {
  border-color: rgba(79, 134, 247, 0.45);
  background: rgba(79, 134, 247, 0.08);
}
.rl-col-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.rl-rank {
  font-weight: 800;
  min-width: 24px;
  text-align: center;
}
.rl-name {
  font-weight: 600;
}
.rl-col-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.rl-pts {
  font-weight: 700;
  color: var(--accent-soft, #4f86f7);
}
.rl-wins {
  font-size: 11px;
  opacity: 0.85;
}


/* ---------- fim da noite: finalizar, resumo e acordo (painel) ---------- */
.fin-card { border-color: var(--lg-accent); }
.fin-panel h2 { margin-top: 0; }
.fin-sum { margin-top: 10px; }
.fin-table { width: 100%; border-collapse: collapse; font-size: 13px; margin: 8px 0 12px; }
.fin-table th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-3); font-weight: 600; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.fin-table td { padding: 7px 6px; border-bottom: 1px solid var(--border); vertical-align: top; }
.fin-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.fin-table .fin-nm { font-weight: 700; word-break: break-word; }
.fin-warn, .fin-ok { border-radius: 10px; padding: 10px 12px; font-size: 13px; margin: 8px 0; }
.fin-warn { border: 1px solid var(--bad); background: rgba(255, 90, 90, 0.08); }
.fin-warn ul { margin: 6px 0 0; padding-left: 18px; }
.fin-ok { border: 1px solid var(--good); background: rgba(62, 207, 142, 0.1); }

/* ---------- resumo da noite na sala (celular e TV) ---------- */
.result-card { border-color: var(--lg-accent); }
.result-me { background: var(--lg-surface-2); border: 1px solid var(--lg-accent); border-radius: 12px; padding: 12px; margin: 8px 0 12px; display: flex; flex-direction: column; gap: 4px; }
.result-place { font-size: 22px; font-weight: 800; }
.result-bal { font-weight: 800; font-variant-numeric: tabular-nums; }
.result-bal.pos { color: var(--good); }
.result-bal.neg { color: var(--bad); }
.fin-table tr.mine td { background: rgba(62, 207, 142, 0.12); }
body.tv .fin-table { font-size: clamp(12px, calc(2 * var(--vh)), 24px); }
body.tv .result-place { font-size: clamp(18px, calc(3 * var(--vh)), 36px); }
.fin-panel .chips-input { width: 110px; flex: none; text-align: right; }
.fin-panel .cx-label { min-width: 0; overflow-wrap: anywhere; }
