:root {
  color-scheme: dark;
  --bg: #0f1217;
  --panel: #171c24;
  --panel-2: #202733;
  --panel-3: #12161d;
  --line: rgba(255, 255, 255, 0.12);
  --text: #f3f6fa;
  --muted: #a8b2c0;
  --accent: #d8ad45;
  --green: #49d17d;
  --blue: #53a7ff;
  --yellow: #f0b94c;
  --red: #ff6464;
  --gray: #7c8797;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
}

body {
  background: var(--bg);
  color: var(--text);
  font-size: 13px;
}

a {
  color: var(--accent);
}

.shell {
  width: min(1320px, calc(100vw - 24px));
  height: 100dvh;
  margin: 0 auto;
  padding: 12px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.panel,
.topbar {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.24);
}

.panel {
  padding: 12px;
}

.fixed-panel {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.login-window {
  width: min(420px, calc(100vw - 32px));
  margin: auto;
  padding: 20px;
}

.app-header {
  flex: 0 0 72px;
  min-height: 72px;
  padding: 10px 12px;
  display: grid;
  grid-template-columns: minmax(200px, 1fr) auto auto auto;
  gap: 8px;
  align-items: center;
}

.brand-block h1,
h1 {
  margin: 0;
  font-size: 1.28rem;
  line-height: 1.1;
  letter-spacing: 0;
}

h2 {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.1;
  letter-spacing: 0;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.lede,
.muted {
  color: var(--muted);
}

.nav-actions,
.user-chip,
.panel-title,
.chat-input-row,
.list-row,
.table-actions,
.table-actions form,
.form-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

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

.nav-actions form {
  margin: 0;
}

.user-chip {
  min-width: 170px;
  justify-content: center;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-2);
}

.panel-title {
  flex: 0 0 28px;
  justify-content: space-between;
  margin-bottom: 8px;
}

.dashboard-grid {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  gap: 12px;
  overflow: hidden;
}

.lobby-grid {
  grid-template-columns: minmax(0, 1fr) 330px;
}

.lobby-main-stack {
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-rows: minmax(0, 1.35fr) minmax(150px, 0.85fr) minmax(150px, 0.85fr);
  gap: 12px;
  overflow: hidden;
}

.players-panel {
  min-width: 0;
}

.admin-grid {
  grid-template-columns: minmax(520px, 1.55fr) minmax(260px, 0.75fr) minmax(310px, 1fr);
  grid-template-rows: minmax(0, 1fr) minmax(0, 1fr);
}

.users-management {
  grid-row: 1 / span 2;
}

.player-profiles-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
}

.profile-editor-grid {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(180px, 0.85fr) minmax(240px, 1.15fr);
  gap: 12px;
  overflow: hidden;
}

.profile-list-wrap,
.profile-edit-form {
  min-height: 0;
}

.profile-list-wrap {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 7px;
}

.profile-listbox {
  min-height: 0;
  height: 100%;
  overflow: auto;
}

.profile-listbox option {
  padding: 7px 8px;
}

.profile-listbox option:checked {
  background: var(--accent);
  color: #17140c;
}

.profile-edit-form {
  align-content: start;
  overflow: auto;
  padding-right: 4px;
}

.profile-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 7px;
}

.start-room-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.start-room-panel {
  width: min(460px, calc(100vw - 32px));
  height: 360px;
}

.scroll-box {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
}

.compact-list,
.chat-scroll {
  list-style: none;
  margin: 0;
  padding: 6px;
}

.compact-list {
  display: grid;
  align-content: start;
  gap: 5px;
}

.list-row {
  min-width: 0;
  min-height: 30px;
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.035);
}

.action-row {
  align-items: center;
  gap: 5px;
}

.row-main {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.empty-row {
  color: var(--muted);
}

.room-open {
  border-color: rgba(73, 209, 125, 0.28);
  box-shadow: inset 3px 0 0 rgba(73, 209, 125, 0.55);
}

.room-closed {
  color: var(--muted);
  border-color: rgba(124, 135, 151, 0.22);
}

.status-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--gray);
  flex: 0 0 auto;
}

.status-dot.online {
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(73, 209, 125, 0.12);
}

.status-dot.offline {
  background: var(--gray);
}

.status-dot.blocked {
  background: var(--red);
  box-shadow: 0 0 0 3px rgba(255, 100, 100, 0.12);
}

.pill,
.role-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: 20px;
  max-width: 92px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  padding: 0 8px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.compact-list .role-badge {
  max-width: 74px;
  padding: 0 6px;
  font-size: 0.68rem;
}

.role-badge.admin,
.pill.yellow {
  color: #1f1604;
  background: var(--yellow);
  border-color: transparent;
}

.status-label {
  flex: 0 0 auto;
  min-width: 42px;
  text-align: center;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 0.68rem;
  font-weight: 800;
  white-space: nowrap;
}

.status-label.open {
  color: #041407;
  background: rgba(73, 209, 125, 0.92);
}

.action-row .status-label {
  min-width: 36px;
  padding: 2px 5px;
}

.compact-list .muted {
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 0.72rem;
}

.status-label.closed {
  color: #111318;
  background: rgba(124, 135, 151, 0.95);
}

.pill.green {
  color: #031407;
  background: var(--green);
  border-color: transparent;
}

.pill.gray {
  color: #111318;
  background: var(--gray);
  border-color: transparent;
}

.chat-scroll {
  display: grid;
  align-content: start;
  gap: 6px;
}

.chat-scroll li {
  display: grid;
  grid-template-columns: 64px minmax(64px, 96px) minmax(0, 1fr);
  gap: 8px;
  align-items: baseline;
  padding: 6px 8px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.04);
}

.chat-scroll strong,
.chat-scroll span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.chat-time {
  color: var(--muted);
  font-size: 0.72rem;
}

.chat-input-row {
  flex: 0 0 auto;
  padding-top: 8px;
}

.chat-input-row input {
  flex: 1 1 auto;
  min-width: 0;
}

.form-stack {
  display: grid;
  gap: 10px;
}

.compact-form {
  gap: 8px;
}

.form-actions {
  justify-content: flex-start;
  flex-wrap: wrap;
}

label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
}

input,
select {
  width: 100%;
  min-height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 5px;
  background: var(--panel-2);
  color: var(--text);
  font: inherit;
  padding: 7px 9px;
}

button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 0;
  border-radius: 5px;
  background: var(--accent);
  color: #17140c;
  cursor: pointer;
  font: inherit;
  font-weight: 800;
  padding: 0 12px;
  text-decoration: none;
  white-space: nowrap;
}

.compact-button {
  min-height: 28px;
  padding: 0 8px;
}

.secondary {
  background: #343d4b;
  color: var(--text);
}

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

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

.error,
.notice {
  flex: 0 0 auto;
  margin: 0;
  border-radius: 6px;
  padding: 8px 10px;
}

.error {
  border: 1px solid rgba(255, 100, 100, 0.45);
  background: rgba(255, 100, 100, 0.12);
  color: var(--red);
}

.notice {
  border: 1px solid rgba(216, 173, 69, 0.45);
  background: rgba(216, 173, 69, 0.12);
  color: var(--accent);
}

.table-scroll {
  padding: 0;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.78rem;
}

thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #202733;
}

th,
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding: 7px;
  text-align: left;
  vertical-align: top;
}

.table-actions {
  align-items: stretch;
  flex-wrap: wrap;
}

.table-actions form {
  align-items: stretch;
}

.table-actions input,
.table-actions select {
  width: 118px;
  min-height: 30px;
}

.statusbar {
  display: none;
}

.poker-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 330px;
  gap: 12px;
  overflow: hidden;
}

.poker-table-panel,
.poker-controls-panel {
  min-height: 0;
}

.green-table {
  flex: 1 1 auto;
  min-height: 0;
  aspect-ratio: 1.82 / 1;
  position: relative;
  border-radius: 999px;
  border: 18px solid #5b3417;
  background:
    radial-gradient(ellipse at center, rgba(255, 255, 255, 0.16), transparent 34%),
    radial-gradient(ellipse at center, #1faf61 0%, #107b43 58%, #064727 100%);
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.08),
    inset 0 0 44px rgba(0, 0, 0, 0.42),
    0 18px 44px rgba(0, 0, 0, 0.42);
  overflow: visible;
  margin: 22px 70px 30px;
}

.hand-history-top-button {
  padding: 5px 9px;
  font-size: 0.68rem;
  min-height: 28px;
  white-space: nowrap;
}

.hand-history-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 9, 14, 0.72);
}

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

.hand-history-tool {
  width: min(1180px, 96vw);
  max-height: 90vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #101820;
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.58);
  padding: 14px;
}

.hand-history-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.hand-history-tabs button {
  min-height: 30px;
  padding: 6px 10px;
  font-size: 0.72rem;
}

.hand-history-tabs button.active {
  border-color: rgba(57, 242, 138, 0.7);
  color: #dbffe9;
}

.hand-history-content {
  min-height: 0;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 12px;
}

.history-metrics,
.history-player-grid,
.history-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.history-metrics div,
.history-player-grid li,
.history-columns section,
.history-hand-list li,
.history-compact-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
}

.history-metrics span,
.history-hand-list span,
.history-player-grid span,
.history-compact-list span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.history-hand-list,
.history-compact-list,
.history-player-grid,
.history-columns ul {
  list-style: none;
  padding: 0;
  margin: 10px 0 0;
}

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

.history-cards {
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
}

.compare-controls,
.compare-player-picks {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0;
}

.compare-controls label,
.compare-player-picks label,
.compare-summary article {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 7px 9px;
}

.compare-summary,
.compare-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 8px;
}

.compare-summary article span {
  display: block;
  color: var(--muted);
  font-size: 0.72rem;
}

.compare-chart {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  padding: 8px;
}

.compare-bar-row {
  display: grid;
  grid-template-columns: 70px 1fr 64px;
  gap: 6px;
  align-items: center;
  font-size: 0.7rem;
}

.compare-bar-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
}

.compare-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #39f28a;
}

.compare-bar-track i.negative {
  background: #ff6b6b;
}

.poker-shell,
.green-table,
.seat-grid,
.poker-seat,
.player-icon,
.card {
  -webkit-user-select: none;
  user-select: none;
}

.green-table.timer-green {
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.08),
    inset 0 0 44px rgba(0, 0, 0, 0.42),
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(41, 214, 122, 0.2);
}

.green-table.timer-yellow {
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.08),
    inset 0 0 44px rgba(0, 0, 0, 0.42),
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 28px rgba(240, 185, 76, 0.35);
}

.green-table.timer-red {
  box-shadow:
    inset 0 0 0 5px rgba(255, 255, 255, 0.08),
    inset 0 0 44px rgba(0, 0, 0, 0.42),
    0 18px 44px rgba(0, 0, 0, 0.42),
    0 0 32px rgba(255, 90, 90, 0.4);
}

.table-center {
  position: absolute;
  inset: 32% 16%;
  display: grid;
  grid-template-columns: 360px 92px 100px 78px;
  gap: 8px;
  align-items: stretch;
}

.hand-result-banner {
  position: absolute;
  left: auto;
  right: 16px;
  top: 54px;
  bottom: auto;
  z-index: 9;
  width: min(340px, calc(100% - 32px));
  min-height: 0;
  max-height: 92px;
  transform: none;
  display: grid;
  overflow: hidden;
  border: 1px solid rgba(57, 242, 138, 0.45);
  border-radius: 8px;
  background: rgba(8, 16, 12, 0.9);
  color: #dbffe9;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.15;
  text-align: left;
  padding: 8px 10px;
  box-shadow: 0 8px 28px rgba(0,0,0,.35);
}

.result-panel {
  display: grid;
  gap: 5px;
  width: 100%;
}

.result-topline,
.result-meta,
.result-message,
.result-best-hand,
.result-sections h3,
.result-row {
  min-width: 0;
}

.result-topline {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-size: 0.9rem;
}

.result-topline strong {
  color: #8cf2b7;
  font-size: 1rem;
}

.result-pot-won {
  margin-left: auto;
  color: #ffd966;
  font-size: 1rem;
}

.result-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
}

.result-message {
  color: #effcf4;
  font-size: 0.92rem;
}

.result-best-hand {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.result-card {
  display: inline-flex;
}

.result-best-hand .card {
  width: 32px;
  height: 45px;
  min-width: 32px;
  min-height: 45px;
  font-size: 0.74rem;
}

.result-best-hand .card i {
  font-size: 0.86rem;
}

.result-pot-lines,
.result-notes {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 10px;
  color: #dbe6f2;
  font-size: 0.68rem;
  line-height: 1.15;
}

.result-notes {
  color: var(--muted);
}

.result-sections {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.result-sections section {
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.03);
  padding: 8px;
}

.result-sections h3 {
  margin: 0 0 6px;
  color: #c9fbe0;
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0;
}

.result-sections ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 5px;
}

.result-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 8px;
  align-items: center;
  font-size: 0.75rem;
}

.result-row span {
  min-width: 0;
}

.result-row .result-name {
  font-weight: 900;
  color: #fff;
}

.result-row .result-hand,
.result-row .result-amount {
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.result-row.muted-row {
  color: var(--muted);
  grid-template-columns: minmax(0, 1fr) auto;
}

.poker-seat.open-seat-pulse .player-icon {
  animation: openSeatPulse 1.45s ease-in-out infinite;
  border-color: rgba(57, 242, 138, 0.72);
}

.poker-seat.setup-seat-selected .player-icon {
  border-color: rgba(78, 166, 255, 0.98);
  box-shadow: 0 0 0 3px rgba(78, 166, 255, 0.45), 0 0 22px rgba(78, 166, 255, 0.55);
}

.poker-seat.setup-seat-selected::after {
  content: "SETUP";
  position: absolute;
  left: 50%;
  top: -12px;
  transform: translateX(-50%);
  min-width: 48px;
  border: 1px solid rgba(255, 217, 77, 0.75);
  border-radius: 999px;
  background: rgba(20, 18, 6, 0.92);
  color: #ffe680;
  font-size: 0.58rem;
  font-weight: 1000;
  text-align: center;
  letter-spacing: 0;
  padding: 2px 6px;
  pointer-events: none;
}

.poker-seat.bot-seat .player-icon {
  border-color: rgba(255, 189, 89, 0.82);
}

@keyframes openSeatPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(57, 242, 138, 0.05); }
  45% { box-shadow: 0 0 0 8px rgba(57, 242, 138, 0.22); }
}

.hand-result-banner[hidden] {
  display: none;
}

.poker-controls-panel .hand-result-banner {
  position: static;
  inset: auto;
  width: 100%;
  max-height: none;
  transform: none;
  margin: 8px 0 10px;
  padding: 8px;
  font-size: 0.76rem;
}

.poker-controls-panel .result-topline {
  font-size: 0.84rem;
}

.poker-controls-panel .result-topline strong,
.poker-controls-panel .result-pot-won {
  font-size: 0.92rem;
}

.poker-controls-panel .result-best-hand .card {
  width: 34px;
  height: 46px;
  min-width: 34px;
  min-height: 46px;
}

.community,
.pot-box,
.blind-box,
.timer-box {
  min-width: 0;
  height: 104px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  padding: 10px;
}

.pot-box,
.blind-box,
.timer-box {
  display: grid;
  place-items: center;
  align-content: center;
  position: relative;
}

.pot-breakdown {
  width: 100%;
  max-height: 34px;
  margin-top: 2px;
  display: grid;
  gap: 2px;
  overflow: hidden;
  color: #d7f6e3;
  font-size: 0.52rem;
  font-weight: 850;
  line-height: 1.05;
}

.pot-breakdown span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pot-breakdown b {
  color: #39f28a;
}

.pot-breakdown i {
  color: var(--muted);
  font-style: normal;
}

.community {
  width: 360px;
  overflow: hidden;
}

.pot-box span,
.blind-box span,
.timer-box span,
.mini-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.pot-box strong,
.blind-box strong,
.timer-box strong {
  display: inline-grid;
  place-items: center;
  min-width: 58px;
  height: 30px;
  font-size: 1.24rem;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.timer-box {
  width: 70px;
}

.blind-box {
  width: 92px;
}

.blind-box strong {
  min-width: 70px;
  font-size: 0.9rem;
  color: #f7fbff;
}

.timer-box strong {
  min-width: 46px;
  height: 24px;
  font-size: 1rem;
}

.pot-box strong {
  color: #28e37a;
  text-shadow: 0 0 14px rgba(40, 227, 122, 0.28);
}

.pot-plus {
  position: absolute;
  top: 4px;
  right: 8px;
  color: #39f28a;
  font-weight: 900;
  font-size: 0.9rem;
  text-shadow: 0 0 12px rgba(57, 242, 138, 0.45);
  opacity: 1;
  transform: translateY(0);
  transition: opacity 0.4s ease, transform 0.4s ease;
}

.pot-plus.fade {
  opacity: 0;
  transform: translateY(-10px);
}

.cards {
  display: flex;
  gap: 6px;
  margin-top: 8px;
  flex-wrap: nowrap;
}

.community .cards {
  width: 330px;
  height: 80px;
  display: grid;
  grid-template-columns: repeat(5, 62px);
  gap: 5px;
  align-items: center;
}

.board-card-slot {
  width: 62px;
  height: 80px;
  display: grid;
  place-items: center;
}

.board-card-slot .card {
  margin: 0;
}

.board-card-slot.board-card-visible .card {
  animation: boardReveal 0.42s ease-out both;
}

.board-empty {
  border-style: dashed;
  background: rgba(255, 255, 255, 0.09);
  color: transparent;
}

.card {
  width: 58px;
  height: 80px;
  min-width: 58px;
  min-height: 80px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: #f8fafc;
  color: #12161d;
  display: grid;
  place-items: center;
  font-weight: 900;
  position: relative;
  align-content: space-between;
  padding: 4px;
  line-height: 1;
  font-size: 1rem;
}

.card.red {
  color: #c5162e;
}

.card.black {
  color: #12161d;
}

.card i {
  font-style: normal;
  font-size: 1.32rem;
}

.card.card-back {
  background:
    radial-gradient(circle at 50% 50%, rgba(255,255,255,.16), transparent 34%),
    repeating-linear-gradient(45deg, #1d4d9f, #1d4d9f 7px, #15366f 7px, #15366f 14px);
  color: transparent;
}

.poker-seat.folded-seat .cards,
.poker-seat.mucked-seat .cards {
  transform: rotate(-5deg);
  opacity: 0.78;
}

.poker-seat.mucked-seat .card:not(.card-back) {
  filter: grayscale(0.7);
}

@keyframes boardReveal {
  0% {
    opacity: 0;
    transform: translateY(-10px) rotateY(72deg) scale(0.94);
  }
  100% {
    opacity: 1;
    transform: translateY(0) rotateY(0) scale(1);
  }
}

.card.winner-card {
  box-shadow: 0 0 0 2px rgba(57, 242, 138, 0.42), 0 0 16px rgba(57, 242, 138, 0.22);
  transform: translateY(-2px);
}

.seat-grid {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.poker-seat {
  position: absolute;
  width: 188px;
  height: 168px;
  min-width: 0;
  border: 2px solid rgba(255, 255, 255, 0.16);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.08), transparent 36%),
    rgba(9, 13, 19, 0.97);
  padding: 9px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-size: 0.78rem;
  text-align: center;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.38);
}

.view-pos-0 { left: 50%; bottom: 2px; transform: translateX(-50%); }
.view-pos-1 { left: 12%; bottom: 9%; }
.view-pos-2 { left: 0; top: 49%; transform: translateY(-50%); }
.view-pos-3 { left: 12%; top: 10%; }
.view-pos-4 { left: 50%; top: 2px; transform: translateX(-50%); }
.view-pos-5 { right: 12%; top: 10%; }
.view-pos-6 { right: 0; top: 49%; transform: translateY(-50%); }
.view-pos-7 { right: 12%; bottom: 9%; }

.poker-seat.turn {
  animation: turnHeartbeat 1.45s ease-in-out infinite;
}

.poker-seat.turn.timer-green {
  border-color: #30e47e;
  box-shadow: 0 0 0 0 rgba(48, 228, 126, 0.7), 0 0 22px rgba(48, 228, 126, 0.45), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.poker-seat.turn.timer-yellow {
  border-color: var(--yellow);
  box-shadow: 0 0 0 0 rgba(240, 185, 76, 0.75), 0 0 24px rgba(240, 185, 76, 0.5), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.poker-seat.turn.timer-red {
  border-color: var(--red);
  box-shadow: 0 0 0 0 rgba(255, 90, 90, 0.8), 0 0 28px rgba(255, 90, 90, 0.62), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.poker-seat.closed-seat {
  opacity: 0.38;
  border-style: dashed;
  filter: grayscale(0.8);
}

.poker-seat.closed-seat .player-icon {
  background: #333b46;
  color: #a7b0bd;
}

.poker-seat.closed-seat .cards,
.poker-seat.closed-seat .seat-row {
  visibility: hidden;
}

.poker-seat.winner-seat {
  border-color: rgba(57, 242, 138, 0.8);
  box-shadow: 0 0 0 2px rgba(57, 242, 138, 0.18), 0 12px 30px rgba(0, 0, 0, 0.42), 0 0 24px rgba(57, 242, 138, 0.18);
}

.poker-seat.mucked-seat {
  opacity: 0.86;
}

.poker-seat.mucked-seat::before,
.poker-seat.folded-seat::before {
  position: absolute;
  left: 50%;
  top: 60%;
  z-index: 7;
  transform: translate(-50%, -50%) rotate(-5deg);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 999px;
  background: rgba(12, 16, 22, 0.9);
  color: #f4f7fb;
  font-size: 0.58rem;
  font-weight: 1000;
  line-height: 1;
  padding: 3px 7px;
  pointer-events: none;
  text-transform: uppercase;
}

.poker-seat.mucked-seat::before {
  content: "Mucked";
}

.poker-seat.folded-seat::before {
  content: "Folded";
}

.poker-seat.folded-seat {
  opacity: 0.72;
  filter: grayscale(0.55) saturate(0.75);
}

.poker-seat.all-in-seat {
  border-color: rgba(240, 185, 76, 0.75);
}

.poker-seat.show-required-seat {
  box-shadow: 0 0 0 2px rgba(78, 166, 255, 0.2), 0 0 16px rgba(78, 166, 255, 0.22), 0 10px 24px rgba(0, 0, 0, 0.38);
}

.poker-seat.show-pending-seat {
  animation: seatPendingPulse 1.2s ease-in-out infinite;
}

.poker-seat.disconnected-seat {
  border-style: dashed;
  opacity: 0.82;
}

.poker-seat.showed-seat {
  border-color: rgba(57, 242, 138, 0.38);
}

.dealer-marker {
  position: absolute;
  right: 6px;
  top: 6px;
  z-index: 2;
  width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #f7fbff;
  color: #111318;
  display: grid;
  place-items: center;
  font-size: 0.68rem;
  font-weight: 1000;
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.1);
}

.seat-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 900;
  white-space: nowrap;
}

.seat-badge.all-in {
  color: #1e1504;
  background: var(--yellow);
  border-color: transparent;
}

.seat-badge.folded {
  color: #f1f4f8;
  background: rgba(124, 135, 151, 0.3);
}

.seat-badge.action-pending {
  color: #0d1830;
  background: #95c7ff;
  border-color: transparent;
}

.seat-badge.winner-hand {
  color: #08110b;
  background: #8ef0b2;
  border-color: transparent;
}

@keyframes seatPendingPulse {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-2px); }
}

.poker-seat.turn.timer-green .player-icon {
  animation: iconPulseGreen 1.45s ease-in-out infinite;
}

.poker-seat.turn.timer-yellow .player-icon {
  animation: iconPulseYellow 1.45s ease-in-out infinite;
}

.poker-seat.turn.timer-red .player-icon {
  animation: iconPulseRed 0.9s ease-in-out infinite;
}

@keyframes iconPulseGreen {
  0%, 26%, 100% { box-shadow: 0 0 0 0 rgba(48, 228, 126, 0); }
  12% { box-shadow: 0 0 0 9px rgba(48, 228, 126, 0.32); }
}

@keyframes iconPulseYellow {
  0%, 26%, 100% { box-shadow: 0 0 0 0 rgba(240, 185, 76, 0); }
  12% { box-shadow: 0 0 0 9px rgba(240, 185, 76, 0.34); }
}

@keyframes iconPulseRed {
  0%, 35%, 100% { box-shadow: 0 0 0 0 rgba(255, 90, 90, 0); }
  16% { box-shadow: 0 0 0 10px rgba(255, 90, 90, 0.4); }
}

@keyframes turnHeartbeat {
  0% { filter: brightness(1); }
  12% { filter: brightness(1.32); }
  24% { filter: brightness(1); }
  100% { filter: brightness(1); }
}

.seat-head,
.seat-row {
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
}

.player-icon {
  flex: 0 0 54px;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #d8ad45;
  color: #17140c;
  font-size: 0.82rem;
  font-weight: 900;
  padding: 0;
  border: 2px solid rgba(255,255,255,.22);
  overflow: hidden;
}

.blind-marker {
  position: absolute;
  right: 13px;
  top: 18px;
  z-index: 4;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.78);
  background: radial-gradient(circle, #fff7b0 0 28%, #d9a92e 30% 62%, #7b4d0d 64% 100%);
  color: #111;
  font-size: 0.62rem;
  font-weight: 1000;
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.4);
  pointer-events: none;
}

.blind-marker.big-blind {
  background: radial-gradient(circle, #d9fff0 0 28%, #35e488 30% 62%, #0a6f3a 64% 100%);
}

.player-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.player-icon:disabled {
  opacity: 1;
}

.poker-seat .player-icon:disabled {
  pointer-events: none;
}

.avatar-fallback {
  display: grid;
  place-items: center;
}

.seat-name {
  min-width: 0;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f7fbff;
  font-weight: 900;
  font-size: 0.86rem;
  line-height: 1.15;
  order: 2;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

.seat-status {
  order: 3;
  max-width: 148px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.muck-label {
  order: 4;
  max-width: 154px;
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 900;
  line-height: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muck-label.shown {
  color: #39f28a;
}

.poker-seat .cards {
  order: 5;
  margin-top: 0;
  justify-content: center;
  gap: 5px;
}

.poker-seat .card {
  width: 44px;
  height: 62px;
  min-width: 44px;
  min-height: 62px;
  border-radius: 4px;
  padding: 4px 3px;
  font-size: 0.88rem;
}

.poker-seat .card i {
  font-size: 1rem;
}

.poker-seat .seat-row {
  font-size: 0.76rem;
  line-height: 1.12;
  order: 6;
}

.poker-seat .seat-row strong {
  color: #f7fbff;
}

.blackjack-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 12px;
  overflow: hidden;
}

.blackjack-table-panel,
.blackjack-controls-panel {
  min-height: 0;
}

.blackjack-phase-group {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
}

.blackjack-top-timer {
  min-width: 92px;
  padding: 6px 8px;
}

.blackjack-table {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  border: 8px solid #5b3716;
  border-radius: 42% 42% 18px 18px / 38% 38% 18px 18px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 255, 255, 0.12), transparent 26%),
    radial-gradient(ellipse at 50% 58%, #106a42 0 42%, #084a2f 68%, #062f22 100%);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.08), inset 0 0 60px rgba(0,0,0,.5);
}

.blackjack-shoe {
  position: absolute;
  top: 54px;
  right: 8%;
  z-index: 5;
  width: 92px;
  height: 78px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.22);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(12, 17, 25, .94), rgba(35, 43, 58, .88));
  box-shadow: 0 12px 24px rgba(0,0,0,.38);
}

.shoe-card {
  position: absolute;
  width: 42px;
  height: 58px;
  border-radius: 5px;
  background: repeating-linear-gradient(45deg, #163e84 0 5px, #f4f7ff 5px 8px);
  border: 2px solid #e8efff;
  transform: translate(10px, 7px) rotate(8deg);
}

.shoe-card:nth-child(2) { transform: translate(3px, 3px) rotate(5deg); }
.shoe-card:nth-child(3) { transform: translate(-4px, -1px) rotate(2deg); }

.blackjack-shoe .mini-label {
  position: absolute;
  top: -20px;
}

.blackjack-shoe.shoe-active {
  box-shadow: 0 0 22px rgba(83, 167, 255, .48), 0 12px 24px rgba(0,0,0,.38);
}

.blackjack-chip-tray {
  position: absolute;
  top: 10px;
  left: 50%;
  z-index: 4;
  transform: translateX(-50%);
  display: flex;
  gap: 5px;
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  background: rgba(12, 15, 18, 0.78);
}

.blackjack-dealer {
  position: absolute;
  top: 58px;
  left: 50%;
  width: 250px;
  min-height: 118px;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 4px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 20, 15, 0.75);
}

.blackjack-dealer .cards {
  margin: 0;
  justify-content: center;
}

.blackjack-center {
  position: absolute;
  left: 50%;
  top: 42%;
  width: min(380px, 48%);
  transform: translate(-50%, -50%);
  display: grid;
  gap: 10px;
  align-items: stretch;
}

.blackjack-message {
  min-height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(7, 14, 11, 0.8);
  color: #e6fff0;
  font-weight: 900;
  text-align: center;
  padding: 10px;
}

.blackjack-announcement {
  min-height: 40px;
  display: grid;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  background: rgba(6, 18, 13, .92);
  color: #fff6d7;
  font-size: 1rem;
  font-weight: 1000;
  text-align: center;
  padding: 8px 14px;
  box-shadow: 0 10px 26px rgba(0,0,0,.36);
}

.blackjack-seat-grid {
  position: absolute;
  inset: 0;
}

.blackjack-seat {
  position: absolute;
  width: 174px;
  min-height: 178px;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  padding: 9px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(8, 12, 18, 0.94);
  text-align: center;
  cursor: default;
  box-shadow: 0 10px 24px rgba(0,0,0,.35);
}

.blackjack-seat.empty {
  cursor: pointer;
  border-style: dashed;
  background: rgba(8, 12, 18, 0.55);
}

.blackjack-seat.empty:hover {
  border-color: rgba(57, 242, 138, 0.78);
}

.blackjack-seat.mine {
  border-color: rgba(83, 167, 255, 0.72);
}

.blackjack-seat.turn.timer-green,
.blackjack-table.blackjack-active-alert.timer-green {
  box-shadow: 0 0 26px rgba(48, 228, 126, 0.42), inset 0 0 0 4px rgba(48, 228, 126, 0.08);
}

.blackjack-seat.turn.timer-yellow,
.blackjack-table.blackjack-active-alert.timer-yellow {
  box-shadow: 0 0 30px rgba(240, 185, 76, 0.52), inset 0 0 0 4px rgba(240, 185, 76, 0.12);
}

.blackjack-seat.turn.timer-red,
.blackjack-table.blackjack-active-alert.timer-red {
  animation: blackjackUrgentPulse 0.65s ease-in-out infinite;
  box-shadow: 0 0 34px rgba(255, 90, 90, 0.62), inset 0 0 0 4px rgba(255, 90, 90, 0.15);
}

@keyframes blackjackUrgentPulse {
  0%, 100% { filter: brightness(1); }
  50% { filter: brightness(1.28); }
}

.bj-seat-0 { left: 7%; bottom: 8%; }
.bj-seat-1 { left: 24%; bottom: 1%; }
.bj-seat-2 { left: 50%; bottom: -1%; transform: translateX(-50%); }
.bj-seat-3 { right: 24%; bottom: 1%; }
.bj-seat-4 { right: 7%; bottom: 8%; }

.blackjack-seat .cards {
  min-height: 62px;
  margin: 0;
  justify-content: center;
  gap: 2px;
}

.blackjack-seat .card {
  margin-left: -10px;
  min-width: 42px;
  width: 42px;
  height: 58px;
  border-radius: 6px;
  padding: 4px;
  font-size: 1.02rem;
  background: #f8fbff;
  box-shadow: 0 4px 10px rgba(0,0,0,.32);
}

.blackjack-seat .cards > span:first-child .card,
.blackjack-dealer .cards > span:first-child .card {
  margin-left: 0;
}

.blackjack-dealer .card {
  margin-left: -8px;
}

.blackjack-dealer .card,
.bj-hand .card {
  min-width: 44px;
  width: 44px;
  height: 60px;
  font-size: 1.08rem;
}

.bj-hand .card {
  min-width: 40px;
  width: 40px;
  height: 56px;
  font-size: 1rem;
}

.bj-hand-list {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: 5px;
}

.bj-hand {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: grid;
  justify-items: center;
  gap: 2px;
  padding: 5px 4px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 7px;
  background: rgba(2, 8, 8, .34);
}

.bj-hand.active-hand.timer-green {
  border-color: rgba(48, 228, 126, .82);
  box-shadow: 0 0 14px rgba(48, 228, 126, .36);
}

.bj-hand.active-hand.timer-yellow {
  border-color: rgba(240, 185, 76, .86);
  box-shadow: 0 0 16px rgba(240, 185, 76, .42);
}

.bj-hand.active-hand.timer-red {
  border-color: rgba(255, 90, 90, .9);
  animation: blackjackUrgentPulse 0.65s ease-in-out infinite;
  box-shadow: 0 0 18px rgba(255, 90, 90, .5);
}

.bj-hand-label {
  width: 100%;
  color: #fff6d7;
  font-size: .58rem;
  font-weight: 1000;
  white-space: nowrap;
}

.bj-split-created {
  animation: bjSplitCardMove .75s ease-out both;
}

@keyframes bjSplitCardMove {
  0% { transform: translateX(-16px) scale(.94); opacity: .76; }
  60% { transform: translateX(5px) scale(1.04); opacity: 1; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}

.bj-dealt-card {
  display: inline-block;
  animation: bjDealFromShoe 0.92s ease-out both;
  animation-delay: calc(var(--deal-order, 0) * 90ms);
  transform-origin: center;
}

@keyframes bjDealFromShoe {
  0% {
    opacity: 0.2;
    transform: translate(150px, -130px) rotate(18deg) scale(0.72);
    filter: brightness(.7);
  }
  70% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translate(0, 0) rotate(0) scale(1);
    filter: brightness(1);
  }
}

.bj-seat-info {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 4px;
  font-size: 0.64rem;
}

.bj-seat-bet {
  min-height: 24px;
}

.bj-result-bubble {
  position: absolute;
  left: 50%;
  top: -18px;
  z-index: 12;
  max-width: 180px;
  transform: translateX(-50%);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(6,18,13,.94);
  color: #fff4c2;
  font-size: .68rem;
  font-weight: 1000;
  opacity: 0;
  pointer-events: none;
  animation: bjOutcomeBubble 1.35s ease both;
  animation-delay: var(--result-delay, 0ms);
}

.bj-result-bubble.win { border-color: rgba(67, 238, 143, .54); }
.bj-result-bubble.push { border-color: rgba(120, 185, 255, .58); }
.bj-result-bubble.lose { border-color: rgba(255, 106, 106, .58); }

.bj-payout-animation {
  position: absolute;
  left: 50%;
  top: 52%;
  z-index: 11;
  width: 96px;
  height: 40px;
  opacity: 0;
  pointer-events: none;
  animation-duration: 1.05s;
  animation-fill-mode: both;
  animation-timing-function: cubic-bezier(.22,.76,.22,1);
  animation-delay: var(--result-delay, 0ms);
}

.bj-payout-animation.win { animation-name: bjDealerPaysPlayer; }
.bj-payout-animation.lose { animation-name: bjPlayerPaysDealer; }
.bj-payout-animation.push { animation-name: bjPushReturnsBet; }

@keyframes bjOutcomeBubble {
  0% { opacity: 0; transform: translate(-50%, 8px) scale(.95); }
  15%, 82% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -7px) scale(.98); }
}

@keyframes bjDealerPaysPlayer {
  0% { opacity: 0; transform: translate(120px, -150px) scale(.72); }
  18% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -4px) scale(1); }
}

@keyframes bjPlayerPaysDealer {
  0% { opacity: 1; transform: translate(-50%, -4px) scale(1); }
  100% { opacity: 0; transform: translate(120px, -150px) scale(.72); }
}

@keyframes bjPushReturnsBet {
  0% { opacity: 0; transform: translate(-50%, -38px) scale(.8); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -4px) scale(1); }
}

.bj-empty-bet {
  color: var(--muted);
  font-size: 0.62rem;
}

.bj-chip-stack {
  position: relative;
  width: 86px;
  height: 34px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bj-chip-stack .bj-chip {
  position: relative;
  margin-left: -18px;
}

.bj-chip-stack .bj-chip:first-child {
  margin-left: 0;
}

.bj-chip {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border: 3px dashed rgba(255, 255, 255, 0.72);
  border-radius: 50%;
  font-size: 0.55rem;
  font-weight: 1000;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}

button.bj-chip {
  cursor: pointer;
  padding: 0;
}

.chip-1 { background: #f7f7f2; color: #111; border-color: #d8d8d0; }
.chip-5 { background: #d62032; color: #fff; border-color: #ffadb6; }
.chip-10 { background: #1f67d6; color: #fff; border-color: #b9d3ff; }
.chip-25 { background: #148f4d; color: #fff; border-color: #aef7cd; }
.chip-50 { background: #f18b20; color: #111; border-color: #ffe0b8; }
.chip-100 { background: #7f3cc9; color: #fff; border-color: #d9c2ff; }
.chip-500 { background: #f5c542; color: #111; border-color: #fff0a7; }
.chip-1000 { background: #050608; color: #fff; border-color: #c4c7ce; }
.chip-more { background: #2d3440; color: #fff; border-color: #9ba7b7; }

.blackjack-chip-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.blackjack-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.blackjack-admin-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.blackjack-chat-panel {
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.blackjack-chat-messages {
  min-height: 128px;
  max-height: 190px;
}

.blackjack-chat-line {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  padding: 5px 0;
  border-bottom: 1px solid rgba(255,255,255,.06);
  overflow-wrap: anywhere;
}

.blackjack-chat-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  margin-top: 8px;
}

.compact-actions {
  gap: 6px;
}

.blackjack-rules {
  position: absolute;
  right: 14px;
  top: 94px;
  z-index: 25;
  width: min(360px, calc(100vw - 40px));
  max-height: calc(100dvh - 130px);
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  padding: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.45);
}

.chip-rule-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 0;
  list-style: none;
}

.chip-rule-list li {
  display: flex;
  align-items: center;
  gap: 6px;
}

@media (max-width: 980px) {
  .blackjack-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(420px, 1fr) 300px;
  }
  .blackjack-seat {
    width: 118px;
    min-height: 132px;
  }
  .blackjack-center {
    width: 70%;
  }
}

.chip-fly {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 18;
  min-width: 34px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #ffd966;
  background: radial-gradient(circle, #fff3a1 0 22%, #d8ad45 24% 62%, #8c5c12 64% 100%);
  color: #17140c;
  font-size: 0.62rem;
  font-weight: 900;
  pointer-events: none;
  animation: chipSlideToPot 0.9s cubic-bezier(.2,.72,.18,1) forwards;
}

.roulette-shell {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 12px;
  overflow: hidden;
}

.roulette-shell.roulette-presentation-active {
  grid-template-columns: minmax(0, 1fr);
}

.roulette-shell.roulette-presentation-active .roulette-controls-panel,
.roulette-shell.roulette-presentation-active .roulette-seats-strip {
  display: none;
}

.roulette-table-panel,
.roulette-controls-panel {
  min-height: 0;
}

.roulette-stage {
  position: relative;
  min-height: 430px;
  border: 8px solid #5b3716;
  border-radius: 20px;
  background:
    radial-gradient(circle at 24% 34%, rgba(255,255,255,.08), transparent 0 23%, transparent 45%),
    repeating-linear-gradient(105deg, rgba(255,255,255,.025) 0 2px, transparent 2px 12px),
    radial-gradient(ellipse at 50% 46%, #147247 0 50%, #07351f 100%);
  box-shadow: inset 0 0 0 5px rgba(255,255,255,.08), inset 0 0 70px rgba(0,0,0,.54), 0 18px 40px rgba(0,0,0,.35);
  transition: transform .7s ease, filter .7s ease;
  overflow: hidden;
}

.roulette-main-layout {
  min-height: 430px;
  display: grid;
  grid-template-columns: 410px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: 18px;
}

.roulette-wheel-zone,
.roulette-board-zone {
  min-width: 0;
}

.roulette-wheel-zone {
  display: grid;
  place-items: center;
}

.roulette-spin-window {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  min-height: 410px;
}

.roulette-spin-label {
  display: none;
}

.roulette-wheel {
  position: relative;
  --ball-radius: 184px;
  --ball-radius-2: 178px;
  --ball-radius-3: 164px;
  --ball-radius-4: 142px;
  --ball-radius-5: 124px;
  --ball-radius-final: 110px;
  width: 390px;
  height: 390px;
  border: 12px solid #2a1410;
  border-radius: 50%;
  background:
    radial-gradient(circle at 43% 38%, rgba(255,255,255,.16), transparent 0 16%, transparent 34%),
    radial-gradient(circle at 50% 50%, #efc363 0 13%, #8a4d1f 15% 31%, #33180b 32% 45%, transparent 46%),
    radial-gradient(circle, #140906 0 100%);
  box-shadow: 0 22px 60px rgba(0,0,0,.58), inset 0 0 0 16px rgba(255,255,255,.08), inset 0 0 0 35px rgba(74,36,14,.84), inset 0 0 0 52px rgba(245,210,135,.2);
}

.roulette-wheel.spinning {
  animation: rouletteWheelGlow 1.2s ease-in-out infinite alternate;
}

.roulette-wheel.spinning::after {
  content: 'Ball released';
  position: absolute;
  left: 50%;
  top: 7%;
  transform: translateX(-50%);
  z-index: 12;
  padding: 7px 13px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.24);
  background: rgba(8, 13, 11, .76);
  color: #ffe9a4;
  font-size: .74rem;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
  pointer-events: none;
  animation: ballReleaseCue 1.6s ease-out both;
}

.roulette-wheel-rim {
  position: absolute;
  inset: -14px;
  border: 12px solid #4a2410;
  border-radius: 50%;
  box-shadow: inset 0 0 0 5px #b47a34, inset 0 0 0 13px rgba(255,244,191,.12), 0 14px 32px rgba(0,0,0,.58);
  pointer-events: none;
}

.roulette-wheel-svg {
  position: absolute;
  inset: 4px;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  border-radius: 50%;
  transform-origin: center;
  will-change: transform;
}

.roulette-wheel.spinning .roulette-wheel-svg {
  animation: none;
}

.roulette-wheel-track,
.roulette-ball-track-ring {
  border-radius: 50%;
  fill: none;
  stroke: rgba(245, 235, 206, .55);
  stroke-width: 9;
  filter: drop-shadow(0 0 5px rgba(255,255,255,.22));
}

.roulette-outer-metal {
  fill: none;
  stroke: rgba(255, 232, 178, .62);
  stroke-width: 8;
  filter: drop-shadow(0 0 7px rgba(255, 232, 178, .26));
}

.roulette-pocket-outer-ring,
.roulette-pocket-inner-ring {
  fill: none;
  stroke: rgba(255, 244, 217, .86);
  stroke-width: 2.4;
  vector-effect: non-scaling-stroke;
}

.roulette-pocket-inner-ring {
  stroke: rgba(20, 10, 4, .78);
  stroke-width: 4;
}

.roulette-wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 78px;
  height: 78px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, #fff3b8 0 10%, #d6a94f 12% 45%, #7a4418 48% 100%);
  box-shadow: 0 4px 14px rgba(0,0,0,.45), inset 0 0 0 5px rgba(255,255,255,.24);
  pointer-events: none;
}

.roulette-inner-wood {
  fill: #6e3a18;
  stroke: rgba(255,225,160,.32);
  stroke-width: 5;
}

.roulette-inner-bowl {
  fill: #c99945;
  stroke: rgba(72,37,13,.65);
  stroke-width: 8;
}

.roulette-hub-shadow {
  fill: none;
  stroke: rgba(72,37,13,.45);
  stroke-width: 8;
}

.wheel-pocket-slice {
  stroke: rgba(255,255,255,.84);
  stroke-width: 1.45;
  vector-effect: non-scaling-stroke;
}

.wheel-pocket-divider {
  stroke: rgba(255,255,255,.95);
  stroke-width: 1.35;
  vector-effect: non-scaling-stroke;
}

.wheel-pocket.red .wheel-pocket-slice { fill: url(#roulette-red-pocket); }
.wheel-pocket.black .wheel-pocket-slice { fill: url(#roulette-black-pocket); }
.wheel-pocket.green .wheel-pocket-slice { fill: url(#roulette-green-pocket); }

.wheel-pocket.winning-pocket .wheel-pocket-slice {
  filter: drop-shadow(0 0 10px rgba(255, 235, 145, .95));
  stroke: #ffe78f;
  stroke-width: 3px;
}

.wheel-pocket.winning-pocket .wheel-pocket-label {
  fill: #ffe78f;
  font-size: 21px;
}

.wheel-pocket-label {
  fill: #fff;
  font-size: 18px;
  font-weight: 1000;
  dominant-baseline: middle;
  text-anchor: middle;
  paint-order: stroke;
  stroke: rgba(0,0,0,.84);
  stroke-width: 3.2px;
}

.roulette-stage.wheel-focus .roulette-main-layout {
  display: block;
  min-height: 100%;
  padding: 0;
}

.roulette-stage.wheel-focus .roulette-board-zone,
.roulette-stage.wheel-focus .roulette-message {
  display: none;
}

.roulette-stage.wheel-focus .roulette-wheel-zone {
  position: absolute;
  inset: 10px;
  z-index: 40;
  display: grid;
  place-items: center;
  transform: none;
  background:
    radial-gradient(circle at 50% 44%, rgba(255,231,166,.12), rgba(2,8,5,.22) 38%, rgba(1,4,3,.92) 100%),
    linear-gradient(135deg, rgba(24,102,61,.32), rgba(7,25,18,.92));
}

.roulette-stage.wheel-focus .roulette-spin-window {
  width: min(94vw, calc(100% - 18px));
  height: min(86vh, calc(100% - 18px));
  min-height: 560px;
  border: 1px solid rgba(255,223,145,.26);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 45%, rgba(222,173,79,.16), rgba(6, 18, 13, .9) 48%, rgba(0, 0, 0, .94) 100%);
  box-shadow: 0 26px 90px rgba(0,0,0,.76), inset 0 0 0 1px rgba(255,255,255,.08), inset 0 0 80px rgba(20, 122, 72, .22);
  overflow: hidden;
}

.roulette-stage.wheel-spinning .roulette-spin-window {
  animation: rouletteSpinCamera 5s cubic-bezier(.12,.72,.14,1) both;
}

.roulette-stage.wheel-focus .roulette-spin-label {
  display: block;
  position: absolute;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 18;
  min-width: 230px;
  text-align: center;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.2);
  background: rgba(7, 12, 10, .72);
  color: #ffeaa5;
  font-weight: 1000;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.roulette-stage.wheel-focus .roulette-wheel.spinning::after {
  display: none;
}

.roulette-stage.wheel-focus .roulette-wheel {
  --focus-wheel-size: min(86vw, calc(100vh - 130px), calc(100% - 96px), 920px);
  width: var(--focus-wheel-size);
  height: var(--focus-wheel-size);
  --ball-radius: min(41vmin, 412px);
  --ball-radius-2: min(40vmin, 398px);
  --ball-radius-3: min(37vmin, 365px);
  --ball-radius-4: min(33vmin, 325px);
  --ball-radius-5: min(29vmin, 286px);
  --ball-radius-final: min(24vmin, 236px);
}

.roulette-stage.wheel-settled .roulette-spin-label {
  background: linear-gradient(135deg, rgba(244, 210, 123, .94), rgba(148, 92, 28, .92));
  color: #191008;
  border-color: rgba(255,255,255,.42);
}

.roulette-stage.wheel-focus .roulette-winners-overlay {
  top: auto;
  right: auto;
  left: 50%;
  bottom: 22px;
  transform: translateX(-50%);
  width: min(560px, 84%);
  z-index: 55;
}

.roulette-ball {
  position: absolute;
  left: 50%;
  top: 50%;
  --ball-r: var(--ball-radius);
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 34% 28%, #ffffff 0 20%, #f7f3de 24% 54%, #b8aa80 70% 100%);
  box-shadow: 0 3px 10px rgba(0,0,0,.76), 0 0 12px rgba(255,255,230,.64);
  transform: rotate(0deg) translateY(calc(-1 * var(--ball-radius)));
  transform-origin: 50% 50%;
  z-index: 8;
  will-change: transform, opacity;
}

.roulette-ball::after {
  content: '';
  position: absolute;
  left: 52%;
  top: 68%;
  width: 13px;
  height: 6px;
  transform: translate(-50%, -50%) rotate(-16deg);
  border-radius: 50%;
  background: rgba(0,0,0,.38);
  filter: blur(3px);
  z-index: -1;
}

.roulette-stage.wheel-spinning .roulette-wheel-svg {
  filter: blur(.55px) drop-shadow(0 0 8px rgba(255,225,145,.2));
}

.roulette-stage.wheel-settled .roulette-wheel-svg {
  filter: drop-shadow(0 0 8px rgba(255,225,145,.18));
}

.roulette-stage.wheel-settled .wheel-pocket.winning-pocket .wheel-pocket-slice {
  filter: drop-shadow(0 0 15px rgba(255, 235, 145, 1)) drop-shadow(0 0 28px rgba(255, 196, 76, .62));
}

.roulette-wheel.spinning .roulette-ball {
  animation: none;
}

.roulette-result {
  position: absolute;
  inset: 96px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #f4d27b;
  color: #1d1510;
  font-weight: 1000;
  font-size: 1.6rem;
}

.roulette-result[hidden],
.roulette-wheel.spinning .roulette-result {
  display: none;
}

@keyframes rouletteWheelGlow {
  from { box-shadow: 0 18px 46px rgba(0,0,0,.52), inset 0 0 0 16px rgba(255,255,255,.08), inset 0 0 0 35px rgba(74,36,14,.8), inset 0 0 0 49px rgba(245,210,135,.18); }
  to { box-shadow: 0 22px 60px rgba(0,0,0,.64), inset 0 0 0 16px rgba(255,255,255,.13), inset 0 0 0 35px rgba(74,36,14,.86), inset 0 0 0 49px rgba(245,210,135,.26); }
}

@keyframes rouletteSpinCamera {
  0% { transform: scale(1); }
  58% { transform: scale(1.018); }
  82% { transform: scale(1.038); }
  100% { transform: scale(1.012); }
}

@keyframes rouletteWheelRotor {
  0% { transform: rotate(-1440deg); }
  20% { transform: rotate(-1030deg); }
  55% { transform: rotate(-520deg); }
  82% { transform: rotate(-145deg); }
  100% { transform: rotate(0deg); }
}

@keyframes ballReleaseCue {
  0% { opacity: 0; transform: translate(-50%, -16px) scale(.82); }
  18% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  72% { opacity: 1; transform: translate(-50%, 0) scale(1); }
  100% { opacity: 0; transform: translate(-50%, 10px) scale(.96); }
}

@keyframes rouletteBallOrbit {
  0% { opacity: 0; transform: rotate(-210deg) translateY(-36px) translateX(0) scale(.42); }
  7% { opacity: 1; transform: rotate(180deg) translateY(calc(-1 * var(--ball-radius))) translateX(9px) scale(1); }
  20% { transform: rotate(820deg) translateY(calc(-1 * var(--ball-radius))) translateX(-8px) scale(.98); }
  42% { transform: rotate(1450deg) translateY(calc(-1 * var(--ball-radius-2))) translateX(11px) scale(.94); }
  62% { transform: rotate(1880deg) translateY(calc(-1 * var(--ball-radius-3))) translateX(-10px) scale(.91); }
  78% { transform: rotate(2110deg) translateY(calc(-1 * var(--ball-radius-4))) translateX(6px) scale(.88); }
  90% { transform: rotate(calc(2180deg + var(--result-angle, 0deg))) translateY(calc(-1 * var(--ball-radius-5))) translateX(-4px) scale(.86); }
  100% { transform: rotate(calc(2160deg + var(--result-angle, 0deg))) translateY(calc(-1 * var(--ball-radius-final))) translateX(0) scale(.86); }
}

.roulette-message {
  position: absolute;
  left: 50%;
  bottom: 84px;
  width: min(430px, 54%);
  transform: translateX(-50%);
  padding: 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  background: rgba(6, 18, 13, .88);
  color: #fff6d7;
  font-weight: 900;
  text-align: center;
}

.roulette-seats {
  display: none;
}

.roulette-seats-strip {
  margin-top: 28px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: grid;
  grid-template-columns: repeat(5, minmax(110px, 1fr));
  gap: 8px;
}

.roulette-seat {
  position: relative;
  width: auto;
  min-height: 128px;
  display: grid;
  gap: 4px;
  justify-items: center;
  padding: 8px;
  border: 2px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(8, 12, 18, .92);
  text-align: center;
}

.roulette-seat.empty {
  cursor: pointer;
  border-style: dashed;
  background: rgba(8, 12, 18, .54);
}

.roulette-seat.mine {
  border-color: rgba(83,167,255,.72);
}

.rt-seat-0,
.rt-seat-1,
.rt-seat-2,
.rt-seat-3,
.rt-seat-4 {
  inset: auto;
  transform: none;
}

.roulette-bet-board {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr) 78px;
  grid-template-rows: 156px 48px 48px;
  gap: 5px;
  align-items: stretch;
  min-width: 0;
  padding: 8px;
  border: 1px solid rgba(229, 245, 218, .18);
  border-radius: 8px;
  background: rgba(5, 54, 33, .36);
  box-shadow: inset 0 0 22px rgba(0,0,0,.22);
}

.roulette-zeroes,
.roulette-number-grid,
.roulette-dozen-grid,
.roulette-outside-grid,
.roulette-column-grid {
  display: grid;
  gap: 4px;
}

.roulette-zeroes {
  grid-column: 1;
  grid-row: 1;
  grid-template-rows: 1fr 1fr;
}

.roulette-main-number-area {
  position: relative;
  grid-column: 2;
  grid-row: 1;
  min-height: 156px;
}

.roulette-number-grid {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(12, minmax(26px, 1fr));
  grid-template-rows: repeat(3, 1fr);
  gap: 4px;
}

.roulette-column-grid {
  grid-column: 3;
  grid-row: 1;
  grid-template-rows: repeat(3, 1fr);
}

.roulette-dozen-grid {
  grid-column: 2;
  grid-row: 2;
  grid-template-columns: repeat(3, 1fr);
}

.roulette-outside-grid {
  grid-column: 1 / -1;
  grid-row: 3;
  grid-template-columns: repeat(6, 1fr);
}

.roulette-cell,
.roulette-dozen-grid div,
.roulette-outside-grid div,
.roulette-column-grid div {
  position: relative;
  min-height: 0;
  border: 1px solid rgba(236,255,239,.36);
  border-radius: 2px;
  background: linear-gradient(180deg, rgba(13, 48, 32, .92), rgba(7, 28, 18, .95));
  color: #f8fff9;
  display: grid;
  place-items: center;
  font-weight: 1000;
  cursor: crosshair;
  user-select: none;
}

.roulette-column-grid div {
  font-size: .66rem;
  line-height: 1.05;
  text-align: center;
}

.roulette-cell.red,
.red-zone {
  background: linear-gradient(180deg, #cf2438, #88121e);
}

.roulette-cell.black,
.black-zone {
  background: linear-gradient(180deg, #22282e, #07090b);
}

.roulette-cell.green {
  background: linear-gradient(180deg, #129457, #075a34);
}

.roulette-inside-zones {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
}

.roulette-bet-zone {
  position: absolute;
  z-index: 7;
  border-radius: 999px;
  cursor: crosshair;
  pointer-events: auto;
}

.roulette-bet-zone:hover,
.roulette-bet-zone:focus {
  outline: 2px solid rgba(255, 231, 143, .78);
  background: rgba(255, 231, 143, .18);
}

.split-zone {
  background: rgba(255, 255, 255, 0.001);
}

.corner-zone {
  background: rgba(255, 255, 255, 0.001);
}

.street-zone,
.sixline-zone {
  background: rgba(255, 213, 95, 0.001);
}

.street-zone:hover,
.sixline-zone:hover {
  background: rgba(255, 213, 95, .2);
}

.basket-zone,
.trio-zone {
  background: rgba(48, 228, 126, 0.001);
}

.basket-zone:hover,
.trio-zone:hover {
  background: rgba(48, 228, 126, .2);
}

.roulette-bet-marker {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 8;
  transform: translate(-50%, -50%);
  cursor: context-menu;
}

.roulette-winners-overlay {
  position: absolute;
  right: 18px;
  top: 18px;
  z-index: 40;
  width: min(360px, 42%);
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid rgba(255,255,255,.24);
  border-radius: 8px;
  background: rgba(8, 12, 18, .94);
  box-shadow: 0 20px 50px rgba(0,0,0,.46);
}

.roulette-winner-card {
  display: grid;
  gap: 2px;
  padding: 8px;
  border-radius: 6px;
  color: #111;
  font-size: .82rem;
  font-weight: 850;
}

.roulette-winner-card.gold { background: linear-gradient(135deg, #ffe38a, #d9a51e); }
.roulette-winner-card.silver { background: linear-gradient(135deg, #f1f4f8, #aeb6c2); }
.roulette-winner-card.bronze { background: linear-gradient(135deg, #e5ad73, #9a5d25); color: #1b1008; }
.roulette-winner-card.no-winner { background: #151b22; color: #f7f7f7; text-align: center; }

.roulette-stack {
  position: relative;
  display: inline-grid;
  place-items: center;
  min-width: 70px;
  min-height: 48px;
}

.roulette-stack strong {
  position: absolute;
  top: 34px;
  padding: 1px 5px;
  border-radius: 999px;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: .62rem;
}

.roulette-stack.mine strong {
  background: rgba(55,132,255,.92);
}

.roulette-chip {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 3px dashed rgba(255,255,255,.72);
  border-radius: 50%;
  font-size: .52rem;
  font-weight: 1000;
  box-shadow: 0 3px 8px rgba(0,0,0,.35);
}

.roulette-stack .roulette-chip {
  position: absolute;
  left: calc(18px + var(--chip-x, 0px));
  top: calc(2px + var(--chip-y, 0px));
  z-index: var(--chip-z, 1);
  transform: rotate(var(--chip-r, 0deg));
}

.roulette-stack .top-chip {
  outline: 2px solid rgba(255,255,255,.68);
}

.roulette-chip[aria-pressed="true"] {
  outline: 3px solid #f4d27b;
}

.chip-25 { background: #148f4d; color: #fff; border-color: #aef7cd; }
.chip-100 { background: #7f3cc9; color: #fff; border-color: #d9c2ff; }
.chip-1000 { background: #f5c542; color: #111; border-color: #fff0a7; }
.chip-10000 { background: linear-gradient(135deg, #111 0 48%, #d62032 49% 100%); color: #fff; border-color: #ffd4d9; }

.roulette-chip-selector {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.roulette-recent-panel {
  display: grid;
  grid-template-rows: auto minmax(210px, 1fr);
  min-height: 260px;
}

.roulette-recent {
  display: grid;
  align-content: start;
  gap: 7px;
  max-height: min(58vh, 520px);
  overflow-y: auto;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(8,12,18,.58);
}

.roulette-result-row {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 8px;
  align-items: center;
  padding: 7px;
  border-radius: 7px;
  background: rgba(255,255,255,.05);
}

.roulette-result-row div {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.roulette-result-row span:last-child {
  font-size: .75rem;
  color: var(--muted);
}

.roulette-result-badge {
  min-width: 36px;
  padding: 6px 7px;
  border-radius: 999px;
  text-align: center;
  font-weight: 1000;
}

.roulette-result-badge.red { background: #a91d2b; color: #fff; }
.roulette-result-badge.black { background: #111; color: #fff; }
.roulette-result-badge.green { background: #0e7845; color: #fff; }

.roulette-near-seat-controls {
  width: 100%;
  display: grid;
  gap: 6px;
  padding: 7px;
  border: 1px solid rgba(83,167,255,.32);
  border-radius: 8px;
  background: rgba(10, 22, 35, .86);
}

.roulette-near-chip-row,
.roulette-near-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.roulette-near-seat-controls .roulette-chip {
  width: 28px;
  height: 28px;
  font-size: .46rem;
}

@media (max-width: 980px) {
  .roulette-shell {
    grid-template-columns: 1fr;
    grid-template-rows: minmax(610px, 1fr) 310px;
  }
  .roulette-seat {
    width: 112px;
  }
  .roulette-main-layout {
    grid-template-columns: 1fr;
  }
  .roulette-seats-strip {
    grid-template-columns: repeat(2, minmax(110px, 1fr));
  }
  .roulette-number-grid {
    grid-template-columns: repeat(12, minmax(24px, 1fr));
  }
  .roulette-outside-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.seat-action-bubble {
  position: absolute;
  right: -8px;
  top: -8px;
  z-index: 22;
  width: max-content;
  max-width: 124px;
  min-height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px 999px 999px 6px;
  border: 1px solid rgba(255, 255, 255, 0.26);
  background: rgba(247, 251, 255, 0.96);
  color: #111820;
  font-size: 0.68rem;
  font-weight: 950;
  line-height: 1.05;
  padding: 5px 9px;
  text-align: center;
  white-space: normal;
  pointer-events: none;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.34);
  animation: actionBubbleFade 3s ease forwards;
}

.view-pos-0 .seat-action-bubble,
.view-pos-1 .seat-action-bubble,
.view-pos-7 .seat-action-bubble {
  left: 50%;
  right: auto;
  top: -12px;
  transform: translate(-50%, -100%);
}

.view-pos-4 .seat-action-bubble,
.view-pos-3 .seat-action-bubble,
.view-pos-5 .seat-action-bubble {
  left: 50%;
  right: auto;
  top: auto;
  bottom: -12px;
  transform: translate(-50%, 100%);
}

.view-pos-2 .seat-action-bubble {
  left: calc(100% - 18px);
  right: auto;
  top: 10px;
}

.view-pos-6 .seat-action-bubble {
  right: calc(100% - 18px);
  top: 10px;
  border-radius: 999px 999px 6px 999px;
}

.chip-win {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 19;
  min-width: 42px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  border: 2px solid #39f28a;
  background: radial-gradient(circle, #edfff4 0 22%, #39f28a 24% 62%, #0a7038 64% 100%);
  color: #03150c;
  font-size: 0.64rem;
  font-weight: 1000;
  pointer-events: none;
  animation: chipSlideToWinner 3s cubic-bezier(.18,.68,.18,1) forwards;
}

@keyframes chipSlideToWinner {
  0% {
    transform: translate(calc(var(--from-x) - 21px), calc(var(--from-y) - 13px)) scale(0.62);
    opacity: 0;
  }
  12% { opacity: 1; }
  100% {
    transform: translate(calc(var(--to-x) - 21px), calc(var(--to-y) - 13px)) scale(1);
    opacity: 0;
  }
}

@keyframes chipSlideToPot {
  0% {
    transform: translate(calc(var(--from-x) - 17px), calc(var(--from-y) - 12px)) scale(0.9);
    opacity: 0;
  }
  10% { opacity: 1; }
  100% {
    transform: translate(calc(var(--to-x) - 17px), calc(var(--to-y) - 12px)) scale(0.62);
    opacity: 0;
  }
}

@keyframes actionBubbleFade {
  0% {
    opacity: 0;
  }
  12%, 76% {
    opacity: 1;
  }
  100% {
    opacity: 0;
  }
}

.poker-action-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sit-only-form .seat-pick {
  display: grid;
}

.sit-down-button {
  min-height: 54px;
  font-size: 1.05rem;
}

.host-setup-panel,
.host-wait-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-3);
  padding: 0;
  display: block;
  overflow: hidden;
}

.host-setup-panel[hidden],
.host-wait-panel[hidden] {
  display: none;
}

.host-setup-panel label {
  display: grid;
  gap: 5px;
  color: var(--text);
  font-weight: 800;
}

.host-setup-panel summary {
  cursor: pointer;
  padding: 8px 10px;
  color: #f7fbff;
  font-size: 0.8rem;
  font-weight: 900;
  list-style: none;
}

.host-setup-panel summary,
.poker-admin-panel summary {
  min-height: 34px;
  display: block;
}

.host-setup-panel summary::-webkit-details-marker {
  display: none;
}

.host-setup-panel summary::after {
  content: '+';
  float: right;
  color: var(--muted);
}

.host-setup-panel details[open] summary::after {
  content: '-';
}

.host-setup-body,
.host-wait-panel {
  display: grid;
  gap: 8px;
  padding: 9px;
}

.host-setup-body input,
.host-setup-body select {
  min-height: 30px;
  font-size: 0.78rem;
}

.host-blind-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.host-blind-row label {
  min-width: 0;
}

.host-blind-row input {
  width: 100%;
}

.host-bet-readout {
  display: grid;
  gap: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.host-bet-readout strong {
  color: #fff;
}

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

.host-seat-actions span {
  color: #fff;
  font-weight: 900;
  font-size: 0.82rem;
}

.host-start-button.ready:not(:disabled) {
  border-color: rgba(57, 242, 138, 0.88);
  background: #39f28a;
  color: #03150c;
}

.host-ready-reason {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
}

.raise-readout {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  color: var(--text);
  font-size: 0.68rem;
  text-align: center;
}

.raise-readout strong {
  grid-column: 1 / -1;
  font-size: 1.2rem;
  color: #fff;
}

input[type="range"] {
  accent-color: var(--accent);
}

.poker-action-grid .danger {
  grid-column: span 2;
}

.poker-action-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-bottom: 8px;
}

.poker-action-metrics div {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  padding: 7px;
  display: grid;
  gap: 2px;
}

.sound-toggle {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-3);
  padding: 7px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.sound-toggle input {
  width: 18px;
  height: 18px;
}

.poker-action-metrics span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
}

.poker-action-metrics strong {
  font-size: 0.88rem;
}

.poker-chat-panel {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(92px, 1fr) auto;
  gap: 7px;
  margin-top: 8px;
}

.poker-dropdown-rail {
  position: absolute;
  right: 8px;
  top: 92px;
  z-index: 5;
  width: 260px;
  max-height: calc(100dvh - 108px);
  overflow: auto;
  display: grid;
  gap: 8px;
  pointer-events: auto;
}

.poker-dropdown-rail:empty {
  display: none;
}

.poker-admin-panel {
  width: 100%;
  max-height: none;
  overflow: auto;
  background: rgba(15,18,23,.96);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  display: grid;
  gap: 8px;
}

.poker-admin-panel summary {
  cursor: pointer;
  font-weight: 900;
}

.poker-admin-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.poker-admin-summary div {
  border: 1px solid var(--line);
  border-radius: 5px;
  background: var(--panel-3);
  padding: 6px;
  display: grid;
  gap: 2px;
}

.poker-admin-summary span {
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 800;
  text-transform: uppercase;
}

.poker-admin-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.poker-settings-form {
  max-height: 390px;
  overflow: auto;
  padding-right: 4px;
}

.poker-inject-form {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 8px 0;
}

.icon-picker {
  position: fixed;
  right: 380px;
  bottom: 36px;
  z-index: 20;
  width: 300px;
  max-height: 360px;
  overflow: auto;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
  box-shadow: 0 20px 70px rgba(0,0,0,.5);
}

.icon-picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 8px 0;
}

.icon-picker-grid button {
  padding: 0;
  min-height: 58px;
  background: var(--panel-2);
}

.icon-picker-grid img {
  width: 54px;
  height: 54px;
  object-fit: cover;
  border-radius: 50%;
}

.status-message,
.poker-action-metrics strong,
.poker-action-metrics span {
  color: #fff;
}

.poker-action-metrics div {
  background: #263142;
}

.poker-settings-form label span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.poker-settings-form input[type="checkbox"] {
  width: auto;
  min-height: auto;
}

.poker-chat {
  height: 120px;
  padding: 8px;
  display: grid;
  align-content: start;
  gap: 5px;
  font-size: 0.78rem;
}

.poker-chat li {
  list-style: none;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 6px;
  align-items: baseline;
}

.poker-chat span:last-child {
  min-width: 0;
  overflow-wrap: anywhere;
}

.poker-log {
  margin-top: 10px;
  padding: 8px;
  font-size: 0.78rem;
  color: var(--muted);
  max-height: 80px;
}

@media (max-width: 980px) {
  .shell {
    width: calc(100vw - 16px);
    padding: 8px 0;
    gap: 8px;
  }

  .app-header {
    flex-basis: 116px;
    grid-template-columns: 1fr;
    align-content: start;
  }

  .hand-history-top-button {
    justify-self: start;
  }

  .nav-actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .dashboard-grid {
    gap: 8px;
  }

  .lobby-grid,
  .admin-grid,
  .poker-shell {
    grid-template-columns: 1fr;
  }

  .lobby-main-stack,
  .admin-grid {
    overflow: hidden;
  }

  .poker-table-panel,
  .poker-controls-panel {
    min-height: 0;
  }

  .table-center {
    inset: 34% 12%;
    grid-template-columns: 1fr 1fr;
    grid-auto-rows: minmax(74px, auto);
    height: auto;
  }

  .community {
    width: 100%;
  }

  .community .cards {
    width: 100%;
    grid-template-columns: repeat(5, 1fr);
  }

  .board-card-slot {
    width: 100%;
  }

  .hand-result-banner {
    top: auto;
    bottom: 8px;
    width: calc(100% - 16px);
    min-height: 0;
    max-height: 128px;
    padding: 8px;
  }

  .result-sections {
    grid-template-columns: 1fr;
  }

  .poker-seat {
    width: 118px;
    height: 118px;
    font-size: 0.62rem;
  }

  .poker-seat .card {
    width: 34px;
    height: 48px;
    min-width: 34px;
    min-height: 48px;
    font-size: 0.74rem;
  }

  .poker-seat .card i {
    font-size: 0.86rem;
  }

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

  .poker-action-grid .danger {
    grid-column: auto;
  }
}

/* JEFF HOTFIX: make the black COMMUNITY card panel taller */
.community {
  min-height: 86px !important;
  height: 86px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
  overflow: visible !important;
  align-items: center !important;
}

.community .card,
.community .board-card-slot,
.board-card-slot .card {
  overflow: visible !important;
}

