.bridge-game .card-room { border-radius:clamp(15px,7vw,60px); }
.bridge-game .turn-group { max-width:100%; }
.bridge-game #actions :is(select,button) { min-height:44px; }
.bridge-game #actions select {
  width:min(64%,320px); padding:6px 10px; text-overflow:ellipsis; border:1px solid #78907c; border-radius:8px;
  background:#15392b; color:var(--room-ink); font:inherit;
}
.bridge-game .auction-record { width:min(100%,440px); border-collapse:collapse; margin:4px auto 10px; text-align:center; }
.bridge-game .auction-record caption { margin-bottom:4px; color:var(--room-ink); font-weight:750; }
.bridge-game .auction-record :is(th,td) {
  width:25%; padding:4px 5px; border:1px solid #78907c; color:var(--room-ink); font-size:12px;
}
.bridge-game .auction-record th { background:#193f32; }
.bridge-game #board > details { margin:4px auto; }
.bridge-game #board > details > summary { cursor:pointer; }
@media (orientation: landscape) and (max-height:480px) {
  .bridge-game .card-room { padding-inline:8px; padding-block:6px; }
  .bridge-game .card-room .hand-card { width:34px; height:43px; }
  .bridge-game .board-layouts section { min-height:61px; }
  .bridge-game .turn-groups { max-height:45px; overflow-y:auto; }
}

.bridge-game .auction-record [data-latest] { background:#375840; color:#ffde96; font-weight:750; }
.bridge-game .turn-seats {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-areas:". north ." "west south east";
  max-width:680px; gap:6px;
  margin-inline:auto;
}
.bridge-game .turn-seat:nth-child(1) { grid-area:south; }
.bridge-game .turn-seat:nth-child(2) { grid-area:west; }
.bridge-game .turn-seat:nth-child(3) { grid-area:north; }
.bridge-game .turn-seat:nth-child(4) { grid-area:east; }
.bridge-game .turn-seat { text-align:center; }
.bridge-game .card-room:has(.board-layouts) .turn-seats { display:none; }
.bridge-game .board-layouts {
  grid-template-columns:repeat(3,minmax(0,1fr));
  grid-template-areas:". north ." "west south east";
  max-width:680px; gap:6px;
}
.bridge-game .board-layouts section[data-seat="0"] { grid-area:south; }
.bridge-game .board-layouts section[data-seat="1"] { grid-area:west; }
.bridge-game .board-layouts section[data-seat="2"] { grid-area:north; }
.bridge-game .board-layouts section[data-seat="3"] { grid-area:east; }
.bridge-game .board-layouts section { min-height:62px; padding:3px; }
.bridge-game .board-layouts [data-acting] { border-color:var(--gold); background:#25483b; }
.bridge-game .board-layouts .hand-card { width:28px; height:36px; }
.bridge-game .board-layouts .card-corner { font-size:12px; }
.bridge-game #player .hand-card:disabled { opacity:.59; }
@media (orientation: landscape) and (max-height:480px) {
  .bridge-game .board-layouts section { min-height:51px; }
  .bridge-game .board-layouts h3 { margin-bottom:1px; }
  .bridge-game .flow-result { padding:9px 13px; }
}
.bridge-game .flow-result { display:flex; flex-direction:column; }
.bridge-game .flow-scores, .bridge-game .flow-result .auction-record { order:1; }
.bridge-game .flow-result .flow-actions { margin-block-end:9px; }
.bridge-game .flow-score .mini-cards { max-width:none; gap:2px; }
.bridge-game .flow-score .hand-card { width:22px; height:28px; padding:2px; }
.bridge-game .flow-score .hand-card .card-corner { font-size:10px; }
.bridge-game #actions #confirm-bid:not(:disabled) { background:var(--gold); color:#241c0e; border-color:var(--gold); }
.bridge-game .review-cards { display:flex; flex-wrap:wrap; justify-content:center; gap:2px; margin-top:2px; }
.bridge-game .card-room .review-cards .hand-card { width:19px; height:23px; padding:1px; }
.bridge-game .review-cards .hand-card .card-corner { font-size:9px; }
.bridge-game .flow-formula { color:var(--gold); }
@media (orientation:landscape) and (max-height:480px) {
  .bridge-game .card-room .review-cards { flex-wrap:nowrap; }
  .bridge-game .turn-groups:has(.review-cards) { max-height:none; }
}
/* 667x375 auction: seats in one row and a one-line record header so bid/confirm stay on the first screen (UI-FIXLIST batch 5 P1). */
@media (orientation:landscape) and (max-height:480px) {
  .bridge-game .turn-seats {
    grid-template-columns:repeat(4,auto); justify-content:center;
    grid-template-areas:"west north east south";
    max-width:none; gap:4px;
  }
  .bridge-game .turn-seats .turn-seat { padding:2px 4px; font-size:12px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
  .bridge-game #board > p { margin:2px 0; font-size:12px; }
  .bridge-game .auction-record { margin:2px auto 4px; }
  .bridge-game .auction-record caption { margin-bottom:2px; font-size:13px; }
  .bridge-game .auction-record :is(th,td) { padding:2px 4px; font-size:11px; white-space:nowrap; }
  .bridge-game #status { margin-block:2px; }
  .bridge-game #hand-title { position:absolute; width:1px; height:1px; overflow:hidden; clip:rect(0 0 0 0); }
}
.bridge-game .turn-seat { justify-content:center; }
@media (orientation:landscape) and (max-height:480px) { .bridge-game .turn-seats .lp-avatar { display:none; } }
/* Phones: avatar above the seat text so names don't break into four lines; call menu on its own row, Confirm and Hint together below. */
@media (max-width: 600px) {
  .bridge-game .turn-seats .turn-seat { flex-direction: column; gap: 2px; padding: 4px 3px; font-size: 11px; line-height: 1.25; }
  .bridge-game #actions select { width: 100%; }
}
/* Desktop: larger faces and one-line seat labels (Muse retest4: 42px faces too small, North label wrapped). */
@media (min-width: 601px) and (min-height: 481px) {
  .bridge-game .turn-seats { max-width: 760px; }
  .bridge-game .turn-seats .turn-seat { white-space: nowrap; }
  .bridge-game .turn-seat .lp-avatar { width: 54px; height: 54px; }
  .bridge-game .board-layouts h3 .lp-avatar { width: 44px; height: 44px; }
}
/* While cards fly in, hide the centre text (vulnerability, auction record) so the deal doesn't cover it (Muse retest4). */
.bridge-game [data-dealing] #board { visibility:hidden; }
