/* The display and its four score windows follow the seating at the real table. */
.table-meter {
  pointer-events: none; min-width: 0; color: #f5f3e4;
  font: 700 13px/1 system-ui, "Hiragino Kaku Gothic ProN", sans-serif;
  font-variant-numeric: tabular-nums; text-align: center; container-type: inline-size;
}
#stage3d > .table-meter {
  position: absolute; z-index: 1; left: 50%; top: calc(50% + var(--table-depth)*.35);
  transform: translate(-50%,-50%); width: calc(var(--table-unit)*5.35);
  height: calc(var(--table-depth)*3.38);
}
.table-meter .sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.meter-display {
  width: 100%; height: 100%; display: grid; grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr 1fr; align-items: center;
  padding: 1.2cqi 2cqi; box-sizing: border-box;
  border: 1px solid #8d8c70; border-radius: 5cqi;
  background: linear-gradient(145deg,#263632,#101c19 47%,#172521);
  box-shadow: inset 0 0 0 1px #101a16, 0 2px 2px #0a100e88;
}
.meter-seat { display: flex; align-items: baseline; justify-content: center; gap: 1.25cqi; white-space: nowrap; }
.meter-wind { color: #b8beb0; font-size: clamp(8px,6.3cqi,15px); }
.meter-seat b { color: #edf0df; font: 700 clamp(10px,8.2cqi,22px)/1 system-ui,sans-serif; font-variant-numeric: tabular-nums; letter-spacing: -.045em; }
.meter-seat.current .meter-wind { color: #101e1a; background: #bde9ba; border-radius: 2px; }
.meter-seat-2 { grid-area: 1 / 1 / 2 / 3; }
.meter-seat-3 { grid-area: 2 / 1; }
.meter-seat-1 { grid-area: 2 / 2; }
.meter-seat-0 { grid-area: 4 / 1 / 5 / 3; }
.meter-counters {
  grid-area: 3 / 1 / 4 / 3; display: flex; align-items: baseline; justify-content: center;
  gap: 3cqi; font-size: clamp(8px,6cqi,14px); color: #b7c2b3; white-space: nowrap;
  padding-block: .5cqi; background: #071511; border-radius: 2cqi;
}
.meter-wall b { font-size: 1.35em; color: #d3edc8; }
.meter-dora { display: flex; justify-content: center; align-items: center; gap: 1px; margin-bottom: 3px; }
.meter-dora .tile.mini { width: clamp(15px,11cqi,26px); }
.b-center.table-meter .meter-display { height: auto; min-height: 74px; aspect-ratio: 1.5; }
#stageTop { padding-block: 0; }
#stageTop .char-plate.chip .plate-body { min-width: 0; }
@media (min-width: 850px) and (min-aspect-ratio: 6/5) {
  #stageTop #seatPlates .chip { width: auto; }
}
@media (max-width: 700px), (max-height: 500px) {
  #table:not(.stage-mode) { padding: 4px; }
  .board { grid-template-columns: minmax(0,1fr) minmax(112px,36%) minmax(0,1fr); gap: 3px 2px; }
  .board .b-left,.board .b-right { flex-direction: column; gap: 2px; }
  .board .b-right { flex-direction: column-reverse; }
  .board .seat-side { position: static; width: 100%; min-width: 0; }
  .board .seat-side .char-plate { flex-direction: row; gap: 2px; }
  .board .seat-side .plate-body { padding: 2px; }
  .board .seat-side .plate-top { flex-wrap: wrap; gap: 1px; }
  .board .char-face { width: 20px; height: 24px; }
  .board .plate-name { font-size: 11px; }
  .board .wind-badge,.board .plate-tag { font-size: 9px; padding: 0 1px; }
  .board .backs.side { display: flex; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 0; }
  .board .backs.side .tileback { width: 6px; height: 10px; margin: 0; }
  .board .backs.side .tile.called { width: 12px; }
  .board .pool.sd { grid-template-rows: repeat(6,15px); grid-auto-columns: 18px; gap: 1px; min-width: 0; min-height: 0; }
  .board .pool.sd .cell { width: 18px; height: 15px; }
  .board .pool.sd .tile.pool-t { width: 14px; }
  .board .pool.tb { min-height: 0; grid-template-columns: repeat(6,18px); gap: 1px; }
  .board .pool.tb .tile.pool-t { width: 18px; }
}
.score-compact { display: none; }
@container (max-width: 155px) {
  .meter-seat { gap: 1.2cqi; }
  .meter-seat b { font: 700 clamp(10px,9.4cqi,14px)/1 Arial,sans-serif; letter-spacing: -.025em; }
  .meter-seat .score-full { display: none; }
  .meter-seat .score-compact { display: inline; }
  .meter-counters { gap: 2.1cqi; }
}
@media (orientation: landscape) and (max-height: 500px) {
  #table.stage-mode #stageTop { padding: 0; }
  #stageTop #seatPlates .chip { padding: 0 2px; }
  #stageTop #seatPlates .char-face { height: 19px; width: 18px; }
}
