.poker-game .board-layouts { margin: 8px auto 0; }
.poker-game .board-layouts h3 { margin: 0 0 4px; font-size: 12px; color: var(--room-soft); }
.poker-game .layout-grid { display: flex; justify-content: center; flex-wrap: wrap; gap: 4px; }
.poker-game .turn-group { color: var(--room-soft); }
.poker-game .actions button:is(#match,#exchange) {
  color: #241c0e;
  background: var(--gold);
  border-color: var(--gold);
}
@media (orientation: landscape) and (max-height: 550px) {
  .poker-game .card-room { border-radius: 12% / 24%; }
  .poker-game .board-layouts h3 { font-size: 11px; margin-bottom: 2px; }
  .poker-game .board-layouts { margin-top: 4px; }
  .poker-game .turn-board p { font-size: 11px; }
  .poker-game .turn-group { padding: 2px 6px; }
  .poker-game .turn-board:has(> .hand) {
    display: grid;
    grid-template-columns: repeat(2,minmax(0,1fr));
    align-items: end;
    gap: 4px;
  }
  .poker-game .turn-board:has(> .hand) > p { grid-area: 1 / 1 / 2 / 3; }
  .poker-game .turn-board:has(> .hand) > .hand { grid-area: 2 / 1; margin: 0; }
  .poker-game .turn-board:has(> .hand) > .board-layouts { grid-area: 2 / 2; margin: 0; }
  .poker-game .turn-board:has(> .hand) > .turn-groups { grid-area: 3 / 1 / 4 / 3; }
}
@media (orientation: landscape) and (max-height: 370px) {
  .poker-game .card-room .status { min-height: 1.5em; margin-block: 3px; font-size: 12px; }
  .poker-game .card-room .hand-card { height: 43px; }
  .poker-game .turn-groups { margin-top: 3px; }
  .poker-game .turn-board > p { margin-block: 1px; }
  .poker-game .actions { min-height: 34px; margin-top: 4px; }
  .poker-game .actions button { min-height: 34px; }
}
@media (orientation: landscape) and (max-height: 370px) {
  .poker-game .card-room[data-finished] .duel-seat {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
  }
  .poker-game .card-room[data-finished] .duel-seat .hand { margin: 0; }
}

.poker-game .turn-board:has(.public-cards) > p {
  justify-self: center;
  width: fit-content;
  margin-inline: auto;
  border: 1px solid #b3985f;
  border-radius: 999px;
  padding: 3px 11px;
  background: #112e25;
  color: #ffdf9d;
  font-weight: 700;
}
.poker-game .turn-board .public-cards {
  padding: 5px;
  gap: 4px;
  width: fit-content;
  max-width: 100%;
}
.poker-game .card-room .public-slot {
  border: 1px dashed #a0bea587;
  background: #0d372a;
  box-shadow: none;
}
.poker-game .card-room .actions button { min-height: 44px; }
@media (orientation: landscape) and (max-height: 370px) {
  .poker-game .turn-board { margin-top: 5px; }
  .poker-game .card-room .hand-card { height: 39px; }
  .poker-game .turn-board .public-cards { padding: 2px 0; }
  .poker-game .card-room[data-finished] .duel-seat { gap: 4px; }
}
@media (orientation: landscape) and (max-height: 370px) {
  .poker-game .card-room[data-finished] .status { margin-block: 1px; }
  .poker-game .card-room[data-finished] .board-layouts h3 { line-height: 1; }
  .poker-game .card-room[data-finished] .turn-groups { margin-top: 0; }
  .poker-game .card-room[data-finished] .actions { margin-top: 0; }
}
@media (orientation: landscape) and (max-height: 370px) {
  .poker-game .card-room { padding-block-start: 5px; }
  .poker-game .turn-board:not(:has(.public-cards)) .board-layouts { margin-top: 2px; }
  .poker-game .turn-board .turn-group { padding-block: 1px; }
}

.holdem-game .turn-seats { display:none; }
.holdem-game .turn-board:has(.public-cards) > p.holdem-bets {
  display:flex; justify-content:center; gap:6px; border:0; border-radius:0; padding:0;
  background:transparent; color:var(--room-ink); font-size:13px;
}
.holdem-bets span { padding:2px 7px; border:1px solid #78907c; border-radius:6px; }
.holdem-bets strong { color:var(--gold); }
@media (orientation: landscape) and (max-height:480px) {
  .holdem-game .turn-board:has(> .hand) > .holdem-bets { grid-area:2 / 1 / 3 / 3; margin:0 auto; }
  .holdem-game .turn-board:has(> .hand) > .hand { grid-area:3 / 1; }
  .holdem-game .turn-board:has(> .hand) > .board-layouts { grid-area:3 / 2; }
}

@media (orientation:landscape) and (max-height:480px) {
  .holdem-game .flow-result { display:flex; flex-direction:column; }
  .holdem-game .flow-result > .flow-actions { margin-block-end:8px; }
  .holdem-game .flow-result > :is(.flow-scores, .flow-history, p:not(.flow-formula):last-of-type) { order:1; }
}
/* Hold'em / Omaha: opponent on top, pot and board in the middle, your hand below (ChatGPT P2). Landscape keeps its two-column grid above. */
@media not ((orientation: landscape) and (max-height: 550px)) {
  .poker-game .turn-board:has(> .public-cards) { display: flex; flex-direction: column; align-items: center; }
  .poker-game .turn-board:has(> .public-cards) > .board-layouts { order: -1; margin: 0 auto 10px; width: 100%; }
}
/* Keep the action row's place while the computer acts, so the controls don't jump. */
.poker-game .card-room #actions { min-height: 44px; }
