:root {
  color-scheme: dark;
  --bg: #171b1b;
  --bg-card: #222828;
  --bg-hover: #303838;
  --border: #3b4442;
  --text: #e1e5df;
  --muted: #a2afa8;
  --bright: #f6f4eb;
  --green: #82cba4;
  --red: #ee9b93;
  --yellow: #e6c984;
  --blue: #a6c9de;
  --accent: #dfbb78;
  --felt: #205a48;
  --mono: "SFMono-Regular", Consolas, monospace;
  font-family:
    Inter,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
  background: var(--bg);
  color: var(--text);
  accent-color: var(--accent);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
input,
select {
  border: 1px solid var(--border);
  border-radius: 7px;
  background: #1b2120;
  color: var(--text);
  padding: 11px 14px;
}
button {
  cursor: pointer;
  font-weight: 600;
  white-space: nowrap;
  transition:
    background 0.14s,
    border-color 0.14s;
}
button:hover {
  background: var(--bg-hover);
  border-color: #7c9284;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button.primary {
  background: var(--accent);
  color: #24251e;
  border-color: var(--accent);
}
button.primary:hover {
  background: #edce93;
  border-color: #edce93;
}
button.danger,
.negative {
  color: var(--red);
}
button.small {
  padding: 7px 11px;
  font-size: 12px;
}
.text-button {
  border: 0;
  background: transparent;
  padding: 8px 4px;
  color: var(--muted);
  font-size: 12px;
}
.text-button:hover {
  background: transparent;
  color: var(--bright);
}
a {
  color: var(--yellow);
  text-underline-offset: 4px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 13px;
}
input,
select {
  width: 100%;
  min-width: 0;
}
input::placeholder {
  color: var(--muted);
}
input:focus,
select:focus {
  border-color: var(--accent);
}
:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 4px;
}
::selection {
  background: #7d673b;
  color: white;
}
input {
  caret-color: var(--accent);
}
::-webkit-scrollbar {
  width: 7px;
  height: 7px;
}
::-webkit-scrollbar-thumb {
  background: #56675b;
  border-radius: 7px;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 25px;
  color: var(--bright);
  font-weight: 600;
  letter-spacing: -0.025em;
}
h2 {
  font-size: 16px;
  color: var(--bright);
  font-weight: 600;
}
h3 {
  font-size: 14px;
  color: var(--bright);
}
p {
  line-height: 1.65;
}
.muted,
.fine {
  color: var(--muted);
}
.fine {
  font-size: 12px;
  line-height: 1.65;
}
.mono,
.number {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.number {
  margin-left: auto;
  text-align: right;
}
.positive {
  color: var(--green);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--bright);
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.035em;
}
.brand-mark {
  width: 30px;
  height: 30px;
  border: 2px solid var(--accent);
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  color: var(--accent);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0;
}
.topbar {
  height: 64px;
  padding: 0 28px;
  display: flex;
  align-items: center;
  gap: 24px;
  background: #121716;
  border-bottom: 1px solid #303a35;
}
.rooms-toggle {
  border: 0;
  border-left: 1px solid var(--border);
  border-radius: 0;
  background: none;
  padding: 8px 0 8px 22px;
  font-size: 13px;
  font-weight: 500;
}
.rooms-toggle span {
  margin-left: 10px;
  color: var(--muted);
}
.play-label {
  font-size: 10px;
  letter-spacing: 0.13em;
  color: var(--muted);
}
.topbar-right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 22px;
  font-size: 12px;
}
.connection {
  color: var(--green);
  font-size: 11px;
}
.connection::before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  margin-right: 6px;
  vertical-align: middle;
}
.connection.offline {
  color: var(--yellow);
}
.workspace {
  max-width: 1600px;
  margin: 0 auto;
}
main {
  padding: 22px 32px 28px;
  min-width: 0;
}
.room-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}
.metadata {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 12px;
}
.badge {
  display: inline-block;
  padding: 4px 7px;
  border: 1px solid #53695a;
  border-radius: 4px;
  color: #b5d8bd;
  background: #26382e;
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.045em;
}
.room-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}
.room-controls {
  display: flex;
  gap: 7px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.room-controls button {
  padding: 10px 12px;
  font-size: 12px;
  background: transparent;
}
.room-controls button[data-command="start"],
.room-controls button[data-command="resume"] {
  color: var(--green);
  border-color: #719d7e;
}
.room-controls button[data-command="end"],
.room-controls button[data-command="cancel"] {
  color: var(--muted);
}
.tabs {
  display: flex;
  gap: 25px;
  align-items: center;
  border-bottom: 1px solid var(--border);
  margin-bottom: 16px;
}
.tabs button {
  border: 0;
  border-bottom: 2px solid transparent;
  background: none;
  border-radius: 0;
  padding: 0 0 12px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted);
}
.tabs button.selected {
  color: var(--bright);
  border-bottom-color: var(--accent);
}
.tabs button:hover {
  color: var(--bright);
}
.game-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.table-panel {
  min-width: 0;
  border: 1px solid #414d45;
  background: #1c2521;
  border-radius: 14px;
  overflow: hidden;
}
.table-toolbar {
  min-height: 47px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px;
  padding: 10px 22px;
  color: var(--muted);
  font-size: 11px;
  border-bottom: 1px solid #354238;
  background: #202a24;
}
.table-toolbar label {
  flex-direction: row;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}
.table-toolbar select {
  width: 98px;
  padding: 5px 9px;
  font-size: 11px;
  border-color: #4b5b50;
  background: #1c2520;
}
#blinds-label {
  color: #e1d9bb;
}
#clock {
  margin-left: auto;
  color: var(--yellow);
  font-size: 12px;
}
#clock:empty {
  display: none;
}
.table-stage {
  position: relative;
  height: clamp(430px, calc(100dvh - 540px), 660px);
  margin: 8px 54px 22px;
}
.felt {
  position: absolute;
  left: 6%;
  top: 17%;
  width: 88%;
  height: 67%;
  border-radius: 47%;
  background: var(--felt);
  border: 12px solid #33483a;
  outline: 1px solid #6c8067;
  box-shadow:
    inset 0 0 0 2px #4f7b5d,
    0 18px 24px -18px #090e0b;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
}
.table-wordmark {
  color: #9dc3a4;
  opacity: 0.75;
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.3em;
  position: absolute;
  bottom: 17%;
}
.pot-label {
  color: #c8dccc;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.08em;
  display: flex;
  align-items: center;
  gap: 10px;
}
.pot-value {
  color: #fbf8e9;
  font: 600 30px var(--mono);
  letter-spacing: -0.04em;
}
.board {
  display: flex;
  gap: 8px;
  min-height: 98px;
}
.playing-card {
  position: relative;
  width: 68px;
  height: 96px;
  display: inline-flex;
  background: #f4f1e7;
  border: 1px solid #e8e0cf;
  border-radius: 5px;
  color: #1e2925;
  box-shadow: 0 3px 4px #0c1c1333;
  line-height: 1;
  font-family: Georgia, "Times New Roman", serif;
}
.playing-card.red {
  color: #b73c39;
}
.card-corner {
  position: absolute;
  left: 5px;
  top: 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}
.card-corner b {
  font-size: 20px;
  font-weight: 700;
}
.card-corner i {
  font-size: 16px;
  font-style: normal;
}
.card-corner.bottom {
  left: auto;
  right: 5px;
  top: auto;
  bottom: 5px;
  transform: rotate(180deg);
}
.card-pip {
  margin: auto;
  font-size: 39px;
}
.playing-card.back {
  background: #314a45;
  border: 2px solid #bac7ad;
  color: #c5d3bd;
  align-items: center;
  justify-content: center;
}
.card-monogram {
  display: grid;
  place-items: center;
  width: 65%;
  height: 75%;
  border: 1px solid #a6b99f;
  font:
    600 13px Inter,
    sans-serif;
  border-radius: 3px;
}
.playing-card.placeholder {
  background: #1a4a3b;
  border: 1px solid #688b6b;
  box-shadow: none;
  opacity: 0.5;
}
.seat {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 118px;
  text-align: center;
  z-index: 1;
}
.seat-cards {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  justify-content: center;
  min-height: 48px;
  margin-bottom: -1px;
}
.seat-cards .playing-card {
  width: 32px;
  height: 45px;
  box-shadow: none;
}
.seat-cards .card-corner {
  left: 3px;
  top: 3px;
  gap: 1px;
}
.seat-cards .card-corner b {
  font-size: 13px;
}
.seat-cards .card-corner i {
  font-size: 10px;
}
.seat-cards .card-corner.bottom {
  display: none;
}
.seat-cards .card-pip {
  font-size: 19px;
  margin-left: auto;
  margin-right: 3px;
  margin-top: auto;
  margin-bottom: 3px;
}
.seat.self {
  width: 140px;
}
.seat.self .seat-cards {
  min-height: 68px;
  gap: 0;
}
.seat.self .seat-cards .playing-card {
  width: 47px;
  height: 66px;
}
.seat.self .seat-cards .playing-card:first-child {
  transform: rotate(-5deg);
  transform-origin: bottom right;
}
.seat.self .seat-cards .playing-card:last-child {
  transform: rotate(5deg);
  transform-origin: bottom left;
}
.seat.self .seat-cards .card-corner b {
  font-size: 18px;
}
.seat.self .seat-cards .card-corner i {
  font-size: 12px;
}
.seat.self .seat-cards .card-pip {
  font-size: 28px;
}
.seat-box {
  position: relative;
  border-radius: 8px;
  background: #151c18;
  border: 1px solid #627463;
  padding: 9px 10px;
  min-height: 56px;
}
.seat.active .seat-box {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
  background: #333527;
}
.seat.self .seat-box {
  border-color: var(--accent);
}
.seat-name {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12px;
  color: #f1f3e9;
  font-weight: 500;
}
.seat-stack {
  display: block;
  font-size: 15px;
  font-weight: 600;
  margin-top: 5px;
  color: var(--bright);
}
.seat.self .seat-name {
  color: var(--yellow);
}
.seat.folded .seat-cards {
  opacity: 0.35;
}
.seat.folded .seat-box {
  color: var(--muted);
  background: #253029;
}
.seat-marker {
  position: absolute;
  right: -8px;
  bottom: 45px;
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: #242c23;
  background: #e7dfbd;
  font-size: 11px;
  font-weight: 750;
  border: 1px solid #fff0c6;
  z-index: 2;
}
.blind-marker {
  right: auto;
  left: -9px;
  width: 27px;
  border-radius: 5px;
  background: #2b3526;
  color: var(--yellow);
  border: 1px solid var(--yellow);
}
.seat-bet {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 7px;
  margin-top: 5px;
  border-radius: 8px;
  background: #183b2c;
  color: #e0ecce;
  font: 10px var(--mono);
}
.chip-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  background: #d8c593;
  border: 2px dashed #767853;
  border-radius: 50%;
}
.table-waiting {
  position: absolute;
  left: 16%;
  right: 16%;
  top: 30%;
  bottom: 18%;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #c2d8c3;
}
.table-waiting h2 {
  font-size: 25px;
  color: #f7f6e8;
  letter-spacing: -0.025em;
}
.table-waiting p {
  font-size: 13px;
  max-width: 330px;
}
.table-waiting button {
  margin-top: 6px;
}
.action-dock {
  min-height: 126px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 17px 28px 20px;
  border-top: 1px solid #3e4c40;
  background: #18201b;
}
.turn-label {
  width: 100%;
  color: #bdccbc;
  font-size: 12px;
  text-align: center;
}
.action-dock.is-turn .turn-label {
  color: var(--yellow);
}
.action-buttons {
  display: flex;
  gap: 9px;
  flex: 1;
  align-items: center;
}
.action-buttons button {
  min-width: 124px;
  min-height: 56px;
  border-color: #58695a;
  font-size: 15px;
  background: #242e26;
}
.action-buttons button span {
  display: block;
  margin-top: 4px;
  font: 11px var(--mono);
  opacity: 0.85;
}
.action-buttons [data-act="fold"] {
  color: #ecb4a7;
  border-color: #735c53;
  background: #2a2520;
}
.action-buttons [data-act="call"] {
  background: var(--accent);
  color: #24251e;
  border-color: var(--accent);
}
.action-buttons [data-act="raise"] {
  background: #356b48;
  color: #f1f6e5;
  border-color: #88ad80;
}
.action-buttons [data-act="allin"] {
  min-width: 88px;
  font-size: 13px;
  color: #e5d9ae;
}
.raise-controls {
  display: grid;
  grid-template-columns: auto 100px;
  align-items: center;
  gap: 8px 14px;
  width: 280px;
}
.raise-controls label {
  font-size: 12px;
  color: var(--muted);
}
.raise-controls input[type="number"] {
  padding: 7px 10px;
  font-family: var(--mono);
  text-align: right;
}
.raise-controls input[type="range"] {
  grid-column: 1/-1;
  padding: 0;
  border: 0;
  height: 12px;
  cursor: pointer;
  background: transparent;
}
.raise-presets {
  grid-column: 1/-1;
  display: flex;
  gap: 5px;
}
.raise-presets button {
  flex: 1;
  padding: 5px 9px;
  border-radius: 4px;
  font-size: 11px;
  background: transparent;
  color: var(--muted);
}
.game-rail {
  border-top: 1px solid var(--border);
  padding: 0 2px;
}
.game-rail > summary {
  cursor: pointer;
  padding: 16px 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}
.game-rail > summary > span {
  font-weight: 400;
  margin-left: 20px;
  font-size: 12px;
}
.rail-content {
  display: grid;
  grid-template-columns: 1fr 1fr 1.3fr;
  gap: 35px;
  padding: 8px 0 24px;
}
.rail-content > section {
  min-width: 0;
}
.rail-content h2 {
  margin-bottom: 15px;
  font-size: 14px;
}
.stat-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin: 13px 0;
  font-size: 12px;
}
.stat-row span:first-child {
  color: var(--muted);
}
.player-row {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.player-row .rank {
  color: var(--muted);
  font-family: var(--mono);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 20px;
}
.room-picker .section-heading {
  flex-wrap: wrap;
}
.room-picker .section-heading h2 {
  margin-right: auto;
}
.room-item {
  display: block;
  width: 100%;
  padding: 17px;
  margin-bottom: 10px;
  text-align: left;
  background: #1a221d;
  border-color: #415343;
}
.room-item.selected {
  border-color: var(--accent);
  background: #333527;
}
.room-item strong {
  display: block;
  color: var(--bright);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 9px;
}
.room-detail {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted);
}
.sidebar-note {
  color: var(--muted);
  font-size: 12px;
  margin-top: 24px;
}
#room-list:empty {
  min-height: 60px;
}
.hand-summary {
  padding: 15px 0;
  border-bottom: 1px solid var(--border);
}
.hand-summary summary {
  cursor: pointer;
  font-size: 13px;
  line-height: 1.7;
}
.board-inline {
  display: block;
  margin: 5px 0 0 17px;
  color: var(--muted);
  font: 12px var(--mono);
}
.history-detail {
  padding: 16px;
  margin-top: 14px;
  background: #202a24;
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  max-height: 350px;
  overflow: auto;
}
.history-detail hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 12px 0;
}
.agreement {
  padding: 16px 0;
}
.agreement > summary {
  font-size: 13px;
  cursor: pointer;
  font-weight: 600;
}
.terms-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px 18px;
  margin: 24px 0;
}
.terms-grid dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 7px;
}
.terms-grid dd {
  margin: 0;
  font-size: 12px;
  line-height: 1.6;
}
.join-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.checkbox-label {
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.6;
  font-size: 12px;
}
.checkbox-label input {
  width: 17px;
  height: 17px;
  margin-top: 2px;
  flex-shrink: 0;
}
.empty-state {
  min-height: 70dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
}
.empty-state h1 {
  font-size: 36px;
  letter-spacing: -0.035em;
}
.empty-state p {
  color: var(--muted);
  font-size: 15px;
}
.empty-table {
  width: 280px;
  height: 145px;
  border-radius: 50%;
  background: var(--felt);
  border: 8px solid #344e3a;
  outline: 1px solid #66836a;
  margin-bottom: 25px;
  display: flex;
  gap: 5px;
  align-items: center;
  justify-content: center;
  transform: rotate(-8deg);
}
.empty-table span {
  width: 30px;
  height: 43px;
  border: 1px solid #8baf8a;
  border-radius: 3px;
  background: #2a6650;
}
.auth-screen {
  max-width: 1100px;
  min-height: 100dvh;
  margin: 0 auto;
  padding: 70px 38px;
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 100px;
  align-items: center;
}
.auth-intro h1 {
  font-size: clamp(38px, 4.2vw, 58px);
  line-height: 1.1;
  margin: 48px 0 24px;
  font-weight: 500;
  letter-spacing: -0.04em;
}
.auth-intro > p {
  font-size: 16px;
  color: var(--muted);
  max-width: 390px;
}
.house-rules {
  display: flex;
  flex-direction: column;
  gap: 22px;
  margin: 38px 0 0;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.house-rules dt {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 5px;
}
.house-rules dd {
  margin: 0;
  font-size: 14px;
  line-height: 1.6;
}
.auth-form {
  background: var(--bg-card);
  border-radius: 13px;
  padding: 34px;
  display: flex;
  flex-direction: column;
  gap: 21px;
  border: 1px solid var(--border);
}
.auth-form h2 {
  font-size: 25px;
  font-weight: 500;
}
.auth-form #auth-help {
  color: var(--muted);
  font-size: 13px;
  margin-top: -11px;
}
.auth-form .fine {
  text-align: center;
}
.owner-grid {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.owner-grid h2 {
  font-size: 15px;
  margin-bottom: 12px;
}
.owner-grid label {
  margin-top: 16px;
}
.owner-grid p {
  margin-bottom: 14px;
}
#invite-output {
  font-size: 12px;
}
dialog {
  background: var(--bg-card);
  color: var(--text);
  border: 1px solid #637461;
  border-radius: 14px;
  padding: 27px;
  width: min(520px, calc(100vw - 28px));
  max-height: 90dvh;
}
dialog::backdrop {
  background: #080d0bbf;
}
dialog form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
#tournament-fields .form-grid {
  margin-bottom: 12px;
}
.table-scroll {
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 20px 0;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th,
td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
th {
  color: var(--muted);
  font-weight: 500;
  background: var(--bg-card);
}
.results-top {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
}
.delivery {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
  font-size: 12px;
}
.delivery p {
  margin: 7px 0 !important;
}
.notice-inline {
  padding: 12px 16px;
  border: 1px solid #8a754c;
  background: #332d20;
  color: #f2d49e;
  border-radius: 7px;
  margin-bottom: 18px;
  font-size: 13px;
}
#notice {
  position: fixed;
  left: 50%;
  bottom: 24px;
  transform: translateX(-50%);
  z-index: 100;
  width: max-content;
  max-width: calc(100vw - 28px);
  border: 1px solid #8b7e53;
  border-radius: 7px;
  padding: 12px 18px;
  background: #313325;
  color: #f8edc9;
  font-size: 13px;
}
@media (min-width: 1500px) {
  .table-stage {
    height: clamp(430px, calc(100dvh - 540px), 680px);
    margin-left: 80px;
    margin-right: 80px;
  }
}
@media (max-width: 1050px) {
  .play-label {
    display: none;
  }
  .topbar {
    padding: 0 20px;
    gap: 20px;
  }
  main {
    padding: 20px;
  }
  .table-stage {
    margin-left: 42px;
    margin-right: 42px;
  }
  .action-buttons button {
    min-width: 100px;
  }
  .raise-controls {
    width: 240px;
  }
  .auth-screen {
    gap: 50px;
  }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .topbar {
    min-height: 64px;
    height: auto;
    padding: 10px 16px;
    gap: 12px 20px;
    flex-wrap: wrap;
  }
  .brand {
    font-size: 18px;
  }
  .brand-mark {
    width: 26px;
    height: 26px;
    font-size: 14px;
  }
  .rooms-toggle {
    margin-left: auto;
    padding: 5px 0 5px 16px;
    font-size: 12px;
  }
  .topbar-right {
    width: 100%;
    justify-content: flex-end;
    gap: 18px;
    font-size: 11px;
  }
  .topbar-right .text-button {
    padding: 2px;
    font-size: 11px;
  }
  .connection {
    margin-right: auto;
    font-size: 11px;
  }
  main {
    padding: 20px 12px;
  }
  h1 {
    font-size: 21px;
  }
  .room-header {
    flex-direction: column;
    align-items: stretch;
    gap: 15px;
    margin-bottom: 20px;
  }
  .metadata {
    font-size: 11px;
    gap: 10px;
  }
  .room-actions {
    gap: 10px;
    justify-content: space-between;
  }
  .room-actions > button {
    padding: 10px 12px;
    font-size: 12px;
  }
  .room-controls {
    gap: 6px;
  }
  .room-controls button {
    font-size: 11px;
    padding: 9px;
  }
  .tabs {
    gap: 24px;
    margin-bottom: 12px;
  }
  .tabs button {
    font-size: 12px;
  }
  .table-panel {
    border-radius: 12px;
  }
  .table-toolbar {
    padding: 9px 12px;
    gap: 8px;
    font-size: 11px;
    min-height: 44px;
  }
  .table-toolbar label {
    font-size: 11px;
    gap: 6px;
  }
  .table-toolbar select {
    width: 76px;
    font-size: 11px;
    padding: 5px 6px;
  }
  #clock {
    font-size: 11px;
  }
  .table-stage {
    height: clamp(320px, 51dvh, 450px);
    margin: 6px 24px 18px;
  }
  .felt {
    left: 2%;
    top: 15%;
    width: 96%;
    height: 72%;
    border-width: 7px;
    border-radius: 47%;
    gap: 12px;
  }
  .table-wordmark {
    bottom: 19%;
    font-size: 8px;
    letter-spacing: 0.18em;
  }
  .pot-label {
    font-size: 9px;
    gap: 7px;
  }
  .pot-value {
    font-size: 23px;
  }
  .board {
    min-height: 50px;
    gap: 4px;
  }
  .playing-card {
    width: 32px;
    height: 48px;
    border-radius: 3px;
  }
  .card-corner {
    left: 3px;
    top: 3px;
    gap: 1px;
  }
  .card-corner b {
    font-size: 14px;
  }
  .card-corner i {
    font-size: 11px;
  }
  .card-corner.bottom {
    display: none;
  }
  .card-pip {
    font-size: 21px;
    margin-right: 3px;
    margin-bottom: 3px;
  }
  .seat {
    width: 73px;
  }
  .seat-cards {
    min-height: 31px;
    gap: 2px;
  }
  .seat-cards .playing-card {
    width: 21px;
    height: 30px;
    border-radius: 3px;
  }
  .card-monogram {
    font-size: 9px;
  }
  .seat-cards .card-corner b {
    font-size: 11px;
  }
  .seat-cards .card-corner i {
    font-size: 8px;
  }
  .seat-cards .card-pip {
    font-size: 13px;
    margin-right: 1px;
    margin-bottom: 2px;
  }
  .seat-box {
    min-height: 43px;
    padding: 7px 4px;
    border-radius: 6px;
  }
  .seat-name {
    font-size: 11px;
  }
  .seat-stack {
    font-size: 11px;
    margin-top: 4px;
  }
  .seat.self {
    width: 92px;
  }
  .seat.self .seat-cards {
    min-height: 46px;
  }
  .seat.self .seat-cards .playing-card {
    width: 32px;
    height: 45px;
  }
  .seat.self .seat-cards .card-corner b {
    font-size: 15px;
  }
  .seat.self .seat-cards .card-corner i {
    font-size: 11px;
  }
  .seat.self .seat-cards .card-pip {
    font-size: 19px;
  }
  .seat-marker {
    right: -6px;
    bottom: 36px;
    width: 17px;
    height: 17px;
    font-size: 9px;
  }
  .blind-marker {
    right: auto;
    left: -6px;
    width: 24px;
  }
  .seat-bet {
    font-size: 9px;
    margin-top: 4px;
    padding: 2px 5px;
  }
  .chip-dot {
    width: 8px;
    height: 8px;
  }
  .table-waiting {
    left: 10%;
    right: 10%;
    top: 24%;
    bottom: 15%;
    gap: 10px;
  }
  .table-waiting h2 {
    font-size: 21px;
  }
  .table-waiting p {
    font-size: 12px;
  }
  .action-dock {
    gap: 11px;
    padding: 13px 12px 16px;
    min-height: 110px;
  }
  .turn-label {
    font-size: 11px;
  }
  .action-buttons {
    display: grid;
    grid-template-columns: 1fr 1.3fr 1.3fr;
    width: 100%;
    gap: 6px;
    order: 2;
  }
  .action-buttons button {
    min-width: 0;
    min-height: 48px;
    padding: 7px 5px;
    font-size: 13px;
  }
  .action-buttons [data-act="allin"] {
    min-width: 0;
    grid-column: 1/-1;
    min-height: 30px;
    padding: 5px;
    background: transparent;
    border: 0;
    font-size: 11px;
  }
  .action-buttons button span {
    font-size: 11px;
    margin-top: 3px;
  }
  .action-buttons [data-act="allin"] span {
    display: inline;
    margin-left: 8px;
  }
  .raise-controls {
    width: 100%;
    grid-template-columns: 62px minmax(30px, 1fr) 76px;
    gap: 8px;
    order: 1;
  }
  .raise-controls label {
    font-size: 11px;
  }
  .raise-controls input[type="range"] {
    grid-column: 2;
    grid-row: 1;
  }
  .raise-controls input[type="number"] {
    grid-column: 3;
    grid-row: 1;
    padding: 6px;
    font-size: 12px;
  }
  .raise-presets {
    grid-column: 1/-1;
    justify-content: flex-end;
  }
  .raise-presets button {
    padding: 4px 8px;
    font-size: 11px;
  }
  .rail-content {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
  .rail-content > section:last-child {
    grid-column: 1/-1;
  }
  .game-rail > summary {
    font-size: 12px;
  }
  .game-rail > summary > span {
    display: none;
  }
  .terms-grid {
    gap: 18px 14px;
  }
  .auth-screen {
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 460px;
    min-height: 100dvh;
    padding: 35px 24px;
    align-items: stretch;
    justify-content: center;
  }
  .auth-intro h1 {
    font-size: 38px;
    margin: 30px 0 16px;
  }
  .auth-intro > p {
    font-size: 14px;
  }
  .house-rules {
    display: none;
  }
  .auth-form {
    padding: 25px;
  }
  dialog {
    padding: 23px;
  }
  .empty-state {
    min-height: 60dvh;
  }
  .empty-state h1 {
    font-size: 29px;
  }
  .empty-state p {
    font-size: 13px;
  }
  .empty-table {
    width: 235px;
    height: 125px;
  }
  .results-top {
    flex-direction: column;
    align-items: start;
  }
  th,
  td {
    padding: 11px;
    font-size: 12px;
  }
}
@media (max-width: 360px) {
  .table-stage {
    margin-left: 20px;
    margin-right: 20px;
  }
  .seat {
    width: 65px;
  }
  .seat.self {
    width: 82px;
  }
  .seat-name {
    font-size: 11px;
  }
  .board {
    gap: 3px;
  }
  .board .playing-card {
    width: 29px;
    height: 44px;
  }
  .room-actions {
    align-items: start;
  }
  .room-controls {
    max-width: 190px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
.vacant-seat {
  display: block;
  border: 1px dashed #556958;
  border-radius: 8px;
  padding: 17px 8px;
  color: #97b09b;
  font-size: 11px;
  background: #1d2c22;
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .vacant-seat {
    padding: 12px 3px;
    font-size: 9px;
  }
}

/* Seat geometry is static CSS to preserve the strict Content Security Policy. */
.table-stage[data-seats="2"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="2"] .seat-pos-1 {
  left: 50%;
  top: 11%;
}
.table-stage[data-seats="3"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="3"] .seat-pos-1 {
  left: 11.89%;
  top: 30.5%;
}
.table-stage[data-seats="3"] .seat-pos-2 {
  left: 88.11%;
  top: 30.5%;
}
.table-stage[data-seats="4"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="4"] .seat-pos-1 {
  left: 6%;
  top: 50%;
}
.table-stage[data-seats="4"] .seat-pos-2 {
  left: 50%;
  top: 11%;
}
.table-stage[data-seats="4"] .seat-pos-3 {
  left: 94%;
  top: 50%;
}
.table-stage[data-seats="5"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="5"] .seat-pos-1 {
  left: 8.15%;
  top: 62.05%;
}
.table-stage[data-seats="5"] .seat-pos-2 {
  left: 24.14%;
  top: 18.45%;
}
.table-stage[data-seats="5"] .seat-pos-3 {
  left: 75.86%;
  top: 18.45%;
}
.table-stage[data-seats="5"] .seat-pos-4 {
  left: 91.85%;
  top: 62.05%;
}
.table-stage[data-seats="6"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="6"] .seat-pos-1 {
  left: 11.89%;
  top: 69.5%;
}
.table-stage[data-seats="6"] .seat-pos-2 {
  left: 11.89%;
  top: 30.5%;
}
.table-stage[data-seats="6"] .seat-pos-3 {
  left: 50%;
  top: 11%;
}
.table-stage[data-seats="6"] .seat-pos-4 {
  left: 88.11%;
  top: 30.5%;
}
.table-stage[data-seats="6"] .seat-pos-5 {
  left: 88.11%;
  top: 69.5%;
}
.table-stage[data-seats="7"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="7"] .seat-pos-1 {
  left: 15.6%;
  top: 74.32%;
}
.table-stage[data-seats="7"] .seat-pos-2 {
  left: 7.1%;
  top: 41.32%;
}
.table-stage[data-seats="7"] .seat-pos-3 {
  left: 30.91%;
  top: 14.86%;
}
.table-stage[data-seats="7"] .seat-pos-4 {
  left: 69.09%;
  top: 14.86%;
}
.table-stage[data-seats="7"] .seat-pos-5 {
  left: 92.9%;
  top: 41.32%;
}
.table-stage[data-seats="7"] .seat-pos-6 {
  left: 84.4%;
  top: 74.32%;
}
.table-stage[data-seats="8"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="8"] .seat-pos-1 {
  left: 18.89%;
  top: 77.58%;
}
.table-stage[data-seats="8"] .seat-pos-2 {
  left: 6%;
  top: 50%;
}
.table-stage[data-seats="8"] .seat-pos-3 {
  left: 18.89%;
  top: 22.42%;
}
.table-stage[data-seats="8"] .seat-pos-4 {
  left: 50%;
  top: 11%;
}
.table-stage[data-seats="8"] .seat-pos-5 {
  left: 81.11%;
  top: 22.42%;
}
.table-stage[data-seats="8"] .seat-pos-6 {
  left: 94%;
  top: 50%;
}
.table-stage[data-seats="8"] .seat-pos-7 {
  left: 81.11%;
  top: 77.58%;
}
.table-stage[data-seats="9"] .seat-pos-0 {
  left: 50%;
  top: 89%;
}
.table-stage[data-seats="9"] .seat-pos-1 {
  left: 21.72%;
  top: 79.88%;
}
.table-stage[data-seats="9"] .seat-pos-2 {
  left: 6.67%;
  top: 56.77%;
}
.table-stage[data-seats="9"] .seat-pos-3 {
  left: 11.89%;
  top: 30.5%;
}
.table-stage[data-seats="9"] .seat-pos-4 {
  left: 34.95%;
  top: 13.35%;
}
.table-stage[data-seats="9"] .seat-pos-5 {
  left: 65.05%;
  top: 13.35%;
}
.table-stage[data-seats="9"] .seat-pos-6 {
  left: 88.11%;
  top: 30.5%;
}
.table-stage[data-seats="9"] .seat-pos-7 {
  left: 93.33%;
  top: 56.77%;
}
.table-stage[data-seats="9"] .seat-pos-8 {
  left: 78.28%;
  top: 79.88%;
}

.dialog-notice {
  padding: 11px 13px;
  margin-bottom: 16px;
  border: 1px solid #8b7e53;
  border-radius: 7px;
  background: #313325;
  color: #f8edc9;
  font-size: 13px;
  line-height: 1.6;
}
/* Phone controls reserve their own space; the board never sits under a dock. */
.table-menu > summary {
  display: none;
}
button.seat-box {
  display: block;
  width: 100%;
  white-space: normal;
}
button.seat-box:hover {
  border-color: var(--accent);
}
.seat-stack {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#player-title,
#room-name {
  overflow-wrap: anywhere;
}
#player-details dd {
  overflow-wrap: anywhere;
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  button,
  .text-button,
  select,
  summary {
    min-height: 44px;
    min-width: 44px;
    touch-action: manipulation;
  }
  input:not([type="checkbox"]),
  select {
    font-size: 16px;
    min-height: 44px;
  }
  .topbar {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .topbar-right {
    gap: 4px 12px;
    flex-wrap: wrap;
  }
  #player-name {
    max-width: 80px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }
  main {
    padding-left: max(12px, env(safe-area-inset-left));
    padding-right: max(12px, env(safe-area-inset-right));
  }
  .room-header {
    gap: 12px;
    margin-bottom: 12px;
  }
  .room-controls button {
    min-height: 44px;
    font-size: 13px;
  }
  .room-actions {
    align-items: center;
  }
  .room-actions > button {
    font-size: 13px;
  }
  .table-menu {
    position: relative;
  }
  .table-menu > summary {
    display: block;
    cursor: pointer;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 7px;
    font-size: 13px;
  }
  .table-menu .table-options {
    position: absolute;
    right: 0;
    top: calc(100% + 6px);
    width: min(280px, calc(100vw - 32px));
    max-height: calc(100dvh - 120px);
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg-card);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    z-index: 10;
  }
  .table-menu .room-controls button {
    width: 100%;
    text-align: left;
  }
  .tabs {
    gap: 18px;
    margin-bottom: 10px;
  }
  .tabs button {
    padding-bottom: 7px;
    font-size: 12px;
  }
  .table-toolbar {
    gap: 6px 10px;
    padding: 6px 10px;
    font-size: 12px;
  }
  .table-toolbar label {
    font-size: 12px;
  }
  .table-toolbar select {
    min-height: 44px;
    width: 62px;
    font-size: 16px;
    padding: 6px;
  }
  #clock {
    font-size: 12px;
  }
  .table-stage {
    height: 430px;
    height: clamp(430px, 52svh, 470px);
    margin: 6px 24px 18px;
  }
  .seat {
    width: 80px;
  }
  .seat-name {
    font-size: 12px;
  }
  .seat-stack {
    font-size: 13px;
  }
  .seat-box {
    min-height: 48px;
    padding: 7px 4px;
  }
  .seat.self {
    width: 100px;
  }
  .seat.self .seat-cards {
    min-height: 54px;
  }
  .seat.self .seat-cards .playing-card {
    width: 36px;
    height: 52px;
  }
  .seat.self .seat-stack {
    font-size: 14px;
  }
  .board {
    gap: 4px;
  }
  .board .playing-card {
    width: 34px;
    height: 50px;
  }
  .action-dock {
    gap: 10px;
    padding: 13px 12px max(16px, env(safe-area-inset-bottom));
  }
  .action-buttons {
    order: 0;
    grid-template-columns: 1fr 1.3fr 1.3fr;
  }
  .action-buttons button {
    min-height: 52px;
    font-size: 15px;
  }
  .action-buttons button span {
    font-size: 12px;
  }
  .raise-controls {
    order: 1;
    gap: 8px;
    grid-template-columns: 64px minmax(24px, 1fr) 90px;
  }
  .raise-controls label {
    font-size: 12px;
  }
  .raise-controls input[type="number"] {
    min-height: 44px;
    font-size: 16px;
  }
  .raise-controls input[type="range"] {
    height: 44px;
    min-height: 44px;
  }
  .raise-presets button {
    min-height: 44px;
    font-size: 12px;
  }
  .raise-confirmations {
    grid-column: 1/-1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .raise-confirmations button {
    min-height: 48px;
    font-size: 13px;
  }
  .raise-confirmations button span {
    display: block;
  }
  .raise-confirmations [data-act="allin"] {
    color: #e5d9ae;
  }
  .turn-label {
    font-size: 12px;
  }
  .game-rail > summary {
    padding: 16px 0;
    font-size: 13px;
  }
  dialog {
    max-width: calc(
      100vw - 24px - env(safe-area-inset-left) - env(safe-area-inset-right)
    );
    max-height: calc(
      100dvh - 24px - env(safe-area-inset-top) - env(safe-area-inset-bottom)
    );
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  dialog label,
  dialog .fine,
  .terms-grid dd,
  .checkbox-label {
    font-size: 13px;
  }
  dialog input:not([type="checkbox"]),
  dialog select,
  .auth-form input {
    font-size: 16px;
    min-height: 44px;
  }
  .form-grid {
    align-items: end;
  }
}
@media (max-width: 370px) {
  .seat {
    width: 68px;
  }
  .seat.self {
    width: 96px;
  }
  .board {
    gap: 3px;
  }
  .board .playing-card {
    width: 26px;
    height: 40px;
  }
}
@media (min-width: 340px) and (max-width: 380px) {
  .seat {
    width: 76px;
  }
  .board {
    gap: 3px;
  }
  .board .playing-card {
    width: 30px;
    height: 46px;
  }
}

@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .table-stage[data-seats] .seat-pos-0 {
    left: 50%;
    top: 90%;
  }
  .table-stage[data-seats="2"] .seat-pos-1 {
    left: 50%;
    top: 10%;
  }
  .table-stage[data-seats="3"] .seat-pos-1 {
    left: 26%;
    top: 12%;
  }
  .table-stage[data-seats="3"] .seat-pos-2 {
    left: 74%;
    top: 12%;
  }
  .table-stage[data-seats="4"] .seat-pos-1 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="4"] .seat-pos-2 {
    left: 50%;
    top: 10%;
  }
  .table-stage[data-seats="4"] .seat-pos-3 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="5"] .seat-pos-1 {
    left: 6%;
    top: 55%;
  }
  .table-stage[data-seats="5"] .seat-pos-2 {
    left: 26%;
    top: 12%;
  }
  .table-stage[data-seats="5"] .seat-pos-3 {
    left: 74%;
    top: 12%;
  }
  .table-stage[data-seats="5"] .seat-pos-4 {
    left: 94%;
    top: 55%;
  }
  .table-stage[data-seats="6"] .seat-pos-1 {
    left: 6%;
    top: 65%;
  }
  .table-stage[data-seats="6"] .seat-pos-2 {
    left: 6%;
    top: 30%;
  }
  .table-stage[data-seats="6"] .seat-pos-3 {
    left: 50%;
    top: 10%;
  }
  .table-stage[data-seats="6"] .seat-pos-4 {
    left: 94%;
    top: 30%;
  }
  .table-stage[data-seats="6"] .seat-pos-5 {
    left: 94%;
    top: 65%;
  }
  .table-stage[data-seats="7"] .seat-pos-1 {
    left: 16%;
    top: 80%;
  }
  .table-stage[data-seats="7"] .seat-pos-2 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="7"] .seat-pos-3 {
    left: 26%;
    top: 12%;
  }
  .table-stage[data-seats="7"] .seat-pos-4 {
    left: 74%;
    top: 12%;
  }
  .table-stage[data-seats="7"] .seat-pos-5 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="7"] .seat-pos-6 {
    left: 84%;
    top: 80%;
  }
  .table-stage[data-seats="8"] .seat-pos-1 {
    left: 16%;
    top: 80%;
  }
  .table-stage[data-seats="8"] .seat-pos-2 {
    left: 6%;
    top: 55%;
  }
  .table-stage[data-seats="8"] .seat-pos-3 {
    left: 6%;
    top: 29%;
  }
  .table-stage[data-seats="8"] .seat-pos-4 {
    left: 50%;
    top: 10%;
  }
  .table-stage[data-seats="8"] .seat-pos-5 {
    left: 94%;
    top: 29%;
  }
  .table-stage[data-seats="8"] .seat-pos-6 {
    left: 94%;
    top: 55%;
  }
  .table-stage[data-seats="8"] .seat-pos-7 {
    left: 84%;
    top: 80%;
  }
  .table-stage[data-seats="9"] .seat-pos-1 {
    left: 16%;
    top: 80%;
  }
  .table-stage[data-seats="9"] .seat-pos-2 {
    left: 6%;
    top: 55%;
  }
  .table-stage[data-seats="9"] .seat-pos-3 {
    left: 6%;
    top: 29%;
  }
  .table-stage[data-seats="9"] .seat-pos-4 {
    left: 35%;
    top: 10%;
  }
  .table-stage[data-seats="9"] .seat-pos-5 {
    left: 65%;
    top: 10%;
  }
  .table-stage[data-seats="9"] .seat-pos-6 {
    left: 94%;
    top: 29%;
  }
  .table-stage[data-seats="9"] .seat-pos-7 {
    left: 94%;
    top: 55%;
  }
  .table-stage[data-seats="9"] .seat-pos-8 {
    left: 84%;
    top: 80%;
  }
}
@media (pointer: coarse) and (min-width: 600px) and (max-height: 500px) {
  .table-panel {
    display: grid;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 210px;
  }
  .table-toolbar {
    grid-column: 1/-1;
  }
  .table-stage {
    height: 310px;
    margin: 6px 26px 18px;
  }
  .seat {
    width: 72px;
  }
  .seat.self {
    width: 96px;
  }
  .action-dock {
    grid-column: 2;
    grid-row: 2;
    border-top: 0;
    border-left: 1px solid var(--border);
    align-content: start;
    padding: 12px max(12px, env(safe-area-inset-right))
      max(12px, env(safe-area-inset-bottom));
  }
  .action-buttons {
    grid-template-columns: 1fr;
  }
  .raise-controls {
    grid-template-columns: 64px minmax(0, 1fr);
  }
  .raise-controls input[type="number"] {
    grid-column: 2;
  }
  .raise-controls input[type="range"] {
    grid-column: 1/-1;
    grid-row: 2;
  }
  .raise-presets {
    flex-wrap: wrap;
  }
  .raise-confirmations {
    grid-template-columns: 1fr;
  }
  .table-stage[data-seats] .seat-pos-0 {
    left: 50%;
    top: 88%;
  }
  .table-stage[data-seats="2"] .seat-pos-1 {
    left: 50%;
    top: 15%;
  }
  .table-stage[data-seats="3"] .seat-pos-1 {
    left: 26%;
    top: 15%;
  }
  .table-stage[data-seats="3"] .seat-pos-2 {
    left: 74%;
    top: 15%;
  }
  .table-stage[data-seats="4"] .seat-pos-1 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="4"] .seat-pos-2 {
    left: 50%;
    top: 15%;
  }
  .table-stage[data-seats="4"] .seat-pos-3 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="5"] .seat-pos-1 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="5"] .seat-pos-2 {
    left: 26%;
    top: 15%;
  }
  .table-stage[data-seats="5"] .seat-pos-3 {
    left: 74%;
    top: 15%;
  }
  .table-stage[data-seats="5"] .seat-pos-4 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="6"] .seat-pos-1 {
    left: 6%;
    top: 85%;
  }
  .table-stage[data-seats="6"] .seat-pos-2 {
    left: 16%;
    top: 15%;
  }
  .table-stage[data-seats="6"] .seat-pos-3 {
    left: 50%;
    top: 15%;
  }
  .table-stage[data-seats="6"] .seat-pos-4 {
    left: 84%;
    top: 15%;
  }
  .table-stage[data-seats="6"] .seat-pos-5 {
    left: 94%;
    top: 85%;
  }
  .table-stage[data-seats="7"] .seat-pos-1 {
    left: 16%;
    top: 85%;
  }
  .table-stage[data-seats="7"] .seat-pos-2 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="7"] .seat-pos-3 {
    left: 26%;
    top: 15%;
  }
  .table-stage[data-seats="7"] .seat-pos-4 {
    left: 74%;
    top: 15%;
  }
  .table-stage[data-seats="7"] .seat-pos-5 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="7"] .seat-pos-6 {
    left: 84%;
    top: 85%;
  }
  .table-stage[data-seats="8"] .seat-pos-1 {
    left: 16%;
    top: 85%;
  }
  .table-stage[data-seats="8"] .seat-pos-2 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="8"] .seat-pos-3 {
    left: 16%;
    top: 15%;
  }
  .table-stage[data-seats="8"] .seat-pos-4 {
    left: 50%;
    top: 15%;
  }
  .table-stage[data-seats="8"] .seat-pos-5 {
    left: 84%;
    top: 15%;
  }
  .table-stage[data-seats="8"] .seat-pos-6 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="8"] .seat-pos-7 {
    left: 84%;
    top: 85%;
  }
  .table-stage[data-seats="9"] .seat-pos-1 {
    left: 16%;
    top: 85%;
  }
  .table-stage[data-seats="9"] .seat-pos-2 {
    left: 6%;
    top: 50%;
  }
  .table-stage[data-seats="9"] .seat-pos-3 {
    left: 16%;
    top: 15%;
  }
  .table-stage[data-seats="9"] .seat-pos-4 {
    left: 35%;
    top: 15%;
  }
  .table-stage[data-seats="9"] .seat-pos-5 {
    left: 65%;
    top: 15%;
  }
  .table-stage[data-seats="9"] .seat-pos-6 {
    left: 84%;
    top: 15%;
  }
  .table-stage[data-seats="9"] .seat-pos-7 {
    left: 94%;
    top: 50%;
  }
  .table-stage[data-seats="9"] .seat-pos-8 {
    left: 84%;
    top: 85%;
  }
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .table-toolbar label {
    position: relative;
  }
  .table-toolbar label::after {
    content: "";
    position: absolute;
    right: 9px;
    top: 17px;
    width: 6px;
    height: 6px;
    border-right: 1px solid var(--muted);
    border-bottom: 1px solid var(--muted);
    transform: rotate(45deg);
    pointer-events: none;
  }
  .table-toolbar select {
    appearance: none;
    height: 44px;
    padding-right: 22px;
  }
}

.table-options {
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.room-share {
  min-width: 0;
  max-width: 280px;
}
.room-share input {
  width: 100%;
  min-width: 0;
  margin-top: 8px;
}
.room-share [data-copy-fallback] {
  margin-top: 12px;
}
.room-share .fine {
  margin: 8px 0 0;
}
@media (max-width: 760px), (pointer: coarse) and (max-height: 500px) {
  .table-menu .room-controls {
    flex-direction: column;
    align-items: stretch;
    width: 100%;
  }
  .table-options .room-share,
  #copy-room {
    width: 100%;
  }
}

.room-header {
  margin-bottom: 8px;
}
.room-guidance {
  margin: 0 0 8px;
  max-width: 75ch;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.room-guidance.is-turn {
  color: var(--accent);
}
.room-guidance.offline {
  color: var(--red);
}
#my-table {
  min-width: 44px;
  min-height: 44px;
}
