:root {
  color-scheme: dark;
  --felt: #0d6b4a;
  --felt-dark: #07402f;
  --ink: #f7f3e7;
  --muted: #b7c9bd;
  --line: rgba(255, 255, 255, 0.16);
  --panel: rgba(18, 24, 22, 0.82);
  --panel-solid: #121816;
  --gold: #f3c76a;
  --red: #e75959;
  --blue: #70b8ff;
  --green: #58d68d;
  --black: #0a0d0c;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.34);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 50% 38%, rgba(30, 142, 91, 0.82), rgba(11, 76, 53, 0.94) 38%, #08110f 78%),
    linear-gradient(135deg, #0c1715, #111313);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  border: 0;
  color: var(--ink);
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}

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

.app-shell {
  width: min(1420px, 100%);
  min-height: 100vh;
  margin: 0 auto;
  padding: 18px;
}

.entry {
  min-height: calc(100vh - 36px);
  display: grid;
  place-items: center;
}

.entry-panel {
  width: min(470px, 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(12, 17, 15, 0.84);
  box-shadow: var(--shadow);
  padding: 22px;
}

.brand-row,
.topbar,
.panel-head,
.seat-meta,
.actions-row,
.winner-line,
.room-line {
  display: flex;
  align-items: center;
}

.brand-mark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #f7f3e7;
  color: #111;
  font-size: 24px;
  font-weight: 900;
}

.brand-copy {
  margin-left: 12px;
}

.brand-title {
  margin: 0;
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.brand-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.entry-grid {
  display: grid;
  gap: 10px;
  margin-top: 22px;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.05);
}

.create-settings-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field {
  display: grid;
  gap: 7px;
}

.field label {
  color: var(--muted);
  font-size: 13px;
}

.input {
  width: 100%;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: none;
  background: rgba(255, 255, 255, 0.08);
  color: var(--ink);
  padding: 0 12px;
  caret-color: auto;
  user-select: text;
  -webkit-user-select: text;
  pointer-events: auto;
  touch-action: manipulation;
}

.input:focus {
  border-color: rgba(243, 199, 106, 0.8);
  box-shadow: 0 0 0 3px rgba(243, 199, 106, 0.14);
}

.button {
  min-height: 42px;
  border-radius: 8px;
  padding: 0 14px;
  background: rgba(255, 255, 255, 0.11);
  border: 1px solid var(--line);
  font-weight: 750;
}

.button.primary {
  background: var(--gold);
  color: #19130b;
}

.button.danger {
  background: rgba(231, 89, 89, 0.2);
  border-color: rgba(231, 89, 89, 0.55);
}

.button.green {
  background: rgba(88, 214, 141, 0.18);
  border-color: rgba(88, 214, 141, 0.52);
}

.button.blue {
  background: rgba(112, 184, 255, 0.18);
  border-color: rgba(112, 184, 255, 0.52);
}

.error {
  min-height: 22px;
  margin-top: 12px;
  color: #ffb8b8;
  font-size: 14px;
}

.topbar {
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.room-card {
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 8px;
  padding: 12px;
  min-width: 250px;
  user-select: none;
}

.room-kicker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 2px;
}

.room-code {
  font-size: 25px;
  font-weight: 900;
  color: var(--gold);
  letter-spacing: 0;
}

.room-line {
  gap: 8px;
  justify-content: space-between;
}

.room-link {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 11px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--muted);
  font-size: 13px;
  cursor: default;
  user-select: none;
  caret-color: transparent;
}

.layout {
  display: grid;
  grid-template-columns: 240px minmax(640px, 1fr) 320px;
  gap: 14px;
  align-items: start;
}

.table-scroll {
  min-width: 0;
}

.left-rail {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 12px;
}

.rail-toggle {
  display: none;
  padding: 4px 10px;
}

.rail-close {
  display: none;
  align-self: flex-end;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
  }
  .left-rail {
    display: none;
  }
  body.rail-open .left-rail {
    display: flex;
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 86vw);
    height: 100vh;
    z-index: 50;
    background: var(--panel-solid, #11221b);
    padding: 14px;
    overflow-y: auto;
    box-shadow: 0 0 24px rgba(0, 0, 0, 0.5);
  }
  body.rail-open .rail-close {
    display: inline-block;
  }
  body.rail-open::after {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 40;
  }
  .rail-toggle {
    display: inline-block;
  }
}

.table-wrap {
  height: max(820px, calc(100vh - 156px));
  min-height: 820px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  background:
    radial-gradient(ellipse at center, rgba(25, 128, 83, 0.96) 0%, rgba(8, 91, 62, 0.94) 54%, rgba(6, 42, 32, 0.98) 100%);
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}

.table-wrap::before {
  content: "";
  position: absolute;
  inset: 8%;
  border: 16px solid rgba(246, 218, 154, 0.34);
  border-radius: 48%;
  pointer-events: none;
}

.table-center {
  position: absolute;
  top: clamp(210px, 28%, 270px);
  left: 24%;
  right: 24%;
  min-height: 330px;
  display: grid;
  place-items: center;
  text-align: center;
  z-index: 1;
  pointer-events: none;
}

.deck-visual {
  display: grid;
  justify-items: center;
  gap: 7px;
  margin-bottom: 12px;
  position: relative;
  min-height: 96px;
}

.deck-row {
  display: grid;
  grid-template-columns: 70px 70px;
  gap: 18px;
  align-items: start;
  justify-content: center;
  position: relative;
  width: 168px;
  min-height: 66px;
}

.discard-area {
  display: grid;
  justify-items: center;
  gap: 3px;
}

.deck-stack,
.discard-stack {
  position: relative;
  width: 70px;
  height: 48px;
}

.deck-stack span,
.discard-stack span,
.cut-packet,
.burn-fly {
  position: absolute;
  width: 58px;
  height: 38px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.12) 50% 75%, transparent 75%),
    #1d4f8d;
  background-size: 10px 10px;
  box-shadow: 0 7px 16px rgba(0, 0, 0, 0.26);
}

.deck-stack span:nth-child(1) { left: 0; top: 9px; }
.deck-stack span:nth-child(2) { left: 4px; top: 6px; }
.deck-stack span:nth-child(3) { left: 8px; top: 3px; }
.deck-stack span:nth-child(4) { left: 12px; top: 0; }

.discard-stack span {
  left: calc(4px + var(--stack-i) * 3px);
  top: calc(10px - var(--stack-i) * 1px);
  transform: rotate(calc(-7deg + var(--stack-i) * 1deg));
}

.discard-stack b {
  position: absolute;
  right: -10px;
  bottom: -2px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--gold);
  color: #17120a;
  font-size: 11px;
  font-weight: 900;
}

.cut-packet {
  left: calc(50% + 14px);
  top: 6px;
  animation: openingCut 780ms ease-in-out both;
  animation-delay: calc(var(--cut-i) * 85ms);
}

.cut-more {
  position: absolute;
  left: calc(50% + 90px);
  top: 42px;
  border: 1px solid rgba(243, 199, 106, 0.5);
  border-radius: 999px;
  padding: 3px 7px;
  color: var(--gold);
  background: rgba(0, 0, 0, 0.22);
  font-size: 12px;
  font-weight: 900;
}

.burn-fly {
  left: calc(50% + 19px);
  top: 10px;
  width: 48px;
  height: 32px;
  animation: burnToSide 780ms ease-in-out both;
}

.burn-fly-2 {
  animation-delay: 70ms;
}

.burn-fly-3 {
  animation-delay: 140ms;
}

.deck-label {
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 999px;
  padding: 5px 9px;
  background: rgba(0, 0, 0, 0.18);
  color: var(--muted);
  font-size: 12px;
}

.deck-mini-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
}

@keyframes openingCut {
  from {
    opacity: 0;
    transform: translateX(0) translateY(0) rotate(0);
  }
  35% {
    opacity: 1;
  }
  82% {
    opacity: 1;
    transform:
      translateX(calc(-84px - var(--cut-i) * 2px))
      translateY(calc(8px + var(--cut-i) * 1px))
      rotate(calc(-9deg + var(--cut-i) * 1deg));
  }
  to {
    opacity: 0;
    transform:
      translateX(calc(-92px - var(--cut-i) * 2px))
      translateY(calc(12px + var(--cut-i) * 1px))
      rotate(calc(-10deg + var(--cut-i) * 1deg))
      scale(0.94);
  }
}

@keyframes burnToSide {
  from {
    opacity: 0;
    transform: translateX(0) translateY(-8px) rotate(0);
  }
  25% {
    opacity: 1;
  }
  to {
    opacity: 0;
    transform: translateX(-88px) translateY(10px) rotate(-8deg);
  }
}

.seat-card-deal,
.board-card-deal {
  opacity: 0;
  animation-fill-mode: both;
}

.seat-card-deal {
  animation: seatCardDeal 760ms cubic-bezier(.16, .72, .2, 1) both;
  animation-delay: var(--seat-card-delay);
}

.board-card-deal {
  animation: boardCardDeal 720ms ease-in-out both;
  animation-delay: var(--board-card-delay);
}

.board-card-predeal {
  opacity: 0;
  animation: boardBackPredeal 680ms cubic-bezier(.16, .72, .2, 1) both;
  animation-delay: var(--board-back-delay);
}

.board-card-flip {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  animation: boardCardFlip 980ms cubic-bezier(.2, .72, .2, 1) both;
  animation-delay: var(--board-flip-delay);
}

.board-card-flip .card-rank,
.board-card-flip .card-suit {
  animation: flipFaceReveal 980ms step-end both;
  animation-delay: var(--board-flip-delay);
}

.showdown-card-flip {
  backface-visibility: hidden;
  transform-style: preserve-3d;
  animation: showdownCardFlip 920ms cubic-bezier(.2, .72, .2, 1) both;
  animation-delay: var(--showdown-card-delay);
}

.showdown-card-flip .card-rank,
.showdown-card-flip .card-suit {
  animation: flipFaceReveal 920ms step-end both;
  animation-delay: var(--showdown-card-delay);
}

.seat-card-from-0 { --seat-from-x: 0px; --seat-from-y: 185px; --seat-from-r: 2deg; }
.seat-card-from-1 { --seat-from-x: -350px; --seat-from-y: 120px; --seat-from-r: -8deg; }
.seat-card-from-2 { --seat-from-x: -385px; --seat-from-y: -35px; --seat-from-r: -10deg; }
.seat-card-from-3 { --seat-from-x: -330px; --seat-from-y: -210px; --seat-from-r: -8deg; }
.seat-card-from-4 { --seat-from-x: 0px; --seat-from-y: -260px; --seat-from-r: 2deg; }
.seat-card-from-5 { --seat-from-x: 330px; --seat-from-y: -210px; --seat-from-r: 8deg; }
.seat-card-from-6 { --seat-from-x: 385px; --seat-from-y: -35px; --seat-from-r: 10deg; }
.seat-card-from-7 { --seat-from-x: 350px; --seat-from-y: 120px; --seat-from-r: 8deg; }

.board-card-from-0 { --board-from-x: 178px; --board-from-y: -154px; --board-from-r: -9deg; }
.board-card-from-1 { --board-from-x: 90px; --board-from-y: -154px; --board-from-r: -5deg; }
.board-card-from-2 { --board-from-x: 0px; --board-from-y: -154px; --board-from-r: 2deg; }
.board-card-from-3 { --board-from-x: -90px; --board-from-y: -154px; --board-from-r: 5deg; }
.board-card-from-4 { --board-from-x: -178px; --board-from-y: -154px; --board-from-r: 9deg; }

@keyframes seatCardDeal {
  0% {
    opacity: 0;
    transform: translate(var(--seat-from-x), var(--seat-from-y)) rotate(var(--seat-from-r)) scale(0.78);
  }
  14% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes boardCardDeal {
  0% {
    opacity: 0;
    transform: translate(var(--board-from-x), var(--board-from-y)) rotate(var(--board-from-r)) scale(0.72);
  }
  14% {
    opacity: 1;
  }
  78% {
    opacity: 1;
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes boardBackPredeal {
  0% {
    opacity: 0;
    transform: translate(0, -180px) rotate(-12deg) scale(0.68);
  }
  16% { opacity: 1; }
  72% { transform: translate(0, 7px) rotate(2deg) scale(1.04); }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
  }
}

@keyframes boardCardFlip {
  0%, 46% {
    background:
      linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.12) 50% 75%, transparent 75%),
      #1d4f8d;
    background-size: 12px 12px;
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.42);
  }
  0% {
    opacity: 1;
    transform: perspective(620px) rotateY(0) scale(1);
    filter: brightness(0.82);
  }
  46% {
    transform: perspective(620px) rotateY(88deg) scale(1.04);
    filter: brightness(0.55);
  }
  47% {
    background: #faf7ef;
    transform: perspective(620px) rotateY(-88deg) scale(1.04);
    filter: brightness(1.35);
  }
  78% {
    transform: perspective(620px) rotateY(8deg) scale(1.05);
    filter: brightness(1.15);
  }
  100% {
    opacity: 1;
    background: #faf7ef;
    transform: perspective(620px) rotateY(0) scale(1);
    filter: brightness(1);
  }
}

@keyframes showdownCardFlip {
  0%, 46% {
    background:
      linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.12) 50% 75%, transparent 75%),
      #1d4f8d;
    background-size: 10px 10px;
  }
  0% {
    opacity: 1;
    transform: perspective(480px) rotateY(0) translateY(0);
  }
  46% { transform: perspective(480px) rotateY(88deg) translateY(-4px); }
  47% {
    background: #faf7ef;
    transform: perspective(480px) rotateY(-88deg) translateY(-4px);
  }
  78% { transform: perspective(480px) rotateY(8deg) translateY(-2px) scale(1.06); }
  100% {
    opacity: 1;
    background: #faf7ef;
    transform: perspective(480px) rotateY(0) translateY(0) scale(1);
  }
}

@keyframes flipFaceReveal {
  0%, 46% { opacity: 0; }
  47%, 100% { opacity: 1; }
}

.pot {
  display: inline-grid;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
  padding: 9px 15px;
  background: rgba(7, 17, 14, 0.66);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.pot-label {
  color: var(--muted);
  font-size: 12px;
}

.pot-value {
  color: var(--gold);
  font-size: 28px;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.pot-chip {
  width: 19px;
  height: 19px;
  border: 4px dashed rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  background: #1ebfa0;
  box-shadow: 0 0 0 2px #08735f, 0 3px 8px rgba(0, 0, 0, 0.34);
}

.pot-net {
  margin-top: 4px;
  padding-top: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0.13);
  color: rgba(224, 255, 241, 0.8);
  font-size: 11px;
}

.pot-net strong {
  margin-left: 4px;
  color: #fff1a8;
  font-size: 14px;
}

.board {
  min-height: 104px;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 16px;
  position: relative;
  z-index: 1;
}

.card {
  width: clamp(48px, 7vw, 72px);
  aspect-ratio: 0.72;
  border-radius: 8px;
  background: #faf7ef;
  color: #111;
  border: 1px solid rgba(0, 0, 0, 0.18);
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding: 7px;
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.28);
  font-weight: 900;
}

.card.small {
  width: 42px;
  padding: 5px;
  border-radius: 7px;
}

.card.red {
  color: #c72338;
}

.card.back {
  background:
    linear-gradient(45deg, rgba(255, 255, 255, 0.12) 25%, transparent 25% 50%, rgba(255, 255, 255, 0.12) 50% 75%, transparent 75%),
    #1d4f8d;
  background-size: 12px 12px;
  color: transparent;
}

.card-rank {
  text-align: left;
  font-size: 18px;
}

.card-suit {
  display: grid;
  place-items: center;
  font-size: 27px;
}

.card-rank.bottom {
  transform: rotate(180deg);
}

.dealt-card {
  animation: dealIn 380ms ease-out both;
}

@keyframes dealIn {
  from {
    opacity: 0;
    transform: translateY(-18px) scale(0.94) rotate(-2deg);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1) rotate(0);
  }
}

.empty-card {
  width: clamp(48px, 7vw, 72px);
  aspect-ratio: 0.72;
  border-radius: 8px;
  border: 1px dashed rgba(255, 255, 255, 0.26);
  background: rgba(0, 0, 0, 0.12);
}

.seat {
  position: absolute;
  width: min(220px, 24vw);
  min-width: 150px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  background: rgba(10, 16, 14, 0.74);
  padding: 10px;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.24);
  z-index: 2;
}

.seat.turn {
  outline: 3px solid rgba(243, 199, 106, 0.72);
  box-shadow: 0 0 34px rgba(243, 199, 106, 0.22);
}

.seat.winner-seat {
  filter: none;
  outline: 3px solid rgba(255, 222, 91, 0.9);
  box-shadow: 0 0 18px rgba(255, 225, 87, 0.72), 0 0 42px rgba(255, 191, 47, 0.4);
  animation: winnerSeatPulse 900ms ease-in-out infinite alternate;
}

@keyframes winnerSeatPulse {
  to {
    filter: brightness(1.15);
    box-shadow: 0 0 28px rgba(255, 225, 87, 0.88), 0 0 52px rgba(255, 191, 47, 0.5);
  }
}

.seat-turn-timer {
  position: absolute;
  top: -15px;
  left: -15px;
  z-index: 8;
  width: 42px;
  height: 42px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 1px;
  padding-top: 8px;
  border: 3px solid #f3c76a;
  border-radius: 50%;
  background: #152019;
  color: #fff4cd;
  box-shadow: 0 5px 16px rgba(0, 0, 0, 0.42), 0 0 18px rgba(243, 199, 106, 0.28);
  font-variant-numeric: tabular-nums;
}

.seat-turn-timer strong {
  font-size: 17px;
  line-height: 1;
}

.seat-turn-timer span {
  font-size: 9px;
  color: #d8c78f;
}

.seat-turn-timer.urgent {
  border-color: #ff626d;
  background: #4a1720;
  color: #fff;
  animation: timerUrgentPulse 0.72s ease-in-out infinite alternate;
}

@keyframes timerUrgentPulse {
  to { transform: scale(1.08); box-shadow: 0 0 24px rgba(255, 79, 96, 0.72); }
}

.seat.folded {
  opacity: 0.58;
}

.seat-chat {
  position: relative;
  z-index: 1;
  margin-top: 7px;
  border: 1px solid rgba(243, 199, 106, 0.48);
  border-radius: 8px;
  padding: 5px 7px;
  background: rgba(247, 242, 232, 0.96);
  color: #172018;
  font-weight: 850;
  font-size: 12px;
  line-height: 1.2;
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.18);
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.seat-chat::after {
  display: none;
}

.seat-chat div {
  overflow: hidden;
  text-overflow: ellipsis;
}

.seat-chat.quick {
  background: #fff4cd;
  border-color: rgba(243, 199, 106, 0.82);
}

.seat-0 { left: 50%; top: 22px; transform: translateX(-50%); }
.seat-1 { right: 32px; top: 100px; }
.seat-2 { right: 24px; top: 352px; }
.seat-3 { right: 32px; bottom: 92px; }
.seat-4 { left: 50%; bottom: 22px; transform: translateX(-50%); }
.seat-5 { left: 32px; bottom: 92px; }
.seat-6 { left: 24px; top: 352px; }
.seat-7 { left: 32px; top: 100px; }

.seat-meta {
  justify-content: center;
  gap: 8px;
}

.seat-name {
  font-weight: 850;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.seat-chips {
  color: var(--gold);
  font-weight: 850;
}

.seat-bottom-info {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 7px;
  margin-top: 7px;
  font-size: 11px;
}

.seat-bankroll {
  color: rgba(238, 255, 247, 0.78);
  font-weight: 750;
}

.badges {
  display: flex;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 22px;
  margin-top: 7px;
}

.badge {
  min-width: 24px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  padding: 0 7px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.badge.gold {
  color: #17120a;
  background: var(--gold);
  border-color: transparent;
}

.badge.red {
  color: #fff;
  background: var(--red);
  border-color: transparent;
}

.badge.green {
  color: #06100b;
  background: var(--green);
  border-color: transparent;
}

.badge.blue {
  color: #07111b;
  background: var(--blue);
  border-color: transparent;
}

.hole-cards {
  display: flex;
  gap: 6px;
  margin-top: 9px;
  min-height: 59px;
}

.joker-row {
  display: flex;
  align-items: center;
  gap: 3px;
  flex-wrap: wrap;
  margin-top: 7px;
  min-height: 24px;
}

.joker-card {
  width: 22px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  border: 1px solid rgba(20, 20, 20, 0.22);
  background: #fff8ea;
  color: #111;
  font-size: 15px;
  box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  transform: rotate(-3deg);
}

.joker-card:nth-child(even) {
  transform: rotate(4deg);
}

.joker-more {
  color: var(--gold);
  font-size: 12px;
  font-weight: 900;
}

.seat.empty .hole-cards {
  opacity: 0.58;
}

.seat-add-bot {
  width: 100%;
  min-height: 32px;
  margin-top: 8px;
  border-radius: 8px;
  border: 1px solid rgba(112, 184, 255, 0.5);
  background: rgba(112, 184, 255, 0.16);
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
}

.bet-line {
  margin-top: 0;
  color: var(--muted);
  font-size: 12px;
}

.seat-round-bet {
  position: absolute;
  top: -50px;
  left: 50%;
  right: auto;
  min-width: 84px;
  min-height: 42px;
  padding: 6px 10px 6px 34px;
  border: 2px solid rgba(255, 231, 139, 0.72);
  border-radius: 999px;
  background: linear-gradient(145deg, rgba(2, 69, 55, 0.98), rgba(1, 38, 32, 0.98));
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.42), 0 0 18px rgba(255, 211, 79, 0.2);
  color: #fff;
  text-align: left;
  transform: translateX(-50%);
  z-index: 9;
  white-space: nowrap;
}

.seat-round-bet > span:last-child {
  display: grid;
  line-height: 1;
}

.seat-round-bet small {
  color: rgba(222, 255, 240, 0.68);
  font-size: 10px;
}

.seat-round-bet strong {
  margin-top: 3px;
  color: #ffe37f;
  font-size: 18px;
}

.mini-chip-stack {
  position: absolute;
  left: 7px;
  top: 8px;
  width: 17px;
  height: 22px;
}

.mini-chip-stack i {
  position: absolute;
  left: 0;
  width: 17px;
  height: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.82);
  border-radius: 50%;
  background: #12ae91;
  box-shadow: inset 0 0 0 2px #087765;
}

.mini-chip-stack i:nth-child(1) { bottom: 0; }
.mini-chip-stack i:nth-child(2) { bottom: 5px; }
.mini-chip-stack i:nth-child(3) { bottom: 10px; }

.table-hand-result {
  display: grid;
  gap: 3px;
  width: max-content;
  max-width: 100%;
  margin: 10px auto 0;
  padding: 7px 14px;
  border: 1px solid rgba(255, 224, 108, 0.5);
  border-radius: 999px;
  background: rgba(3, 49, 39, 0.9);
  box-shadow: 0 0 20px rgba(255, 211, 62, 0.22);
  color: #fff;
}

.table-hand-result strong {
  color: #ffe47c;
  font-size: 13px;
}

.table-hand-result span {
  color: rgba(230, 255, 242, 0.75);
  font-size: 10px;
}

.chip-flight-layer {
  position: absolute;
  inset: 0;
  z-index: 18;
  overflow: hidden;
  pointer-events: none;
}

.chip-flight-group {
  --fly-x: 0px;
  --fly-y: 0px;
  position: absolute;
  left: 50%;
  top: 47%;
  width: 42px;
  height: 42px;
  opacity: 0;
  animation: chipGroupFly 2.2s cubic-bezier(.2, .72, .18, 1) both;
  animation-delay: var(--winner-delay);
}

.chip-flight-group i {
  position: absolute;
  left: 12px;
  top: 13px;
  width: 17px;
  height: 8px;
  border: 2px dashed rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: #18b89a;
  box-shadow: inset 0 0 0 2px #087461, 0 3px 7px rgba(0, 0, 0, 0.4);
  animation: flyingChipSpin 420ms linear infinite;
}

.chip-flight-group i:nth-child(2) { left: 18px; top: 8px; }
.chip-flight-group i:nth-child(3) { left: 7px; top: 7px; }
.chip-flight-group i:nth-child(4) { left: 21px; top: 17px; }
.chip-flight-group i:nth-child(5) { left: 5px; top: 19px; }
.chip-flight-group i:nth-child(6) { left: 15px; top: 23px; }
.chip-flight-group i:nth-child(7) { left: 24px; top: 4px; }

.chip-flight-group strong {
  position: absolute;
  left: 50%;
  top: 100%;
  padding: 3px 8px;
  border-radius: 999px;
  transform: translateX(-50%);
  background: rgba(2, 44, 36, 0.92);
  color: #ffe37f;
  font-size: 13px;
  white-space: nowrap;
  box-shadow: 0 4px 13px rgba(0, 0, 0, 0.35);
}

.chip-target-0 { --fly-x: 0px; --fly-y: -300px; }
.chip-target-1 { --fly-x: 285px; --fly-y: -215px; }
.chip-target-2 { --fly-x: 310px; --fly-y: 0px; }
.chip-target-3 { --fly-x: 285px; --fly-y: 240px; }
.chip-target-4 { --fly-x: 0px; --fly-y: 300px; }
.chip-target-5 { --fly-x: -285px; --fly-y: 240px; }
.chip-target-6 { --fly-x: -310px; --fly-y: 0px; }
.chip-target-7 { --fly-x: -285px; --fly-y: -215px; }

@keyframes chipGroupFly {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.55) rotate(-14deg);
  }
  12% { opacity: 1; }
  55% {
    opacity: 1;
    transform: translate(calc(-50% + var(--fly-x)), calc(-50% + var(--fly-y))) scale(1.16) rotate(8deg);
  }
  88% {
    opacity: 1;
    transform: translate(calc(-50% + var(--fly-x)), calc(-50% + var(--fly-y))) scale(1) rotate(0);
  }
  100% {
    opacity: 0;
    transform: translate(calc(-50% + var(--fly-x)), calc(-50% + var(--fly-y))) scale(0.9);
  }
}

@keyframes flyingChipSpin {
  to { transform: rotate(360deg); }
}

.cut-progress {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.cut-summary {
  color: var(--muted);
  font-size: 12px;
}

.cut-submit {
  width: 100%;
  margin-top: 10px;
}

.burn-row {
  display: flex;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
}

.burn-step {
  border: 1px dashed rgba(255, 255, 255, 0.22);
  border-radius: 999px;
  padding: 5px 8px;
  color: var(--muted);
  background: rgba(0, 0, 0, 0.16);
  font-size: 12px;
}

.burn-step.done {
  border-style: solid;
  border-color: rgba(243, 199, 106, 0.58);
  background: rgba(243, 199, 106, 0.14);
  color: var(--gold);
}

.side-panel {
  display: grid;
  gap: 12px;
}

.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  padding: 14px;
}

.panel-head {
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.panel-head-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  flex-wrap: wrap;
}

.panel-title {
  margin: 0;
  font-size: 16px;
}

.actions-row {
  gap: 8px;
  flex-wrap: wrap;
}

.timer-pill {
  border: 1px solid rgba(243, 199, 106, 0.48);
  border-radius: 999px;
  padding: 6px 9px;
  background: rgba(243, 199, 106, 0.12);
  color: var(--gold);
  font-size: 12px;
  font-weight: 850;
}

.timer-pill.urgent {
  border-color: rgba(231, 89, 89, 0.66);
  background: rgba(231, 89, 89, 0.16);
  color: #ffb8b8;
}

.raise-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
}

.raise-row .input {
  height: 42px;
}

.raise-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 36px;
  background: transparent;
  outline: none;
}

.raise-slider::-webkit-slider-runnable-track {
  height: 8px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(243, 199, 106, 0.55) 0%, rgba(243, 199, 106, 0.55) var(--slider-pct, 0%), rgba(255, 255, 255, 0.18) var(--slider-pct, 0%), rgba(255, 255, 255, 0.18) 100%);
}

.raise-slider::-moz-range-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.raise-slider::-moz-range-progress {
  height: 8px;
  border-radius: 999px;
  background: rgba(243, 199, 106, 0.55);
}

.raise-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  margin-top: -8px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.raise-slider::-moz-range-thumb {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--gold);
  border: 2px solid #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.raise-slider:disabled {
  opacity: 0.4;
}

.raise-row.raise-with-slider {
  grid-template-columns: 1fr;
}

.raise-value {
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-size: 13px;
}

.raise-value strong {
  font-size: 22px;
  color: var(--gold);
  font-weight: 800;
}

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

.chat-list {
  display: grid;
  gap: 7px;
  max-height: 180px;
  overflow: auto;
  padding-right: 2px;
}

.chat-item {
  display: grid;
  gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 7px 8px;
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-size: 12px;
}

.chat-item strong {
  color: var(--ink);
}

.chat-item.quick {
  border-color: rgba(243, 199, 106, 0.32);
  background: rgba(243, 199, 106, 0.1);
}

.chat-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.emoji-row,
.quick-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}

.chip-button {
  min-height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.08);
  padding: 0 9px;
  font-weight: 800;
}

.chip-button.text {
  color: var(--muted);
  font-size: 12px;
}

.hint {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.room-settings {
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.winner-list,
.log-list,
.score-list {
  display: grid;
  gap: 8px;
}

.winner-line {
  justify-content: space-between;
  border: 1px solid rgba(243, 199, 106, 0.3);
  background: rgba(243, 199, 106, 0.12);
  border-radius: 8px;
  padding: 9px 10px;
}

.winner-line strong {
  color: var(--gold);
}

.log-item,
.score-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
}

.log-item:last-child,
.score-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.score-item strong {
  color: var(--ink);
}

.viewer-outcome {
  font-size: 18px;
  font-weight: 800;
  padding: 8px 16px;
  border-radius: 10px;
  text-align: center;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.viewer-outcome.win {
  background: linear-gradient(135deg, rgba(243, 199, 106, 0.32), rgba(67, 168, 88, 0.32));
  color: #ffe7a8;
  border: 1px solid rgba(243, 199, 106, 0.55);
  animation: winPulse 1.4s ease-in-out infinite;
}

.viewer-outcome.lose {
  background: rgba(178, 51, 51, 0.22);
  color: #ffb1b1;
  border: 1px solid rgba(178, 51, 51, 0.55);
}

.viewer-outcome.draw {
  background: rgba(112, 184, 255, 0.18);
  color: #d9ecff;
  border: 1px solid rgba(112, 184, 255, 0.52);
}

@keyframes winPulse {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(243, 199, 106, 0.0); }
  50% { transform: scale(1.025); box-shadow: 0 0 22px 4px rgba(243, 199, 106, 0.45); }
}

.avatar {
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: var(--avatar-color, #888);
  color: #111;
  font-weight: 800;
  font-family: inherit;
  margin-right: 6px;
  flex-shrink: 0;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.15);
}

.seat-best {
  margin-top: 4px;
  font-size: 11px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 3px 8px;
  border-radius: 6px;
  letter-spacing: 0.5px;
}

.seat-delta {
  margin-left: 6px;
  font-size: 11px;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
}

.seat-delta.positive { background: rgba(67, 168, 88, 0.25); color: #a7e8b3; }
.seat-delta.negative { background: rgba(178, 51, 51, 0.25); color: #ffb1b1; }

.leaderboard,
.stats-list {
  display: grid;
  gap: 6px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 22px 28px 1fr auto;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.leaderboard-row.is-viewer {
  background: rgba(243, 199, 106, 0.14);
  outline: 1px solid rgba(243, 199, 106, 0.45);
}

.leaderboard-row.is-host {
  background: rgba(243, 199, 106, 0.18);
}

.rank-index {
  font-weight: 700;
  color: var(--muted);
  text-align: center;
}

.leader-name {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

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

.leader-delta {
  font-weight: 800;
  font-size: 12px;
}

.leader-delta.positive { color: #a7e8b3; }
.leader-delta.negative { color: #ffb1b1; }

.badge.mini {
  font-size: 9px;
  padding: 1px 5px;
}

.stat-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  padding: 4px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.stat-row:last-child { border-bottom: 0; }
.stat-row strong.positive { color: #a7e8b3; }
.stat-row strong.negative { color: #ffb1b1; }

.winner-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.winner-name {
  display: flex;
  align-items: center;
  gap: 4px;
}

.winner-name em {
  color: var(--gold);
  font-style: normal;
  font-weight: 700;
}

.winner-cards {
  display: flex;
  gap: 4px;
}

.winner-amount {
  align-self: flex-end;
  font-size: 16px;
  color: var(--gold);
}

.showdown-list {
  margin-top: 6px;
  display: grid;
  gap: 6px;
  border-top: 1px dashed rgba(255, 255, 255, 0.12);
  padding-top: 6px;
}

.showdown-list .winner-line {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
}

@media (max-width: 720px) {
  .seat-best { font-size: 10px; padding: 2px 6px; }
  .viewer-outcome { font-size: 16px; padding: 6px 10px; }
  .leaderboard-row { font-size: 12px; }
}

.mobile-mini-actions {
  display: none;
}

.settlement-inline {
  margin: 10px 0 0;
}

.settlement-card {
  border: 1px solid rgba(243, 199, 106, 0.34);
  background: rgba(14, 20, 18, 0.94);
  box-shadow: var(--shadow);
  animation: settlementFadeIn 380ms ease-out;
}

@keyframes settlementFadeIn {
  from { transform: translateY(8px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.settlement-card .winner-card {
  animation: winnerGlow 1.6s ease-in-out infinite alternate;
}

@keyframes winnerGlow {
  from { box-shadow: 0 0 0 rgba(243, 199, 106, 0); }
  to { box-shadow: 0 0 14px rgba(243, 199, 106, 0.45); }
}

.fly-pot {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 5;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(243, 199, 106, 0.18);
  border: 1px solid rgba(243, 199, 106, 0.5);
  color: var(--gold);
  font-weight: 800;
  animation: flyToAvatar 1.4s ease-in forwards;
  pointer-events: none;
}

@keyframes flyToAvatar {
  0% { transform: translate(0, 0) scale(1); opacity: 1; }
  70% { transform: translate(0, 40px) scale(0.95); opacity: 1; }
  100% { transform: translate(0, 80px) scale(0.55); opacity: 0; }
}

.auto-next {
  color: var(--gold);
  font-weight: 700;
}

.settlement-card .settlement-actions {
  margin-top: 14px;
  flex-wrap: wrap;
  gap: 6px;
}

@media (max-width: 980px) {
  .layout {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .table-scroll {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .table-wrap {
    height: max(860px, calc(100vh - 150px));
    min-height: 860px;
    min-width: 0;
  }

  .side-panel {
    width: 100%;
    min-width: 0;
    padding-bottom: 0;
  }
}

@media (max-width: 720px) {
  .app-shell {
    padding: 0;
    overflow-x: hidden;
  }

  .topbar {
    align-items: stretch;
    flex-direction: row;
    flex-wrap: wrap;
    padding: 6px 10px;
    gap: 6px;
  }

  .topbar .room-card {
    flex: 1 1 auto;
    min-width: 0;
  }

  .topbar .status-pill {
    flex: 1 0 100%;
    text-align: center;
  }

  .room-line {
    align-items: center;
    flex-direction: row;
    gap: 8px;
  }

  .room-code {
    font-size: 18px;
  }

  .layout {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 0 8px;
  }

  .table-scroll {
    overflow-x: visible;
    padding-bottom: 0;
  }

  .table-wrap {
    width: 100%;
    height: calc(100vh - 200px);
    min-height: 320px;
    min-width: 0;
  }

  .table-wrap::before {
    inset: 8% -10%;
    border-width: 8px;
    border-radius: 40%;
  }

  .table-center {
    top: 40%;
    left: 50%;
    right: auto;
    width: min(220px, 60vw);
    min-height: 170px;
    transform: translate(-50%, -50%);
  }

  .deck-visual {
    width: 100px;
    gap: 4px;
    min-height: 60px;
    margin: 0 auto 6px;
  }

  .deck-row {
    width: 92px;
    min-height: 36px;
    grid-template-columns: 40px 40px;
    gap: 8px;
  }

  .deck-stack,
  .discard-stack {
    width: 40px;
    height: 28px;
  }

  .deck-stack span,
  .discard-stack span,
  .cut-packet,
  .burn-fly {
    width: 32px;
    height: 22px;
    border-radius: 4px;
  }

  .deck-stack span:nth-child(1) { left: 0; top: 6px; }
  .deck-stack span:nth-child(2) { left: 3px; top: 4px; }
  .deck-stack span:nth-child(3) { left: 6px; top: 2px; }
  .deck-stack span:nth-child(4) { left: 9px; top: 0; }

  .discard-stack span {
    left: calc(3px + var(--stack-i) * 2px);
    top: calc(6px - var(--stack-i) * 1px);
  }

  .deck-mini-label,
  .deck-label,
  .cut-summary,
  .burn-step {
    font-size: 9px;
  }

  .pot {
    padding: 4px 8px;
  }

  .pot-label {
    font-size: 9px;
  }

  .pot-value {
    font-size: 20px;
  }

  .board {
    min-height: 42px;
    gap: 4px;
    margin-top: 8px;
  }

  .board .card,
  .board .empty-card {
    width: 26px;
    border-radius: 5px;
    padding: 2px;
  }

  .cut-progress {
    display: none;
  }

  .burn-row {
    gap: 3px;
  }

  .burn-step {
    padding: 3px 5px;
  }

  .seat-card-from-0 { --seat-from-x: 0px; --seat-from-y: 120px; }
  .seat-card-from-1 { --seat-from-x: -110px; --seat-from-y: 90px; }
  .seat-card-from-2 { --seat-from-x: -120px; --seat-from-y: -30px; }
  .seat-card-from-3 { --seat-from-x: -100px; --seat-from-y: -160px; }
  .seat-card-from-4 { --seat-from-x: 0px; --seat-from-y: -180px; }
  .seat-card-from-5 { --seat-from-x: 100px; --seat-from-y: -160px; }
  .seat-card-from-6 { --seat-from-x: 120px; --seat-from-y: -30px; }
  .seat-card-from-7 { --seat-from-x: 110px; --seat-from-y: 90px; }

  .board-card-from-0 { --board-from-x: 90px; --board-from-y: -110px; }
  .board-card-from-1 { --board-from-x: 45px; --board-from-y: -110px; }
  .board-card-from-2 { --board-from-x: 0px; --board-from-y: -110px; }
  .board-card-from-3 { --board-from-x: -45px; --board-from-y: -110px; }
  .board-card-from-4 { --board-from-x: -90px; --board-from-y: -110px; }

  .seat {
    width: 84px;
    min-width: 0;
    padding: 5px;
  }

  .seat-chat {
    margin-top: 3px;
    padding: 3px 5px;
    border-radius: 999px;
    font-size: 9px;
    line-height: 1.1;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.16);
  }

  .seat-chat div {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

/* 移动端座位排布:seat-0 在 .table-wrap 底中央,小巧不挡牌 */
  .seat.seat-0 {
    bottom: 8px !important;
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    transform: translateX(-50%) !important;
    width: 100px !important;
    min-width: 100px !important;
    max-width: 100px !important;
    padding: 3px 6px !important;
    z-index: 5 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
  }
  .seat.seat-0 .seat-meta {
    flex-direction: row !important;
    align-items: center !important;
    gap: 4px !important;
    font-size: 10px !important;
    line-height: 1 !important;
  }
  .seat.seat-0 .seat-name,
  .seat.seat-0 .seat-chips {
    font-size: 10px !important;
    white-space: nowrap !important;
  }
  .seat.seat-0 .seat-chips { display: none !important; }
  .seat.seat-0 .badges,
  .seat.seat-0 .bet-line,
  .seat.seat-0 .seat-best,
  .seat.seat-0 .seat-chat,
  .seat.seat-0 .joker-row,
  .seat.seat-0 .seat-add-bot { display: none !important; }
  .seat.seat-0 .hole-cards {
    margin-top: 3px !important;
    min-height: 30px !important;
    gap: 2px !important;
  }
  .seat.seat-1 { right: 4px; top: 60px; }
  .seat.seat-2 { right: 4px; top: 170px; }
  .seat.seat-3 { right: 4px; bottom: 90px; }
  .seat.seat-4 { top: 6px !important; left: 50% !important; right: auto !important; bottom: auto !important; transform: translateX(-50%) !important; }
  .seat.seat-5 { left: 4px; bottom: 90px; }
  .seat.seat-6 { left: 4px; top: 170px; }
  .seat.seat-7 { left: 4px; top: 60px; }


  .seat-meta {
    gap: 4px;
  }

  .seat-name,
  .seat-chips {
    font-size: 12px;
  }

  .badges {
    gap: 3px;
    min-height: 14px;
    margin-top: 3px;
  }

  .badge {
    min-width: 18px;
    height: 15px;
    padding: 0 4px;
    font-size: 9px;
  }

  .hole-cards {
    gap: 4px;
    min-height: 34px;
    margin-top: 4px;
    justify-content: center;
  }

  .card.small {
    width: 22px;
    padding: 2px;
    border-radius: 4px;
  }

  .card-rank {
    font-size: 10px;
  }

  .card-suit {
    font-size: 14px;
  }

  .seat-add-bot {
    min-height: 20px;
    margin-top: 4px;
    font-size: 10px;
  }

  .bet-line {
    margin-top: 3px;
    font-size: 9px;
  }

  .seat-best {
    font-size: 9px;
    padding: 2px 5px;
  }

  /* 桌面侧栏：移动端隐藏非必要面板 */
  .side-panel > .panel:not(.settlement-card) {
    display: none;
  }

  .side-panel {
    width: 100%;
    min-width: 0;
    padding-bottom: 0;
    gap: 6px;
  }

  .panel {
    padding: 10px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-title {
    font-size: 14px;
  }

  .actions-row {
    gap: 4px;
  }

  .actions-row .button {
    flex: 1 1 calc(33% - 4px);
    padding: 8px 6px;
    font-size: 12px;
  }

  .raise-slider {
    height: 28px;
  }

  .raise-value strong {
    font-size: 18px;
  }

  .chat-row {
    grid-template-columns: 1fr;
  }

  .chat-row .button {
    width: 100%;
  }

  /* 移动动作条:放进 .table-wrap 内,座位 0 正上方的紧凑条 */
  .mobile-mini-actions {
    display: block;
    position: absolute;
    left: 50%;
    bottom: 56px;
    transform: translateX(-50%);
    z-index: 28;
    width: calc(100% - 24px);
    max-width: 200px;
    background: rgba(14, 20, 18, 0.94);
    padding: 2px 3px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.45);
  }

  .mobile-mini-actions .panel {
    padding: 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
  }

  .mobile-mini-actions .panel-head {
    display: none;
  }

  .mobile-mini-actions .actions-row {
    margin-top: 0;
    gap: 2px;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .mobile-mini-actions .actions-row .button {
    padding: 2px 2px;
    font-size: 10px;
    line-height: 1.2;
    border-radius: 4px;
    min-height: 0;
  }

  .mobile-mini-actions .raise-row.raise-with-slider {
    grid-template-columns: 1fr auto;
    margin-top: 2px;
    gap: 3px;
    align-items: center;
  }

  .mobile-mini-actions .raise-slider {
    height: 10px;
    margin: 0;
  }

  .mobile-mini-actions .raise-value {
    font-size: 9px;
    display: flex;
    gap: 2px;
    align-items: baseline;
  }

  .mobile-mini-actions .hint {
    display: none;
  }

  /* 浮动按钮行(排名/战绩/聊天/打赏/记录) — 顶 bar 下方 */
  .mobile-drawer-row {
    position: sticky;
    top: 0;
    z-index: 22;
    display: flex;
    gap: 4px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 6px 8px;
    background: var(--panel-solid, #11221b);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  }

  .mobile-drawer-btn {
    background: rgba(14, 20, 18, 0.92);
    border: 1px solid rgba(255, 255, 255, 0.14);
    color: var(--ink);
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    cursor: pointer;
  }

  .mobile-drawer-btn.active {
    background: rgba(243, 199, 106, 0.25);
    border-color: rgba(243, 199, 106, 0.6);
    color: var(--gold);
  }

  /* 弹层 */
  .mobile-overlay {
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(0, 0, 0, 0.55);
    display: grid;
    align-items: end;
    justify-items: center;
  }

  .mobile-overlay[hidden] {
    display: none;
  }

  .mobile-overlay-card {
    width: min(420px, 96vw);
    max-height: 70vh;
    overflow-y: auto;
    background: var(--panel-solid, #11221b);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 14px 14px 0 0;
    padding: 12px;
    animation: overlaySlideUp 220ms ease-out;
  }

  @keyframes overlaySlideUp {
    from { transform: translateY(40px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
  }

  .mobile-overlay-close {
    float: right;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--ink);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    cursor: pointer;
  }

  /* 结算内嵌到布局流(在 .layout 末尾) */
  .settlement-inline {
    margin: 6px 0 200px;
  }

  .viewer-outcome { font-size: 14px; padding: 4px 8px; }

  .settlement-card {
    padding: 10px;
  }

  .winner-cards {
    gap: 3px;
  }

  .winner-cards .card.small {
    width: 26px;
    padding: 3px;
  }
  .mobile-overlay-close {
    float: right;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: var(--ink);
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 11px;
    cursor: pointer;
  }

  /* 结算内嵌到布局流(在 .layout 末尾) */
  .settlement-inline {
    margin: 6px 0 200px;
  }

  .viewer-outcome { font-size: 14px; padding: 4px 8px; }

  .settlement-card {
    padding: 10px;
  }

  .winner-cards {
    gap: 3px;
  }

  .winner-cards .card.small {
    width: 26px;
    padding: 3px;
  }
}


/* Mobile poker table: dedicated full-screen experience inspired by live poker apps. */
@media (max-width: 720px) {
  body.in-room {
    height: var(--app-height, 100dvh);
    min-height: var(--app-height, 100dvh);
    overflow: hidden;
    overscroll-behavior: none;
    background: #063d31;
  }

  body.in-room .app-shell {
    width: 100%;
    height: var(--app-height, 100dvh);
    min-height: var(--app-height, 100dvh);
    padding: 0;
    overflow: hidden;
  }

  body.in-room .topbar {
    position: fixed;
    inset: 0 0 auto;
    z-index: 36;
    height: 64px;
    margin: 0;
    padding: max(8px, env(safe-area-inset-top)) 12px 6px;
    display: grid;
    grid-template-columns: 48px 1fr auto;
    align-items: center;
    gap: 8px;
    background: linear-gradient(180deg, rgba(1, 28, 23, 0.78), transparent);
    pointer-events: none;
  }

  body.in-room .topbar > * {
    pointer-events: auto;
  }

  body.in-room .rail-toggle {
    display: grid;
    place-items: center;
    width: 42px;
    min-height: 42px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(1, 30, 25, 0.46);
    font-size: 25px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.55);
  }

  body.in-room .topbar .room-card {
    justify-self: center;
    width: auto;
    min-width: 0;
    padding: 4px 12px;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 999px;
    background: rgba(1, 49, 39, 0.66);
    box-shadow: 0 5px 14px rgba(0, 0, 0, 0.18);
  }

  body.in-room .topbar .room-line {
    gap: 6px;
  }

  body.in-room .topbar .room-kicker,
  body.in-room .topbar .room-link {
    display: none;
  }

  body.in-room .topbar .room-code {
    color: #eefdf6;
    font-size: 14px;
    letter-spacing: 0.12em;
  }

  body.in-room .topbar .room-card .button {
    min-height: 28px;
    padding: 0 8px;
    border: 0;
    background: rgba(255, 255, 255, 0.1);
    font-size: 10px;
  }

  body.in-room .topbar > .status-pill {
    max-width: 92px;
    padding: 6px 8px;
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(1, 49, 39, 0.66);
    color: #dff7ec;
    font-size: 10px;
    text-align: center;
  }

  body.in-room .layout {
    display: block;
    width: 100%;
    height: var(--app-height, 100dvh);
    padding: 0;
  }

  body.in-room .left-rail,
  body.in-room .side-panel {
    display: none;
  }

  body.in-room .table-scroll {
    width: 100%;
    height: var(--app-height, 100dvh);
    overflow: hidden;
  }

  body.in-room .table-wrap {
    width: 100%;
    height: var(--app-height, 100dvh);
    min-height: var(--app-height, 100dvh);
    border: 0;
    border-radius: 0;
    background:
      radial-gradient(ellipse at 50% 42%, rgba(24, 178, 123, 0.3), transparent 36%),
      repeating-linear-gradient(122deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 4px),
      linear-gradient(155deg, #09765e 0%, #08634f 44%, #034536 100%);
    box-shadow: none;
    isolation: isolate;
  }

  body.in-room .table-wrap::before {
    inset: 3.5% -24% 3%;
    border: 12px solid rgba(3, 24, 22, 0.86);
    border-radius: 50%;
    box-shadow:
      inset 0 0 0 2px rgba(171, 230, 201, 0.15),
      inset 0 0 90px rgba(0, 0, 0, 0.18),
      0 0 0 3px rgba(126, 180, 158, 0.18),
      0 18px 36px rgba(0, 0, 0, 0.38);
    z-index: -1;
  }

  body.in-room .table-wrap::after {
    content: "♠";
    position: absolute;
    left: 50%;
    top: 48%;
    transform: translate(-50%, -50%);
    color: rgba(211, 255, 235, 0.09);
    font-size: 100px;
    font-weight: 900;
    z-index: 0;
    pointer-events: none;
  }

  body.in-room .table-center {
    top: 43%;
    left: 50%;
    right: auto;
    width: min(310px, 80vw);
    min-height: 160px;
    transform: translate(-50%, -50%);
    z-index: 2;
  }

  body.in-room .deck-visual {
    display: none;
  }

  body.in-room .pot {
    min-width: 116px;
    padding: 5px 14px;
    border-color: rgba(173, 240, 212, 0.25);
    border-radius: 5px;
    background: rgba(1, 71, 56, 0.82);
    box-shadow: 0 4px 13px rgba(0, 0, 0, 0.22);
  }

  body.in-room .pot-label {
    color: rgba(225, 255, 242, 0.72);
    font-size: 10px;
  }

  body.in-room .pot-value {
    color: #fff;
    font-size: 19px;
  }

  body.in-room .pot-chip {
    width: 14px;
    height: 14px;
    border-width: 3px;
  }

  body.in-room .pot-net {
    margin-top: 2px;
    padding-top: 3px;
    font-size: 9px;
  }

  body.in-room .pot-net strong {
    font-size: 12px;
  }

  body.in-room .board {
    min-height: 58px;
    gap: 3px;
    margin-top: 12px;
  }

  body.in-room .board .card,
  body.in-room .board .empty-card {
    width: min(44px, 11.4vw);
    border-radius: 5px;
    padding: 4px;
  }

  body.in-room .board .card-rank {
    font-size: 13px;
  }

  body.in-room .board .card-suit {
    font-size: 21px;
  }

  body.in-room .seat {
    width: 78px;
    min-width: 0;
    max-width: 78px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    box-shadow: none;
    text-align: center;
    z-index: 4;
  }

  body.in-room .seat:not(.empty) .seat-meta {
    min-height: 27px;
    padding: 3px 5px 2px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    background: rgba(1, 35, 29, 0.84);
    box-shadow: 0 5px 13px rgba(0, 0, 0, 0.28);
  }

  body.in-room .seat .avatar {
    width: 28px !important;
    height: 28px !important;
    flex: 0 0 28px;
    font-size: 12px !important;
    border: 2px solid rgba(255, 255, 255, 0.76);
  }

  body.in-room .seat-name {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 3px;
    color: #f5fff9;
    font-size: 9px;
  }

  body.in-room .seat-chips {
    display: block;
    color: #fff1a9;
    font-size: 11px;
  }

  body.in-room .seat-bottom-info {
    min-height: 20px;
    margin-top: 2px;
    gap: 4px;
    padding: 2px 5px;
    border-radius: 999px;
    background: rgba(1, 30, 25, 0.78);
    font-size: 8px;
    white-space: nowrap;
  }

  body.in-room .seat-bankroll {
    color: rgba(236, 255, 246, 0.86);
    font-weight: 800;
  }

  body.in-room .seat .badges {
    position: absolute;
    top: -7px;
    right: -3px;
    min-height: 0;
    margin: 0;
    z-index: 3;
  }

  body.in-room .seat .badge {
    display: none;
  }

  body.in-room .seat .badge.gold,
  body.in-room .seat .badge.red,
  body.in-room .seat .badge.green:last-child {
    display: grid;
    min-width: 20px;
    height: 20px;
    padding: 0 4px;
    border: 2px solid rgba(255, 255, 255, 0.75);
    font-size: 8px;
  }

  body.in-room .seat .hole-cards {
    min-height: 30px;
    margin: -2px 0 0;
    justify-content: center;
    gap: 2px;
  }

  body.in-room .seat .card.small {
    width: 23px;
    padding: 2px;
    border-radius: 3px;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.36);
  }

  body.in-room .seat .card-rank {
    font-size: 9px;
  }

  body.in-room .seat .card-suit {
    font-size: 13px;
  }

  body.in-room .seat .bet-line {
    display: inline-block;
    margin: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    color: rgba(216, 239, 228, 0.56);
    font-size: 8px;
  }

  body.in-room .seat-round-bet {
    top: -42px;
    left: 50%;
    right: auto;
    min-width: 70px;
    min-height: 37px;
    padding: 5px 7px 5px 28px;
    border-width: 2px;
    border-radius: 999px;
    transform: translateX(-50%);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.45), 0 0 16px rgba(255, 218, 82, 0.26);
  }

  body.in-room .seat-round-bet small {
    font-size: 8px;
  }

  body.in-room .seat-round-bet strong {
    margin-top: 2px;
    font-size: 15px;
  }

  body.in-room .mini-chip-stack {
    left: 5px;
    top: 6px;
    width: 13px;
    height: 18px;
  }

  body.in-room .mini-chip-stack i {
    width: 13px;
    height: 6px;
    border-width: 1px;
  }

  body.in-room .mini-chip-stack i:nth-child(1) { bottom: 0; }
  body.in-room .mini-chip-stack i:nth-child(2) { bottom: 4px; }
  body.in-room .mini-chip-stack i:nth-child(3) { bottom: 8px; }

  body.in-room .table-hand-result {
    margin-top: 7px;
    padding: 5px 10px;
  }

  body.in-room .table-hand-result strong {
    font-size: 11px;
  }

  body.in-room .table-hand-result span {
    font-size: 9px;
  }

  body.in-room .seat .seat-best,
  body.in-room .seat .joker-row {
    display: none;
  }

  body.in-room .seat-chat {
    position: absolute;
    left: 50%;
    bottom: calc(100% + 4px);
    max-width: 112px;
    transform: translateX(-50%);
    font-size: 9px;
  }

  body.in-room .seat.turn .seat-meta {
    border-color: #f8d46d;
    box-shadow: 0 0 0 3px rgba(248, 212, 109, 0.18), 0 0 20px rgba(248, 212, 109, 0.34);
    animation: mobileTurnPulse 1.2s ease-in-out infinite alternate;
  }

  body.in-room .seat-turn-timer {
    top: -12px;
    left: -12px;
    width: 35px;
    height: 35px;
    padding-top: 6px;
    border-width: 2px;
  }

  body.in-room .seat-turn-timer strong {
    font-size: 15px;
  }

  @keyframes mobileTurnPulse {
    to { transform: translateY(-2px); filter: brightness(1.12); }
  }

  body.in-room .seat.empty {
    width: 56px;
    min-width: 56px;
    height: 56px;
    border: 2px dashed rgba(214, 255, 237, 0.33);
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: rgba(1, 44, 36, 0.54);
  }

  body.in-room .seat.empty .empty-seat-plus {
    display: block;
    color: rgba(232, 255, 244, 0.64);
    font-size: 38px;
    font-weight: 200;
    line-height: 1;
  }

  body.in-room .seat.empty .seat-meta,
  body.in-room .seat.empty .hole-cards {
    display: none;
  }

  body.in-room .seat.seat-0 {
    left: 50% !important;
    right: auto !important;
    top: auto !important;
    bottom: calc(66px + env(safe-area-inset-bottom)) !important;
    width: 112px !important;
    min-width: 112px !important;
    max-width: 112px !important;
    transform: translateX(-50%) !important;
    z-index: 12 !important;
  }

  body.in-room .seat.seat-0:not(.empty) .seat-meta {
    min-height: 44px;
    background: rgba(1, 29, 24, 0.94);
  }

  body.in-room .seat.seat-0 .avatar {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px;
    font-size: 15px !important;
  }

  body.in-room .seat.seat-0 .seat-chips {
    display: block !important;
    font-size: 13px !important;
  }

  body.in-room .seat.seat-0 .hole-cards {
    min-height: 52px !important;
    margin-top: 4px !important;
    gap: 3px !important;
  }

  body.in-room .seat.seat-0 .card.small {
    width: 39px;
    padding: 4px;
    border-radius: 5px;
  }

  body.in-room .seat.seat-0 .card-rank {
    font-size: 13px;
  }

  body.in-room .seat.seat-0 .card-suit {
    font-size: 20px;
  }

  body.in-room .seat.seat-0 .bet-line,
  body.in-room .seat.seat-0 .seat-best {
    display: inline-block !important;
  }

  body.in-room .seat.seat-0 .seat-round-bet {
    top: -118px;
    z-index: 30;
  }

  body.in-room .seat.seat-1 {
    right: 9px !important;
    left: auto !important;
    top: auto !important;
    bottom: 23% !important;
    transform: none !important;
  }

  body.in-room .seat.seat-2 {
    right: 4px !important;
    left: auto !important;
    top: 47% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
  }

  body.in-room .seat.seat-3 {
    right: 9px !important;
    left: auto !important;
    top: 21% !important;
    bottom: auto !important;
    transform: none !important;
  }

  body.in-room .seat.seat-4 {
    left: 50% !important;
    right: auto !important;
    top: calc(68px + env(safe-area-inset-top)) !important;
    bottom: auto !important;
    transform: translateX(-50%) !important;
  }

  body.in-room .seat.seat-5 {
    left: 9px !important;
    right: auto !important;
    top: 21% !important;
    bottom: auto !important;
    transform: none !important;
  }

  body.in-room .seat.seat-6 {
    left: 4px !important;
    right: auto !important;
    top: 47% !important;
    bottom: auto !important;
    transform: translateY(-50%) !important;
  }

  body.in-room .seat.seat-7 {
    left: 9px !important;
    right: auto !important;
    top: auto !important;
    bottom: 23% !important;
    transform: none !important;
  }

  body.in-room .mobile-mini-actions {
    position: absolute;
    left: 50%;
    bottom: calc(230px + env(safe-area-inset-bottom));
    z-index: 28;
    display: block;
    width: calc(100% - 20px);
    max-width: 380px;
    padding: 0;
    border: 0;
    border-radius: 0;
    transform: translateX(-50%);
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  body.in-room .mobile-mini-actions .panel {
    padding: 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    pointer-events: none;
  }

  body.in-room .mobile-mini-actions .panel-head,
  body.in-room .mobile-mini-actions .hint,
  body.in-room .mobile-mini-actions .error {
    display: none;
  }

  body.in-room .mobile-mini-actions .actions-row {
    position: relative;
    display: flex;
    left: -10px;
    width: max-content;
    flex-wrap: nowrap;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 0 auto;
    pointer-events: auto;
  }

  body.in-room .mobile-mini-actions .actions-row .button {
    flex: 0 0 46px;
    width: 46px;
    height: 46px;
    min-height: 46px;
    padding: 3px;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-radius: 50%;
    background: linear-gradient(145deg, #1da9ff, #0575ce);
    box-shadow: 0 6px 13px rgba(0, 39, 79, 0.34), inset 0 1px rgba(255, 255, 255, 0.28);
    color: #fff;
    font-size: 10px;
    line-height: 1.15;
  }

  body.in-room .mobile-mini-actions .actions-row .button.danger {
    background: linear-gradient(145deg, #ff5c69, #d92f45);
  }

  body.in-room .mobile-mini-actions .actions-row .button.green {
    background: linear-gradient(145deg, #48d59a, #13996a);
  }

  body.in-room .mobile-mini-actions .actions-row .button.raise-toggle {
    background: linear-gradient(145deg, #2fb6ff, #0878ce);
  }

  body.in-room .mobile-mini-actions .actions-row .button.raise-toggle.active {
    border-color: #ffe18a;
    box-shadow: 0 0 0 3px rgba(255, 225, 138, 0.2), 0 7px 16px rgba(0, 39, 79, 0.38);
  }

  body.in-room .mobile-mini-actions .actions-row .button[data-action="all-in"] {
    flex-basis: 50px;
    width: 50px;
    height: 50px;
    min-height: 50px;
    background: linear-gradient(145deg, #f6bd48, #e17717);
    text-transform: uppercase;
  }

  body.in-room .mobile-mini-actions .utility-actions {
    position: absolute;
    left: 16px;
    bottom: 3px;
    z-index: 2;
    display: grid;
    gap: 7px;
    pointer-events: auto;
  }

  body.in-room .mobile-mini-actions .utility-actions .button {
    width: 42px;
    min-height: 36px;
    padding: 4px 2px;
    display: grid;
    place-items: center;
    gap: 1px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 12px;
    background: rgba(4, 44, 37, 0.94);
    color: rgba(255, 255, 255, 0.9);
    font-size: 9px;
    line-height: 1;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.28);
  }

  body.in-room .mobile-mini-actions .utility-actions .button span {
    color: #ffe18a;
    font-size: 12px;
    font-weight: 850;
  }

  body.in-room .mobile-mini-actions .actions-row .button:disabled,
  body.in-room .mobile-mini-actions .utility-actions .button:disabled {
    display: none;
  }

  body.in-room .mobile-mini-actions .actions-row:has(.button:not(:disabled)) .button:disabled {
    display: grid;
    opacity: 0.42;
    filter: saturate(0.55);
  }

  body.in-room .mobile-mini-actions .raise-row.raise-with-slider {
    position: absolute;
    right: clamp(4px, 21.5vw, 84px);
    bottom: 56px;
    width: 46px;
    height: 174px;
    margin: 0;
    padding: 7px 5px 6px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    justify-content: flex-end;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.17);
    border-radius: 15px;
    background: rgba(1, 33, 27, 0.86);
    box-shadow: 0 7px 18px rgba(0, 0, 0, 0.28);
    pointer-events: auto;
  }

  body.in-room .mobile-mini-actions .raise-row.raise-unavailable {
    display: none;
  }

  body.in-room .mobile-mini-actions .raise-slider-vertical {
    width: 100%;
    flex: 1;
    min-height: 0;
    display: grid;
    grid-template-rows: auto 1fr auto;
    place-items: center;
    gap: 1px;
  }

  body.in-room .mobile-mini-actions .raise-slider-track {
    position: relative;
    width: 28px;
    height: 64px;
    display: grid;
    place-items: center;
  }

  body.in-room .mobile-mini-actions .raise-slider {
    width: 64px;
    height: 24px;
    margin: 0;
    transform: rotate(-90deg);
  }

  body.in-room .mobile-mini-actions .raise-limit {
    color: rgba(255, 255, 255, 0.55);
    font-size: 8px;
    line-height: 1;
  }

  body.in-room .mobile-mini-actions .raise-value {
    display: flex;
    align-items: baseline;
    justify-content: center;
    color: #ffe18a;
    font-size: 9px;
  }

  body.in-room .mobile-mini-actions .raise-value .hint {
    display: none;
  }

  body.in-room .mobile-mini-actions .raise-value strong {
    font-size: 12px;
  }

  body.in-room .mobile-mini-actions .raise-row .button {
    width: 38px;
    min-height: 28px;
    padding: 0 4px;
    border: 0;
    border-radius: 9px;
    background: linear-gradient(145deg, #2fb6ff, #0878ce);
    color: #fff;
    font-size: 9px;
  }

  body.in-room .mobile-mini-actions .raise-confirm-actions {
    display: grid;
    gap: 4px;
  }

  body.in-room .mobile-mini-actions .raise-row .button.all-in-option {
    background: linear-gradient(145deg, #f6bd48, #e17717);
    font-size: 8px;
    font-weight: 850;
  }

  body.in-room .mobile-mini-actions .raise-row .button:disabled,
  body.in-room .mobile-mini-actions:has(.actions-row .button:not(:disabled)) .raise-row .button:disabled {
    display: block;
    opacity: 0.38;
  }

  body.in-room .mobile-drawer-row {
    position: fixed;
    inset: auto 0 0;
    z-index: 34;
    height: calc(56px + env(safe-area-inset-bottom));
    padding: 4px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 3px;
    background: linear-gradient(180deg, rgba(8, 14, 14, 0.88), #080c0d);
    border-top: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 0 -8px 22px rgba(0, 0, 0, 0.32);
  }

  body.in-room .mobile-drawer-btn {
    min-width: 0;
    padding: 3px 1px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: rgba(244, 255, 250, 0.82);
    font-size: 9px;
    line-height: 1.25;
  }

  body.in-room .mobile-drawer-btn::first-letter {
    font-size: 19px;
  }

  body.in-room .mobile-drawer-btn.active {
    background: rgba(59, 211, 154, 0.18);
    color: #9ff6d1;
  }

  body.in-room .mobile-overlay {
    z-index: 60;
    background: rgba(3, 10, 10, 0.7);
    backdrop-filter: blur(4px);
  }

  body.in-room .mobile-overlay-card {
    width: 100%;
    max-height: 78dvh;
    padding: 16px 12px calc(16px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    background: #151c26;
    border-color: rgba(255, 255, 255, 0.12);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.46);
  }

  body.in-room .viewer-outcome {
    position: fixed;
    left: 50%;
    top: 58%;
    z-index: 26;
    transform: translate(-50%, -50%);
    width: max-content;
    max-width: 92vw;
    border: 0;
    background: transparent;
    color: #ffe36d;
    font-size: clamp(35px, 12vw, 54px);
    font-weight: 1000;
    font-style: italic;
    text-shadow: 0 3px #8b5d00, 0 0 14px #fff7ac, 0 0 32px rgba(255, 209, 59, 0.95);
    animation: mobileWinPop 650ms cubic-bezier(.2, 1.4, .35, 1) both;
    pointer-events: none;
  }

  body.in-room .viewer-outcome.lose {
    color: rgba(242, 248, 245, 0.72);
    font-size: 30px;
    text-shadow: 0 3px rgba(0, 0, 0, 0.5);
  }

  body.in-room .viewer-outcome.draw {
    color: #d9ecff;
    font-size: 30px;
    text-shadow: 0 3px rgba(0, 0, 0, 0.45), 0 0 20px rgba(112, 184, 255, 0.65);
  }

  body.in-room .chip-flight-group {
    top: 43%;
  }

  body.in-room .chip-target-0 { --fly-x: 0px; --fly-y: 35vh; }
  body.in-room .chip-target-1 { --fly-x: 38vw; --fly-y: 24vh; }
  body.in-room .chip-target-2 { --fly-x: 39vw; --fly-y: 3vh; }
  body.in-room .chip-target-3 { --fly-x: 38vw; --fly-y: -22vh; }
  body.in-room .chip-target-4 { --fly-x: 0px; --fly-y: -34vh; }
  body.in-room .chip-target-5 { --fly-x: -38vw; --fly-y: -22vh; }
  body.in-room .chip-target-6 { --fly-x: -39vw; --fly-y: 3vh; }
  body.in-room .chip-target-7 { --fly-x: -38vw; --fly-y: 24vh; }

  @keyframes mobileWinPop {
    from { opacity: 0; transform: translate(-50%, -50%) scale(0.55) rotate(-5deg); }
    to { opacity: 1; transform: translate(-50%, -50%) scale(1) rotate(-2deg); }
  }

  body.in-room .settlement-inline {
    position: fixed;
    inset: 66px 8px 60px;
    z-index: 44;
    margin: 0;
    overflow-y: auto;
    pointer-events: none;
  }

  body.in-room .settlement-inline > * {
    pointer-events: auto;
  }

  body.in-room.rail-open .left-rail {
    display: flex !important;
    position: fixed;
    inset: 0 auto 0 0;
    z-index: 72;
    width: min(320px, 86vw);
    height: 100dvh;
    padding: calc(14px + env(safe-area-inset-top)) 12px calc(14px + env(safe-area-inset-bottom));
    overflow-y: auto;
    background: #151c26;
    border-right: 1px solid rgba(255, 255, 255, 0.13);
    box-shadow: 18px 0 46px rgba(0, 0, 0, 0.5);
  }

  body.in-room.rail-open .left-rail .rail-close {
    display: inline-flex;
  }

  body.in-room.rail-open::after {
    z-index: 68;
    background: rgba(3, 10, 10, 0.72);
    backdrop-filter: blur(3px);
  }
}
