/* ==========================================================================
   Angola Poker Club — portal
   Bordô e dourado (cores do logótipo). Sem dependências externas.

   Índice
    1. Variáveis          6. Cartões e mosaicos     11. Cartas de jogar
    2. Base               7. A decorrer / faixa     12. Mesas, mãos e blinds
    3. Cabeçalho          8. Tabelas                13. Operador
    4. Tipografia         9. Formulários e login    14. Responsivo
    5. Botões/etiquetas  10. Gráficos
   ========================================================================== */

/* 1. Variáveis ------------------------------------------------------------ */
:root {
  /* superfícies, da mais funda para a mais clara */
  --bg: #170605;
  --panel: #240b09;
  --panel2: #2e100d;
  --panel3: #3a1612;
  --line: #47201b;
  --line2: #5e2d26;
  /* texto */
  --text: #f6ede6;
  --text2: #dfcdc2;
  --muted: #ad948a;
  /* marca e estados */
  --accent: #e3c16b;
  --accent-ink: #2b1a05;
  --gold-grad: linear-gradient(160deg, #f4e3a6 0%, #dcb85e 45%, #a8802f 100%);
  --green: #3ecf8e;
  --red: #ff7a7a;
  --series: #c98500;            /* cor dos gráficos, validada para este fundo */
  /* cartas */
  --card-face: #f6f4ee;
  --card-ink: #16181d;
  --suit-h: #c8262c;
  --suit-d: #1d5fd1;
  --suit-c: #1c7a3d;
  /* forma */
  --radius: 12px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 8px 24px rgba(0, 0, 0, .18);
}

/* 2. Base ----------------------------------------------------------------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg) radial-gradient(1200px 500px at 50% -120px, #3d100c 0%, transparent 70%) no-repeat;
  color: var(--text); font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 16px; }
main.wrap { flex: 1; padding-top: 22px; padding-bottom: 48px; }
section { margin-top: 30px; }

/* utilitários */
.ico { flex: none; vertical-align: -3px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.r { text-align: end; }
.nowrap { white-space: nowrap; }
.mt { margin-top: 28px; }

/* 3. Cabeçalho e rodapé ---------------------------------------------------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(32, 9, 7, .93); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .wrap { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; min-height: 60px; }

.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; color: var(--text); font-weight: 700; font-size: 17px; line-height: 1.15; }
.brand:hover { text-decoration: none; }
.brand-logo { display: block; height: 40px; width: auto; }
/* marca de recurso, quando não há logótipo em assets/img */
.brand .logo { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--gold-grad); color: var(--accent-ink); }
.brand .logo .ico { fill: currentColor; stroke: none; vertical-align: 0; }
.brand .word { text-transform: uppercase; letter-spacing: .09em; font-weight: 800; font-size: 16px; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand small { display: block; font-weight: 500; font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; -webkit-text-fill-color: var(--muted); }

.navtoggle { position: absolute; opacity: 0; pointer-events: none; }
.navbtn { display: none; padding: 8px; border-radius: 8px; color: var(--text); cursor: pointer; }
.mainnav { display: flex; align-items: center; gap: 2px; }
.mainnav a { display: flex; align-items: center; gap: 7px; padding: 8px 12px; border-radius: var(--radius-sm); color: var(--text2); font-weight: 500; font-size: 14.5px; }
.mainnav a:hover { color: var(--text); background: var(--panel2); text-decoration: none; }
.mainnav a.on { color: var(--accent); background: var(--panel2); }
.nav-sep { width: 1px; height: 22px; margin: 0 8px; background: var(--line2); }
/* Seletor de idioma: bandeiras; a do idioma ativo fica realçada a dourado. */
.langs { position: relative; order: 3; margin-inline-start: 4px; }
.langs summary { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border: 1px solid var(--line2); border-radius: var(--radius-sm); color: var(--text2); cursor: pointer; list-style: none; }
.langs summary::-webkit-details-marker { display: none; }
.langs summary:hover, .langs[open] summary { border-color: var(--accent); color: var(--text); }
.langs summary svg { transform: rotate(90deg); }
.langs img { display: block; width: 24px; height: 16px; border-radius: 2px; flex: none; }
.langs-menu { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 30; min-width: 190px; max-height: min(70vh, 460px); overflow-y: auto; padding: 6px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.langs-menu a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text2); font-size: 14.5px; white-space: nowrap; }
.langs-menu a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.langs-menu a.on { color: var(--accent); background: var(--panel2); font-weight: 600; }
.card.prereg { flex-direction: row; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin: 14px 0; border-color: var(--line2); }
.card.prereg > div { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 260px; }
.card.prereg b { display: flex; align-items: center; gap: 7px; }
.pill-live { padding: 0 6px; border-radius: 99px; background: var(--green); color: #062a1a; font-style: normal; font-size: 11px; font-weight: 700; line-height: 17px; }

.foot { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.foot .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 16px; padding-top: 16px; padding-bottom: 22px; }
.foot .wrap span { display: inline-flex; align-items: center; gap: 4px; }
.foot-logo { height: 16px; width: auto; margin-inline-end: 2px; }

/* 4. Tipografia e cabeçalhos de página ------------------------------------- */
h1 { margin: 0 0 4px; color: #fbf3e4; font-size: clamp(22px, 4vw, 28px); line-height: 1.2; letter-spacing: -.01em; }
h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 16px; }
h2 .ico { color: var(--accent); }
h2 small { font-weight: 400; font-size: 13px; color: var(--muted); }
h2 .more { display: inline-flex; align-items: center; gap: 2px; margin-inline-start: auto; font-size: 13px; font-weight: 500; }

.crumb { display: flex; align-items: center; gap: 4px; margin: 0 0 6px; font-size: 13px; color: var(--muted); }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 16px; }
.notice { display: flex; align-items: center; gap: 8px; margin: 0 0 18px; padding: 8px 12px; border-radius: 10px; background: #3a2a0c; border: 1px solid #6e5520; color: #f0d98a; font-size: 13px; }
.empty { padding: 48px 16px; text-align: center; color: var(--muted); }
.empty h1 { margin-top: 12px; color: var(--text); }

/* 5. Botões, etiquetas e estados ------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; font-weight: 600; font-size: 14px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--panel3); text-decoration: none; }
.btn.primary { background: var(--gold-grad); border-color: #c9a24c; color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.07); }
.btn.sm { padding: 5px 9px; font-size: 12.5px; }
.btn.block { width: 100%; }

.tag { display: inline-block; margin-inline-end: 4px; padding: 1px 8px; border-radius: 99px; border: 1px solid var(--line2); color: var(--text2); font-size: 11px; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; background: var(--panel3); color: var(--text2); font-size: 12px; font-weight: 600; white-space: nowrap; vertical-align: middle; }
.badge.live { background: var(--green); color: #062a1a; }
.badge.soon { background: var(--accent); color: var(--accent-ink); }
.badge.ok { background: #123a2a; color: var(--green); }
.badge.off { background: var(--panel3); color: var(--muted); }

.dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(62, 207, 142, .5); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgba(62, 207, 142, 0); } 100% { box-shadow: 0 0 0 0 rgba(62, 207, 142, 0); } }

.flash { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; padding: 9px 12px; border-radius: var(--radius-sm); font-size: 14px; }
.flash.ok { background: #123526; border: 1px solid #1f5a41; color: #9fe8c6; }
.flash.err { background: #3a1818; border: 1px solid #6b2a2a; color: #ffb4b4; }
.flash.warn { background: #2c2410; border: 1px solid #5e4b1c; color: #f0d98a; }

/* 6. Cartões e mosaicos ---------------------------------------------------- */
.card { display: flex; flex-direction: column; gap: 4px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text); }
a.card:hover { border-color: var(--accent); text-decoration: none; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card .when { display: flex; align-items: center; gap: 6px; color: var(--accent); font-size: 13px; font-weight: 600; }
.card .meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--text2); font-size: 13.5px; }
.card .meta span { display: inline-flex; align-items: center; gap: 5px; }
.card-ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 6px; border-radius: 10px; background: var(--panel3); color: var(--accent); }

.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-top: 16px; }
.tile { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.tile-ico { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--panel3); color: var(--accent); }
.tile b { display: block; font-size: 19px; line-height: 1.2; overflow-wrap: anywhere; }
.tile b small { font-size: 13px; font-weight: 400; color: var(--muted); }
.tile span { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }

/* Relógio do torneio (torneio.php + clock.js): contagem do nível à esquerda, blinds e tempos à direita. */
.tclock { margin-top: 16px; }
.tc-panel { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); border-radius: var(--radius); border: 1px solid var(--line2); background: radial-gradient(120% 140% at 0% 0%, #4a1a14 0%, var(--panel) 60%); overflow: hidden; }
.tc-main { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 20px 16px; border-inline-end: 1px solid var(--line2); }
.tc-level { color: var(--accent); font-size: 13px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.tc-time { font-size: clamp(54px, 11vw, 96px); line-height: 1; font-weight: 800; font-variant-numeric: tabular-nums; letter-spacing: -.02em; direction: ltr; }
.tclock.stopped .tc-time { color: var(--text2); opacity: .75; }
.tc-bar { width: min(100%, 320px); height: 5px; border-radius: 99px; background: var(--panel3); overflow: hidden; }
.tc-bar i { display: block; height: 100%; border-radius: 99px; background: var(--gold-grad); transition: width 1s linear; }
.tc-info { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); margin: 0; }
.tc-info div { grid-column: span 2; display: flex; flex-direction: column; justify-content: center; gap: 2px; min-width: 0; padding: 12px 16px; border-top: 1px solid var(--line); }
.tc-info div.big { grid-column: span 3; border-top: 0; padding-block: 16px; }
.tc-info div.big + div.big { border-inline-start: 1px solid var(--line); }
.tc-info dt { color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; }
.tc-info dd { margin: 0; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.tc-info .big dd { font-size: clamp(22px, 3.4vw, 32px); color: var(--accent); }
@media (max-width: 760px) {
  .tc-panel { grid-template-columns: minmax(0, 1fr); }
  .tc-main { border-inline-end: 0; border-bottom: 1px solid var(--line2); }
}
@media (max-width: 480px) {
  .tc-info div { grid-column: span 3; padding: 10px 12px; }
  .tc-info div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

.cols { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.cols.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cols > :only-child { grid-column: 1 / -1; }

/* 7. "A decorrer" e faixa de marca ----------------------------------------- */
.hero { position: relative; display: grid; place-items: center; overflow: hidden; width: 100%; max-height: 300px; aspect-ratio: 2000 / 761; margin-bottom: 18px; border-radius: 16px; border: 1px solid var(--line2); box-shadow: var(--shadow);
  /* desenho de recurso, usado só quando não existe o banner */
  background:
    linear-gradient(118deg, transparent 46%, rgba(255, 214, 120, .22) 49.6%, rgba(255, 240, 190, .5) 50%, rgba(255, 214, 120, .22) 50.4%, transparent 54%),
    radial-gradient(60% 90% at 12% 30%, rgba(214, 160, 60, .35), transparent 70%),
    radial-gradient(50% 80% at 92% 78%, rgba(214, 160, 60, .3), transparent 70%),
    linear-gradient(135deg, #4a0f0b, #2a0806 55%, #3d0d0a); }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-word { position: relative; padding: 0 12px; text-align: center; text-transform: uppercase; line-height: 1; }
.hero-word b { display: block; font-size: clamp(30px, 8vw, 68px); font-weight: 900; letter-spacing: .04em; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-word span { display: block; margin-top: .35em; padding-inline-start: .42em; font-size: clamp(12px, 2.6vw, 24px); font-weight: 700; letter-spacing: .42em; color: #e9cf8a; }

.now { padding: 18px; border-radius: 16px; border: 1px solid var(--line2); background: linear-gradient(160deg, #3a110d, #220a08 60%); box-shadow: var(--shadow); }
.now > h2 { font-size: 13px; text-transform: uppercase; letter-spacing: .08em; color: var(--text2); }
.now-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.now-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--green); color: var(--text); }
.now-card:hover { background: var(--panel2); text-decoration: none; }
.now-card strong { font-size: 17px; line-height: 1.25; }
.now-card strong .ico { color: var(--accent); }
.now-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.now-grid div { min-width: 0; padding: 8px 10px; border-radius: var(--radius-sm); background: var(--panel2); }
.now-grid b { display: block; font-size: 16px; overflow-wrap: anywhere; }
.now-grid span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.now-empty { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--text2); }
.now-empty .card-ico { margin: 0; color: var(--muted); }
.now-empty b { display: block; color: var(--text); font-size: 16px; }
.now-empty .btn { margin-inline-start: auto; }

/* 8. Tabelas --------------------------------------------------------------- */
.scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; background: var(--panel); }
th, td { padding: 9px 12px; text-align: start; border-bottom: 1px solid var(--line); }
th { background: var(--panel2); color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
th.r, td.r { text-align: end; }
td.r { font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255, 255, 255, .02); }

tr.itm td:first-child { box-shadow: inset 3px 0 0 var(--accent); }    /* lugar premiado */
tr.break td { background: var(--panel2); color: var(--muted); font-style: italic; }
tr.current td { background: #4a2a12; font-weight: 600; }               /* nível em curso */
tr.off td { opacity: .55; }                                            /* utilizador inativo */

.pos { display: inline-grid; place-items: center; min-width: 26px; height: 26px; border-radius: 8px; background: var(--panel3); color: var(--text2); font-weight: 700; font-size: 13px; }
.pos.p1 { background: var(--gold-grad); color: var(--accent-ink); }
.pos.p2 { background: #b9c2c7; color: #1c2226; }
.pos.p3 { background: #b98157; color: #2b1606; }
/* Chip count: em mobile a tabela tem até 6 colunas (#, jogador, fichas, BB, bounty, mesa) — aperta o padding para caber sem scroll. */
@media (max-width: 560px) {
  #chipcount table th, #chipcount table td { padding: 8px 6px; font-size: 13px; }
  #chipcount table th:first-child, #chipcount table td:first-child { padding-inline-start: 8px; }
  #chipcount table th:last-child, #chipcount table td:last-child { padding-inline-end: 8px; }
  #chipcount .pos { min-width: 22px; height: 22px; font-size: 12px; }
}
@media (max-width: 420px) {
  #chipcount table th, #chipcount table td { padding: 7px 4px; font-size: 12px; }
}
.up, .down { font-size: 11px; font-weight: 700; white-space: nowrap; }
.up { color: var(--green); }
.down { color: var(--red); }

.pager { display: flex; justify-content: center; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted); }
.periods { display: flex; flex-wrap: wrap; gap: 6px; }
.periods a { padding: 4px 12px; border-radius: 99px; border: 1px solid var(--line2); color: var(--text2); font-size: 13px; }
.periods a.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 600; }
.plist { margin: 0; padding: 0; list-style: none; columns: 2 280px; }
.plist li { display: flex; align-items: center; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.avatar { flex: none; display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; overflow: hidden; background: var(--panel3); border: 1px solid var(--line2); color: var(--text2); font-size: 13px; font-weight: 700; vertical-align: middle; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { display: flex; align-items: center; gap: 10px; }
.lh-who { display: flex; align-items: center; gap: 5px; min-width: 0; }
.lh-who > a, .lh-who > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* Ações dos jogadores numa mão (painel ao vivo e página do operador). */
.lh-act { flex: none; padding: 4px 12px; border-radius: 99px; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .28); color: #fff; font-size: 14.5px; line-height: 1.25; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; font-variant-numeric: tabular-nums; }
.lh-act.fold { background: rgba(255, 255, 255, .08); color: #b9c4be; }
.lh-act.bet, .lh-act.raise, .lh-act.reraise { background: var(--accent); color: var(--accent-ink); }
.lh-act.bet, .lh-act.raise, .lh-act.reraise { border-color: transparent; }
.lh-act.allin { background: #c0392b; border-color: #ff8a7a; color: #fff; box-shadow: 0 0 10px rgba(255, 107, 90, .55); }
.lh-log { display: flex; flex-wrap: wrap; gap: 4px 12px; margin: 10px 2px 0; color: #cfe3d8; font-size: 12.5px; }
.lh-log b { color: #fff; }
.lh-log b.fold { color: #9fb0a7; font-weight: 600; }
.lh-log b.bet, .lh-log b.raise, .lh-log b.reraise { color: var(--accent); }
.lh-log b.allin { color: #ff8a7a; }
.op-bet { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; margin-bottom: 8px; }
.op-bet label { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--muted); }
.op-bet input { width: 150px; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 15px; }
.op-seat { flex-wrap: wrap; }
.op-acts { flex: 1 0 100%; display: flex; flex-wrap: wrap; align-items: center; gap: 5px; padding: 2px 0 6px; }
.op-acts .act { padding: 6px 10px; border-radius: 7px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.op-acts .act.bet { border-color: var(--accent); color: var(--accent); }
.op-acts .act.allin { border-color: #c0392b; color: #ff8a7a; }
.op-acts .lh-act { margin-inline-start: auto; }
/* Carta acabada de registar: entra a virar. */
@keyframes deal { from { opacity: 0; transform: translateY(-16px) rotateY(90deg) scale(.85); } 60% { opacity: 1; } to { opacity: 1; transform: none; } }
.pc.deal { animation: deal .5s cubic-bezier(.2, .8, .3, 1) both; }
@media (prefers-reduced-motion: reduce) { .pc.deal { animation: none; } }

/* Jogada nova (check, call, raise, all-in...): a etiqueta salta, a linha do jogador acende e a jogada é anunciada sobre a mesa. */
@keyframes act-pop { 0% { transform: scale(.4); opacity: 0; } 55% { transform: scale(1.35); opacity: 1; } 75% { transform: scale(.94); } 100% { transform: none; } }
@keyframes act-row { 0% { background: rgba(255, 255, 255, .34); box-shadow: 0 0 0 2px rgba(255, 255, 255, .5); } 100% { box-shadow: 0 0 0 2px rgba(255, 255, 255, 0); } }
@keyframes act-row-gold { 0% { background: rgba(227, 193, 107, .5); box-shadow: 0 0 0 2px var(--accent); } 100% { box-shadow: 0 0 0 2px rgba(227, 193, 107, 0); } }
@keyframes act-row-allin { 0% { background: rgba(192, 57, 43, .75); box-shadow: 0 0 0 3px #ff6b5a; transform: translateX(0); } 8% { transform: translateX(-5px); } 16% { transform: translateX(5px); } 24% { transform: translateX(-4px); } 32% { transform: translateX(3px); } 40% { transform: none; } 100% { box-shadow: 0 0 0 3px rgba(255, 107, 90, 0); } }
@keyframes callout { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 10% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 16% { transform: translate(-50%, -50%) scale(1); } 80% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -62%) scale(.96); } }
@keyframes callout-allin { 0%, 100% { box-shadow: 0 0 0 0 rgba(255, 107, 90, .7), 0 10px 30px rgba(0, 0, 0, .55); } 50% { box-shadow: 0 0 0 10px rgba(255, 107, 90, 0), 0 10px 30px rgba(0, 0, 0, .55); } }
.lhand { position: relative; }
.lh-act.new { animation: act-pop .55s cubic-bezier(.2, .8, .3, 1) both; }
.lh-players li.acted { animation: act-row 1.6s ease-out both; }
.lh-players li.acted.a-bet, .lh-players li.acted.a-raise, .lh-players li.acted.a-reraise { animation-name: act-row-gold; }
.lh-players li.acted.a-allin { animation: act-row-allin 2s ease-out both; }
.lh-callout { position: absolute; z-index: 3; top: 50%; left: 50%; display: flex; flex-direction: column; align-items: center; gap: 2px; max-width: 92%; padding: 10px 22px; border-radius: 14px; background: rgba(10, 16, 13, .92); border: 2px solid rgba(255, 255, 255, .55); color: #fff; text-align: center; pointer-events: none; box-shadow: 0 10px 30px rgba(0, 0, 0, .55); animation: callout 2.6s ease both; }
.lh-callout span { font-size: 13px; font-weight: 600; color: #cfe3d8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.lh-callout b { font-size: clamp(20px, 5cqi, 34px); line-height: 1.1; letter-spacing: .02em; text-transform: uppercase; white-space: nowrap; }
.lh-callout.fold { border-color: rgba(255, 255, 255, .25); }
.lh-callout.fold b { color: #b9c4be; }
.lh-callout.bet, .lh-callout.raise, .lh-callout.reraise { border-color: var(--accent); }
.lh-callout.bet b, .lh-callout.raise b, .lh-callout.reraise b { color: var(--accent); }
.lh-callout.allin { background: #a52a1e; border-color: #ff8a7a; animation: callout 3.2s ease both, callout-allin .8s ease-in-out 4; }
@media (prefers-reduced-motion: reduce) {
  .lh-act.new, .lh-players li.acted, .lh-players li.acted.a-allin { animation: none; }
  .lh-callout, .lh-callout.allin { animation: callout 2.6s steps(1, end) both; }
}
/* Bandeira do país antes do nome do jogador (imagem 4:3). */
.flag { display: inline-block; width: 20px; height: 15px; border-radius: 2px; object-fit: cover; vertical-align: -2px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .14); font-size: 10px; }
h1 .flag { width: 30px; height: 22px; vertical-align: 0; margin-inline-end: 4px; }
.lh-who .flag { flex: none; }
.wa-preview { margin: 0 0 12px; white-space: pre-wrap; overflow-wrap: anywhere; font: inherit; font-size: 14px; line-height: 1.5; }

/* 9. Formulários e login --------------------------------------------------- */
.search input, .form input, .form select, .form textarea, .inline-form select, .num-in, .auth-card input:not([type=hidden]) {
  width: 100%; min-width: 0; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit;
}
.search input:focus, .form input:focus, .form select:focus, .auth-card input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

.search { display: flex; gap: 8px; max-width: 480px; margin: 12px 0; }
.search input { flex: 1; }
.form { gap: 14px; max-width: 460px; }
.form label, .auth-card label { display: flex; flex-direction: column; gap: 5px; color: var(--text2); font-size: 13.5px; font-weight: 600; }
.form label small { font-weight: 400; }
.form .btn { align-self: flex-start; }
.inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 0; }
.inline-form select { width: auto; max-width: 220px; padding: 5px 8px; font-size: 13px; }
.form textarea { resize: vertical; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.num-in { width: 78px; padding: 5px 8px; font-size: 13px; }
.num-in.wide { width: 100%; min-width: 170px; }
.num-in.sel { width: auto; min-width: 118px; max-width: 220px; }
.inline-form input[type=checkbox] { width: auto; }

.auth { display: grid; place-items: center; padding: 6vh 0; }
.auth-card { width: 100%; max-width: 380px; gap: 14px; padding: 26px; box-shadow: var(--shadow); }
.auth-card h1 { margin: 0; font-size: 22px; }
.auth-card p { margin: -8px 0 0; }
.auth-card input:not([type=hidden]) { padding: 11px 12px; }
.auth-logo { display: block; width: 100%; max-width: 250px; height: auto; margin: 0 auto 4px; }
.auth-ico { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--panel3); color: var(--accent); }

/* 10. Gráficos ------------------------------------------------------------- */
.charts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); gap: 12px; }
.chart-card { min-width: 0; padding: 14px 14px 10px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.chart-card.wide { grid-column: 1 / -1; }
.chart-card h3 { margin: 0; font-size: 14.5px; }
.chart-card > p { margin: 2px 0 8px; color: var(--muted); font-size: 12.5px; }

.chart { position: relative; }
.chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart text { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.chart text.val { fill: var(--text2); font-weight: 600; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .axis { stroke: var(--line2); stroke-width: 1; }
.chart .line { fill: none; stroke: var(--series); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .area { fill: var(--series); opacity: .1; }
.chart .bar { fill: var(--series); }
.chart .mark { fill: var(--series); stroke: var(--panel); stroke-width: 2; }
.chart .cross { stroke: var(--text2); stroke-width: 1; opacity: .5; }
.chart .hit { fill: transparent; cursor: default; outline: none; }
.chart .hit:hover + .bar, .chart .hit:focus-visible + .bar { filter: brightness(1.25); }

.chart-tip { position: absolute; z-index: 3; padding: 6px 9px; border-radius: 8px; background: #120403; border: 1px solid var(--line2); box-shadow: var(--shadow); font-size: 12px; white-space: nowrap; pointer-events: none; transform: translate(-50%, -100%); }
.chart-tip b { display: block; color: var(--text); font-size: 14px; }
.chart-tip span { color: var(--muted); }
.chart-data { margin-top: 6px; font-size: 12.5px; }
.chart-data summary { color: var(--muted); cursor: pointer; }
.chart-data .scroll { max-height: 220px; margin-top: 6px; overflow-y: auto; }
.chart-data th, .chart-data td { padding: 5px 10px; }

/* 11. Cartas de jogar ------------------------------------------------------ */
.pc { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 44px; margin-inline-end: 4px; padding: 0 4px; border-radius: 6px; background: var(--card-face); color: var(--card-ink); box-shadow: 0 1px 2px rgba(0, 0, 0, .4); font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; }
.pc.h { color: var(--suit-h); }
.pc.d { color: var(--suit-d); }
.pc.c { color: var(--suit-c); }
.pc.empty { background: transparent; border: 1px dashed var(--line2); box-shadow: none; }

.board { display: flex; margin: 0 0 10px; }
.board.sm .pc, .hole .pc, .sd .pc { min-width: 26px; height: 32px; margin-inline-end: 3px; font-size: 13px; }
.hole { margin-inline-start: 6px; white-space: nowrap; }

/* 12. Mesas, mãos e blinds ------------------------------------------------- */
.tables { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.ptable { padding: 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.ptable.active { border-color: var(--green); }
.ptable h3 { margin: 0 0 8px; font-size: 15px; }
.ptable h3 small { color: var(--muted); font-weight: 400; }
.ptable p.small { margin: 0 0 8px; }
.ptable .note { margin: 0 0 8px; font-size: 13px; }
.ptable ol { margin: 0; padding: 0; list-style: none; }
.ptable li { display: flex; align-items: center; gap: 8px; min-height: 32px; padding: 2px 0; }
.ptable li.win { color: var(--accent); font-weight: 600; }
.ptable li.win a { color: inherit; }
.seat { flex: none; width: 20px; color: var(--muted); font-size: 12px; text-align: end; }
.chips { margin-inline-start: auto; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cash-stakes { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; margin: 0 0 4px; }
.cash-stakes b { font-size: 17px; }

/* Ficha da small blind / big blind: pequena ficha de póquer com as iniciais. */
.blind { flex: none; display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; font-size: 9.5px; font-weight: 800; letter-spacing: .02em; line-height: 1; border: 2px dashed; user-select: none; }
.blind.sb { background: var(--card-face); color: #5a1410; border-color: #b9886f; }
.blind.bb { background: var(--gold-grad); color: var(--accent-ink); border-color: rgba(43, 26, 5, .45); }
.blind.lg { width: 34px; height: 34px; font-size: 11.5px; }

/* Linha-resumo da mão: tipo de jogo e blinds (ou valor do bomb pot). */
.hand-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin: 0 0 10px; color: var(--text2); font-size: 13px; }
.game { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px; border-radius: 99px; background: var(--panel3); color: var(--accent); font-size: 12px; font-weight: 700; white-space: nowrap; }
.game.bomb { background: #5a1410; color: #ffd9a8; }      /* bomb pot / BombAha */

.hands { display: flex; flex-direction: column; gap: 6px; }
.hand { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 10px; background: var(--panel); border: 1px solid var(--line); }
.hand .board { margin: 0; }
.sd { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; }
.sd.win { color: var(--accent); font-weight: 600; }
#live h2 + .tables + h2 { margin-top: 24px; }

/* Mão ao vivo estilo transmissão (assets/hand.js): mesa, jogadores com foto, percentagem, outs e replay. */
.lhand { margin: 0 0 10px; padding: 10px; border-radius: var(--radius-sm); background: radial-gradient(120% 140% at 50% 0%, #0f3d2c 0%, #0a2a1f 55%, #071c15 100%); border: 1px solid #1c5a41; }
.lhand .lh-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; margin-bottom: 8px; }
.lhand .board { margin: 0; }
.lhand .pc.empty { border-color: rgba(255, 255, 255, .22); }
.lh-steps { display: flex; flex-wrap: wrap; gap: 4px; }
.lh-steps button { padding: 4px 9px; border-radius: 99px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(0, 0, 0, .25); color: #cfe6da; font: inherit; font-size: 12px; cursor: pointer; }
.lh-steps button:hover { border-color: var(--accent); }
.lh-steps button.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.lh-steps button.play { border-color: var(--accent); color: var(--accent); }
.lh-steps button.play.on { color: var(--accent-ink); }
.lh-players { display: flex; flex-direction: column; gap: 5px; margin: 0; padding: 0; list-style: none; }
.lh-players li { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 8px; border-radius: 9px; background: rgba(0, 0, 0, .34); border: 1px solid transparent; }
.lh-players li.lead { border-color: rgba(62, 207, 142, .55); }
.lh-players li.win { border-color: var(--accent); background: linear-gradient(90deg, rgba(227, 193, 107, .26), rgba(0, 0, 0, .34) 70%); }
.lh-players li.lost, .lh-players li.out { opacity: .6; }
.lh-photo { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; overflow: hidden; background: var(--panel3); border: 2px solid rgba(255, 255, 255, .25); color: var(--text2); font-size: 13px; font-weight: 700; }
.lh-photo img { width: 100%; height: 100%; object-fit: cover; }
.lh-players li.win .lh-photo { border-color: var(--accent); }
.lh-name { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; color: #fff; font-weight: 600; font-size: 14px; line-height: 1.25; }
.lh-name a { color: inherit; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-name small { color: #a9cdbb; font-weight: 400; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lh-players li.win .lh-name small { color: var(--accent); }
.lhand .hole { flex: none; margin: 0; }
.lh-eq { flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 3px; width: 58px; }
.lh-eq b { color: #fff; font-size: 17px; font-variant-numeric: tabular-nums; line-height: 1; }
.lh-eq i { display: block; width: 100%; height: 5px; border-radius: 99px; background: rgba(255, 255, 255, .16); overflow: hidden; }
.lh-eq u { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .6s ease; }
.lh-players li.lead .lh-eq b { color: var(--green); }
.lh-eq.won { width: auto; padding: 3px 9px; border-radius: 99px; background: var(--gold-grad); color: var(--accent-ink); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; }
.hand.rich { display: block; }
.hand.rich > .muted { display: inline-block; margin: 0 8px 8px 0; }
.hand.rich .hand-meta { display: inline-flex; margin: 0 0 8px; }
.hand.rich .lhand { margin: 0; }
/* Painel estreito (cartão de uma mesa, telemóvel): o nome fica com a linha toda e as cartas passam para baixo. */
.lhand { container-type: inline-size; }
@container (max-width: 520px) {
  .lh-players li { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "ph name eq" "ph hole act"; align-items: center; gap: 4px 9px; padding: 7px 9px; }
  .lh-players .lh-photo { grid-area: ph; align-self: center; }
  .lh-players .lh-name { grid-area: name; }
  .lh-players .lh-eq { grid-area: eq; justify-self: end; }
  .lh-players .hole { grid-area: hole; justify-self: start; }
  .lh-players .lh-act { grid-area: act; justify-self: end; }
  .lhand .lh-top { justify-content: flex-start; }
}
.player-head { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.player-head h1, .player-head p { margin: 0; }
.player-photo { flex: none; width: 72px; height: 72px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
@media (max-width: 420px) {
  .lhand .hole .pc { min-width: 23px; height: 29px; font-size: 12px; margin-inline-end: 2px; }
  .lh-photo { width: 32px; height: 32px; }
  .lh-eq { width: 48px; }
}

/* 13. Operador -------------------------------------------------------------- */
.op { max-width: 560px; margin: 0 auto; }
.op-card { display: flex; flex-direction: column; gap: 12px; }
.op-card h2 { margin: 4px 0 0; font-size: 20px; }
.op-card h3 { margin: 8px 0 0; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.op .err { margin: 0; color: var(--red); }

.op button, .op input { padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--panel); color: var(--text); font: inherit; }
.op button { cursor: pointer; }
.op button:disabled { opacity: .25; cursor: default; }
.op button.primary { background: var(--gold-grad); border-color: #c9a24c; color: var(--accent-ink); font-weight: 700; }
.op button.big { padding: 20px; font-size: 18px; }
.op button.link { align-self: flex-start; padding: 4px 0; border: 0; background: none; color: var(--accent); }
.op button.link.danger { color: var(--red); }
.op button.row { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; text-align: start; }
.op-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.op .inline { display: flex; gap: 8px; }
.op .inline input { flex: 1; min-width: 0; }
.op-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

/* preparar a mão: tipo de jogo, valores e posições */
.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; }
.op .seg button { display: flex; flex-direction: column; gap: 1px; padding: 12px; text-align: start; font-weight: 700; }
.op .seg button small { color: var(--muted); font-weight: 400; font-size: 12px; }
.op .seg button.on { border-color: var(--accent); background: var(--panel3); color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.op-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.op-fields label { display: flex; flex-direction: column; gap: 5px; color: var(--text2); font-size: 13px; font-weight: 600; }
.op-fields input { width: 100%; background: var(--bg); font-variant-numeric: tabular-nums; }
.op-info { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--panel); border: 1px solid var(--line); font-size: 13.5px; }
.op-info .link { margin-inline-start: auto; }

/* lista de lugares (posições na preparação, cartas mostradas na mão) */
.op-seats { display: flex; flex-direction: column; }
.op-seat { display: flex; align-items: center; gap: 6px; min-height: 46px; padding: 3px 0; border-bottom: 1px solid var(--line); }
.op-seat .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.op-seat .pc { min-width: 30px; height: 38px; margin: 0; font-size: 13px; }
/* botão que marca um lugar como SB ou BB: a ficha fica apagada até ser escolhida */
.op button.pos-btn { padding: 3px; border-color: transparent; background: none; border-radius: 50%; line-height: 0; }
.op button.pos-btn .blind { opacity: .28; filter: grayscale(1); }
.op button.pos-btn.on .blind { opacity: 1; filter: none; box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent); }
.op button.win { padding: 6px 10px; color: var(--muted); font-size: 12px; }
.op-eq { flex: none; color: var(--green); font-size: 12.5px; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.op button.win.on { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); font-weight: 700; }

/* board e seletor de cartas */
.op-board { display: flex; justify-content: center; gap: 6px; }
.op-board .pc { min-width: 46px; height: 62px; margin: 0; font-size: 20px; }
.op button.slot { padding: 3px; border: 2px solid transparent; border-radius: 10px; background: none; line-height: 0; }
.op button.slot.on { border-color: var(--accent); }
.picker { display: grid; grid-template-columns: repeat(13, 1fr); gap: 3px; }
.op button.pick { padding: 9px 0; border: 0; border-radius: 5px; background: var(--card-face); color: var(--card-ink); font-weight: 700; font-size: 13px; }
.op button.pick.h { color: var(--suit-h); }
.op button.pick.d { color: var(--suit-d); }
.op button.pick.c { color: var(--suit-c); }

/* 14. Responsivo ----------------------------------------------------------- */
@media (min-width: 1061px) {            /* menu sempre numa só linha, em todos os idiomas e com sessão iniciada */
  .top .wrap { flex-wrap: nowrap; }
  .mainnav { flex: none; }
  .mainnav a { gap: 6px; padding: 8px 9px; font-size: 14px; white-space: nowrap; }
  .mainnav .nav-sep { flex: none; margin: 0 5px; }
  .mainnav .nav-sep ~ a span { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }   /* nome da conta */
}
@media (min-width: 1061px) and (max-width: 1180px) {
  .mainnav a .ico { display: none; }
}
@media (max-width: 1060px) {            /* menu passa a botão */
  .navbtn { display: block; }
  .mainnav { display: none; flex-basis: 100%; flex-direction: column; align-items: stretch; padding: 4px 0 12px; }
  .navtoggle:checked ~ .mainnav { display: flex; }
  .navtoggle:focus-visible ~ .navbtn { outline: 2px solid var(--accent); }
  .mainnav a { padding: 12px; }
  .nav-sep { width: auto; height: 1px; margin: 6px 0; }
  .langs { order: 0; margin: 0; }
}
@media (max-width: 900px) {
  .cols, .cols.even { grid-template-columns: minmax(0, 1fr); gap: 0; }
}
@media (max-width: 640px) {
  .hide-sm { display: none; }
  th, td { padding: 8px 9px; }
  .now-empty .btn { width: 100%; margin-inline-start: 0; }
}
@media (max-width: 480px) {
  .brand-logo { height: 34px; }
  .picker { gap: 2px; }
  .op button.pick { padding: 10px 0; font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  .dot { animation: none; }
}

/* Árabe (direita para a esquerda): cartas, valores e setas mantêm o sentido habitual. */
[dir="rtl"] .lh-top, [dir="rtl"] .board, [dir="rtl"] .hole, [dir="rtl"] .sd, [dir="rtl"] .cards { direction: ltr; unicode-bidi: isolate; }
[dir="rtl"] .crumb svg, [dir="rtl"] h2 .more svg { transform: scaleX(-1); }
/* Valores e nomes em escrita latina dentro de uma página em árabe: cada elemento segue a direção do seu próprio texto. */
[dir="rtl"] :is(b, strong, small, td, .tile b, .muted, .tag, .badge) { unicode-bidi: plaintext; }
/* Valores e nomes em escrita latina dentro de uma página em árabe: cada elemento segue a direção do seu próprio texto. */
[dir="rtl"] :is(b, strong, small, td, .muted, .tag, .badge) { unicode-bidi: plaintext; }

/* Fórmula do ranking (ranking_formula.php): cartões e linhas em grelha, sem tabelas largas. */
.rf-formula { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; align-items: stretch; }
.rf-formula .card { gap: 12px; padding: 18px; }
.rf-card-title { margin: 0; font-size: 11.5px; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.formula { margin: 0; padding: 12px 14px; border-radius: 10px; background: var(--panel3); font-size: 15px; line-height: 1.45; }
.rf-defs { display: grid; gap: 10px; margin: 0; }
.rf-defs dt { font-size: 13.5px; font-weight: 700; }
.rf-defs dd { display: grid; gap: 3px; margin: -7px 0 0; }
.rf-defs dd span { color: var(--muted); font-size: 12.5px; line-height: 1.45; }
.rf-defs code { color: var(--accent); font-size: 13px; overflow-wrap: anywhere; }
.rf-example-name { margin: 0; line-height: 1.45; }
.rf-example { width: 100%; margin-top: auto; border-collapse: collapse; }
.rf-example td { padding: 7px 0; border-top: 1px solid var(--line); font-size: 13.5px; background: none; }
.rf-note { margin: 12px 2px 0; }
.rf-list { display: flex; flex-direction: column; gap: 8px; }
.rf-row { display: grid; gap: 10px 12px; align-items: end; margin: 0; padding: 12px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); }
.rf-row:focus-within { border-color: var(--line2); }
.rf-row.type { grid-template-columns: minmax(190px, 1.7fr) minmax(76px, 1fr) minmax(150px, 1.4fr) repeat(4, minmax(76px, 1fr)) auto; }
.rf-row.tour { grid-template-columns: minmax(200px, 1.7fr) minmax(170px, 1.4fr) repeat(4, minmax(68px, .7fr)) minmax(92px, auto) auto; }
.rf-row.adj { grid-template-columns: minmax(180px, 2.2fr) repeat(3, minmax(90px, 1fr)) auto; padding: 8px 14px; }
.rf-row.adj .rf-result { align-items: flex-start; padding-bottom: 0; align-self: center; }
.rf-details > summary { cursor: pointer; padding: 10px 14px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); color: var(--text2); font-size: 13.5px; font-weight: 600; }
.rf-details[open] > summary { margin-bottom: 8px; }
.rf-row.new { background: none; border-style: dashed; }
.rf-row.off > :not(.rf-actions) { opacity: .5; }
.rf-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; white-space: nowrap; }
.rf-field .num-in { width: 100%; min-width: 0; max-width: none; padding: 7px 9px; font-size: 13.5px; font-weight: 500; letter-spacing: 0; text-transform: none; }
.rf-title { display: flex; flex-direction: column; gap: 2px; min-width: 0; align-self: center; }
.rf-title b { font-size: 14px; line-height: 1.3; overflow-wrap: anywhere; }
.rf-result { display: flex; flex-direction: column; gap: 4px; align-items: flex-end; padding-bottom: 7px; white-space: nowrap; }
.rf-result span { color: var(--muted); font-size: 10.5px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.rf-result b { font-size: 14px; }
.rf-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; white-space: nowrap; }
.rf-actions .btn.sm { padding: 7px 12px; }
.rf-check { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: 13px; cursor: pointer; }
.rf-check input { width: auto; margin: 0; }
.rf-detect { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin: 12px 0 0; }
@media (max-width: 1120px) {
  .rf-row.type, .rf-row.tour, .rf-row.adj { grid-template-columns: repeat(auto-fill, minmax(112px, 1fr)); }
  .rf-row .rf-name, .rf-row .rf-title, .rf-row .rf-actions { grid-column: 1 / -1; }
  .rf-row .rf-wide { grid-column: span 2; }
  .rf-result { align-items: flex-start; }
  .rf-actions { justify-content: flex-start; padding-top: 2px; }
}
@media (max-width: 480px) {
  .rf-row.type, .rf-row.tour { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.wa-part { display: grid; gap: 8px; margin-top: 16px; }
.wa-part .wa-preview { margin: 0; max-height: 420px; overflow-y: auto; }
.wa-send-all { margin: 0; }

/* ---- Banner da temporada (ranking, torneio e painel) ---- */
.season-banner { margin: 0 0 16px; border-radius: 10px; overflow: hidden; background: #1a0d10; }
.season-banner img { display: block; width: 100%; height: auto; }
.bn-list { display: grid; gap: 14px; }
.bn-item { display: grid; gap: 12px; }
.bn-item .season-banner { margin: 0; }
.bn-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.bn-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; }
.bn-form input[type=file] { max-width: 100%; font: inherit; color: inherit; }
@media (max-width: 760px) { .bn-form { grid-template-columns: minmax(0, 1fr); } }

/* ---- Telemóvel com seletor de indicativo (bandeira + código) ---- */
.field { display: flex; flex-direction: column; gap: 5px; }
.phone-field { position: relative; display: flex; gap: 8px; }
.phone-field > input { flex: 1; min-width: 0; }
.dial { flex: none; }
.dial summary { display: flex; align-items: center; gap: 7px; height: 100%; padding: 0 10px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font-size: 15px; font-weight: 600; cursor: pointer; list-style: none; white-space: nowrap; direction: ltr; }
.dial summary::-webkit-details-marker { display: none; }
.dial summary:hover, .dial[open] summary { border-color: var(--accent); }
.dial summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.dial summary img, .dial-item img { border-radius: 2px; flex: none; }
.dial summary svg { transform: rotate(90deg); color: var(--text2); }
.dial-menu { position: absolute; inset-inline: 0; top: calc(100% + 6px); z-index: 30; padding: 8px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); box-shadow: var(--shadow); }
.dial-menu .dial-search { width: 100%; margin-bottom: 6px; padding: 9px 10px !important; font-size: 14.5px; }
.dial-list { max-height: 260px; overflow-y: auto; }
.auth-card .dial-item, .dial-item { display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px; color: var(--text2); font-size: 14.5px; font-weight: 400; cursor: pointer; }
.dial-item:hover { background: var(--panel2); color: var(--text); }
.dial-item:has(input:checked) { background: var(--panel2); color: var(--accent); font-weight: 600; }
.auth-card .dial-item input, .dial-item input { position: absolute; width: 1px; height: 1px; padding: 0; opacity: 0; pointer-events: none; }
.dial-item:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: -2px; }
.dial-item span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dial-item b { font-weight: 600; direction: ltr; }
.dial-item[hidden] { display: none; }

/* ---- Marcação e notas privadas sobre jogadores; stack indicada pelo jogador ---- */
.ptag { display: inline-block; width: 10px; height: 10px; border-radius: 50%; vertical-align: baseline; background: var(--muted); }
.ptag.red { background: #e5484d; } .ptag.orange { background: #f08c3a; } .ptag.yellow { background: #e9c93f; }
.ptag.green { background: #3fb97a; } .ptag.blue { background: #4a9bea; } .ptag.purple { background: #a678e8; }
.ptag.note { width: 7px; height: 7px; background: transparent; border: 1.5px solid var(--muted); }
.note-card { display: grid; gap: 10px; margin-bottom: 18px; }
.note-card h2 { margin: 0; }
.note-card h2 small { font-size: 12.5px; font-weight: 400; }
.note-card form { display: grid; gap: 10px; }
.note-card textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); font: inherit; resize: vertical; }
.note-card textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.note-tags { display: flex; flex-wrap: wrap; gap: 8px; }
.note-tag { display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px; border: 1px solid var(--line2); border-radius: 99px; color: var(--text2); font-size: 13.5px; cursor: pointer; }
.note-tag input { position: absolute; opacity: 0; pointer-events: none; }
.note-tag .ptag { width: 16px; height: 16px; }
.note-tag:has(input:checked) { border-color: var(--accent); color: var(--text); background: var(--panel2); }
.note-tag:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 1px; }
.note-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.note-text { white-space: normal; overflow-wrap: anywhere; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.self-chip { margin-inline-start: 3px; color: var(--accent); font-weight: 700; cursor: help; }
.stack-in { width: 150px !important; }

/* ---- Filtros da lista de torneios e ordenação por coluna ---- */
.search.filters { flex-wrap: wrap; max-width: none; }
.search.filters input[type=search] { flex: 1 1 220px; }
.search.filters select { flex: 0 1 200px; min-width: 0; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; }
.sort-link { color: inherit; text-decoration: none; }
.sort-link:hover, .sort-link.on { color: var(--accent); text-decoration: none; }
.sort-arrow { font-size: 9px; }
.sort-th { cursor: pointer; user-select: none; }
.sort-th:hover { color: var(--accent); }
.sort-th:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.sort-th[aria-sort]::after { content: " ▲"; font-size: 9px; color: var(--accent); }
.sort-th[aria-sort=descending]::after { content: " ▼"; }

/* ---- Vencedor do torneio concluído, com a fotografia carregada pelo club ----
   A fotografia aparece sempre inteira e nas proporções originais (sem cortar nem esticar), com o nome e o prémio
   ao lado. Ao alto (.photo-portrait, o habitual no telemóvel) fica numa coluna estreita; deitada (.photo-landscape)
   fica numa coluna larga. No telemóvel passa para cima, à largura do ecrã. */
.winner { flex-direction: row; align-items: center; gap: 18px; margin-bottom: 16px; border-color: var(--accent); }
.winner.has-photo { align-items: stretch; gap: 0; padding: 0; overflow: hidden; }
.winner-photo { flex: none; width: min(300px, 38%); display: flex; align-items: center; background: #000; }
.winner-photo img { display: block; width: 100%; height: auto; max-height: 560px; object-fit: contain; }
.winner.photo-landscape .winner-photo { width: min(600px, 58%); }
.winner-avatar { flex: none; width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 2px solid var(--accent); }
.winner-info { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: 6px; }
.winner.has-photo .winner-info { padding: 22px 26px; }
.winner-label { display: inline-flex; align-items: center; gap: 6px; color: var(--accent); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.winner-name { font-size: clamp(20px, 3vw, 30px); line-height: 1.2; overflow-wrap: anywhere; }
.winner-prize { color: var(--accent); font-size: clamp(18px, 2.4vw, 24px); font-weight: 700; }
.winner-form { display: flex; flex-wrap: wrap; align-items: end; gap: 10px; margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); }
.winner-form input[type=file] { max-width: 100%; font: inherit; color: inherit; }
@media (max-width: 640px) {
  .winner.has-photo { flex-direction: column; }
  .winner.has-photo .winner-photo { width: 100%; justify-content: center; }
  .winner-photo img { width: auto; max-width: 100%; max-height: 70vh; }
  .winner.photo-landscape .winner-photo img { width: 100%; }
  .winner.has-photo .winner-info { padding: 16px; }
}

/* ---- Pesquisa rápida dentro de uma tabela (assets/filter.js) ---- */
.table-filter { display: flex; align-items: center; gap: 8px; max-width: 360px; margin: 0 0 10px; color: var(--muted); }
.table-filter input { flex: 1; min-width: 0; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; }
.table-filter input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.table-filter span { white-space: nowrap; }
tr[hidden] { display: none; }

/* ---- Lista de países com bandeira em imagem (country_select); reaproveita .dial-item e .dial-search ---- */
.fsel { position: relative; flex: 0 1 240px; min-width: 0; }
.fsel summary { display: flex; align-items: center; gap: 8px; height: 100%; min-height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg); color: var(--text); cursor: pointer; list-style: none; }
.fsel summary::-webkit-details-marker { display: none; }
.fsel summary:hover, .fsel[open] summary { border-color: var(--accent); }
.fsel summary:focus-visible { outline: 2px solid var(--accent); outline-offset: -1px; }
.fsel summary svg { flex: none; margin-inline-start: auto; transform: rotate(90deg); color: var(--text2); }
.fsel-flag { display: inline-flex; flex: none; }
.fsel-flag:empty { display: none; }
.fsel-flag img { border-radius: 2px; }
.fsel-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fsel-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 30; width: max(100%, 280px); max-width: calc(100vw - 32px); padding: 8px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); box-shadow: var(--shadow); }
.fsel .dial-list { max-height: 320px; }
.fsel .dial-item b { color: var(--muted); font-weight: 400; }
.fsel-noflag, .dial-item .fsel-noflag { flex: none; width: 22px; height: 16px; }
.search.filters .fsel .dial-search { flex: none; }

/* ---- Chat em direto do torneio (lib/chat.php, assets/chat.js) ---- */
.chat-box { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.chat-log { display: flex; flex-direction: column; gap: 2px; height: 340px; max-height: 60vh; margin: 0; padding: 10px 12px; overflow-y: auto; list-style: none; overscroll-behavior: contain; }
.chat-log li { padding: 5px 8px; border-radius: var(--radius-sm); overflow-wrap: anywhere; }
.chat-log li.mine { background: var(--panel2); }
.chat-log li.chat-off { opacity: .55; }
.chat-log li.chat-off .chat-text { text-decoration: line-through; }
.chat-log li.chat-empty { margin: auto; text-align: center; }
.chat-meta { display: block; font-size: 12.5px; color: var(--muted); }
.chat-meta b { color: var(--accent); font-weight: 600; }
.chat-meta b a { color: inherit; }
.chat-meta .tag { margin-inline: 4px 0; font-weight: 400; }
.chat-text { display: block; color: var(--text); }
.chat-mod { display: flex; gap: 6px; margin-top: 4px; }
.chat-mod .btn { padding: 2px 8px; font-size: 12px; font-weight: 500; }
.chat-note { margin: 0; padding: 8px 12px; border-top: 1px solid var(--line); color: var(--text2); font-size: 13.5px; }
.chat-note.warn { background: #2c2410; color: #f0d98a; }
.chat-note.err { background: #3a1818; color: #ffb4b4; }
.chat-form { display: flex; gap: 8px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); background: var(--panel2); }
.chat-form input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; }
.chat-form input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.chat-form input:disabled, .chat-form .btn:disabled { opacity: .5; cursor: not-allowed; }
.chat-form[hidden], .chat-note[hidden] { display: none; }
.chat-admin td form { display: inline-flex; margin: 0 4px 4px 0; }
.chat-admin .chat-off td:nth-child(3) { text-decoration: line-through; color: var(--muted); }
@media (max-width: 640px) {
  .chat-log { height: 300px; }
}

/* ---- Partilhar nas redes sociais (lib/share.php, assets/share.js) ---- */
.share { position: relative; display: inline-block; margin: 2px 0 14px; }
.share summary { list-style: none; }
.share summary::-webkit-details-marker { display: none; }
.share[open] summary { border-color: var(--accent); color: var(--accent); }
.share-menu { position: absolute; inset-inline-start: 0; top: calc(100% + 6px); z-index: 19; display: flex; flex-direction: column; min-width: 230px; padding: 6px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); box-shadow: 0 14px 34px rgba(0, 0, 0, .5); }
.share-menu a, .share-menu button { display: block; width: 100%; padding: 9px 10px; border: 0; border-radius: 6px; background: none; color: var(--text2); font: inherit; font-size: 14.5px; text-align: start; cursor: pointer; }
.share-menu a:hover, .share-menu button:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.share-menu button[data-act=image] { margin-top: 4px; border-top: 1px solid var(--line); border-radius: 0 0 6px 6px; color: var(--accent); font-weight: 600; }
.share-menu button:disabled { opacity: .5; cursor: progress; }
.share-menu [hidden] { display: none; }
.share-msg { margin: 4px 0 0; padding: 8px 10px; border-radius: 6px; background: #123526; color: #9fe8c6; font-size: 13px; }

/* ---- Chat: convite para entrar, no lugar do campo de escrita, para quem só está a ler ---- */
.chat-guest { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0; padding: 10px 12px; border-top: 1px solid var(--line); color: var(--text2); font-size: 14px; }
.chat-guest span { flex: 1 1 200px; }

/* ---- Mãos: posição de cada jogador, descrição completa por baixo da mão e partilha ---- */
.lh-pos { display: inline-block; min-width: 30px; margin-inline-end: 6px; padding: 1px 5px; border-radius: 4px; background: var(--panel3); color: var(--accent); font-size: 10.5px; font-weight: 700; letter-spacing: .03em; text-align: center; vertical-align: 1px; }
.lh-heading { display: flex; flex-direction: column; gap: 2px; margin-bottom: 8px; }
.lh-heading b { color: var(--text); font-size: 15px; line-height: 1.25; }
.lh-heading span { color: var(--accent); font-size: 13.5px; font-weight: 600; }
.lh-heading small { color: var(--muted); font-size: 12.5px; }
.lh-story { margin: 10px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); font-size: 14px; line-height: 1.55; }
.lh-story p { margin: 0 0 6px; color: var(--text); overflow-wrap: anywhere; }
.lh-story p:last-child { margin-bottom: 0; }
.lh-share { margin: 8px 0 0; }

/* ---- Página de uma mão (mao.php) ---- */
.hand-page { max-width: 860px; }
.hand-page-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.hand-page-head .lh-heading b { font-size: 20px; }
.hand-page-head .lh-heading span { font-size: 15px; }

/* ---- Operador: comentário opcional da mão ---- */
.op-note { display: flex; flex-direction: column; gap: 4px; margin: 14px 0 6px; font-size: 12px; color: var(--muted); }
.op-note textarea { width: 100%; padding: 9px 10px; border-radius: 8px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; resize: vertical; }
.op-note textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }

/* ---- Naipes na narração das mãos (fundo escuro: cores mais claras que as das cartas) ---- */
.st { font-weight: 700; }
.st.h { color: #ff6b6b; }
.st.d { color: #6aa8ff; }
.st.c { color: #4cc77f; }
.st.s { color: var(--text); }

/* ---- Cartões com uma linha de detalhe por baixo (ex.: Inscrições: estado e late registration) ---- */
.tile .tile-sub { display: block; margin-top: 3px; font-style: normal; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.tile .tile-sub::first-letter { text-transform: uppercase; }
.tile b .badge { margin-left: 4px; font-size: 11.5px; vertical-align: 3px; text-transform: none; letter-spacing: 0; }

/* ---- Rodapé dos torneios de vários dias: barra fixa no fundo, mensagens em ciclo (assets/ticker.js) ---- */
body.has-ticker { padding-bottom: 56px; }
.ticker { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: flex; align-items: center; gap: 10px;
  min-height: 46px; padding: 8px 16px; background: rgba(24, 6, 4, .96); border-top: 1px solid var(--accent);
  box-shadow: 0 -6px 18px rgba(0, 0, 0, .35); backdrop-filter: blur(6px); }
.ticker-icon { flex: none; color: var(--accent); display: grid; place-items: center; }
.ticker-items { position: relative; flex: 1; min-width: 0; min-height: 22px; }
.ticker-item { position: absolute; inset: 0; display: flex; align-items: center; font-weight: 600; font-size: 14.5px;
  opacity: 0; transform: translateY(6px); transition: opacity .45s, transform .45s; pointer-events: none; }
.ticker-item.on { position: relative; opacity: 1; transform: none; pointer-events: auto; }
.ticker-dots { flex: none; display: flex; gap: 5px; }
.ticker-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.ticker-dots i.on { background: var(--accent); }
.ticker-edit summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.ticker-edit .form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-top: 12px; }
.ticker-edit .form-grid label { display: flex; flex-direction: column; gap: 5px; }
.ticker-edit .form-grid .wide { grid-column: 1 / -1; }
@media (prefers-reduced-motion: reduce) { .ticker-item { transition: none; } }

/* ---- Operador: wizard da mão (assets/operador.js) ---- */
.wz-step { display: flex; align-items: center; gap: 8px; }
.wz-n { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-size: 12.5px; font-weight: 800; }
.wz-streets { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.wz-streets li { flex: 1; padding: 6px 2px; border-radius: 6px; background: var(--panel); border: 1px solid var(--line); color: var(--muted); font-size: 11.5px; font-weight: 700; text-align: center; text-transform: uppercase; letter-spacing: .03em; }
.wz-streets li.done { color: var(--text2); background: var(--panel2); }
.wz-streets li.on { color: var(--accent-ink); background: var(--accent); border-color: var(--accent); }
.wz-pot { margin-inline-start: auto; }
.wz-pot b { color: var(--accent); font-size: 15px; }
.wz-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--panel2); border: 1px solid var(--accent); box-shadow: 0 0 0 3px rgba(227, 193, 107, .12); }
.wz-card.win { border-color: var(--green); box-shadow: 0 0 0 3px rgba(62, 207, 142, .12); }
.wz-card p { margin: 0; }
.wz-big { font-size: 20px; font-weight: 700; line-height: 1.3; }
.wz-big .pos, .op-seat .pos { display: inline-block; min-width: 34px; padding: 2px 6px; border-radius: 6px; background: var(--panel3); color: var(--accent); font-size: 11.5px; font-weight: 800; text-align: center; vertical-align: 3px; }
.op-seat .pos:empty { visibility: hidden; }
.wz-skip { color: #ff9b8f; font-size: 13px; }
.wz-acts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.op .wz-acts .act { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-height: 64px; padding: 8px 4px; font-size: 16px; font-weight: 800; }
.op .wz-acts .act small { font-size: 12px; font-weight: 600; color: inherit; opacity: .85; }
.op .wz-acts .act.fold { color: #ff9b8f; border-color: rgba(255, 122, 122, .45); }
.op .wz-acts .act.check, .op .wz-acts .act.call { color: var(--green); border-color: rgba(62, 207, 142, .5); }
.op .wz-acts .act.bet { color: var(--accent); border-color: var(--accent); }
.op .wz-acts .act.allin { background: #6b1a14; border-color: #c0392b; color: #ffd2cb; }
.wz-amount { display: flex; flex-direction: column; gap: 8px; }
.wz-amount label { display: flex; flex-direction: column; gap: 5px; color: var(--text2); font-size: 13px; font-weight: 600; }
.op .wz-amount input { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; background: var(--bg); }
.wz-quick { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 6px; }
.op .wz-quick button { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 4px; font-weight: 700; }
.op .wz-quick button small { color: var(--muted); font-weight: 600; font-size: 11.5px; }
.wz-row.turn { background: linear-gradient(90deg, rgba(227, 193, 107, .18), transparent 70%); border-radius: 8px; }
.wz-row.out, .wz-setup.out { opacity: .45; }
.wz-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: start; }
.op button.wz-name { padding: 6px 8px; border-style: dashed; background: none; }
.wz-put { color: var(--accent); font-weight: 700; font-size: 13px; font-variant-numeric: tabular-nums; }
.wz-cards { display: flex; gap: 2px; }
.op button.wz-in { flex: none; width: 30px; height: 30px; padding: 0; border-radius: 8px; color: var(--accent-ink); font-weight: 800; }
.op button.wz-in.on { background: var(--accent); border-color: var(--accent); }
@media (max-width: 420px) { .wz-acts { grid-template-columns: repeat(2, 1fr); } .wz-cards .pc { min-width: 26px; height: 34px; } }
.wz-row .lh-act { flex: none; padding: 2px 7px; font-size: 10.5px; }
.op-seat .wz-name + .lh-act, .op-seat .wz-name + .wz-put { margin-inline-start: 2px; }

/* ---- Direto: de quem é a vez e o pote (mão a decorrer) ---- */
.lh-flow { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; margin: 10px 2px 0; color: #cfe3d8; font-size: 13px; }
.lh-flow b { color: var(--accent); }
.lh-turn { display: inline-flex; align-items: center; gap: 6px; color: #fff; font-weight: 700; }
.lh-turn i { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); animation: lh-blink 1.2s ease-in-out infinite; }
.lh-turn em { font-style: normal; color: var(--accent); font-size: 11.5px; }
@keyframes lh-blink { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { .lh-turn i { animation: none; } }

/* ---- Torneio: separadores (assets/tabs.js) ---- */
.ttabs { position: sticky; top: var(--top-h, 60px); z-index: 15; display: flex; gap: 4px; margin: 18px 0 20px; padding: 5px; overflow-x: auto; scrollbar-width: none; border: 1px solid var(--line2); border-radius: var(--radius); background: rgba(36, 11, 9, .94); backdrop-filter: blur(10px); }
.ttabs::-webkit-scrollbar { display: none; }
.ttabs a { flex: 1 0 auto; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 14px; border-radius: var(--radius-sm); color: var(--text2); font-size: 14px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.ttabs a:hover { background: var(--panel2); color: var(--text); }
.ttabs a.on { background: var(--accent); color: var(--accent-ink); }
.ttabs a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.tt-live { width: 7px; height: 7px; border-radius: 50%; background: var(--green); animation: lh-blink 1.2s ease-in-out infinite; }
.ttabs a.on .tt-live { background: #0b6b3a; }
@media (max-width: 560px) { .ttabs a { padding: 8px 11px; font-size: 13px; } }
/* Telemóvel: só o separador ativo mostra o nome; os outros ficam no ícone (cabem todos sem deslizar). */

.tpanel > :first-child, .tpanel > .tmaos > :first-child { margin-top: 0; }
.tpanel > .cols > section > h2:first-child, .tpanel > section > h2:first-child { margin-top: 0; }
/* Mãos e chat lado a lado em ecrãs largos; o chat fica à vista enquanto se percorrem as mãos. */
.tmaos { display: grid; gap: 24px; }
@media (min-width: 1000px) {
  .tmaos.with-chat { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  .tmaos.with-chat #chat { position: sticky; top: calc(var(--top-h, 60px) + 72px); }
  .tmaos.with-chat .chat-log { height: calc(100vh - var(--top-h, 60px) - 230px); max-height: none; min-height: 260px; }
}
.tmaos #live:empty { display: none; }
/* Estrutura completa */
table.levels.full td, table.levels.full th { padding-block: 8px; }
table.levels.full tr.done td { color: var(--muted); }
table.levels.full .badge { margin-inline-start: 6px; padding: 1px 8px; font-size: 11px; vertical-align: 1px; }
table.levels.full .tag { margin-inline-start: 6px; }

/* ---- Mão: mesa desenhada (mao.php, assets/hand.js tableHtml) ---- */
.hand-page:has(.ptv) { max-width: 1100px; }
.lhand.ptv { padding: 0; background: none; border: 0; }
.lhand.ptv .lh-top { justify-content: flex-end; margin-bottom: 4px; }
.pt { position: relative; aspect-ratio: 2.05; margin: 0 0 6px; container-type: inline-size; }
.pt-rail { position: absolute; inset: 9% 5%; padding: clamp(9px, 2.1cqw, 22px); border-radius: 999px;
  background: linear-gradient(180deg, #f6ecd4 0%, #e3d1aa 45%, #c9b080 100%);
  box-shadow: 0 22px 46px rgba(0, 0, 0, .65), inset 0 2px 2px rgba(255, 255, 255, .8), inset 0 -5px 10px rgba(80, 55, 20, .35); }
.pt-felt { position: relative; width: 100%; height: 100%; overflow: hidden; border-radius: 999px;
  background:
    url("img/padrao-mesa.svg") 0 0 / clamp(64px, 8cqw, 104px) auto,
    radial-gradient(ellipse at 50% 42%, #b4181c 0%, #8c1115 48%, #5e0a0d 100%);
  box-shadow: inset 0 0 0 2px rgba(60, 10, 8, .7), inset 0 12px 34px rgba(0, 0, 0, .55); }
.pt-track { position: absolute; inset: 17% 19%; border-radius: 999px; background: radial-gradient(ellipse at 50% 45%, #7d0e12, #620a0d 70%); border: 1.5px solid rgba(227, 193, 107, .8); box-shadow: 0 0 0 4px rgba(98, 10, 13, .35), inset 0 4px 16px rgba(0, 0, 0, .35); }
/* Lugar do dealer: a almofada da mesa contorna-o (ao centro, em cima). */
.pt-dealer { position: absolute; z-index: 1; left: 50%; top: 9%; width: 17%; height: 12%; transform: translateX(-50%); border-radius: 0 0 999px 999px;
  background: linear-gradient(180deg, #e3d1aa, #c9b080); box-shadow: 0 6px 12px rgba(0, 0, 0, .45); }
.pt-dealer::after { content: ""; position: absolute; left: 14%; right: 14%; top: -1px; height: 62%; border-radius: 0 0 999px 999px; background: var(--bg); }
.pt-center { position: absolute; z-index: 2; left: 50%; top: 50%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 1.1cqw; }
.pt-center .board { display: flex; gap: .5cqw; margin: 0; }
.pt-center .pc { min-width: min(48px, 4.6cqw); height: min(66px, 6.4cqw); margin: 0; border-radius: 7px; font-size: min(21px, 2cqw); box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
.pt-center .pc.empty { background: rgba(0, 0, 0, .18); border: 1.5px dashed rgba(243, 231, 204, .28); box-shadow: none; }
.pt-logo { width: min(118px, 10.5cqw); opacity: .8; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .5)); }
.pt-pot { padding: 3px 13px; border-radius: 99px; background: rgba(0, 0, 0, .5); color: #f3e7cc; font-size: clamp(11.5px, 1.4cqw, 14px); white-space: nowrap; }
.pt-pot b { color: var(--accent); font-variant-numeric: tabular-nums; }
.pt-pot:empty { display: none; }
/* Jogadores: placa com foto, nome e jogo feito; cartas por trás da placa; posição e jogada por cima. */
.pt-seat { position: absolute; z-index: 3; transform: translate(-50%, -50%); }
.pt-plate { position: relative; display: flex; align-items: center; gap: 8px; width: clamp(128px, 16.8cqw, 184px); padding: 5px 12px 5px 5px; border-radius: 999px;
  background: linear-gradient(180deg, rgba(42, 17, 13, .97), rgba(16, 6, 5, .97)); border: 1.5px solid rgba(227, 193, 107, .5); box-shadow: 0 8px 20px rgba(0, 0, 0, .6); transition: border-color .3s, box-shadow .3s; }
.pt-plate .lh-photo { width: clamp(32px, 4.3cqw, 46px); height: clamp(32px, 4.3cqw, 46px); border-width: 2px; }
.pt-id { display: flex; flex-direction: column; min-width: 0; line-height: 1.22; }
.pt-id b { display: flex; align-items: center; gap: 4px; min-width: 0; color: #fff; font-size: clamp(11px, 1.3cqw, 13.5px); font-weight: 700; white-space: nowrap; }
.pt-id b a, .pt-id b span { overflow: hidden; text-overflow: ellipsis; color: inherit; }
.pt-id .flag { flex: none; width: 16px; height: 12px; border-radius: 2px; }
.pt-id small { min-height: 1.2em; color: #d8bba9; font-size: clamp(9.5px, 1.1cqw, 11.5px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt-pos { position: absolute; left: clamp(4px, 1cqw, 10px); top: auto; bottom: -9px; padding: 0 7px; border-radius: 99px; background: #3a1612; border: 1px solid rgba(227, 193, 107, .65); color: var(--accent); font-size: 10px; font-style: normal; font-weight: 800; line-height: 16px; letter-spacing: .04em; }
.pt-plate .lh-act { position: absolute; right: -10px; top: -13px; padding: 1px 9px; font-size: 10.5px; box-shadow: 0 3px 8px rgba(0, 0, 0, .5); }
.pt-plate .lh-act.check, .pt-plate .lh-act.call, .pt-plate .lh-act.fold { background: #2a2320; }
.pt-hole { position: absolute; z-index: -1; bottom: calc(100% - 6px); left: 36%; display: flex; transform: translateX(-50%); }
.pt-hole .pc { min-width: clamp(28px, 3.6cqw, 38px); height: clamp(39px, 5cqw, 53px); margin: 0 -3px; border-radius: 5px; font-size: clamp(12px, 1.55cqw, 16px); box-shadow: 0 4px 10px rgba(0, 0, 0, .55); }
.pt-hole .pc:first-child { transform: rotate(-6deg); }
.pt-hole .pc:last-child { transform: rotate(6deg); }
.pc.back { background: repeating-linear-gradient(45deg, #9b1418 0 3px, #730d10 3px 6px); border: 2px solid #f3e7cc; }
.pt-eq { position: absolute; top: calc(100% + 5px); left: 50%; width: 76%; flex-direction: row-reverse; align-items: center; gap: 6px; transform: translateX(-50%); }
.pt-eq b { font-size: 13px; text-shadow: 0 1px 2px #000; }
.pt-eq i { flex: 1; height: 5px; background: rgba(0, 0, 0, .45); }
.pt-won { position: absolute; top: calc(100% + 6px); left: 50%; transform: translateX(-50%); padding: 3px 12px; border-radius: 99px; background: var(--gold-grad); color: var(--accent-ink); font-size: 11.5px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; box-shadow: 0 0 18px rgba(227, 193, 107, .65); }
.pt-seat.lead .pt-plate { border-color: rgba(62, 207, 142, .85); box-shadow: 0 0 0 2px rgba(62, 207, 142, .25), 0 8px 20px rgba(0, 0, 0, .6); }
.pt-seat.lead .pt-eq b { color: var(--green); }
.pt-seat.win .pt-plate { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(227, 193, 107, .35), 0 0 28px rgba(227, 193, 107, .5); }
.pt-seat.win .pt-id small { color: var(--accent); }
.pt-seat.out .pt-plate, .pt-seat.lost .pt-plate { opacity: .55; filter: grayscale(.6); }
.pt-seat.lost .pt-hole { opacity: .6; }
.pt-seat.acted .pt-plate { animation: pt-pulse .9s ease both; }
@keyframes pt-pulse { 40% { box-shadow: 0 0 0 4px rgba(227, 193, 107, .45), 0 8px 20px rgba(0, 0, 0, .6); } }
.pt-chair { display: grid; place-items: center; width: min(36px, 3.4cqw); height: min(36px, 3.4cqw); border-radius: 50%; background: rgba(243, 231, 204, .07); border: 1.5px dashed rgba(243, 231, 204, .25); color: rgba(243, 231, 204, .4); font-size: 11px; }
/* Fichas apostadas à frente de cada jogador e o botão do dealer. */
.pt-bet { position: absolute; z-index: 4; display: flex; align-items: center; gap: 6px; padding: 2px 10px 2px 4px; transform: translate(-50%, -50%); border-radius: 99px; background: rgba(0, 0, 0, .58); color: #fff; font-size: clamp(11px, 1.3cqw, 13px); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pt-bet.allin { background: rgba(120, 18, 14, .9); box-shadow: 0 0 0 1px #ff8a7a; }
.pt-chips { flex: none; width: 16px; height: 16px; margin-bottom: 5px; border-radius: 50%;
  background: radial-gradient(circle, #f4e3a6 0 30%, transparent 32%), conic-gradient(#c9302c 0 12.5%, #fff 0 25%, #c9302c 0 37.5%, #fff 0 50%, #c9302c 0 62.5%, #fff 0 75%, #c9302c 0 87.5%, #fff 0);
  box-shadow: 0 2px 0 #7d1210, 0 3px 0 #fff, 0 5px 0 #7d1210; }
.pt-dbtn { position: absolute; z-index: 2; display: grid; place-items: center; width: 24px; height: 24px; transform: translate(-50%, -50%); border-radius: 50%; background: radial-gradient(circle at 40% 35%, #fff, #ddd); color: #1a1a1a; font-size: 12px; font-weight: 900; box-shadow: 0 2px 0 #9a9a9a, 0 5px 10px rgba(0, 0, 0, .5); }
.pt .lh-callout { z-index: 6; }
.lhand.ptv .lh-log { margin-top: 2px; }
@media (prefers-reduced-motion: reduce) { .pt-seat.acted .pt-plate { animation: none; } }
.pt-d { display: none; }

/* ---- Botão de ajuda no topo e página de ajuda (ajuda.php) ---- */
.helpbtn { order: 3; display: grid; place-items: center; width: 38px; height: 34px; border: 1px solid var(--line2); border-radius: var(--radius-sm); color: var(--text2); }
.helpbtn:hover, .helpbtn.on { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.helpbtn + .langs { margin-inline-start: 0; }
@media (max-width: 1060px) { .helpbtn { order: 0; } }
.help { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 28px; align-items: start; }
.help-toc { position: sticky; top: calc(var(--top-h, 61px) + 16px); }
.help-toc h1 { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; }
.help-toc h1 .ico { color: var(--accent); }
.help-toc nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; }
.help-toc nav a { display: flex; align-items: center; gap: 9px; padding: 8px 10px; border-radius: var(--radius-sm); color: var(--text2); font-size: 14.5px; }
.help-toc nav a:hover { background: var(--panel2); color: var(--text); text-decoration: none; }
.help-toc nav a .ico { color: var(--accent); }
.help-body { display: flex; flex-direction: column; gap: 18px; }
.help-sec { display: block; scroll-margin-top: calc(var(--top-h, 61px) + 14px); }
.help-sec h2 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; }
.help-sec h2 .ico { color: var(--accent); }
.help-sec p { margin: 0 0 10px; line-height: 1.55; color: var(--text2); }
.help-terms { display: flex; flex-direction: column; gap: 8px; margin: 0 0 12px; padding: 0; list-style: none; }
.help-terms li { padding: 9px 12px; border-radius: var(--radius-sm); background: var(--panel2); line-height: 1.5; color: var(--text2); }
.help-terms b { color: var(--text); }
.help-steps { margin: 6px 0 10px; padding: 0; list-style: none; counter-reset: st; }
.help-steps li { position: relative; padding: 7px 0 7px 40px; line-height: 1.5; color: var(--text2); counter-increment: st; }
.help-steps li::before { content: counter(st); position: absolute; left: 0; top: 5px; display: grid; place-items: center; width: 27px; height: 27px; border-radius: 50%; background: var(--gold-grad); color: var(--accent-ink); font-weight: 800; font-size: 13px; }
[dir="rtl"] .help-steps li { padding: 7px 40px 7px 0; }
[dir="rtl"] .help-steps li::before { left: auto; right: 0; }
.help-dev { margin: 0 0 10px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel2); }
.help-dev summary { display: flex; align-items: center; gap: 8px; padding: 12px 14px; cursor: pointer; list-style: none; }
.help-dev summary::-webkit-details-marker { display: none; }
.help-dev summary::after { content: "›"; margin-inline-start: auto; color: var(--muted); font-size: 20px; line-height: 1; transition: transform .2s; }
.help-dev[open] summary::after { transform: rotate(90deg); }
.help-dev[open] { border-color: rgba(227, 193, 107, .5); }
.help-dev > :not(summary) { margin-inline: 14px; }
.help-mine { padding: 1px 8px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); font-size: 11px; font-style: normal; font-weight: 700; }
.help-installed:not([hidden]) { display: flex; align-items: center; gap: 6px; color: var(--green) !important; }
.help-faq { border-bottom: 1px solid var(--line); }
.help-faq summary { padding: 11px 0; font-weight: 600; cursor: pointer; }
.help-faq p { margin: 0 0 12px; }
@media (max-width: 860px) {
  .help { grid-template-columns: minmax(0, 1fr); }
  .help-toc { position: static; }
  .help-toc nav { flex-direction: row; flex-wrap: wrap; gap: 6px; }
  .help-toc nav a { padding: 6px 10px; border: 1px solid var(--line2); border-radius: 99px; font-size: 13px; }
}

/* Mão (mesa desenhada): a última jogada anunciada numa faixa por cima da mesa, sem tapar as cartas. */
.lhand.ptv .lh-top { justify-content: space-between; align-items: center; min-height: 36px; }
.pt-say { flex: 1 1 auto; display: flex; min-width: 0; }
.pt-said { display: inline-flex; align-items: center; gap: 8px; max-width: 100%; padding: 4px 6px 4px 12px; border-radius: 99px; background: rgba(10, 6, 5, .85); border: 1px solid rgba(255, 255, 255, .25); color: #fff; animation: pt-said .45s cubic-bezier(.2, .8, .3, 1) both; }
.pt-said span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #e9d9cf; font-size: 13px; font-weight: 600; }
.pt-said b { flex: none; padding: 2px 10px; border-radius: 99px; background: rgba(255, 255, 255, .14); font-size: 12.5px; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; white-space: nowrap; }
.pt-said.bet b, .pt-said.raise b, .pt-said.reraise b { background: var(--accent); color: var(--accent-ink); }
.pt-said.allin { border-color: #ff8a7a; } .pt-said.allin b { background: #c0392b; color: #fff; }
.pt-said.fold b { color: #b9c4be; }
@keyframes pt-said { from { opacity: 0; transform: translateY(6px); } }
@media (prefers-reduced-motion: reduce) { .pt-said { animation: none; } }

/* Telemóvel: a mesa continua deitada; cada lugar fica compacto (cartas, foto, nome e jogada em coluna). */
.pt.sm { aspect-ratio: 1.3; margin: 4px -10px 26px; }
.pt.sm .pt-rail { inset: 13% 6%; padding: 2.4cqw; }
.pt.sm .pt-track { inset: 19% 17%; }
.pt.sm .pt-felt { background-size: 13cqw auto, auto; }
.pt.sm .pt-dealer { top: 13%; width: 20%; height: 9%; }
.pt.sm .pt-logo { width: 14cqw; }
.pt.sm .pt-center { top: 53%; gap: 1.8cqw; }
.pt.sm .pt-center .board { gap: .8cqw; }
.pt.sm .pt-center .pc { min-width: 8.4cqw; height: 11.6cqw; border-radius: 4px; font-size: 3.9cqw; }
.pt.sm .pt-pot { padding: 2px 9px; font-size: max(10.5px, 3.2cqw); }
.pt.sm .pt-plate { flex-direction: column; gap: 2px; width: 23cqw; padding: 0; border: 0; border-radius: 0; background: none; box-shadow: none; }
.pt.sm .pt-plate .lh-photo { width: 10cqw; height: 10cqw; font-size: 3cqw; box-shadow: 0 3px 8px rgba(0, 0, 0, .6); }
.pt.sm .pt-id { align-items: center; max-width: 100%; padding: 1px 5px; border-radius: 6px; background: rgba(16, 6, 5, .92); border: 1px solid rgba(227, 193, 107, .35); }
.pt.sm .pt-id b { max-width: 100%; font-size: max(10px, 2.9cqw); }
.pt.sm .pt-id .flag { display: none; }
.pt.sm .pt-id small { max-width: 100%; min-height: 0; font-size: max(8.5px, 2.5cqw); }
.pt.sm .pt-id small:empty { display: none; }
.pt.sm .pt-pos { left: 14.5cqw; top: 6.4cqw; bottom: auto; padding: 0 4px; font-size: max(8px, 2.3cqw); line-height: 1.45; }
.pt.sm .pt-plate .lh-act { position: static; padding: 0 6px; font-size: max(8.5px, 2.4cqw); box-shadow: none; }
.pt.sm .pt-hole { bottom: calc(100% - 3cqw); left: 50%; }
.pt.sm .pt-hole .pc { min-width: 8.6cqw; height: 12cqw; margin: 0 -1px; border-radius: 4px; font-size: 4cqw; }
.pt.sm .pt-hole .pc.back { border-width: 1.5px; }
.pt.sm .pt-eq { top: calc(100% + 2px); width: 100%; gap: 3px; }
.pt.sm .pt-eq b { font-size: max(9.5px, 2.8cqw); }
.pt.sm .pt-won { top: calc(100% + 3px); padding: 1px 7px; font-size: max(8.5px, 2.4cqw); }
.pt.sm .pt-bet { gap: 3px; padding: 1px 6px 1px 2px; font-size: max(10px, 2.9cqw); }
.pt.sm .pt-chips { width: 11px; height: 11px; margin-bottom: 3px; }
.pt.sm .pt-chair { width: 7cqw; height: 7cqw; font-size: 2.6cqw; }
.pt.sm .pt-dbtn { display: none; }
.pt.sm .pt-d { position: absolute; left: 3.6cqw; top: 0; display: grid; place-items: center; width: max(14px, 4.2cqw); height: max(14px, 4.2cqw); border-radius: 50%; background: #fff; color: #1a1a1a; font-size: max(8px, 2.4cqw); font-style: normal; font-weight: 900; box-shadow: 0 2px 4px rgba(0, 0, 0, .5); }
.pt.sm .pt-seat.win .lh-photo { border-color: var(--accent); box-shadow: 0 0 14px rgba(227, 193, 107, .75); }
.pt.sm .pt-seat.win .pt-id { border-color: var(--accent); }
.pt.sm .pt-seat.lead .lh-photo { border-color: var(--green); }
.pt.sm .pt-seat.out .pt-plate, .pt.sm .pt-seat.lost .pt-plate { filter: grayscale(.6); }
@media (max-width: 640px) {
  .lhand.ptv .lh-top { flex-direction: column-reverse; align-items: stretch; gap: 8px; }
  .lhand.ptv .lh-steps { justify-content: flex-end; }
  .pt-say { justify-content: center; min-height: 30px; }
  .pt-said span { font-size: 12px; } .pt-said b { font-size: 11.5px; }
}
/* Telemóvel: sem sombra na placa (fica transparente); o destaque passa para a foto. O logótipo do casino sobe para cima do pote. */
.pt.sm .pt-seat .pt-plate, .pt.sm .pt-seat.lead .pt-plate, .pt.sm .pt-seat.win .pt-plate { box-shadow: none; animation: none; }
.pt.sm .pt-seat.acted .lh-photo { animation: pt-pulse-sm .9s ease both; }
@keyframes pt-pulse-sm { 40% { box-shadow: 0 0 0 4px rgba(227, 193, 107, .55); } }
.pt.sm .pt-logo { order: -1; width: 12cqw; opacity: .7; }
.pt.sm .pt-center { top: 47%; gap: 1.4cqw; }
@media (prefers-reduced-motion: reduce) { .pt.sm .pt-seat.acted .lh-photo { animation: none; } }
.pt.sm { aspect-ratio: 1.15; }
.pt.sm .pt-rail { inset: 12% 5%; }
.pt.sm .pt-track { inset: 19% 16%; }
.pt.sm .pt-dealer { top: 12%; }

/* ---- Separadores do torneio em destaque: barra sólida com contorno dourado e ícones a dourado ---- */
.ttabs { padding: 6px; border-color: rgba(227, 193, 107, .5); background: linear-gradient(180deg, #3d1611 0%, #260b09 100%); backdrop-filter: none;
  box-shadow: 0 10px 26px rgba(0, 0, 0, .5), inset 0 1px 0 rgba(255, 255, 255, .06); }
.ttabs a { color: var(--text); }
.ttabs a .ico { color: var(--accent); }
.ttabs a.on { background: var(--gold-grad); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(227, 193, 107, .35); }
.ttabs a.on .ico { color: var(--accent-ink); }
/* Telemóvel: todos os separadores com ícone e nome por baixo, do mesmo tamanho (cabem sem deslizar). */
@media (max-width: 560px) {
  .ttabs { gap: 3px; padding: 5px; }
  .ttabs a { flex: 1 1 0; min-width: 0; flex-direction: column; gap: 3px; padding: 8px 3px 7px; font-size: 10.5px; font-weight: 700; letter-spacing: .01em; }
  .ttabs a .ico { width: 21px; height: 21px; }
  .ttabs a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .ttabs a .tt-live { position: absolute; top: 7px; left: calc(50% + 10px); }
  .ttabs a { position: relative; }
}
.ttabs .tt-s { display: none; }
@media (max-width: 560px) {
  .ttabs a .tt-l:has(+ .tt-s) { display: none; }
  .ttabs .tt-s { display: block; }
  .ttabs a { font-size: 10px; letter-spacing: 0; }
}
@media (max-width: 560px) { .ttabs a { flex: 1 1 auto; padding-inline: 4px; } }

/* Estrutura: fichas de cada entrada (iniciais, extra stack, early bird, rebuy e add-on). */
.struct-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.struct-chips span { padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); font-size: 13.5px; }
.struct-chips b { color: var(--accent); font-variant-numeric: tabular-nums; }

/* ---- Vouchers de cash (vouchers.php) ---- */
.voucher-rules { display: block; }
.voucher-week { display: flex; flex-wrap: wrap; gap: 8px; }
.voucher-week span { padding: 7px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--panel2); font-size: 13.5px; color: var(--text2); }
.voucher-week span.on { border-color: rgba(227, 193, 107, .55); }
.voucher-week span.off { opacity: .55; }
.voucher-week b { display: block; color: var(--text); }
.voucher-night { margin: 22px 0 8px; }
.voucher-list tr.off td { opacity: .5; }
.voucher-list td small { display: block; font-size: 11.5px; }
.voucher-acts { display: inline-flex; gap: 6px; margin: 0; }

/* Cash: voucher desta noite (lib/vouchers.php, voucher_public) */
.voucher-promo { flex-direction: row; align-items: center; gap: 16px; margin: 4px 0 22px; padding: 16px 18px; border-color: rgba(227, 193, 107, .55);
  background: linear-gradient(120deg, rgba(227, 193, 107, .16), rgba(36, 11, 9, .9) 55%); }
.vp-ico { flex: none; display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--gold-grad); color: var(--accent-ink); }
.vp-body { flex: 1 1 auto; min-width: 0; }
.vp-title { display: block; color: var(--accent); font-size: 17px; }
.vp-body p { margin: 4px 0 0; color: var(--text); line-height: 1.45; }
.vp-week { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted) !important; }
.vp-week b { color: var(--text2); font-weight: 600; }
@media (max-width: 560px) { .voucher-promo { flex-wrap: wrap; } .voucher-promo .btn { width: 100%; justify-content: center; } }
.voucher-promo .btn { flex: none; white-space: nowrap; }
.vp-game { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px !important; padding: 3px 10px; border-radius: 99px; background: rgba(0, 0, 0, .3); color: var(--accent) !important; font-size: 13px; font-weight: 600; }
tr.vp-target td { background: rgba(227, 193, 107, .08); }
.vp-badge { background: var(--gold-grad); color: var(--accent-ink); font-size: 11px; padding: 1px 8px; }

/* ---- Vouchers: regras da semana em grelha (um dia por linha; no telemóvel, um cartão por dia) ---- */
.vr-grid { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.vr-head, .vr-day { display: grid; grid-template-columns: 165px minmax(230px, 1.8fr) 118px 150px minmax(140px, 1fr); gap: 12px; align-items: center; }
.vr-head { padding: 0 14px; color: var(--muted); font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.vr-day { padding: 10px 14px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel2); transition: border-color .2s, background .2s; }
.vr-day:has(.vr-on:checked) { border-color: rgba(227, 193, 107, .55); background: linear-gradient(90deg, rgba(227, 193, 107, .1), var(--panel2) 40%); }
.vr-day:not(:has(.vr-on:checked)) .vr-field { opacity: .45; }
.vr-dayname { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; cursor: pointer; }
.vr-dayname .vr-toggle { grid-row: 1 / span 2; }
.vr-dayname b { color: var(--text); font-size: 14.5px; }
.vr-state { font-size: 11.5px; color: var(--muted); }
.vr-state .on { display: none; color: var(--accent); }
.vr-dayname:has(.vr-on:checked) .vr-state .on { display: inline; }
.vr-dayname:has(.vr-on:checked) .vr-state .off { display: none; }
.vr-field { display: block; min-width: 0; }
.vr-label { display: none; margin-bottom: 4px; color: var(--muted); font-size: 11px; letter-spacing: .05em; text-transform: uppercase; }
.vr-field select, .vr-field input[type="time"], .vr-money input {
  width: 100%; height: 40px; padding: 0 12px; border: 1px solid var(--line2); border-radius: var(--radius-sm);
  background: var(--panel); color: var(--text); font: inherit; font-size: 14px; color-scheme: dark; }
.vr-field select { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background: var(--panel) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23e3c16b' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; }
.vr-field select option { background: var(--panel); color: var(--text); }
.vr-field select:focus, .vr-field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 193, 107, .18); }
.vr-money { position: relative; display: block; }
.vr-money input { padding-right: 52px; font-variant-numeric: tabular-nums; }
.vr-money em { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 12.5px; font-style: normal; pointer-events: none; }
.vr-check { display: flex; align-items: center; gap: 10px; cursor: pointer; color: var(--text2); font-size: 13.5px; }
/* Interruptor (checkbox) */
.vr-toggle { appearance: none; -webkit-appearance: none; position: relative; flex: none; width: 42px; height: 24px; margin: 0; border-radius: 99px; background: var(--panel3); border: 1px solid var(--line2); cursor: pointer; transition: background .2s, border-color .2s; }
.vr-toggle::before { content: ""; position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #cdb9ad; transition: transform .2s, background .2s; }
.vr-toggle:checked { background: var(--accent); border-color: var(--accent); }
.vr-toggle:checked::before { transform: translateX(18px); background: var(--accent-ink); }
.vr-toggle:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 900px) {
  .vr-head { display: none; }
  .vr-day { grid-template-columns: 1fr 1fr; gap: 12px 12px; padding: 14px; }
  .vr-dayname { grid-column: 1 / -1; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
  .vr-field:nth-of-type(2) { grid-column: 1 / -1; }
  .vr-check { grid-column: 1 / -1; }
  .vr-label { display: block; }
  .vr-label-inline { display: none; }
}
@media (max-width: 900px) {
  .vr-check > span { display: flex; flex-direction: column; }
  .vr-check .vr-label-inline { display: block; margin-bottom: 2px; }
}

/* Vouchers: período da lista (atalhos e datas) */
.voucher-period { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 20px; margin: 0 0 16px; padding: 14px 16px; }
.vp-presets { display: flex; flex-wrap: wrap; gap: 6px; }
.vp-chip { padding: 7px 14px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); font-size: 13.5px; font-weight: 600; text-decoration: none; }
.vp-chip:hover { border-color: var(--accent); color: var(--text); text-decoration: none; }
.vp-chip.on { background: var(--gold-grad); border-color: transparent; color: var(--accent-ink); }
.vp-dates { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px; }
.vp-dates .vr-label { display: block; }
.vp-dates input[type="date"] { width: 160px; height: 40px; padding: 0 10px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--panel); color: var(--text); font: inherit; font-size: 14px; color-scheme: dark; }
.vp-dates input[type="date"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(227, 193, 107, .18); }
.vp-dates .btn { height: 40px; }
@media (max-width: 560px) { .vp-dates { width: 100%; } .vp-dates .vr-field { flex: 1 1 0; } .vp-dates input[type="date"] { width: 100%; } .vp-dates .btn { width: 100%; justify-content: center; } }
.card.voucher-period { flex-direction: row; }
.card.now-empty { flex-direction: row; align-items: center; justify-content: flex-start; text-align: start; }

/* Cash: blinds praticados em lista (cabe na coluna estreita sem barra de deslocamento) */
.stakes-list { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); overflow: hidden; }
.stakes-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 11px 14px; border-top: 1px solid var(--line); }
.stakes-list li:first-child { border-top: 0; }
.stakes-list li:hover { background: var(--panel2); }
.sl-main, .sl-buyin { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sl-main b { color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; }
.sl-main small, .sl-buyin small { color: var(--muted); font-size: 12px; }
.sl-buyin { align-items: flex-end; text-align: end; }
.sl-buyin b { color: var(--accent); font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* Barras de deslocamento das tabelas largas: escuras, como o resto do portal (eram brancas). */
.scroll { scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }
.scroll::-webkit-scrollbar { height: 8px; width: 8px; }
.scroll::-webkit-scrollbar-track { background: transparent; }
.scroll::-webkit-scrollbar-thumb { background: var(--line2); border-radius: 99px; }

/* ---- Lista de torneios concluídos: cartões no telemóvel (lib/partial_tournament_table.php) ---- */
.tour-cards, .tour-sort { display: none; }
@media (max-width: 640px) {
  .tour-table { display: none; }
  .tour-sort { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin: 0 0 10px; font-size: 13px; }
  .tour-sort .sort-link { padding: 5px 11px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); text-decoration: none; }
  .tour-sort .sort-link.on { background: var(--gold-grad); border-color: transparent; color: var(--accent-ink); font-weight: 700; }
  .tour-cards { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
  .tour-cards a { display: flex; flex-direction: column; gap: 5px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text2); text-decoration: none; }
  .tour-cards a:active { background: var(--panel2); }
  .tcd-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
  .tcd-name { color: var(--accent); font-size: 15px; line-height: 1.3; }
  .tcd-prize { flex: none; color: var(--text); font-weight: 700; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; }
  .tcd-meta, .tcd-win { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted); font-size: 12.5px; }
  .tcd-win { color: var(--text2); }
  .tcd-win .ico { color: var(--accent); }
  .tcd-empty { padding: 12px 0; }
}
/* Torneios: filtros no telemóvel (uma coluna; Procurar e Limpar lado a lado) */
@media (max-width: 640px) {
  .search.filters { flex-wrap: wrap; }
  .search.filters input[type=search], .search.filters select { flex: 1 1 100%; width: 100%; max-width: none; }
  .search.filters .btn { flex: 1 1 0; justify-content: center; }
}

/* Ranking no telemóvel: posição, jogador (com ganhos e eventos por baixo) e pontos */
.rk-sub { display: none; }
@media (max-width: 640px) {
  .rk-sub { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; white-space: normal; line-height: 1.45; }
  .rk-sub b { color: var(--accent); font-weight: 700; }
  .rk-table .rk-pos { padding-inline: 8px 4px; }
  .rk-table .rk-pos .up, .rk-table .rk-pos .down { display: block; margin-top: 2px; font-size: 11px; text-align: center; }
  .rk-table td, .rk-table th { padding-inline: 8px; }
}

/* Ficha do jogador no telemóvel: histórico com torneio e lugar; a data e o prémio por baixo do nome */
.hist-sub { display: none; }
@media (max-width: 640px) {
  .hist-sub { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
  .hist-sub b { color: var(--accent); font-weight: 700; }
}

/* Cash: últimas sessões no telemóvel (data sem o ano, títulos mais pequenos que podem partir) */
@media (max-width: 640px) {
  .sess-table .sess-y { display: none; }
  .sess-table th { white-space: normal; font-size: 10.5px; letter-spacing: .03em; line-height: 1.25; vertical-align: bottom; }
  .sess-table th, .sess-table td { padding-inline: 8px; }
}

/* Estrutura do torneio no telemóvel: títulos abreviados (S. Blind, B. Blind, Dur.) e células mais estreitas */
table.levels.full th .sh { display: none; }
@media (max-width: 640px) {
  table.levels.full th .lg { display: none; }
  table.levels.full th .sh { display: inline; }
  table.levels.full th { font-size: 10.5px; letter-spacing: .03em; }
  table.levels.full th, table.levels.full td { padding-inline: 7px; }
  table.levels.full .badge, table.levels.full .tag { display: block; width: fit-content; margin: 3px 0 0; }
}
/* Estrutura: etiqueta do último nível de inscrições (torneios por começar) sem alargar a coluna no telemóvel */
table.levels.full .lv-reg .sh { display: none; }
@media (max-width: 640px) {
  table.levels.full .lv-reg .lg { display: none; }
  table.levels.full .lv-reg .sh { display: inline; }
  table.levels.full .lv-reg { white-space: normal; max-width: 76px; padding: 1px 6px; font-size: 10px; line-height: 1.25; text-align: left; }
  table.levels.full td:first-child { width: 1%; }
}

/* Mão (mesa desenhada): stack de cada jogador, a descer a cada jogada; e o botão do replay em pausa */
.pt-stack { position: absolute; right: 12px; bottom: -10px; display: inline-flex; align-items: center; gap: 5px; padding: 0 8px 0 4px; border-radius: 99px; background: #1b0a08; border: 1px solid rgba(227, 193, 107, .65); color: #f6e7b4; font-size: 11.5px; font-weight: 800; line-height: 17px; font-variant-numeric: tabular-nums; white-space: nowrap; transition: color .3s, border-color .3s; }
.pt-stack .pt-chips { width: 10px; height: 10px; margin: 0; box-shadow: none; }
.pt-stack.up { color: var(--green); border-color: var(--green); }
.pt-seat .pt-eq, .pt-seat .pt-won { top: calc(100% + 13px); }
.lh-steps button.play.paused { background: rgba(227, 193, 107, .16); }
.pt.sm .pt-stack { position: static; padding: 0 6px 0 3px; font-size: max(9px, 2.6cqw); line-height: 1.5; }
.pt.sm .pt-seat .pt-eq, .pt.sm .pt-seat .pt-won { top: calc(100% + 2px); }

/* Operador, passo 1: fichas de cada jogador no início da mão */
.op-seat .wz-stack { flex: none; width: 104px; height: 36px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; text-align: right; font-variant-numeric: tabular-nums; }
.op-seat .wz-stack:focus { outline: none; border-color: var(--accent); }
@media (max-width: 420px) { .op-seat .wz-stack { width: 84px; } }
/* maos.php: estatísticas e mãos do jogador. */
.hand-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin: 14px 0; }
.hand-stats .stat { padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.hand-stats .stat b { display: block; font-size: 22px; font-variant-numeric: tabular-nums; }
.hand-stats .stat span { color: var(--muted); font-size: 13px; }
.my-hands { display: grid; gap: 8px; }
.my-hand { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); color: var(--text); text-decoration: none; }
.my-hand:hover { border-color: var(--accent); }
.my-hand.won { border-inline-start: 3px solid var(--accent); }
.my-hand .mh-when { grid-column: 1 / -1; }
.my-hand .mh-cards { grid-column: 1; font-variant-numeric: tabular-nums; }
.my-hand .mh-tags { grid-column: 2; grid-row: 2 / span 2; align-self: center; }
/* Treino: o nome do jogador escreve-se no próprio lugar. */
.op-seat .wz-name { flex: 1; min-width: 0; height: 36px; padding: 0 8px; border: 1px solid var(--line2); border-radius: 8px; background: var(--panel2); color: var(--text); font: inherit; font-size: 14px; }
.op-seat .wz-name:focus { outline: none; border-color: var(--accent); }

/* Página da mão: mão anterior/seguinte e atalhos para o torneio */
.hand-nav { display: flex; flex-direction: column; gap: 12px; margin: 18px 0 6px; }
.hn-hands { display: flex; justify-content: space-between; gap: 10px; }
.hn-hands .btn { gap: 10px; padding: 8px 14px; text-align: start; }
.hn-hands .btn span { display: flex; flex-direction: column; line-height: 1.25; }
.hn-hands .btn small { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.hn-hands .btn:first-child .ico { transform: rotate(180deg); }
.hn-hands .hn-next { margin-inline-start: auto; text-align: end; }
.hn-hands .hn-next .ico { transform: none !important; }
.hn-links { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 560px) { .hn-links .btn { flex: 1 1 calc(50% - 8px); justify-content: center; } .hn-links .btn.primary { flex-basis: 100%; } }

/* Criar login (contas.php): enviar a palavra-passe por WhatsApp em destaque; escrevê-la à mão fica recolhido. */
.pw-wa { display: flex; flex-direction: column; gap: 6px; }
.pw-wa small { font-size: 13px; }
.pw-manual { border-top: 1px solid var(--line); padding-top: 12px; }
.pw-manual > summary { display: inline-flex; align-items: center; gap: 6px; color: var(--text2); font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
.pw-manual > summary::-webkit-details-marker { display: none; }
.pw-manual > summary:hover, .pw-manual[open] > summary { color: var(--accent); }
.pw-manual[open] > summary { margin-bottom: 12px; }
.pw-manual[open] { display: flex; flex-direction: column; gap: 12px; }
@media (max-width: 560px) { .pw-wa .btn { align-self: stretch; justify-content: center; white-space: normal; text-align: center; } }

/* Mesa em telemóvel, mesa cheia (9-10 lugares): mais alta, para os lugares dos lados não ficarem uns em cima dos
   outros. O ponto de cada lugar é o centro da foto: cartas por cima, jogada sobre o fundo da foto, nome e stack por
   baixo numa etiqueta só. As apostas são postas pelo hand.js fora destes blocos. */
.pt.sm { aspect-ratio: 0.84; margin: 4px -10px 18px; }
.pt.sm .pt-rail { inset: 10% 4% 17%; }
.pt.sm .pt-track { inset: 20% 17%; }
.pt.sm .pt-dealer { top: 10%; height: 6.5%; }
.pt.sm .pt-center { top: 46.5%; }
.pt.sm .pt-center .pc { min-width: 7.2cqw; height: 10cqw; font-size: 3.4cqw; }
.pt.sm .pt-seat { transform: translate(-50%, -4.75cqw); }
.pt.sm .pt-plate { width: 20.5cqw; gap: 0; }
.pt.sm .pt-plate .lh-photo { width: 9.5cqw; height: 9.5cqw; margin-bottom: 1.5cqw; }
.pt.sm .pt-hole { bottom: auto; top: -5.4cqw; }
.pt.sm .pt-hole .pc { min-width: 6cqw; height: 8.4cqw; font-size: 2.9cqw; }
.pt.sm .pt-id { align-self: stretch; padding: 0 3px; border-radius: 5px 5px 0 0; border-bottom: 0; line-height: 1.3; }
.pt.sm .pt-id:last-of-type { border-radius: 5px; }
.pt.sm .pt-id b { justify-content: center; font-size: max(9.5px, 2.75cqw); }
.pt.sm .pt-id small { font-size: max(8px, 2.3cqw); }
.pt.sm .pt-stack { align-self: stretch; justify-content: center; gap: 3px; padding: 0 3px; border-radius: 0 0 5px 5px; border-color: rgba(227, 193, 107, .35); border-top: 0; background: rgba(16, 6, 5, .92); font-size: max(8.5px, 2.5cqw); line-height: 1.45; }
.pt.sm .pt-stack .pt-chips { width: 8px; height: 8px; }
.pt.sm .pt-id:has(+ .pt-stack) { border-radius: 5px 5px 0 0; }
.pt.sm .pt-id:not(:has(+ .pt-stack)) { border-bottom: 1px solid rgba(227, 193, 107, .35); border-radius: 5px; }
.pt.sm .pt-plate .lh-act { position: absolute; left: 50%; top: 7.4cqw; z-index: 2; transform: translateX(-50%); padding: 0 5px; border: 1px solid rgba(255, 255, 255, .22); font-size: max(8px, 2.25cqw); line-height: 1.45; white-space: nowrap; box-shadow: 0 2px 5px rgba(0, 0, 0, .6); }
.pt.sm .pt-pos { left: auto; right: 1.6cqw; top: -1cqw; bottom: auto; font-size: max(7.5px, 2.1cqw); }
.pt.sm .pt-d { left: 2.2cqw; top: -1cqw; }
.pt.sm .pt-bet { gap: 2px; padding: 0 5px 0 2px; font-size: max(9.5px, 2.75cqw); line-height: 1.55; }
.pt.sm .pt-chips { width: 10px; height: 10px; margin-bottom: 2px; }
.pt.sm .pt-seat .pt-eq, .pt.sm .pt-seat .pt-won { top: calc(100% + 1px); }
.pt.sm .pt-eq i { height: 4px; }
/* Percentagem de vitória: só o número, ao lado da foto (a barra por baixo do nome tapava o lugar seguinte). */
.pt.sm .pt-seat .pt-eq { top: 2.6cqw; left: auto; right: 15.4cqw; width: auto; transform: none; }
.pt.sm .pt-eq i { display: none; }
.pt.sm .pt-eq b { padding: 0 4px; border-radius: 99px; background: rgba(10, 6, 5, .85); font-size: max(8.5px, 2.4cqw); line-height: 1.5; }
.pt.sm .pt-seat.pt-lft .pt-eq { right: auto; left: 15.4cqw; }
/* A linha por baixo do nome ("Desistiu", o jogo de cada um) só aparece no fim da mão, para a etiqueta não crescer. */
.pt.sm .pt-id small { display: none; }
.lhand.final .pt.sm .pt-seat:not(.out) .pt-id small:not(:empty) { display: block; }

/* Torneios: separadores Próximos / Concluídos e os cartões dos próximos */
.tour-tabs { margin: 14px 0 16px; }
.tour-tabs a { display: inline-flex; align-items: center; gap: 6px; padding: 7px 16px; font-size: 14px; }
.tour-next { margin-bottom: 8px; }
@media (max-width: 560px) { .tour-tabs a { flex: 1 1 0; justify-content: center; padding: 8px 10px; } }

/* Torneio, resumo: dias do torneio em etiquetas e o editor do rodapé informativo (operador) */
.tdays { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }
.tdays span { display: inline-flex; align-items: center; gap: 7px; padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel2); color: var(--text2); font-size: 13.5px; font-variant-numeric: tabular-nums; }
.tdays b { color: var(--accent); }
.tdays .ico { color: var(--muted); }
.card.ticker-edit { display: block; margin: 14px 0; padding: 0; border-color: var(--line2); }
.ticker-edit summary { align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 12px; padding: 14px 16px; list-style: none; }
.ticker-edit summary::-webkit-details-marker { display: none; }
.ticker-edit .te-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; min-width: 0; }
.ticker-edit .te-head b { display: inline-flex; align-items: center; gap: 7px; }
.ticker-edit summary > .ico { flex: none; color: var(--muted); transform: rotate(90deg); transition: transform .15s; }
.ticker-edit[open] summary > .ico { transform: rotate(-90deg); }
.ticker-edit[open] summary { border-bottom: 1px solid var(--line); }
.ticker-edit .form-grid { grid-template-columns: repeat(2, minmax(0, 260px)); gap: 14px 18px; margin: 0; padding: 16px; }
.ticker-edit .form-grid label { color: var(--text2); font-size: 13.5px; font-weight: 600; }
.ticker-edit .form-grid label small { font-weight: 400; line-height: 1.4; }
.ticker-edit .form-grid input, .ticker-edit .form-grid textarea { width: 100%; min-width: 0; padding: 9px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; font-size: 14.5px; }
.ticker-edit .form-grid input[type="time"] { color-scheme: dark; }
.ticker-edit .form-grid textarea { resize: vertical; min-height: 84px; }
.ticker-edit .form-grid input:focus, .ticker-edit .form-grid textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.ticker-edit .te-actions { display: flex; justify-content: flex-end; }
@media (max-width: 560px) {
  .ticker-edit .form-grid { grid-template-columns: 1fr; padding: 14px; }
  .ticker-edit .te-actions .btn { flex: 1; justify-content: center; }
  .tdays span { flex: 1 1 auto; justify-content: center; }
}
/* Ecrã largo: os dois campos curtos à esquerda e as mensagens ao lado, a toda a largura que sobra. */
@media (min-width: 900px) {
  .ticker-edit .form-grid { grid-template-columns: 220px 220px minmax(0, 1fr); align-items: start; }
  .ticker-edit .form-grid label.wide { grid-column: 3; grid-row: 1; }
  .ticker-edit .form-grid .te-actions { grid-column: 1 / -1; }
}
/* Rodapé: o nome do casino é uma ligação para o site dele */
.foot a { color: var(--text2); text-decoration: underline; text-decoration-color: var(--line2); text-underline-offset: 3px; }
.foot a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* A minha área: fotografia do jogador */
.card.my-photo { flex-direction: row; align-items: flex-start; gap: 16px; margin: 14px 0; border-color: var(--line2); }
.my-photo-pic { flex: none; display: grid; place-items: center; width: 96px; height: 96px; border-radius: 50%; overflow: hidden; background: var(--panel3); border: 2px solid var(--accent); color: var(--muted); }
.my-photo-pic img { width: 100%; height: 100%; object-fit: cover; }
.my-photo-body { display: flex; flex-direction: column; gap: 8px; min-width: 0; flex: 1; }
.my-photo-form { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.my-photo-form input[type=file] { flex: 1 1 220px; min-width: 0; max-width: 340px; padding: 7px 9px; border: 1px solid var(--line2); border-radius: var(--radius-sm); background: var(--bg); color: var(--text2); font: inherit; font-size: 13px; }
.my-photo-form input[type=file]::file-selector-button { margin-inline-end: 10px; padding: 5px 10px; border: 1px solid var(--line2); border-radius: 6px; background: var(--panel2); color: var(--text); font: inherit; cursor: pointer; }
/* perfil.php: cartão do perfil */
.card.me-card { gap: 14px; margin: 0 0 18px; padding: 18px; border-color: var(--line2); }
.me-top { display: flex; align-items: center; gap: 16px; min-width: 0; }
.me-top .my-photo-pic { width: 84px; height: 84px; }
.me-id { display: grid; gap: 4px; min-width: 0; }
.me-id h1 { margin: 0; font-size: clamp(20px, 5vw, 26px); overflow-wrap: anywhere; }
.me-id p { margin: 0; }
.me-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }   /* 4 numa linha ou 2 x 2, nunca 3 + 1 */
@media (max-width: 880px) { .me-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.me-actions form { margin: 0; display: flex; }
.me-actions .btn { width: 100%; justify-content: flex-start; }
.me-photo { border-top: 1px solid var(--line); padding-top: 12px; }
.me-photo > summary { display: flex; align-items: center; gap: 8px; width: fit-content; color: var(--accent); font-weight: 600; cursor: pointer; }
.me-photo[open] > summary { margin-bottom: 8px; }
.me-photo p { margin: 8px 0; }
.my-photo-acts { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 480px) {
  .card.me-card { padding: 14px; }
  .me-top { gap: 12px; }
  .me-top .my-photo-pic { width: 64px; height: 64px; }
  .me-actions .btn { justify-content: center; padding: 10px 8px; font-size: 13px; text-align: center; white-space: normal; line-height: 1.25; }
  .my-photo-form input[type=file] { flex-basis: 100%; max-width: none; }
}
@media (max-width: 560px) { .card.my-photo { flex-direction: column; align-items: center; text-align: center; } .card.my-photo .my-photo-form { justify-content: center; } .card.my-photo .my-photo-pic { width: 110px; height: 110px; } }

/* Árabe (direita para a esquerda): uma célula que começa por algarismos ou letras latinas ("2 500 / 5 000 AKZ",
   nomes de jogadores) era tratada como texto da esquerda para a direita e ficava encostada à esquerda, ao contrário
   do resto da página. As células alinham sempre pelo lado de leitura; as numéricas (.r) ficam do lado oposto. */
[dir="rtl"] :is(td, th) { text-align: right; }
[dir="rtl"] :is(td, th).r { text-align: left; }

/* Contas: aviso de login bloqueado e as duas formas de repor a palavra-passe */
.badge.off { background: rgba(192, 57, 43, .18); border-color: rgba(255, 138, 122, .55); color: #ffb1a6; }
.card.lock-card { border-color: rgba(227, 193, 107, .45); }
.card.lock-card.on { border-color: rgba(255, 138, 122, .6); background: rgba(120, 18, 14, .18); }
.card.reset-card { gap: 0; padding: 0; border-color: var(--line2); }
.reset-opt { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; max-width: none; padding: 14px 16px; }
.reset-opt + .reset-opt { border-top: 1px solid var(--line); }
.reset-opt > b { display: inline-flex; align-items: center; gap: 7px; }
.reset-opt label { align-self: stretch; }
.reset-note { margin: 0; padding: 10px 16px; border-top: 1px solid var(--line); }

/* Operador: comandos de voz (assets/voz.js) — botão do microfone e aviso do que foi percebido */
.voz-mic { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 40; display: grid; place-items: center; width: 60px; height: 60px; border-radius: 50%; border: 2px solid var(--accent); background: #2a1210; color: var(--accent); cursor: pointer; box-shadow: 0 6px 20px rgba(0, 0, 0, .55); }
.voz-mic.on { background: #b3261e; border-color: #ffb1a6; color: #fff; animation: voz-pulse 1.2s infinite; }
@keyframes voz-pulse { 0% { box-shadow: 0 0 0 0 rgba(179, 38, 30, .6); } 70% { box-shadow: 0 0 0 16px rgba(179, 38, 30, 0); } 100% { box-shadow: 0 0 0 0 rgba(179, 38, 30, 0); } }
.voz-toast { position: fixed; left: 50%; bottom: 88px; z-index: 41; transform: translateX(-50%); display: flex; align-items: center; gap: 12px; max-width: calc(100vw - 24px); padding: 11px 16px; border-radius: 12px; border: 1px solid var(--accent); background: #2a1210; color: #f6e7b4; font-size: 16px; font-weight: 600; box-shadow: 0 6px 20px rgba(0, 0, 0, .55); }
.voz-toast[hidden] { display: none; }
.voz-toast.err { border-color: #ff8a7a; color: #ffb1a6; }
.voz-toast button { flex: none; padding: 6px 12px; border: 0; border-radius: 8px; background: #6b1a14; color: #fff; font: inherit; font-size: 14px; cursor: pointer; }
@media (prefers-reduced-motion: reduce) { .voz-mic.on { animation: none; } }
/* O que o microfone está a ouvir, numa legenda ao lado do botão */
.voz-heard { position: fixed; inset-inline-end: 86px; bottom: 26px; z-index: 40; max-width: min(520px, calc(100vw - 104px)); padding: 9px 14px; border-radius: 18px; border-end-end-radius: 4px; border: 1px solid var(--line2); background: rgba(24, 9, 8, .95); color: var(--muted); font-size: 15px; font-style: italic; line-height: 1.35; overflow-wrap: anywhere; box-shadow: 0 6px 20px rgba(0, 0, 0, .5); }
.voz-heard.final { color: var(--text); font-style: normal; font-weight: 600; border-color: rgba(227, 193, 107, .55); }
.voz-heard[hidden] { display: none; }

/* Voltar ao topo (assets/ui.js) */
.to-top { position: fixed; inset-inline-end: 16px; bottom: 16px; z-index: 35; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--accent); background: rgba(36, 11, 9, .94); color: var(--accent); cursor: pointer; box-shadow: 0 6px 18px rgba(0, 0, 0, .5); }
.to-top:hover { background: var(--accent); color: var(--accent-ink); }
.to-top[hidden] { display: none; }
body:has(.voz-mic) .to-top { bottom: 88px; }      /* no operador, por cima do microfone */
/* Olho para ver a palavra-passe */
.pw-field { position: relative; display: block; }
.pw-field > input { width: 100%; padding-inline-end: 46px !important; }
.pw-eye { position: absolute; inset-inline-end: 4px; top: 50%; transform: translateY(-50%); display: grid; place-items: center; width: 38px; height: 38px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.pw-eye:hover, .pw-eye[aria-pressed="true"] { color: var(--accent); }
/* Operador: o valor do bet alinhado à direita, como num visor de valores */
.op .wz-amount input { text-align: right; }
body.has-ticker .to-top { bottom: 70px; }

/* voz.php: frases de voz por classificar */
.voz-list select { max-width: 100%; min-width: 150px; }
.voz-list td { vertical-align: middle; }
.voz-save { position: sticky; bottom: 12px; margin: 14px 0; text-align: right; }

/* jogadores.php: ocultar um jogador (administrador) */
.plist li .plist-act { margin-left: auto; }
.plist li.off > .avatar, .plist li.off > span { opacity: .55; }
.hide-player { margin: 0 0 14px; }

/* Índice das mãos do torneio (assets/live.js): uma linha por mão, que abre o painel completo. */
.hx:not(:empty) { margin-top: 26px; }
.hx-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 10px; }
.hx-head h2 { margin: 0; }
.hx-head input { flex: 0 1 260px; min-width: 0; padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line2); background: var(--bg); color: var(--text); font: inherit; }
.hx-head input:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: transparent; }
.hx-tabs { display: flex; gap: 6px; margin-bottom: 10px; overflow-x: auto; scrollbar-width: none; }
.hx-tabs:empty { display: none; }
.hx-tabs button { flex: none; padding: 6px 12px; border-radius: 99px; border: 1px solid var(--line); background: var(--panel); color: var(--text2); font: inherit; font-size: 13px; cursor: pointer; }
.hx-tabs button small { margin-left: 4px; color: var(--muted); }
.hx-tabs button.on { border-color: var(--accent); color: var(--accent); background: var(--panel3); font-weight: 700; }
.hx-list { display: flex; flex-direction: column; gap: 6px; }
.hx-item { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.hx-item.open { border-color: var(--accent); }
.hx-row { display: grid; grid-template-columns: 62px auto minmax(0, 1fr) auto 14px; align-items: center; gap: 12px; width: 100%; padding: 9px 12px; border: 0; background: none; color: inherit; font: inherit; text-align: start; cursor: pointer; }
.hx-row:hover { background: var(--panel3); }
.hx-row small { display: block; color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-no b { display: block; color: var(--accent); font-size: 16px; line-height: 1.2; }
.hx-board { display: inline-flex; gap: 2px; min-width: 128px; font-size: 12px; }
.hx-board .pc { min-width: 24px; height: 31px; margin-inline-end: 2px; padding: 0 3px; font-size: 12.5px; }
.hx-main { min-width: 0; }
.hx-win { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hx-end { text-align: end; }
.hx-end b { display: block; color: var(--accent); }
.hx-chev { width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); transition: transform .15s; }
.hx-item.open .hx-chev { transform: rotate(-135deg); }
.hx-body:empty { display: none; }
.hx-body { padding: 12px; border-top: 1px solid var(--line); }
.hx-body .lhand { margin: 0; }
.hx-plain { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.hx-empty { padding: 14px 4px; }
.hx-pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 14px; }
.hx-pager button { min-width: 36px; height: 36px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line); background: var(--panel); color: var(--text2); font: inherit; cursor: pointer; }
.hx-pager button.on { border-color: var(--accent); background: var(--panel3); color: var(--accent); font-weight: 700; }
.hx-pager button:disabled { opacity: .4; cursor: default; }
.hx-pager span { color: var(--muted); padding: 0 4px; }
@media (max-width: 640px) {
  .hx-head input { flex-basis: 100%; }
  .hx-row { grid-template-columns: 50px minmax(0, 1fr) auto 12px; gap: 4px 10px; padding: 9px 10px; }
  .hx-board { grid-column: 2 / 4; grid-row: 2; min-width: 0; }
  .hx-no { grid-row: 1 / 3; }
  .hx-chev { grid-row: 1 / 3; grid-column: 4; }
  .hx-body { padding: 8px; }
}

/* mao.php: eliminar a mão (administrador) */
.hand-delete { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.btn.danger { border-color: #8f2a22; background: #5a1410; color: #ffd9d0; }
.btn.danger:hover { background: #74201a; }

/* whatsapp.php: envios automáticos */
.wa-sched td { vertical-align: middle; }
.wa-sched .inline-form { display: inline-block; margin: 2px 0 2px 4px; }
.wa-sched-form { margin-top: 14px; display: grid; gap: 12px; }
.wa-sched-row { display: flex; flex-wrap: wrap; gap: 12px; }
.wa-sched-row label { flex: 1 1 200px; }
.wa-sched-days { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.wa-sched-days legend { padding: 0 6px; color: var(--muted); font-size: 13px; }
.wa-sched-days label { display: inline-flex; align-items: center; gap: 6px; }

/* regras_maos.php */
.hand-rules { display: grid; gap: 16px; max-width: 760px; }
.hand-rules fieldset { margin: 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; display: grid; gap: 10px; }
.hand-rules legend { padding: 0 6px; color: var(--accent); font-weight: 700; }
.hand-rules .check { display: flex; align-items: center; gap: 10px; }
.hand-rules .check input { width: 18px; height: 18px; flex: none; }
.hand-rules-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hand-rules-row label { flex: 1 1 220px; }
.hand-rules p { margin: 0; }

/* fecho.php: fecho diário de caixa */
.closing-pending { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 14px; border-color: #6e5520; }
.closing-day { align-items: center; flex-wrap: wrap; }
.closing-day label { display: inline-flex; align-items: center; gap: 8px; }
.closing-day input { flex: none; }
.closing-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; margin-top: 14px; }
.closing-card { display: grid; gap: 12px; align-content: start; }
.closing-card h2 { margin: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.closing-card p { margin: 0; }
.closing-hours td, .closing-hours th { padding: 4px 6px; }
.closing-hours input[type=time] { width: auto; }

/* Modal de fotografia (ui.js, data-lightbox) */
dialog.lightbox{padding:0;border:0;background:transparent;max-width:96vw;max-height:94vh;overflow:visible}
dialog.lightbox::backdrop{background:rgba(0,0,0,.85)}
dialog.lightbox img{display:block;max-width:96vw;max-height:94vh;width:auto;height:auto;border-radius:10px}
.lightbox-close{position:absolute;top:-14px;right:-14px;width:40px;height:40px;border-radius:50%;border:2px solid #fff;background:#111;color:#fff;font-size:26px;line-height:1;cursor:pointer;z-index:1}
@media (max-width:600px){.lightbox-close{top:8px;right:8px}}

/* Pré-visualização da imagem do torneio no bot (whatsapp.php) */
.wa-share-img { display: block; max-width: 100%; height: auto; padding: 0; }
.wa-sched-form .check { display: flex; align-items: center; gap: 8px; }
/* Janela de edição de um envio do bot (whatsapp.php) */
dialog.wa-edit-dialog { width: min(620px, 94vw); max-height: 90vh; overflow: auto; padding: 18px 20px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; }
dialog.wa-edit-dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog.wa-edit-dialog .wa-sched-form { margin-top: 0; }
.wa-sched td > a.btn, .wa-sched .inline-form { vertical-align: middle; margin: 2px 0 2px 4px; }
.wa-sched-form label.check, .wa-sched-days label { display: flex; flex-direction: row; align-items: center; justify-content: flex-start; gap: 8px; text-align: left; }
.wa-sched-form input[type="checkbox"] { width: auto; flex: 0 0 auto; margin: 0; }
/* Envios automáticos do bot (whatsapp.php?aba=envios): lista simples com interruptor */
.wa-auto-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.wa-auto-head p { margin: 0; }
.wa-group { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; font-size: 17px; }
.wa-group small { font-weight: 400; }
.wa-empty { margin: 0 0 6px 4px; }
.wa-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.wa-item { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border-top: 1px solid var(--line); }
.wa-item:first-child { border-top: 0; }
.wa-item.off .wa-what { opacity: .55; }
.wa-what { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.wa-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }
.wa-acts { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; }
.wa-acts .inline-form { margin: 0; }
.icon-btn { padding: 6px 8px; line-height: 0; }
.wa-switch-form { margin: 0; flex: 0 0 auto; }
.wa-switch { position: relative; width: 44px; height: 24px; padding: 0; border-radius: 12px; border: 1px solid var(--line); background: var(--panel3, #3a2420); cursor: pointer; }
.wa-switch span { position: absolute; top: 2px; left: 2px; width: 18px; height: 18px; border-radius: 50%; background: #cbb; transition: left .15s; }
.wa-switch.on { background: var(--green, #2ecc71); border-color: transparent; }
.wa-switch.on span { left: 22px; background: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wa-fields { border: 0; margin: 0; padding: 0; display: grid; gap: 12px; min-width: 0; }
.wa-fields[hidden] { display: none; }
.wa-more summary { cursor: pointer; color: var(--muted); }
.wa-more[open] { display: grid; gap: 12px; }
.wa-dialog-acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
@media (max-width: 600px) { .wa-item { flex-wrap: wrap; } .wa-acts { margin-left: 58px; } }

/* Novidades (novidades.php): feed da página do Facebook */
.fb-feed { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.fb-feed iframe { display: block; width: 100%; max-width: 500px; height: calc(100vh - 200px); min-height: 500px; border: 0; border-radius: 12px; background: #fff; overflow: hidden; }
.news-head { align-items: center; margin-bottom: 18px; }
.news-head p { margin: 0; }
.news-date { color: var(--muted); font-size: 12.5px; }
/* Lista: um destaque a toda a largura e seis cartões; 3, 2 ou 1 coluna conforme o ecrã. */
.news-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.news-card { position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); transition: border-color .15s, transform .15s; }
.news-card:hover, .news-card:focus-within { border-color: var(--accent); }
.news-pic { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; background: radial-gradient(120% 140% at 0% 0%, #4a1a14 0%, var(--panel2) 60%); color: var(--accent); }
.news-pic img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.news-pic img.blur { object-fit: cover; filter: blur(18px) brightness(.55); transform: scale(1.15); }
.news-info { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; padding: 14px 16px 16px; }
.news-info h2 { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; font-size: 17px; line-height: 1.3; overflow-wrap: anywhere; }
.news-info h2 a { color: #fbf3e4; }
.news-info h2 a::after { content: ''; position: absolute; inset: 0; z-index: 1; border-radius: var(--radius); }   /* o cartão todo abre a publicação */
.news-info h2 a:hover { text-decoration: none; }
.news-info h2 a:focus-visible { outline: none; }
.news-info h2 a:focus-visible::after { outline: 2px solid var(--accent); outline-offset: -2px; }
.news-sum { display: -webkit-box; margin: 0; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; color: var(--text2); font-size: 14px; line-height: 1.5; overflow-wrap: anywhere; }
.news-go { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 4px; color: var(--accent); font-size: 13.5px; font-weight: 600; }
[dir=rtl] .news-go .ico, [dir=rtl] .news-pages .next .ico { transform: scaleX(-1); }
.news-card.first { grid-column: 1 / -1; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.news-card.first .news-pic { aspect-ratio: auto; min-height: 360px; }
.news-card.first .news-info { justify-content: center; gap: 12px; padding: 28px; }
.news-card.first h2 { font-size: clamp(20px, 2.4vw, 28px); line-height: 1.2; }
.news-card.first .news-sum { -webkit-line-clamp: 5; line-clamp: 5; font-size: 15px; }
.news-card.first .news-go { margin-top: 0; }
.news-pages { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 26px; }
.news-pages a, .news-pages span { display: inline-grid; place-items: center; min-width: 40px; height: 40px; padding: 0 8px; border: 1px solid var(--line2); border-radius: var(--radius-sm); color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.news-pages a:hover { border-color: var(--accent); text-decoration: none; }
.news-pages .on { border-color: var(--accent); background: var(--accent); color: #2b1a05; }
.news-pages .gap { min-width: 20px; padding: 0; border-color: transparent; color: var(--muted); }
.news-pages .prev .ico { transform: scaleX(-1); }
[dir=rtl] .news-pages .prev .ico { transform: none; }
/* Uma publicação: a fotografia ao lado do texto (por cima, em ecrãs estreitos). */
.news-full { max-width: 760px; margin: 0 auto; }
.news-full.has-pic { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); align-items: start; gap: 32px; max-width: none; }
.news-full-pic { position: sticky; top: 84px; display: block; width: 100%; height: auto; max-height: calc(100vh - 110px); object-fit: contain; border-radius: var(--radius); background: var(--panel); }
.news-full-text { min-width: 0; }
.news-full h1 { margin: 6px 0 18px; font-size: clamp(23px, 3.2vw, 32px); overflow-wrap: anywhere; }
.news-body { color: var(--text); font-size: 16px; line-height: 1.65; overflow-wrap: anywhere; }
.news-body p { margin: 0 0 16px; }
.news-body h2 { display: block; margin: 24px 0 8px; color: var(--accent); font-size: 15px; letter-spacing: .03em; }
.news-acts { margin: 22px 0 0; }
.news-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 32px; padding-top: 22px; border-top: 1px solid var(--line); }
.news-nav a { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 12px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); color: var(--text); }
.news-nav a:hover { border-color: var(--accent); text-decoration: none; }
.news-nav small { color: var(--muted); }
.news-nav b { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; font-size: 14.5px; line-height: 1.35; overflow-wrap: anywhere; }
.news-nav .older { grid-column: 2; text-align: end; }
.news-admin { margin-top: 36px; }
.news-admin > summary { display: flex; align-items: center; gap: 8px; width: fit-content; padding: 6px 0; color: var(--text2); font-size: 14px; cursor: pointer; }
.news-admin > summary small { color: var(--muted); }
@media (max-width: 960px) {
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .news-card.first .news-pic { min-height: 280px; }
  .news-card.first .news-info { padding: 20px; }
  .news-full.has-pic { grid-template-columns: minmax(0, 1fr); gap: 18px; max-width: 760px; }
  .news-full-pic { position: static; max-height: 80vh; }
}
@media (max-width: 600px) {
  .news-grid { grid-template-columns: minmax(0, 1fr); }
  .news-card.first { display: flex; }
  .news-card.first .news-pic { min-height: 0; aspect-ratio: 4 / 3; }
  .news-card.first .news-info { justify-content: flex-start; gap: 8px; padding: 14px 16px 16px; }
  .news-card.first .news-sum { -webkit-line-clamp: 4; line-clamp: 4; }
  .news-pages { gap: 4px; }
  .news-pages a, .news-pages span { min-width: 34px; height: 38px; padding: 0 4px; }
  .news-pages .gap { min-width: 14px; }
  .news-body { font-size: 15.5px; }
  .news-nav { grid-template-columns: minmax(0, 1fr); }
  .news-nav .older { grid-column: auto; text-align: start; }
}
.age-gate { display: grid; justify-items: center; gap: 10px; max-width: 460px; margin: 24px auto; text-align: center; }
.age-gate h2, .age-gate p { justify-content: center; margin: 0; }
.age-gate-18 { display: inline-grid; place-items: center; width: 72px; height: 72px; border: 3px solid var(--accent); border-radius: 50%; color: var(--accent); font-size: 24px; font-weight: 700; }
.age-gate-acts { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 6px; }
.fb-settings { margin-top: 24px; display: grid; gap: 10px; max-width: 560px; }
.fb-settings input { width: 100%; }
.fb-settings fieldset { border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; padding: 10px 12px; display: grid; gap: 6px; }
.fb-settings label.check { display: flex; flex-direction: row; align-items: center; gap: 8px; }
.fb-settings label.check input { width: auto; }

/* Telemóvel com poucos jogadores na mão (até 4): cartas, fotos e nomes maiores (no computador nada muda). */
.pt.sm.few .pt-center .pc { min-width: 8.4cqw; height: 11.8cqw; font-size: 4.2cqw; border-radius: 5px; }
.pt.sm.few .pt-center .board { gap: .8cqw; }
.pt.sm.few .pt-plate { width: 27cqw; }
.pt.sm.few .pt-plate .lh-photo { width: 12cqw; height: 12cqw; font-size: 3.8cqw; }
.pt.sm.few .pt-hole { top: -12.6cqw; }
.pt.sm.few .pt-hole .pc { min-width: 10.6cqw; height: 14.8cqw; font-size: 5cqw; border-radius: 5px; }
/* Telemóvel: cada jogada entra em destaque numa caixa de mensagem sobre o pano, por cima das cartas da mesa, e fica
   até à jogada seguinte (no lugar do jogador já não aparece). */
.pt.sm .lh-callout.pt-msg { top: 4.5%; z-index: 7; gap: 0; max-width: 50%; padding: 1.6cqw 5cqw 1.8cqw; border-radius: 3cqw; border-width: 1.5px; animation: pt-msg .5s cubic-bezier(.2, .8, .3, 1) both; }
.pt.sm .lh-callout.pt-msg span { font-size: max(11px, 3.3cqw); }
.pt.sm .lh-callout.pt-msg b { font-size: max(15px, 5.4cqw); }
.pt.sm .lh-callout.pt-msg.allin { animation: pt-msg .5s cubic-bezier(.2, .8, .3, 1) both, callout-allin .8s ease-in-out 3; }
@keyframes pt-msg { 0% { opacity: 0; transform: translate(-50%, -50%) scale(.6); } 60% { opacity: 1; transform: translate(-50%, -50%) scale(1.08); } 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
@media (prefers-reduced-motion: reduce) { .pt.sm .lh-callout.pt-msg, .pt.sm .lh-callout.pt-msg.allin { animation: none; transform: translate(-50%, -50%); } }
.pt.sm.few .pt-id b { font-size: max(11px, 3.3cqw); }
.pt.sm.few .pt-id small, .pt.sm.few .pt-stack { font-size: max(10px, 2.9cqw); }
.pt.sm.few .pt-eq b { font-size: max(11px, 3.3cqw); }
.pt.sm.few .pt-pot { font-size: max(12px, 3.6cqw); }
.foot .foot-host { display: inline-flex; align-items: center; gap: 6px; }
.foot .foot-host img { width: auto; height: 34px; }

/* Corrigir as cartas de uma mão terminada (mao.php + assets/maocartas.js): como o registo ao vivo. */
.hand-cards-op { max-width: 560px; margin: 12px 0 0; display: flex; flex-direction: column; gap: 10px; }
.hand-cards-op h3 { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; }
.hand-cards-op p { margin: 0; }
.hand-cards-op .hc-slots { display: flex; gap: 4px; margin-inline-start: auto; }
.hand-cards-op .op-board .hc-slots { margin: 0 auto; }
.hand-cards-op .op-seat.out .nm { opacity: .6; }
.hand-cards-op .hc-picker { display: flex; flex-direction: column; gap: 8px; padding: 8px 0; }

/* Cash em direto (cash.php): o desenho adapta-se ao número de mesas abertas.
   1 mesa: a largura toda, mesa desenhada à esquerda e jogadores à direita; 2: lado a lado; 3+: grelha. */
.tables.live-cash { gap: 16px; }
.tables.live-cash.n1 { grid-template-columns: minmax(0, 1fr); }
.tables.live-cash.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tables.live-cash.nmany { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.live-cash .ptable { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; }
.live-cash .ptable h3 { display: flex; align-items: baseline; gap: 8px; margin: 0; font-size: 17px; }
.live-cash .ptable .hand-meta { margin: 4px 0 0; }
.live-cash .pt-main { min-width: 0; }
.live-cash .pt-side { min-width: 0; }
.live-cash .pt-side .cash-stakes { margin: 0 0 4px; }
.live-cash .ptable ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
.live-cash .ptable li { min-height: 30px; font-size: 14px; }
/* Uma mesa com mão a decorrer: mesa desenhada + coluna dos jogadores. */
.live-cash.n1 .ptable.has-hand { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: start; }
.live-cash.n1 .ptable.has-hand .pt-side { padding-inline-start: 20px; border-inline-start: 1px solid var(--line); }
.live-cash.n1 .ptable.has-hand ol { grid-template-columns: 1fr; }
.live-cash.n1 .ptable.has-hand .lhand.ptv .pt, .live-cash.n1 .ptable.has-hand .pt { max-width: 860px; margin-inline: auto; }
/* Duas ou mais: a lista dos jogadores fica por baixo, em colunas. */
.live-cash.n2 .ptable ol, .live-cash.nmany .ptable ol { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
@media (max-width: 980px) {
  .tables.live-cash.n2 { grid-template-columns: minmax(0, 1fr); }
  .live-cash.n1 .ptable.has-hand { display: flex; }
  .live-cash.n1 .ptable.has-hand .pt-side { padding-inline-start: 0; border-inline-start: 0; }
  .live-cash.n1 .ptable.has-hand ol { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
}
.live-cash .ptable li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.live-cash.n2 .ptable ol, .live-cash.nmany .ptable ol { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* Direto do torneio (live.js): a mão a decorrer com a mesa desenhada, como no replay. O desenho adapta-se ao número de
   mesas: uma ocupa a largura toda, duas ficam lado a lado, três ou mais numa grelha; a lista dos jogadores vai por baixo. */
.tables.live-tour { gap: 16px; }
.tables.live-tour.n1 { grid-template-columns: minmax(0, 1fr); }
.tables.live-tour.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tables.live-tour.nmany { grid-template-columns: repeat(auto-fill, minmax(min(100%, 460px), 1fr)); }
.live-tour .ptable { display: flex; flex-direction: column; gap: 10px; padding: 16px 18px; min-width: 0; }
.live-tour .ptable h3 { margin: 0; font-size: 17px; }
.live-tour .ptable.has-hand .pt { max-width: 860px; margin-inline: auto; }
.live-tour .ptable ol { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 0 14px; }
.live-tour .ptable li { min-height: 30px; font-size: 14px; }
.live-tour .ptable li a { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 980px) { .tables.live-tour.n2 { grid-template-columns: minmax(0, 1fr); } }
/* Mãos do índice abertas e últimas mãos do cash: a mesa desenhada não passa de uma largura confortável. */
.hx-body .pt, .hands .hand.rich .pt { max-width: 860px; margin-inline: auto; }
.hands .hand .hand-edit-btn { margin: 8px 0 0; }

/* Nomes dos pré-registados (cash, perfil e torneio). */
.prereg-names { display: block; margin-top: 4px; color: var(--text2); font-size: 13px; line-height: 1.5; }
.prereg-names svg { vertical-align: -2px; color: var(--muted); }
.prereg-names .pn { white-space: nowrap; }
.card.prereg .prereg-names { margin-top: 6px; }

/* Bomb pot com duas boards: a 2.ª board por baixo da 1.ª (operador, lista da mão e mesa desenhada). */
.op-board2 { align-items: center; }
.op-board2 small { margin-inline-end: 4px; font-size: 11px; }
.lhand .board.two { flex-wrap: wrap; row-gap: 4px; }
.lhand .board.two .board2 { display: flex; flex-basis: 100%; gap: inherit; }
.pt-center .board.board2 { margin-top: -0.6cqw; }
.pt-center:has(.board2) .pt-logo { display: none; }

/* Janela «Editar cartas» das mãos do torneio (assets/live.js). */
dialog.hand-edit-dialog { width: min(560px, 96vw); max-height: 92vh; overflow: auto; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel); color: inherit; }
dialog.hand-edit-dialog::backdrop { background: rgba(0, 0, 0, .7); }
dialog.hand-edit-dialog .hand-cards-op { margin: 0; max-width: none; }
.hand-edit-dialog .he-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.hand-edit-dialog .he-head h2 { margin: 0; font-size: 19px; }
.hand-edit-dialog .op button.he-x, .hand-edit-dialog button.he-x { padding: 2px 10px; font-size: 22px; line-height: 1; background: none; border: 0; color: var(--muted); }
.hx-body .hx-edit { margin: 8px 0 0; }

