/* Camada comum às duas edições. Mantém a identidade, com ações e estados legíveis. */
[hidden] { display: none !important; }
html, body { overscroll-behavior-y: contain; }
#verbos button { min-height: 58px; height: auto; padding: 9px 7px; display: flex; flex-direction: column; justify-content: center; gap: 4px; font-size: 16px; line-height: 1.15; color: #f3f4ff; background: linear-gradient(#434c68, #333c57 56%, #28314a); border: 1px solid #687596; box-shadow: inset 0 2px 1px #ffffff30, inset 0 -2px 0 #0003, 0 4px 0 #151d31, 0 7px 12px #0004; }
#verbos button small { display: block; font: 600 11px/1.3 system-ui,sans-serif; letter-spacing: 0; text-transform: none; opacity: 1; }
#verbos button::after, #verbos button::before { content: none; }
#verbos button.ligado:not(:disabled) { border-color: #e5ca95; box-shadow: inset 0 0 0 1px #e5ca95, 0 4px 0 #151d31; }
#verbos button:not(:disabled):hover { background: linear-gradient(#505b79, #36415d); }
#verbos button:disabled { opacity: .62; filter: saturate(.4); box-shadow: inset 0 1px 0 #fff4, 0 2px 0 #0004; transform: none; cursor: default; }
button:focus-visible, select:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid #ffd26f; outline-offset: 4px; }
#estado-acoes { margin: 3px 0 9px; font: 600 12px/1.4 system-ui,sans-serif; text-align: center; color: #fae9c8; }
#mesa-info { width: auto; min-width: 68px; min-height: 44px; padding: 8px 13px; font: 700 14px system-ui,sans-serif; }
#ajuda-sempre { position: fixed; right: 16px; bottom: 16px; z-index: 70; min-height: 44px; padding: 9px 18px; }
body:has(#deal.active) #ajuda-sempre { display: none; }
#conexao-mesa { position: sticky; top: 0; z-index: 150; background: #ffebbd; color: #342612; padding: 12px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 12px; box-shadow: 0 4px 12px #0004; }
#conexao-mesa button { min-height: 44px; color: white; background: #4a3920; }
#lobby-formato select { width: 100%; max-width: 100%; padding: 12px; min-height: 48px; white-space: normal; color: #2b2118; background: #fff2dc; border-radius: 10px; font: 600 14px system-ui,sans-serif; }
.escolha-formato label { display: flex; gap: 12px; align-items: center; padding: 14px; margin: 8px 0; border: 1px solid #d0b67d; border-radius: 12px; cursor: pointer; }
.escolha-formato label:has(input:checked) { background: #d4b46d22; outline: 2px solid #d0b67d; }
.escolha-formato input { width: 20px; height: 20px; accent-color: #ad7732; flex: 0 0 20px; }
.escolha-formato span { display: grid; gap: 4px; }
.escolha-formato small, .escolha-formato p { font-size: 13px; line-height: 1.5; }
.treino-dica { padding: 16px; border-radius: 14px; margin: 14px 0; background: #f8e7c6; color: #372817; border-left: 5px solid #b77e29; }
.treino-dica p { line-height: 1.55; margin: 10px 0; }
.treino-dica button { min-height: 44px; padding: 8px 18px; }
#log { min-height: 2.8em; line-height: 1.5; }
.presenca-lista { list-style: none; padding: 0; }
.presenca-lista li { display: flex; flex-wrap: wrap; gap: 8px; padding: 10px 0; border-bottom: 1px solid #b6925233; }
.presenca-lista span { flex-basis: 100%; }
.presenca-lista button { min-height: 44px; padding: 8px; font-size: 12px; }
#recuperacao-codigo { overflow-wrap: anywhere; user-select: all; padding: 14px; background: #f6e3bf; color: #312412; }
#sala-lista { display: none; }
#risco-dialog, #recuperar-dialog, #mesa-help-dialog { width: min(540px,calc(100vw - 32px)); max-height: 85dvh; overflow-y: auto; box-sizing: border-box; color: #312619; background: #fff1d8; border: 1px solid #ae8751; border-radius: 18px; padding: 22px; }
dialog::backdrop { background: #110c0ac2; }
dialog p { line-height: 1.6; }
dialog input { width: 100%; box-sizing: border-box; min-height: 48px; font-size: 16px; }
dialog .actions { display: flex; flex-wrap: wrap; gap: 12px; }
dialog button { min-height: 44px; }
.fechar-ajuda { position: sticky; top: -22px; z-index: 3; display: block; margin: -6px 0 14px auto; background: #4b3920; color: white; }
.ajuda-curta details { padding: 14px 0; border-bottom: 1px solid #bd996e55; }
.ajuda-curta summary { font-weight: 700; cursor: pointer; min-height: 30px; }
#treino-fim .wrap { padding-bottom: 90px; }
#treino-fim p { line-height: 1.6; }
@media(max-width:600px) {
  #deal .wrap { padding-bottom: max(24px, env(safe-area-inset-bottom)); }
  #verbos { gap: 10px; }
  #verbos button { min-height: 56px; font-size: 15px; }
  #cell-tempo .vez-inline b { font-size: 14px; overflow-wrap: anywhere; }
  .control-dock .status-cell { min-width: 0; }
  #painel { margin-bottom: 16px; }
}
@media(prefers-reduced-motion:reduce) { #verbos button { transition: none; } #deal #cell-tempo.urgente { animation: none; } }
@media(min-width:601px) {
  .treino-dica { display: grid; grid-template-columns: 1fr auto; gap: 6px 18px; align-items: center; }
  .treino-dica > b { grid-column: 1 / -1; }
  .treino-dica p { margin: 0; }
  .treino-dica button { grid-column: 2; grid-row: 2; }
}
#deal #mesa-question[hidden], #deal #mesa-sessao[hidden] { display: none !important; }
#deal .mobile-topbar { position: sticky; top: 0; z-index: 45; }
#deal #painel, #deal #monte-box { scroll-margin-top: 82px; }
#lobby-modalidade-texto { font-size: 14px; line-height: 1.5; }
#deal #cell-tempo.minha-vez:not(.urgente) { border-color: #515c7a; }
#deal #cell-tempo.minha-vez:not(.urgente) strong,
#deal #cell-tempo.minha-vez:not(.urgente) .vez-inline b { color: #f3f4ff; }
@media(max-width:600px) {
  #deal .control-dock .status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #deal .control-dock .cell-saldo { grid-template-columns: 40px minmax(0, 1fr); gap: 6px; height: auto; min-height: 56px; }
  #deal .cell-saldo .stash { transform: scale(.62); transform-origin: left center; }
  #deal .control-dock #cell-tempo { display: grid; grid-template-columns: 56px minmax(0,1fr); gap: 8px; align-items: start; height: auto; min-height: 56px; }
  #deal .control-dock #cell-tempo strong { font-size: 18px; }
  #deal .control-dock #cell-tempo .vez-inline { min-width: 0; }
  #deal .control-dock #cell-tempo .vez-inline b { font-size: 12px; line-height: 1.25; font-weight: 700; letter-spacing: 0; word-break: normal; overflow-wrap: anywhere; }
  #deal .deal-sala { min-height: 44px; }
  #deal .mark-name { font-size: 12px; }
  #lobby-qr { width: 192px; max-width: 100%; margin-inline: auto; }
}
@media(max-width:360px) {
  #deal .mark-name { display: none; }
}

#deal .mesa-areas,
#deal .mesa-areas-jogador,
#deal .mesa-areas-compartilhadas { display: grid; grid-template-columns: minmax(0, 1fr); gap: 12px; min-width: 0; align-items: start; }
#deal .mesa-areas section { min-width: 0; }
#deal .mesa-areas-jogador {
  gap: 10px;
  padding: 10px;
  border: 1px solid #5c6888;
  border-radius: 18px;
  background: #232b42;
}
#deal.vez-do-jogador .mesa-areas-jogador {
  border-color: #d6b477;
  box-shadow: inset 0 0 0 1px #d6b47730, 0 0 16px #eab5563b, 0 5px 16px #0004;
}
#deal #pistas-box { grid-column: auto !important; }
#deal .mesa-area-titulo { display: block; margin: 0 0 8px; color: #dbf3ff; font-size: .95rem; }
#deal .mesa-area-publica { padding: 12px; background: #102833; border: 1px solid #45798c; border-radius: 16px; }
#deal .mesa-area-publica .monte-box { margin-top: 8px; border-color: #45798c; }
#deal .mesa-area-pessoal { border: 1px solid #515c7a; border-radius: 12px; background: #29324b; }
#deal .mesa-area-pessoal .pistas-toggle small { color: #c3cce5; }
#deal .mesa-area-pessoal .pistas-toggle > span:first-child { flex-wrap: wrap; gap: 4px 8px; }
#deal .mesa-area-pessoal #hand { grid-template-columns: minmax(0, 1fr); }
#deal .mesa-area-outros { padding: 0 10px; background: #1a2530; border: 1px solid #526277; border-radius: 16px; }
#deal .mesa-area-outros .jogadores-bar { margin: 0; border: 0; background: transparent; box-shadow: none; }
#deal .mesa-area-outros .jogadores-bar summary::after { content: ""; border: solid currentColor; border-width: 0 2px 2px 0; width: 7px; height: 7px; transform: rotate(45deg); }
#deal .mesa-area-outros .jogadores-bar[open] summary::after { transform: rotate(225deg); }
#deal #ordem .ordem-vez { font-weight: 800; }
#deal .mesa-areas #painel { margin: 10px 0 0; }
#deal .mesa-area-pessoal #painel { padding-inline: 10px; }
#deal .mesa-balaio { margin: 8px 0 0; color: #d3eaf3; font-size: .78rem; line-height: 1.45; overflow-wrap: anywhere; }
#deal .mesa-areas h3 { margin: 10px 0 6px; font-size: .85rem; }
#deal .saldo-head small { line-height: 1.25; white-space: normal; }
#deal .control-dock {
  box-sizing: border-box;
  padding: 12px;
  border: 1px solid #515c7a;
  border-radius: 12px;
  background: #29324b;
}
#deal .control-dock .mesa-area-titulo { margin: 0 0 2px; color: #f3f4ff; }
#deal .control-dock .status-cell { background: #212940; }
#deal .control-dock .status-cell:not(.urgente) { border-color: #515c7a; }
#deal .control-dock .status-cell small { color: #c3cce5; }
#deal #estado-acoes { margin: 1px 0 3px; border-radius: 8px; padding: 5px 8px; }
#deal.vez-do-jogador #estado-acoes { color: #2c1d0c; background: #e8c988; font-weight: 800; }
#deal.vez-do-jogador #monte-box.compra-ativa { border-color: #e5c385; box-shadow: 0 0 13px #eac57760; }
#deal.vez-do-jogador #monte-box.compra-ativa .carta-costa:not(:disabled) {
  border-color: #f6d799;
  box-shadow: inset 1px 1px 2px #fff4, 0 4px 0 #62482f, 0 0 8px #eac57750;
}
#deal.vez-do-jogador #monte-box.compra-ativa .carta-costa:not(:disabled):is(:hover, :focus-visible),
#deal.vez-do-jogador #painel button[data-act]:not(:disabled),
#risco-dialog[open] #risco-confirmar {
  border-color: #f6d799;
  box-shadow: inset 0 0 0 1px #f6d799, 0 0 10px #eac57765;
}
#deal.vez-do-jogador #painel button[data-act]:not(:disabled):is(:hover, :focus-visible) { box-shadow: inset 0 0 0 2px #f6d799, 0 0 12px #eac57785; }
#risco-dialog[open] #risco-confirmar { color: #2c1d0c; background: linear-gradient(#f8dfa8, #dcb36b); }
#deal #verbos button.acao-guiada:not(:disabled) { outline: 2px solid #ffe092; outline-offset: 2px; }
@media(max-width:600px) {
  #deal .control-dock { position: static; transform: none; width: 100%; height: auto; padding: 8px; backdrop-filter: none; }
  #deal .mesa-areas-jogador { padding: 8px; }
  #deal .control-dock .mesa-area-titulo { font-size: .82rem; }
}
@media (min-width: 740px) {
  #deal .mesa-areas-jogador { grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
  #deal .mesa-areas-compartilhadas { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); }
}

#treino-passar { grid-column: 2; grid-row: 3; }
#fechamento-concluir { margin-top: 8px; }
#deal .jogada-bot { margin: 0 0 9px; color: #dde6f1; font-size: .8rem; }

/* === R43 · revisão visual das três edições (16/11/2026). Só aparência. === */
/* Títulos dos diálogos claros: estavam brancos sobre creme. */
#risco-dialog h2, #recuperar-dialog h2, #mesa-help-dialog .ajuda-curta h2 { color: #2a1c0c; }
/* Dica do treino: botões separados e menos vão acima da mesa. */
@media(max-width:600px) { .treino-dica { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; } .treino-dica > b, .treino-dica > p { flex: 0 0 100%; margin: 0; } }
#deal .deal-bar { margin-bottom: 8px; }
#deal .treino-dica { margin-top: 6px; }
/* Letra mínima de 11 px nos rótulos da mesa. */
#deal .cell-saldo small, #deal .status-cell small, #deal .tile small, #deal .ordem-vez, #deal .vez-inline, #deal .pista-chip small, #deal .chip small { font-size: 11px; }
#deal .cell-saldo small { letter-spacing: .04em; line-height: 1.15; }
/* Figura do saldo maior: antes ocupava 25 px de altura. */
#deal .cell-saldo .stash { transform: scale(.82); transform-origin: left center; }
/* Pódio: 1º no centro e mais alto, 2º à esquerda, 3º à direita. */
.podio-top3 .lugar-2 { order: 1; min-height: 90px; }
.podio-top3 .lugar-1 { order: 2; min-height: 108px; border-color: #e3bd72; box-shadow: inset 0 0 0 1px #e3bd7255, 0 4px 0 #6b4d2f; }
.podio-top3 .lugar-1 strong { color: #f3d28b; font-size: 1.25em; }
.podio-top3 .lugar-3 { order: 3; }
/* O botão flutuante de ajuda não cobre a última linha. */
#how-to-play .wrap, #open .wrap, #entrar .wrap, #fechamento .wrap, #judge .wrap, #lobby .wrap { padding-bottom: 76px; }
/* Regras completas dentro da ajuda (fundo creme): texto escuro no lugar do claro pensado para fundo escuro. */
#mesa-help-dialog :is(h1, h2, h3, h4, strong, b, summary) { color: #2a1c0c; }
#mesa-help-dialog :is(p, li, .lede, small, span) { color: #3d2e1c; }
#mesa-help-dialog .kicker { color: #0e6a61; }
#mesa-help-dialog :is(.how-bonus, .how-time, .how-risk, .how-end) { background: #f7e6c3; border-color: #bd996e; box-shadow: 0 3px 0 #b08a4566; }
/* "Pista ·" nas cartas: verde-água claro sobre creme não se lia. */
body[data-assistencia] #deal .tile small::before { color: #0e6a61; }
#jogadores-bar > summary > span, #ordem li small, #pistas-toggle small, #score-progress .score-step span, #score-progress .score-total span, #lobby-lista li small, #revelacao-campos .revelacao-campo small, .leque-wrap .area-heading small, .fechamento-tempo small { font-size: 11px; }
/* Telas de 360 px ou menos: a figura do saldo encolhe para o rótulo não encostar nela. */
@media(max-width:360px) { #deal .cell-saldo .stash { transform: scale(.6); } #deal .cell-saldo small { letter-spacing: 0; } }
