:root {
  color-scheme: dark;
  --page:       #0d0d0d;
  --lg-surface-1:  #1a1a19;
  --lg-surface-2:  #202220;
  --border:     rgba(255,255,255,0.10);
  --text-primary:   #ffffff;
  --text-secondary: #c3c2b7;
  --text-muted:     #898781;

  --lg-accent:     #3987e5;
  --accent-hover: #5aa0f0;

  --good:     #0ca30c;
  --warning:  #fab219;
  --critical: #e66767;

  --card-white: #f5f4f0;
  --lg-card-red:   #d03b3b;
  --card-black: #1a1a19;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--page);
  color: var(--text-primary);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

.app {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 64px;
}

.app-header {
  margin-bottom: 24px;
}
.app-header h1 {
  font-size: 24px;
  margin: 0 0 6px;
  font-weight: 700;
}
.subtitle {
  color: var(--text-secondary);
  margin: 0;
  font-size: 14px;
}

.layout {
  display: flex;
  flex-direction: column;
}

.panel {
  background: var(--lg-surface-1);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 18px 18px 20px;
  margin-bottom: 16px;
}

.panel h2 {
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-secondary);
  margin: 0 0 12px;
  font-weight: 700;
}

.panel-head-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.panel-head-row h2 { margin: 0; }
.active-target-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.hint {
  color: var(--text-muted);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  font-size: 12px;
}

/* Card slots */
.card-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hand-board-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.hand-board-col h2 { margin-bottom: 10px; }
.hand-board-col.hero-col { flex: 0 0 auto; }
.hand-board-col.board-col {
  flex: 1 1 auto;
  min-width: 220px;
  padding-left: 16px;
  border-left: 1px solid var(--border);
}
.hand-board-row .card-row { gap: 6px; }
.hand-board-row .card-slot {
  width: 46px;
  height: 64px;
}
.hand-board-row .card-slot .rank { font-size: 15px; }
.hand-board-row .card-slot .suit { font-size: 17px; }

.live-hand {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  min-height: 20px;
}
.live-hand:empty { display: none; }
.card-slot {
  width: 56px;
  height: 78px;
  border-radius: 8px;
  border: 2px dashed var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 22px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  cursor: pointer;
  transition: border-color .15s, transform .1s;
  position: relative;
  padding: 0;
  font-family: inherit;
}
.card-slot:hover { border-color: var(--lg-accent); }
.card-slot:active { transform: scale(0.97); }
.card-slot.filled {
  border-style: solid;
  background: var(--card-white);
  color: var(--card-black);
  border-color: var(--border);
}
.card-slot.filled.red { color: var(--lg-card-red); }
.card-slot .rank { font-size: 18px; line-height: 1; }
.card-slot .suit { font-size: 20px; line-height: 1; }

.slot-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.slot-wrap .mini-label {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.card-row.small .card-slot,
.card-row.small .mini-card {
  width: 40px;
  height: 56px;
}
.card-row.small { margin-top: 4px; }

.board-actions { margin-top: 8px; }
.link-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}
.link-btn:hover { color: var(--text-secondary); }

/* Stepper */
.stepper {
  display: flex;
  align-items: center;
  gap: 10px;
}
.stepper-btn {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--lg-surface-2);
  color: var(--text-primary);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
}
.stepper-btn:hover { border-color: var(--lg-accent); }
#opp-count { min-width: 14px; text-align: center; font-weight: 700; }

/* Opponents list */
.opp-head-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.opponents-summary {
  margin-bottom: 4px;
}
.opponents-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.opponents-list.collapsed {
  display: none;
}
.opponent-row {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  background: var(--lg-surface-2);
}
.opponent-row .opp-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 8px;
  font-weight: 600;
}
.opp-mode-row {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.mode-btn {
  flex: 1;
  min-width: 90px;
  padding: 6px 8px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.mode-btn.active {
  background: var(--lg-accent);
  border-color: var(--lg-accent);
  color: #fff;
}
.range-row {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  color: var(--text-secondary);
}
.range-row input[type="range"] { flex: 1; }
.range-value { min-width: 40px; text-align: right; font-weight: 700; color: var(--text-primary); }

/* Pot row */
.pot-row {
  display: flex;
  gap: 12px;
}
.pot-row label {
  flex: 1;
  font-size: 12px;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

input[type="number"], select {
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 14px;
  font-family: inherit;
  width: 100%;
}
select { margin-bottom: 12px; }

.primary-btn {
  width: 100%;
  background: var(--lg-accent);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 16px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
}
.primary-btn:hover { background: var(--accent-hover); }
.primary-btn:disabled { opacity: 0.5; cursor: not-allowed; }

/* Results */
.result-panel { min-height: 160px; }
.empty-state {
  color: var(--text-muted);
  font-size: 14px;
  padding: 24px 0;
  text-align: center;
}
.hidden { display: none !important; }

.hand-name {
  font-size: 16px;
  font-weight: 700;
  margin-top: 18px;
}

.equity-bar {
  display: flex;
  height: 28px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--lg-surface-2);
  gap: 2px;
  margin-top: 18px;
}
.equity-seg { height: 100%; transition: width .3s; }
.equity-win  { background: var(--good); }
.equity-tie  { background: var(--warning); }
.equity-lose { background: var(--critical); }

.equity-legend {
  display: flex;
  gap: 18px;
  margin-top: 10px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--text-secondary);
}
.legend-item { display: flex; align-items: center; gap: 6px; }
.legend-item b { color: var(--text-primary); }
.dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.dot-win { background: var(--good); }
.dot-tie { background: var(--warning); }
.dot-lose { background: var(--critical); }

.stat-row {
  display: flex;
  gap: 12px;
  margin-top: 18px;
}
.stat-tile {
  flex: 1;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
}
.stat-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 4px;
}
.stat-value {
  font-size: 22px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}
.stat-tile-big { flex: 1.4; }
.stat-value-big {
  font-size: 40px;
  line-height: 1;
}

.recommendation {
  padding: 18px 20px;
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.4;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 2px solid var(--border);
}
.recommendation .rec-icon { font-size: 26px; line-height: 1.1; }
.recommendation b { font-size: 19px; letter-spacing: 0.02em; }
.recommendation .pf-warn {
  display: block; margin-top: 6px; padding: 4px 8px; border-radius: 6px; font-size: 13px;
  border: 1px solid var(--warning); color: var(--text-primary);
}
.recommendation.call, .recommendation.bet {
  border-color: var(--good);
  background: rgba(12, 163, 12, 0.14);
  color: var(--text-primary);
}
.recommendation.check {
  border-color: var(--lg-accent);
  background: rgba(62, 207, 142, 0.14);
  color: var(--text-primary);
}
.recommendation.fold {
  border-color: var(--critical);
  background: rgba(230, 103, 103, 0.14);
  color: var(--text-primary);
}
.recommendation { align-items: flex-start; }
.rec-disclaimer { margin-top: 8px; }
.recommendation .rec-icon { font-size: 16px; }

.outs-block { margin-top: 20px; }
.outs-block h3 {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 6px;
}
.mini-card {
  width: 40px;
  height: 56px;
  border-radius: 6px;
  background: var(--card-white);
  color: var(--card-black);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
}
.mini-card.red { color: var(--lg-card-red); }
.tip {
  font-size: 12px;
  color: var(--text-muted);
  margin: 8px 0 0;
}

.history-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.file-label {
  cursor: pointer;
}
.file-input-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
}
.history-summary {
  margin-bottom: 12px;
}
.history-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
}
.history-entry {
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}
.history-entry-head {
  display: flex;
  justify-content: space-between;
  color: var(--text-muted);
  font-size: 11px;
  margin-bottom: 8px;
}
.history-entry-cards {
  display: flex;
  gap: 4px;
  margin-bottom: 8px;
  flex-wrap: wrap;
  align-items: center;
}
.history-mini-card {
  width: 26px;
  height: 36px;
  border-radius: 4px;
  background: var(--card-white);
  color: var(--card-black);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
}
.history-mini-card.red { color: var(--lg-card-red); }
.history-mini-card.board { margin-left: 8px; }
.history-entry-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.history-badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
}
.history-badge.call, .history-badge.bet { background: rgba(12,163,12,0.18); color: var(--good); }
.history-badge.check { background: rgba(57,135,229,0.18); color: var(--lg-accent); }
.history-badge.fold { background: rgba(230,103,103,0.18); color: var(--critical); }

.tips-list, .tips-panel ul.tips-list {
  margin: 0;
  padding-left: 18px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
}
.tips-list li { margin-bottom: 8px; }
.tips-list b { color: var(--text-primary); }

/* Documentação */
[data-tab-group="docs"] h3 {
  font-size: 14px;
  color: var(--text-primary);
  margin: 22px 0 8px;
}
[data-tab-group="docs"] h3:first-of-type { margin-top: 4px; }
[data-tab-group="docs"] p {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.6;
  margin: 0 0 10px;
}
.doc-code {
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.92em;
  color: var(--text-primary);
}
.doc-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  color: var(--text-secondary);
}
.doc-table td {
  border-top: 1px solid var(--border);
  padding: 8px 6px;
  vertical-align: top;
}
.doc-table td:first-child {
  white-space: nowrap;
  width: 1%;
  padding-right: 16px;
}
.doc-subtitle {
  color: var(--text-primary);
  font-weight: 700;
  font-size: 13px;
}

/* Diagrama do pipeline (5 passos) */
.pipeline-diagram {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0 18px;
  padding: 14px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.pipeline-step {
  flex: 1 1 100px;
  min-width: 90px;
  text-align: center;
  padding: 8px 4px;
}
.pipeline-icon { font-size: 22px; }
.pipeline-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  margin-top: 4px;
}
.pipeline-desc {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
}
.pipeline-arrow {
  color: var(--text-muted);
  font-size: 16px;
  flex: 0 0 auto;
}

/* Barra de divisão treino/validação (mesmo padrão visual da equity-bar) */
.split-bar {
  display: flex;
  height: 30px;
  border-radius: 6px;
  overflow: hidden;
  margin: 10px 0 4px;
}
.split-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.split-seg-train { background: var(--lg-accent); }
.split-seg-val { background: var(--warning); color: #1a1a19; }

/* Diagrama de épocas */
.epoch-diagram { margin: 10px 0 18px; }
.epoch-track {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 6px;
}
.epoch-tick {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--text-secondary);
  font-variant-numeric: tabular-nums;
}

/* Diagrama de arquitetura da rede */
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 10px 0 18px;
  padding: 16px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.arch-layer {
  background: var(--lg-surface-1);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 14px;
  font-size: 12px;
  color: var(--text-primary);
  text-align: center;
}
.arch-arrow {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.4;
}
.arch-fork {
  display: flex;
  justify-content: center;
  gap: 36px;
  margin-top: 4px;
  padding-top: 14px;
  position: relative;
  width: 100%;
}
.arch-fork::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 55%;
  height: 1px;
  background: var(--border);
}
.arch-head {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.arch-head-rank { border-color: var(--lg-accent); }
.arch-head-suit { border-color: var(--critical); }
.arch-head-label {
  font-size: 10px;
  color: var(--text-muted);
  margin-top: 4px;
}

/* Diagrama do neurônio */
.neuron-diagram {
  margin: 10px 0 18px;
  padding: 14px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.neuron-diagram-svg { width: 100%; height: auto; display: block; }
.neuron-line { stroke: var(--border); stroke-width: 1.5; fill: none; }
.neuron-arrowhead { fill: var(--text-muted); }
.neuron-input-circle { fill: var(--lg-surface-1); stroke: var(--lg-accent); stroke-width: 1.5; }
.neuron-input-label { fill: var(--text-primary); font-size: 13px; font-weight: 700; }
.neuron-input-value { fill: var(--text-muted); font-size: 10px; }
.neuron-weight-label { fill: var(--warning); font-size: 11px; font-weight: 700; }
.neuron-circle { fill: var(--lg-accent); stroke: var(--accent-hover); stroke-width: 2; }
.neuron-formula { fill: #ffffff; font-size: 14px; font-weight: 700; }
.neuron-formula-small { fill: #ffffff; font-size: 10px; }
.neuron-activation-box { fill: var(--lg-surface-1); stroke: var(--critical); stroke-width: 1.5; }
.neuron-activation-text { fill: var(--text-primary); font-size: 13px; font-weight: 700; }
.neuron-activation-formula { fill: var(--text-secondary); font-size: 10px; }
.neuron-output-label { fill: var(--good); font-size: 12px; font-weight: 700; }
.neuron-output-value { fill: var(--good); font-size: 13px; font-weight: 700; }
.neuron-diagram-caption {
  margin: 10px 0 0;
  text-align: center;
  font-family: ui-monospace, "SF Mono", Consolas, monospace;
}

/* Leitura de tela */
.screen-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.screen-controls .hidden { display: none; }
#screen-status {
  margin-bottom: 10px;
}
/* cadeiras da mesa (seat-reader.js): você, ocupadas, vazias e quem tem o botão */
.seat-status { margin-bottom: 10px; }
.seat-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 6px; }
.seat-chip {
  padding: 4px 10px;
  font-size: 12px;
  border-radius: 6px;
  border: 1px solid #f08a3c;
  background: transparent;
  color: var(--text-primary);
  cursor: pointer;
}
.seat-chip-hero { border-color: #3dd6d0; cursor: default; }
.seat-chip-empty { border-style: dashed; color: var(--text-secondary); opacity: 0.6; }
.seat-chip-button { box-shadow: 0 0 0 2px var(--warning); }
.seat-chip b { color: var(--warning); }
.seat-chip-d { border-color: var(--warning); }
.seat-chip-redraw { border-color: var(--text-secondary); color: var(--text-secondary); }
.seat-row-label { font-size: 12px; color: var(--text-secondary); margin: 4px 0; }
.seat-ask {
  padding: 6px 10px; margin-bottom: 6px; border-radius: 6px; font-size: 13px;
  border: 1px solid var(--warning); background: color-mix(in srgb, var(--warning) 12%, transparent);
}
.screen-panel {
  position: relative;
  left: 50%;
  transform: translateX(-50%);
  width: 96vw;
  max-width: 1400px;
}

.screen-preview-wrap {
  position: relative;
  width: 100%;
  max-width: 100%;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  line-height: 0;
}
.screen-video {
  width: 100%;
  display: block;
}
.screen-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  cursor: crosshair;
}

/* Fila de revisão (Revisão & Treino) */
.review-queue-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 12px;
}
.review-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.review-item-top {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.review-item img {
  width: 96px;
  aspect-ratio: 48 / 67;
  object-fit: cover;
  border-radius: 4px;
  border: 1px solid var(--border);
  background: var(--card-white);
  flex: 0 0 auto;
}
.review-item-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex: 1 1 auto;
}
.review-item-picker {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 5px;
}
.review-item-picker .deck-card { height: 40px; font-size: 13px; }
.review-empty {
  color: var(--text-muted);
  font-size: 13px;
}
.review-item-current {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 2px var(--lg-accent);
}
.review-item-current-badge {
  align-self: flex-start;
  background: var(--lg-accent);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
}
.review-item-empty-btn {
  align-self: flex-start;
  margin-top: 8px;
  color: var(--critical);
}
.deck-card-empty {
  color: var(--text-muted) !important;
  font-size: 10px !important;
  font-weight: 400 !important;
}
.review-item-voice-hint {
  padding: 6px 8px;
  background: var(--lg-surface-1);
  border: 1px dashed var(--lg-accent);
  border-radius: 6px;
  font-size: 12px;
}

/* Pré-flop por posição (preflop.js) */
:root {
  --pf-raise: #c94a4a;
  --pf-call: #2e8b3e;
  --pf-fold: var(--lg-surface-2);
}
.pf-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pf-label { font-size: 12px; color: var(--text-muted); min-width: 110px; }
.pf-buttons { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.pf-autorotate { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pf-grid {
  display: grid;
  grid-template-columns: repeat(13, minmax(0, 1fr));
  gap: 2px;
  margin-top: 10px;
  max-width: 620px;
}
.pf-cell {
  aspect-ratio: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 600;
  color: #fff;
  border-radius: 3px;
  text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6);
  overflow: hidden;
}
.pf-cell-hero { outline: 3px solid var(--warning); outline-offset: -2px; z-index: 1; }
.pf-legend { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; margin-top: 8px; }
.pf-swatch { display: inline-block; width: 12px; height: 12px; border-radius: 2px; }
.pf-swatch-raise { background: var(--pf-raise); }
.pf-swatch-call { background: var(--pf-call); }
.pf-swatch-fold { background: var(--pf-fold); border: 1px solid var(--border); }
@media (max-width: 600px) {
  .pf-cell { font-size: 7px; }
  .pf-label { min-width: 0; width: 100%; }
}

/* Qualidade da captura (aba Leitura de tela) */
.capture-quality { margin-top: 16px; }
.capture-quality h3 { margin: 0 0 4px; }
.capture-quality-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.cq-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 8px 6px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.cq-cell canvas {
  width: 69px;
  height: 96px;
  image-rendering: pixelated;
  border-radius: 3px;
  background: var(--card-white);
}
.cq-label { font-size: 12px; font-weight: 700; }
.cq-line { font-size: 10px; color: var(--text-muted); text-align: center; }
.cq-ok { color: var(--good); }
.cq-warn { color: var(--warning); }

/* Revisão de valores (pote/call) */
.value-train-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin: 10px 0 4px; }
.value-review-list { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.value-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 10px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  flex-wrap: wrap;
}
.value-item img {
  height: 40px;
  max-width: 260px;
  object-fit: contain;
  image-rendering: pixelated;
  border-radius: 4px;
  background: #000;
}
.value-item-body { display: flex; flex-direction: column; gap: 6px; flex: 1 1 220px; }
.value-item-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.value-input {
  width: 110px;
  padding: 5px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--lg-surface-1);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
}
.value-input-bad { border-color: var(--critical); }

/* Fila de revisão agrupada por mão */
.review-hand {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 12px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.review-hand-current { border-color: var(--lg-accent); }
.review-hand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.review-hand-low { color: var(--warning); }
.review-hand-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.review-approve-btn {
  background: var(--good);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.review-approve-btn:hover:not(:disabled) { filter: brightness(1.12); }
.review-approve-btn:disabled {
  background: var(--lg-surface-1);
  color: var(--text-muted);
  border: 1px solid var(--border);
  cursor: not-allowed;
}
.review-hand-tiles {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.review-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  width: 78px;
  padding: 6px 4px;
  background: var(--lg-surface-1);
  border: 2px solid transparent;
  border-radius: 8px;
  color: var(--text-primary);
  cursor: pointer;
  font: inherit;
}
.review-tile:hover { border-color: var(--border); }
.review-tile img {
  width: 60px;
  aspect-ratio: 48 / 67;
  object-fit: cover;
  border-radius: 4px;
  background: var(--card-white);
}
.review-tile-slot {
  font-size: 10px;
  color: var(--text-muted);
  white-space: nowrap;
}
.review-tile-card {
  font-size: 15px;
  font-weight: 700;
}
.review-tile-card.red { color: var(--critical); }
.review-tile-meta {
  font-size: 10px;
  color: var(--text-muted);
}
.review-tile-low { border-color: var(--warning); }
.review-tile-low .review-tile-meta { color: var(--warning); }
.review-tile-fixed .review-tile-meta { color: var(--good); }
.review-tile-voice { border-style: dashed; border-color: var(--lg-accent); }
.review-tile-selected { border-style: solid; border-color: var(--lg-accent); box-shadow: 0 0 0 2px var(--lg-accent); }
.review-tile-editor {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  background: var(--lg-surface-1);
  border: 1px solid var(--lg-accent);
  border-radius: 8px;
}
.review-tile-editor-body {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.review-tile-editor-body img {
  width: 96px;
  aspect-ratio: 48 / 67;
  object-fit: cover;
  border-radius: 4px;
  background: var(--card-white);
  flex: 0 0 auto;
}
.review-tile-editor-body .review-item-picker { flex: 1 1 auto; }
.review-tile-editor-actions {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  align-items: center;
}
.review-tile-editor-actions .review-item-empty-btn { margin-top: 0; }
@media (max-width: 600px) {
  .review-tile-editor-body { flex-direction: column; }
  .review-tile-editor-body .review-item-picker { width: 100%; }
}

/* Análises — gráficos de barra construídos em HTML/CSS puro, sem lib externa */
.chart-block { margin-top: 22px; }
.chart-title {
  font-size: 12px;
  color: var(--text-secondary);
  margin-bottom: 10px;
  font-weight: 700;
}
.bar-chart {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 120px;
  padding-top: 18px;
  border-bottom: 1px solid var(--baseline, var(--border));
}
.bar-chart-narrow { gap: 10px; }
.bar-col {
  flex: 1 1 0;
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
}
.bar-fill {
  width: 100%;
  max-width: 24px;
  min-height: 2px;
  border-radius: 4px 4px 0 0;
  background: var(--lg-accent);
  transition: filter 0.15s;
  cursor: default;
}
.bar-fill:hover, .bar-fill:focus-visible { filter: brightness(1.3); outline: none; }
.bar-fill.suit-black { background: var(--text-primary); }
.bar-fill.suit-red { background: var(--critical); }
.bar-col-label {
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-muted);
  white-space: nowrap;
  text-align: center;
}
.bar-col-value {
  font-size: 10px;
  color: var(--text-secondary);
  margin-bottom: 3px;
  font-variant-numeric: tabular-nums;
}

/* Heatmap de 52 cartas — reaproveita .deck-card/.deck-grid, tingido por frequência
   (rampa sequencial de um hue só, do mais claro ao mais escuro — ver skill de dataviz) */
.deck-card.heatmap-dark { color: #ffffff; }

/* Gráfico de linha (tendência) — SVG inline, sem lib externa */
.line-chart-wrap { width: 100%; }
.line-chart-svg { width: 100%; height: 140px; display: block; overflow: visible; }
.chart-gridline { stroke: var(--border); stroke-width: 1; }
.chart-axis-label { fill: var(--text-muted); font-size: 9px; }
.chart-line { fill: none; stroke: var(--lg-accent); stroke-width: 2; }
.chart-dot { fill: var(--lg-accent); stroke: var(--lg-surface-1); stroke-width: 2; cursor: default; }
.chart-dot:hover { fill: var(--accent-hover); }
.chart-line-val { stroke: var(--warning); }
.chart-dot.chart-line-val { fill: var(--warning); }
.chart-legend {
  display: flex;
  gap: 14px;
  margin-top: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}
.chart-legend-item { display: flex; align-items: center; gap: 5px; }
.chart-legend-swatch {
  width: 10px;
  height: 2px;
  background: var(--lg-accent);
  display: inline-block;
}
.chart-legend-swatch.chart-line-val { background: var(--warning); }

.train-verdict {
  margin-top: 12px;
  padding: 12px 14px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.train-verdict-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.train-verdict p {
  font-size: 13px;
  color: var(--text-secondary);
  margin: 0 0 6px;
  line-height: 1.5;
}
.train-verdict p:last-child { margin-bottom: 0; }
.train-verdict b { color: var(--text-primary); }

/* Baralho */
.deck-panel {
  margin-bottom: 0;
}
.control-bar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  background: var(--page);
  padding: 10px 0 16px;
}
.tabs {
  position: sticky;
  top: 46px;
  z-index: 9;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--page);
  padding: 0 0 16px;
}
.tab-btn {
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}
.tab-btn:hover { border-color: var(--lg-accent); }
.tab-btn.active {
  background: var(--lg-accent);
  border-color: var(--lg-accent);
  color: #fff;
}

.voice-btn {
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}
.voice-btn:hover { border-color: var(--lg-accent); }
/* mesa do pré-flop: você sempre embaixo, as outras 5 cadeiras em volta */
.pf-table { position: relative; width: 100%; max-width: 420px; aspect-ratio: 16 / 9; margin: 12px auto 6px; }
.pf-felt { position: absolute; inset: 14% 12%; border-radius: 50%; background: var(--lg-surface-2); border: 2px solid var(--border); }
.pf-seat {
  position: absolute; transform: translate(-50%, -50%); min-width: 62px; padding: 5px 8px;
  display: flex; flex-direction: column; align-items: center; line-height: 1.15;
  border-radius: 10px; border: 2px solid var(--border); background: var(--lg-surface-1, var(--lg-surface-2));
  color: var(--text-primary); font-size: 14px;
}
.pf-seat small { font-size: 10px; opacity: 0.75; }
.pf-seat-before { opacity: 0.55; }
.pf-seat-hero { background: var(--lg-accent); border-color: var(--lg-accent); color: #fff; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.pf-seat-hero small { opacity: 1; font-weight: 800; }
.pf-seat-opener { border-color: var(--warning); box-shadow: 0 0 0 2px var(--warning); }
.pf-dealer {
  position: absolute; top: -9px; right: -9px; width: 20px; height: 20px; border-radius: 50%;
  background: #fff; color: #000; border: 1px solid #000; font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}

/* mini-painel de ação: botões na ordem da mesa; o recomendado acende */
.action-pad { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 12px; }
.pad-btn {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 64px; border-radius: 10px; border: 2px solid var(--border);
  background: var(--lg-surface-2); color: var(--text-secondary, var(--text-primary));
  opacity: 0.4; font-weight: 800; font-size: 16px; letter-spacing: 0.5px;
}
.pad-pct { font-size: 13px; font-weight: 700; min-height: 1em; }
.pad-btn.pad-alt { opacity: 0.85; border-color: var(--lg-accent); color: var(--text-primary); }
.pad-btn.pad-main { opacity: 1; color: #fff; font-size: 20px; border-color: transparent; box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.25); }
.pad-btn[data-pad="fold"].pad-main { background: var(--critical); }
.pad-btn[data-pad="call"].pad-main { background: var(--good); }
.pad-btn[data-pad="raise"].pad-main { background: var(--lg-accent); }
.pad-btn[data-pad="allin"].pad-main { background: var(--warning); color: #000; }
@media (max-width: 600px) { .pad-btn { min-height: 52px; font-size: 13px; } .pad-btn.pad-main { font-size: 15px; } }

.voice-btn.active { border-color: var(--lg-accent); box-shadow: inset 0 0 0 1px var(--lg-accent); }
.voice-btn.listening {
  background: var(--critical);
  border-color: var(--critical);
  color: #fff;
}

.train-controls-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.train-epochs-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.train-epochs-label input {
  width: 70px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text-primary);
  padding: 6px 8px;
  font-size: 13px;
}
#train-progress { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.train-spinner {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  border: 2px solid var(--border);
  border-top-color: var(--lg-accent);
  animation: train-spin 0.8s linear infinite;
  flex: 0 0 auto;
}
@keyframes train-spin { to { transform: rotate(360deg); } }
.train-progress-bar-wrap {
  height: 6px;
  border-radius: 3px;
  background: var(--lg-surface-2);
  overflow: hidden;
  margin-top: 6px;
}
.train-progress-bar-fill {
  height: 100%;
  width: 0%;
  background: var(--lg-accent);
  transition: width 0.4s ease;
}

.epoch-tick-current {
  animation: epoch-pulse 1s ease-in-out infinite;
  border-color: var(--text-primary) !important;
}
@keyframes epoch-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.35); }
  50% { box-shadow: 0 0 0 4px rgba(255,255,255,0); }
}

.showcase-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.showcase-item {
  text-align: center;
}
.showcase-pair {
  display: flex;
  align-items: center;
  gap: 6px;
}
.showcase-pair .deck-card {
  width: 44px;
  height: 40px;
  font-size: 11px;
}
.showcase-arrow { font-size: 14px; }
.showcase-item .hint { margin-top: 4px; font-size: 10px; }
.showcase-trail {
  display: flex;
  gap: 2px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 5px;
  max-width: 110px;
}
.showcase-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}
.showcase-dot-ok { background: var(--good); }
.showcase-dot-fail { background: var(--critical); }
.showcase-dot:last-child { animation: showcase-dot-pop 0.4s ease; }
@keyframes showcase-dot-pop {
  from { transform: scale(2); }
  to { transform: scale(1); }
}

.voice-status {
  font-size: 12px;
  color: var(--text-secondary);
}
.deck-grid {
  display: grid;
  grid-template-columns: repeat(13, 1fr);
  gap: 4px;
}
.deck-card {
  height: 40px;
  border-radius: 5px;
  background: var(--card-white);
  color: var(--card-black);
  border: 1px solid var(--border);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
}
.deck-card.red { color: var(--lg-card-red); }
.deck-card:hover:not(:disabled) { outline: 2px solid var(--lg-accent); }
.deck-card:disabled {
  background: var(--lg-surface-2);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.4;
}

/* Cobertura do dataset — cor de fundo indica quantos exemplos rotulados a carta já tem */
.deck-card.coverage-critical { background: #f3c6c6; }
.deck-card.coverage-warning { background: #fbdfa3; }
.deck-card.coverage-good { background: #bfe8bf; }
.deck-card.coverage-max { box-shadow: 0 0 0 2px var(--lg-accent); }
.coverage-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}
.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 2px;
  margin-right: 5px;
  vertical-align: middle;
}
.legend-critical { background: #f3c6c6; }
.legend-warning { background: #fbdfa3; }
.legend-good { background: #bfe8bf; }
.card-slot.active {
  border-color: var(--lg-accent);
  box-shadow: 0 0 0 2px var(--lg-accent);
}

/* Aba Apresentação */
.present-hero {
  text-align: center;
}
.present-hero-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}
.present-hero-subtitle {
  max-width: 640px;
  margin: 0 auto 18px;
  color: var(--text-secondary);
  line-height: 1.5;
}
.present-hero .stat-row {
  justify-content: center;
}

.present-before-after {
  display: flex;
  align-items: stretch;
  gap: 14px;
}
.present-ba-col {
  flex: 1;
  background: var(--lg-surface-2);
  border-radius: 8px;
  padding: 14px;
}
.present-ba-before { border-left: 3px solid var(--critical); }
.present-ba-after { border-left: 3px solid var(--good); }
.present-ba-label {
  font-weight: 700;
  margin-bottom: 6px;
  color: var(--text-primary);
}
.present-ba-col p {
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.present-ba-arrow {
  align-self: center;
  font-size: 20px;
  color: var(--text-muted);
}

.present-timeline {
  display: flex;
  flex-direction: column;
  gap: 4px;
  position: relative;
  padding-left: 8px;
}
.present-timeline-item {
  display: flex;
  gap: 14px;
  position: relative;
  padding: 10px 0;
}
.present-timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: -6px;
  width: 2px;
  background: var(--border);
}
.present-timeline-dot {
  flex: none;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--lg-surface-2);
  border: 2px solid var(--lg-accent);
  color: var(--lg-accent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 13px;
  z-index: 1;
}
.present-timeline-content b {
  display: block;
  color: var(--text-primary);
  margin-bottom: 3px;
}
.present-timeline-content p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.present-see-more { margin-top: 12px; }

.present-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.present-badge {
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--text-secondary);
}

.present-swarm {
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px;
}
.present-swarm-header {
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 12px;
  min-height: 18px;
}
.present-swarm-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  justify-content: center;
}
.present-swarm-grid .deck-card {
  width: 30px;
  height: 26px;
  font-size: 9px;
  cursor: default;
  transition: box-shadow 0.15s, opacity 0.15s;
}
.swarm-cell-ok .deck-card { box-shadow: 0 0 0 2px var(--good); }
.swarm-cell-fail .deck-card { box-shadow: 0 0 0 2px var(--critical); opacity: 0.5; }

/* =========================================================
   Layout pro monitor vertical (out/2026)
   O app era uma coluna de 720 px: sobrava espaço dos lados e a aba Jogar
   empilhava 8 painéis. Agora usa a largura toda, com Mesa e Decisão lado a
   lado, o contexto da rua na largura toda e o resto recolhido em Ferramentas.
   ========================================================= */
.app {
  max-width: 1400px;
  padding: 16px 20px 48px;
}

/* cabeçalho numa linha só: título à esquerda, voz e "novo jogo" à direita */
.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.app-header h1 { font-size: 20px; margin: 0; }
.app-header .control-bar {
  position: static;
  padding: 0;
  background: none;
}

/* abas e barra de status grudadas no topo ao rolar */
.tabs { top: 0; padding: 0 0 8px; }
.status-bar {
  position: sticky;
  top: 44px;
  z-index: 8;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 18px;
  padding: 8px 14px;
  margin-bottom: 14px;
  background: var(--lg-surface-1);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
}
.sb-item { white-space: nowrap; }
.sb-item b { color: var(--text-primary); }
.sb-on { color: var(--good); }
.sb-warn { color: var(--warning); }
.sb-off { color: var(--text-muted); }
.sb-value { color: var(--text-secondary); }

/* aba Jogar */
.play-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  grid-template-areas:
    "table   decision"
    "context context"
    "tools   tools";
  gap: 14px;
  align-items: start;
}
.play-grid > .panel { margin-bottom: 0; }
.play-table { grid-area: table; }
.play-decision { grid-area: decision; }
.play-context { grid-area: context; }
.play-tools { grid-area: tools; }

.play-table .hand-board-row { margin-bottom: 4px; }
.play-table-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0 10px;
}
.play-field-label { font-size: 13px; color: var(--text-secondary); }
.pot-row-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
}
#value-auto-status { margin: 10px 0 0; }

/* a decisão é o que se olha a cada ação: maior e no topo do bloco */
.play-decision h2 { margin-bottom: 10px; }
.play-decision .recommendation { font-size: 16px; padding: 16px 18px; }
.play-decision .recommendation b { font-size: 22px; }
.play-decision .recommendation .rec-icon { font-size: 22px; }
.play-decision .equity-bar { margin-top: 14px; }

/* contexto da rua: a grade do pré-flop fica sempre fixa (a leitura da mesa oscilava entre
   "tem carta no board" e "não tem" e a tela inteira pulava); outs do flop em diante (statusbar.js liga .is-postflop) */
/* texto acompanha a largura da grade (cqw) pra continuar legível e sem estourar a célula */
.play-context .pf-grid { max-width: none; gap: 3px; container-type: inline-size; }
.play-context .pf-cell { font-size: clamp(10px, 3.1cqw, 20px); font-weight: 700; }
.play-context .postflop-section { display: none; }
.play-context.is-postflop .postflop-section { display: block; margin-top: 14px; }
.postflop-section .outs-block { margin-top: 6px; }
.postflop-section .outs-block:not(.hidden) + .postflop-note { display: none; }

/* ferramentas recolhidas */
.play-tools > summary {
  cursor: pointer;
  font-weight: 700;
  font-size: 15px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.play-tools > summary .hint { font-weight: 400; }
.tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 24px;
  margin-top: 14px;
}
.tool-block h3 { margin: 0 0 10px; font-size: 14px; }
.tool-block .panel-head-row { margin-bottom: 8px; }
.tool-block.deck-panel { grid-column: 1 / -1; }
.tool-block select { width: 100%; margin-bottom: 10px; }

/* texto corrido (documentação) fica numa largura confortável de ler */
.layout > .panel[data-tab-group="docs"] { max-width: 980px; width: 100%; margin-left: auto; margin-right: auto; }

@media (max-width: 860px) {
  .play-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "table" "decision" "context" "tools";
  }
  .tools-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 600px) {
  .app { padding: 12px 16px 40px; }
  .status-bar { position: static; }
  .play-context .pf-cell { font-size: clamp(8px, 3.1cqw, 20px); }
}

/* Aba Laboratório */
.lab-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px; margin-top: 12px; }
.lab-controls label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.lab-controls select, .lab-controls input[type="number"] { margin-bottom: 0; }
.lab-controls input[type="number"] { width: 120px; }
.lab-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.lab-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 14px; }
.lab-tiles { flex-wrap: wrap; }
.lab-tiles .stat-tile { min-width: 140px; }
.lab-tile-hint { margin: 4px 0 0; font-size: 11px; }
.lab-svg { width: 100%; height: auto; display: block; }
.lab-swatch { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 6px; vertical-align: middle; }
.lab-swatch-band { height: 10px; background: var(--lg-accent); opacity: 0.25; }
.lab-inline-select { width: auto; margin: 0 0 0 8px; padding: 4px 8px; font-size: 12px; }
.lab-matrix { display: grid; grid-template-columns: 22px repeat(13, minmax(0, 1fr)); gap: 2px; margin-top: 10px; }
.lab-matrix-axis { font-size: 10px; color: var(--text-muted); display: flex; align-items: center; justify-content: center; }
.lab-cell { border-radius: 4px; background-color: var(--lg-surface-2); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3px 0; min-height: 38px; cursor: default; border: 1px solid var(--border); }
.lab-cell-key { font-size: 10px; color: var(--text-secondary); line-height: 1.1; }
.lab-cell-val { font-size: 11px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.2; }
.lab-rows { display: flex; flex-direction: column; gap: 7px; }
.lab-row { display: grid; grid-template-columns: minmax(120px, 190px) 1fr minmax(150px, 260px); align-items: center; gap: 10px; font-size: 12px; }
.lab-row-label { color: var(--text-secondary); }
.lab-row-bar { position: relative; height: 12px; background: var(--lg-surface-2); border-radius: 3px; }
.lab-row-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--lg-accent); border-radius: 3px; min-width: 1px; }
.lab-row-off .lab-row-fill { background: var(--warning); }
.lab-row-exp { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--text-primary); border-radius: 1px; }
.lab-row-val { font-variant-numeric: tabular-nums; }
.lab-row-val span { color: var(--text-muted); font-size: 11px; }
.lab-two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.lab-list { list-style: none; margin: 0; padding: 0; font-size: 12px; display: flex; flex-direction: column; gap: 5px; }
.lab-list span { color: var(--text-muted); }
.lab-table { width: 100%; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.lab-table th, .lab-table td { text-align: right; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.lab-table th { color: var(--text-muted); font-weight: 600; text-transform: uppercase; font-size: 10px; letter-spacing: 0.04em; }
.lab-table th:first-child, .lab-table td:first-child { text-align: left; }
@media (max-width: 720px) {
  .lab-row { grid-template-columns: 1fr; gap: 4px; }
  .lab-two-col { grid-template-columns: 1fr; }
}

.lab-act-grid { max-width: 640px; }
.lab-act-cell { cursor: pointer; }
.lab-act-group { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); margin-top: 8px; }
.lab-act-bar { background: var(--lg-surface-2); }
.lab-act-raise { color: var(--pf-raise); }
.lab-act-call { color: #4cb85e; }
.lab-act-fold { color: var(--text-muted); }

.lab-pr-insight { font-size: 13px; line-height: 1.5; margin: 14px 0 0; padding: 10px 14px; background: var(--lg-surface-2); border-left: 3px solid var(--lg-accent); border-radius: 6px; }
.lab-pr-table td:first-child { text-align: left; }
.lab-pr-none td { color: var(--text-muted); }
.lab-pr-sum td { font-weight: 700; }

.lab-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 10px; }
.lab-chip { display: inline-flex; align-items: center; background: var(--lg-surface-2); border: 1px solid var(--border); color: var(--text-primary); border-radius: 999px; padding: 4px 12px; font-size: 12px; cursor: pointer; }
.lab-chip:hover { border-color: var(--text-muted); }
.lab-chip .lab-swatch { height: 8px; width: 8px; border-radius: 50%; }
.lab-co-legend { font-size: 12px; margin: 8px 0 2px; }
.lab-co-legend .lab-swatch { height: 10px; width: 10px; margin-left: 10px; margin-right: 5px; border-radius: 2px; }
.lab-co-legend .lab-swatch:first-child { margin-left: 0; }
.lab-cohort { margin-top: 14px; }

.lab-act-cell2 { flex-direction: column; gap: 1px; font-size: 9px; line-height: 1.1; }
.lab-act-cell2 .lab-cell-key { color: #fff; opacity: 0.85; font-size: 9px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
.lab-act-cell2 .lab-cell-val { color: #fff; font-size: 11px; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
.lab-act-dim .lab-cell-key { color: var(--text-muted); opacity: 1; text-shadow: none; }

.lab-swatch-sq { height: 12px; width: 12px; border-radius: 2px; }
.lab-swatch-none { background: var(--lg-surface-2); border: 1px solid var(--border); }
.lab-swatch-dashed { background: transparent; border: 1px dashed var(--text-muted); }
.lab-rg-dark .lab-cell-key, .lab-rg-both .lab-cell-key, .lab-rg-onlya .lab-cell-key { color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.5); }
.lab-rg-light .lab-cell-key, .lab-rg-onlyb .lab-cell-key { color: #0d0d0d; }
.lab-rg-both { background: var(--lg-accent); }
.lab-rg-onlya { background: #b07ad9; }
.lab-rg-onlyb { background: var(--warning); }
.lab-rg-none .lab-cell-key { color: var(--text-muted); }
.lab-tr-opts { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 12px 0 0; font-size: 12px; color: var(--text-secondary); }
.lab-tr-opts label { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.lab-tr-sit { font-size: 12px; }
#lab-tr-panel:focus { outline: none; }
.lab-tr-stage { margin-top: 18px; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 18px 12px; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; }
.lab-tr-seats { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }
.lab-tr-seat { min-width: 58px; padding: 6px 8px; text-align: center; border-radius: 8px; background: var(--lg-surface-1); border: 1px solid var(--border); color: var(--text-muted); font-size: 12px; display: flex; flex-direction: column; }
.lab-tr-seat small { font-size: 9px; text-transform: uppercase; }
.lab-tr-seat-hero { border-color: var(--warning); color: var(--text-primary); background: rgba(250, 178, 25, 0.12); }
.lab-tr-seat-opener { border-color: var(--pf-raise); color: var(--text-primary); }
.lab-tr-cards { display: flex; gap: 10px; }
.lab-tr-card { width: 64px; height: 90px; border-radius: 8px; background: var(--card-white); color: var(--card-black); display: flex; flex-direction: column; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; line-height: 1.1; box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4); }
.lab-tr-card.lab-tr-red { color: var(--lg-card-red); }
.lab-tr-prompt { margin: 0; font-size: 14px; text-align: center; }
.lab-tr-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.lab-tr-btn { padding: 10px 22px; font-size: 14px; font-weight: 700; border-radius: 8px; border: 1px solid var(--border); background: var(--lg-surface-1); color: var(--text-primary); cursor: pointer; }
.lab-tr-btn small, .lab-actions small { font-weight: 400; opacity: 0.7; }
.lab-tr-btn-raise { border-color: var(--pf-raise); }
.lab-tr-btn-call { border-color: var(--pf-call); }
.lab-tr-btn:hover:not(:disabled) { filter: brightness(1.25); }
.lab-tr-btn:disabled { opacity: 0.45; cursor: default; }
.lab-tr-fb {
  width: 100%;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.35);
  color: var(--text);
  box-sizing: border-box;
}
.lab-tr-fb p { margin: 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.lab-tr-fb b, .lab-tr-fb strong { color: var(--text); }
.lab-tr-fb.lab-tr-fb-ok { border-top: 3px solid var(--ok); }
.lab-tr-fb.lab-tr-fb-bad { border-top: 3px solid var(--error); }
.lab-tr-fb.lab-tr-fb-mixed { border-top: 3px solid var(--warning); }
.lab-tr-fb.lab-tr-fb-study { border-top: 3px solid var(--accent); }
.lab-tr-badge { align-self: flex-start; padding: 4px 12px; border-radius: var(--r-sm); font-size: 13px; font-weight: 700; }
.lab-tr-ok { background: rgba(62, 207, 142, 0.15); color: var(--ok); border: 1px solid rgba(62, 207, 142, 0.3); }
.lab-tr-mixed { background: rgba(250, 178, 25, 0.15); color: var(--warning); border: 1px solid rgba(250, 178, 25, 0.3); }
.lab-tr-bad { background: rgba(230, 103, 103, 0.15); color: var(--error); border: 1px solid rgba(230, 103, 103, 0.3); }
.lab-tr-study { background: rgba(75, 148, 236, 0.15); color: var(--accent); border: 1px solid rgba(75, 148, 236, 0.3); }
.lab-tr-mini { max-width: 430px; margin: 4px auto 0; }
.lab-tr-mini .lab-cell { min-height: 22px; padding: 1px 0; border-color: transparent; }
.lab-tr-mini .lab-cell-key { font-size: 7px; color: #fff; text-shadow: 0 1px 1px rgba(0, 0, 0, 0.6); }
.lab-tr-mini .lab-matrix-axis { font-size: 8px; }

.lab-rg-all { border-color: transparent; }
.lab-rg-all .lab-cell-key { color: #fff; font-weight: 700; text-shadow: 0 0 3px rgba(0, 0, 0, 0.95), 0 1px 1px rgba(0, 0, 0, 0.9); }

.lab-rg-filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: 4px 0 8px; font-size: 12px; }
.lab-rg-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--text-secondary); }
.lab-rg-check .lab-swatch { margin-right: 0; }

.lab-lesson details { border: 1px solid var(--border); border-radius: 10px; padding: 10px 14px; margin-top: 10px; background: var(--lg-surface-2); }
.lab-lesson summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.lab-lesson details[open] summary { margin-bottom: 8px; }
.lab-lesson ul { margin: 6px 0 8px; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; line-height: 1.5; }
.lab-lesson p { font-size: 13px; line-height: 1.5; margin: 6px 0; }
.lab-ex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 12px; margin-top: 10px; }
.lab-ex { background: var(--lg-surface-1); border: 1px solid var(--border); border-radius: 10px; padding: 12px; }
.lab-ex-head { display: flex; gap: 12px; align-items: center; }
.lab-ex-cards { display: flex; gap: 6px; }
.lab-ex-cards .lab-tr-card { width: 42px; height: 60px; font-size: 18px; }
.lab-ex-title { font-weight: 700; font-size: 13px; }
.lab-ex-badge { display: inline-block; margin-top: 4px; font-size: 12px; }
.lab-ex p { margin: 10px 0 0; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.lab-tr-help { margin: 0; max-width: 560px; text-align: center; font-size: 12px; line-height: 1.5; color: var(--text-secondary); }
.lab-tr-why { padding: 10px 14px; background: var(--surface-2); border-left: 3px solid var(--accent); border-radius: var(--r-sm); color: var(--text-secondary); margin: 4px 0; font-size: 13px; line-height: 1.5; }
.lab-tr-why b { color: var(--text); }
.lab-tr-study-opt { flex-basis: 100%; color: var(--text-primary); font-weight: 600; }

/* =====================================================================================
   Treino em mesa animada (lab-table.js)
   ===================================================================================== */
.tt-viewsw { display: inline-flex; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 3px; }
.tt-viewsw button { border: 0; background: transparent; color: var(--text-secondary); padding: 7px 14px; border-radius: 9px; font-weight: 700; cursor: pointer; font-size: 13px; }
.tt-viewsw button.on { background: var(--lg-accent); color: #fff; }

.tt { display: flex; flex-direction: column; gap: 12px; outline: none; margin-top: 12px; }
.tt.hidden { display: none; }

/* painel de pontos */
.tt-hud { display: flex; flex-direction: column; gap: 8px; }
.tt-hud-main { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.tt-chipstat { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 6px 12px; font-size: 13px; white-space: nowrap; }
.tt-chipstat.combo { background: rgba(250, 178, 25, 0.18); border-color: var(--warning); color: var(--warning); font-weight: 800; }
.tt-chipstat.study { background: rgba(62, 207, 142, 0.18); border-color: var(--lg-accent); }
.tt-level { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--text-secondary); }
.tt-xp { flex: 1; height: 6px; background: var(--lg-surface-2); border-radius: 999px; overflow: hidden; }
.tt-xp i { display: block; height: 100%; background: var(--lg-accent); transition: width 0.5s; }
.tt-prog { height: 4px; background: var(--lg-surface-2); border-radius: 999px; overflow: hidden; }
.tt-prog i { display: block; height: 100%; background: var(--good); transition: width 0.4s; }

/* a mesa */
.tt-stage { position: relative; width: 100%; max-width: 900px; margin: 0 auto; aspect-ratio: 16 / 10; user-select: none; }
.tt-stage.hidden { display: none; }
.tt-felt {
  position: absolute; inset: 7% 4%; border-radius: 50%;
  background: radial-gradient(ellipse at 50% 38%, #2f9a64 0%, #1f7a4b 50%, #135234 100%);
  border: 11px solid #4b2e1b;
  box-shadow: inset 0 0 46px rgba(0, 0, 0, 0.55), 0 12px 32px rgba(0, 0, 0, 0.55), 0 0 0 3px #2a1a0f;
}
.tt-felt::after { content: ""; position: absolute; inset: 9%; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.09); }

.tt-deck { position: absolute; left: 50%; top: 31%; width: 26px; height: 36px; transform: translate(-50%, -50%); }
.tt-deck i { position: absolute; inset: 0; border-radius: 4px; background: repeating-linear-gradient(45deg, #a83434 0 4px, #842828 4px 8px); border: 2px solid #f1efe8; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.5); }
.tt-deck i:nth-child(2) { transform: translate(1px, -1px); }
.tt-deck i:nth-child(3) { transform: translate(2px, -2px); }

.tt-pot { position: absolute; left: 50%; top: 47%; transform: translate(-50%, -50%); text-align: center; z-index: 2; pointer-events: none; }
.tt-pot span { display: block; font-size: 11px; color: #cfe7d8; letter-spacing: 0.1em; text-transform: uppercase; }
.tt-pot b { font-size: 21px; color: #fff; text-shadow: 0 2px 4px #000; font-variant-numeric: tabular-nums; }
.tt-potchips { position: relative; height: 28px; width: 28px; margin: 6px auto 0; }

.tt-seat { position: absolute; width: 84px; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 2px; z-index: 3; transition: opacity 0.3s, filter 0.3s; }
.tt-avatar { width: 50px; height: 50px; border-radius: 50%; background: radial-gradient(circle at 30% 30%, #4a5268, #1c202b); border: 3px solid #0c0e14; display: grid; place-items: center; font-size: 26px; box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55); transition: box-shadow 0.25s; }
.tt-seat.hero .tt-avatar { border-color: var(--warning); }
.tt-name { font-size: 12px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px #000; white-space: nowrap; }
.tt-stack { font-size: 11px; color: #d7e7dc; background: rgba(0, 0, 0, 0.5); border-radius: 999px; padding: 1px 8px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tt-tag { font-size: 9px; letter-spacing: 0.08em; color: #cfd8d2; text-transform: uppercase; }
.tt-seat.folded { opacity: 0.4; filter: grayscale(0.6); }
.tt-seat.acting .tt-avatar { box-shadow: 0 0 0 4px rgba(250, 178, 25, 0.75), 0 0 18px rgba(250, 178, 25, 0.6); }
.tt-seat.turn .tt-avatar { animation: ttpulse 1.1s ease-in-out infinite; }
@keyframes ttpulse { 50% { box-shadow: 0 0 0 7px rgba(250, 178, 25, 0.5), 0 0 26px rgba(250, 178, 25, 0.85); } }
.tt-seat.good .tt-avatar { box-shadow: 0 0 0 4px rgba(59, 165, 92, 0.85), 0 0 24px rgba(59, 165, 92, 0.7); }
.tt-seat.bad .tt-avatar { box-shadow: 0 0 0 4px rgba(230, 103, 103, 0.9), 0 0 24px rgba(230, 103, 103, 0.75); }

/* cartas */
.tt-hand { position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%); margin-bottom: -16px; display: flex; z-index: 0; }
.tt-card { width: 26px; height: 36px; border-radius: 4px; position: relative; }
.tt-card.back { background: repeating-linear-gradient(45deg, #a83434 0 4px, #842828 4px 8px); border: 2px solid #f1efe8; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5); }
.tt-card.back:first-child { transform: rotate(-9deg) translateX(3px); }
.tt-card.back:last-child { transform: rotate(9deg) translateX(-3px); }
.tt-seat.hero .tt-hand { margin-bottom: -8px; gap: 8px; z-index: 4; }
.tt-card.big { width: 58px; height: 82px; border-radius: 7px; perspective: 700px; }
.tt-card.big .tt-face, .tt-card.big .tt-back { position: absolute; inset: 0; border-radius: 7px; backface-visibility: hidden; transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); box-shadow: 0 3px 9px rgba(0, 0, 0, 0.6); }
.tt-card.big .tt-back { background: repeating-linear-gradient(45deg, #a83434 0 5px, #842828 5px 10px); border: 3px solid #f1efe8; }
.tt-card.big .tt-face { background: #f5f4f0; color: #1a1a19; display: flex; flex-direction: column; align-items: center; justify-content: center; transform: rotateY(180deg); }
.tt-card.big.red .tt-face { color: #d03b3b; }
.tt-card.big .tt-face b { font-size: 27px; line-height: 1; }
.tt-card.big .tt-face i { font-style: normal; font-size: 27px; line-height: 1; }
.tt-card.big.up .tt-back { transform: rotateY(180deg); }
.tt-card.big.up .tt-face { transform: rotateY(360deg); }

/* fichas e apostas */
.tt-bet { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; z-index: 5; pointer-events: none; }
.tt-chips { position: relative; width: 26px; height: 24px; margin: 0 auto; }
.tt-chip { position: absolute; left: 1px; bottom: calc(var(--i) * 4px); width: 24px; height: 24px; border-radius: 50%; border: 3px dashed rgba(255, 255, 255, 0.85); box-shadow: 0 2px 3px rgba(0, 0, 0, 0.55), inset 0 0 0 2px rgba(0, 0, 0, 0.25); }
.c-white { background: #e8e8e8; }
.c-red { background: #c94a4a; }
.c-green { background: #2e8b3e; }
.c-black { background: #222; }
.tt-bamt { font-size: 11px; font-weight: 800; color: #fff; background: rgba(0, 0, 0, 0.6); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.tt-dealer { position: absolute; transform: translate(-50%, -50%); width: 24px; height: 24px; border-radius: 50%; background: #fff; color: #111; font-weight: 800; font-size: 13px; display: grid; place-items: center; border: 2px solid #9a9a9a; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.55); z-index: 2; }

.tt-pop { position: absolute; top: -6px; left: 50%; transform: translateX(-50%); font-weight: 900; font-size: 22px; z-index: 9; pointer-events: none; text-shadow: 0 2px 5px #000; white-space: nowrap; }
.tt-pop.good { color: #7be09b; }
.tt-pop.bad { color: #ff8a8a; }
.tt-pop small { font-size: 13px; color: var(--warning); }

/* narração, botões e explicação */
.tt-say { min-height: 46px; display: flex; align-items: center; justify-content: center; text-align: center; font-size: 15px; line-height: 1.4; padding: 8px 12px; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; }
.tt-actions { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 10px; min-height: 66px; }
.tt-btn { appearance: none; border: 0; border-radius: 14px; min-height: 66px; padding: 8px 10px; color: #fff; font-weight: 800; font-size: 17px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; box-shadow: 0 4px 0 rgba(0, 0, 0, 0.35), 0 8px 16px rgba(0, 0, 0, 0.3); transition: transform 0.08s, box-shadow 0.08s; }
.tt-btn:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(0, 0, 0, 0.35); }
.tt-btn small { font-size: 11px; font-weight: 600; opacity: 0.85; }
.tt-btn:disabled { opacity: 0.45; cursor: default; }
.tt-btn-raise { background: linear-gradient(#d65a5a, #b43f3f); }
.tt-btn-call { background: linear-gradient(#3aa24e, #2a7a3a); }
.tt-btn-fold { background: linear-gradient(#6b7280, #4b5160); }
.tt-btn-next { background: linear-gradient(#4b94ec, #2f6fc2); grid-column: 1 / -1; }
.tt-fb .lab-tr-fb { max-width: none; }

.tt-opts { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; }
.tt-opts summary { cursor: pointer; font-weight: 700; font-size: 14px; }
.tt-opts-body { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px 16px; margin-top: 12px; font-size: 13px; color: var(--text-secondary); }
.tt-opts-body label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.tt-opts-body .tt-opt-wide { grid-column: 1 / -1; }

/* resumo da sessão */
.tt-summary { background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 18px; }
.tt-summary.hidden { display: none; }
.tt-sum-head { text-align: center; margin-bottom: 14px; }
.tt-sum-stars { font-size: 34px; letter-spacing: 4px; }
.tt-sum-head h3 { margin: 4px 0; }
.tt-sum-head p { margin: 0; color: var(--text-secondary); }
.tt-sum-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.tt-summary h4 { margin: 14px 0 8px; font-size: 12px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.tt-bar-row { display: grid; grid-template-columns: 110px 1fr 40px 38px; align-items: center; gap: 8px; font-size: 12px; margin-bottom: 6px; }
.tt-bar { height: 10px; background: var(--lg-surface-1); border-radius: 999px; overflow: hidden; }
.tt-bar i { display: block; height: 100%; background: var(--lg-accent); border-radius: 999px; }
.tt-bar i.low { background: var(--warning); }
.tt-bar-row small { color: var(--text-muted); }
.tt-sum-wrong { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.tt-sum-wrong span { color: var(--text-muted); }
.tt-sum-btns { margin-top: 16px; display: grid; }

@media (max-width: 640px) {
  .tt-stage { aspect-ratio: 4 / 5; }
  .tt-felt { inset: 5% 5%; border-width: 9px; }
  .tt-seat { width: 68px; }
  .tt-avatar { width: 42px; height: 42px; font-size: 22px; }
  .tt-name { font-size: 11px; }
  .tt-card.big { width: 48px; height: 68px; }
  .tt-card.big .tt-face b, .tt-card.big .tt-face i { font-size: 22px; }
  .tt-card { width: 22px; height: 31px; }
  .tt-hand { margin-bottom: -13px; }
  .tt-sum-grid { grid-template-columns: 1fr; }
  .tt-bar-row { grid-template-columns: 96px 1fr 38px 34px; }
}
@media (prefers-reduced-motion: reduce) { .tt-seat.turn .tt-avatar { animation: none; } }

.tt-tools { display: flex; gap: 14px; justify-content: flex-end; margin-top: 6px; }

.tt-say:empty, .tt-actions:empty, .tt-fb:empty { display: none; }

.tt-blindsinfo { position: absolute; left: 1%; top: 1%; z-index: 6; font-size: 12px; font-weight: 700; color: #e8f2ec; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.18); border-radius: 999px; padding: 4px 12px; pointer-events: none; }

/* mapa de ações do laboratório: células maiores (mesmo esquema da aba Jogar: o texto cresce com a largura da grade) */
.lab-act-grid { max-width: 800px; gap: 3px; container-type: inline-size; }
.lab-act-cell { font-size: clamp(10px, 3.1cqw, 21px); font-weight: 700; border-radius: 5px; }
.lab-act-cell2 { gap: 0; line-height: 1.05; }
.lab-act-cell2 .lab-cell-key { font-size: clamp(8px, 2.1cqw, 14px); }
.lab-act-cell2 .lab-cell-val { font-size: clamp(10px, 2.9cqw, 19px); }
@media (max-width: 600px) {
  .lab-act-cell { font-size: clamp(9px, 3.3cqw, 21px); }
  .lab-act-cell2 .lab-cell-key { font-size: clamp(7px, 2.2cqw, 14px); }
  .lab-act-cell2 .lab-cell-val { font-size: clamp(9px, 3cqw, 19px); }
}

/* seletor de mão: 1ª carta, 2ª carta, suited/offsuit */
.hand-picker { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; margin: 8px 0 14px; }
.hand-picker label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-secondary); }
.hand-picker select { min-height: 44px; min-width: 84px; font-size: 18px; font-weight: 700; padding: 6px 10px; margin: 0; }
.seg-mini { display: inline-flex; background: var(--lg-surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 3px; gap: 3px; }
.seg-mini button { border: 0; background: transparent; color: var(--text-secondary); padding: 7px 12px; border-radius: 9px; font-weight: 700; font-size: 13px; cursor: pointer; display: flex; flex-direction: column; align-items: center; line-height: 1.15; min-height: 44px; justify-content: center; }
.seg-mini button small { font-size: 10px; font-weight: 500; opacity: 0.75; }
.seg-mini button.on { background: var(--lg-accent); color: #fff; }
.seg-mini button:disabled { opacity: 0.4; cursor: default; }
.hand-picker-key { font-size: 14px; color: var(--text-secondary); padding-bottom: 12px; }
.hand-picker-key b { color: var(--text-primary); font-size: 18px; }

/* =====================================================================================
   ABA SIMULADOR (strategy-sim.js / strategy-sim-ui.js)
   ===================================================================================== */
.sim-format { display: flex; gap: 8px; margin: 12px 0 4px; max-width: 360px; }
.sim-strats { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; margin-top: 10px; }
.sim-card { border: 1px solid var(--border); border-top: 3px solid var(--c); border-radius: 10px; padding: 12px; background: var(--lg-surface-2); display: flex; flex-direction: column; gap: 8px; }
.sim-card-head { display: flex; align-items: center; gap: 8px; }
.sim-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.sim-name { flex: 1; min-width: 0; font-weight: 700; margin: 0; }
.sim-del { padding: 2px 6px; }
.sim-q { display: flex; flex-direction: column; gap: 3px; font-size: 12px; color: var(--text-secondary); }
.sim-q select { margin: 0; font-size: 13px; }
.sim-desc { margin: 0; min-height: 2.6em; }
.sim-score { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin: 10px 0 16px; }
.sim-tile { border: 1px solid var(--border); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px 14px; background: var(--lg-surface-2); }
.sim-tile.best { box-shadow: 0 0 0 1px var(--c); }
.sim-tile-name { display: flex; align-items: center; gap: 6px; font-weight: 700; font-size: 14px; }
.sim-best { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--c); border: 1px solid var(--c); border-radius: 999px; padding: 1px 7px; }
.sim-tile-val { font-size: 26px; font-weight: 800; margin-top: 4px; font-variant-numeric: tabular-nums; }
.sim-tile-range { font-size: 12px; color: var(--text-muted); }
.sim-verdict { margin-top: 6px; font-size: 13px; font-weight: 700; }
.sim-verdict.win { color: var(--good); }
.sim-verdict.lose { color: var(--critical); }
.sim-verdict.maybe { color: var(--warning); }
.sim-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; font-variant-numeric: tabular-nums; }
.sim-table th, .sim-table td { padding: 7px 8px; border-bottom: 1px solid var(--border); text-align: right; vertical-align: top; }
.sim-table th:first-child, .sim-table td:first-child { text-align: left; color: var(--text-secondary); }
.sim-table td .hint { font-size: 11px; }
.sim-places { display: flex; flex-direction: column; gap: 10px; margin: 8px 0 6px; }
.sim-place-row { display: grid; grid-template-columns: 150px 1fr; align-items: end; gap: 10px; }
.sim-place-name { font-weight: 700; font-size: 13px; }
.sim-place-bars { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; align-items: end; }
.sim-place { display: flex; flex-direction: column; align-items: center; gap: 2px; font-size: 11px; color: var(--text-muted); }
.sim-place i { width: 70%; border-radius: 3px 3px 0 0; opacity: 0.85; }
.sim-place:not(.paid) i { opacity: 0.35; }
.sim-place b { font-size: 11px; color: var(--text-secondary); font-weight: 600; }
.sim-conclusion { margin-top: 14px; font-size: 14px; line-height: 1.55; }
.sim-conclusion p { margin: 0 0 8px; }
@media (max-width: 560px) { .sim-place-row { grid-template-columns: 1fr; } .sim-table { font-size: 12px; } }
/* "Achar a melhor": ranking com ponto (resultado) e faixa (confiança) */
.sim-total { align-self: center; }
.sw-list { display: flex; flex-direction: column; gap: 6px; margin-top: 8px; }
.sw-row { display: grid; grid-template-columns: minmax(150px, 230px) 1fr 110px; align-items: center; gap: 12px; padding: 6px 10px; border-radius: 8px; border: 1px solid var(--border); background: var(--lg-surface-2); }
.sw-row.best { border-color: var(--good); box-shadow: 0 0 0 1px var(--good); }
.sw-name { font-size: 13px; font-weight: 600; }
.sw-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); border: 1px solid var(--border); border-radius: 999px; padding: 1px 6px; margin-left: 4px; }
.sw-bar { position: relative; height: 18px; }
.sw-zero { position: absolute; top: -2px; bottom: -2px; width: 1px; background: var(--text-muted); opacity: 0.6; }
.sw-ci { position: absolute; top: 7px; height: 4px; border-radius: 4px; background: var(--lg-accent); opacity: 0.35; }
.sw-dot { position: absolute; top: 3px; width: 12px; height: 12px; margin-left: -6px; border-radius: 50%; }
.sw-dot.pos { background: var(--good); }
.sw-dot.neg { background: var(--critical); }
.sw-val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; font-size: 13px; }
.sim-sweep-msg { margin: 10px 0; font-size: 14px; }
@media (max-width: 620px) { .sw-row { grid-template-columns: 1fr 90px; } .sw-bar { grid-column: 1 / -1; grid-row: 2; } }
/* Aula 2 (steal-guide.js): tabela de risco e calculadora */
.steal-tbl { max-width: 640px; margin-top: 6px; }
.steal-out ul { margin: 12px 0 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; line-height: 1.5; }
.steal-hand { list-style: none; margin-left: -20px; padding: 10px 12px; border-radius: 8px; border: 1px solid var(--border); }
.steal-hand.go { border-color: var(--good); background: rgba(12, 163, 12, 0.10); }
.steal-hand.fold { border-color: var(--critical); background: rgba(230, 103, 103, 0.10); }
.steal-warn { color: var(--warning); }
/* treino: "o que essa mão pode virar" */
.lab-tr-pot { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; color: var(--text-secondary); }
.lab-tr-pot > summary { cursor: pointer; font-weight: 700; color: var(--text); }
.lab-tr-pot ul { margin: 8px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; line-height: 1.5; color: var(--text-secondary); }
.lab-tr-pot-tbl { border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; min-width: 300px; width: 100%; }
.lab-tr-pot-tbl th, .lab-tr-pot-tbl td { padding: 6px 10px; border-bottom: 1px solid var(--line); text-align: right; color: var(--text); }
.lab-tr-pot-tbl th:first-child, .lab-tr-pot-tbl td:first-child { text-align: left; }
.lab-tr-pot-tbl th { font-size: 11px; color: var(--text-dim); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

/* =====================================================================================
   TREINO "MÃO INTEIRA" (full-hand.js / full-hand-ui.js)
   ===================================================================================== */
.fh-modesw { margin-right: 8px; }
.fh-on .panel-head-row .tt-viewsw:not(.fh-modesw), .fh-on .tt-tools, .fh-on #lab-tr-pre { display: none !important; }
.fh-top { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 10px 0; }
.fh-top label { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.fh-top select { margin: 0; width: auto; }
.fh-stats { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 12px; color: var(--text-secondary); margin-bottom: 12px; }
.fh-stat { border: 1px solid var(--border); border-radius: 999px; padding: 3px 10px; }
.fh-stat small { color: var(--text-muted); }
.fh-table { border-radius: 16px; padding: 14px; background: radial-gradient(ellipse at 50% 40%, #1e6b44 0%, #154f33 55%, #0d3220 100%); border: 1px solid rgba(255, 255, 255, 0.08); display: flex; flex-direction: column; gap: 14px; }
.fh-opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
.fh-seat { background: rgba(0, 0, 0, 0.32); border: 1px solid rgba(255, 255, 255, 0.1); border-radius: 10px; padding: 8px 10px; font-size: 12px; color: #e8e6df; }
.fh-seat.out { opacity: 0.45; }
.fh-seat.won, .fh-hero.won { border-color: var(--warning); box-shadow: 0 0 0 1px var(--warning); }
.fh-seat-head { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fh-pos { font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 4px; background: rgba(255, 255, 255, 0.12); }
.fh-prof { font-size: 10px; color: #f6d27a; }
.fh-mini { display: flex; gap: 4px; margin: 6px 0; }
.fh-mini .lab-tr-card { width: 30px; height: 42px; font-size: 13px; border-radius: 5px; }
.fh-back { background: repeating-linear-gradient(45deg, #7a1f1f, #7a1f1f 4px, #5c1515 4px, #5c1515 8px) !important; }
.fh-seat-info { color: #c9c6bd; }
.fh-last { color: #f6d27a; min-height: 1.2em; margin-top: 2px; }
.fh-board { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.fh-board-cards { display: flex; gap: 6px; }
.fh-board .lab-tr-card { width: 52px; height: 74px; font-size: 22px; }
.fh-slot { width: 52px; height: 74px; border-radius: 8px; border: 1px dashed rgba(255, 255, 255, 0.25); }
.fh-pot { color: #fff; font-size: 14px; }
.fh-hero { display: flex; align-items: center; gap: 12px; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(255, 255, 255, 0.15); border-radius: 12px; padding: 10px 12px; color: #fff; font-size: 14px; }
.fh-hero-cards { display: flex; gap: 6px; }
.fh-hero .hint { color: #f6d27a; }
.fh-actions { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.fh-act { border: 1px solid var(--border); border-radius: 8px; padding: 10px 14px; font-weight: 700; cursor: pointer; background: var(--lg-surface-2); color: var(--text-primary); }
.fh-act.fh-fold { border-color: var(--critical); }
.fh-act.fh-call { border-color: #2e8b3e; }
.fh-act.fh-raise { border-color: var(--warning); }
.fh-act:hover { filter: brightness(1.15); }
.fh-end { margin: 14px 0 4px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--border); background: var(--lg-surface-2); display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.fh-end.win { border-color: var(--good); }
.fh-end.lose { border-color: var(--critical); }
.fh-end .primary-btn { margin-left: auto; }
.fh-fb { margin-top: 12px; }
.fh-facts { margin: 6px 0; padding-left: 20px; font-size: 13px; line-height: 1.55; }
.fh-prev, .fh-log { margin-top: 10px; font-size: 13px; }
.fh-prev > summary, .fh-log > summary { cursor: pointer; color: var(--text-secondary); }
.fh-log ol { margin: 6px 0; padding-left: 22px; color: var(--text-secondary); line-height: 1.5; }
@media (max-width: 560px) { .fh-board .lab-tr-card, .fh-slot { width: 42px; height: 60px; font-size: 17px; } }

/* Mão inteira na Mesa: cartas da mesa no centro, pote embaixo delas, rótulo da última ação */
.fh-viewsw { margin-left: 4px; }
.fh-stage .tt-pot { top: 63%; }
.fh-tboard { position: absolute; left: 50%; top: 40%; transform: translate(-50%, -50%); display: flex; gap: 5px; z-index: 2; }
.fh-tboard .tt-card.big { width: 46px; height: 64px; }
.fh-tboard .tt-card.big .tt-face b, .fh-tboard .tt-card.big .tt-face i { font-size: 21px; }
.fh-tslot { width: 46px; height: 64px; border-radius: 7px; border: 1px dashed rgba(255, 255, 255, 0.22); }
.fh-stage .tt-seat:not(.hero) .tt-card.big { width: 30px; height: 42px; }
.fh-stage .tt-seat:not(.hero) .tt-card.big .tt-face b, .fh-stage .tt-seat:not(.hero) .tt-card.big .tt-face i { font-size: 14px; }
.fh-tlast { font-size: 10px; line-height: 1.25; color: #f6d27a; background: rgba(0, 0, 0, 0.55); border-radius: 6px; padding: 1px 6px; text-align: center; max-width: 120px; }
.fh-thand { color: #fff; }
.tt-seat.fh-won .tt-avatar { box-shadow: 0 0 0 3px var(--warning), 0 0 18px rgba(250, 178, 25, 0.6); }
.fh-say { margin: 10px 0 0; }
.fh-prof { color: #f6d27a; font-weight: 400; }
@media (max-width: 560px) { .fh-tboard .tt-card.big, .fh-tslot { width: 34px; height: 48px; } .fh-tboard .tt-card.big .tt-face b, .fh-tboard .tt-card.big .tt-face i { font-size: 16px; } }
.fh-stage .tt-pot { top: 53%; }
.fh-stage .tt-potchips { display: none; }
.fh-tboard { top: 37%; }
/* "o que pode vir contra" (dentro do bloco "o que essa mão pode virar") */
.lab-vs { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--border); }
.lab-vs-title { font-weight: 700; margin-bottom: 4px; }
.lab-vs-tbl td:last-child { font-size: 12px; text-align: left; }
.lab-vs-lose td:nth-child(2), .lab-vs-lose td:last-child { color: var(--critical); font-weight: 700; }
.lab-vs-even td:nth-child(2), .lab-vs-even td:last-child { color: var(--warning); }
.lab-vs-win td:nth-child(2), .lab-vs-win td:last-child { color: var(--good); }
.lab-vs-tbl td .hint { font-size: 11px; }

/* ---------- Partida (análise): match-ui.js ---------- */
/* mesa com 7 a 9 lugares: assentos menores pra caber */
.fh-stage.fh-many .tt-seat { width: 72px; }
.fh-stage.fh-many .tt-seat:not(.hero) .tt-avatar { width: 38px; height: 38px; font-size: 19px; border-width: 2px; }
.fh-stage.fh-many .tt-seat:not(.hero) .tt-card.big { width: 24px; height: 34px; }
.fh-stage.fh-many .tt-seat:not(.hero) .tt-card.big .tt-face b, .fh-stage.fh-many .tt-seat:not(.hero) .tt-card.big .tt-face i { font-size: 11px; }
.fh-stage.fh-many .tt-name, .fh-stage.fh-many .tt-stack { font-size: 11px; }
.fh-stage.fh-many .fh-tlast { font-size: 9px; max-width: 92px; }
.mt-setup { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.mt-lead { margin: 0; line-height: 1.55; }
.mt-form { display: flex; flex-wrap: wrap; gap: 14px 20px; align-items: flex-start; }
.mt-field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--text-secondary); }
.mt-field > span { font-weight: 600; font-size: 13px; line-height: 18px; color: var(--text-secondary); }
.mt-field select {
  height: 40px;
  min-height: 40px;
  margin: 0;
  box-sizing: border-box;
  min-width: 190px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 13px;
  font-family: inherit;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
  color: var(--text-primary);
  display: flex;
  align-items: center;
}
.mt-field .tt-viewsw {
  height: 40px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 3px;
  border-radius: 10px;
  background: var(--lg-surface-2);
  border: 1px solid var(--border);
}
.mt-field .tt-viewsw button {
  height: 32px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  border-radius: 7px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  box-sizing: border-box;
}
.mt-field .tt-viewsw button.on {
  background: var(--lg-accent);
  color: #fff;
}
.mt-bar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; padding: 8px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--lg-surface-2); font-size: 14px; }
.mt-bar #mt-stop { margin-left: auto; }
.mt-exam { margin: 6px 0 8px; }
.mt-wait { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.mt-act-row { display: flex; align-items: center; gap: 10px; }
.mt-act-row .lab-tr-prompt { margin: 10px 0 6px; }
.mt-hint-btn { width: 28px; height: 28px; flex: none; border-radius: 50%; border: 1px solid var(--border); background: transparent; color: var(--text-muted); font: 600 14px var(--mm-body); cursor: pointer; }
.mt-hint-btn:hover, .mt-hint-btn.on { color: var(--warning); border-color: var(--warning); }
.mt-hintbox { margin-top: 10px; padding: 10px 12px; border-left: 3px solid var(--warning); background: var(--lg-surface-2); border-radius: 0 8px 8px 0; font-size: 14px; line-height: 1.5; }
.mt-hintbox p { margin: 4px 0; }
.mt-hintbox small { color: var(--text-muted); }
.mt-report { display: flex; flex-direction: column; gap: 14px; }
.mt-rep-head { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.mt-score { width: 112px; height: 112px; flex: none; border-radius: 50%; border: 4px solid var(--border); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1; }
.mt-score b { font-size: 38px; }
.mt-score span { font-size: 12px; color: var(--text-muted); }
.mt-score small { font-size: 12px; font-weight: 700; margin-top: 2px; }
.mt-score.good { border-color: var(--good); } .mt-score.good small { color: var(--good); }
.mt-score.mid { border-color: var(--warning); } .mt-score.mid small { color: var(--warning); }
.mt-score.bad { border-color: var(--critical); } .mt-score.bad small { color: var(--critical); }
.mt-rep-sum { flex: 1; min-width: 220px; }
.mt-rep-sum h3 { margin: 0 0 4px; }
.mt-rep-sum p { margin: 4px 0; }
.mt-card { padding: 12px 14px; border: 1px solid var(--border); border-radius: 10px; background: var(--lg-surface-2); }
.mt-card h4 { margin: 0 0 8px; font-size: 15px; }
.mt-card > p { margin: 4px 0; line-height: 1.5; }
.mt-pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.mt-pill { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--lg-surface-1); border: 1px solid var(--border); }
.mt-pill small { color: var(--text-muted); }
.mt-leak { padding: 8px 0; border-top: 1px dashed var(--border); }
.mt-leak:first-of-type { border-top: 0; padding-top: 0; }
.mt-leak-top { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 4px 12px; }
.mt-leak-top b { color: var(--critical); }
.mt-leak-top span { font-size: 13px; color: var(--text-secondary); }
.mt-leak p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--text-secondary); }
.mt-mistake { border-top: 1px dashed var(--border); padding: 6px 0; }
.mt-mistake > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: 4px 8px; align-items: baseline; font-size: 14px; }
.mt-mk-hand { color: var(--text-muted); font-size: 12px; }
.mt-cost { margin-left: auto; color: var(--critical); font-weight: 700; font-size: 13px; }
.mt-mk-body { padding: 6px 0 4px 14px; font-size: 14px; }
.mt-mk-body p { margin: 4px 0; }
.mt-c { display: inline-block; padding: 0 4px; margin-right: 2px; border-radius: 4px; background: var(--card-white); color: var(--card-black); font-weight: 700; font-size: 13px; }
.mt-c.red { color: var(--lg-card-red); }
.mt-good, .mt-next { margin: 0; padding-left: 18px; line-height: 1.7; }
.mt-good { list-style: none; padding-left: 0; color: var(--good); }
.mt-good small { color: var(--text-muted); }
.mt-chart-wrap { margin-top: 10px; }
.mt-chart-wrap small { color: var(--text-muted); }
.mt-chart { width: 100%; height: 130px; display: block; margin-top: 4px; background: var(--lg-surface-1); border-radius: 8px; }
.mt-chart-base { stroke: var(--text-muted); stroke-dasharray: 4 4; stroke-width: 1; vector-effect: non-scaling-stroke; }
.mt-chart-line { fill: none; stroke: var(--warning); stroke-width: 2; vector-effect: non-scaling-stroke; }
.mt-end-btns { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.mt-hist { font-size: 13px; }
.mt-hist > summary { cursor: pointer; color: var(--text-secondary); }
.mt-hist-tbl { width: 100%; border-collapse: collapse; margin: 6px 0; }
.mt-hist-tbl th, .mt-hist-tbl td { text-align: left; padding: 4px 6px; border-bottom: 1px solid var(--border); }
.mt-hist-tbl th { color: var(--text-muted); font-weight: 500; }
@media (max-width: 560px) {
  .mt-score { width: 88px; height: 88px; } .mt-score b { font-size: 30px; }
  .mt-hist-tbl td:nth-child(5), .mt-hist-tbl th:nth-child(5) { display: none; }
  .fh-stage.fh-many .tt-seat { width: 58px; }
  .fh-stage.fh-many .tt-seat:not(.hero) .tt-avatar { width: 30px; height: 30px; font-size: 15px; }
}
/* Mão inteira: sessão de N mãos e resumo no fim */
.fh-sessno { font-size: 14px; padding: 4px 10px; border-radius: 999px; background: var(--lg-surface-1); border: 1px solid var(--border); }
.fh-summary { display: flex; flex-direction: column; gap: 14px; margin-top: 12px; }

/* ---------- Minhas mãos ---------- */
.hh-drop { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 26px 16px; border: 2px dashed var(--border); border-radius: 14px; background: var(--lg-surface-2); cursor: pointer; text-align: center; margin: 8px 0 12px; }
.hh-drop span { color: var(--text-secondary); font-size: 13px; }
.hh-drop:hover, .hh-drop-on { border-color: var(--lg-accent); background: rgba(62, 207, 142, 0.08); }
.hh-paste-box { margin-bottom: 10px; }
.hh-paste-box summary { cursor: pointer; color: var(--text-secondary); font-size: 14px; padding: 6px 0; }
.hh-paste-box textarea { width: 100%; box-sizing: border-box; background: var(--lg-surface-2); color: var(--text-primary); border: 1px solid var(--border); border-radius: 10px; padding: 10px; font: 13px/1.4 ui-monospace, Consolas, monospace; margin: 6px 0; }
.hh-status { font-size: 14px; line-height: 1.5; }
.hh-empty { text-align: center; padding: 14px 0 4px; }
.hh-bad { color: #e66767; }
.hh-good { color: #3ba55c; }
.hh-leak { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; margin-bottom: 8px; border: 1px solid rgba(230, 103, 103, 0.35); background: rgba(230, 103, 103, 0.07); border-radius: 12px; }
.hh-leak-main { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.hh-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hh-table th { text-align: left; font-weight: 500; color: var(--text-secondary); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--border); }
.hh-table td { padding: 8px; border-bottom: 1px solid var(--border); }
.hh-leakchip { margin: 6px 0 10px; padding: 8px 12px; border-radius: 10px; background: var(--lg-surface-2); font-size: 14px; }
.hh-row { padding: 12px 14px; margin-bottom: 8px; border: 1px solid var(--border); border-radius: 12px; background: var(--lg-surface-2); }
.hh-row-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 6px; }
.hh-where { flex: 1; min-width: 160px; color: var(--text-secondary); }
.hh-cards { display: inline-flex; gap: 4px; }
.hh-card { display: inline-block; min-width: 38px; text-align: center; padding: 4px 6px; border-radius: 6px; background: #f4f1ea; color: #1b1b1b; font-weight: 800; font-size: 15px; }
.hh-card.hh-red { color: #c4262e; }
.hh-badge { padding: 3px 12px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.hh-v-ok { background: rgba(59, 165, 92, 0.2); color: #5fd084; }
.hh-v-mixed { background: rgba(250, 178, 25, 0.2); color: #f0b93a; }
.hh-v-err { background: rgba(230, 103, 103, 0.2); color: #f08585; }
.hh-why { color: #f08585; font-size: 14px; margin-top: 2px; }
.hh-det { margin-top: 6px; }
.hh-det summary { cursor: pointer; color: var(--text-secondary); font-size: 13px; }
@media (max-width: 560px) { .hh-leak { flex-direction: column; align-items: flex-start; } .hh-table { font-size: 12px; } }
#hh-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
#hh-tiles .stat-tile { min-width: 0; }

/* ==================== BANKROLL HUD & MODALS FREEMIUM ==================== */
.bankroll-hud {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-4);
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--sp-4);
  font-family: var(--font-sans);
}

.bankroll-hud.is-pro {
  background: var(--surface-2);
  border-color: var(--line-strong);
}

.bankroll-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  font-size: 14px;
  color: var(--text);
}

.bankroll-badge .bankroll-icon {
  font-size: 16px;
}

.bankroll-hud.is-pro .bankroll-text {
  color: var(--accent-soft);
}

.bankroll-cta-btn {
  font-size: 13px;
  padding: 4px 12px;
}

.bankroll-hud.pulse-success {
  animation: bankrollPulse 0.8s var(--ease);
}

@keyframes bankrollPulse {
  0% { transform: scale(1); box-shadow: 0 0 0 rgba(79, 134, 247, 0); }
  50% { transform: scale(1.02); box-shadow: 0 0 16px rgba(79, 134, 247, 0.4); border-color: var(--accent); }
  100% { transform: scale(1); box-shadow: 0 0 0 rgba(79, 134, 247, 0); }
}

/* Modais */
.bankroll-modal-backdrop,
.bankroll-ad-backdrop {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(7, 9, 13, 0.85);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--sp-4);
}

.bankroll-modal-card,
.bankroll-ad-card {
  width: 100%;
  max-width: 460px;
  background: var(--surface-2);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-pop);
  padding: var(--sp-6);
  color: var(--text);
  font-family: var(--font-sans);
}

.bm-header {
  text-align: center;
  margin-bottom: var(--sp-5);
}

.bm-chip-icon {
  display: inline-block;
  font-size: 32px;
  margin-bottom: var(--sp-2);
}

.bm-header h3 {
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 var(--sp-2);
  color: var(--text);
}

.bm-subtitle {
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-dim);
  margin: 0;
}

.bm-benefits {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  margin-bottom: var(--sp-6);
  background: var(--surface-1);
  padding: var(--sp-4);
  border-radius: var(--r-sm);
  border: 1px solid var(--line);
}

.bm-benefit-item {
  display: flex;
  align-items: flex-start;
  gap: var(--sp-3);
}

.bm-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: var(--r-pill);
  background: rgba(127, 209, 163, 0.15);
  color: var(--ok);
  font-weight: 700;
  font-size: 12px;
  flex-shrink: 0;
  margin-top: 2px;
}

.bm-benefit-item b {
  display: block;
  font-size: 14px;
  color: var(--text);
}

.bm-benefit-item span {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
}

.bm-actions {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.bm-btn-pro {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  text-align: center;
}

.bm-btn-ad {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-2);
  padding: 10px;
  font-size: 14px;
  cursor: pointer;
}

.bm-ad-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: var(--surface-3);
  color: var(--accent-soft);
  padding: 2px 8px;
  border-radius: var(--r-pill);
}

/* Modal de Anúncio Simulado */
.ad-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--sp-4);
}

.ad-tag {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: var(--accent-soft);
}

.ad-timer {
  display: inline-block;
  padding: 2px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-3);
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
}

.ad-content {
  background: var(--surface-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--sp-5);
  margin-bottom: var(--sp-4);
  text-align: center;
}

.ad-sponsor-logo {
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  color: var(--accent-soft);
  margin-bottom: var(--sp-3);
}

.ad-content h4 {
  font-size: 17px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 var(--sp-2);
}

.ad-content p {
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0 0 var(--sp-4);
}

.ad-progress-track {
  width: 100%;
  height: 6px;
  background: var(--surface-3);
  border-radius: var(--r-pill);
  overflow: hidden;
}

.ad-progress-fill {
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 0.3s ease;
}

.ad-footer {
  text-align: center;
}

.ad-note {
  font-size: 12px;
  color: var(--text-soft);
}

