/* Expanded HUDs keep their space; compact tables flow around a clear board. */
.play-area { container-type: inline-size; }
.felt { height: var(--table-height, 710px); }
.seat-title { min-height: 36px; line-height: 1.3; }
.seat .hud { font-size: var(--hud-size); }
.stat-row { display: block; }
.stat-row summary { display: flex; justify-content: space-between; gap: 12px; }
.stat-row summary::before { content: '+'; color: var(--gold); }
.stat-row[open] summary::before { content: '−'; }
.stat-row summary > span:first-of-type { flex: 1; }
.stat-row p { margin: 10px 0 0; }
.seat:target { outline: 3px solid var(--gold); outline-offset: 4px; }

/* Separate raised badges from the cards, retaining their space in each seat. */
.seat, .seat.actor { padding: 0; border: 0; background: transparent; box-shadow: none; }
.seat-body { padding: 7px; background: #102824ed; border: 1px solid #607669; border-radius: 14px; box-shadow: 0 5px 18px #071a1c66; }
.seat.actor .seat-body { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 18px #edc78c33; }
.seat.folded { opacity: 1; }
.seat.folded .seat-body { opacity: .62; }
.seat .seat-hud {
  display: block; width: 100%; margin: 0 0 8px; padding: 7px 6px;
  border: 1px solid #648d80; border-radius: 9px;
  background: linear-gradient(135deg, #253e3e, #132e2a);
  box-shadow: 0 4px 12px #001b22aa; color: #d3f3e4; text-align: center;
}
.seat.inspected .seat-hud { border-color: var(--mint); box-shadow: 0 0 0 1px var(--mint), 0 4px 12px #001b22aa; }
.seat-hud .hud-caption { display: block; margin: 0 0 5px; font-size: 10px; color: var(--gold); }
.hud-values { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px 7px; }
.hud-stat { white-space: nowrap; }
.seat .hud-stat small { font-size: 9px; }
.hud-hint { text-align: center; margin: 6px 0 18px; }
.player-popover {
  position: fixed; z-index: 50; margin: 0; width: min(360px, calc(100vw - 24px));
  max-height: min(620px, calc(100dvh - 24px)); overflow-y: auto; overscroll-behavior: contain;
  border: 1px solid var(--mint); box-shadow: 0 15px 65px #000b; padding: 18px;
}
.player-popover .section-head { gap: 4px; align-items: start; }
.player-popover .eyebrow { font-size: 9px; letter-spacing: .08em; }
.player-popover h2 { font-size: 23px; margin-top: 10px; }
.player-popover .stat-row summary { min-height: 35px; align-items: center; }
.player-popover .stat-row { padding: 3px 0; }
.player-popover .stat-row summary > span:last-child { white-space: nowrap; }
.player-popover textarea { margin-top: 4px; }
#player-stats { margin-bottom: 16px; }

@container (max-width: 740px) {
  .felt, .felt[data-seats="2"] {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 12px;
    height: auto;
    padding: 20px 12px;
    border-radius: 45px;
    align-items: center;
    justify-items: center;
  }
  #seat-layer { display: contents; }
  .seat {
    position: static;
    transform: none;
    grid-row: var(--seat-row);
    grid-column: var(--seat-column);
    width: 100%;
    max-width: 200px;
    padding: 0;
    min-width: 0;
  }
  .table-center {
    position: static;
    transform: none;
    grid-column: 1 / -1;
    grid-row: 3;
    width: 100%;
    padding: 8px 0;
  }
  .felt[data-seats="2"] .table-center { grid-row: 2; }
  .table-mark { margin: 4px; }
  .seat .cards { gap: 3px; }
  .seat .card { width: 27px; height: 38px; flex-shrink: 1; font-size: 16px; }
  .seat .card span { font-size: 14px; }
  .seat .hud { gap: 5px 8px; }
  .seat .hud small { font-size: 10px; }
  .board .card { width: 37px; height: 51px; font-size: 22px; }
}

@media (max-width: 520px) {
  .player-popover { max-height: min(620px, calc(80dvh)); }
  .flow { display: grid; grid-template-columns: 1fr 1fr; }
  .flow button { width: 100%; }
  .settings select { width: 100%; }
  .settings > label { min-width: 0; flex-basis: calc(50% - 10px); }
  .settings .check { flex-basis: 100%; }
}
/* Training notebook: wide comparison tables scroll within a phone-sized page. */
.table-scroll{max-width:100%;overflow-x:auto}.report-table{width:100%;border-collapse:collapse;font-size:.85rem}.report-table th,.report-table td{text-align:left;padding:.65rem;border-bottom:1px solid #ffffff25;vertical-align:top}.report-table th{color:var(--gold,#e4ba78)}.research-figure{display:block;width:100%;height:auto;margin:1rem 0;border-radius:12px}
.lab-actions{display:flex;flex-wrap:wrap;gap:.6rem}.lab-actions button[aria-pressed="true"]{outline:3px solid var(--gold,#e4ba78);outline-offset:3px}.lab-best{font-weight:700;background:#ffffff12}.lab-board{font-size:clamp(1rem,4vw,1.6rem)!important;overflow-wrap:anywhere}
