:root {
  --bg: #111613;
  --panel: #f8f3e8;
  --panel-2: #e7dece;
  --ink: #162018;
  --muted: #657061;
  --line: rgba(22, 32, 24, 0.16);
  --felt: #146548;
  --felt-deep: #0d3f31;
  --accent: #d9a441;
  --accent-ink: #231a0a;
  --danger: #b84545;
  --card: #fffdf8;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}


* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

input,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 11px;
  background: #fffdf8;
  color: var(--ink);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 16px) 50%,
    calc(100% - 11px) 50%;
  background-size: 5px 5px;
  background-repeat: no-repeat;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  color: #fffdf8;
  font-size: clamp(3.5rem, 9vw, 7.5rem);
  line-height: 0.88;
  letter-spacing: 0;
}

h2 {
  color: var(--ink);
  font-size: 1.1rem;
}

.hidden {
  display: none !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 10px clamp(16px, 3vw, 32px);
  background: rgba(17, 22, 19, 0.9);
  border-bottom: 1px solid rgba(255, 253, 248, 0.08);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  color: #fffdf8;
  font-weight: 800;
}

.brand-mark {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.82rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fffdf8;
}

.connection,
.chip-pill {
  min-width: max-content;
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.86rem;
}

.chip-pill {
  padding: 7px 10px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 999px;
}

.sound-button,
.fullscreen-button {
  position: relative;
  width: 40px;
  min-height: 40px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 6px;
  background: transparent;
}

.fullscreen-button::before {
  position: absolute;
  inset: 10px;
  content: "";
  background:
    linear-gradient(#fffdf8 0 0) left top / 9px 2px no-repeat,
    linear-gradient(#fffdf8 0 0) left top / 2px 9px no-repeat,
    linear-gradient(#fffdf8 0 0) right top / 9px 2px no-repeat,
    linear-gradient(#fffdf8 0 0) right top / 2px 9px no-repeat,
    linear-gradient(#fffdf8 0 0) left bottom / 9px 2px no-repeat,
    linear-gradient(#fffdf8 0 0) left bottom / 2px 9px no-repeat,
    linear-gradient(#fffdf8 0 0) right bottom / 9px 2px no-repeat,
    linear-gradient(#fffdf8 0 0) right bottom / 2px 9px no-repeat;
}

.fullscreen-button.active {
  border-color: rgba(224, 171, 60, 0.62);
  background: rgba(224, 171, 60, 0.12);
}

.sound-button::before {
  position: absolute;
  left: 10px;
  top: 13px;
  width: 7px;
  height: 14px;
  content: "";
  background: #fffdf8;
  clip-path: polygon(0 34%, 42% 34%, 100% 0, 100% 100%, 42% 66%, 0 66%);
}

.sound-button::after {
  position: absolute;
  left: 20px;
  top: 11px;
  width: 11px;
  height: 16px;
  content: "";
  border: 2px solid #fffdf8;
  border-left: 0;
  border-radius: 0 999px 999px 0;
}

.sound-button.off::after {
  left: 22px;
  top: 10px;
  width: 2px;
  height: 20px;
  border: 0;
  border-radius: 2px;
  background: var(--danger);
  transform: rotate(42deg);
}

.landing {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 380px);
  gap: clamp(24px, 5vw, 72px);
  min-height: calc(100vh - 64px);
  padding: clamp(30px, 6vw, 78px) clamp(16px, 5vw, 70px);
  overflow: hidden;
}

.landing::before {
  position: absolute;
  inset: 0;
  content: "";
  background:
    linear-gradient(100deg, rgba(20, 101, 72, 0.42), rgba(17, 22, 19, 0) 48%),
    repeating-linear-gradient(90deg, rgba(255, 253, 248, 0.025) 0, rgba(255, 253, 248, 0.025) 1px, transparent 1px, transparent 18px);
  pointer-events: none;
}

.landing-copy {
  position: relative;
  z-index: 2;
  align-self: center;
  display: grid;
  gap: 18px;
  max-width: 720px;
}

.eyebrow,
.label {
  color: var(--accent);
  font-size: 0.76rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.lead {
  max-width: 590px;
  color: rgba(255, 253, 248, 0.78);
  font-size: clamp(1rem, 2.1vw, 1.35rem);
  line-height: 1.5;
}

.auth-panel,
.panel {
  position: relative;
  z-index: 2;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.auth-panel {
  align-self: center;
  display: grid;
  gap: 18px;
  padding: 18px;
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 8px;
  background: var(--panel-2);
}

.segmented button {
  min-height: 40px;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.segmented .active {
  background: var(--panel);
  color: var(--ink);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.08);
}

#authForm,
.create-room {
  display: grid;
  gap: 14px;
}

.privacy-toggle {
  display: grid;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.privacy-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 5px;
  border: 1px solid rgba(22, 32, 24, 0.22);
  border-radius: 9px;
  background: rgba(10, 15, 16, 0.88);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.05),
    0 8px 18px rgba(0, 0, 0, 0.12);
}

.privacy-choice {
  position: relative;
  display: grid;
  gap: 2px;
  min-height: 58px;
  align-content: center;
  padding: 10px 11px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 7px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.03)),
    rgba(25, 33, 33, 0.92);
  color: rgba(255, 253, 248, 0.86);
  cursor: pointer;
  transition:
    border-color 120ms ease,
    background 120ms ease,
    box-shadow 120ms ease,
    color 120ms ease;
}

.privacy-choice:has(input:checked) {
  border-color: rgba(217, 164, 65, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 220, 132, 0.92), rgba(217, 164, 65, 0.94));
  color: var(--accent-ink);
  box-shadow:
    inset 0 0 0 1px rgba(255, 253, 248, 0.28),
    0 0 0 2px rgba(217, 164, 65, 0.32),
    0 8px 18px rgba(0, 0, 0, 0.2);
}

.privacy-choice:focus-within {
  outline: 2px solid rgba(255, 226, 160, 0.74);
  outline-offset: 2px;
}

.privacy-choice input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  opacity: 0;
}

.privacy-choice span {
  color: inherit;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
}

.privacy-choice small {
  color: rgba(255, 253, 248, 0.62);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.1;
}

.privacy-choice:has(input:checked) small {
  color: rgba(35, 26, 10, 0.72);
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.form-error {
  min-height: 20px;
  color: var(--danger);
  font-size: 0.86rem;
  font-weight: 700;
}

.hero-table {
  position: absolute;
  right: min(28vw, 520px);
  bottom: -80px;
  z-index: 1;
  width: min(54vw, 720px);
  min-width: 420px;
  aspect-ratio: 1.8;
  opacity: 0.64;
  transform: rotate(-8deg);
}

.hero-felt {
  position: relative;
  width: 100%;
  height: 100%;
  border: 18px solid #6d4424;
  border-radius: 45%;
  background:
    radial-gradient(ellipse at center, rgba(255, 253, 248, 0.12), transparent 45%),
    var(--felt);
  box-shadow: inset 0 0 0 8px rgba(255, 253, 248, 0.08), var(--shadow);
}

.hero-pot {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  color: #fffdf8;
  font-size: 1.2rem;
  font-weight: 900;
}

.hero-card {
  position: relative;
  left: 34%;
  top: 54%;
  display: inline-grid;
  width: 62px;
  height: 86px;
  margin-right: 8px;
  place-items: center;
  border-radius: 8px;
  background: var(--card);
  color: #17211a;
  font-weight: 900;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.24);
}

.red {
  color: var(--danger) !important;
}

.hero-chip {
  position: absolute;
  width: 38px;
  height: 38px;
  border: 7px dashed #fffdf8;
  border-radius: 50%;
  background: var(--danger);
}

.hero-chip.one {
  left: 46%;
  top: 28%;
}

.hero-chip.two {
  left: 52%;
  top: 30%;
  background: var(--accent);
}

.hero-chip.three {
  left: 49%;
  top: 23%;
  background: #2b557f;
}

.primary,
.secondary,
.danger,
.ghost,
.icon-button {
  min-height: 40px;
  border-radius: 6px;
  padding: 0 14px;
  font-weight: 900;
}

.primary {
  background: var(--accent);
  color: var(--accent-ink);
}

.secondary {
  border: 1px solid var(--line);
  background: #fffdf8;
  color: var(--ink);
}

.danger {
  background: var(--danger);
  color: #fffdf8;
}

.ghost {
  border: 1px solid rgba(255, 253, 248, 0.16);
  background: transparent;
  color: #fffdf8;
}

.icon-button {
  width: 40px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fffdf8;
}

.wide {
  width: 100%;
}

.app {
  display: grid;
  grid-template-columns: minmax(280px, 340px) minmax(0, 1fr);
  min-height: calc(100vh - 64px);
  background: #d8d0c1;
}

.orientation-lock {
  display: none;
}

.lobby {
  display: grid;
  align-content: start;
  gap: 14px;
  padding: 14px;
  border-right: 1px solid var(--line);
  background: #ece5d8;
}

.panel {
  display: grid;
  gap: 14px;
  padding: 14px;
  box-shadow: none;
}

.panel.compact {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.account-panel.panel.compact {
  grid-template-columns: 1fr;
  align-items: stretch;
}

.account-summary {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 10px;
}

.account-summary h2 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  place-items: center;
  overflow: hidden;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.2), transparent 36%),
    linear-gradient(145deg, #274236, #101719);
  color: #fff;
  font-size: 1.2rem;
  font-weight: 950;
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, 0.16);
}

.account-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.account-actions button {
  min-width: 0;
}

.account-actions #topUpButton {
  grid-column: 1 / -1;
}

.account-actions #displayNameButton {
  min-width: 0;
}

.panel-head,
.table-toolbar,
.toolbar-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.room-list {
  display: grid;
  gap: 8px;
}

.room-button {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  width: 100%;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf8;
  text-align: left;
}

.room-button.active {
  border-color: rgba(217, 164, 65, 0.9);
  box-shadow: inset 0 0 0 2px rgba(217, 164, 65, 0.28);
}

.room-title {
  color: var(--ink);
  font-weight: 900;
}

.room-meta {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.table-view {
  display: grid;
  grid-template-rows: auto minmax(420px, 1fr) auto auto;
  min-width: 0;
}

.table-toolbar {
  min-height: 76px;
  padding: 12px clamp(14px, 2vw, 24px);
  border-bottom: 1px solid var(--line);
  background: #f4eddf;
}

.toolbar-actions {
  flex-wrap: wrap;
  justify-content: flex-end;
}

.buyin-label {
  width: 128px;
}

.table-shell {
  min-height: 0;
  padding: clamp(12px, 2vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.38), rgba(255, 253, 248, 0)),
    #d8d0c1;
}

.felt {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 420px;
  overflow: hidden;
  border: 14px solid #654023;
  border-radius: 48%;
  background:
    radial-gradient(ellipse at center, rgba(255, 253, 248, 0.18), transparent 38%),
    repeating-linear-gradient(45deg, rgba(255, 253, 248, 0.025) 0, rgba(255, 253, 248, 0.025) 2px, transparent 2px, transparent 9px),
    var(--felt);
  box-shadow: inset 0 0 0 7px rgba(255, 253, 248, 0.08), 0 18px 50px rgba(0, 0, 0, 0.25);
}

.felt::before {
  position: absolute;
  inset: 12%;
  z-index: 0;
  content: "";
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 48%;
  pointer-events: none;
}

.felt::after {
  position: absolute;
  inset: 22%;
  z-index: 0;
  content: "";
  border-radius: 48%;
  background: rgba(9, 45, 34, 0.14);
  box-shadow: inset 0 0 55px rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.community {
  position: absolute;
  left: 50%;
  top: 50%;
  display: grid;
  gap: 12px;
  justify-items: center;
  transform: translate(-50%, -50%);
  z-index: 2;
}

.pot {
  display: grid;
  align-items: center;
  justify-content: center;
  justify-items: center;
  gap: 3px;
  min-width: 110px;
  min-height: 70px;
  padding: 8px 14px;
  border: 1px solid rgba(255, 253, 248, 0.2);
  border-radius: 8px;
  background: rgba(17, 22, 19, 0.32);
  color: #fffdf8;
  font-weight: 900;
  backdrop-filter: blur(2px);
}

.pot-label {
  min-width: 78px;
  text-align: center;
  font-size: 0.82rem;
}

.pot .chip-stack {
  transform: scale(1.12);
  transform-origin: center bottom;
}

.board {
  display: grid;
  grid-template-columns: repeat(5, 54px);
  gap: 8px;
}

.card {
  position: relative;
  display: grid;
  grid-template-rows: 1fr 1fr;
  width: 54px;
  height: 74px;
  align-content: center;
  justify-items: center;
  place-items: center;
  border: 1px solid rgba(22, 32, 24, 0.12);
  border-radius: 8px;
  background: var(--card);
  color: #162018;
  font-size: 1.1rem;
  font-weight: 950;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
  line-height: 1;
}

.card-rank {
  align-self: end;
}

.card-suit {
  align-self: start;
  font-size: 1.25em;
}

.card.back,
.card.placeholder {
  border-color: rgba(255, 253, 248, 0.18);
  background:
    linear-gradient(135deg, rgba(255, 253, 248, 0.22), rgba(255, 253, 248, 0)),
    #2b557f;
  color: rgba(255, 253, 248, 0.68);
}

.card.back::before {
  position: absolute;
  inset: 7px;
  content: "";
  border: 1px solid rgba(255, 253, 248, 0.36);
  border-radius: 5px;
  background:
    linear-gradient(45deg, rgba(255, 253, 248, 0.2) 25%, transparent 25%, transparent 75%, rgba(255, 253, 248, 0.2) 75%),
    linear-gradient(45deg, rgba(255, 253, 248, 0.2) 25%, transparent 25%, transparent 75%, rgba(255, 253, 248, 0.2) 75%);
  background-position: 0 0, 5px 5px;
  background-size: 10px 10px;
}

.card.placeholder {
  background: rgba(255, 253, 248, 0.12);
  box-shadow: none;
}

.card.custom-card {
  overflow: hidden;
  border: 0;
  background: transparent;
}

.card-picture {
  display: block;
  width: 100%;
  height: 100%;
}

.card-art {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: contain;
}

.seat-grid {
  position: absolute;
  inset: 0;
  z-index: 4;
}

.seat {
  position: absolute;
  display: grid;
  gap: 7px;
  width: 168px;
  min-height: 108px;
  padding: 8px;
  border: 1px solid rgba(255, 253, 248, 0.14);
  border-radius: 8px;
  background: rgba(16, 22, 19, 0.82);
  color: #fffdf8;
  transform: translate(-50%, -50%);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.22);
}

.seat.empty {
  align-content: center;
  background: rgba(17, 22, 19, 0.34);
}

.seat.current {
  border-color: rgba(217, 164, 65, 0.95);
  box-shadow: 0 0 0 3px rgba(217, 164, 65, 0.22), 0 16px 34px rgba(0, 0, 0, 0.26);
}

.seat.offline {
  opacity: 0.74;
}

.player-plate {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.avatar {
  display: inline-grid;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgba(255, 253, 248, 0.28);
  border-radius: 50%;
  background: rgba(255, 253, 248, 0.1);
  color: #fffdf8;
  font-size: 0.86rem;
  font-weight: 950;
}

.player-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.seat-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-weight: 900;
}

.seat-name span:first-child {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dealer {
  display: inline-grid;
  width: 24px;
  height: 24px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #fffdf8;
  color: var(--ink);
  font-size: 0.72rem;
}

.seat-stack,
.seat-state {
  color: rgba(255, 253, 248, 0.78);
  font-size: 0.78rem;
  font-weight: 800;
}

.seat-state {
  min-height: 17px;
}

.hole-cards {
  display: flex;
  justify-content: center;
  gap: 5px;
  min-height: 48px;
}

.hole-cards .card {
  width: 38px;
  height: 52px;
  border-radius: 6px;
  font-size: 0.86rem;
}

.hole-cards.folded {
  opacity: 0.48;
  filter: grayscale(0.45);
}

.seat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.seat-actions button {
  min-height: 32px;
  padding: 0 8px;
}

.chip-stack {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 38px;
}

.chip-stack.empty {
  width: 36px;
  height: 12px;
}

.chip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--chip-index) * 3px);
  width: 34px;
  height: 11px;
  border: 2px dashed rgba(255, 253, 248, 0.78);
  border-radius: 999px;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.24), 0 3px 5px rgba(0, 0, 0, 0.18);
  transform: translateX(-50%) rotate(calc((var(--chip-index) - 2) * 3deg));
}

.chip::after {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 253, 248, 0.45);
  transform: translate(-50%, -50%);
}

.chip-red {
  background: #b84545;
}

.chip-blue {
  background: #2b557f;
}

.chip-gold {
  background: #d9a441;
}

.chip-green {
  background: #25815d;
}

.chip-black {
  background: #202724;
}

.chip-white {
  background: #f7efe0;
}

.bet-spot {
  position: absolute;
  z-index: 3;
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 90px;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.bet-amount {
  display: inline-flex;
  min-width: 42px;
  min-height: 24px;
  align-items: center;
  justify-content: center;
  padding: 0 8px;
  border: 1px solid rgba(255, 253, 248, 0.16);
  border-radius: 999px;
  background: rgba(17, 22, 19, 0.56);
  color: #fffdf8;
  font-size: 0.78rem;
  font-weight: 950;
}

.bet-0 {
  left: 50%;
  top: 67%;
}

.bet-1 {
  left: 32%;
  top: 64%;
}

.bet-2 {
  left: 28%;
  top: 45%;
}

.bet-3 {
  left: 38%;
  top: 31%;
}

.bet-4 {
  left: 62%;
  top: 31%;
}

.bet-5 {
  left: 72%;
  top: 45%;
}

.bet-6 {
  left: 68%;
  top: 64%;
}

.bet-7 {
  left: 50%;
  top: 28%;
}

.bet-8 {
  left: 50%;
  top: 64%;
}

.seat-0 {
  left: 50%;
  top: 84%;
}

.seat-1 {
  left: 20%;
  top: 74%;
}

.seat-2 {
  left: 13%;
  top: 40%;
}

.seat-3 {
  left: 30%;
  top: 15%;
}

.seat-4 {
  left: 70%;
  top: 15%;
}

.seat-5 {
  left: 87%;
  top: 40%;
}

.seat-6 {
  left: 80%;
  top: 74%;
}

.seat-7 {
  left: 50%;
  top: 11%;
}

.seat-8 {
  left: 50%;
  top: 72%;
}

.action-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) auto auto;
  align-items: center;
  gap: 12px;
  min-height: 74px;
  padding: 12px clamp(14px, 2vw, 24px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: #f4eddf;
}

.turn-copy {
  color: var(--muted);
  font-weight: 800;
}

.raise-control {
  width: 130px;
}

.action-buttons {
  display: flex;
  gap: 8px;
}

.hand-strip {
  min-height: 58px;
  padding: 10px clamp(14px, 2vw, 24px);
  background: #ece5d8;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 750;
}

.toast {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 40;
  max-width: min(420px, calc(100vw - 32px));
  padding: 12px 14px;
  border-radius: 8px;
  background: #17211a;
  color: #fffdf8;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(10, 14, 12, 0.58);
  backdrop-filter: blur(8px);
}

.profile-modal {
  display: grid;
  width: min(420px, 100%);
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.modal-head,
.modal-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.modal-actions {
  justify-content: flex-end;
}

.profile-modal .ghost {
  border-color: var(--line);
  color: var(--ink);
}

.invite-code {
  display: grid;
  min-height: 58px;
  place-items: center;
  border: 1px solid rgba(224, 171, 60, 0.34);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(224, 171, 60, 0.13), rgba(224, 171, 60, 0.04)),
    rgba(255, 253, 248, 0.04);
  color: var(--accent);
  font-size: 1.45rem;
  font-weight: 950;
  letter-spacing: 0.14em;
}

.invite-modal input[readonly] {
  cursor: text;
}

@media (max-width: 980px) {
  .landing {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .auth-panel {
    align-self: start;
    max-width: 430px;
  }

  .hero-table {
    right: -180px;
    bottom: -60px;
  }

  .app {
    grid-template-columns: 1fr;
  }

  .lobby {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .landing {
    min-height: auto;
    padding-bottom: 120px;
  }

  h1 {
    font-size: 3.6rem;
  }

  .hero-table {
    width: 520px;
    min-width: 520px;
    opacity: 0.44;
  }

  .table-toolbar,
  .action-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .table-toolbar {
    display: grid;
  }

  .toolbar-actions,
  .action-buttons {
    width: 100%;
  }

  .toolbar-actions > *,
  .action-buttons > * {
    flex: 1;
  }

  .buyin-label {
    width: 100%;
  }

  .action-bar {
    grid-template-columns: 1fr;
  }

  .raise-control {
    width: 100%;
  }

  .felt {
    min-height: 560px;
    border-radius: 24px;
  }

  .seat {
    width: 142px;
    min-height: 104px;
  }

  .board {
    grid-template-columns: repeat(5, 44px);
    gap: 5px;
  }

  .card {
    width: 44px;
    height: 62px;
    font-size: 0.98rem;
  }

  .hole-cards .card {
    width: 34px;
    height: 46px;
    font-size: 0.82rem;
  }

  .avatar {
    width: 30px;
    height: 30px;
  }

  .chip-stack {
    width: 34px;
    height: 32px;
  }

  .chip {
    width: 28px;
    height: 9px;
  }

  .bet-spot {
    min-width: 72px;
    gap: 4px;
  }

  .bet-amount {
    min-width: 36px;
    min-height: 22px;
    padding: 0 6px;
    font-size: 0.72rem;
  }

  .seat-0 {
    left: 50%;
    top: 86%;
  }

  .seat-1 {
    left: 24%;
    top: 78%;
  }

  .seat-2 {
    left: 22%;
    top: 30%;
  }

  .seat-3 {
    left: 50%;
    top: 13%;
  }

  .seat-4 {
    left: 78%;
    top: 30%;
  }

  .seat-5 {
    left: 76%;
    top: 78%;
  }

  .bet-0 {
    left: 50%;
    top: 69%;
  }

  .bet-1 {
    left: 35%;
    top: 65%;
  }

  .bet-2 {
    left: 34%;
    top: 40%;
  }

  .bet-3 {
    left: 50%;
    top: 30%;
  }

  .bet-4 {
    left: 66%;
    top: 40%;
  }

  .bet-5 {
    left: 65%;
    top: 65%;
  }

  .seat-6,
  .seat-7,
  .seat-8,
  .bet-6,
  .bet-7,
  .bet-8 {
    display: none;
  }
}

/* Table-first poker client skin */
:root {
  --bg: #070a0d;
  --panel: #111821;
  --panel-2: #192431;
  --ink: #f4f7f2;
  --muted: #98a7a0;
  --line: rgba(255, 255, 255, 0.12);
  --felt: #08704f;
  --felt-deep: #053729;
  --accent: #e0ab3c;
  --accent-ink: #171106;
  --danger: #c94d48;
  --card: #fffaf0;
}

body {
  background:
    radial-gradient(circle at 76% 6%, rgba(224, 171, 60, 0.12), transparent 22%),
    linear-gradient(180deg, #0b1116, #050709 58%);
}

input,
select {
  border-color: rgba(255, 255, 255, 0.14);
  background: #f8f3e8;
  color: #101713;
  font-weight: 800;
}

.topbar {
  min-height: 62px;
  background: rgba(5, 8, 10, 0.96);
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

.app {
  grid-template-columns: minmax(270px, 320px) minmax(0, 1fr);
  background: #080c10;
}

.lobby {
  gap: 12px;
  padding: 14px;
  border-right-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.04), transparent),
    #0d1319;
}

.panel,
.auth-panel {
  border-color: rgba(255, 255, 255, 0.1);
  background: rgba(18, 25, 33, 0.92);
  color: #f4f7f2;
}

.panel h2,
.auth-panel h2 {
  color: #f4f7f2;
}

.panel label,
.auth-panel label {
  color: #b7c4bd;
}

.room-button {
  border-color: rgba(255, 255, 255, 0.1);
  background: #121a22;
  color: #f4f7f2;
}

.room-button.active {
  border-color: rgba(224, 171, 60, 0.9);
  background: linear-gradient(90deg, rgba(224, 171, 60, 0.18), rgba(255, 255, 255, 0.03));
}

.room-title,
.lobby h2 {
  color: #f4f7f2;
}

.room-meta {
  color: #9ba9a2;
}

.secondary,
.icon-button {
  color: #111713;
}

.secondary:disabled {
  color: #506058;
}

.table-view {
  grid-template-rows: auto minmax(560px, 1fr) auto auto;
  background:
    radial-gradient(circle at 50% 8%, rgba(255, 255, 255, 0.1), transparent 28%),
    linear-gradient(180deg, #151a20, #080b0f 70%);
}

.table-toolbar {
  min-height: 78px;
  border-bottom-color: rgba(255, 255, 255, 0.08);
  background: rgba(10, 14, 18, 0.88);
}

.table-toolbar h2 {
  color: #f4f7f2;
  font-size: 1.25rem;
}

.table-shell {
  display: grid;
  min-height: 0;
  place-items: center;
  padding: clamp(16px, 2vw, 28px);
  background:
    radial-gradient(ellipse at center, rgba(224, 171, 60, 0.08), transparent 42%),
    linear-gradient(180deg, #161c22, #0b0f13);
}

.felt {
  width: min(100%, 1120px);
  height: min(66vh, 620px);
  min-height: 540px;
  border: 0;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(4, 8, 10, 0.02), rgba(4, 8, 10, 0.12)),
    url("/assets/table/table1.png") center / cover no-repeat;
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.1),
    0 28px 90px rgba(0, 0, 0, 0.52);
}

.felt::before {
  display: none;
}

.felt::after {
  display: none;
}

.community {
  top: 45%;
  gap: 14px;
}

.pot {
  min-width: 126px;
  min-height: 78px;
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(4, 8, 10, 0.48);
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.board {
  grid-template-columns: repeat(5, 62px);
  gap: 10px;
}

.card {
  width: 62px;
  height: 86px;
  border-radius: 8px;
  font-size: 1.2rem;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.28);
}

.card.placeholder {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.1);
}

.seat {
  width: 176px;
  min-height: 112px;
  border-color: rgba(255, 255, 255, 0.15);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02)),
    rgba(6, 12, 13, 0.88);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.34);
}

.seat.empty {
  width: 150px;
  min-height: 72px;
  align-content: center;
  background: rgba(8, 17, 17, 0.44);
  box-shadow: none;
}

.seat.current {
  border-color: rgba(224, 171, 60, 0.98);
  box-shadow:
    0 0 0 3px rgba(224, 171, 60, 0.22),
    0 18px 44px rgba(0, 0, 0, 0.38);
}

.avatar {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.04));
}

.seat-stack,
.seat-state {
  color: rgba(244, 247, 242, 0.72);
}

.hole-cards .card {
  width: 48px;
  height: 64px;
}

.seat-actions {
  grid-template-columns: 1fr auto;
  align-items: center;
}

.seat.empty .seat-actions {
  grid-template-columns: 1fr 1fr;
}

.seat-mini-button {
  position: absolute;
  right: 7px;
  top: 7px;
  display: inline-grid;
  width: 26px;
  min-height: 26px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.28);
  color: rgba(244, 247, 242, 0.76);
  font-size: 0.72rem;
  font-weight: 950;
}

.seat-mini-button:hover {
  background: rgba(201, 77, 72, 0.86);
  color: #fff;
}

.chip {
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.3), 0 4px 7px rgba(0, 0, 0, 0.25);
}

.bet-amount {
  background: rgba(4, 8, 10, 0.68);
}

.seat-0 {
  left: 50%;
  top: 80%;
}

.seat-1 {
  left: 21%;
  top: 66%;
}

.seat-2 {
  left: 14%;
  top: 39%;
}

.seat-3 {
  left: 30%;
  top: 19%;
}

.seat-4 {
  left: 70%;
  top: 19%;
}

.seat-5 {
  left: 86%;
  top: 39%;
}

.seat-6 {
  left: 79%;
  top: 66%;
}

.seat-7 {
  left: 50%;
  top: 17%;
}

.seat-8 {
  left: 50%;
  top: 68%;
}

.bet-0 {
  left: 50%;
  top: 63%;
}

.bet-1 {
  left: 35%;
  top: 59%;
}

.bet-2 {
  left: 30%;
  top: 43%;
}

.bet-3 {
  left: 40%;
  top: 34%;
}

.bet-4 {
  left: 60%;
  top: 34%;
}

.bet-5 {
  left: 70%;
  top: 43%;
}

.bet-6 {
  left: 65%;
  top: 59%;
}

.bet-7 {
  left: 50%;
  top: 34%;
}

.bet-8 {
  left: 50%;
  top: 62%;
}

.action-bar {
  grid-template-columns: minmax(220px, 1fr) minmax(180px, 260px) auto;
  min-height: 92px;
  border-color: rgba(255, 255, 255, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), transparent),
    #0b1015;
}

.turn-copy {
  color: #c4d0ca;
  font-size: 1rem;
}

.raise-control {
  display: grid;
  width: auto;
  gap: 6px;
}

.bet-presets {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
}

.bet-presets button {
  min-height: 28px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px;
  background: #17212b;
  color: #f4f7f2;
  font-size: 0.78rem;
  font-weight: 900;
}

.action-buttons .primary,
.action-buttons .secondary,
.action-buttons .danger {
  min-width: 78px;
  min-height: 48px;
}

.hand-strip {
  min-height: 48px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: #0d1319;
  color: #aebbb5;
}

.reaction-dock {
  position: absolute;
  right: 13%;
  bottom: 16%;
  z-index: 5;
  display: flex;
  gap: 6px;
  padding: 6px;
  border: 1px solid rgba(255, 255, 255, 0.11);
  border-radius: 999px;
  background: rgba(4, 8, 10, 0.54);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.24);
}

.reaction-dock button {
  min-width: 42px;
  min-height: 28px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: #f4f7f2;
  font-size: 0.76rem;
  font-weight: 950;
}

.reaction-dock button:hover {
  background: var(--accent);
  color: var(--accent-ink);
}

.reaction-pop {
  position: absolute;
  z-index: 8;
  display: inline-grid;
  min-width: 54px;
  min-height: 34px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(244, 247, 242, 0.95);
  color: #111713;
  font-size: 0.82rem;
  font-weight: 950;
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.3);
  animation: reaction-float 1300ms ease forwards;
  transform: translate(-50%, -50%);
}

@keyframes reaction-float {
  0% {
    opacity: 0;
    transform: translate(-50%, -20%) scale(0.92);
  }
  15% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -120%) scale(1.04);
  }
}

.reaction-seat-0 {
  left: 50%;
  top: 62%;
}

.reaction-seat-1 {
  left: 20%;
  top: 54%;
}

.reaction-seat-2 {
  left: 17%;
  top: 31%;
}

.reaction-seat-3 {
  left: 34%;
  top: 18%;
}

.reaction-seat-4 {
  left: 66%;
  top: 18%;
}

.reaction-seat-5 {
  left: 83%;
  top: 31%;
}

.reaction-seat-6 {
  left: 80%;
  top: 54%;
}

.reaction-seat-7 {
  left: 50%;
  top: 19%;
}

.reaction-seat-8 {
  left: 50%;
  top: 58%;
}

@media (max-width: 980px) {
  .table-view {
    grid-template-rows: auto minmax(600px, 1fr) auto auto;
  }

  .lobby {
    grid-template-columns: repeat(3, minmax(220px, 1fr));
    overflow-x: auto;
  }
}

@media (max-width: 720px) {
  .app {
    background: #080c10;
  }

  .lobby {
    grid-template-columns: 1fr;
  }

  .table-shell {
    padding: 10px;
  }

  .felt {
    width: 100%;
    height: 610px;
    min-height: 610px;
    border-radius: 22px;
  }

  .board {
    grid-template-columns: repeat(5, 44px);
  }

  .card {
    width: 44px;
    height: 62px;
  }

  .seat {
    width: 142px;
    min-height: 106px;
  }

  .seat.empty {
    width: 118px;
    min-height: 66px;
  }

  .action-bar {
    grid-template-columns: 1fr;
  }

  .reaction-dock {
    right: 50%;
    bottom: 2%;
    transform: translateX(50%);
  }
}

/* Better chips and server turn clock */
.player-plate {
  position: relative;
  padding-right: 38px;
}

.timer-ring {
  position: absolute;
  right: 0;
  top: 50%;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, rgba(5, 8, 10, 0.94) 0 53%, transparent 54%),
    conic-gradient(var(--accent) calc(var(--timer-progress) * 360deg), rgba(255, 255, 255, 0.14) 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.12), 0 0 18px rgba(224, 171, 60, 0.22);
  transform: translateY(-50%);
}

.timer-ring.urgent {
  background:
    radial-gradient(circle at center, rgba(5, 8, 10, 0.96) 0 53%, transparent 54%),
    conic-gradient(var(--danger) calc(var(--timer-progress) * 360deg), rgba(255, 255, 255, 0.14) 0);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.16), 0 0 22px rgba(201, 77, 72, 0.42);
  animation: timer-pulse 700ms ease-in-out infinite alternate;
}

.timer-text {
  color: #fff;
  font-size: 0.72rem;
  font-weight: 950;
}

@keyframes timer-pulse {
  from {
    transform: translateY(-50%) scale(1);
  }
  to {
    transform: translateY(-50%) scale(1.08);
  }
}

.chip-cluster {
  display: inline-flex;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  min-width: 44px;
  min-height: 42px;
}

.chip-cluster.empty {
  min-width: 36px;
  min-height: 14px;
}

.pot-cluster {
  gap: 6px;
  min-width: 112px;
  min-height: 58px;
}

.bet-cluster {
  min-width: 48px;
  min-height: 36px;
}

.chip-stack {
  position: relative;
  display: inline-block;
  width: 31px;
  height: 42px;
  flex: 0 0 31px;
}

.pot-cluster .chip-stack {
  width: 38px;
  height: 56px;
  flex-basis: 38px;
}

.chip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--chip-index) * 3.7px);
  width: 30px;
  height: 10px;
  border: 2px dashed rgba(255, 253, 248, 0.86);
  border-radius: 999px;
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.22),
    inset 0 -2px 0 rgba(0, 0, 0, 0.32),
    0 3px 5px rgba(0, 0, 0, 0.24);
  transform: translateX(-50%) rotate(calc((var(--chip-index) - 3) * 1.8deg));
}

.pot-cluster .chip {
  bottom: calc(var(--chip-index) * 4.4px);
  width: 36px;
  height: 12px;
}

.chip::before {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 12px;
  height: 4px;
  content: "";
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  transform: translate(-50%, -50%);
}

.pot-cluster .chip::before {
  width: 15px;
  height: 5px;
}

.chip-white {
  background: #efe6d4;
  border-color: #c94d48;
}

.chip-gold {
  background: #e1aa3b;
  border-color: #fff4cf;
}

.chip-green {
  background: #239768;
  border-color: #d4f6e5;
}

.chip-red {
  background: #c94d48;
  border-color: #ffe4df;
}

.chip-blue {
  background: #2f63a3;
  border-color: #d8ebff;
}

.chip-black {
  background: #171d22;
  border-color: #c8d0d6;
}

.pot .chip-cluster {
  transform: scale(1.06);
  transform-origin: center bottom;
}

.pot .chip-stack {
  transform: none;
}

.bet-spot {
  align-items: flex-end;
}

.bet-amount {
  margin-bottom: 4px;
}

@media (max-width: 720px) {
  .timer-ring {
    width: 30px;
    height: 30px;
  }

  .chip-stack {
    width: 25px;
    height: 34px;
    flex-basis: 25px;
  }

  .chip {
    width: 24px;
    height: 8px;
    bottom: calc(var(--chip-index) * 3px);
  }

  .pot-cluster .chip-stack {
    width: 30px;
    height: 44px;
    flex-basis: 30px;
  }

  .pot-cluster .chip {
    width: 29px;
    height: 9px;
    bottom: calc(var(--chip-index) * 3.6px);
  }
}

/* Player pod: avatar/profile badge plus free-standing cards */
.seat:not(.empty) {
  width: 190px;
  min-height: 142px;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  overflow: visible;
}

.seat:not(.empty).current {
  border: 0;
  box-shadow: none;
}

.seat:not(.empty).current .player-plate {
  border-color: rgba(255, 204, 99, 0.98);
  background:
    linear-gradient(180deg, rgba(255, 212, 115, 0.26), rgba(255, 255, 255, 0.06)),
    rgba(18, 19, 13, 0.9);
  box-shadow:
    0 0 0 3px rgba(255, 204, 99, 0.34),
    0 0 30px rgba(255, 204, 99, 0.44),
    0 18px 42px rgba(0, 0, 0, 0.42);
  animation: current-seat-pulse 900ms ease-in-out infinite alternate;
}

.seat:not(.empty).winner-preview .player-plate {
  border-color: rgba(74, 222, 128, 0.98);
  background:
    linear-gradient(180deg, rgba(74, 222, 128, 0.24), rgba(255, 255, 255, 0.05)),
    rgba(6, 18, 11, 0.9);
  box-shadow:
    0 0 0 3px rgba(74, 222, 128, 0.28),
    0 0 34px rgba(74, 222, 128, 0.46),
    0 18px 42px rgba(0, 0, 0, 0.42);
  animation: none;
}

.seat:not(.empty) .player-plate {
  position: relative;
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 58px;
  padding: 7px 38px 7px 8px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(5, 9, 10, 0.78);
  color: #fff;
  backdrop-filter: blur(4px);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
}

.self-best-hand-seat {
  position: absolute;
  left: 50%;
  top: 100%;
  z-index: 9;
  max-width: min(210px, calc(100% - 24px));
  overflow: hidden;
  padding: 4px 10px;
  border: 1px solid rgba(153, 213, 255, 0.58);
  border-radius: 999px;
  background: rgba(4, 16, 24, 0.9);
  color: #dff4ff;
  font-size: 0.74rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 9px 16px rgba(0, 0, 0, 0.3);
  transform: translate(-50%, 6px);
}

.seat:not(.empty).current .avatar,
.seat:not(.empty).current .avatar-frame {
  border-color: rgba(255, 214, 128, 0.98);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(255, 204, 99, 0.24),
    0 9px 18px rgba(0, 0, 0, 0.3);
}

.seat:not(.empty).winner-preview .avatar,
.seat:not(.empty).winner-preview .avatar-frame {
  border-color: rgba(134, 239, 172, 0.98);
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.16),
    0 0 0 3px rgba(74, 222, 128, 0.3),
    0 9px 18px rgba(0, 0, 0, 0.3);
}

.seat:not(.empty).current .hole-cards .card {
  box-shadow:
    0 0 0 2px rgba(255, 204, 99, 0.35),
    0 12px 22px rgba(0, 0, 0, 0.34);
}

.turn-indicator {
  position: absolute;
  left: 50%;
  top: -14px;
  z-index: 5;
  min-width: 70px;
  padding: 3px 9px;
  border: 1px solid rgba(255, 226, 160, 0.82);
  border-radius: 999px;
  background: rgba(20, 15, 7, 0.92);
  color: #ffe6a6;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1;
  text-align: center;
  transform: translateX(-50%);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
}

@keyframes current-seat-pulse {
  from {
    box-shadow:
      0 0 0 3px rgba(255, 204, 99, 0.28),
      0 0 24px rgba(255, 204, 99, 0.34),
      0 18px 42px rgba(0, 0, 0, 0.4);
  }

  to {
    box-shadow:
      0 0 0 4px rgba(255, 204, 99, 0.46),
      0 0 38px rgba(255, 204, 99, 0.58),
      0 18px 42px rgba(0, 0, 0, 0.42);
  }
}

.avatar,
.avatar-frame {
  display: inline-grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.22);
  border-radius: 50%;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.22), transparent 35%),
    linear-gradient(145deg, #274236, #101719);
  color: #fff;
  font-size: 1rem;
  font-weight: 950;
  box-shadow:
    inset 0 0 0 2px rgba(0, 0, 0, 0.16),
    0 7px 15px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.avatar-fallback {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
}

.avatar-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seat:not(.empty) .player-copy {
  gap: 1px;
}

.seat:not(.empty) .seat-name {
  max-width: 86px;
}

.seat:not(.empty) .seat-stack {
  color: rgba(255, 255, 255, 0.78);
}

.seat:not(.empty) .dealer {
  width: 23px;
  height: 23px;
  color: #111713;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.24);
}

.seat:not(.empty) .hole-cards {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 7px;
  min-height: 72px;
  margin-top: 5px;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.34));
}

.seat:not(.empty) .hole-cards .card {
  width: 54px;
  height: 72px;
  border-radius: 7px;
  box-shadow: none;
}

.seat:not(.empty) .hole-cards .card:nth-child(1) {
  transform: rotate(-2deg);
}

.seat:not(.empty) .hole-cards .card:nth-child(2) {
  transform: rotate(2deg);
}

.seat:not(.empty) .card.custom-card {
  background: transparent;
}

.seat:not(.empty) .hand-label {
  position: relative;
  z-index: 3;
  justify-self: center;
  max-width: 176px;
  min-height: 22px;
  margin-top: -7px;
  overflow: hidden;
  padding: 4px 10px;
  border: 1px solid rgba(255, 226, 160, 0.5);
  border-radius: 999px;
  background: rgba(8, 12, 11, 0.86);
  color: #ffe4a1;
  font-size: 0.72rem;
  font-weight: 950;
  line-height: 1.1;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.28);
}

.seat:not(.empty) .seat-state {
  position: absolute;
  left: 50%;
  bottom: -17px;
  z-index: 3;
  min-height: 0;
  max-width: 126px;
  overflow: hidden;
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(5, 9, 10, 0.62);
  color: rgba(255, 255, 255, 0.74);
  text-overflow: ellipsis;
  white-space: nowrap;
  transform: translateX(-50%);
}

.seat:not(.empty) .seat-state:empty {
  display: none;
}

.seat:not(.empty) .seat-mini-button {
  right: 9px;
  top: 50%;
  z-index: 4;
  transform: translateY(-50%);
}

.seat:not(.empty) .timer-ring {
  right: -3px;
}

@media (max-width: 720px) {
  .seat:not(.empty) {
    width: 154px;
    min-height: 124px;
  }

  .seat:not(.empty) .player-plate {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    min-height: 48px;
    padding: 5px 32px 5px 6px;
  }

  .turn-indicator {
    top: -12px;
    min-width: 58px;
    padding: 3px 7px;
    font-size: 0.62rem;
  }

  .seat:not(.empty) .hand-label {
    max-width: 132px;
    min-height: 20px;
    padding: 3px 8px;
    font-size: 0.66rem;
  }

  .avatar,
  .avatar-frame {
    width: 38px;
    height: 38px;
    font-size: 0.86rem;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 42px;
    height: 58px;
  }
}

/* Larger cards and in-table hero action HUD */
.table-view {
  grid-template-rows: auto minmax(640px, 1fr) auto;
}

.table-shell {
  min-height: 640px;
}

.felt {
  height: min(76vh, 720px);
  min-height: 640px;
}

.community {
  top: 34%;
}

.board {
  grid-template-columns: repeat(5, 78px);
  gap: 12px;
}

.card {
  width: 78px;
  height: 108px;
  border-radius: 10px;
}

.seat:not(.empty) {
  width: 222px;
  min-height: 174px;
}

.seat:not(.empty) .hole-cards {
  gap: 10px;
  min-height: 100px;
  margin-top: 8px;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.38));
}

.seat:not(.empty) .hole-cards .card {
  width: 74px;
  height: 100px;
  border-radius: 10px;
}

.seat-0 {
  top: 62%;
}

.seat-1,
.seat-6 {
  top: 66%;
}

.seat-3,
.seat-4 {
  top: 18%;
}

.seat-7 {
  top: 16%;
}

.seat-8 {
  top: 61%;
}

.action-bar {
  position: absolute;
  left: 50%;
  bottom: 18px;
  z-index: 9;
  display: grid;
  width: min(520px, calc(100% - 36px));
  min-height: 0;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 8px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.13), rgba(255, 255, 255, 0.04)),
    rgba(4, 8, 10, 0.9);
  color: #f4f7f2;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.14),
    0 22px 48px rgba(0, 0, 0, 0.42);
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
}

.action-bar.action-waiting {
  grid-template-columns: 1fr;
  opacity: 0.9;
}

.action-bar.action-waiting .action-buttons {
  opacity: 0.58;
}

.turn-copy {
  color: rgba(244, 247, 242, 0.86);
  font-size: 0.95rem;
  font-weight: 950;
  text-align: center;
}

.raise-control {
  display: grid;
  grid-template-columns: minmax(112px, 0.86fr) minmax(210px, 1.14fr);
  align-items: center;
  width: 100%;
  gap: 8px;
}

.raise-control input {
  height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 10px;
  background: rgba(2, 5, 7, 0.78);
  color: #f4f7f2;
  text-align: center;
  font-size: 1rem;
  font-weight: 950;
  box-shadow: inset 0 2px 9px rgba(0, 0, 0, 0.32);
}

.bet-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
}

.bet-presets button {
  min-width: 0;
  min-height: 52px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.02)),
    rgba(19, 30, 34, 0.92);
  color: rgba(244, 247, 242, 0.9);
  font-size: 0.78rem;
  font-weight: 950;
}

.bet-presets button:hover {
  border-color: rgba(224, 171, 60, 0.58);
  color: #fff;
}

.action-buttons {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  width: 100%;
  min-width: 0;
}

.action-buttons .primary,
.action-buttons .secondary,
.action-buttons .danger {
  min-width: 0;
  min-height: 56px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 11px;
  padding: 0 10px;
  color: #fff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.96rem;
  font-weight: 950;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.18),
    0 12px 24px rgba(0, 0, 0, 0.26);
}

.action-buttons .danger {
  border-color: rgba(255, 153, 153, 0.14);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.02)),
    #a9363b;
}

.action-buttons .secondary {
  border-color: rgba(181, 220, 239, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.14), rgba(255, 255, 255, 0.03)),
    #1f5366;
}

.action-buttons .primary {
  border-color: rgba(255, 230, 157, 0.28);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.02)),
    #d99f2e;
  color: #231a0a;
}

.action-buttons .primary:not(:disabled):hover,
.action-buttons .secondary:not(:disabled):hover,
.action-buttons .danger:not(:disabled):hover,
.bet-presets button:not(:disabled):hover {
  transform: translateY(-1px);
}

.action-buttons .primary:disabled,
.action-buttons .secondary:disabled,
.action-buttons .danger:disabled {
  color: rgba(244, 247, 242, 0.72);
  transform: none;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
  }

  .lobby {
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .table-view {
    grid-template-rows: auto minmax(660px, 1fr) auto;
  }

  .table-shell {
    min-height: 660px;
  }

  .felt {
    height: 660px;
    min-height: 660px;
  }

  .board {
    grid-template-columns: repeat(5, 62px);
    gap: 8px;
  }

  .card {
    width: 62px;
    height: 86px;
  }

  .action-bar {
    width: min(520px, calc(100% - 24px));
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px;
  }

  .action-bar.action-waiting {
    grid-template-columns: 1fr;
  }

  .turn-copy {
    text-align: center;
  }
}

@media (max-width: 720px) {
  .table-view {
    grid-template-rows: auto minmax(690px, 1fr) auto;
  }

  .table-shell {
    min-height: 690px;
  }

  .felt {
    height: 690px;
    min-height: 690px;
  }

  .community {
    top: 39%;
  }

  .board {
    grid-template-columns: repeat(5, 52px);
    gap: 6px;
  }

  .card {
    width: 52px;
    height: 72px;
    border-radius: 8px;
  }

  .seat:not(.empty) {
    width: 170px;
    min-height: 138px;
  }

  .seat:not(.empty) .hole-cards {
    gap: 7px;
    min-height: 72px;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 52px;
    height: 70px;
    border-radius: 8px;
  }

  .seat-0 {
    top: 65%;
  }

  .seat-1,
  .seat-6 {
    top: 64%;
  }

  .seat-8 {
    top: 58%;
  }

  .action-bar {
    bottom: 10px;
    width: calc(100% - 20px);
    min-height: 0;
    border-radius: 12px;
  }

  .raise-control {
    grid-template-columns: minmax(82px, 0.9fr) minmax(148px, 1.3fr);
  }

  .raise-control input,
  .bet-presets button {
    min-height: 44px;
    height: 44px;
  }

  .action-buttons .primary,
  .action-buttons .secondary,
  .action-buttons .danger {
    min-height: 48px;
    padding: 0 8px;
    font-size: 0.84rem;
  }

  .reaction-dock {
    bottom: 116px;
  }
}

/* PokerAlho chip assets and table motion */
.chip-motion-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  overflow: visible;
  pointer-events: none;
}

.player-bank {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  height: auto;
  margin-top: 1px;
}

.player-bank .seat-stack {
  min-width: 0;
  overflow: hidden;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.74rem;
  line-height: 1;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat:not(.empty) {
  width: 212px;
}

.seat:not(.empty) .player-plate {
  grid-template-columns: 48px minmax(0, 1fr);
}

.seat:not(.empty) .seat-name {
  max-width: 112px;
}

.chip-cluster {
  --chip-size: 34px;
  --chip-rise: 4px;
  --chip-skew: 4px;
  display: inline-flex;
  min-width: 52px;
  min-height: 54px;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  transform: scale(var(--chip-cluster-scale, 1));
  transform-origin: center bottom;
}

.chip-cluster.empty {
  min-width: 34px;
  min-height: 14px;
}

.stack-cluster {
  --chip-size: 27px;
  --chip-rise: 3px;
  --chip-skew: 3px;
  min-width: 52px;
  min-height: 34px;
  gap: 3px;
  transform-origin: left bottom;
}

.bet-cluster {
  --chip-size: 34px;
  --chip-rise: 4px;
  min-width: 56px;
  min-height: 48px;
}

.pot-cluster {
  --chip-size: 42px;
  --chip-rise: 5px;
  --chip-skew: 5px;
  min-width: 124px;
  min-height: 72px;
  gap: 8px;
}

.motion-cluster {
  --chip-size: 36px;
  --chip-rise: 4px;
  min-width: 64px;
  min-height: 52px;
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.38));
}

.chip-stack {
  position: relative;
  display: inline-block;
  width: var(--chip-size);
  height: calc(var(--chip-size) + 34px);
  flex: 0 0 var(--chip-size);
}

.pot-cluster .chip-stack {
  width: var(--chip-size);
  height: calc(var(--chip-size) + 48px);
  flex-basis: var(--chip-size);
}

.stack-cluster .chip-stack {
  height: calc(var(--chip-size) + 24px);
}

.chip {
  position: absolute;
  left: 50%;
  bottom: calc(var(--chip-index) * var(--chip-rise));
  width: var(--chip-size);
  height: var(--chip-size);
  border: 0;
  border-radius: 50%;
  background: var(--chip-image) center / contain no-repeat;
  filter: drop-shadow(0 4px 4px rgba(0, 0, 0, 0.22));
  transform:
    translateX(calc(-50% + (var(--pile-index) - 1) * var(--chip-skew)))
    rotate(calc((var(--chip-index) - 3) * 2.5deg));
}

.chip::before,
.chip::after {
  display: none;
}

.chip-0_10 {
  --chip-image: url("/assets/chips/chip_0_10.png");
}

.chip-0_50 {
  --chip-image: url("/assets/chips/chip_0_50.png");
}

.chip-1 {
  --chip-image: url("/assets/chips/chip_1.png");
}

.chip-5 {
  --chip-image: url("/assets/chips/chip_5.png");
}

.chip-20 {
  --chip-image: url("/assets/chips/chip_20.png");
}

.pot {
  min-width: 160px;
  min-height: 108px;
  padding: 4px 14px 8px;
}

.pot .chip-cluster {
  margin-bottom: -2px;
}

.pot-label {
  position: relative;
  z-index: 1;
  margin-top: -10px;
  padding: 3px 9px;
  border-radius: 999px;
  background: rgba(4, 8, 10, 0.62);
}

.bet-spot {
  z-index: 6;
  align-items: flex-end;
  min-width: 114px;
}

.bet-amount {
  margin-bottom: 5px;
}

.bet-0 {
  left: 50%;
  top: 56%;
}

.bet-1 {
  left: 37%;
  top: 53%;
}

.bet-2 {
  left: 32%;
  top: 42%;
}

.bet-3 {
  left: 41%;
  top: 34%;
}

.bet-4 {
  left: 59%;
  top: 34%;
}

.bet-5 {
  left: 68%;
  top: 42%;
}

.bet-6 {
  left: 63%;
  top: 53%;
}

.bet-7 {
  left: 50%;
  top: 34%;
}

.bet-8 {
  left: 50%;
  top: 54%;
}

.chip-flight {
  position: absolute;
  left: 0;
  top: 0;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0.72);
  animation: chip-flight 680ms cubic-bezier(0.22, 0.72, 0.18, 1) both;
  will-change: transform, opacity;
}

.payout-flight {
  animation-duration: 820ms;
}

@keyframes chip-flight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
  }
  14% {
    opacity: 1;
  }
  70% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--chip-dx) * 0.86), calc(-50% + var(--chip-dy) * 0.86 - 16px))
      scale(0.95);
  }
  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy)))
      scale(0.78);
  }
}

@media (max-width: 720px) {
  .seat:not(.empty) {
    width: 174px;
  }

  .seat:not(.empty) .seat-name {
    max-width: 82px;
  }

  .player-bank .seat-stack {
    font-size: 0.68rem;
  }

  .stack-cluster {
    --chip-size: 22px;
    --chip-rise: 2.5px;
    min-width: 42px;
  }

  .bet-cluster {
    --chip-size: 28px;
  }

  .pot-cluster {
    --chip-size: 34px;
    min-width: 102px;
    min-height: 62px;
  }

  .pot {
    min-width: 130px;
    min-height: 92px;
  }

  .bet-spot {
    min-width: 90px;
  }
}

/* Final table scale: bigger cards and a profile-sized avatar pod. */
.table-view {
  grid-template-rows: auto minmax(800px, 1fr) auto;
}

.table-shell {
  min-height: 800px;
}

.felt {
  height: min(80vh, 860px);
  min-height: 800px;
}

.community {
  top: 35%;
}

.board {
  grid-template-columns: repeat(5, 92px);
  gap: 14px;
}

.card {
  width: 92px;
  height: 126px;
  border-radius: 12px;
}

.seat:not(.empty) {
  width: 300px;
  min-height: 266px;
}

.seat:not(.empty) .player-plate {
  grid-template-columns: 96px minmax(0, 1fr);
  gap: 13px;
  min-height: 108px;
  padding: 8px 46px 8px 10px;
}

.avatar,
.avatar-frame {
  width: 96px;
  height: 96px;
  font-size: 1.7rem;
}

.seat:not(.empty) .seat-name {
  max-width: 138px;
}

.player-bank {
  height: auto;
}

.seat:not(.empty) .hole-cards {
  gap: 12px;
  min-height: 132px;
  margin-top: 8px;
}

.seat:not(.empty) .hole-cards .card {
  width: 96px;
  height: 130px;
  border-radius: 12px;
}

.seat:not(.empty) .hand-label {
  max-width: 240px;
}

.seat:not(.empty) .seat-state {
  max-width: 200px;
}

.seat-0 {
  top: 58%;
}

.seat-1,
.seat-6 {
  top: 62%;
}

.seat-3,
.seat-4 {
  top: 18%;
}

.seat-7 {
  top: 15%;
}

.seat-8 {
  top: 55%;
}

.bet-0 {
  left: 66%;
  top: 51%;
}

.bet-1 {
  left: 42%;
  top: 54%;
}

.bet-6 {
  left: 58%;
  top: 54%;
}

.bet-8 {
  left: 34%;
  top: 50%;
}

@media (max-width: 980px) {
  .table-view {
    grid-template-rows: auto minmax(740px, 1fr) auto;
  }

  .table-shell {
    min-height: 740px;
  }

  .felt {
    height: 740px;
    min-height: 740px;
  }

  .community {
    top: 37%;
  }

  .board {
    grid-template-columns: repeat(5, 70px);
    gap: 8px;
  }

  .card {
    width: 70px;
    height: 96px;
  }

  .seat:not(.empty) {
    width: 230px;
    min-height: 218px;
  }

  .seat:not(.empty) .player-plate {
    grid-template-columns: 74px minmax(0, 1fr);
    gap: 10px;
    min-height: 86px;
    padding: 6px 38px 6px 8px;
  }

  .avatar,
  .avatar-frame {
    width: 74px;
    height: 74px;
    font-size: 1.35rem;
  }

  .seat:not(.empty) .seat-name {
    max-width: 104px;
  }

  .player-bank {
    height: auto;
  }

  .seat:not(.empty) .hole-cards {
    gap: 8px;
    min-height: 98px;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 70px;
    height: 95px;
    border-radius: 10px;
  }

  .seat-0 {
    top: 60%;
  }

  .seat-1,
  .seat-6 {
    top: 63%;
  }

  .bet-0 {
    left: 63%;
    top: 50%;
  }

  .bet-1 {
    left: 43%;
  }

  .bet-6 {
    left: 57%;
  }
}

@media (max-width: 720px) {
  .table-view {
    grid-template-rows: auto minmax(720px, 1fr) auto;
  }

  .table-shell {
    display: grid;
    min-height: 720px;
    overflow: hidden;
    padding: 10px;
    place-items: center;
  }

  .felt {
    width: 100%;
    max-width: 100%;
    height: 720px;
    min-width: 0;
    min-height: 720px;
  }

  .community {
    top: 40%;
  }

  .board {
    grid-template-columns: repeat(5, 50px);
    gap: 4px;
  }

  .card {
    width: 50px;
    height: 68px;
    border-radius: 8px;
  }

  .seat:not(.empty) {
    width: 160px;
    min-height: 166px;
  }

  .seat:not(.empty) .player-plate {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 7px;
    min-height: 68px;
    padding: 5px 34px 5px 6px;
  }

  .avatar,
  .avatar-frame {
    width: 58px;
    height: 58px;
    font-size: 1.08rem;
  }

  .seat:not(.empty) .seat-name {
    max-width: 56px;
  }

  .player-bank {
    height: auto;
  }

  .seat:not(.empty) .hole-cards {
    gap: 6px;
    min-height: 72px;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 52px;
    height: 70px;
    border-radius: 8px;
  }

  .seat:not(.empty) .hand-label {
    max-width: 140px;
  }

  .seat.empty {
    width: 92px;
    min-height: 58px;
    padding: 4px;
  }

  .seat.empty .seat-actions {
    gap: 4px;
  }

  .seat.empty .seat-actions button {
    min-height: 34px;
    padding: 0 10px;
  }

  .seat-0 {
    top: 60%;
  }

  .seat-1,
  .seat-6 {
    top: 36%;
  }

  .seat-3,
  .seat-4 {
    top: 17%;
  }

  .seat-7 {
    top: 13%;
  }

  .seat-8 {
    top: 56%;
  }

  .action-bar {
    width: min(520px, calc(100vw - 20px));
  }

  .bet-0 {
    left: 66%;
    top: 45%;
  }

  .bet-1 {
    left: 44%;
  }

  .bet-6 {
    left: 56%;
  }
}

/* Final player/card positioning pass. Player plates sit over the bottom of their cards. */
.seat:not(.empty) {
  align-content: start;
  justify-items: center;
}

.seat:not(.empty) .hole-cards {
  order: initial;
  z-index: 3;
  margin-top: 8px;
}

.seat:not(.empty) .player-plate {
  order: initial;
  z-index: 5;
  margin-top: 0;
  transform: translateY(170px);
}

.seat:not(.empty) .hand-label {
  order: initial;
  z-index: 7;
  margin-top: 8px;
}

.seat:not(.empty) .seat-state {
  bottom: -8px;
}

.action-buttons .primary,
.action-buttons .secondary,
.action-buttons .danger {
  border-color: rgba(181, 220, 239, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0.035)),
    #234f63;
  color: #f4f7f2;
}

.action-buttons .primary:not(:disabled):hover,
.action-buttons .secondary:not(:disabled):hover,
.action-buttons .danger:not(:disabled):hover {
  border-color: rgba(224, 171, 60, 0.46);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.045)),
    #2b6077;
}

.payout-flight {
  z-index: 8;
  animation-name: payout-flight;
  animation-duration: 2200ms;
  animation-timing-function: cubic-bezier(0.2, 0.74, 0.18, 1);
}

@keyframes payout-flight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.65);
  }

  9% {
    opacity: 1;
  }

  36% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy) - 10px))
      scale(1);
  }

  82% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy) - 10px))
      scale(1);
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy) - 10px))
      scale(0.92);
  }
}

.pot-payout-flight {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 10;
  display: inline-block;
  min-width: 0;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.98);
  animation: pot-payout-flight 3000ms cubic-bezier(0.2, 0.74, 0.18, 1) both;
  filter: drop-shadow(0 16px 18px rgba(0, 0, 0, 0.38));
  will-change: transform, opacity;
}

.pot-payout-clone {
  pointer-events: none;
}

.pot-payout-clone .sr-only {
  display: none;
}

.pot.pot-paying-out .pot-cluster,
.pot.pot-paying-out .pot-value {
  opacity: 0;
  transform: translateY(-4px) scale(0.92);
  transition:
    opacity 420ms ease,
    transform 420ms ease;
}

@keyframes pot-payout-flight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.92);
  }

  8% {
    opacity: 1;
  }

  42% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy)))
      scale(1.04);
  }

  78% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy)))
      scale(1.04);
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--chip-dx)), calc(-50% + var(--chip-dy)))
      scale(0.82);
  }
}

@media (max-width: 980px) {
  .pot-payout-flight {
    min-width: 0;
  }

  .seat:not(.empty) .player-plate {
    transform: translateY(118px);
  }

  .seat:not(.empty) .hand-label {
    margin-top: 6px;
  }
}

@media (max-width: 720px) {
  .pot-payout-flight {
    min-width: 0;
  }

  .seat:not(.empty) .player-plate {
    transform: translateY(82px);
  }

  .seat:not(.empty) .hand-label {
    margin-top: 4px;
  }
}

/* Final viewport pass: the game table must fit without body scroll. */
:root {
  --app-topbar-height: 62px;
}

.app {
  height: calc(100dvh - var(--app-topbar-height));
  min-height: 0;
  overflow: hidden;
}

.lobby {
  min-height: 0;
  overflow-y: auto;
}

.table-view {
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 0;
}

.table-toolbar {
  min-height: 46px;
  padding: 6px clamp(12px, 1.6vw, 18px);
}

.table-toolbar h2 {
  font-size: 1.02rem;
  line-height: 1.1;
}

.table-toolbar .label {
  font-size: 0.65rem;
}

.table-shell {
  min-height: 0;
  padding: clamp(8px, 1.2vw, 14px);
  align-items: stretch;
  justify-items: center;
}

.felt {
  width: min(100%, 1120px);
  height: 100%;
  min-height: 0;
  max-height: none;
}

.account-actions {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.account-actions #avatarButton,
.account-actions #displayNameButton,
.account-actions #clearAvatarButton,
.account-actions #topUpButton {
  grid-column: span 2;
}

.table-icon-action {
  display: inline-grid;
  min-width: 0;
  min-height: 38px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(255, 255, 255, 0.03)),
    rgba(11, 18, 24, 0.94);
  color: #f4f7f2;
  font-size: 1.04rem;
  font-weight: 950;
  line-height: 1;
}

.table-icon-action:not(:disabled):hover {
  border-color: rgba(224, 171, 60, 0.52);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.16), rgba(255, 255, 255, 0.04)),
    rgba(20, 31, 39, 0.98);
}

.action-bar {
  bottom: 6px;
}

.action-bar.action-ready {
  gap: 4px;
  padding: 6px;
}

.action-bar.action-ready .turn-copy {
  display: none;
}

.action-bar.action-ready .action-buttons .primary,
.action-bar.action-ready .action-buttons .secondary,
.action-bar.action-ready .action-buttons .danger {
  min-height: 40px;
  border-radius: 10px;
  font-size: 0.88rem;
}

.action-bar.action-ready .raise-control {
  grid-template-columns: minmax(92px, 0.78fr) minmax(180px, 1.22fr);
  gap: 5px;
}

.action-bar.action-ready .raise-control input,
.action-bar.action-ready .bet-presets button {
  height: 34px;
  min-height: 34px;
  border-radius: 9px;
}

.action-bar.action-waiting {
  width: auto;
  min-width: min(360px, calc(100% - 28px));
  min-height: 0;
  gap: 0;
  padding: 9px 16px;
  border-radius: 999px;
}

.action-bar.action-waiting .action-buttons,
.action-bar.action-waiting .raise-control {
  display: none;
}

.action-bar.action-waiting .turn-copy {
  font-size: 0.88rem;
  line-height: 1.15;
  white-space: nowrap;
}

@media (max-width: 980px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(116px, auto) minmax(0, 1fr);
  }

  .lobby {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: minmax(220px, 31vw);
    grid-template-columns: none;
    max-height: 150px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 8px;
  }

  .panel {
    gap: 8px;
    padding: 10px;
  }

  .table-toolbar {
    min-height: 40px;
    padding-block: 5px;
  }

  .table-shell {
    min-height: 0;
    padding: 8px;
  }

  .felt {
    height: 100%;
    min-height: 0;
  }

  .seat:not(.empty) {
    width: 210px;
    min-height: 198px;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 66px;
    height: 90px;
  }

  .seat:not(.empty) .player-plate {
    transform: translateY(108px);
  }
}

@media (max-width: 720px) {
  :root {
    --app-topbar-height: 58px;
  }

  .topbar {
    height: var(--app-topbar-height);
    min-height: var(--app-topbar-height);
    align-items: center;
    gap: 8px;
    overflow: hidden;
    padding: 6px 8px;
  }

  .brand {
    gap: 7px;
    min-width: 0;
    font-size: 0.92rem;
  }

  .brand-mark {
    width: 36px;
    height: 36px;
    font-size: 0.72rem;
  }

  .topbar-actions {
    flex: 0 1 auto;
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
  }

  .connection {
    display: none;
  }

  .chip-pill {
    max-width: 102px;
    overflow: hidden;
    padding: 5px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.78rem;
  }

  .sound-button,
  .fullscreen-button {
    width: 36px;
    min-height: 36px;
  }

  #logoutButton {
    min-height: 36px;
    padding: 0 10px;
    font-size: 0.82rem;
  }

  .app {
    grid-template-rows: minmax(96px, auto) minmax(0, 1fr);
  }

  .lobby {
    grid-auto-columns: minmax(190px, 78vw);
    max-height: 108px;
  }

  .account-summary {
    gap: 8px;
  }

  .account-avatar {
    width: 44px;
    height: 44px;
  }

  .account-actions {
    grid-template-columns: repeat(4, minmax(36px, 1fr));
    gap: 5px;
  }

  .account-actions button,
  .table-icon-action {
    min-height: 32px;
    padding-inline: 6px;
  }

  .table-toolbar {
    min-height: 38px;
  }

  .table-toolbar h2 {
    font-size: 0.92rem;
  }

  .table-shell {
    min-height: 0;
    padding: 6px;
  }

  .felt {
    width: 100%;
    height: 100%;
    min-height: 0;
  }

  .seat:not(.empty) {
    width: 150px;
    min-height: 156px;
  }

  .seat:not(.empty) .hole-cards .card {
    width: 48px;
    height: 66px;
  }

  .seat:not(.empty) .player-plate {
    transform: translateY(76px);
  }

  .action-bar {
    bottom: 6px;
  }
}

/* Final seat clarity pass: align the default player row and expose blind roles. */
.seat-0,
.seat-1,
.seat-6 {
  top: 62%;
}

.seat:not(.empty) {
  height: 300px;
}

.turn-indicator {
  display: none;
}

.seat.self .hand-label {
  transform: translateY(-18px);
}

.blind-badge {
  position: absolute;
  right: 14px;
  bottom: 9px;
  z-index: 6;
  display: inline-grid;
  min-width: 34px;
  height: 24px;
  place-items: center;
  border: 1px solid rgba(255, 235, 178, 0.72);
  border-radius: 999px;
  background:
    radial-gradient(circle at 35% 24%, rgba(255, 255, 255, 0.2), transparent 34%),
    #101820;
  color: #ffe2a0;
  font-size: 0.72rem;
  font-weight: 950;
  letter-spacing: 0;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.3);
}

.seat.blind-bb .blind-badge {
  border-color: rgba(141, 203, 255, 0.78);
  color: #cfeaff;
}

.seat.blind-sb .player-plate {
  box-shadow:
    inset 0 0 0 1px rgba(255, 226, 160, 0.16),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.seat.blind-bb .player-plate {
  box-shadow:
    inset 0 0 0 1px rgba(141, 203, 255, 0.18),
    0 12px 28px rgba(0, 0, 0, 0.28);
}

.seat.current.blind-sb .player-plate,
.seat.current.blind-bb .player-plate {
  box-shadow:
    0 0 0 3px rgba(255, 204, 99, 0.34),
    0 0 30px rgba(255, 204, 99, 0.44),
    0 18px 42px rgba(0, 0, 0, 0.42);
}

.bet-amount {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

.bet-blind-marker {
  display: inline-grid;
  min-width: 25px;
  height: 18px;
  place-items: center;
  border-radius: 999px;
  background: rgba(255, 226, 160, 0.18);
  color: #ffe2a0;
  font-size: 0.66rem;
  font-weight: 950;
  line-height: 1;
}

.bet-spot.bet-0 {
  top: 49%;
}

.action-bar.action-ready {
  bottom: 3px;
  width: min(500px, calc(100% - 36px));
  gap: 3px;
  padding: 5px;
}

.action-bar.action-ready .action-buttons {
  gap: 5px;
}

.action-bar.action-ready .action-buttons .primary,
.action-bar.action-ready .action-buttons .secondary,
.action-bar.action-ready .action-buttons .danger {
  min-height: 36px;
  padding-inline: 8px;
}

.action-bar.action-ready .raise-control input,
.action-bar.action-ready .bet-presets button {
  height: 30px;
  min-height: 30px;
}

@media (max-width: 980px) {
  .seat-0,
  .seat-1,
  .seat-6 {
    top: 62%;
  }

  .seat:not(.empty) {
    height: 228px;
  }

  .blind-badge {
    right: 12px;
    bottom: 8px;
    min-width: 30px;
    height: 22px;
    font-size: 0.68rem;
  }
}

@media (max-width: 720px) {
  .seat-0 {
    top: 61%;
  }

  .seat-1,
  .seat-6 {
    top: 36%;
  }

  .seat:not(.empty) {
    height: 168px;
  }

  .blind-badge {
    right: 8px;
    bottom: 6px;
    min-width: 26px;
    height: 19px;
    font-size: 0.6rem;
  }

  .bet-blind-marker {
    min-width: 22px;
    height: 16px;
    font-size: 0.58rem;
  }
}

/* Final pot/dealer pass: slim horizontal chip-only pot and image dealer badge. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.community {
  top: 47%;
  gap: 8px;
}

.board {
  order: 1;
}

.pot {
  order: 2;
  display: flex;
  width: auto;
  min-width: 0;
  height: 54px;
  min-height: 54px;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  backdrop-filter: none;
}

.pot-label {
  display: none;
}

.pot .pot-cluster {
  --chip-size: 38px;
  --chip-rise: 1.6px;
  --chip-skew: 6px;
  display: inline-flex;
  min-width: 220px;
  min-height: 54px;
  height: 54px;
  align-items: flex-end;
  justify-content: center;
  gap: 10px;
  margin: 0;
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.34));
}

.pot .pot-cluster .chip-stack {
  width: var(--chip-size);
  height: 52px;
  flex: 0 0 var(--chip-size);
}

.pot .pot-cluster .chip {
  bottom: calc(var(--chip-index) * var(--chip-rise));
  width: var(--chip-size);
  height: var(--chip-size);
}

.dealer {
  display: none;
}

.dealer-badge {
  position: absolute;
  left: 72px;
  top: 58px;
  z-index: 7;
  display: inline-grid;
  width: 38px;
  height: 38px;
  place-items: center;
  overflow: hidden;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 0 0 2px rgba(255, 231, 160, 0.82),
    0 8px 16px rgba(0, 0, 0, 0.34);
}

.dealer-badge img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

@media (max-width: 980px) {
  .community {
    top: 45%;
  }

  .pot {
    height: 48px;
    min-height: 48px;
  }

  .pot .pot-cluster {
    --chip-size: 32px;
    --chip-rise: 1.4px;
    min-width: 184px;
    min-height: 48px;
    height: 48px;
    gap: 9px;
  }

  .pot .pot-cluster .chip-stack {
    height: 46px;
  }

  .dealer-badge {
    left: 54px;
    top: 46px;
    width: 30px;
    height: 30px;
  }
}

@media (max-width: 720px) {
  .community {
    top: 44%;
    gap: 5px;
  }

  .pot {
    height: 38px;
    min-height: 38px;
  }

  .pot .pot-cluster {
    --chip-size: 26px;
    --chip-rise: 1.2px;
    min-width: 148px;
    min-height: 38px;
    height: 38px;
    gap: 7px;
  }

  .pot .pot-cluster .chip-stack {
    height: 37px;
  }

  .dealer-badge {
    left: 40px;
    top: 34px;
    width: 24px;
    height: 24px;
  }
}

/* Final avatar/pot density pass. */
.seat:not(.empty) {
  width: 270px;
  height: 276px;
}

.seat:not(.empty) .player-plate {
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 11px;
  min-height: 98px;
  padding: 7px 42px 7px 9px;
}

.seat:not(.empty) .avatar,
.seat:not(.empty) .avatar-frame {
  width: 86px;
  height: 86px;
  font-size: 1.52rem;
}

.seat:not(.empty) .seat-name {
  max-width: 126px;
}

.seat:not(.empty) .player-bank {
  height: auto;
}

.seat:not(.empty) .blind-badge {
  right: 12px;
  bottom: 8px;
}

.seat:not(.empty) .timer-ring {
  right: -5px;
}

.dealer-badge {
  left: 64px;
  top: 52px;
  width: 34px;
  height: 34px;
}

.pot {
  gap: 8px;
}

.pot .pot-cluster {
  min-width: 156px;
  gap: 3px;
}

.pot-value {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  margin-top: 5px;
  color: #fff3c8;
  font-size: 1rem;
  font-weight: 950;
  line-height: 1;
  text-shadow:
    0 2px 3px rgba(0, 0, 0, 0.86),
    0 0 8px rgba(0, 0, 0, 0.62);
}

@media (min-width: 981px) {
  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) {
    width: 210px;
    height: 238px;
  }

  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .player-plate {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 10px;
    min-height: 88px;
    padding: 7px 38px 7px 8px;
  }

  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .avatar,
  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .avatar-frame {
    width: 76px;
    height: 76px;
    font-size: 1.35rem;
  }

  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .seat-name {
    max-width: 94px;
  }

  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .hole-cards {
    min-height: 104px;
  }

  .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .hole-cards .card {
    width: 72px;
    height: 98px;
  }

  .seat-grid[data-max-seats="9"] .seat-3 {
    left: 25%;
    top: 18%;
  }

  .seat-grid[data-max-seats="9"] .seat-7 {
    left: 41%;
    top: 14%;
  }

  .seat-grid[data-max-seats="9"] .seat-8 {
    left: 59%;
    top: 14%;
  }

  .seat-grid[data-max-seats="9"] .seat-4 {
    left: 75%;
    top: 18%;
  }
}

@media (max-width: 980px) {
  .seat:not(.empty) {
    width: 207px;
    height: 210px;
  }

  .seat:not(.empty) .player-plate {
    grid-template-columns: 67px minmax(0, 1fr);
    gap: 9px;
    min-height: 78px;
    padding: 6px 34px 6px 7px;
  }

  .seat:not(.empty) .avatar,
  .seat:not(.empty) .avatar-frame {
    width: 67px;
    height: 67px;
    font-size: 1.22rem;
  }

  .seat:not(.empty) .seat-name {
    max-width: 94px;
  }

  .dealer-badge {
    left: 48px;
    top: 41px;
    width: 27px;
    height: 27px;
  }

  .pot {
    gap: 7px;
  }

  .pot .pot-cluster {
    min-width: 132px;
    gap: 2px;
  }

  .pot-value {
    margin-top: 4px;
    font-size: 0.88rem;
  }
}

@media (max-width: 720px) {
  .seat:not(.empty) {
    width: 144px;
    height: 154px;
  }

  .seat:not(.empty) .player-plate {
    grid-template-columns: 52px minmax(0, 1fr);
    gap: 6px;
    min-height: 62px;
    padding: 5px 30px 5px 6px;
  }

  .seat:not(.empty) .avatar,
  .seat:not(.empty) .avatar-frame {
    width: 52px;
    height: 52px;
    font-size: 1rem;
  }

  .seat:not(.empty) .seat-name {
    max-width: 52px;
  }

  .dealer-badge {
    left: 36px;
    top: 31px;
    width: 22px;
    height: 22px;
  }

  .pot {
    gap: 5px;
  }

  .pot .pot-cluster {
    min-width: 110px;
    gap: 1px;
  }

  .pot-value {
    min-width: 26px;
    margin-top: 3px;
    font-size: 0.76rem;
  }
}

/* Pot stacks use visible side layers so stack height reads from the table view. */
.pot {
  height: 58px;
  min-height: 58px;
  align-items: flex-end;
}

.pot .pot-cluster {
  --chip-rise: 2.1px;
  --chip-skew: 2.5px;
  min-height: 58px;
  height: 58px;
  align-items: flex-end;
  gap: 2px;
}

.pot .pot-cluster .chip-stack {
  height: 58px;
  transform: none;
  transform-origin: center bottom;
}

.pot .pot-cluster .chip {
  bottom: calc(var(--chip-index) * var(--chip-rise));
  transform:
    translateX(calc(-50% + (var(--pile-index) - 2) * var(--chip-skew)))
    rotate(calc((var(--pile-index) - 2) * 1.4deg));
}

.pot .pot-cluster .chip-side {
  filter:
    brightness(0.72)
    saturate(1.12)
    drop-shadow(0 2px 1px rgba(0, 0, 0, 0.34));
  transform:
    translateX(calc(-50% + (var(--pile-index) - 2) * var(--chip-skew)))
    translateY(5px)
    scaleY(0.28)
    rotate(calc((var(--pile-index) - 2) * 1.4deg));
  transform-origin: center bottom;
}

.pot .pot-cluster .chip-side::after {
  position: absolute;
  right: 8%;
  bottom: 34%;
  left: 8%;
  display: block;
  height: 20%;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.28);
  content: "";
}

.pot .pot-cluster .chip-top {
  z-index: 2;
  filter: drop-shadow(0 7px 7px rgba(0, 0, 0, 0.24));
}

.pot-value {
  align-self: center;
  margin-top: 0;
  margin-bottom: 8px;
}

.seat.self .hole-cards {
  position: relative;
  z-index: 6;
}

.seat.self .player-plate {
  z-index: 8;
}

@media (max-width: 980px) {
  .pot {
    height: 50px;
    min-height: 50px;
  }

  .pot .pot-cluster {
    --chip-rise: 1.8px;
    min-height: 50px;
    height: 50px;
  }

  .pot .pot-cluster .chip-stack {
    height: 50px;
  }

  .pot .pot-cluster .chip-side {
    transform:
      translateX(calc(-50% + (var(--pile-index) - 2) * var(--chip-skew)))
      translateY(5px)
      scaleY(0.28)
      rotate(calc((var(--pile-index) - 2) * 1.4deg));
  }

  .pot-value {
    margin-bottom: 6px;
  }
}

@media (max-width: 720px) {
  .pot {
    height: 42px;
    min-height: 42px;
  }

  .pot .pot-cluster {
    --chip-rise: 1.4px;
    min-height: 42px;
    height: 42px;
  }

  .pot .pot-cluster .chip-stack {
    height: 42px;
  }

  .pot .pot-cluster .chip-side {
    transform:
      translateX(calc(-50% + (var(--pile-index) - 2) * var(--chip-skew)))
      translateY(5px)
      scaleY(0.28)
      rotate(calc((var(--pile-index) - 2) * 1.4deg));
  }

  .pot-value {
    margin-bottom: 5px;
  }
}

/* Straight dealer-to-target card dealing animation. */
.card.dealing-pending {
  opacity: 0;
}

.card.card-dealt {
  animation: card-dealt-reveal 250ms cubic-bezier(0.18, 0.78, 0.2, 1) both;
}

.card-flight {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 9;
  display: block;
  width: var(--deal-card-width);
  height: var(--deal-card-height);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -50%) scale(0.72);
  transform-origin: center;
  animation: card-deal-flight 520ms cubic-bezier(0.22, 0.74, 0.18, 1) both;
  will-change: transform, opacity;
}

.card-flight .card {
  width: 100%;
  height: 100%;
  box-shadow: 0 16px 26px rgba(0, 0, 0, 0.38);
}

.card-flight-hole {
  filter: drop-shadow(0 10px 12px rgba(0, 0, 0, 0.24));
}

.card-flight-board {
  filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.28));
}

.action-bar.action-dealing {
  opacity: 0.92;
}

@keyframes card-deal-flight {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.56);
  }

  12% {
    opacity: 1;
  }

  86% {
    opacity: 1;
    transform:
      translate(calc(-50% + var(--deal-dx)), calc(-50% + var(--deal-dy)))
      scale(0.98);
  }

  100% {
    opacity: 0;
    transform:
      translate(calc(-50% + var(--deal-dx)), calc(-50% + var(--deal-dy)))
      scale(1);
  }
}

@keyframes card-dealt-reveal {
  0% {
    opacity: 0;
    transform: scaleX(0.18) scale(0.98);
  }

  58% {
    opacity: 1;
    transform: scaleX(1.04) scale(1.01);
  }

  100% {
    opacity: 1;
    transform: scaleX(1) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .card.dealing-pending {
    opacity: 1;
  }

  .card.card-dealt,
  .card-flight {
    animation: none;
  }
}

/* Image landing */
.landing-mode {
  min-height: 100dvh;
  overflow: hidden;
  background: #020403;
}

.landing-mode .topbar {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  justify-content: flex-end;
  min-height: 74px;
  padding: 18px clamp(18px, 3vw, 42px);
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
}

.landing-mode .brand,
.landing-mode .connection {
  display: none;
}

.landing-mode .topbar-actions {
  justify-content: flex-end;
}

.landing-login-button {
  min-height: 42px;
  padding: 0 18px;
  border: 1px solid rgba(239, 207, 132, 0.72);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(239, 207, 132, 0.22), rgba(239, 207, 132, 0.08)),
    rgba(5, 8, 7, 0.72);
  color: #f8e9bd;
  font-weight: 950;
  box-shadow: 0 12px 26px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(10px);
}

.landing-login-button:not(:disabled):hover {
  border-color: rgba(255, 232, 174, 0.95);
  background:
    linear-gradient(180deg, rgba(239, 207, 132, 0.32), rgba(239, 207, 132, 0.12)),
    rgba(5, 8, 7, 0.82);
}

body:not(.landing-mode) .landing-login-button {
  display: none !important;
}

.landing-mode main {
  min-height: 100dvh;
}

.landing-mode .landing {
  display: block;
  min-height: 100dvh;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.16)),
    url("/assets/landing/landing.png") center center / max(100vw, 205dvh) auto no-repeat;
}

.landing-mode .landing::before {
  display: none;
}

.landing-mode .auth-panel {
  position: fixed;
  top: 82px;
  right: clamp(18px, 3vw, 42px);
  z-index: 40;
  width: min(380px, calc(100vw - 36px));
  max-height: calc(100dvh - 104px);
  overflow: auto;
  border-color: rgba(239, 207, 132, 0.38);
  background: rgba(8, 13, 12, 0.88);
  box-shadow: 0 22px 52px rgba(0, 0, 0, 0.48);
  backdrop-filter: blur(16px);
}

.landing-mode .auth-panel .segmented {
  background: rgba(255, 255, 255, 0.08);
}

.landing-mode .auth-panel .segmented .active {
  background: rgba(239, 207, 132, 0.92);
  color: #161006;
}

.landing-mode .auth-panel input {
  border-color: rgba(239, 207, 132, 0.28);
  background: rgba(255, 251, 238, 0.94);
}

@media (max-width: 720px) {
  .landing-mode .topbar {
    height: 64px;
    min-height: 64px;
    padding: 10px 12px;
  }

  .landing-mode .landing {
    background-position: center center;
    background-size: max(100vw, 185dvh) auto;
  }

  .landing-mode .auth-panel {
    top: 72px;
    right: 12px;
    left: 12px;
    width: auto;
  }
}

@media (max-width: 900px) and (orientation: portrait) {
  body.app-mode {
    min-height: 100dvh;
    overflow: hidden;
    background: #080c10;
  }

  body.app-mode main,
  body.app-mode .app {
    min-height: calc(100dvh - 64px);
  }

  body.app-mode .app {
    display: grid;
    grid-template-columns: 1fr;
    background:
      radial-gradient(circle at 50% 28%, rgba(217, 164, 65, 0.22), transparent 34%),
      #080c10;
  }

  body.app-mode .app > :not(.orientation-lock) {
    display: none !important;
  }

  body.app-mode .orientation-lock {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 12px;
    min-height: calc(100dvh - 64px);
    padding: 28px;
    color: #fffdf8;
    text-align: center;
  }

  .orientation-lock strong {
    font-size: 1.35rem;
    font-weight: 950;
  }

  .orientation-lock span:last-child {
    max-width: 240px;
    color: rgba(255, 253, 248, 0.72);
    font-size: 0.92rem;
    font-weight: 800;
  }

  .orientation-phone {
    position: relative;
    width: 72px;
    height: 116px;
    border: 4px solid rgba(255, 253, 248, 0.9);
    border-radius: 16px;
    transform: rotate(90deg);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.32);
  }

  .orientation-phone::before {
    position: absolute;
    left: 50%;
    top: 7px;
    width: 22px;
    height: 4px;
    content: "";
    border-radius: 999px;
    background: rgba(255, 253, 248, 0.72);
    transform: translateX(-50%);
  }
}

@media (max-width: 980px) and (max-height: 520px) and (orientation: landscape) {
  :root {
    --app-topbar-height: 34px;
  }

  body.app-mode {
    overflow: hidden;
  }

  body.app-mode .topbar {
    height: var(--app-topbar-height);
    min-height: var(--app-topbar-height);
    align-items: center;
    gap: 6px;
    overflow: hidden;
    padding: 2px 6px;
  }

  body.app-mode .brand {
    gap: 6px;
    min-width: 0;
    font-size: 0.86rem;
  }

  body.app-mode .brand span:last-child {
    display: none;
  }

  body.app-mode .brand-mark {
    width: 28px;
    height: 28px;
    font-size: 0.64rem;
  }

  body.app-mode .topbar-actions {
    flex-wrap: nowrap;
    gap: 6px;
    min-width: 0;
  }

  body.app-mode .connection {
    display: none;
  }

  body.app-mode .chip-pill {
    max-width: 88px;
    overflow: hidden;
    padding: 3px 7px;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.7rem;
  }

  body.app-mode .sound-button,
  body.app-mode .fullscreen-button,
  body.app-mode #logoutButton {
    min-height: 28px;
  }

  body.app-mode .sound-button,
  body.app-mode .fullscreen-button {
    width: 28px;
  }

  body.app-mode .sound-button::before {
    left: 7px;
    top: 9px;
    width: 6px;
    height: 10px;
  }

  body.app-mode .sound-button::after {
    left: 15px;
    top: 8px;
    width: 8px;
    height: 12px;
    border-width: 2px;
  }

  body.app-mode .sound-button.off::after {
    left: 17px;
    top: 7px;
    height: 15px;
  }

  body.app-mode .fullscreen-button::before {
    inset: 7px;
  }

  body.app-mode #logoutButton {
    padding: 0 8px;
    font-size: 0.72rem;
  }

  body.app-mode .app {
    grid-template-columns: clamp(136px, 19vw, 168px) minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
  }

  body.app-mode .lobby {
    display: grid;
    grid-auto-flow: row;
    grid-auto-columns: auto;
    grid-template-columns: 1fr;
    align-content: start;
    gap: 6px;
    height: 100%;
    max-height: none;
    padding: 6px;
    overflow-x: hidden;
    overflow-y: auto;
  }

  body.app-mode .panel {
    gap: 6px;
    padding: 7px;
  }

  body.app-mode .panel-head {
    gap: 6px;
  }

  body.app-mode .panel-head h2,
  body.app-mode .account-summary h2 {
    font-size: 0.82rem;
  }

  body.app-mode .label,
  body.app-mode .room-meta {
    font-size: 0.62rem;
  }

  body.app-mode .account-summary {
    gap: 6px;
  }

  body.app-mode .account-avatar {
    width: 34px;
    height: 34px;
    font-size: 0.78rem;
  }

  body.app-mode .account-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
  }

  body.app-mode .account-actions #avatarButton,
  body.app-mode .account-actions #displayNameButton,
  body.app-mode .account-actions #clearAvatarButton,
  body.app-mode .account-actions #topUpButton {
    grid-column: span 1;
  }

  body.app-mode .account-actions button,
  body.app-mode .table-icon-action,
  body.app-mode .create-room button,
  body.app-mode .icon-button {
    min-height: 28px;
    padding-inline: 6px;
    font-size: 0.68rem;
  }

  body.app-mode .room-list {
    gap: 5px;
  }

  body.app-mode .room-button {
    gap: 5px;
    padding: 7px;
    border-radius: 7px;
  }

  body.app-mode .room-title {
    font-size: 0.75rem;
  }

  body.app-mode .create-room {
    gap: 6px;
  }

  body.app-mode .field-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }

  body.app-mode input,
  body.app-mode select {
    min-height: 28px;
    padding: 5px 7px;
    font-size: 0.72rem;
  }

  body.app-mode .privacy-toggle {
    padding: 0;
  }

  body.app-mode .privacy-choice-grid {
    grid-template-columns: 1fr;
    gap: 4px;
    padding: 4px;
    border-radius: 7px;
  }

  body.app-mode .privacy-choice {
    min-height: 34px;
    padding: 6px 7px;
    border-radius: 6px;
  }

  body.app-mode .privacy-choice span {
    font-size: 0.74rem;
  }

  body.app-mode .privacy-choice small {
    font-size: 0.6rem;
  }

  body.app-mode .table-view {
    grid-template-rows: 22px minmax(0, 1fr);
    min-height: 0;
  }

  body.app-mode .table-toolbar {
    min-height: 22px;
    padding: 0 6px;
  }

  body.app-mode .table-toolbar h2 {
    display: none;
  }

  body.app-mode .table-toolbar .label {
    max-width: calc(100vw - 260px);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.54rem;
  }

  body.app-mode #inviteButton,
  body.app-mode .table-leave-button {
    min-height: 20px;
    padding-inline: 7px;
    font-size: 0.62rem;
  }

  body.app-mode .table-shell {
    min-height: 0;
    padding: 4px;
  }

  body.app-mode .felt {
    width: 100%;
    height: 100%;
    min-height: 0;
    border-radius: 9px;
  }

  body.app-mode .hand-strip {
    display: none;
  }

  body.app-mode .community {
    top: 37%;
    gap: 4px;
  }

  body.app-mode .board {
    grid-template-columns: repeat(5, 46px);
    gap: 5px;
  }

  body.app-mode .card {
    width: 46px;
    height: 64px;
    border-radius: 7px;
  }

  body.app-mode .seat:not(.empty) {
    width: 138px;
    height: 132px;
    min-height: 0;
    padding: 4px;
  }

  body.app-mode .seat.empty {
    width: 82px;
    min-height: 48px;
    padding: 4px;
  }

  body.app-mode .seat.empty .seat-actions {
    gap: 3px;
  }

  body.app-mode .seat.empty .seat-actions button {
    min-height: 24px;
    padding: 0 6px;
    font-size: 0.62rem;
  }

  body.app-mode .seat:not(.empty) .player-plate {
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 5px;
    min-height: 48px;
    padding: 4px 24px 4px 5px;
    transform: translateY(56px);
  }

  body.app-mode .seat:not(.empty) .avatar,
  body.app-mode .seat:not(.empty) .avatar-frame {
    width: 42px;
    height: 42px;
    font-size: 0.86rem;
  }

  body.app-mode .seat:not(.empty) .seat-name {
    max-width: 54px;
    font-size: 0.68rem;
  }

  body.app-mode .seat:not(.empty) .seat-stack,
  body.app-mode .seat:not(.empty) .seat-state,
  body.app-mode .seat:not(.empty) .player-bank {
    font-size: 0.6rem;
  }

  body.app-mode .seat:not(.empty) .hole-cards {
    gap: 4px;
    min-height: 50px;
    margin-top: 2px;
  }

  body.app-mode .seat:not(.empty) .hole-cards .card {
    width: 39px;
    height: 54px;
    border-radius: 7px;
  }

  body.app-mode .seat.self {
    z-index: 7;
    width: 176px;
    height: 142px;
  }

  body.app-mode .seat.self .hole-cards {
    z-index: 10;
    gap: 8px;
    min-height: 80px;
    margin-top: 0;
    transform: translateY(-22px);
    filter: drop-shadow(0 12px 16px rgba(0, 0, 0, 0.42));
  }

  body.app-mode .seat.self .hole-cards .card {
    width: 58px;
    height: 80px;
    border-radius: 8px;
  }

  body.app-mode .seat.self .player-plate {
    z-index: 7;
    grid-template-columns: 44px minmax(0, 1fr);
    min-height: 50px;
    padding: 4px 26px 4px 5px;
    transform: translateY(72px);
  }

  body.app-mode .seat.self .avatar,
  body.app-mode .seat.self .avatar-frame {
    width: 44px;
    height: 44px;
  }

  body.app-mode .seat.self .seat-name {
    max-width: 68px;
  }

  body.app-mode .seat.self .hand-label {
    position: relative;
    z-index: 9;
    margin-top: 0;
    transform: translateY(-6px);
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) {
    width: 116px;
    height: 104px;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .player-plate {
    grid-template-columns: 36px minmax(0, 1fr);
    gap: 4px;
    min-height: 42px;
    padding: 4px 20px 4px 5px;
    transform: translateY(46px);
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .avatar,
  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .avatar-frame {
    width: 36px;
    height: 36px;
    font-size: 0.76rem;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .seat-name {
    max-width: 46px;
    font-size: 0.62rem;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .hole-cards {
    min-height: 40px;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat:not(.self):not(.empty) .hole-cards .card {
    width: 30px;
    height: 42px;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat-3 {
    left: 27%;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat-4 {
    left: 76%;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat-7 {
    left: 43%;
  }

  body.app-mode .seat-grid[data-max-seats="9"] .seat-8 {
    left: 60%;
    top: 14%;
  }

  body.app-mode .seat:not(.empty) .hand-label {
    max-width: 108px;
    min-height: 16px;
    margin-top: 2px;
    padding: 2px 6px;
    font-size: 0.58rem;
  }

  body.app-mode .blind-badge {
    right: 5px;
    bottom: 4px;
    min-width: 22px;
    height: 16px;
    font-size: 0.54rem;
  }

  body.app-mode .dealer-badge {
    left: 30px;
    top: 26px;
    width: 18px;
    height: 18px;
  }

  body.app-mode .seat-0 {
    top: 56%;
  }

  body.app-mode .seat-1,
  body.app-mode .seat-6 {
    top: 58%;
  }

  body.app-mode .seat-2,
  body.app-mode .seat-5 {
    top: 39%;
  }

  body.app-mode .seat-3,
  body.app-mode .seat-4 {
    top: 18%;
  }

  body.app-mode .seat-7 {
    top: 14%;
  }

  body.app-mode .seat-8 {
    top: 55%;
  }

  body.app-mode .bet-0 {
    left: 61%;
    top: 45%;
  }

  body.app-mode .bet-1,
  body.app-mode .bet-8 {
    left: 41%;
    top: 50%;
  }

  body.app-mode .bet-6 {
    left: 59%;
    top: 50%;
  }

  body.app-mode .pot {
    height: 34px;
    min-height: 34px;
    gap: 2px;
  }

  body.app-mode .pot .pot-cluster {
    --chip-size: 22px;
    --chip-rise: 1.1px;
    min-width: 94px;
    min-height: 34px;
    height: 34px;
    gap: 0;
  }

  body.app-mode .pot .pot-cluster .chip-stack {
    height: 34px;
  }

  body.app-mode .pot-value {
    margin-bottom: 2px;
    font-size: 0.62rem;
  }

  body.app-mode .reaction-dock {
    display: none;
  }

  body.app-mode .action-bar {
    bottom: 4px;
    width: min(340px, calc(100% - 10px));
    gap: 3px;
    padding: 3px;
    border-radius: 10px;
  }

  body.app-mode .action-bar.action-ready .action-buttons {
    gap: 4px;
  }

  body.app-mode .action-bar.action-ready .action-buttons .primary,
  body.app-mode .action-bar.action-ready .action-buttons .secondary,
  body.app-mode .action-bar.action-ready .action-buttons .danger {
    min-height: 28px;
    border-radius: 8px;
    font-size: 0.68rem;
  }

  body.app-mode .action-bar.action-ready .raise-control {
    grid-template-columns: minmax(72px, 0.8fr) minmax(132px, 1.2fr);
    gap: 4px;
  }

  body.app-mode .action-bar.action-ready .raise-control input,
  body.app-mode .action-bar.action-ready .bet-presets button {
    height: 24px;
    min-height: 24px;
    border-radius: 7px;
    font-size: 0.62rem;
  }

  body.app-mode .action-bar.action-waiting {
    min-width: min(270px, calc(100% - 10px));
    padding: 6px 10px;
  }

  body.app-mode .action-bar.action-waiting .turn-copy {
    font-size: 0.7rem;
  }
}

/* Light shell pass: keep the table readable, brighten the app chrome. */
body:not(.landing-mode) {
  --bg: #e7efe7;
  --panel: #f8faf4;
  --panel-2: #e2eadf;
  --ink: #17241e;
  --muted: #596b60;
  --line: rgba(41, 71, 58, 0.18);
  --accent: #d7a33c;
  --accent-ink: #241a08;
  background: #e7efe7;
}

body:not(.landing-mode) .topbar {
  border-bottom-color: rgba(41, 71, 58, 0.18);
  background: rgba(248, 250, 244, 0.94);
  box-shadow: 0 8px 26px rgba(41, 71, 58, 0.1);
}

body:not(.landing-mode) .brand,
body:not(.landing-mode) .topbar-actions {
  color: #17241e;
}

body:not(.landing-mode) .panel h2,
body:not(.landing-mode) .auth-panel h2,
body:not(.landing-mode) .lobby h2,
body:not(.landing-mode) .table-toolbar h2,
body:not(.landing-mode) .account-summary h2 {
  color: #17241e;
}

body:not(.landing-mode) .connection,
body:not(.landing-mode) .chip-pill {
  color: #42574c;
}

body:not(.landing-mode) .chip-pill,
body:not(.landing-mode) .sound-button,
body:not(.landing-mode) .fullscreen-button {
  border-color: rgba(41, 71, 58, 0.2);
  background: rgba(255, 255, 250, 0.78);
}

body:not(.landing-mode) .fullscreen-button::before {
  background:
    linear-gradient(#284236 0 0) left top / 9px 2px no-repeat,
    linear-gradient(#284236 0 0) left top / 2px 9px no-repeat,
    linear-gradient(#284236 0 0) right top / 9px 2px no-repeat,
    linear-gradient(#284236 0 0) right top / 2px 9px no-repeat,
    linear-gradient(#284236 0 0) left bottom / 9px 2px no-repeat,
    linear-gradient(#284236 0 0) left bottom / 2px 9px no-repeat,
    linear-gradient(#284236 0 0) right bottom / 9px 2px no-repeat,
    linear-gradient(#284236 0 0) right bottom / 2px 9px no-repeat;
}

body:not(.landing-mode) .sound-button::before {
  background: #284236;
}

body:not(.landing-mode) .sound-button::after {
  border-color: #284236;
}

body:not(.landing-mode) .app,
body:not(.landing-mode) main {
  background: #e7efe7;
}

body:not(.landing-mode) .lobby {
  border-right-color: rgba(41, 71, 58, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.52), rgba(255, 255, 255, 0)),
    #e9f0e7;
}

body:not(.landing-mode) .panel,
body:not(.landing-mode) .auth-panel {
  border-color: rgba(41, 71, 58, 0.16);
  background: rgba(248, 250, 244, 0.96);
  box-shadow: 0 16px 36px rgba(41, 71, 58, 0.12);
}

body:not(.landing-mode) .label,
body:not(.landing-mode) .eyebrow {
  color: #9d7829;
}

body:not(.landing-mode) label,
body:not(.landing-mode) .room-meta {
  color: #5b6f63;
}

body:not(.landing-mode) input,
body:not(.landing-mode) select {
  border-color: rgba(41, 71, 58, 0.2);
  background: #fffefa;
  color: #17241e;
}

body:not(.landing-mode) .secondary,
body:not(.landing-mode) .ghost,
body:not(.landing-mode) .icon-button {
  border-color: rgba(41, 71, 58, 0.2);
  background: #fffefa;
  color: #17241e;
}

body:not(.landing-mode) .room-button {
  border-color: rgba(41, 71, 58, 0.18);
  background: rgba(255, 255, 250, 0.86);
  box-shadow: 0 8px 18px rgba(41, 71, 58, 0.08);
}

body:not(.landing-mode) .room-title,
body:not(.landing-mode) .room-button.active .room-title {
  color: #17241e;
}

body:not(.landing-mode) .room-button.active {
  border-color: rgba(215, 163, 60, 0.92);
  background:
    linear-gradient(90deg, rgba(215, 163, 60, 0.2), rgba(255, 255, 250, 0.92));
  box-shadow:
    inset 0 0 0 2px rgba(215, 163, 60, 0.22),
    0 10px 22px rgba(41, 71, 58, 0.1);
}

body:not(.landing-mode) .table-toolbar {
  border-bottom-color: rgba(41, 71, 58, 0.16);
  background: rgba(248, 250, 244, 0.94);
}

body:not(.landing-mode) .table-shell {
  background:
    linear-gradient(135deg, rgba(255, 255, 250, 0.44), rgba(255, 255, 255, 0)),
    #dce8dd;
}

body:not(.landing-mode) .privacy-choice-grid {
  border-color: rgba(41, 71, 58, 0.18);
  background: rgba(226, 234, 223, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.44),
    0 8px 18px rgba(41, 71, 58, 0.08);
}

body:not(.landing-mode) .privacy-choice {
  border-color: rgba(41, 71, 58, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.94), rgba(241, 246, 237, 0.94));
  color: #20372d;
}

body:not(.landing-mode) .privacy-choice small {
  color: #65766b;
}

body:not(.landing-mode) .privacy-choice:has(input:checked) {
  border-color: rgba(215, 163, 60, 0.96);
  background:
    linear-gradient(180deg, rgba(255, 222, 143, 0.96), rgba(215, 163, 60, 0.9));
  color: #241a08;
}

body:not(.landing-mode) .account-avatar,
body:not(.landing-mode) .avatar,
body:not(.landing-mode) .avatar-frame {
  background:
    radial-gradient(circle at 34% 22%, rgba(255, 255, 255, 0.22), transparent 36%),
    linear-gradient(145deg, #355f4e, #1d332c);
}

body:not(.landing-mode) .seat:not(.empty) .player-plate {
  border-color: rgba(41, 71, 58, 0.2);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.88), rgba(235, 243, 232, 0.82));
  color: #17241e;
  box-shadow: 0 12px 28px rgba(20, 45, 34, 0.2);
}

body:not(.landing-mode) .seat.empty {
  border-color: rgba(255, 255, 250, 0.18);
  background: rgba(248, 250, 244, 0.18);
  box-shadow: 0 10px 24px rgba(20, 45, 34, 0.16);
}

body:not(.landing-mode) .seat:not(.empty) .seat-stack,
body:not(.landing-mode) .seat:not(.empty) .player-bank {
  color: rgba(23, 36, 30, 0.72);
}

body:not(.landing-mode) .seat:not(.empty) .seat-state {
  background: rgba(248, 250, 244, 0.82);
  color: rgba(23, 36, 30, 0.72);
}

body:not(.landing-mode) .action-bar {
  border-color: rgba(41, 71, 58, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.94), rgba(235, 243, 232, 0.92));
  color: #17241e;
  box-shadow: 0 16px 36px rgba(41, 71, 58, 0.16);
}

body:not(.landing-mode) .action-bar.action-waiting {
  background: rgba(248, 250, 244, 0.94);
}

body:not(.landing-mode) .turn-copy,
body:not(.landing-mode) .hand-strip {
  color: #42574c;
}

body:not(.landing-mode) .hand-strip {
  background: #e9f0e7;
}

body:not(.landing-mode) .table-icon-action {
  border-color: rgba(41, 71, 58, 0.18);
  background:
    linear-gradient(180deg, rgba(255, 255, 250, 0.94), rgba(241, 246, 237, 0.94));
  color: #17241e;
}

body:not(.landing-mode) .toast {
  background: #f8faf4;
  color: #17241e;
  box-shadow: 0 16px 36px rgba(41, 71, 58, 0.22);
}

body:not(.landing-mode) .modal-backdrop {
  background: rgba(48, 69, 57, 0.34);
}

body.app-mode:not(.landing-mode) {
  background: #e7efe7;
}

body.app-mode:not(.landing-mode) main,
body.app-mode:not(.landing-mode) .app {
  background: #e7efe7;
}

body.app-mode:not(.landing-mode) .topbar,
body.app-mode:not(.landing-mode) .lobby,
body.app-mode:not(.landing-mode) .table-toolbar {
  background: rgba(248, 250, 244, 0.96);
}

/* Revealed opponent cards must read as cards, not as tucked-under plate decoration. */
.seat.cards-revealed:not(.self):not(.empty) .player-plate {
  z-index: 4;
}

.seat.cards-revealed:not(.self):not(.empty) .hole-cards {
  z-index: 9;
  transform: translateY(-18px);
  filter: drop-shadow(0 18px 18px rgba(0, 0, 0, 0.42));
}

.seat.cards-revealed:not(.self):not(.empty) .hand-label {
  z-index: 10;
  transform: translateY(-16px);
}

@media (max-width: 980px) {
  .seat.cards-revealed:not(.self):not(.empty) .hole-cards {
    transform: translateY(-12px);
  }

  .seat.cards-revealed:not(.self):not(.empty) .hand-label {
    transform: translateY(-10px);
  }
}

@media (max-width: 720px) {
  .seat.cards-revealed:not(.self):not(.empty) .hole-cards {
    transform: translateY(-8px);
  }

  .seat.cards-revealed:not(.self):not(.empty) .hand-label {
    transform: translateY(-7px);
  }
}

body.app-mode .seat.cards-revealed:not(.self):not(.empty) .hole-cards {
  transform: translateY(-12px);
}

body.app-mode .seat.cards-revealed:not(.self):not(.empty) .hand-label {
  transform: translateY(-10px);
}
