/* =========================================================
   皇家德扑 · ROYAL HOLD'EM  —  主样式
   深绿绒布 + 香槟金，纯 CSS 无外部资源依赖
   ========================================================= */
:root {
  --gold-1: #f4e3b2;
  --gold-2: #e2c479;
  --gold-3: #b98f3d;
  --gold-line: rgba(226, 196, 121, 0.45);
  --felt-1: #146b4c;
  --felt-2: #0b4432;
  --felt-3: #062a20;
  --ink: #07100d;
  --text: #eef3ee;
  --muted: #9fb2a9;
  --dim: #6d817a;
  --danger: #e06a6a;
  --ok: #63d6a4;
  --card-w: clamp(38px, 5.2vw, 62px);
  --radius: 16px;
  --shadow-lg: 0 24px 60px rgba(0, 0, 0, 0.55);
  --sans: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Segoe UI', sans-serif;
  --serif: 'Songti SC', 'STSong', 'Noto Serif SC', Georgia, 'Times New Roman', serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  background: var(--ink);
  color: var(--text);
  font-family: var(--sans);
  overflow: hidden;
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  background:
    radial-gradient(1200px 800px at 15% -10%, rgba(30, 110, 82, 0.35), transparent 60%),
    radial-gradient(1000px 700px at 90% 110%, rgba(185, 143, 61, 0.16), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(10, 40, 30, 0.55), transparent 70%),
    linear-gradient(160deg, #08110e 0%, #050a08 45%, #040806 100%);
  z-index: -2;
}
body::after {
  content: '';
  position: fixed;
  inset: 0;
  background-image:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, 0.012) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(-45deg, rgba(0, 0, 0, 0.03) 0 1px, transparent 1px 4px);
  pointer-events: none;
  z-index: -1;
}

button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
input { outline: none; }
a { color: var(--gold-2); text-decoration: none; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); }
::-webkit-scrollbar-thumb { background: rgba(226, 196, 121, 0.22); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(226, 196, 121, 0.4); }

.hidden { display: none !important; }

/* ---------------- 通用组件 ---------------- */
.gold-text {
  background: linear-gradient(180deg, #fff6d8 0%, var(--gold-2) 42%, #a97f2f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.18);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
  transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, opacity 0.2s;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.055);
  color: var(--text);
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); background: rgba(255, 255, 255, 0.1); }
.btn:active { transform: translateY(0) scale(0.985); }
.btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }
.btn-gold {
  background: linear-gradient(180deg, #f6e3b0, #dcc078 48%, #b0863a);
  color: #221803;
  border: 1px solid rgba(255, 246, 214, 0.6);
  box-shadow: 0 10px 26px rgba(185, 143, 61, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.55);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25);
}
.btn-gold:hover { box-shadow: 0 14px 32px rgba(185, 143, 61, 0.42), inset 0 1px 0 rgba(255, 255, 255, 0.65); }
.btn-ghost { background: transparent; border-color: rgba(226, 196, 121, 0.28); color: var(--gold-1); }
.btn-ghost:hover { background: rgba(226, 196, 121, 0.08); }
.btn-danger { background: rgba(224, 106, 106, 0.12); border-color: rgba(224, 106, 106, 0.4); color: #ffb3b3; }
.btn-sm { padding: 7px 13px; border-radius: 10px; font-size: 13px; }
.btn-lg { padding: 14px 34px; font-size: 16px; border-radius: 14px; }

.field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 15px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
  border: 1px solid rgba(255, 255, 255, 0.09);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.field:focus-within { border-color: var(--gold-line); box-shadow: 0 0 0 3px rgba(226, 196, 121, 0.08); }
.field input {
  flex: 1;
  background: none;
  border: none;
  font-size: 15px;
  min-width: 0;
}
.field input::placeholder { color: rgba(160, 180, 170, 0.55); }

.panel {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.055), rgba(255, 255, 255, 0.022));
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: var(--radius);
  backdrop-filter: blur(14px) saturate(120%);
}
.section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  letter-spacing: 0.16em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 12px;
}
.section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(226, 196, 121, 0.35), transparent);
}

/* ---------------- 登录页 ---------------- */
#auth-view {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}
.auth-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}
.auth-deco span {
  position: absolute;
  font-family: var(--serif);
  font-size: 220px;
  color: rgba(226, 196, 121, 0.035);
  filter: blur(1px);
  user-select: none;
}
.auth-deco span:nth-child(1) { top: -40px; left: -30px; transform: rotate(-12deg); }
.auth-deco span:nth-child(2) { bottom: -70px; right: -20px; transform: rotate(9deg); color: rgba(20, 107, 76, 0.16); }
.auth-deco span:nth-child(3) { top: 30%; right: 12%; font-size: 120px; color: rgba(226, 196, 121, 0.05); }
.auth-deco span:nth-child(4) { bottom: 18%; left: 10%; font-size: 90px; color: rgba(226, 196, 121, 0.04); }

.auth-card {
  position: relative;
  width: min(430px, 100%);
  padding: 38px 34px 30px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(18, 30, 26, 0.92), rgba(9, 16, 13, 0.94));
  border: 1px solid rgba(226, 196, 121, 0.22);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  text-align: center;
}
.auth-card::before {
  content: '';
  position: absolute;
  inset: 8px;
  border: 1px solid rgba(226, 196, 121, 0.13);
  border-radius: 20px;
  pointer-events: none;
}
.auth-suite { font-size: 26px; letter-spacing: 12px; color: var(--gold-2); margin-bottom: 6px; }
.auth-title {
  font-family: var(--serif);
  font-size: 38px;
  letter-spacing: 0.12em;
  margin: 4px 0 2px;
}
.auth-sub {
  color: var(--dim);
  font-size: 12px;
  letter-spacing: 0.34em;
  text-transform: uppercase;
  margin-bottom: 26px;
}
.auth-tabs {
  display: flex;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 20px;
  border: 1px solid rgba(255, 255, 255, 0.06);
}
.auth-tabs button {
  flex: 1;
  padding: 10px;
  border-radius: 9px;
  color: var(--muted);
  font-weight: 600;
  transition: all 0.2s;
}
.auth-tabs button.on {
  background: linear-gradient(180deg, rgba(226, 196, 121, 0.95), rgba(185, 143, 61, 0.9));
  color: #1e1503;
  box-shadow: 0 6px 18px rgba(185, 143, 61, 0.3);
}
.auth-form { display: grid; gap: 12px; }
.auth-hint { font-size: 12px; color: var(--dim); margin-top: 14px; line-height: 1.7; }

/* ---------------- 大厅 ---------------- */
#lobby-view {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 14px 26px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: rgba(6, 12, 10, 0.62);
  backdrop-filter: blur(18px);
  z-index: 20;
  flex: none;
}
.brand { display: flex; align-items: baseline; gap: 10px; }
.brand-name {
  font-family: var(--serif);
  font-size: 24px;
  letter-spacing: 0.1em;
}
.brand-en { font-size: 10px; letter-spacing: 0.4em; color: var(--dim); text-transform: uppercase; }
.topbar .spacer { flex: 1; }
.chip-balance {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(226, 196, 121, 0.08);
  border: 1px solid rgba(226, 196, 121, 0.28);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  color: var(--gold-1);
}
.chip-icon {
  width: 18px; height: 18px; border-radius: 50%;
  background: conic-gradient(#e2c479 0 25%, #8c6a28 0 50%, #e2c479 0 75%, #8c6a28 0);
  border: 2px solid #f6e6bb;
  box-shadow: 0 0 10px rgba(226, 196, 121, 0.5);
  flex: none;
}
.online-pill {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; color: var(--muted);
}
.online-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ok);
  box-shadow: 0 0 10px var(--ok);
  animation: pulse 2.4s infinite;
}
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 5px 14px 5px 5px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  cursor: pointer;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.09); }
.avatar-sm {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 17px;
  background: linear-gradient(145deg, rgba(226, 196, 121, 0.25), rgba(20, 107, 76, 0.4));
  border: 1px solid rgba(226, 196, 121, 0.4);
  flex: none;
}

.lobby-body {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 22px;
  padding: 22px 26px 26px;
  overflow: hidden;
  min-height: 0;
}
.lobby-main { overflow: auto; padding-right: 4px; min-height: 0; }

.hero {
  position: relative;
  border-radius: 22px;
  padding: 30px 34px;
  margin-bottom: 22px;
  overflow: hidden;
  background:
    radial-gradient(600px 300px at 85% 15%, rgba(226, 196, 121, 0.14), transparent 65%),
    linear-gradient(120deg, rgba(16, 66, 50, 0.9), rgba(7, 24, 19, 0.9));
  border: 1px solid rgba(226, 196, 121, 0.18);
  box-shadow: var(--shadow-lg);
}
.hero::after {
  content: '♠';
  position: absolute;
  right: 34px; top: 50%;
  transform: translateY(-50%);
  font-size: 190px;
  line-height: 1;
  color: rgba(0, 0, 0, 0.22);
  text-shadow: 0 0 40px rgba(226, 196, 121, 0.12);
  pointer-events: none;
}
.hero h1 {
  font-family: var(--serif);
  font-size: clamp(26px, 3.4vw, 40px);
  margin: 0 0 10px;
  letter-spacing: 0.06em;
}
.hero p { margin: 0 0 20px; color: var(--muted); font-size: 14px; max-width: 520px; line-height: 1.8; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.table-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(268px, 1fr));
  gap: 16px;
}
.room-card {
  position: relative;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(170deg, rgba(255, 255, 255, 0.07), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.18s, border-color 0.2s, box-shadow 0.2s;
  overflow: hidden;
}
.room-card:hover {
  transform: translateY(-3px);
  border-color: rgba(226, 196, 121, 0.4);
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.45);
}
.room-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(300px 120px at 100% 0, rgba(226, 196, 121, 0.1), transparent 70%);
  pointer-events: none;
}
.room-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.room-name { font-family: var(--serif); font-size: 19px; letter-spacing: 0.04em; }
.room-tag {
  font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px;
  background: rgba(99, 214, 164, 0.12);
  color: #8fe6bd;
  border: 1px solid rgba(99, 214, 164, 0.28);
  white-space: nowrap;
}
.room-tag.hot { background: rgba(224, 106, 106, 0.14); color: #ff9d9d; border-color: rgba(224, 106, 106, 0.3); }
.room-tag.priv { background: rgba(226, 196, 121, 0.12); color: var(--gold-1); border-color: rgba(226, 196, 121, 0.3); }
.room-blinds { color: var(--gold-2); font-size: 13px; letter-spacing: 0.06em; margin-bottom: 14px; }
.room-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.seat-dots { display: flex; gap: 4px; }
.seat-dot { width: 9px; height: 9px; border-radius: 50%; background: rgba(255, 255, 255, 0.12); }
.seat-dot.on { background: var(--gold-2); box-shadow: 0 0 8px rgba(226, 196, 121, 0.55); }
.room-players { font-size: 12px; color: var(--muted); white-space: nowrap; }
.room-card .btn { margin-top: 16px; width: 100%; }
.room-lock { font-size: 12px; color: var(--dim); }

.lobby-side { display: flex; flex-direction: column; gap: 16px; overflow: auto; min-height: 0; padding-right: 2px; }
.side-card { padding: 18px; }
.friend-row {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 8px;
  border-radius: 11px;
  transition: background 0.15s;
}
.friend-row:hover { background: rgba(255, 255, 255, 0.045); }
.friend-ava {
  position: relative;
  width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  background: linear-gradient(145deg, rgba(226, 196, 121, 0.2), rgba(20, 107, 76, 0.35));
  border: 1px solid rgba(226, 196, 121, 0.28);
  flex: none;
}
.friend-ava i {
  position: absolute; right: -1px; bottom: -1px;
  width: 10px; height: 10px; border-radius: 50%;
  border: 2px solid #0a1411; background: #4a5a54;
}
.friend-ava i.on { background: var(--ok); box-shadow: 0 0 8px var(--ok); }
.friend-main { flex: 1; min-width: 0; }
.friend-name { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.friend-sub { font-size: 11px; color: var(--dim); margin-top: 2px; font-variant-numeric: tabular-nums; }
.friend-actions { display: flex; gap: 6px; opacity: 0; transition: opacity 0.15s; }
.friend-row:hover .friend-actions { opacity: 1; }
.icon-btn {
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
  background: rgba(255, 255, 255, 0.07);
  font-size: 13px;
  color: var(--text);
}
.icon-btn:hover { background: rgba(226, 196, 121, 0.2); color: var(--gold-1); }
.request-row { display: flex; align-items: center; gap: 8px; padding: 8px; border-radius: 10px; background: rgba(226, 196, 121, 0.06); margin-bottom: 7px; }
.request-row .friend-main { line-height: 1.3; }
.empty-hint { color: var(--dim); font-size: 12.5px; text-align: center; padding: 16px 6px; line-height: 1.8; }

.chat-line { font-size: 13px; line-height: 1.65; padding: 3px 0; word-break: break-word; }
.chat-line b { color: var(--gold-2); font-weight: 600; }
.chat-line .sys { color: var(--dim); font-style: italic; }
.lobby-chat-list { height: 190px; overflow: auto; display: flex; flex-direction: column-reverse; }
.lobby-chat-form { display: flex; gap: 8px; margin-top: 10px; }

/* ---------------- 牌桌 ---------------- */
#table-view {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 600px at 50% 40%, rgba(20, 90, 66, 0.22), transparent 70%),
    linear-gradient(180deg, #071310, #040a08);
}
.table-top {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(4, 10, 8, 0.6);
  backdrop-filter: blur(12px);
  flex: none;
  z-index: 12;
}
.table-title { display: flex; align-items: baseline; gap: 10px; }
.table-title .nm { font-family: var(--serif); font-size: 17px; letter-spacing: 0.05em; }
.table-title .sub { font-size: 11px; color: var(--dim); letter-spacing: 0.08em; }
.table-top .spacer { flex: 1; }

.table-main { flex: 1; position: relative; min-height: 0; display: flex; }
.table-area {
  flex: 1;
  position: relative;
  display: grid;
  place-items: center;
  padding: 12px 18px 8px;
  min-width: 0;
}
.felt-wrap {
  position: relative;
  width: min(1120px, 100%);
  aspect-ratio: 16 / 9.4;
  max-height: 100%;
}
.felt {
  position: absolute;
  inset: 0;
  border-radius: 50% / 46%;
  background:
    radial-gradient(ellipse at 50% 32%, rgba(38, 160, 116, 0.32), transparent 58%),
    radial-gradient(ellipse at 50% 55%, var(--felt-1) 0%, var(--felt-2) 52%, var(--felt-3) 100%);
  border: 12px solid transparent;
  box-shadow:
    inset 0 0 90px rgba(0, 0, 0, 0.7),
    inset 0 2px 0 rgba(255, 255, 255, 0.07),
    0 30px 70px rgba(0, 0, 0, 0.65);
  background-clip: padding-box;
}
.felt::before {
  content: '';
  position: absolute;
  inset: -12px;
  border-radius: 50% / 46%;
  background: linear-gradient(160deg, #3a2a18, #1a1109 45%, #2a1d10);
  z-index: -1;
  box-shadow: inset 0 0 24px rgba(0, 0, 0, 0.9), 0 0 0 1px rgba(226, 196, 121, 0.16);
}
.felt::after {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50% / 46%;
  border: 1px solid rgba(226, 196, 121, 0.13);
  pointer-events: none;
}
.felt-logo {
  position: absolute;
  left: 50%; top: 24%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-family: var(--serif);
  letter-spacing: 0.5em;
  font-size: 13px;
  color: rgba(226, 196, 121, 0.14);
  white-space: nowrap;
  pointer-events: none;
}
.felt-logo small { display: block; font-size: 8px; letter-spacing: 0.3em; margin-top: 4px; color: rgba(255, 255, 255, 0.1); }

.board-area {
  position: absolute;
  left: 50%; top: 47%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 3;
}
.board { display: flex; gap: 7px; min-height: calc(var(--card-w) * 1.42); align-items: center; }
.pot-display {
  display: flex; align-items: center; gap: 8px;
  padding: 5px 14px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(226, 196, 121, 0.24);
  font-size: 13px;
  color: var(--gold-1);
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.25s;
}
.pot-display.bump { transform: scale(1.12); }
.pot-display .pot-label { font-size: 10px; letter-spacing: 0.22em; color: var(--dim); text-transform: uppercase; }
.side-pots { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.side-pot {
  font-size: 10px; color: var(--muted);
  padding: 2px 8px; border-radius: 999px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.07);
}
.stage-tag {
  font-size: 10px; letter-spacing: 0.3em; text-transform: uppercase;
  color: rgba(226, 196, 121, 0.55);
}

/* 座位 */
.seats { position: absolute; inset: 0; z-index: 4; }
.seat {
  position: absolute;
  width: clamp(120px, 13vw, 168px);
  transform: translate(-50%, -50%);
  transition: opacity 0.25s;
}
.seat-0 { left: 50%; top: 96%; }
.seat-1 { left: 12%; top: 84%; }
.seat-2 { left: 9%; top: 30%; }
.seat-3 { left: 50%; top: 6%; }
.seat-4 { left: 91%; top: 30%; }
.seat-5 { left: 88%; top: 84%; }

.seat-pod {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 12px 8px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(20, 32, 28, 0.94), rgba(8, 14, 12, 0.96));
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.5);
  transition: border-color 0.2s, box-shadow 0.25s, transform 0.2s;
}
.seat.active .seat-pod {
  border-color: rgba(226, 196, 121, 0.75);
  box-shadow: 0 0 0 2px rgba(226, 196, 121, 0.2), 0 0 34px rgba(226, 196, 121, 0.35), 0 12px 28px rgba(0, 0, 0, 0.5);
  transform: translateY(-2px);
}
.seat.folded { opacity: 0.48; }
.seat.out .seat-pod { border-style: dashed; }
.seat.offline .seat-pod { filter: grayscale(0.7); }
.seat.winner .seat-pod {
  border-color: #ffe9a8;
  box-shadow: 0 0 0 2px rgba(255, 233, 168, 0.35), 0 0 44px rgba(255, 214, 120, 0.55);
  animation: winPulse 1.4s ease-in-out infinite alternate;
}
@keyframes winPulse {
  from { box-shadow: 0 0 0 2px rgba(255, 233, 168, 0.25), 0 0 30px rgba(255, 214, 120, 0.35); }
  to { box-shadow: 0 0 0 3px rgba(255, 233, 168, 0.45), 0 0 52px rgba(255, 214, 120, 0.65); }
}

.seat-avatar {
  position: relative;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 20px;
  background: linear-gradient(145deg, rgba(226, 196, 121, 0.18), rgba(16, 70, 54, 0.5));
  border: 1px solid rgba(226, 196, 121, 0.3);
  flex: none;
  overflow: hidden;
}
.seat-avatar .ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 1.5px solid transparent;
  pointer-events: none;
}
.seat.active .seat-avatar .ring { border-color: rgba(226, 196, 121, 0.6); }
.seat-info { min-width: 0; flex: 1; }
.seat-name {
  font-size: 12.5px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 88px;
}
.seat-stack {
  font-size: 12.5px;
  color: var(--gold-1);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.seat-stack.low { color: #ff9d9d; }
.seat-badges { display: flex; gap: 4px; margin-top: 3px; }
.badge {
  font-size: 9px; letter-spacing: 0.08em;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(226, 196, 121, 0.16);
  color: var(--gold-1);
  border: 1px solid rgba(226, 196, 121, 0.3);
}
.badge.allin { background: rgba(224, 106, 106, 0.2); color: #ffc2c2; border-color: rgba(224, 106, 106, 0.45); }
.badge.away { background: rgba(140, 160, 150, 0.15); color: #b9c7c0; border-color: rgba(160, 180, 170, 0.25); }
.badge.turn { background: rgba(99, 214, 164, 0.18); color: #a9f0d0; border-color: rgba(99, 214, 164, 0.4); }

.seat-cards {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 2px;
  pointer-events: none;
  z-index: 5;
}
.seat-0 .seat-cards { top: -6%; }
.seat-3 .seat-cards { top: 106%; }
.seat-1 .seat-cards, .seat-2 .seat-cards { left: 108%; }
.seat-4 .seat-cards, .seat-5 .seat-cards { left: -8%; }

.seat-bet {
  position: absolute;
  left: 50%;
  display: flex; align-items: center; gap: 5px;
  font-size: 12px;
  color: var(--gold-1);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  padding: 2px 9px 2px 4px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(226, 196, 121, 0.22);
  transform: translate(-50%, 0);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
}
.seat-bet.show { opacity: 1; }
.seat-0 .seat-bet { top: -34%; }
.seat-3 .seat-bet { bottom: -34%; top: auto; }
.seat-1 .seat-bet, .seat-2 .seat-bet { left: 50%; top: -46%; }
.seat-4 .seat-bet, .seat-5 .seat-bet { left: 50%; top: -46%; }
.mini-chip {
  width: 13px; height: 13px; border-radius: 50%;
  background: conic-gradient(#f0dca8 0 25%, #a17b31 0 50%, #f0dca8 0 75%, #a17b31 0);
  border: 1.5px solid #ffeec2;
  flex: none;
}

.turn-timer {
  position: absolute;
  left: 0; bottom: -3px;
  height: 3px;
  width: 100%;
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
  opacity: 0;
  transition: opacity 0.2s;
}
.seat.active .turn-timer { opacity: 1; }
.turn-timer i {
  display: block;
  height: 100%;
  width: 100%;
  background: linear-gradient(90deg, #63d6a4, #e2c479);
  transition: width 0.12s linear;
}
.seat.empty .seat-pod {
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed rgba(226, 196, 121, 0.22);
  justify-content: center;
  cursor: pointer;
  color: rgba(226, 196, 121, 0.6);
  font-size: 12px;
  letter-spacing: 0.1em;
}
.seat.empty .seat-pod:hover { background: rgba(226, 196, 121, 0.08); border-color: rgba(226, 196, 121, 0.5); }

.dealer-btn {
  position: absolute;
  width: 26px; height: 26px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800;
  color: #241a06;
  background: radial-gradient(circle at 35% 30%, #fff6d0, #e2c479 55%, #9c7327);
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.55), inset 0 1px 2px rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.5);
  transition: left 0.4s cubic-bezier(0.34, 1.4, 0.64, 1), top 0.4s cubic-bezier(0.34, 1.4, 0.64, 1);
  z-index: 6;
}

/* 扑克牌 */
.card {
  position: relative;
  width: var(--card-w);
  height: calc(var(--card-w) * 1.42);
  border-radius: calc(var(--card-w) * 0.13);
  background: linear-gradient(160deg, #ffffff, #eef0ea 70%, #e2e5dd);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.45), inset 0 0 0 1px rgba(255, 255, 255, 0.6);
  color: #1a2320;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex: none;
  user-select: none;
  transform-style: preserve-3d;
}
.card .r {
  font-family: var(--serif);
  font-size: calc(var(--card-w) * 0.46);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.02em;
}
.card .s { font-size: calc(var(--card-w) * 0.36); line-height: 1.1; }
.card.red { color: #c8384a; }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(226, 196, 121, 0.16) 0 2px, transparent 2px 6px),
    radial-gradient(circle at 50% 50%, #12513c, #07281e 75%);
  border: 1px solid rgba(226, 196, 121, 0.35);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5), inset 0 0 0 2px rgba(226, 196, 121, 0.1);
}
.card.back::after {
  content: '♠';
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: calc(var(--card-w) * 0.42);
  color: rgba(226, 196, 121, 0.3);
}
.card.sm { --card-w: clamp(26px, 3.4vw, 40px); }
.card.deal-in { animation: dealIn 0.42s cubic-bezier(0.2, 0.9, 0.3, 1.2) both; }
@keyframes dealIn {
  from { opacity: 0; transform: translateY(-18px) rotate(-6deg) scale(0.86); }
  to { opacity: 1; transform: none; }
}
.card.flip-in { animation: flipIn 0.45s cubic-bezier(0.3, 0.8, 0.3, 1.1) both; }
@keyframes flipIn {
  from { transform: rotateY(90deg) scale(0.96); opacity: 0.4; }
  to { transform: rotateY(0) scale(1); opacity: 1; }
}
.card.win { box-shadow: 0 0 0 2px rgba(255, 220, 130, 0.9), 0 8px 26px rgba(255, 200, 90, 0.45); }

/* 操作区 */
.action-dock {
  position: absolute;
  left: 50%; bottom: 14px;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 32px));
  z-index: 9;
}
.action-panel {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  border-radius: 18px;
  background: linear-gradient(180deg, rgba(14, 24, 20, 0.96), rgba(6, 12, 10, 0.97));
  border: 1px solid rgba(226, 196, 121, 0.22);
  box-shadow: 0 22px 50px rgba(0, 0, 0, 0.62), inset 0 1px 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);
}
.action-panel.waiting {
  justify-content: center;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 0.08em;
  padding: 16px;
}
.act-buttons { display: flex; gap: 8px; flex: none; }
.act-btn {
  min-width: 96px;
  padding: 13px 16px;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.12s, filter 0.2s, box-shadow 0.2s;
}
.act-btn small { font-size: 10px; opacity: 0.7; font-weight: 500; letter-spacing: 0.04em; }
.act-btn:hover { transform: translateY(-2px); filter: brightness(1.08); }
.act-btn:active { transform: translateY(0) scale(0.98); }
.act-btn:disabled { opacity: 0.35; transform: none; filter: none; cursor: not-allowed; }
.act-fold { background: linear-gradient(180deg, rgba(224, 106, 106, 0.18), rgba(120, 40, 40, 0.3)); color: #ffc0c0; border-color: rgba(224, 106, 106, 0.35); }
.act-check, .act-call { background: linear-gradient(180deg, rgba(99, 214, 164, 0.16), rgba(18, 80, 60, 0.35)); color: #b6f3d5; border-color: rgba(99, 214, 164, 0.35); }
.act-raise { background: linear-gradient(180deg, #f6e3b0, #d8b96c 55%, #a97f2f); color: #241a06; border-color: rgba(255, 246, 214, 0.5); box-shadow: 0 8px 20px rgba(185, 143, 61, 0.3); }
.act-allin { background: linear-gradient(180deg, #b93a4b, #7c1f2c); color: #ffe3e3; border-color: rgba(255, 150, 150, 0.4); }

.raise-box { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.raise-head { display: flex; align-items: center; justify-content: space-between; font-size: 11px; color: var(--muted); }
.raise-amount { font-size: 18px; font-weight: 800; color: var(--gold-1); font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
input[type='range'].bet-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: linear-gradient(90deg, rgba(226, 196, 121, 0.75), rgba(255, 255, 255, 0.12));
  outline: none;
}
input[type='range'].bet-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff8dc, #e2c479 60%, #a97f2f);
  border: 1px solid rgba(255, 255, 255, 0.75);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
  cursor: pointer;
}
input[type='range'].bet-range::-moz-range-thumb {
  width: 18px; height: 18px; border: 1px solid #fff;
  border-radius: 50%;
  background: #e2c479;
}
.quick-bets { display: flex; gap: 6px; flex-wrap: wrap; }
.quick-bet {
  font-size: 11px;
  padding: 4px 9px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--muted);
}
.quick-bet:hover { background: rgba(226, 196, 121, 0.16); color: var(--gold-1); border-color: rgba(226, 196, 121, 0.3); }

.my-hand-info {
  position: absolute;
  left: 50%; bottom: calc(100% + 8px);
  transform: translateX(-50%);
  font-size: 11.5px;
  color: var(--gold-1);
  letter-spacing: 0.1em;
  padding: 3px 12px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(226, 196, 121, 0.2);
  white-space: nowrap;
}

/* 侧栏 */
.table-side {
  width: 296px;
  flex: none;
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(5, 11, 9, 0.55);
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.side-tabs { display: flex; padding: 10px 12px 0; gap: 6px; flex: none; }
.side-tabs button {
  flex: 1;
  padding: 8px;
  font-size: 12px;
  color: var(--muted);
  border-radius: 9px 9px 0 0;
  border-bottom: 2px solid transparent;
}
.side-tabs button.on { color: var(--gold-1); border-color: var(--gold-3); background: rgba(226, 196, 121, 0.06); }
.side-body { flex: 1; overflow: auto; padding: 10px 14px; min-height: 0; }
.side-foot { flex: none; padding: 10px 12px 12px; border-top: 1px solid rgba(255, 255, 255, 0.06); }
.log-line {
  font-size: 12px;
  line-height: 1.6;
  padding: 3px 0;
  color: var(--muted);
  border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}
.log-line .t { color: var(--dim); font-size: 10px; margin-right: 6px; font-variant-numeric: tabular-nums; }
.log-line.win { color: var(--gold-1); background: rgba(226, 196, 121, 0.05); padding: 4px 6px; border-radius: 6px; }
.log-line.allin { color: #ffb1b1; }
.log-line.hand { color: #9fe0c1; letter-spacing: 0.06em; }
.chat-form { display: flex; gap: 7px; }
.chat-form .field { flex: 1; padding: 8px 12px; }
.chat-form input { font-size: 13px; }
.emote-row { display: flex; gap: 6px; margin-bottom: 8px; }
.emote-row button {
  width: 32px; height: 32px; border-radius: 9px;
  background: rgba(255, 255, 255, 0.05);
  font-size: 16px;
}
.emote-row button:hover { background: rgba(226, 196, 121, 0.15); }

/* 摊牌提示 */
.win-banner {
  position: absolute;
  left: 50%; top: 30%;
  transform: translate(-50%, -50%) scale(0.9);
  z-index: 8;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s, transform 0.35s;
}
.win-banner.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }
.win-banner .wb-title {
  font-family: var(--serif);
  font-size: clamp(20px, 2.6vw, 30px);
  letter-spacing: 0.06em;
  padding: 10px 28px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(0,0,0,0), rgba(0, 0, 0, 0.55), rgba(0,0,0,0));
  text-shadow: 0 2px 18px rgba(255, 210, 120, 0.6);
}
.win-banner .wb-sub { font-size: 12px; color: var(--gold-2); letter-spacing: 0.2em; margin-top: 6px; }

/* 弹窗 */
.modal-mask {
  position: fixed;
  inset: 0;
  background: rgba(2, 6, 5, 0.72);
  backdrop-filter: blur(6px);
  display: grid;
  place-items: center;
  z-index: 100;
  padding: 20px;
  animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from { opacity: 0; } }
.modal {
  width: min(460px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 26px;
  border-radius: 22px;
  background: linear-gradient(180deg, #13221d, #0a1411);
  border: 1px solid rgba(226, 196, 121, 0.24);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.7);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.9, 0.3, 1.1);
}
@keyframes modalIn { from { transform: translateY(14px) scale(0.97); opacity: 0; } }
.modal h3 {
  font-family: var(--serif);
  font-size: 21px;
  letter-spacing: 0.06em;
  margin: 0 0 6px;
}
.modal .sub { color: var(--dim); font-size: 12.5px; margin-bottom: 20px; line-height: 1.7; }
.modal .form-grid { display: grid; gap: 12px; }
.modal .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 22px; }
.label { font-size: 12px; color: var(--muted); margin-bottom: 6px; display: block; letter-spacing: 0.04em; }
select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  appearance: none;
}
option { background: #0d1b16; }

/* 排行榜 */
.lb-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 8px;
  border-radius: 10px;
}
.lb-row:nth-child(odd) { background: rgba(255, 255, 255, 0.025); }
.lb-rank {
  width: 26px; text-align: center;
  font-family: var(--serif);
  font-size: 16px;
  color: var(--dim);
  flex: none;
}
.lb-row.top1 .lb-rank { color: #ffd97a; text-shadow: 0 0 12px rgba(255, 217, 122, 0.6); }
.lb-row.top2 .lb-rank { color: #d9e1e6; }
.lb-row.top3 .lb-rank { color: #d9a86c; }
.lb-name { flex: 1; font-size: 13.5px; font-weight: 600; }
.lb-chips { font-size: 13px; color: var(--gold-1); font-variant-numeric: tabular-nums; font-weight: 700; }

/* 提示条 */
#toasts {
  position: fixed;
  top: 18px; left: 50%;
  transform: translateX(-50%);
  z-index: 300;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  padding: 10px 20px;
  border-radius: 999px;
  font-size: 13px;
  background: rgba(12, 24, 20, 0.95);
  border: 1px solid rgba(226, 196, 121, 0.3);
  color: var(--text);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  animation: toastIn 0.28s cubic-bezier(0.2, 0.9, 0.3, 1.1);
  max-width: 90vw;
}
.toast.err { border-color: rgba(224, 106, 106, 0.5); color: #ffc4c4; }
.toast.ok { border-color: rgba(99, 214, 164, 0.45); color: #c6f7e1; }
@keyframes toastIn { from { transform: translateY(-12px); opacity: 0; } }
.toast.out { animation: toastOut 0.3s forwards; }
@keyframes toastOut { to { transform: translateY(-10px); opacity: 0; } }

/* 邀请通知 */
.invite-card {
  padding: 12px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(226, 196, 121, 0.14), rgba(226, 196, 121, 0.04));
  border: 1px solid rgba(226, 196, 121, 0.35);
  margin-bottom: 9px;
  font-size: 12.5px;
  line-height: 1.6;
}
.invite-card b { color: var(--gold-1); }
.invite-card .row { display: flex; gap: 7px; margin-top: 9px; }
.invite-card .btn { flex: 1; }

/* 移动端 */
.mobile-friends-btn, .mobile-side-btn { display: none; }
@media (max-width: 1080px) {
  .lobby-body { grid-template-columns: 1fr 280px; }
  .table-side { width: 250px; }
}
@media (max-width: 860px) {
  .lobby-body { grid-template-columns: 1fr; padding: 14px; }
  .lobby-side {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: min(340px, 88vw);
    background: #08120f;
    border-left: 1px solid rgba(226, 196, 121, 0.2);
    padding: 16px;
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.3, 1);
    z-index: 60;
    box-shadow: -20px 0 60px rgba(0, 0, 0, 0.6);
  }
  .lobby-side.open { transform: none; }
  .mobile-friends-btn { display: inline-flex; }
  .topbar { padding: 10px 14px; gap: 10px; }
  .brand-en, .online-pill { display: none; }
  .brand-name { font-size: 19px; }
  .table-side {
    position: fixed;
    right: 0; top: 0; bottom: 0;
    width: min(330px, 88vw);
    transform: translateX(105%);
    transition: transform 0.3s cubic-bezier(0.3, 0.9, 0.3, 1);
    z-index: 70;
    background: #071310;
  }
  .table-side.open { transform: none; }
  .mobile-side-btn { display: inline-flex; }
  .felt-wrap { aspect-ratio: 4 / 5; max-height: calc(100vh - 200px); }
  .felt { border-radius: 46% / 34%; }
  .felt::before { border-radius: 46% / 34%; }
  .felt::after { border-radius: 46% / 34%; }
  .seat { width: 104px; }
  .seat-0 { left: 50%; top: 98%; }
  .seat-1 { left: 22%; top: 90%; }
  .seat-2 { left: 6%; top: 26%; }
  .seat-3 { left: 50%; top: 3%; }
  .seat-4 { left: 94%; top: 26%; }
  .seat-5 { left: 78%; top: 90%; }
  .seat-pod { padding: 6px 9px 6px 6px; gap: 6px; }
  .seat-avatar { width: 32px; height: 32px; font-size: 16px; }
  .seat-name { max-width: 62px; font-size: 11px; }
  .seat-stack { font-size: 11px; }
  .board-area { top: 45%; }
  .action-dock { width: calc(100% - 20px); bottom: 8px; }
  .action-panel { padding: 8px; gap: 6px; flex-wrap: wrap; }
  .act-btn { min-width: 74px; padding: 10px 8px; font-size: 13px; }
  .raise-box { order: -1; flex-basis: 100%; }
  .table-top { padding: 8px 10px; gap: 8px; }
  .table-title .nm { font-size: 14px; }
  .table-title .sub { display: none; }
  .btn-sm { padding: 6px 10px; font-size: 12px; }
  .hero { padding: 22px 20px; }
  .hero::after { display: none; }
  .auth-card { padding: 28px 22px 22px; }
  .auth-title { font-size: 30px; }
}
@media (max-width: 520px) {
  .table-grid { grid-template-columns: 1fr; }
  .hero-actions .btn { flex: 1; }
  .chip-balance { padding: 6px 11px; font-size: 13px; }
  .seat { width: 92px; }
  .act-btn { min-width: 64px; }
  .mine-cards .card { --card-w: 34px; }
}

/* ---------------- 座位内元素微调 ---------------- */
.seat { z-index: 5; }
.seat.empty { z-index: 4; }
.seat .seat-pod { position: relative; cursor: default; }
.seat.empty .seat-pod { width: 100%; justify-content: center; }
.seat-cards .card { --card-w: clamp(22px, 2.8vw, 36px); border-radius: 4px; }
.seat-0 .seat-cards { top: -12%; }
.seat-3 .seat-cards { top: 104%; }
.seat-1 .seat-cards { left: 104%; top: 46%; }
.seat-2 .seat-cards { left: 104%; top: 46%; }
.seat-4 .seat-cards { left: -4%; top: 46%; }
.seat-5 .seat-cards { left: -4%; top: 46%; }
.seat .dealer-btn { position: absolute; right: 2px; top: -11px; }
.seat.empty .dealer-btn { display: none; }
.seat .seat-pod .turn-timer { left: 12px; right: 12px; width: auto; bottom: -2px; }

.float-emote {
  position: fixed;
  z-index: 400;
  font-size: 30px;
  pointer-events: none;
  animation: floatUp 1.8s ease-out forwards;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.5));
}
@keyframes floatUp {
  0% { transform: translateY(0) scale(0.6); opacity: 0; }
  18% { transform: translateY(-10px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-64px) scale(0.95); opacity: 0; }
}

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

/* 空座位提示 */
.seat.empty .seat-pod span { font-size: 11px; letter-spacing: 0.14em; }

/* 细滚动条用于侧栏 */
.side-body::-webkit-scrollbar { width: 5px; }
.side-body::-webkit-scrollbar-thumb { background: rgba(226, 196, 121, 0.18); }

/* 底池变化时轻微跳动 */
@keyframes potPop { 0% { transform: scale(1); } 45% { transform: scale(1.1); } 100% { transform: scale(1); } }
.pot-display.bump { animation: potPop 0.35s ease; }

/* 记分牌数字等宽 */
.seat-stack, .pot-display, .chip-balance, .raise-amount, .lb-chips { font-variant-numeric: tabular-nums; }
/* =========================================================
   座位布局修正 v2（卡片收进座位胶囊内，避免遮挡）
   ========================================================= */
#toasts { top: 76px; }
.table-area { padding: 10px 18px 104px; }
.seat { width: 168px; }
.seat-0 { left: 50%; top: 93%; }
.seat-1 { left: 10%; top: 83%; }
.seat-2 { left: 8%; top: 27%; }
.seat-3 { left: 50%; top: 5%; }
.seat-4 { left: 92%; top: 27%; }
.seat-5 { left: 90%; top: 83%; }
.seat-pod { padding: 7px 9px 7px 7px; gap: 8px; }
.seat-avatar { width: 34px; height: 34px; font-size: 17px; }
.seat-name { max-width: 64px; font-size: 12px; }
.seat-stack { font-size: 12px; }
.seat-cards {
  position: static;
  transform: none;
  display: flex;
  gap: 2px;
  margin-left: auto;
  flex: none;
}
.seat-0 .seat-cards, .seat-1 .seat-cards, .seat-2 .seat-cards,
.seat-3 .seat-cards, .seat-4 .seat-cards, .seat-5 .seat-cards {
  left: auto; right: auto; top: auto;
}
.seat-cards .card { --card-w: 22px; border-radius: 3px; box-shadow: 0 2px 6px rgba(0,0,0,.45); }
.seat-cards .card .r { font-size: 12px; }
.seat-cards .card .s { font-size: 10px; }
.seat-bet {
  top: auto;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
}
.seat-0 .seat-bet { left: 50%; top: auto; bottom: calc(100% + 7px); }
.seat-1 .seat-bet { left: 50%; top: auto; bottom: calc(100% + 7px); }
.seat-2 .seat-bet { left: 50%; top: calc(100% + 7px); bottom: auto; }
.seat-3 .seat-bet { left: 50%; top: calc(100% + 7px); bottom: auto; }
.seat-4 .seat-bet { left: 50%; top: calc(100% + 7px); bottom: auto; }
.seat-5 .seat-bet { left: 50%; top: auto; bottom: calc(100% + 7px); }

@media (max-width: 860px) {
  .table-area { padding: 6px 6px 92px; }
  .seat { width: 120px; }
  .seat-0 { left: 50%; top: 94%; }
  .seat-1 { left: 20%; top: 86%; }
  .seat-2 { left: 8%; top: 27%; }
  .seat-3 { left: 50%; top: 4%; }
  .seat-4 { left: 92%; top: 27%; }
  .seat-5 { left: 80%; top: 86%; }
  .seat-pod { padding: 5px 6px 5px 5px; gap: 5px; }
  .seat-avatar { width: 27px; height: 27px; font-size: 14px; }
  .seat-name { font-size: 10.5px; max-width: 48px; }
  .seat-stack { font-size: 10.5px; }
  .seat-cards .card { --card-w: 16px; }
  .seat-cards .card .r { font-size: 9px; }
  .seat-cards .card .s { font-size: 8px; }
  .seat-badges { display: none; }
}

/* =========================================================
   细节修正 v3：座位尺寸 / 牌型标签 / 摊牌横幅 / 移动端
   ========================================================= */
.seat { width: 180px; }
.seat-pod { gap: 6px; padding: 7px 8px 7px 7px; }
.seat-name { max-width: 58px; }
.seat-cards .card { --card-w: 20px; }
.seat-cards .card .r { font-size: 11px; }
.seat-cards .card .s { font-size: 9px; }
.seat.mine .seat-pod { border-color: rgba(226, 196, 121, 0.45); }
.seat.active.mine .seat-pod { border-color: rgba(255, 233, 168, 0.9); }
.seat .dealer-btn { left: 1px; right: auto; top: -10px; }

.seat-handname {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  bottom: -21px;
  font-size: 10px;
  letter-spacing: 0.04em;
  color: #ffe9b8;
  background: rgba(0, 0, 0, 0.62);
  border: 1px solid rgba(226, 196, 121, 0.32);
  border-radius: 999px;
  padding: 1px 8px;
  white-space: nowrap;
  z-index: 7;
}
.seat-2 .seat-handname, .seat-3 .seat-handname, .seat-4 .seat-handname {
  bottom: auto;
  top: calc(100% + 3px);
}

.win-banner { top: 66%; }
.win-banner .wb-title {
  background: rgba(5, 12, 9, 0.66);
  border: 1px solid rgba(226, 196, 121, 0.34);
  border-radius: 999px;
  color: #ffe9b8;
  -webkit-text-fill-color: #ffe9b8;
  text-shadow: 0 3px 18px rgba(255, 200, 110, 0.35);
  backdrop-filter: blur(6px);
  padding: 10px 30px;
  animation: winnerPop 0.5s cubic-bezier(0.2, 0.9, 0.3, 1.3);
}
@keyframes winnerPop {
  from { transform: scale(0.85); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.win-banner .wb-sub { color: var(--gold-2); font-size: 12px; letter-spacing: 0.22em; }

/* 移动端 */
@media (max-width: 860px) {
  .table-title { min-width: 0; }
  .table-title .nm {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 108px;
    display: inline-block;
  }
  #btn-sound, #btn-rebuy { display: none; }
  .table-top { padding: 8px 8px; gap: 6px; }
  .table-area { padding: 4px 8px 196px; }
  .felt-wrap {
    aspect-ratio: auto;
    height: 100%;
    max-height: none;
    width: 100%;
  }
  .felt { border-radius: 46% / 32%; border-width: 9px; }
  .felt::before { border-radius: 46% / 32%; inset: -9px; }
  .felt::after { border-radius: 46% / 32%; inset: 5%; }
  .felt-logo { font-size: 9px; letter-spacing: 0.34em; top: 20%; }
  .seat { width: 122px; }
  .seat-0 { left: 50%; top: 95%; }
  .seat-1 { left: 19%; top: 87%; }
  .seat-2 { left: 9%; top: 25%; }
  .seat-3 { left: 50%; top: 3%; }
  .seat-4 { left: 91%; top: 25%; }
  .seat-5 { left: 81%; top: 87%; }
  .seat-pod { padding: 5px 6px 5px 5px; gap: 5px; }
  .seat-avatar { width: 26px; height: 26px; font-size: 14px; }
  .seat-name { font-size: 10px; max-width: 40px; }
  .seat-stack { font-size: 10px; }
  .seat-cards .card { --card-w: 15px; }
  .seat-cards .card .r { font-size: 8.5px; }
  .seat-cards .card .s { font-size: 7px; }
  .seat-badges { display: none; }
  .seat-handname { font-size: 9px; padding: 0 6px; bottom: -17px; }
  .board-area { top: 44%; }
  .action-dock { width: calc(100% - 14px); bottom: 8px; }
  .action-panel { padding: 8px; gap: 6px; }
  .raise-box { gap: 6px; }
  .quick-bets { display: none; }
  .act-buttons { flex: 1; }
  .act-btn { min-width: 0; flex: 1; padding: 11px 6px; font-size: 13px; }
  .act-btn small { font-size: 9px; }
  #toasts { top: 64px; }
  .toast { font-size: 12px; padding: 8px 16px; }
}
@media (max-width: 860px) {
  .action-panel { flex-wrap: wrap; }
  .raise-box { order: -1; flex-basis: 100%; }
  .act-buttons { flex-basis: 46%; }
}
.seat-handname { bottom: -26px; }
.seat-2 .seat-handname, .seat-3 .seat-handname, .seat-4 .seat-handname { top: calc(100% + 6px); }

/* =========================================================
   v4：摊牌横幅位置 / 庄家位 / 移动端铺满
   ========================================================= */
.win-banner { top: 72%; }
.seat .dealer-btn { left: auto; right: 4px; top: -11px; }

@media (max-width: 860px) {
  .table-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 4px 8px 128px;
  }
  .felt-wrap {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: auto;
  }
  .seat { width: 118px; }
  .seat-0 { left: 50%; top: 96%; }
  .seat-1 { left: 18%; top: 88%; }
  .seat-2 { left: 18%; top: 22%; }
  .seat-3 { left: 50%; top: 3%; }
  .seat-4 { left: 84%; top: 22%; }
  .seat-5 { left: 84%; top: 88%; }
  .seat-name { max-width: 36px; }
  .seat-cards .card { --card-w: 14px; }
  .dealer-btn { width: 21px; height: 21px; font-size: 9px; right: 2px; top: -9px; }
  .win-banner { top: 60%; }
  .win-banner .wb-title { font-size: 16px; padding: 8px 18px; letter-spacing: 0.03em; }
  .win-banner .wb-sub { font-size: 10px; letter-spacing: 0.14em; }
  .felt-logo { top: 17%; opacity: 0.7; }
  .action-dock { width: calc(100% - 12px); bottom: 6px; }
}
