:root {
  --font: "Outfit", ui-sans-serif, system-ui, sans-serif;
  --bg: #050505;
  --rail: #0a0a0a;
  --line: rgba(255, 255, 255, 0.07);
  --text: #f3f3f4;
  --muted: #8a8d96;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  height: 100%;
  overflow: hidden;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button {
  border: none;
  background: transparent;
  color: inherit;
  cursor: pointer;
}
a { color: inherit; text-decoration: none; }

.rp-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 34px;
  padding: 0 12px;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 550;
  border: 1px solid transparent;
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-btn-ghost {
  background: rgba(255, 255, 255, 0.04);
  border-color: rgba(255, 255, 255, 0.08);
  color: #e8e8ea;
}
.rp-btn-ghost:hover { background: rgba(255, 255, 255, 0.07); }

.cx {
  height: 100dvh;
  max-height: 100dvh;
  display: grid;
  grid-template-columns: 200px minmax(0, 1fr) 260px;
  overflow: hidden;
}

.cx-rail {
  background: var(--rail);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 16px 12px;
  overflow: hidden;
}

.cx-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 14px;
  font-size: 16px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.cx-logo {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  object-fit: cover;
  display: block;
  background: #000;
}

.cx-brand-mark {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0a0a0a;
  font-size: 10px;
  font-weight: 700;
}

.cx-head-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.balance {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  padding: 4px 10px;
  border-radius: 9px;
  background: #121214;
  border: 1px solid var(--line);
  min-width: 88px;
}

.balance-label {
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 550;
}

.balance strong {
  font-size: 14px;
  font-weight: 650;
  color: #fff;
  letter-spacing: -0.02em;
}

.cx-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.lobby-panel {
  flex: 1 1 42%;
  min-height: 120px;
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.lobby-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 550;
  padding: 0 6px;
}
.lobby-title b { color: #fff; font-weight: 650; }

.lobby-list {
  flex: 1;
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 2px;
}

.lobby-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid transparent;
}
.lobby-row.me {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
}
.lobby-row.is-speaking {
  border-color: rgba(109, 255, 176, 0.75);
  box-shadow: 0 0 0 1px rgba(109, 255, 176, 0.45);
  background: rgba(109, 255, 176, 0.08);
  animation: speak-pulse 1s ease-in-out infinite;
}
.lobby-row img,
.lobby-fallback {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}
.lobby-fallback {
  display: grid;
  place-items: center;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 10px;
  font-weight: 650;
}
.lobby-meta { min-width: 0; flex: 1; }
.lobby-name {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lobby-bal {
  font-size: 10px;
  color: var(--muted);
}

.cx-nav-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  color: #929292;
  font-size: 13px;
  text-align: left;
}
.cx-nav-item i { width: 16px; text-align: center; }
.cx-nav-item:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.cx-nav-item.is-active { background: rgba(255, 255, 255, 0.07); color: #fff; }

.cx-user {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.cx-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 12px;
  font-weight: 650;
  flex-shrink: 0;
  object-fit: cover;
}

.felt.is-locked .seats,
.felt.is-locked .dealer {
  opacity: 0.35;
  pointer-events: none;
}

.wait-overlay {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(5, 5, 5, 0.55);
  backdrop-filter: blur(2px);
}

.wait-overlay[hidden] {
  display: none;
}

.wait-panel {
  width: min(340px, 100%);
  text-align: center;
  padding: 22px 18px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #0e0e10;
}

.wait-panel img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  margin-bottom: 12px;
}

.wait-panel h2 {
  font-size: 18px;
  font-weight: 650;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}

.wait-panel p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.wait-hint {
  margin-top: 12px !important;
  color: #e8e8ea !important;
}

.wait-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 2px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.08);
}

.countdown {
  margin-top: 14px;
  font-size: 42px;
  font-weight: 700;
  letter-spacing: -0.04em;
  color: #fff;
}

#overlay-link a {
  color: #fff;
  word-break: break-all;
  font-size: 12px;
}

.msg.dealer {
  border-color: rgba(255, 255, 255, 0.18);
  background: #1a1a1c;
}

.seat.won {
  border-color: rgba(255, 255, 255, 0.45);
}
.seat.lost {
  opacity: 0.72;
}

.msg.system strong {
  color: var(--muted);
}

.chip:disabled,
.mode-btn:disabled,
.rp-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cx-user-meta { min-width: 0; flex: 1; }
.cx-user-name { font-size: 12.5px; font-weight: 550; }
.cx-user-status { color: var(--muted); font-size: 11px; }

.cx-logout {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.cx-logout:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }

.cx-main {
  height: 100%;
  min-height: 0;
  padding: 14px 16px 14px;
  background: #070707;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: hidden;
}

.cx-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-shrink: 0;
}

.cx-head-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.cx-head h1 {
  font-size: 20px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.bj-bar {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.bj-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border-radius: 8px;
  background: #121214;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 550;
}
.bj-pill.muted { color: var(--muted); font-weight: 450; }
.bj-pill.muted b,
.bj-pill b { color: #fff; font-weight: 600; }
.bj-pill.live {
  color: #e8e8ea;
  border-color: rgba(255, 255, 255, 0.14);
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fff;
}

.bj-shell {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.felt {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #141416 0%, #0c0c0e 100%);
  border: 1px solid var(--line);
}

.table-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, 0.04), transparent 55%),
    linear-gradient(180deg, #121214 0%, #080808 100%);
  border: 1px solid var(--line);
}

.table-rail {
  flex: 1;
  min-height: 0;
  margin: 10px;
  padding: 14px;
  border-radius: 28px;
  background:
    linear-gradient(160deg, #7a4a28 0%, #4a2a14 45%, #2d180c 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 220, 170, 0.25),
    0 18px 40px rgba(0, 0, 0, 0.45);
  display: flex;
}

.table-felt {
  position: relative;
  flex: 1;
  min-height: 0;
  border-radius: inherit;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(70, 180, 110, 0.35), transparent 50%),
    radial-gradient(ellipse at 50% 100%, rgba(0, 0, 0, 0.28), transparent 55%),
    linear-gradient(180deg, #1a7a42 0%, #0f5a30 48%, #0a4022 100%);
  border: 2px solid rgba(212, 175, 90, 0.35);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25);
}

.table-arc,
.table-insurance {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(245, 220, 140, 0.55);
  font-weight: 650;
  white-space: nowrap;
}

.table-arc {
  top: 38%;
  font-size: clamp(10px, 1.4vw, 13px);
}

.table-insurance {
  top: 46%;
  font-size: clamp(8px, 1.1vw, 11px);
  letter-spacing: 0.14em;
  color: rgba(245, 220, 140, 0.32);
}

.turn-overlay {
  position: absolute;
  inset: 0;
  z-index: 8;
  display: grid;
  place-items: center;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  padding: 20px;
}

.turn-overlay[hidden] {
  display: none !important;
}

.turn-panel {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 22px 28px 20px;
  border-radius: 16px;
  background: linear-gradient(180deg, #1a1a1d 0%, #101012 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.45);
  min-width: min(320px, 92vw);
  animation: turn-in 0.28s ease-out;
}

@keyframes turn-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.97);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.turn-label {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}

.turn-hand {
  display: flex;
  gap: 8px;
  min-height: 72px;
  align-items: flex-end;
  justify-content: center;
}

.turn-total {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  line-height: 1;
}

.turn-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
  width: 100%;
}

.turn-btn {
  flex: 1;
  justify-content: center;
  min-height: 44px;
  font-size: 15px;
  font-weight: 650;
  border-radius: 10px;
}

.turn-btn.hit {
  background: #f2f2f4;
  color: #0a0a0a;
  border: 1px solid #f2f2f4;
}

.turn-btn.hit:hover {
  background: #fff;
}

.turn-btn.stand {
  background: transparent;
  color: #f2f2f4;
  border: 1px solid rgba(255, 255, 255, 0.22);
}

.turn-btn.stand:hover {
  background: rgba(255, 255, 255, 0.06);
}

.turn-btn.double {
  background: rgba(245, 220, 140, 0.18);
  color: #f5e6b8;
  border: 1px solid rgba(245, 220, 140, 0.55);
  font-weight: 700;
}

.turn-btn.double:hover:not(:disabled) {
  background: rgba(245, 220, 140, 0.28);
}

.turn-btn.double:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.turn-btn.double[hidden] {
  display: none !important;
}

.dealer {
  margin: 8px auto 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.dealer-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding-top: 12px;
  flex-shrink: 0;
  z-index: 1;
}

.ai-dealer {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  max-width: min(420px, 92%);
}

.dealer-face {
  width: 72px;
  height: 72px;
  border-radius: 10px;
  object-fit: cover;
  border: 2px solid rgba(245, 220, 140, 0.45);
  background: #111;
  flex-shrink: 0;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.35);
}

.speech-bubble {
  position: relative;
  flex: 1;
  min-width: 0;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(10, 14, 12, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.12);
  backdrop-filter: blur(6px);
}

.speech-bubble::before {
  content: "";
  position: absolute;
  left: -6px;
  top: 22px;
  width: 10px;
  height: 10px;
  background: rgba(10, 14, 12, 0.82);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
  transform: rotate(45deg);
}

.speech-bubble p {
  font-size: 13px;
  line-height: 1.35;
  color: #e8e8ea;
}

.countdown-ring {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  border: 2px solid rgba(245, 220, 140, 0.45);
  display: grid;
  place-items: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: #fff;
  background: rgba(0, 0, 0, 0.35);
}
.countdown-ring[hidden] {
  display: none !important;
}

.dealer .hand {
  display: flex;
  gap: 5px;
  min-height: 48px;
  align-items: flex-end;
}

.dealer .total {
  font-size: 13px;
  font-weight: 650;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
}

.seats {
  margin-top: auto;
  padding: 8px 10px 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  flex-shrink: 0;
}

.seats-board {
  gap: 8px;
  padding: 8px 16px 14px;
  z-index: 1;
}

.seats-sm {
  gap: 5px;
  padding: 6px;
}

.seats-sm .seat {
  padding: 6px 4px;
  min-height: 0;
}

.seat {
  min-height: 108px;
  padding: 7px 5px 6px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(0, 0, 0, 0.22);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}
.seat:hover {
  background: rgba(0, 0, 0, 0.32);
  transform: translateY(-1px);
}
.seat.empty {
  border-style: dashed;
  border-color: rgba(245, 220, 140, 0.28);
}
.seat.mine {
  border-color: rgba(245, 220, 140, 0.7);
  background: rgba(0, 0, 0, 0.36);
  box-shadow: 0 0 0 1px rgba(245, 220, 140, 0.18);
}
.seat.turn {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.seat.turn .avatar-sm { box-shadow: 0 0 0 2px #fff; }
.seat.empty .avatar-sm { opacity: 0.4; border-style: dashed; }
.seat.empty .seat-name { color: rgba(255, 255, 255, 0.35); }
.seat.won .main-bet { border-color: rgba(120, 255, 170, 0.55); color: #b8ffd4; }
.seat.lost .main-bet { border-color: rgba(255, 120, 120, 0.45); color: #ffc0c0; }
.seat.is-speaking {
  border-color: #6dffb0;
  box-shadow:
    0 0 0 2px rgba(109, 255, 176, 0.55),
    0 0 14px rgba(109, 255, 176, 0.28);
  animation: speak-pulse 1s ease-in-out infinite;
}

.seat-hand {
  display: flex;
  gap: 4px;
  min-height: 46px;
  align-items: flex-end;
  justify-content: center;
  flex: 1;
}

.seat-total {
  min-height: 14px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.main-bet {
  min-width: 40px;
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid rgba(245, 220, 140, 0.35);
  background: linear-gradient(180deg, #2a2a2e, #121214);
  display: grid;
  place-items: center;
  font-size: 10px;
  font-weight: 650;
  color: #f5e6b8;
}

.behind {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 16px;
  font-size: 10px;
  color: var(--muted);
}

.behind-count {
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-weight: 650;
  font-size: 9px;
}

.behind-sum { color: #e8e8ea; font-weight: 550; }
.behind-label {
  opacity: 0.5;
  font-size: 9px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.avatar-sm {
  width: 24px;
  height: 24px;
  border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: #18181b;
  display: grid;
  place-items: center;
  font-size: 9px;
  font-weight: 650;
  overflow: hidden;
  flex-shrink: 0;
}
.avatar-sm img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.seat-name {
  max-width: 100%;
  font-size: 10px;
  font-weight: 550;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.card {
  width: 40px;
  height: 56px;
  border-radius: 5px;
  background: linear-gradient(180deg, #fff 0%, #f0f0f2 100%);
  color: #121212;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 4px 5px;
  font-size: 12px;
  font-weight: 700;
  border: 1px solid rgba(0, 0, 0, 0.08);
  transform-origin: top center;
  flex-shrink: 0;
  line-height: 1;
}
.card.red { color: #c1121f; }
.card.sm {
  width: 34px;
  height: 48px;
  font-size: 11px;
  padding: 3px 4px;
  border-radius: 4px;
}
.card.back {
  background:
    repeating-linear-gradient(
      45deg,
      #1d2a55 0 5px,
      #24336a 5px 10px
    );
  color: transparent;
  border: 1px solid rgba(255, 255, 255, 0.18);
}
.card .suit { align-self: flex-end; font-size: 1.05em; }

.turn-hand .card {
  width: 64px;
  height: 90px;
  font-size: 18px;
}

.card.deal {
  animation: deal-card 0.45s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes deal-card {
  from {
    opacity: 0;
    transform: translateY(-42px) rotate(-12deg) scale(0.85);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@media (max-width: 980px) {
  .table-rail {
    border-radius: 18px;
    margin: 8px;
    padding: 10px;
  }
  .table-arc,
  .table-insurance {
    display: none;
  }
  .card {
    width: 36px;
    height: 50px;
    font-size: 11px;
  }
  .seat {
    min-height: 96px;
    padding: 6px 3px;
  }
}

.admin-float {
  position: fixed;
  z-index: 80;
  top: 72px;
  left: 220px;
  width: min(420px, calc(100vw - 24px));
  max-height: min(72vh, 640px);
  padding: 12px;
  border-radius: 14px;
  background: rgba(14, 14, 16, 0.96);
  border: 1px solid rgba(245, 220, 140, 0.32);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow: auto;
  backdrop-filter: blur(10px);
}
.admin-float[hidden] { display: none !important; }
.admin-float.is-dragging {
  opacity: 0.92;
  user-select: none;
}
.admin-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  cursor: grab;
  padding: 2px 0 4px;
  touch-action: none;
}
.admin-head:active { cursor: grabbing; }
.admin-drag-hint {
  flex: 1;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.admin-money {
  display: grid;
  grid-template-columns: 1fr 72px auto auto;
  gap: 8px;
}
.admin-money input {
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  color: #fff;
  padding: 0 10px;
}
.admin-online-block {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.02);
  display: flex;
  flex-direction: column;
  min-height: 160px;
  max-height: 280px;
  overflow: hidden;
}
.admin-block-title {
  padding: 8px 10px;
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.admin-block-title b { color: #fff; }
.admin-list {
  overflow: auto;
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.admin-person {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}
.admin-person img,
.admin-person .fb {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.admin-person .fb {
  display: grid;
  place-items: center;
  background: #1a1a1a;
  font-size: 10px;
  font-weight: 650;
}
.admin-person .meta { min-width: 0; flex: 1; }
.admin-person .nm {
  font-size: 12px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.admin-person .bal {
  font-size: 10px;
  color: var(--muted);
}
.admin-person .kick,
.admin-person .speak-btn {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  font-size: 11px;
  cursor: pointer;
}
.admin-person .kick {
  background: rgba(255, 80, 80, 0.12);
  border: 1px solid rgba(255, 80, 80, 0.35);
  color: #ffb4b4;
}
.admin-person .speak-btn {
  background: rgba(80, 200, 120, 0.12);
  border: 1px solid rgba(80, 200, 120, 0.4);
  color: #b8f0c8;
}
.admin-person .speak-btn.on {
  background: rgba(255, 180, 80, 0.12);
  border: 1px solid rgba(255, 180, 80, 0.4);
  color: #ffd9a8;
}
#playerSpeakBtn.live {
  border-color: rgba(80, 200, 120, 0.55);
  color: #b8f0c8;
}
.admin-person .rank {
  width: 18px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.admin-hint {
  font-size: 11px;
  color: var(--muted);
}
.admin-hint code { color: #f5e6b8; }

.cx-rail .leaderboard-panel {
  flex: 1 1 42%;
  min-height: 120px;
  margin-top: 10px;
  margin-bottom: 10px;
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.leaderboard-title {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 550;
  padding: 0 4px;
  flex-shrink: 0;
}
.leaderboard-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 0;
  flex: 1;
  overflow: auto;
}
.lb-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 6px;
  border-radius: 8px;
}
.lb-row .rank {
  width: 18px;
  font-size: 11px;
  color: var(--muted);
  font-weight: 650;
}
.lb-row img,
.lb-row .fb {
  width: 20px;
  height: 20px;
  border-radius: 5px;
  object-fit: cover;
}
.lb-row .fb {
  display: grid;
  place-items: center;
  background: #1a1a1a;
  font-size: 9px;
  font-weight: 650;
}
.lb-row .nm {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.lb-row .bal {
  font-size: 12px;
  font-weight: 650;
  color: #f5e6b8;
}

#micBtn.live {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}
.dealer-face.live {
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}

@media (max-width: 900px) {
  .admin-cols { grid-template-columns: 1fr; }
  .admin-money { grid-template-columns: 1fr 1fr; }
}

@keyframes speak-pulse {
  0%, 100% { box-shadow: 0 0 0 2px rgba(109, 255, 176, 0.45), 0 0 10px rgba(109, 255, 176, 0.18); }
  50% { box-shadow: 0 0 0 3px rgba(109, 255, 176, 0.75), 0 0 16px rgba(109, 255, 176, 0.35); }
}

.dealer-face.is-speaking {
  border-color: #6dffb0;
  box-shadow: 0 0 0 3px rgba(109, 255, 176, 0.65), 0 0 20px rgba(109, 255, 176, 0.35);
  animation: speak-pulse 1s ease-in-out infinite;
}

.listen-bar {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #121214;
  border: 1px solid rgba(245, 220, 140, 0.28);
  margin-bottom: 8px;
}
.listen-bar[hidden] { display: none !important; }
.listen-status {
  font-size: 12px;
  color: var(--muted);
}

.bet-bar {
  flex-shrink: 0;
  display: flex;
  flex-wrap: nowrap;
  gap: 10px;
  align-items: center;
  padding: 8px 10px;
  border-radius: 10px;
  background: #121214;
  border: 1px solid var(--line);
}

.bet-mode {
  display: flex;
  gap: 4px;
  padding: 3px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--line);
  flex-shrink: 0;
}

.mode-btn {
  height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 550;
  color: var(--muted);
}
.mode-btn.is-active {
  background: #fff;
  color: #0a0a0a;
}

.chip-row {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.chip {
  height: 28px;
  min-width: 40px;
  padding: 0 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 650;
  color: #fff;
  background: #1a1a1a;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.chip.active {
  background: #fff;
  color: #0a0a0a;
  border-color: #fff;
}

.bet-hint {
  margin-left: auto;
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.cx-chat {
  display: flex;
  flex-direction: column;
  border-left: 1px solid var(--line);
  background: var(--rail);
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.cx-chat-head {
  padding: 14px 14px 10px;
  border-bottom: 1px solid var(--line);
  flex-shrink: 0;
}

.cx-chat-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 550;
}
.cx-chat-title i { color: #929292; }

.cx-chat-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cx-chat-empty {
  margin: auto;
  text-align: center;
  color: #6d7078;
  font-size: 13px;
}

.msg {
  padding: 8px 10px;
  border-radius: 9px;
  background: #121214;
  border: 1px solid var(--line);
}
.msg strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  margin-bottom: 2px;
}
.msg span {
  font-size: 13px;
  line-height: 1.35;
  color: #e8e8ea;
}

.cx-chat-form {
  display: flex;
  gap: 7px;
  padding: 10px 12px 12px;
  border-top: 1px solid var(--line);
  flex-shrink: 0;
}

.cx-chat-form input {
  flex: 1;
  height: 36px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px;
  background: #101012;
  color: #fff;
  padding: 0 11px;
  outline: none;
  min-width: 0;
}
.cx-chat-form input:focus { border-color: rgba(255, 255, 255, 0.28); }

.cx-send {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  color: #0a0a0a;
  flex-shrink: 0;
}

@media (max-width: 1100px) {
  .cx { grid-template-columns: 72px minmax(0, 1fr); }
  .cx-chat,
  .cx-brand span:not(.cx-logo),
  .cx-nav-item span,
  .cx-user-meta,
  .leaderboard-panel,
  .lobby-title { display: none; }
  .cx-nav-item { justify-content: center; }
  .cx-user { justify-content: center; }
  .bet-hint { display: none; }
  .lobby-panel { flex: 1; }
}

@media (max-width: 720px) {
  .cx { grid-template-columns: 1fr; }
  .cx-rail { display: none; }
  .seats { gap: 5px; padding: 8px; }
  .seat { padding: 6px 3px 8px; }
}

.view {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lobby-head { flex-shrink: 0; }
.lobby-copy {
  color: var(--muted);
  font-size: 13px;
}
.lobby-copy b { color: #fff; font-weight: 600; }

.lobby-empty {
  color: var(--muted);
  font-size: 13px;
  padding: 24px 8px;
  text-align: center;
}

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  overflow: auto;
  min-height: 0;
  padding-bottom: 4px;
}

.table-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #121214;
  text-align: left;
  color: inherit;
}
.table-card:hover { background: #18181b; border-color: rgba(255,255,255,0.16); }
.table-card strong {
  font-size: 15px;
  letter-spacing: 0.04em;
}
.table-card span { font-size: 12px; color: var(--muted); }
.table-card .muted { font-size: 11px; }

.ranks-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow: auto;
  min-height: 0;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #121214;
  border: 1px solid var(--line);
}
.rank-row img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.rank-pos {
  width: 28px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 650;
}
.rank-name {
  flex: 1;
  min-width: 0;
  font-size: 13px;
  font-weight: 550;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-bal { font-size: 13px; font-weight: 650; }

.felt-sm { min-height: 0; }

.cx-chat { position: relative; }

.cmd-menu {
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 58px;
  max-height: 220px;
  overflow: auto;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: #0e0e10;
  z-index: 8;
  display: flex;
  flex-direction: column;
  padding: 4px;
}

.cmd-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 8px;
  text-align: left;
  color: inherit;
}
.cmd-item:hover { background: rgba(255,255,255,0.06); }
.cmd-item code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: #fff;
}
.cmd-item span {
  font-size: 11px;
  color: var(--muted);
}

.msg a {
  color: #fff;
  text-decoration: underline;
  word-break: break-all;
}

.cx-chat-empty code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.08);
}
