@charset "UTF-8";
:root {
  color-scheme: dark;
  --bg: #151917;
  --panel: #1c211e;
  --line: #333a32;
  --ink: #eeeae0;
  --muted: #a1aa9b;
  --dim: #75816f;
  --brass: #ceb88c;
  --green: #89ae96;
  --felt: #193b2e;
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  min-width: 280px;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    ui-sans-serif,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  font-size: 14px;
}
body {
  min-height: var(--app-height, 100svh);
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
button {
  transition:
    background-color 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 120ms var(--ease);
}
button:active:not(:disabled) {
  transform: scale(0.98);
}
button:disabled {
  cursor: default;
  opacity: 0.38;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 4px;
}
a {
  color: inherit;
  text-decoration: none;
}
button svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}
input,
select {
  color: var(--ink);
  background: #202622;
  border: 1px solid #424b3e;
  border-radius: 7px;
  min-height: 48px;
  padding: 11px 13px;
  font-size: 16px;
  min-width: 0;
}
input {
  width: 100%;
}
select {
  width: 100%;
  cursor: pointer;
}
option {
  background: #202622;
}
input[type="number"] {
  appearance: textfield;
}
input::-webkit-inner-spin-button {
  appearance: none;
}
[hidden] {
  display: none !important;
}
.icons,
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
.skip {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 100;
  background: var(--brass);
  color: #20221c;
  padding: 14px;
  transform: translateY(-150%);
}
.skip:focus {
  transform: none;
}
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.8px;
  color: #a2ad98;
  line-height: 1.5;
}
.muted {
  color: var(--muted);
  line-height: 1.8;
}
.small-rule {
  display: inline-block;
  width: 21px;
  height: 1px;
  background: var(--brass);
  vertical-align: middle;
  margin-right: 9px;
}
.meta-dot {
  height: 3px;
  width: 3px;
  border-radius: 50%;
  background: #738d73;
}
.topbar {
  height: 78px;
  border-bottom: 1px solid #30372e;
  display: flex;
  align-items: center;
  gap: 26px;
  padding: 0 36px;
  background: #151917ed;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.brand > span {
  font-size: 27px;
  letter-spacing: -1.2px;
  font-weight: 550;
  line-height: 1;
}
.brand-dot {
  color: var(--brass);
}
.brand small {
  display: block;
  font-size: 7px;
  letter-spacing: 1.9px;
  color: #89947e;
  margin-top: 7px;
}
.top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-left: auto;
}
.icon-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  width: 44px;
  height: 44px;
  border-radius: 8px;
  color: #b7c0ae;
}
.sound-off-mark {
  position: absolute;
  left: 12px;
  top: 20px;
  width: 21px;
  border-top: 1px solid var(--bg);
  box-shadow: 0 1px 0 currentColor;
  transform: rotate(-45deg);
}
#sound-button[aria-pressed="true"] .sound-off-mark {
  display: none;
}
.connection {
  font-size: 10px;
  color: #9aad91;
  margin-right: 8px;
  white-space: nowrap;
}
.connection:before {
  content: "";
  display: inline-block;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #98b888;
  margin-right: 7px;
}
.connection.offline {
  color: #ceb88c;
}
.connection.offline:before {
  background: #ceb88c;
}
.room-identity {
  padding-left: 26px;
  border-left: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.room-identity span {
  font-size: 9px;
  letter-spacing: 1.4px;
  color: var(--dim);
}
.room-identity strong {
  font-size: 13px;
  font-weight: 450;
}
.quiet-button,
.small-button {
  display: inline-flex;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 13px;
  border: 1px solid #414a3d;
  border-radius: 7px;
  color: #bfc8b4;
  font-size: 12px;
}
.small-button {
  white-space: nowrap;
}
.primary-button {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 50px;
  padding: 0 19px;
  background: var(--brass);
  color: #23261f;
  border: 1px solid var(--brass);
  border-radius: 7px;
  font-size: 14px;
  font-weight: 550;
}
.primary-button svg {
  width: 19px;
}
.history-toggle {
  display: none;
}
#main-content {
  height: calc(var(--app-height, 100svh) - var(--header-height));
  outline: none;
}
.lobby {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 398px;
  gap: 8vw;
  max-width: 1140px;
  margin: auto;
  padding: 65px 38px 45px;
}
.lobby-editorial {
  min-width: 0;
}
.lobby h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(56px, 6.2vw, 83px);
  letter-spacing: -3px;
  line-height: 1.12;
  font-weight: 400;
  margin: 28px 0 24px;
}
.lobby h1 em {
  font-weight: 400;
  color: #cbb995;
}
.lead {
  font-size: 14px;
  line-height: 1.9;
  color: #9faa95;
  letter-spacing: 0.1px;
}
.table-illustration {
  position: relative;
  height: 273px;
  margin: 32px -25px 10px;
}
.illustration-felt {
  position: absolute;
  width: 94%;
  height: 178px;
  top: 40px;
  left: -2%;
  border: 1px solid #435541;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 10%, #24412e, #16291f);
  transform: rotate(-11deg);
  box-shadow:
    inset 0 0 0 8px #1c281d,
    inset 0 0 0 9px #33402d,
    0 25px 35px #0e130d60;
}
.illustration-rule {
  position: absolute;
  inset: 26px;
  border: 1px solid #3d503667;
  border-radius: 50%;
}
.illustration-label {
  position: absolute;
  left: 42%;
  top: 65%;
  font-size: 8px;
  letter-spacing: 3px;
  color: #607d55;
}
.preview-card {
  position: absolute;
  background: #ece9dd;
  color: #233023;
  border-radius: 7px;
  box-shadow: 0 10px 24px #070c0860;
  width: 93px;
  height: 132px;
  top: 31px;
  padding: 11px 13px;
  border: 1px solid #edece2;
}
.preview-card b {
  font-family: Georgia, serif;
  font-size: 26px;
  font-weight: 500;
  display: block;
}
.preview-card span {
  font-size: 40px;
  position: absolute;
  bottom: 17px;
  right: 21px;
}
.ace {
  left: 30%;
  transform: rotate(-21deg);
}
.king {
  left: 47%;
  top: 21px;
  transform: rotate(8deg);
}
.chip {
  position: absolute;
  width: 36px;
  height: 36px;
  border: 5px dashed #cec3a0;
  border-radius: 50%;
  background: #637e61;
  box-shadow:
    0 3px 0 #7d8870,
    0 4px 7px #0005;
  top: 175px;
}
.chip:after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid #b4b99a;
  border-radius: 50%;
}
.chip-one {
  left: 65%;
}
.chip-two {
  left: 70%;
  top: 160px;
  transform: rotate(20deg);
}
.chip-three {
  left: 70%;
  top: 155px;
  transform: rotate(20deg);
}
.illustration-caption {
  position: absolute;
  left: 15%;
  bottom: 6px;
  color: #6d7d61;
  letter-spacing: 1.3px;
  font-size: 8px;
}
.lobby-footnote {
  display: flex;
  align-items: center;
  gap: 15px;
  margin-top: 10px;
  color: #7a886e;
  font-size: 10px;
  letter-spacing: 0.6px;
}
.lobby-footnote i {
  height: 1px;
  width: 23px;
  background: #45503d;
}
.setup-card {
  background: linear-gradient(150deg, #252b24, #1c221d);
  border: 1px solid #424a3d;
  border-radius: 14px;
  padding: 30px;
  box-shadow: 0 25px 70px #0d100c40;
}
.setup-heading h2 {
  font-size: 27px;
  font-family: Georgia, serif;
  letter-spacing: -0.6px;
  font-weight: 400;
  margin: 14px 0 9px;
}
.setup-heading p {
  font-size: 12px;
  color: #97a18b;
  margin: 0 0 24px;
}
.mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid #46503f;
  border-radius: 7px;
  padding: 3px;
  gap: 3px;
  margin: 0 0 26px;
  background: #171e18;
}
.mode-switch label {
  position: relative;
  cursor: pointer;
}
.mode-switch input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  min-height: 0;
}
.mode-switch span {
  display: flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #9daa91;
  border-radius: 4px;
}
.mode-switch input:checked + span {
  background: #364132;
  color: #e5e6d8;
}
.mode-switch input:focus-visible + span {
  outline: 2px solid var(--brass);
  outline-offset: 2px;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px 14px;
}
.form-grid > label {
  font-size: 11px;
  color: #b2bda5;
  display: flex;
  flex-direction: column;
  gap: 9px;
}
.full-field {
  grid-column: 1/-1;
}
.setup-note {
  color: #93a087;
  font-size: 11px;
  line-height: 1.8;
  margin: 16px 0 18px;
}
.blind-line {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid #3a4433;
  padding: 16px 0 22px;
  font-size: 11px;
  color: #87957a;
}
.blind-line strong {
  font-weight: 450;
  color: #b8c4a8;
}
.start-button {
  width: 100%;
}
.local-note {
  font-size: 10px;
  text-align: center;
  color: #87977a;
  margin: 15px 0 0;
}
.saved-tables {
  margin: 28px 4px 0;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.section-heading h2 {
  font-size: 12px;
  font-weight: 450;
  margin: 0;
}
.section-heading > span {
  font-size: 10px;
  color: #8e9d80;
}
.saved-table {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  padding: 14px 0;
  min-height: 60px;
  border-bottom: 1px solid #303a2c;
  text-align: left;
}
.saved-table strong {
  display: block;
  font-size: 13px;
  font-weight: 450;
}
.saved-table small {
  font-size: 11px;
  color: #8b9d7c;
  display: block;
  margin-top: 5px;
}
.saved-table svg {
  width: 16px;
  color: var(--brass);
}
.room {
  height: 100%;
}
.room-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 274px;
  grid-template-rows: minmax(0, 1fr) auto;
  height: 100%;
}
.table-stage {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}
.felt {
  position: absolute;
  left: 9%;
  right: 9%;
  top: 13%;
  bottom: 18%;
  border-radius: 47%;
  background: radial-gradient(
    ellipse at 50% 20%,
    #204731,
    #163525 65%,
    #152e23
  );
  border: 1px solid #46563d;
  box-shadow:
    inset 0 0 0 8px #243626,
    inset 0 0 0 10px #3a4930,
    inset 0 0 60px #0d251ba0,
    0 18px 45px #0a100a40;
}
.felt > div {
  position: absolute;
  inset: 22px;
  border: 1px solid #6f835629;
  border-radius: 47%;
}
.felt > span {
  position: absolute;
  bottom: 16%;
  left: 0;
  right: 0;
  text-align: center;
  color: #6d8a5650;
  letter-spacing: 4px;
  font-size: 11px;
}
.opponents {
  position: absolute;
  inset: 0;
}
.seat {
  position: absolute;
  left: var(--x);
  top: var(--y);
  transform: translate(-50%, -50%);
  width: 112px;
  text-align: center;
  isolation: isolate;
}
.seat-info {
  background: #202c23e8;
  border: 1px solid #4b5c41;
  border-radius: 8px;
  padding: 8px 7px 7px;
  box-shadow: 0 4px 13px #06100640;
}
.seat.turn .seat-info,
.hero-seat.turn .hero-info {
  border-color: var(--brass);
  box-shadow: 0 0 0 2px #cfbb8a16;
}
.seat.folded {
  opacity: 0.45;
}
.seat-name {
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
  line-height: 1.6;
}
.seat-stack {
  font-size: 12px;
  color: #c5d0b4;
  letter-spacing: 0.3px;
  font-variant-numeric: tabular-nums;
  margin: 2px 0;
}
.seat-state {
  height: 16px;
  font-size: 9px;
  color: #91a881;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seat.turn .seat-state {
  color: #dfc994;
}
.seat-cards {
  display: flex;
  justify-content: center;
  gap: 3px;
  margin-bottom: -4px;
  position: relative;
  z-index: -1;
}
.dealer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #d3c7a6;
  color: #2c3625;
  font-size: 8px;
  font-weight: 700;
  border-radius: 50%;
  width: 16px;
  height: 16px;
  margin-left: 5px;
  vertical-align: middle;
}
.seat-bet {
  display: block;
  font-size: 10px;
  color: #a7ba91;
  padding-top: 5px;
  min-height: 17px;
  font-variant-numeric: tabular-nums;
}
.card {
  width: 53px;
  height: 74px;
  background: #f0eee3;
  border: 1px solid #ebe9dc;
  border-radius: 6px;
  color: #243329;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  padding: 6px 8px;
  box-shadow: 0 3px 5px #04110828;
  font-family: Georgia, serif;
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}
.card .rank {
  font-size: 22px;
  line-height: 1;
}
.card .suit {
  font-size: 25px;
  line-height: 1;
  align-self: flex-end;
}
.card.red {
  color: #ab493e;
}
.card.back {
  background: repeating-linear-gradient(
    45deg,
    #54624a 0,
    #54624a 1px,
    #3c4c34 1px,
    #3c4c34 5px
  );
  border: 2px solid #b2b495;
  box-shadow: inset 0 0 0 2px #354b31;
}
.card.back:after {
  content: "♠";
  font-size: 20px;
  color: #b9c09a;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: radial-gradient(ellipse, #405236 10%, transparent 65%);
}
.card.empty {
  background: #17342360;
  border: 1px solid #6d855444;
  box-shadow: none;
}
.card.empty:after {
  content: "·";
  color: #5a7446;
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 20px;
}
.seat .card {
  width: 31px;
  height: 42px;
  padding: 3px 4px;
  border-radius: 4px;
}
.seat .card .rank {
  font-size: 13px;
}
.seat .card .suit {
  font-size: 16px;
}
.seat .card.back:after {
  font-size: 14px;
}
.board-center {
  position: absolute;
  left: 50%;
  top: 43%;
  transform: translate(-50%, -50%);
  text-align: center;
}
.pot-label {
  font-size: 9px;
  letter-spacing: 2px;
  color: #98ad83;
}
.pot-amount {
  font-size: 34px;
  font-weight: 400;
  letter-spacing: -1px;
  line-height: 1.4;
  color: #e4e8d3;
  font-variant-numeric: tabular-nums;
  margin: 1px 0 12px;
}
.community-cards {
  display: flex;
  gap: 7px;
  justify-content: center;
}
.board-meta {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 9px;
  margin-top: 15px;
  font-size: 10px;
  color: #a1b588;
  white-space: nowrap;
}
.board-outcome {
  font-size: 12px;
  color: #d6c997;
  margin: 10px 0 0;
  max-width: 330px;
}
.hero-seat {
  position: absolute;
  bottom: 4%;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  gap: 14px;
}
.hero-cards {
  display: flex;
  gap: 6px;
}
.hero-info {
  background: #232f26;
  border: 1px solid #506242;
  border-radius: 8px;
  padding: 11px 15px;
  min-width: 118px;
  box-shadow: 0 6px 17px #07140850;
}
.hero-name {
  font-size: 10px;
  color: #93a683;
  letter-spacing: 1px;
}
.hero-stack {
  font-size: 21px;
  font-variant-numeric: tabular-nums;
  margin: 4px 0;
  color: #e4e5d2;
}
.hero-status {
  font-size: 10px;
  color: #c2c9a8;
}
.hero-seat.folded .hero-cards {
  opacity: 0.45;
}
.watch-label {
  position: absolute;
  bottom: 7%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  color: #8ca07b;
}
.action-dock {
  grid-row: 2;
  grid-column: 1;
  border-top: 1px solid #35432f;
  margin: 0 27px;
  padding: 17px 6px max(20px, env(safe-area-inset-bottom));
  min-width: 0;
}
.decision-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
  margin-bottom: 13px;
}
.decision-line .eyebrow {
  font-size: 8px;
  letter-spacing: 1.5px;
  color: #748969;
}
.decision-line h2 {
  font-size: 14px;
  font-weight: 450;
  margin: 6px 0 0;
}
.call-context {
  color: #aebc9e;
  font-size: 11px;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.betting-actions {
  display: grid;
  grid-template-columns: 0.9fr 1.35fr 1.2fr 1fr;
  gap: 9px;
}
.action-button {
  min-height: 53px;
  border: 1px solid #45533d;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  font-size: 13px;
  background: #222d23;
}
.action-button strong {
  font-weight: 500;
}
.action-button > span {
  font-size: 10px;
  color: #9fac8e;
}
.action-button.call {
  background: #90ad8b;
  border-color: #90ad8b;
  color: #162918;
}
.action-button.call > span {
  color: #344f2d;
}
.action-button.raise {
  border-color: #998b64;
  color: #d4c194;
  background: #332f23;
}
.action-button.fold {
  background: #2e2923;
  border-color: #4f4435;
  color: #c3b29b;
}
.action-button.allin {
  background: transparent;
}
.action-button:disabled {
  opacity: 0.3;
}
.hand-controls {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}
.hand-controls .primary-button {
  min-height: 47px;
}
.action-status {
  font-size: 11px;
  color: #bbad88;
  margin: 9px 0 0;
  line-height: 1.7;
}
.action-status:empty {
  display: none;
}
.dock-note {
  font-size: 12px;
  color: #8fa380;
  line-height: 1.8;
  margin: 0;
}
.history-panel {
  grid-column: 2;
  grid-row: 1/3;
  border-left: 1px solid #343c30;
  padding: 30px 22px;
  background: #1a201a;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.history-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.history-header h2 {
  font-family: Georgia, serif;
  font-size: 22px;
  line-height: 1.4;
  font-weight: 400;
  margin: 13px 0 22px;
  letter-spacing: -0.5px;
}
.history-header .eyebrow {
  font-size: 8px;
}
.mobile-close {
  display: none;
}
.session-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  border-top: 1px solid #394331;
  border-bottom: 1px solid #394331;
  padding: 18px 0;
}
.session-summary span {
  display: block;
  color: #89997a;
  font-size: 9px;
  margin-bottom: 7px;
}
.session-summary strong {
  font-size: 15px;
  font-weight: 450;
  color: #c5d0b1;
  white-space: nowrap;
}
.record-note {
  font-size: 10px;
  color: #869778;
  line-height: 1.8;
  margin: 20px 0;
}
.history-list {
  overflow: auto;
  flex: 1;
  min-height: 90px;
  scrollbar-width: thin;
}
.history-item {
  display: block;
  width: 100%;
  text-align: left;
  border-left: 1px solid #415238;
  padding: 8px 0 8px 13px;
  margin-bottom: 7px;
  min-height: 44px;
  position: relative;
}
.history-item:before {
  content: "";
  position: absolute;
  left: -3px;
  top: 15px;
  width: 5px;
  height: 5px;
  background: #728861;
  border-radius: 50%;
}
.history-item strong {
  display: block;
  font-weight: 450;
  font-size: 11px;
  color: #c2ceaf;
  line-height: 1.7;
}
.history-item small {
  display: block;
  font-size: 9px;
  color: #839873;
  line-height: 1.7;
  margin-top: 3px;
}
.history-item.hand_completed:before {
  background: var(--brass);
}
.history-item.hand_completed strong {
  color: #d6c591;
}
.history-heading {
  font-size: 9px;
  color: #9baf88;
  letter-spacing: 1px;
  margin: 22px 0 12px;
}
.equity-note {
  border-top: 1px solid #394431;
  padding-top: 17px;
  margin-top: 18px;
}
.equity-note > span {
  font-size: 8px;
  letter-spacing: 1.3px;
  color: #7c8f6e;
}
.equity-note p {
  font-size: 10px;
  color: #8ea17d;
  line-height: 1.9;
  margin: 9px 0 0;
}
.panel-backdrop {
  display: none;
}
.dialog {
  background: #222a22;
  color: var(--ink);
  border: 1px solid #566147;
  border-radius: 13px;
  padding: 28px;
  width: min(460px, calc(100vw - 28px));
  max-height: calc(var(--overlay-height, var(--app-height, 100svh)) - 28px);
  box-shadow: 0 25px 90px #070d0766;
  overflow: auto;
}
.dialog::backdrop {
  background: #0b120bd9;
  backdrop-filter: blur(3px);
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.dialog h2 {
  font-family: Georgia, serif;
  font-size: 32px;
  letter-spacing: -0.7px;
  font-weight: 400;
  margin: 16px 0;
}
.dialog .primary-button {
  width: 100%;
  margin-top: 18px;
}
.raise-label {
  display: block;
  font-size: 12px;
  color: #c4cfb2;
  margin: 25px 0 12px;
}
.raise-label span {
  display: block;
  font-size: 10px;
  color: #8e9e7d;
  margin-top: 7px;
}
.amount-field {
  display: flex;
  align-items: center;
  background: #18231a;
  border: 1px solid #6f7c55;
  border-radius: 8px;
  padding: 0 14px;
}
.amount-field input {
  border: 0;
  outline: 0;
  background: transparent;
  font-size: 28px;
  min-height: 65px;
  padding-left: 0;
  font-variant-numeric: tabular-nums;
}
.amount-field > span {
  font-size: 12px;
  color: #8a9f76;
}
.raise-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
  margin-top: 12px;
}
.raise-presets button {
  min-height: 44px;
  border: 1px solid #46593a;
  border-radius: 6px;
  color: #b6c59f;
  background: #2c3826;
  font-size: 12px;
}
.field-note {
  font-size: 11px;
  color: #98aa84;
  line-height: 1.8;
}
.rules-copy h3 {
  font-size: 14px;
  font-weight: 500;
  color: #d2c599;
  margin: 23px 0 8px;
}
.rules-copy p {
  font-size: 13px;
  line-height: 1.9;
  color: #a7b69a;
  margin: 0;
}
.result-summary {
  font-size: 15px;
  line-height: 1.8;
  color: #d6c89e;
  margin: 18px 0;
}
.result-line {
  padding: 14px 0;
  border-top: 1px solid #435038;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #b9c9a3;
  font-size: 13px;
}
.result-line span {
  color: #8fa77b;
}
.result-cards {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 20px 0;
}
.result-detail {
  font-size: 12px;
  color: #a9ba97;
  line-height: 1.8;
}
.error-notice {
  position: fixed;
  z-index: 25;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  width: min(680px, calc(100vw - 24px));
  display: flex;
  gap: 15px;
  align-items: center;
  background: #3a3222;
  border: 1px solid #a18d55;
  color: #ded0a8;
  padding: 15px 16px;
  border-radius: 10px;
  box-shadow: 0 12px 30px #0004;
}
.error-notice > div {
  flex: 1;
  min-width: 0;
}
.error-notice strong {
  font-size: 13px;
  font-weight: 550;
}
.error-notice p {
  font-size: 12px;
  line-height: 1.7;
  margin: 5px 0 0;
}
.error-notice .small-button {
  border-color: #897650;
  color: #dbc799;
}
.error-notice .icon-button {
  color: #cebd8e;
}
.toast {
  position: fixed;
  bottom: 25px;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100vw - 32px);
  background: #d0c19a;
  color: #252c20;
  padding: 13px 20px;
  border-radius: 8px;
  font-size: 12px;
  z-index: 30;
  text-align: center;
}
dialog {
  opacity: 0;
  transform: translateY(7px) scale(0.99);
  transition:
    opacity 120ms ease,
    transform 120ms var(--ease),
    display 120ms allow-discrete,
    overlay 120ms allow-discrete;
}
dialog[open] {
  opacity: 1;
  transform: none;
  transition-duration: 170ms;
}
dialog:not([open]),
dialog:not([open])::backdrop {
  pointer-events: none;
}
@starting-style {
  dialog[open] {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }
}
.keyboard-mode dialog,
.keyboard-mode button {
  transition: none;
}
.keyboard-mode button:active {
  transform: none;
}
@media (hover: hover) and (pointer: fine) {
  .icon-button:hover,
  .quiet-button:hover,
  .small-button:hover {
    background: #ffffff08;
  }
  .primary-button:hover:not(:disabled) {
    background: #ddc99f;
  }
  .saved-table:hover {
    background: #ffffff04;
  }
  .history-item:hover {
    background: #ffffff04;
  }
  .raise-presets button:hover {
    background: #3b4a31;
  }
}
@media (min-width: 1600px) {
  .lobby {
    padding-top: 95px;
  }
  .room-layout {
    grid-template-columns: minmax(0, 1fr) 310px;
  }
  .seat {
    width: 126px;
  }
  .seat-name {
    font-size: 12px;
  }
  .hero-seat .card {
    width: 62px;
    height: 86px;
  }
  .board-center .card {
    width: 60px;
    height: 84px;
  }
}
@media (max-width: 1199px) {
  .room-layout {
    grid-template-columns: minmax(0, 1fr);
  }
  .history-toggle {
    display: flex;
  }
  .history-panel {
    position: fixed;
    top: 0;
    bottom: 0;
    right: 0;
    width: 310px;
    z-index: 15;
    opacity: 0;
    visibility: hidden;
    transform: translateX(22px);
    pointer-events: none;
    transition:
      transform 200ms var(--ease),
      opacity 150ms ease,
      visibility 0s linear 200ms;
  }
  .history-panel.panel-open {
    opacity: 1;
    visibility: visible;
    transform: none;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .mobile-close {
    display: flex;
  }
  .history-header h2 {
    margin-bottom: 20px;
  }
  .panel-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    background: #070f09bb;
    backdrop-filter: blur(2px);
    z-index: 14;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
      opacity 160ms ease,
      visibility 0s linear 160ms;
  }
  .panel-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 0s;
  }
  .lobby {
    gap: 40px;
    padding-top: 50px;
    grid-template-columns: minmax(0, 1fr) 360px;
  }
  .setup-card {
    padding: 26px;
  }
  .lobby h1 {
    font-size: 65px;
  }
  .table-illustration {
    margin-left: -40px;
  }
}
@media (max-width: 760px) {
  .topbar {
    height: 64px;
    padding: 0 18px;
    gap: 15px;
  }
  .brand > span {
    font-size: 24px;
  }
  .brand img {
    width: 31px;
    height: 31px;
  }
  .connection {
    font-size: 10px;
    margin-right: 0;
  }
  .top-actions {
    gap: 2px;
  }
  .room-identity {
    padding-left: 15px;
    gap: 4px;
  }
  .room-identity span {
    font-size: 8px;
  }
  .room-identity strong {
    font-size: 11px;
  }
  #main-content {
    height: calc(var(--app-height, 100svh) - var(--header-height));
  }
  .lobby {
    grid-template-columns: 1fr;
    max-width: 520px;
    padding: 38px 23px;
    gap: 28px;
  }
  .lobby h1 {
    font-size: 65px;
    margin: 24px 0 20px;
  }
  .table-illustration {
    display: none;
  }
  .lobby-footnote {
    margin-top: 30px;
  }
  .lobby h1 br {
    display: none;
  }
  .lobby h1 em {
    white-space: nowrap;
  }
  .lead {
    font-size: 14px;
  }
  .setup-card {
    padding: 26px;
  }
  .setup-heading p {
    font-size: 13px;
  }
  .setup-note,
  .local-note {
    font-size: 12px;
  }
  .saved-tables {
    margin-bottom: 25px;
  }
  .room .table-stage {
    min-height: 0;
  }
  .felt {
    inset: 45px 6% 11%;
    border-radius: 80px;
    box-shadow:
      inset 0 0 0 5px #243626,
      inset 0 0 0 6px #3a4930,
      inset 0 0 50px #0d251b90;
  }
  .felt > div {
    inset: 13px;
    border-radius: 70px;
  }
  .felt > span {
    display: none;
  }
  .opponents {
    position: relative;
    inset: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px 12px;
    padding: 15px 20px 0;
    z-index: 1;
  }
  .seat {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    width: auto;
    min-width: 0;
  }
  .seat-info {
    padding: 5px 5px 4px;
    border-radius: 6px;
  }
  .seat-name {
    font-size: 11px;
  }
  .seat-stack {
    font-size: 12px;
    margin: 1px 0;
  }
  .seat-state {
    height: 13px;
    font-size: 9px;
  }
  .seat-cards {
    margin-bottom: -5px;
    gap: 3px;
  }
  .seat .card {
    width: 24px;
    height: 31px;
    padding: 2px 3px;
    border-radius: 3px;
  }
  .seat .card .rank {
    font-size: 11px;
  }
  .seat .card .suit {
    font-size: 13px;
  }
  .seat .card.back:after {
    font-size: 11px;
  }
  .seat-bet {
    min-height: 0;
    font-size: 9px;
    padding-top: 3px;
  }
  .seat-bet:empty {
    display: none;
  }
  .table-stage {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
  }
  .board-center {
    position: relative;
    left: auto;
    top: auto;
    transform: none;
    margin: 10px auto;
    z-index: 1;
  }
  .pot-label {
    font-size: 8px;
    letter-spacing: 1.7px;
  }
  .pot-amount {
    font-size: 25px;
    margin: 1px 0 9px;
    line-height: 1.2;
  }
  .community-cards {
    gap: 6px;
  }
  .card {
    width: 45px;
    height: 62px;
    padding: 5px 6px;
  }
  .card .rank {
    font-size: 19px;
  }
  .card .suit {
    font-size: 21px;
  }
  .board-meta {
    font-size: 10px;
    margin-top: 9px;
  }
  .board-outcome {
    font-size: 11px;
    margin-top: 6px;
  }
  .hero-seat {
    position: relative;
    left: auto;
    bottom: auto;
    transform: none;
    justify-content: center;
    gap: 12px;
    margin: 0 0 13px;
    z-index: 1;
  }
  .hero-info {
    padding: 8px 12px;
    min-width: 108px;
  }
  .hero-stack {
    font-size: 20px;
    margin: 3px 0;
  }
  .hero-name {
    font-size: 9px;
  }
  .hero-status {
    font-size: 10px;
  }
  .watch-label {
    position: relative;
    bottom: auto;
    margin: 0 14px 24px;
    font-size: 8px;
    line-height: 1.8;
  }
  .action-dock {
    margin: 0;
    padding: 12px 17px max(14px, env(safe-area-inset-bottom));
    background: #19221a;
    border-top: 1px solid #415036;
    z-index: 2;
  }
  .decision-line {
    gap: 9px;
    margin-bottom: 10px;
  }
  .decision-line h2 {
    font-size: 14px;
    margin-top: 3px;
  }
  .decision-line .eyebrow {
    font-size: 8px;
  }
  .call-context {
    font-size: 11px;
  }
  .betting-actions {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
  }
  .action-button {
    min-height: 51px;
    flex-direction: column;
    gap: 5px;
    font-size: 13px;
    padding: 7px 3px;
  }
  .action-button > span {
    font-size: 10px;
  }
  .key-hint {
    display: none;
  }
  .hand-controls {
    justify-content: stretch;
  }
  .hand-controls > button {
    flex: 1;
  }
  .action-status {
    font-size: 11px;
  }
  .history-panel {
    width: min(350px, calc(100vw - 32px));
    padding: 24px;
  }
  .history-header .eyebrow {
    font-size: 10px;
  }
  .history-header h2 {
    font-size: 25px;
  }
  .session-summary span {
    font-size: 11px;
  }
  .session-summary strong {
    font-size: 17px;
  }
  .record-note,
  .history-item strong {
    font-size: 12px;
  }
  .history-item small,
  .history-heading,
  .equity-note p {
    font-size: 11px;
  }
  .equity-note > span {
    font-size: 10px;
  }
  .dialog {
    padding: 23px;
  }
  .dialog h2 {
    font-size: 29px;
  }
  .field-note,
  .raise-label {
    font-size: 12px;
  }
  .raise-label span {
    font-size: 11px;
  }
  .error-notice {
    padding: 13px;
    gap: 8px;
    bottom: 12px;
  }
  .error-notice p {
    font-size: 11px;
  }
  .error-notice .icon-button {
    min-width: 44px;
    width: 44px;
  }
  .error-notice .small-button {
    font-size: 11px;
    padding: 0 10px;
  }
  .room-active .topbar .brand small {
    display: none;
  }
  .room-active .topbar .brand > span {
    display: none;
  }
  .room-active .topbar .brand img {
    width: 29px;
    height: 29px;
  }
  .room-active .room-identity {
    border: 0;
    padding-left: 0;
  }
  .room-active .topbar {
    padding: 0 13px;
    gap: 10px;
  }
  .room-active #lobby-button {
    padding: 0 8px;
    min-width: 44px;
  }
  .room-active #lobby-button > span {
    display: none;
  }
  .room-active #rules-button {
    display: none;
  }
}
@media (max-width: 380px) {
  .topbar {
    padding: 0 12px;
  }
  .brand > span {
    font-size: 22px;
  }
  .top-actions {
    gap: 0;
  }
  .connection {
    font-size: 9px;
  }
  .connection:before {
    margin-right: 4px;
  }
  .lobby {
    padding: 30px 18px;
  }
  .lobby h1 {
    font-size: 57px;
  }
  .setup-card {
    padding: 23px;
  }
  .opponents {
    padding: 12px 14px 0;
    gap: 8px;
  }
  .seat-name {
    font-size: 10px;
  }
  .seat-stack {
    font-size: 11px;
  }
  .seat-info {
    padding-left: 3px;
    padding-right: 3px;
  }
  .action-dock {
    padding-left: 12px;
    padding-right: 12px;
  }
  .action-button {
    font-size: 12px;
  }
  .action-button > span {
    font-size: 10px;
  }
  .board-center {
    margin: 7px auto;
  }
  .community-cards {
    gap: 5px;
  }
  .card {
    width: 42px;
    height: 58px;
  }
  .hero-seat {
    margin-bottom: 10px;
  }
  .room-active .connection {
    display: none;
  }
  .pot-amount {
    font-size: 24px;
  }
}

.keyboard-mode .history-panel,
.keyboard-mode .panel-backdrop {
  transition: none;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
  button:active {
    transform: none !important;
  }
  .history-panel,
  .history-panel.panel-open,
  dialog,
  dialog[open] {
    transform: none !important;
  }
}

.saved-row {
  display: flex;
  gap: 8px;
  align-items: center;
  border-bottom: 1px solid #303a2c;
}
.saved-row .saved-table {
  border: 0;
  min-width: 0;
  flex: 1;
}
.saved-row .remove-table {
  font-size: 12px;
  color: #9eaa94;
  min-height: 44px;
  min-width: 58px;
  padding: 8px;
}
.saved-row .saved-table > span:first-child {
  min-width: 0;
}
.saved-row .saved-table strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#delete-dialog > .quiet-button {
  width: 100%;
  margin-top: 10px;
}
#retry-ai-button {
  margin-top: 10px;
}

/* Short landscape uses separate seat and card bands; no compressed oval. */

.ruleset-picker {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 23px;
}
.ruleset-picker label {
  position: relative;
  cursor: pointer;
  min-width: 0;
}
.ruleset-picker input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  min-height: 0;
  padding: 0;
}
.ruleset-picker label > span {
  display: flex;
  flex-direction: column;
  gap: 7px;
  height: 100%;
  min-height: 86px;
  padding: 13px 12px;
  border: 1px solid #46503f;
  border-radius: 7px;
  color: #a9b49e;
  background: #1b231c;
}
.ruleset-picker strong {
  font-size: 13px;
  font-weight: 550;
  color: #d7dfca;
}
.ruleset-picker small {
  font-size: 11px;
  line-height: 1.65;
}
.ruleset-picker input:checked + span {
  border-color: #aa9a70;
  background: #333425;
  color: #bdc2a6;
}
.ruleset-picker input:checked + span strong {
  color: #e1cea0;
}
.ruleset-picker input:focus-visible + span {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}
.equity-note .quiet-button {
  width: 100%;
  justify-content: space-between;
  margin-top: 12px;
  color: #d3c399;
}
.analysis-dialog {
  width: min(570px, calc(100vw - 28px));
}
.analysis-dialog h2 {
  margin-bottom: 12px;
}
.analysis-dialog #analysis-context {
  font-size: 13px;
  line-height: 1.8;
}
.analysis-status {
  color: #cabb94;
  font-size: 12px;
  line-height: 1.8;
  margin: 18px 0;
}
.analysis-player {
  padding: 19px 0;
  border-top: 1px solid #48533d;
}
.analysis-player h3 {
  margin: 0 0 17px;
  color: #c4d0b3;
  font-size: 14px;
  font-weight: 500;
}
.analysis-metrics {
  display: grid;
  grid-template-columns: 1.35fr 1fr 1fr;
  gap: 12px;
}
.analysis-metrics span {
  display: block;
  font-size: 11px;
  color: #94a786;
  line-height: 1.5;
}
.analysis-metrics strong {
  display: block;
  font-size: 25px;
  font-weight: 450;
  color: #d5c497;
  margin-top: 8px;
  font-variant-numeric: tabular-nums;
}
.analysis-metrics > div:not(:first-child) strong {
  font-size: 20px;
  color: #c0cdb0;
}
.analysis-bar {
  height: 4px;
  background: #415239;
  border-radius: 3px;
  overflow: hidden;
  margin: 18px 0 13px;
}
.analysis-bar > span {
  display: block;
  height: 100%;
  background: #cbb487;
  border-radius: 3px;
}
.analysis-interval {
  font-size: 12px;
  line-height: 1.8;
  color: #a6b898;
  margin: 8px 0 0;
}
.analysis-method {
  padding: 17px 0 2px;
  border-top: 1px solid #48533d;
}
.analysis-method strong {
  font-size: 12px;
  font-weight: 500;
  color: #d2c29a;
}
.analysis-method p,
.analysis-footnote {
  font-size: 12px;
  line-height: 1.85;
  color: #9cae8d;
  margin: 10px 0 0;
}
.analysis-footnote {
  margin-top: 15px;
}
@media (max-width: 380px) {
  .ruleset-picker {
    gap: 6px;
  }
  .ruleset-picker label > span {
    padding: 10px 9px;
  }
  .ruleset-picker small {
    font-size: 11px;
  }
  .analysis-metrics {
    gap: 7px;
  }
  .analysis-metrics strong {
    font-size: 24px;
  }
  .analysis-metrics > div:not(:first-child) strong {
    font-size: 19px;
  }
  .analysis-metrics span {
    font-size: 11px;
  }
  .analysis-dialog {
    padding: 20px;
  }
  .room-identity span {
    font-size: 9px;
    letter-spacing: 0.5px;
  }
}

.analysis-close {
  width: 100%;
  margin-top: 15px;
}

/* Stable viewport policy: one header + canvas + dock budget across all states. */
:root {
  --app-height: 100vh;
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --header-size: 78px;
  --header-height: calc(var(--header-size) + var(--safe-top));
  --dock-size: 144px;
  --dock-height: calc(var(--dock-size) + var(--safe-bottom));
  --decision-row: 40px;
  --action-row: 52px;
  --status-row: 16px;
  --dock-gap: 6px;
  --dock-pad: 12px;
}
@supports (height: 100svh) {
  :root {
    --app-height: 100svh;
  }
}
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body {
  min-height: var(--app-height);
  height: auto;
  line-height: 1.4;
}
body.room-active {
  height: var(--app-height);
  min-height: 0;
}
button,
input,
select {
  font-family: inherit;
  line-height: 1.25;
}
button {
  -webkit-appearance: none;
  appearance: none;
}
.viewport-measure {
  position: fixed;
  inset: 0 auto auto 0;
  width: 0;
  height: 100svh;
  visibility: hidden;
  pointer-events: none;
  contain: strict;
}
.topbar,
.room-active .topbar {
  height: var(--header-height);
  padding-top: var(--safe-top);
  padding-left: max(18px, env(safe-area-inset-left));
  padding-right: max(18px, env(safe-area-inset-right));
  flex-shrink: 0;
}
#main-content {
  height: calc(var(--app-height) - var(--header-height));
  min-height: 0;
}
.room {
  height: 100%;
  min-height: 0;
}
.room-layout {
  height: 100%;
  min-height: 0;
  grid-template-rows: minmax(0, 1fr) var(--dock-height);
}
.table-stage {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  overflow-anchor: none;
}
.action-dock {
  height: 100%;
  min-height: 0;
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: var(--decision-row) var(--action-row) var(--status-row);
  row-gap: var(--dock-gap);
  padding: var(--dock-pad) 6px calc(var(--dock-pad) + var(--safe-bottom));
  align-content: start;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
}
.decision-line {
  grid-area: 1/1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  height: var(--decision-row);
  gap: 12px;
  margin: 0;
  min-width: 0;
}
.decision-line > div {
  min-width: 0;
}
.decision-line h2 {
  line-height: 1.3;
  max-height: 2.6em;
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin: 3px 0 0;
}
.decision-line .eyebrow {
  display: block;
  height: 12px;
  line-height: 12px;
}
.call-context {
  max-width: 120px;
  line-height: 1.4;
  overflow-wrap: anywhere;
}
.betting-actions,
.hand-controls,
#spectator-note,
#retry-ai-button {
  grid-area: 2/1;
  margin: 0;
  min-height: 0;
  height: 100%;
  align-self: stretch;
}
.action-button,
.hand-controls .primary-button,
.hand-controls .quiet-button {
  height: 100%;
  min-height: 44px;
  line-height: 1.2;
}
.hand-controls {
  align-items: stretch;
}
.hand-controls > button {
  min-width: 0;
}
#spectator-note {
  display: flex;
  align-items: center;
  line-height: 1.5;
  max-width: 550px;
}
#retry-ai-button {
  justify-self: start;
  max-width: 100%;
  align-self: stretch;
}
.action-dock[data-ai-error="true"] .betting-actions {
  visibility: hidden;
}
.action-status,
.action-status:empty {
  display: block;
  grid-area: 3/1;
  height: var(--status-row);
  font-size: 11px;
  line-height: var(--status-row);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-center {
  height: 224px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: max-content;
  max-width: 100%;
}
.pot-label {
  height: 13px;
  line-height: 13px;
  flex-shrink: 0;
}
.pot-amount {
  height: 48px;
  line-height: 48px;
  margin: 0 0 10px;
  flex-shrink: 0;
}
.community-cards {
  flex-shrink: 0;
}
.board-meta {
  height: 15px;
  line-height: 15px;
  margin-top: 10px;
  flex-shrink: 0;
}
.board-outcome,
#board-outcome[hidden] {
  display: -webkit-box !important;
  visibility: visible;
  height: 32px;
  min-height: 32px;
  max-height: 32px;
  line-height: 16px;
  max-width: 330px;
  margin: 6px 0 0;
  overflow: hidden;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  flex-shrink: 0;
}
#board-outcome[hidden] {
  visibility: hidden;
}
.hero-info {
  width: 132px;
  flex-shrink: 0;
}
.hero-name {
  height: 17px;
  line-height: 17px;
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}
.hero-status {
  height: 15px;
  line-height: 15px;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}
.hero-stack {
  height: 26px;
  line-height: 26px;
}
.seat-info {
  height: 70px;
}
.seat-name {
  height: 18px;
  line-height: 18px;
}
.seat-stack {
  height: 18px;
  line-height: 18px;
  margin: 1px 0;
}
.seat-state {
  height: 14px;
  line-height: 14px;
}
.seat-bet,
.seat-bet:empty {
  display: block;
  height: 17px;
  min-height: 17px;
  line-height: 17px;
  padding: 0;
  white-space: nowrap;
}
.seat .card {
  flex-shrink: 0;
}
.history-panel {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-width: thin;
}
.history-header,
.session-summary,
.record-note,
.equity-note,
#history-more {
  flex-shrink: 0;
}
.history-list {
  min-height: 44px;
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
}
.history-item {
  overflow-wrap: anywhere;
}
.dialog {
  overscroll-behavior: contain;
  overflow-anchor: none;
  scrollbar-gutter: stable;
  max-height: calc(var(--overlay-height, var(--app-height)) - 28px);
  max-width: calc(100vw - 28px);
}
html[data-keyboard="true"] .dialog {
  position: fixed;
  top: calc(var(--visual-top, 0px) + 12px);
  bottom: auto;
  margin: 0 auto;
  max-height: calc(var(--overlay-height) - 24px);
}
@media (max-width: 1199px) {
  .history-panel {
    height: var(--app-height);
    max-height: var(--app-height);
    bottom: auto;
    padding-top: calc(24px + var(--safe-top));
    padding-bottom: calc(24px + var(--safe-bottom));
  }
}
/* Portrait keeps cards and decisions in fixed-height bands. */
html[data-table-layout="portrait"] {
  --header-size: 64px;
}
html[data-table-layout="portrait"] .table-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) 168px 84px;
  gap: 4px;
  padding: 12px 18px 10px;
  align-items: center;
}
html[data-table-layout="portrait"] .opponents {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-rows: 102px;
  align-self: start;
  align-items: start;
  gap: 8px 12px;
  padding: 0;
  min-height: 0;
}
html[data-table-layout="portrait"] .seat {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: auto;
  min-width: 0;
}
html[data-table-layout="portrait"] .seat-info {
  height: 62px;
  padding: 5px 4px;
}
html[data-table-layout="portrait"] .seat .card {
  width: 24px;
  height: 31px;
}
html[data-table-layout="portrait"] .seat-cards {
  display: flex;
  height: 31px;
  margin-bottom: -5px;
}
html[data-table-layout="portrait"] .seat-name {
  font-size: 11px;
  height: 16px;
  line-height: 16px;
}
html[data-table-layout="portrait"] .seat-stack {
  font-size: 12px;
  height: 16px;
  line-height: 16px;
}
html[data-table-layout="portrait"] .seat-state {
  font-size: 10px;
  height: 14px;
  line-height: 14px;
}
html[data-table-layout="portrait"] .seat-bet {
  height: 14px;
  min-height: 14px;
  line-height: 14px;
  font-size: 10px;
}
html[data-table-layout="portrait"] .board-center {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  grid-row: 2;
  height: 168px;
  margin: 0 auto;
  align-self: center;
}
html[data-table-layout="portrait"] .pot-label {
  height: 12px;
  line-height: 12px;
  font-size: 10px;
}
html[data-table-layout="portrait"] .pot-amount {
  height: 32px;
  line-height: 32px;
  font-size: 26px;
  margin: 0 0 5px;
}
html[data-table-layout="portrait"] .board-meta {
  height: 14px;
  line-height: 14px;
  font-size: 11px;
  margin-top: 6px;
}
html[data-table-layout="portrait"] .board-outcome {
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  line-height: 14px;
  font-size: 11px;
  margin-top: 4px;
  max-width: 290px;
}
html[data-table-layout="portrait"] .hero-seat {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  grid-row: 3;
  justify-content: center;
  gap: 12px;
  height: 84px;
  margin: 0;
  align-self: center;
}
html[data-table-layout="portrait"] .hero-info {
  width: 108px;
  min-width: 108px;
  padding: 7px 10px;
}
html[data-table-layout="portrait"] .hero-name {
  font-size: 10px;
  height: 16px;
  line-height: 16px;
}
html[data-table-layout="portrait"] .hero-stack {
  font-size: 20px;
  height: 25px;
  line-height: 25px;
  margin: 1px 0;
}
html[data-table-layout="portrait"] .hero-status {
  font-size: 10px;
  height: 15px;
  line-height: 15px;
}
html[data-table-layout="portrait"] .watch-label {
  position: relative;
  left: auto;
  bottom: auto;
  grid-row: 3;
  height: 84px;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  line-height: 1.5;
}
html[data-table-layout="portrait"] .action-dock {
  margin: 0;
  padding-left: 16px;
  padding-right: 16px;
}
html[data-table-layout="portrait"] .betting-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
html[data-table-layout="portrait"] .action-button {
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  padding: 4px 2px;
}
html[data-table-layout="portrait"] .action-button > span {
  font-size: 10px;
}
html[data-table-layout="portrait"] .key-hint {
  display: none;
}
html[data-table-layout="portrait"] .hand-controls > button {
  flex: 1;
}
/* Compact vertical budgets are selected from the stable viewport, never toolbar height. */
html[data-density="compact"] {
  --header-size: 56px;
  --dock-size: 116px;
  --decision-row: 30px;
  --action-row: 44px;
  --status-row: 14px;
  --dock-gap: 4px;
  --dock-pad: 10px;
}
html[data-density="short"] {
  --header-size: 52px;
  --dock-size: 116px;
  --decision-row: 30px;
  --action-row: 44px;
  --status-row: 14px;
  --dock-gap: 4px;
  --dock-pad: 10px;
}
html[data-density="compact"] .decision-line .eyebrow,
html[data-density="short"] .decision-line .eyebrow {
  display: none;
}
html[data-density="compact"] .decision-line h2,
html[data-density="short"] .decision-line h2 {
  font-size: 13px;
  margin: 0;
}
html[data-density="compact"] .history-panel,
html[data-density="short"] .history-panel {
  padding: 16px;
}
html[data-density="compact"] .history-header h2,
html[data-density="short"] .history-header h2 {
  font-size: 20px;
  margin: 6px 0 12px;
}
html[data-density="compact"] .session-summary,
html[data-density="short"] .session-summary {
  padding: 10px 0;
}
html[data-density="compact"] .record-note,
html[data-density="short"] .record-note {
  margin: 10px 0;
}
html[data-density="compact"] .equity-note,
html[data-density="short"] .equity-note {
  padding-top: 10px;
  margin-top: 10px;
}
html[data-table-layout="portrait"][data-density="compact"] .table-stage {
  grid-template-rows: minmax(0, 1fr) 140px 62px;
  padding: 8px 16px;
}
html[data-table-layout="portrait"][data-density="compact"] .opponents {
  grid-auto-rows: 82px;
  gap: 6px 8px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat-cards {
  height: 22px;
  margin-bottom: -4px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat .card {
  width: 18px;
  height: 22px;
  padding: 1px 2px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat .card .rank {
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat .card .suit {
  font-size: 10px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat-info {
  height: 52px;
  padding: 3px;
}
html[data-table-layout="portrait"][data-density="compact"] .seat-bet {
  height: 12px;
  min-height: 12px;
  line-height: 12px;
}
html[data-table-layout="portrait"][data-density="compact"] .board-center {
  height: 140px;
}
html[data-table-layout="portrait"][data-density="compact"] .pot-amount {
  font-size: 23px;
  height: 26px;
  line-height: 26px;
  margin-bottom: 3px;
}
html[data-table-layout="portrait"][data-density="compact"] .board-center .card {
  width: 36px;
  height: 49px;
  padding: 4px;
}
html[data-table-layout="portrait"][data-density="compact"] .hero-seat,
html[data-table-layout="portrait"][data-density="compact"] .watch-label {
  height: 62px;
}
html[data-table-layout="portrait"][data-density="compact"] .hero-seat .card {
  width: 35px;
  height: 49px;
  padding: 4px;
}
html[data-table-layout="portrait"][data-density="compact"] .hero-info {
  padding: 4px 10px;
}
html[data-table-layout="portrait"][data-density="compact"] .hero-stack {
  font-size: 18px;
  height: 22px;
  line-height: 22px;
}
html[data-table-layout="portrait"][data-density="short"] .table-stage {
  grid-template-rows: minmax(0, 1fr) 124px 52px;
  padding: 4px 14px;
  gap: 4px;
}
html[data-table-layout="portrait"][data-density="short"] .opponents {
  grid-auto-rows: 64px;
  gap: 4px 8px;
}
html[data-table-layout="portrait"][data-density="short"] .seat-cards {
  height: 17px;
  margin-bottom: -5px;
}
html[data-table-layout="portrait"][data-density="short"] .seat .card {
  width: 15px;
  height: 17px;
  padding: 0 2px;
  border-radius: 2px;
}
html[data-table-layout="portrait"][data-density="short"] .seat .card .rank {
  font-size: 8px;
}
html[data-table-layout="portrait"][data-density="short"] .seat .card .suit {
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="short"]
  .seat
  .card.back:after {
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="short"] .seat-info {
  height: 41px;
  padding: 2px 3px;
}
html[data-table-layout="portrait"][data-density="short"] .seat-name {
  font-size: 10px;
  height: 13px;
  line-height: 13px;
}
html[data-table-layout="portrait"][data-density="short"] .seat-stack {
  font-size: 11px;
  height: 13px;
  line-height: 13px;
  margin: 0;
}
html[data-table-layout="portrait"][data-density="short"] .seat-state {
  font-size: 9px;
  height: 10px;
  line-height: 10px;
}
html[data-table-layout="portrait"][data-density="short"] .seat-bet {
  height: 11px;
  min-height: 11px;
  line-height: 11px;
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="short"] .dealer-badge {
  width: 11px;
  height: 11px;
  font-size: 8px;
  margin-left: 3px;
}
html[data-table-layout="portrait"][data-density="short"] .board-center {
  height: 124px;
}
html[data-table-layout="portrait"][data-density="short"] .pot-label {
  height: 11px;
  line-height: 11px;
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="short"] .pot-amount {
  font-size: 21px;
  height: 24px;
  line-height: 24px;
  margin-bottom: 3px;
}
html[data-table-layout="portrait"][data-density="short"] .board-center .card {
  width: 32px;
  height: 43px;
  padding: 3px 4px;
}
html[data-table-layout="portrait"][data-density="short"]
  .board-center
  .card
  .rank {
  font-size: 16px;
}
html[data-table-layout="portrait"][data-density="short"]
  .board-center
  .card
  .suit {
  font-size: 18px;
}
html[data-table-layout="portrait"][data-density="short"] .board-meta {
  margin-top: 4px;
  font-size: 10px;
  height: 12px;
  line-height: 12px;
}
html[data-table-layout="portrait"][data-density="short"] .board-outcome {
  margin-top: 3px;
  height: 24px;
  min-height: 24px;
  max-height: 24px;
  line-height: 12px;
  font-size: 10px;
}
html[data-table-layout="portrait"][data-density="short"] .hero-seat,
html[data-table-layout="portrait"][data-density="short"] .watch-label {
  height: 52px;
}
html[data-table-layout="portrait"][data-density="short"] .hero-seat .card {
  width: 35px;
  height: 49px;
  padding: 4px;
}
html[data-table-layout="portrait"][data-density="short"] .hero-info {
  padding: 2px 9px;
}
html[data-table-layout="portrait"][data-density="short"] .hero-name {
  height: 13px;
  line-height: 13px;
  font-size: 9px;
}
html[data-table-layout="portrait"][data-density="short"] .hero-stack {
  height: 20px;
  line-height: 20px;
  font-size: 17px;
  margin: 0;
}
html[data-table-layout="portrait"][data-density="short"] .hero-status {
  height: 13px;
  line-height: 13px;
  font-size: 9px;
}
/* Wide, low windows use bands instead of compressing the oval. */
html[data-table-layout="band"] {
  --header-size: 48px;
}
html[data-table-layout="band"] .room-layout {
  grid-template-columns: minmax(0, 1fr) 190px;
  grid-template-rows: minmax(0, 1fr);
}
html[data-table-layout="band"] .table-stage {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  grid-template-rows: minmax(0, 1fr) 140px;
  gap: 4px 12px;
  padding: 8px 16px;
  align-items: center;
  min-height: 0;
}
html[data-table-layout="band"] .opponents {
  position: relative;
  inset: auto;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: 80px;
  gap: 6px 9px;
  padding: 0;
  grid-column: 1/-1;
  grid-row: 1;
  align-self: start;
}
html[data-table-layout="band"] .seat {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  width: auto;
  min-width: 0;
}
html[data-table-layout="band"] .seat-cards {
  height: 22px;
  margin-bottom: -4px;
}
.seat-cards .card {
  flex-shrink: 0;
}
html[data-table-layout="band"] .seat .card {
  width: 18px;
  height: 22px;
  padding: 1px 2px;
}
html[data-table-layout="band"] .seat .card .rank {
  font-size: 9px;
}
html[data-table-layout="band"] .seat .card .suit {
  font-size: 10px;
}
html[data-table-layout="band"] .seat-info {
  height: 50px;
  padding: 3px 4px;
}
html[data-table-layout="band"] .seat-name {
  font-size: 10px;
  height: 15px;
  line-height: 15px;
}
html[data-table-layout="band"] .seat-stack {
  font-size: 11px;
  height: 15px;
  line-height: 15px;
  margin: 0;
}
html[data-table-layout="band"] .seat-state {
  font-size: 9px;
  height: 12px;
  line-height: 12px;
}
html[data-table-layout="band"] .seat-bet {
  font-size: 9px;
  height: 12px;
  min-height: 12px;
  line-height: 12px;
}
html[data-table-layout="band"] .dealer-badge {
  height: 13px;
  width: 13px;
  font-size: 8px;
  margin-left: 3px;
}
html[data-table-layout="band"] .board-center {
  position: relative;
  left: auto;
  top: auto;
  transform: none;
  grid-row: 2;
  grid-column: 1;
  height: 140px;
  margin: 0 auto;
  align-self: center;
}
html[data-table-layout="band"] .pot-label {
  height: 12px;
  line-height: 12px;
  font-size: 10px;
}
html[data-table-layout="band"] .pot-amount {
  height: 27px;
  line-height: 27px;
  font-size: 23px;
  margin: 0 0 4px;
}
html[data-table-layout="band"] .board-center .card {
  width: 36px;
  height: 49px;
  padding: 4px;
}
html[data-table-layout="band"] .board-center .card .rank {
  font-size: 17px;
}
html[data-table-layout="band"] .board-center .card .suit {
  font-size: 19px;
}
html[data-table-layout="band"] .community-cards {
  gap: 4px;
}
html[data-table-layout="band"] .board-meta {
  height: 14px;
  line-height: 14px;
  font-size: 10px;
  margin-top: 5px;
}
html[data-table-layout="band"] .board-outcome {
  height: 28px;
  min-height: 28px;
  max-height: 28px;
  font-size: 10px;
  line-height: 14px;
  margin-top: 4px;
  max-width: 260px;
}
html[data-table-layout="band"] .hero-seat {
  position: relative;
  left: auto;
  bottom: auto;
  transform: none;
  grid-row: 2;
  grid-column: 2;
  flex-direction: column;
  gap: 5px;
  margin: 0;
  height: 118px;
  align-self: center;
}
html[data-table-layout="band"] .hero-seat .card {
  width: 31px;
  height: 43px;
  padding: 3px;
}
html[data-table-layout="band"] .hero-seat .card .rank {
  font-size: 15px;
}
html[data-table-layout="band"] .hero-seat .card .suit {
  font-size: 17px;
}
html[data-table-layout="band"] .hero-info {
  width: 108px;
  min-width: 108px;
  text-align: center;
  padding: 4px 9px;
}
html[data-table-layout="band"] .hero-name {
  font-size: 9px;
  height: 14px;
  line-height: 14px;
  justify-content: center;
}
html[data-table-layout="band"] .hero-stack {
  font-size: 17px;
  height: 21px;
  line-height: 21px;
  margin: 0;
}
html[data-table-layout="band"] .hero-status {
  font-size: 9px;
  height: 13px;
  line-height: 13px;
}
html[data-table-layout="band"] .action-dock {
  grid-row: 1;
  grid-column: 2;
  height: 100%;
  margin: 0;
  padding: 16px 12px calc(16px + var(--safe-bottom));
  border-top: 0;
  border-left: 1px solid #3c4a34;
  grid-template-rows: 70px 112px 32px;
  gap: 12px;
  align-content: center;
  background: #1b241b;
}
html[data-table-layout="band"] .decision-line {
  height: 70px;
  display: block;
  margin: 0;
}
html[data-table-layout="band"] .decision-line h2 {
  font-size: 14px;
  margin: 3px 0 6px;
}
.call-context {
  font-variant-numeric: tabular-nums;
}
html[data-table-layout="band"] .call-context {
  text-align: left;
  font-size: 11px;
  display: block;
  max-width: 100%;
}
html[data-table-layout="band"] .betting-actions {
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 52px 52px;
  gap: 8px;
}
html[data-table-layout="band"] .action-button {
  min-height: 44px;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  padding: 4px 2px;
}
html[data-table-layout="band"] .action-button > span {
  font-size: 10px;
}
html[data-table-layout="band"] .key-hint {
  display: none;
}
html[data-table-layout="band"] .hand-controls {
  flex-direction: column;
  gap: 8px;
}
html[data-table-layout="band"] .hand-controls > button {
  height: 52px;
  min-height: 44px;
  flex: 1;
  font-size: 12px;
  width: 100%;
}
html[data-table-layout="band"] .action-status {
  height: 32px;
  line-height: 16px;
  white-space: normal;
  overflow: hidden;
}
html[data-table-layout="band"] #spectator-note {
  font-size: 11px;
}
html[data-table-layout="band"] .felt {
  inset: 12px 8px;
  border-radius: 32px;
}
html[data-table-layout="band"] .felt > div {
  border-radius: 26px;
}
html[data-table-layout="band"] .felt > span {
  display: none;
}
html[data-table-layout="band"] .table-stage[data-watch="true"] .board-center {
  grid-column: 1/-1;
}
html[data-table-layout="band"] .watch-label {
  display: none;
}
@media (min-width: 1200px) {
  html[data-table-layout="band"] .room-layout {
    grid-template-columns: minmax(0, 1fr) 190px 244px;
  }
  html[data-table-layout="band"] .history-panel {
    grid-row: 1;
    grid-column: 3;
  }
}
/* Setup stays ahead of decoration; saved tables get their own scroll area. */
html[data-table-layout="portrait"] .lobby,
html[data-table-layout="band"] .lobby {
  height: 100%;
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  padding: 12px 18px;
  gap: 24px;
}
html[data-table-layout="portrait"] .lobby {
  display: block;
  max-width: 540px;
}
html[data-table-layout="portrait"] .lobby-editorial {
  display: none;
}
html[data-table-layout="portrait"] .setup-column,
html[data-table-layout="band"] .setup-column {
  height: 100%;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(44px, 1fr);
  gap: 10px;
}
html[data-table-layout="portrait"] .setup-card,
html[data-table-layout="band"] .setup-card {
  padding: 16px;
}
html[data-table-layout="portrait"] .setup-heading .eyebrow,
html[data-table-layout="band"] .setup-heading .eyebrow,
html[data-table-layout="portrait"] .setup-heading p,
html[data-table-layout="band"] .setup-heading p {
  display: none;
}
html[data-table-layout="portrait"] .setup-heading h2,
html[data-table-layout="band"] .setup-heading h2 {
  font-size: 25px;
  margin: 0 0 12px;
}
html[data-table-layout="portrait"] .mode-switch,
html[data-table-layout="band"] .mode-switch {
  margin-bottom: 10px;
}
html[data-table-layout="portrait"] .ruleset-picker,
html[data-table-layout="band"] .ruleset-picker {
  margin-bottom: 10px;
}
html[data-table-layout="portrait"] .ruleset-picker label > span,
html[data-table-layout="band"] .ruleset-picker label > span {
  min-height: 60px;
  padding: 8px 10px;
  gap: 4px;
}
html[data-table-layout="portrait"] .ruleset-picker small,
html[data-table-layout="band"] .ruleset-picker small {
  font-size: 11px;
  line-height: 1.3;
}
html[data-table-layout="portrait"] .form-grid,
html[data-table-layout="band"] .form-grid {
  gap: 10px 12px;
}
html[data-table-layout="portrait"] .form-grid > label,
html[data-table-layout="band"] .form-grid > label {
  gap: 5px;
  line-height: 14px;
}
html[data-table-layout="portrait"] .form-grid > .full-field,
html[data-table-layout="band"] .form-grid > .full-field {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  align-items: center;
}
html[data-table-layout="portrait"] .setup-note,
html[data-table-layout="band"] .setup-note {
  display: none;
}
html[data-table-layout="portrait"] .blind-line,
html[data-table-layout="band"] .blind-line {
  border: 0;
  padding: 9px 0;
  font-size: 11px;
  line-height: 16px;
}
html[data-table-layout="portrait"] .local-note,
html[data-table-layout="band"] .local-note {
  font-size: 11px;
  line-height: 16px;
  margin: 8px 0 0;
}
html[data-table-layout="portrait"] .saved-tables,
html[data-table-layout="band"] .saved-tables {
  min-height: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  overflow: auto;
}
html[data-table-layout="portrait"] #saved-list,
html[data-table-layout="band"] #saved-list {
  min-height: 0;
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
html[data-density="short"] .setup-heading {
  display: none;
}
html[data-density="short"] .local-note {
  display: none;
}
html[data-density="short"] .setup-card {
  padding: 12px;
}
html[data-density="short"] .setup-card input,
html[data-density="short"] .setup-card select {
  height: 44px;
  min-height: 44px;
  padding: 9px 10px;
}
html[data-density="short"] .lobby {
  padding: 8px 12px;
}
html[data-table-layout="band"] .lobby h1 {
  font-size: 54px;
  margin-top: 10px;
}
html[data-table-layout="band"] .table-illustration {
  height: 220px;
  margin-top: 10px;
}
/* Exceptional zoom/tiny windows keep a bounded canvas scroll region, never hidden cards. */
html[data-table-layout="portrait"][data-tiny="true"] .table-stage {
  grid-template-rows: minmax(var(--minimum-seats, 200px), 1fr) 124px 52px;
}
html[data-tiny="true"][data-table-layout="band"] .table-stage {
  grid-template-rows: minmax(166px, 1fr) 140px;
}
html[data-tiny="true"] .action-dock {
  align-content: start;
}

.action-button > span {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 12px;
}
/* In short landscape, setup uses the width so its primary action stays visible. */
html[data-table-layout="band"][data-low-height="true"] .lobby {
  display: block;
  max-width: 1000px;
}
html[data-table-layout="band"][data-low-height="true"] .lobby-editorial {
  display: none;
}
html[data-table-layout="band"][data-low-height="true"] .setup-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 20px;
}
html[data-table-layout="band"][data-low-height="true"] .mode-switch {
  margin: 0;
  align-self: center;
}
html[data-table-layout="band"][data-low-height="true"] .ruleset-picker {
  margin: 0;
}
html[data-table-layout="band"][data-low-height="true"] .form-grid {
  grid-column: 1/-1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
html[data-table-layout="band"][data-low-height="true"]
  .form-grid
  > .full-field {
  display: flex;
  grid-column: auto;
  flex-direction: column;
  align-items: stretch;
}
html[data-table-layout="band"][data-low-height="true"] .blind-line {
  align-self: center;
}
html[data-table-layout="band"][data-low-height="true"] .start-button {
  margin: 0;
}

/* Confirmed-state decoration stays outside the fixed table geometry. */
.presentation-layer {
  position: fixed;
  inset: 0;
  z-index: 10;
  pointer-events: none;
  overflow: hidden;
}
.presentation-card,
.presentation-chip {
  position: fixed;
  pointer-events: none;
  will-change: transform, opacity;
}
.presentation-chip {
  width: 14px;
  height: 14px;
  border: 2px dashed #d8c393;
  border-radius: 50%;
  background: #9b7443;
  box-shadow: 0 2px 0 #573d26;
}
.after-hours-entry {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
  padding: 8px 12px;
  margin-bottom: 12px;
  border: 1px solid #7d7852;
  border-radius: 7px;
  background: #262b20;
  color: #d4d7a7;
  font-size: 14px;
  text-decoration: none;
  grid-column: 1/-1;
}
.after-hours-entry small {
  display: block;
  color: #a9b39c;
  font-size: 11px;
  line-height: 16px;
}
.after-hours-entry b {
  font-size: 22px;
  font-weight: 400;
}
html[data-density="short"] .after-hours-entry {
  padding: 4px 10px;
  margin-bottom: 6px;
}
html[data-table-layout="band"][data-low-height="true"] .after-hours-entry {
  grid-column: 1/-1;
  margin: 0;
}

/* Shared explicit language choice keeps existing control budgets. */
.language-button {
  font:
    600 12px/1.2 system-ui,
    sans-serif !important;
  min-width: 44px;
  width: 44px;
  flex-shrink: 0;
  letter-spacing: 0;
}
.dialog-language {
  margin-left: auto;
  margin-right: 4px;
}
html[lang="zh-CN"] .eyebrow,
html[lang="zh-CN"] .brand small,
html[lang="zh-CN"] .run-brand small {
  letter-spacing: 1px;
}
html[lang="zh-CN"] h1,
html[lang="zh-CN"] h2,
html[lang="zh-CN"] h3 {
  letter-spacing: 0;
  line-height: 1.2;
}

.normal-mode-label {
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  grid-column: 1/-1;
}
@media (max-width: 600px) {
  .top-actions {
    gap: 2px;
  }
  .topbar .brand {
    gap: 6px;
  }
  .topbar .brand > span {
    font-size: 23px;
  }
}
/* Normal room: fixed views with explicit page controls. Tiny/zoom tables keep
   their existing internal scrolling fallback; menus never need a wheel. */
bodyhtml[data-table-layout] body.normal-views {
  height: var(--app-height);
  min-height: 0;
  overflow: hidden;
}
html[data-table-layout] body.normal-views .lobby {
  height: 100%;
  min-height: 0;
  max-height: 100%;
  padding-top: 20px;
  padding-bottom: 16px;
  overflow: hidden;
}
html[data-table-layout] body.normal-views .lobby-editorial {
  min-height: 0;
  overflow: hidden;
}
html[data-table-layout] body.normal-views .lobby-editorial h1 {
  font-size: clamp(38px, 5vw, 76px);
}
html[data-table-layout] body.normal-views .table-illustration {
  max-height: 220px;
}
html[data-table-layout] body.normal-views .setup-column {
  display: grid;
  grid-template-rows: 44px minmax(0, 1fr) 32px;
  gap: 10px;
  height: 100%;
  min-height: 0;
  max-height: 100%;
}
.normal-view-tabs {
  display: flex;
  gap: 8px;
  min-width: 0;
}
.normal-view-tabs button {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 14px;
  min-height: 44px;
}
.normal-view-tabs button[aria-selected="true"] {
  color: var(--ink);
  background: var(--surface-2, #252c2b);
  border-color: #8f7b51;
}
.normal-adventure-link {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  color: var(--gold);
  text-decoration: none;
}
html[data-table-layout] body.normal-views .setup-card {
  margin: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 20px;
  overflow: hidden;
}
html[data-table-layout] body.normal-views .setup-heading {
  margin: 0;
}
html[data-table-layout] body.normal-views .setup-heading h2 {
  font-size: 28px;
  margin: 4px 0;
}
html[data-table-layout] body.normal-views .setup-heading p {
  margin: 0;
  font-size: 13px;
}
.normal-setup-pages {
  min-height: 0;
}
.normal-setup-pages .view-sheet > * {
  flex-shrink: 0;
}
.normal-setup-pages .mode-switch {
  margin: 0;
}
.normal-field-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}
.normal-field-pair label,
.normal-setup-pages .full-field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
}
.normal-field-pair input,
.normal-field-pair select,
.normal-setup-pages select {
  min-width: 0;
  width: 100%;
  height: 44px;
  box-sizing: border-box;
}
.normal-setup-details .normal-mode-label {
  margin: 0 0 8px;
}
.normal-setup-details .setup-note {
  margin: 0;
  line-height: 1.5;
}
.normal-setup-details .blind-line {
  margin: 12px 0 0;
  padding-top: 10px;
}
.normal-setup-footer .primary-button {
  margin: 0;
  width: 100%;
  min-height: 46px;
}
.normal-setup-footer .local-note {
  margin: 7px 0 0;
  font-size: 11px;
}
html[data-table-layout] body.normal-views .saved-tables {
  margin: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
}
html[data-table-layout] body.normal-views .saved-tables .section-heading {
  margin: 0;
}
html[data-table-layout] body.normal-views #saved-list {
  min-height: 0;
}
html[data-table-layout] body.normal-views .saved-row {
  flex-shrink: 0;
  margin: 0;
}
html[data-table-layout] body.normal-views .saved-table {
  padding: 14px 8px;
  min-height: 64px;
}
html[data-table-layout] body.normal-views #history-list.paged-view {
  flex: 1 1 0%;
  min-height: 0;
  overflow: hidden;
  padding: 0;
}
html[data-table-layout] body.normal-views .history-item {
  flex-shrink: 0;
  margin: 0;
  min-height: 60px;
  padding: 10px;
}
html[data-table-layout] body.normal-views .history-item strong {
  white-space: normal;
  overflow-wrap: anywhere;
}
html[data-table-layout] body.normal-views .history-panel {
  overflow: hidden;
}
html[data-table-layout] body.normal-views .history-header,
html[data-table-layout] body.normal-views .session-summary,
html[data-table-layout] body.normal-views .record-note,
html[data-table-layout] body.normal-views .equity-note {
  flex-shrink: 0;
}
html[data-table-layout] body.normal-views .equity-note {
  margin-top: 12px;
}
html[data-table-layout] body.normal-views .normal-status-lane {
  grid-area: 3/1;
  height: var(--status-row);
  min-height: 0;
  position: relative;
}
.normal-status-lane #table-talk-bubble {
  position: absolute;
  inset: 0;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: none;
  font-size: 11px;
  line-height: var(--status-row);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--muted);
}
.normal-status-lane #table-talk-bubble {
  min-height: 0;
}
.normal-status-lane:has([data-speaking="true"]) .action-status:empty {
  visibility: hidden;
}
.normal-status-lane:has(.action-status:not(:empty)) #table-talk-bubble {
  display: none;
}
.normal-deck {
  position: absolute;
  left: 5%;
  top: 46%;
  width: 24px;
  height: 34px;
  border: 1px solid #827257;
  border-radius: 4px;
  background: repeating-linear-gradient(45deg, #303a35 0 3px, #26322e 3px 6px);
  box-shadow:
    2px 2px 0 #aaa08b,
    4px 4px 0 #4d5147;
  display: grid;
  place-items: center;
  color: #c2ac7e;
  pointer-events: none;
  z-index: 1;
}
.presentation-ring {
  position: fixed;
  pointer-events: none;
  box-sizing: border-box;
  border: 1px solid #d7b97a;
  border-radius: 16px;
  will-change: transform, opacity;
}
.presentation-ring.is-tactic {
  border-color: #9ccbbf;
}
.presentation-chip.is-payout {
  background: #c6a15d;
  border-color: #fff0bd;
}
.normal-connection-links {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: stretch;
  gap: 8px;
  min-height: 44px;
}
.normal-connection-links .normal-adventure-link {
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px;
  text-decoration: none;
}
html[data-table-layout] body.normal-views .setup-column {
  grid-template-rows: 44px minmax(0, 1fr) 44px;
}
@media (max-width: 760px) {
  html[data-table-layout] body.normal-views.room-active #rules-button {
    display: none;
  }
  #table-account {
    font-size: 11px;
    padding: 0;
  }
}
html[data-table-layout] body.normal-views .normal-dialog {
  width: min(570px, calc(100vw - 24px));
  height: min(690px, calc(var(--overlay-height, var(--app-height)) - 24px));
  max-height: none;
  overflow: hidden;
  padding: 20px;
  box-sizing: border-box;
}
.normal-dialog[open] {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 12px;
}
.normal-dialog-header {
  min-width: 0;
}
.normal-dialog-header .dialog-top {
  margin: 0;
}
.normal-dialog-header h2 {
  margin: 2px 0 0;
  font-size: 27px;
}
.normal-dialog-header > p {
  margin: 6px 0 0;
  line-height: 1.4;
  font-size: 12px;
}
.normal-dialog .primary-button,
.normal-dialog .quiet-button {
  margin: 0;
  min-height: 44px;
}
.normal-dialog .rules-copy,
.normal-dialog #result-content,
.normal-dialog #analysis-result,
.normal-dialog-copy {
  min-height: 0;
  overflow: hidden;
  margin: 0;
}
.normal-dialog.rules-dialog {
  grid-template-rows: auto minmax(0, 1fr);
}
.normal-rules-section h3 {
  margin: 0 0 10px;
}
.normal-rules-section p {
  margin: 0;
  font-size: 14px;
  line-height: 1.65;
}
.normal-dialog #raise-form {
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 46px;
  gap: 12px;
}
.normal-dialog.raise-dialog {
  grid-template-rows: auto minmax(0, 1fr);
}
.normal-raise-pages {
  min-height: 0;
}
.normal-raise-entry .amount-field {
  margin: 10px 0 0;
}
.normal-raise-entry .amount-field input {
  font-size: 28px;
  height: 52px;
}
.normal-raise-pages .raise-presets {
  margin: 0;
}
.normal-raise-pages .field-note {
  margin: 0;
  font-size: 12px;
}
.normal-dialog-actions {
  display: flex;
  gap: 10px;
}
.normal-dialog-actions > button {
  flex: 1;
  min-width: 0;
  font-size: 13px;
}
.normal-dialog .analysis-player {
  margin: 0;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.normal-dialog .analysis-player h3 {
  margin: 0 0 8px;
  font-size: 15px;
}
.normal-dialog .analysis-metrics {
  gap: 8px;
}
.normal-dialog .analysis-metrics strong {
  font-size: 22px;
}
.normal-dialog .analysis-metrics span {
  font-size: 11px;
}
.normal-dialog .analysis-bar {
  margin-top: 10px;
}
.normal-dialog .analysis-interval {
  margin: 7px 0 0;
  font-size: 11px;
  line-height: 1.4;
}
.normal-dialog .analysis-method-part {
  font-size: 14px;
  line-height: 1.6;
  margin: 0;
}
.normal-dialog .result-line {
  margin: 0;
  padding: 10px 0;
  min-height: 42px;
}
@media (max-width: 1000px), (max-height: 620px) {
  html[data-table-layout] body.normal-views .lobby {
    display: block;
    padding: 12px max(12px, env(safe-area-inset-left));
    max-width: 760px;
    margin: auto;
  }
  html[data-table-layout] body.normal-views .lobby-editorial {
    display: none;
  }
  html[data-table-layout] body.normal-views .setup-column {
    max-width: 640px;
    margin: auto;
  }
}
@media (max-width: 600px) {
  html[data-table-layout] body.normal-views .lobby {
    padding: 8px 10px;
  }
  html[data-table-layout] body.normal-views .setup-card,
  html[data-table-layout] body.normal-views .saved-tables {
    padding: 14px;
    gap: 10px;
  }
  html[data-table-layout] body.normal-views .setup-heading .eyebrow {
    display: none;
  }
  html[data-table-layout] body.normal-views .setup-heading h2 {
    font-size: 24px;
  }
  html[data-table-layout] body.normal-views .setup-heading p {
    font-size: 12px;
  }
  html[data-table-layout] body.normal-views .setup-column {
    gap: 7px;
    grid-template-rows: 44px minmax(0, 1fr) 28px;
  }
  .normal-view-tabs button {
    font-size: 13px;
  }
  html[data-table-layout] body.normal-views .normal-dialog {
    padding: 14px;
    gap: 10px;
  }
  .normal-dialog-header h2 {
    font-size: 23px;
  }
  .normal-deck {
    left: auto;
    right: 12px;
    top: 50%;
    width: 18px;
    height: 26px;
  }
  html[data-table-layout] body.normal-views.room-active .topbar {
    gap: 5px;
    padding-left: 10px;
    padding-right: 10px;
  }
  html[data-table-layout] body.normal-views.room-active .top-actions {
    gap: 3px;
  }
  html[data-table-layout] body.normal-views.room-active .icon-button {
    width: 38px;
    min-width: 38px;
  }
}
@media (max-height: 500px) {
  html[data-table-layout] body.normal-views .lobby {
    padding-top: 6px;
    padding-bottom: 6px;
  }
  html[data-table-layout] body.normal-views .setup-column {
    grid-template-rows: 40px minmax(0, 1fr) 24px;
    gap: 4px;
  }
  .normal-view-tabs button {
    min-height: 40px;
  }
  html[data-table-layout] body.normal-views .setup-card {
    padding: 10px;
    grid-template-columns: minmax(0, 1fr) 160px;
    grid-template-rows: minmax(0, 1fr);
    gap: 16px;
  }
  html[data-table-layout] body.normal-views .setup-heading {
    display: none;
  }
  .normal-setup-footer {
    align-self: end;
  }
  .normal-setup-footer .local-note {
    line-height: 1.4;
  }
  html[data-table-layout] body.normal-views .history-header h2 {
    font-size: 18px;
    margin: 2px 0;
  }
  html[data-table-layout] body.normal-views .history-header .eyebrow,
  html[data-table-layout] body.normal-views .record-note,
  html[data-table-layout] body.normal-views .equity-note > span,
  html[data-table-layout] body.normal-views .equity-note > p {
    display: none;
  }
  html[data-table-layout] body.normal-views .history-header {
    margin-bottom: 6px;
  }
  html[data-table-layout] body.normal-views .session-summary {
    padding: 6px 0;
    margin: 0 0 8px;
  }
  html[data-table-layout] body.normal-views .equity-note {
    margin-top: 6px;
    padding-top: 6px;
  }
  html[data-table-layout] body.normal-views .normal-dialog {
    padding: 10px 14px;
    gap: 6px;
  }
  .normal-dialog-header h2 {
    font-size: 20px;
  }
  .normal-dialog-header .dialog-top {
    height: 32px;
  }
  .normal-dialog-header .dialog-top button {
    height: 32px;
    min-height: 32px;
  }
  .normal-dialog-header > p {
    font-size: 11px;
    margin-top: 3px;
  }
  .normal-dialog .analysis-player {
    padding: 7px;
  }
  .normal-dialog .analysis-player h3 {
    margin-bottom: 4px;
  }
  .normal-dialog .analysis-metrics strong {
    font-size: 18px;
  }
  .normal-dialog .analysis-bar {
    margin-top: 5px;
    height: 3px;
  }
  .normal-dialog .analysis-interval {
    margin-top: 3px;
    font-size: 10px;
  }
  .normal-dialog .normal-rules-section p {
    line-height: 1.5;
  }
  .normal-deck {
    top: auto;
    bottom: 12px;
    left: 16px;
    right: auto;
    width: 18px;
    height: 26px;
  }
}

html[data-table-layout] body.normal-views .setup-heading {
  display: block;
  grid-row: 1;
}
html[data-table-layout] body.normal-views .normal-setup-pages {
  grid-row: 2;
}
html[data-table-layout] body.normal-views .normal-setup-footer {
  grid-row: 3;
}
html[data-table-layout] body.normal-views .setup-note {
  display: block;
}
html[data-table-layout] body.normal-views .local-note {
  display: block;
}
@media (max-width: 380px) {
  html[data-table-layout] body.normal-views .topbar {
    padding-left: 10px;
    padding-right: 10px;
    gap: 6px;
  }
  html[data-table-layout] body.normal-views .top-actions {
    gap: 3px;
  }
  html[data-table-layout] body.normal-views .brand {
    gap: 5px;
  }
  html[data-table-layout] body.normal-views .brand > span {
    display: none;
  }
  html[data-table-layout] body.normal-views .icon-button {
    width: 38px;
    min-width: 38px;
  }
}
@media (max-width: 600px) {
  html[data-table-layout] body.normal-views.room-active #rules-button {
    display: inline-flex;
  }
  html[data-table-layout] body.normal-views.room-active .room-identity {
    display: none;
  }
  html[data-table-layout] body.normal-views.room-active .connection {
    display: none;
  }
  html[data-table-layout] body.normal-views.room-active #lobby-button {
    width: 38px;
    min-width: 38px;
    padding: 0;
  }
  html[data-table-layout] body.normal-views.room-active .icon-button,
  html[data-table-layout] body.normal-views.room-active #lobby-button {
    width: 44px;
    min-width: 44px;
  }
}
@media (max-width: 380px) {
  html[data-table-layout] body.normal-views.room-active .brand {
    display: none;
  }
  html[data-table-layout] body.normal-views.room-active .top-actions {
    width: 100%;
    justify-content: space-between;
  }
}
@media (max-height: 500px) {
  html[data-table-layout] body.normal-views .setup-heading {
    display: none;
  }
  html[data-table-layout] body.normal-views .normal-setup-pages {
    grid-area: 1/1;
  }
  html[data-table-layout] body.normal-views .normal-setup-footer {
    grid-area: 1/2;
  }
}

/* Connected header reserves six touch targets; rules remain in the record drawer. */
html[data-table-layout] body.normal-views .setup-column {
  grid-template-rows: 44px minmax(0, 1fr) 44px;
}
#table-account {
  position: relative;
  font-size: 0;
  padding: 0;
}
#table-account::before {
  content: "";
  position: absolute;
  top: 8px;
  left: 16px;
  width: 10px;
  height: 10px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
}
#table-account::after {
  content: "";
  position: absolute;
  top: 23px;
  left: 11px;
  width: 20px;
  height: 12px;
  border: 1.5px solid currentColor;
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}
@media (max-width: 760px) {
  html[data-table-layout] body.normal-views.room-active #rules-button {
    display: none;
  }
}
