:root {
  --bg: #0a120e;
  --bg-elevated: #111a14;
  --bg-card: rgba(16, 26, 20, 0.82);
  --felt: rgba(34, 120, 78, 0.22);
  --border: rgba(94, 255, 168, 0.12);
  --border-strong: rgba(94, 255, 168, 0.35);
  --text: #ecf8f0;
  --text-muted: #8fb09a;
  --neon: #5cffa8;
  --neon-dim: rgba(92, 255, 168, 0.14);
  --neon-glow: rgba(92, 255, 168, 0.45);
  --gold: #ffd76a;
  --primary: #5cffa8;
  --primary-hover: #7dffc0;
  --primary-text: #062116;
  --danger: #ff6b7a;
  --info: #5cffa8;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 20px 50px rgba(0, 0, 0, 0.55);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.mono {
  font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-variant-numeric: tabular-nums;
}

.bg-grid {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.35;
  background-image:
    linear-gradient(rgba(92, 255, 168, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 255, 168, 0.04) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 20%, transparent 75%);
}

.bg-decor {
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(ellipse 80% 55% at 50% -10%, rgba(92, 255, 168, 0.16), transparent 55%),
    radial-gradient(ellipse 60% 40% at 100% 100%, var(--felt), transparent 50%),
    radial-gradient(ellipse 40% 35% at 0% 90%, rgba(92, 255, 168, 0.06), transparent 45%),
    linear-gradient(180deg, #08100c, #0c1510 45%, #0a120e);
}

.app {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 16px calc(22px + var(--safe-bottom));
  pointer-events: auto;
}

@media (min-width: 900px) {
  .app.is-table-live {
    max-width: min(1680px, 97vw);
    padding-left: 20px;
    padding-right: 20px;
  }
}

@media (min-width: 1500px) {
  .app.is-table-live {
    max-width: min(1920px, 98vw);
  }
}

.app:not(.is-ready) {
  opacity: 0.92;
}

.app.is-ready {
  opacity: 1;
}

.glass {
  background: var(--bg-card);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  margin: 0 -16px;
  padding: 14px 16px;
  background: rgba(8, 16, 12, 0.82);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--border);
}

.topbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-mark {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 16px;
  font-size: 1.35rem;
  color: var(--neon);
  background: var(--neon-dim);
  border: 1px solid var(--border-strong);
  box-shadow: 0 0 24px rgba(92, 255, 168, 0.15);
}

.brand-mark .mark-red {
  color: #ff7b8a;
  margin-left: 2px;
}

.brand h1 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.brand-sub {
  margin: 3px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.session-bar {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  font-size: 0.78rem;
  font-weight: 600;
  border-radius: 999px;
}

.pill-gold {
  color: var(--gold);
  background: rgba(255, 215, 106, 0.1);
  border: 1px solid rgba(255, 215, 106, 0.35);
}

.main {
  flex: 1;
  padding-top: 14px;
}

.panel {
  border-radius: var(--radius);
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.panel-icon {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  color: var(--neon);
  background: var(--neon-dim);
  border: 1px solid var(--border-strong);
}

.panel-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.panel-desc {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--text-muted);
}

.controls-grid {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .controls-grid {
    grid-template-columns: 1fr auto;
    align-items: end;
  }
}

.field-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

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

.field input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  font-size: 16px;
  color: var(--text);
  background: rgba(6, 12, 9, 0.75);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  outline: none;
  transition: box-shadow 0.2s, border-color 0.2s;
}

.field input:focus {
  border-color: var(--neon);
  box-shadow: 0 0 0 3px rgba(92, 255, 168, 0.18);
}

.actions {
  display: flex;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  font-size: 0.94rem;
  font-weight: 700;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.2s;
  flex: 1;
}

@media (min-width: 640px) {
  .btn {
    flex: 0 0 auto;
  }
}

.btn:active {
  transform: scale(0.98);
}

.btn-primary {
  color: var(--primary-text);
  background: linear-gradient(135deg, #5cffa8 0%, #3de890 100%);
  box-shadow: 0 8px 28px var(--neon-glow);
}

.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-hover) 0%, #5cffa8 100%);
}

.btn-primary.is-running {
  background: linear-gradient(135deg, #4db8ff 0%, #2a8fd4 100%);
  color: #fff;
  box-shadow: 0 8px 28px rgba(77, 184, 255, 0.35);
}

.btn-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.25);
}

.btn-dot.is-live {
  background: #fff;
  animation: live-pulse 1.4s ease infinite;
}

@keyframes live-pulse {
  50% { opacity: 0.4; transform: scale(0.85); }
}

.btn-ghost {
  color: var(--text);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.85rem;
}

.status-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
}

.status-line {
  margin: 0;
  font-size: 0.86rem;
  color: var(--text-muted);
}

.status-line.is-busy::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
  background: var(--neon);
  animation: pulse 1s ease infinite;
}

@keyframes pulse {
  50% { opacity: 0.35; }
}

.update-line {
  margin: 0;
  font-size: 0.76rem;
  color: var(--text-muted);
}

.flash:not(:empty) {
  margin-top: 14px;
  padding: 12px 16px;
  text-align: center;
  font-weight: 700;
  color: var(--gold);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 215, 106, 0.3);
  background: rgba(255, 215, 106, 0.08);
}

.content {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* —— 顶栏数据条 —— */
.live-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border-color: var(--border-strong);
}

@media (min-width: 720px) {
  .live-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .live-item-wide {
    grid-column: span 1;
  }
}

.live-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(6, 12, 9, 0.55);
  border: 1px solid rgba(92, 255, 168, 0.08);
}

.live-k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.live-v {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--neon);
  text-shadow: 0 0 20px rgba(92, 255, 168, 0.35);
}

/* —— 玩家主舞台 —— */
.showcase-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 560px) {
  .showcase-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .showcase-grid:not(.showcase-grid-seats) {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 9 座桌台：桌面 4～5 列，超宽屏一行 9 张 */
.showcase-grid-seats {
  gap: 10px;
}

@media (min-width: 720px) {
  .showcase-grid-seats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 900px) {
  .showcase-grid-seats {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
}

@media (min-width: 1100px) {
  .showcase-grid-seats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

@media (min-width: 1680px) {
  .showcase-grid-seats {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
  }
}

.showcase-grid-seats .showcase-card {
  padding: 10px 10px 8px;
  border-radius: var(--radius-sm);
}

.showcase-grid-seats .showcase-card:hover {
  transform: translateY(-2px);
}

.showcase-grid-seats .showcase-head {
  margin-bottom: 4px;
  gap: 6px;
}

.showcase-grid-seats .player-id {
  gap: 7px;
}

.showcase-grid-seats .player-avatar,
.showcase-grid-seats .player-avatar-fallback {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.showcase-grid-seats .player-avatar-fallback {
  font-size: 0.88rem;
}

.showcase-grid-seats .showcase-name {
  font-size: 0.82rem;
}

.showcase-grid-seats .seat-tag {
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  font-size: 0.72rem;
}

.showcase-grid-seats .showcase-pos {
  margin: 0 0 8px;
  font-size: 0.68rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 6px;
}

.showcase-grid-seats .pos-pill {
  padding: 2px 7px;
  font-size: 0.62rem;
}

.showcase-grid-seats .pos-meta {
  margin-left: 0;
  font-size: 0.65rem;
}

.showcase-grid-seats .pcards {
  gap: 10px;
  padding: 6px 0 4px;
  justify-content: center;
}

.showcase-grid-seats .poker-card {
  width: 80px;
  height: 112px;
  border-radius: 11px;
  flex-shrink: 0;
}

.showcase-grid-seats .pc-tl {
  top: 6px;
  left: 7px;
}

.showcase-grid-seats .pc-br {
  bottom: 6px;
  right: 7px;
  display: flex;
}

.showcase-grid-seats .pc-rank {
  font-size: 1.05rem;
  font-weight: 900;
  line-height: 1.05;
}

.showcase-grid-seats .pc-suit {
  font-size: 0.82rem;
  margin-top: 2px;
}

.showcase-grid-seats .pc-center {
  font-size: 2.15rem;
  opacity: 0.48;
  font-weight: 700;
}

@media (min-width: 1100px) {
  .showcase-grid-seats .poker-card {
    width: 88px;
    height: 122px;
    border-radius: 12px;
  }

  .showcase-grid-seats .pc-rank {
    font-size: 1.12rem;
  }

  .showcase-grid-seats .pc-suit {
    font-size: 0.88rem;
  }

  .showcase-grid-seats .pc-center {
    font-size: 2.35rem;
  }
}

.showcase-grid-seats .showcase-foot {
  margin-top: 8px;
  padding-top: 8px;
  gap: 4px 8px;
  font-size: 0.68rem;
  justify-content: space-between;
}

.showcase-grid-seats .showcase-foot-uid {
  display: none;
}

@media (min-width: 1280px) {
  .showcase-grid-seats .showcase-foot-uid {
    display: inline;
    opacity: 0.65;
    font-size: 0.62rem;
  }
}

@media (min-width: 1680px) {
  .showcase-grid-seats .poker-card {
    width: 96px;
    height: 132px;
  }

  .showcase-grid-seats .pc-rank {
    font-size: 1.18rem;
  }

  .showcase-grid-seats .pc-center {
    font-size: 2.5rem;
  }
}

.showcase-card {
  border-radius: var(--radius);
  padding: 16px 16px 14px;
  border-color: rgba(92, 255, 168, 0.22);
  transition: transform 0.2s, box-shadow 0.2s;
}

.showcase-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(92, 255, 168, 0.25);
}

.showcase-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.player-id {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.player-avatar {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  border: 2px solid rgba(92, 255, 168, 0.35);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
  background: rgba(6, 12, 9, 0.8);
}

.player-avatar.is-broken {
  display: none;
}

.player-avatar-fallback {
  display: none;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-weight: 800;
  font-size: 1.1rem;
  color: var(--primary-text);
  background: linear-gradient(145deg, #5cffa8, #3de890);
  box-shadow: 0 0 16px var(--neon-glow);
}

.player-avatar-fallback.is-show {
  display: inline-flex;
}

.player-id-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.showcase-name {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--neon);
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vip-tag {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--gold);
}

.cell-player .player-id {
  gap: 8px;
}

.cell-player .player-avatar,
.cell-player .player-avatar-fallback {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  font-size: 0.95rem;
}

.cell-player .showcase-name {
  font-size: 0.88rem;
}

.showcase-pos {
  margin: 0 0 14px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.showcase-foot {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px dashed var(--border);
  font-size: 0.78rem;
  color: var(--text-muted);
}

.showcase-foot b {
  color: var(--text);
}

/* —— 扑克牌 —— */
.pcards {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  padding: 8px 0 4px;
}

.pcards-inline {
  justify-content: flex-start;
  padding: 0;
  gap: 6px;
}

.pcards-empty {
  min-height: 88px;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.poker-card {
  position: relative;
  width: 72px;
  height: 100px;
  border-radius: 14px;
  color: #fff;
  box-shadow:
    0 10px 24px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transform: perspective(600px) rotateX(2deg);
  transition: transform 0.2s;
}

.pcards-inline .poker-card {
  width: 44px;
  height: 62px;
  border-radius: 10px;
}

.showcase-card .poker-card:hover {
  transform: perspective(600px) rotateX(0deg) translateY(-4px) scale(1.03);
}

.poker-card.suit-h {
  background: linear-gradient(145deg, #ff5c7a 0%, #c92d4a 100%);
}

.poker-card.suit-d {
  background: linear-gradient(145deg, #4da3ff 0%, #1f6fd1 100%);
}

.poker-card.suit-c {
  background: linear-gradient(145deg, #45d68a 0%, #1e9c5a 100%);
}

.poker-card.suit-s {
  background: linear-gradient(145deg, #4a5568 0%, #222a36 100%);
}

.poker-card.suit-u {
  background: linear-gradient(145deg, #666 0%, #333 100%);
}

.pc-corner {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  line-height: 1;
  font-weight: 800;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}

.pc-tl {
  top: 7px;
  left: 8px;
}

.pc-br {
  bottom: 7px;
  right: 8px;
  transform: rotate(180deg);
}

.pcards-inline .pc-tl {
  top: 4px;
  left: 5px;
}

.pcards-inline .pc-br {
  display: none;
}

.pc-rank {
  font-size: 0.95rem;
}

.pcards-inline .pc-rank {
  font-size: 0.72rem;
}

.pc-suit {
  font-size: 0.72rem;
  margin-top: 1px;
}

.pcards-inline .pc-suit {
  font-size: 0.55rem;
}

.pc-center {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  opacity: 0.35;
}

.pcards-inline .pc-center {
  font-size: 1.2rem;
}

/* —— 通用卡片 —— */
.card {
  border-radius: var(--radius);
  padding: 16px 18px;
}

.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.card-icon {
  color: var(--neon);
  font-size: 0.9rem;
}

.card-title {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--neon);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card-mini {
  padding: 14px 16px;
}

.seat-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--primary-text);
  background: var(--neon);
  border-radius: 999px;
  box-shadow: 0 0 16px var(--neon-glow);
}

.badge {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 700;
  border-radius: 999px;
  background: var(--neon-dim);
  color: var(--neon);
  border: 1px solid var(--border-strong);
}

.badge-live {
  background: rgba(255, 107, 122, 0.15);
  color: #ff9aa5;
  border-color: rgba(255, 107, 122, 0.35);
}

.badge-wait {
  background: rgba(255, 215, 106, 0.12);
  color: var(--gold);
}

.badge-done {
  color: var(--text-muted);
  border-color: var(--border);
}

.pos-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pos-chip {
  padding: 7px 12px;
  font-size: 0.78rem;
  color: var(--text-muted);
  background: rgba(6, 12, 9, 0.6);
  border: 1px solid var(--border);
  border-radius: 999px;
}

.pos-chip b {
  color: var(--neon);
  margin-left: 4px;
}

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

@media (min-width: 768px) {
  .meta-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.meta-item {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: rgba(6, 12, 9, 0.55);
  border: 1px solid rgba(255, 255, 255, 0.04);
}

.meta-item .k {
  display: block;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.meta-item .v {
  font-weight: 600;
}

.fold-panel {
  border-radius: var(--radius);
  padding: 0;
  overflow: hidden;
}

.fold-panel summary {
  cursor: pointer;
  list-style: none;
  padding: 14px 18px;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid transparent;
}

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

.fold-panel summary::after {
  content: "＋";
  float: right;
  color: var(--neon);
}

.fold-panel[open] summary::after {
  content: "－";
}

.fold-panel[open] summary {
  border-bottom-color: var(--border);
}

.meta-grid-fold,
.fold-panel .table-shell {
  margin: 14px 16px 16px;
}

.table-shell {
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(6, 12, 9, 0.45);
  overflow: hidden;
}

.table-wrap {
  overflow-x: auto;
}

table.data {
  width: 100%;
  min-width: 480px;
  border-collapse: collapse;
  font-size: 0.86rem;
}

table.data th,
table.data td {
  padding: 11px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

table.data th {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.25);
}

table.data tbody tr:hover {
  background: rgba(92, 255, 168, 0.05);
}

.empty-hint {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  padding: 18px;
  color: var(--text-muted);
}

.footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 28px;
  padding-top: 16px;
  font-size: 0.72rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
}

.footer-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--neon);
  animation: live-pulse 1.4s ease infinite;
}

/* Login */
.login-page {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 28px 16px;
}

.login-wrap {
  width: 100%;
  max-width: 440px;
}

.login-card {
  position: relative;
  border-radius: calc(var(--radius) + 4px);
  padding: 32px 28px;
}

.login-suits {
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 0.75rem;
  letter-spacing: 0.35em;
  color: rgba(92, 255, 168, 0.15);
}

.login-brand {
  margin-bottom: 26px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.btn-block {
  width: 100%;
}

.login-error {
  margin: 0;
  padding: 11px 14px;
  font-size: 0.86rem;
  color: #ff9aa5;
  background: rgba(255, 107, 122, 0.1);
  border: 1px solid rgba(255, 107, 122, 0.32);
  border-radius: var(--radius-sm);
}

.login-error[hidden] {
  display: none;
}

/* —— v8 layout & UX —— */
.dock {
  position: sticky;
  top: 72px;
  z-index: 15;
  border-color: rgba(92, 255, 168, 0.22);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.35), 0 0 0 1px rgba(92, 255, 168, 0.08);
}

.dock-compact.panel {
  padding: 10px 12px;
}

.dock-compact {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28), 0 0 0 1px rgba(92, 255, 168, 0.08);
}

.dock-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.dock-compact .dock-field {
  flex: 1 1 160px;
  min-width: 0;
  max-width: 100%;
  gap: 4px;
}

@media (min-width: 720px) {
  .dock-compact .dock-field {
    flex: 0 1 240px;
    max-width: min(32vw, 280px);
  }

  .dock-compact .field-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
}

.dock-actions {
  flex: 0 0 auto;
  gap: 8px;
}

.dock-compact .btn-compact {
  min-height: 40px;
  padding: 0 16px;
  font-size: 0.86rem;
  box-shadow: none;
}

.dock-compact .btn-primary.btn-compact {
  box-shadow: 0 4px 16px rgba(92, 255, 168, 0.28);
}

.dock-compact .btn-primary.is-running {
  box-shadow: 0 4px 16px rgba(77, 184, 255, 0.28);
}

.dock-compact .field input {
  min-height: 40px;
  padding: 8px 12px;
  font-size: 0.92rem;
}

.dock-compact .btn-icon-sm {
  min-width: 40px;
  min-height: 40px;
  font-size: 1rem;
}

.dock-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 8px;
  flex: 1 1 100%;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: none;
}

@media (min-width: 960px) {
  .dock-meta {
    flex: 1 1 auto;
    justify-content: flex-end;
    margin-left: auto;
  }
}

.dock-meta .status-line,
.dock-meta .update-line {
  margin: 0;
  font-size: 0.72rem;
  line-height: 1.35;
  color: var(--text-muted);
}

.dock-meta .update-line:empty {
  display: none;
}

.dock-meta-dot {
  display: none;
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: var(--text-muted);
  opacity: 0.5;
}

@media (min-width: 960px) {
  .dock-meta-dot {
    display: inline-block;
  }

  .dock-meta .update-line:not(:empty) ~ .dock-meta-dot,
  .dock-meta .status-line:not(:empty) + .dock-meta-dot {
    display: inline-block;
  }
}

.dock-compact .run-timer {
  padding: 4px 10px;
  font-size: 0.72rem;
  min-height: 0;
}

.dock-compact .status-line.is-busy::before {
  width: 6px;
  height: 6px;
  margin-right: 6px;
}

@media (max-width: 639px) {
  .dock {
    top: 64px;
  }
}

.field-room {
  flex: 1;
}

.input-wrap {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.input-wrap input {
  flex: 1;
  min-width: 0;
}

.btn-icon {
  min-width: 48px;
  min-height: 48px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(6, 12, 9, 0.65);
  color: var(--neon);
  font-size: 1.1rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.btn-icon:hover {
  background: var(--neon-dim);
  border-color: var(--border-strong);
}

.status-row {
  align-items: flex-end;
}

.status-main {
  flex: 1;
  min-width: 0;
}

.run-timer {
  margin: 0;
  padding: 6px 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neon);
  background: rgba(92, 255, 168, 0.08);
  border: 1px solid rgba(92, 255, 168, 0.2);
  border-radius: 999px;
  white-space: nowrap;
}

.run-timer:empty {
  display: none;
}

.welcome-card {
  padding: 22px 20px;
  border-radius: var(--radius);
  border: 1px dashed rgba(92, 255, 168, 0.25);
}

.welcome-card h2 {
  margin: 0 0 8px;
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--neon);
}

.welcome-card p {
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 0.92rem;
}

.welcome-list {
  margin: 0;
  padding-left: 1.1rem;
  color: var(--text-muted);
  font-size: 0.86rem;
  display: grid;
  gap: 6px;
}

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 4px 2px 10px;
}

.section-title {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--text);
}

.section-desc {
  margin: 0;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.live-item-name .live-v-sm {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  text-shadow: none;
  line-height: 1.35;
}

.live-v-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 0.9rem;
}

@media (min-width: 900px) {
  .live-strip {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }
}

.showcase-card {
  background:
    linear-gradient(165deg, rgba(92, 255, 168, 0.07), transparent 42%),
    var(--bg-card);
}

.showcase-card::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(92, 255, 168, 0.45), transparent 40%, rgba(255, 215, 106, 0.25));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.showcase-card {
  position: relative;
  overflow: hidden;
}

.pos-pill {
  display: inline-flex;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--primary-text);
  background: var(--neon);
}

.pos-meta {
  margin-left: 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.showcase-pos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.topbar {
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.brand h1 {
  letter-spacing: 0.08em;
}

.fold-panel summary {
  font-size: 0.9rem;
  letter-spacing: 0.02em;
}

.poker-card {
  animation: card-deal 0.45s ease both;
}

@keyframes card-deal {
  from {
    opacity: 0;
    transform: perspective(600px) rotateX(8deg) translateY(8px);
  }
  to {
    opacity: 1;
    transform: perspective(600px) rotateX(2deg);
  }
}

.club-picker {
  padding: 18px 20px 20px;
  border-radius: var(--radius);
}

.club-picker-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px 16px;
  margin-bottom: 16px;
}

.club-picker-intro {
  margin-bottom: 0;
  flex: 1 1 220px;
}

.club-picker-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.cp-stat {
  font-size: 0.75rem;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text-muted);
}

.cp-stat strong {
  color: var(--neon);
  font-weight: 800;
}

.cp-stat-live {
  border-color: rgba(92, 255, 168, 0.35);
  background: var(--neon-dim);
  color: var(--neon);
}

.cp-stat-muted {
  max-width: 220px;
  line-height: 1.35;
}

.club-picker-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: minmax(0, 1fr);
  max-height: min(62vh, 680px);
  overflow-y: auto;
  padding: 2px 4px 4px 2px;
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 255, 168, 0.35) transparent;
}

.club-picker-grid::-webkit-scrollbar {
  width: 6px;
}

.club-picker-grid::-webkit-scrollbar-thumb {
  background: rgba(92, 255, 168, 0.28);
  border-radius: 999px;
}

@media (min-width: 560px) {
  .club-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 960px) {
  .club-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.club-pick-btn {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 0;
  padding: 14px 16px 13px;
  text-align: left;
  cursor: pointer;
  font: inherit;
  appearance: none;
  -webkit-appearance: none;
  color: var(--text);
  background: linear-gradient(145deg, rgba(14, 24, 18, 0.92), rgba(8, 14, 11, 0.78));
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  transition:
    border-color 0.15s,
    background 0.15s,
    transform 0.12s,
    box-shadow 0.15s;
  animation: picker-in 0.38s ease both;
}

.club-pick-btn.is-active-table {
  border-color: rgba(92, 255, 168, 0.42);
  box-shadow:
    0 8px 28px rgba(0, 0, 0, 0.32),
    inset 0 0 0 1px rgba(92, 255, 168, 0.08);
}

.club-pick-btn:hover {
  border-color: var(--border-strong);
  background: linear-gradient(145deg, rgba(20, 36, 26, 0.95), rgba(10, 20, 14, 0.88));
  transform: translateY(-2px);
  box-shadow:
    0 12px 32px rgba(0, 0, 0, 0.38),
    0 0 0 1px rgba(92, 255, 168, 0.12);
}

.club-pick-btn:active {
  transform: translateY(0);
}

.club-pick-btn:focus-visible {
  outline: 2px solid var(--neon);
  outline-offset: 2px;
}

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

.cp-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-height: 1.25rem;
}

.cp-name {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cp-room {
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--neon);
  line-height: 1.2;
}

.cp-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.cp-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 8px;
  font-size: 0.78rem;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: var(--text);
}

.cp-chip-dim {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.cp-chip-k {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.cp-badge {
  flex-shrink: 0;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
}

.cp-badge.is-live {
  color: #062116;
  background: var(--neon);
  box-shadow: 0 0 12px var(--neon-glow);
}

.cp-badge.is-wait {
  color: var(--gold);
  background: rgba(255, 215, 106, 0.12);
  border: 1px solid rgba(255, 215, 106, 0.35);
}

.cp-badge.is-done {
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.cp-meta {
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.45;
}

.welcome-card strong {
  color: var(--neon);
}

/* —— v11 整体质感 —— */
.glass {
  box-shadow:
    var(--shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.topbar {
  background: linear-gradient(180deg, rgba(10, 18, 14, 0.94), rgba(8, 14, 11, 0.88));
}

.topbar::after {
  content: "";
  display: block;
  height: 1px;
  margin-top: 14px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(92, 255, 168, 0.45),
    rgba(255, 215, 106, 0.25),
    transparent
  );
}

.brand-mark {
  background: linear-gradient(145deg, rgba(92, 255, 168, 0.18), rgba(6, 12, 9, 0.5));
}

.dock {
  background:
    linear-gradient(165deg, rgba(92, 255, 168, 0.06), transparent 55%),
    var(--bg-card);
}

.field input {
  background: rgba(4, 10, 7, 0.82);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.live-hud {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(92, 255, 168, 0.05), transparent 38%),
    var(--bg-card);
}

.live-hud::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 80% at 50% -20%, rgba(92, 255, 168, 0.12), transparent 55%);
}

.live-item-accent {
  border-color: rgba(92, 255, 168, 0.22);
  background: rgba(92, 255, 168, 0.06);
}

.hand-pos-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
}

.hand-pos-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-right: 4px;
}

.pos-chip-hud {
  padding: 6px 14px;
  font-size: 0.75rem;
  background: rgba(0, 0, 0, 0.28);
  border-color: rgba(92, 255, 168, 0.15);
}

.section-head-table {
  align-items: center;
  margin-top: 4px;
}

.section-head-main {
  min-width: 0;
}

.section-pill {
  flex-shrink: 0;
  padding: 6px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--neon);
  border-radius: 999px;
  border: 1px solid rgba(92, 255, 168, 0.28);
  background: rgba(92, 255, 168, 0.08);
}

.table-stage {
  position: relative;
  padding: 18px 14px 14px;
  border-radius: calc(var(--radius) + 4px);
  border: 1px solid rgba(92, 255, 168, 0.14);
  background:
    radial-gradient(ellipse 85% 55% at 50% 0%, rgba(34, 120, 78, 0.35), transparent 62%),
    radial-gradient(ellipse 100% 80% at 50% 100%, rgba(6, 20, 12, 0.9), rgba(4, 10, 7, 0.95));
  box-shadow:
    inset 0 0 80px rgba(0, 0, 0, 0.35),
    0 24px 48px rgba(0, 0, 0, 0.35);
}

.table-stage::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: calc(var(--radius) - 4px);
  border: 1px dashed rgba(92, 255, 168, 0.1);
  pointer-events: none;
}

.table-stage .showcase-grid-seats {
  position: relative;
  z-index: 1;
}

.showcase-grid-seats .poker-card {
  animation: none;
}

.foot-stat {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.foot-stat-k {
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.foot-stat b {
  font-size: 0.82rem;
  color: var(--text);
}

.foot-stat-dim b {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.showcase-grid-seats .showcase-foot {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}

.fold-panel-premium summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  background: rgba(0, 0, 0, 0.18);
  transition: background 0.15s;
}

.fold-panel-premium summary:hover {
  background: rgba(92, 255, 168, 0.06);
}

.fold-panel-premium summary::after {
  content: "";
  float: none;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--neon);
  border-bottom: 2px solid var(--neon);
  transform: rotate(-45deg);
  transition: transform 0.2s;
  opacity: 0.85;
}

.fold-panel-premium[open] summary::after {
  transform: rotate(45deg);
  margin-top: -4px;
}

.fold-summary-meta {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-left: auto;
  margin-right: 8px;
}

.table-shell-premium {
  border-color: rgba(92, 255, 168, 0.12);
}

table.data-premium tbody tr:nth-child(even) {
  background: rgba(0, 0, 0, 0.12);
}

table.data-premium td.cell-muted {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.welcome-card {
  border-style: solid;
  border-color: rgba(92, 255, 168, 0.18);
  padding: 26px 22px;
  background:
    linear-gradient(145deg, rgba(92, 255, 168, 0.08), transparent 45%),
    var(--bg-card);
}

.welcome-eyebrow {
  margin: 0 0 8px;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.2em;
  color: var(--gold);
}

.welcome-hero h2 {
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--text);
}

.welcome-lead {
  margin: 0 0 22px;
  max-width: 36em;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.welcome-steps {
  display: grid;
  gap: 10px;
}

@media (min-width: 720px) {
  .welcome-steps {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.welcome-step {
  display: flex;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.welcome-step-n {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--neon);
  opacity: 0.7;
}

.welcome-step strong {
  display: block;
  margin-bottom: 4px;
  font-size: 0.88rem;
}

.welcome-step p {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.45;
  color: var(--text-muted);
}

.welcome-step code {
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 0.72rem;
  color: var(--neon);
}

.footer {
  opacity: 0.85;
  letter-spacing: 0.06em;
}

.flash:not(:empty) {
  animation: flash-in 0.35s ease;
}

@keyframes flash-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
