/* ====================================================================
   Tapeout Bracelet · Texas Hold'em
   style.css — 完整版（2026-10 修复）
   ==================================================================== */

:root{
  --bg:#0a0d14;
  --bg-2:#0e1219;
  --panel:#131822;
  --panel-2:#1a2030;
  --border:#1f2937;
  --border-2:#2a3441;
  --gold:#fbbf24;
  --gold-2:#f59e0b;
  --gold-soft:rgba(251,191,36,.12);
  --green:#10b981;
  --green-2:#059669;
  --green-soft:rgba(16,185,129,.12);
  --red:#ef4444;
  --text:#e5e7eb;
  --text-2:#9ca3af;
  --muted:#6b7280;
  --felt-1:#1e6b4a;
  --felt-2:#0d3d28;
}

*{ box-sizing:border-box; }

html,body{
  margin:0; padding:0;
  background:var(--bg);
  color:var(--text);
  font-family:-apple-system,"Segoe UI","PingFang SC","Microsoft YaHei",system-ui,sans-serif;
  font-size:13px;
  -webkit-font-smoothing:antialiased;
}
button{ font-family:inherit; cursor:pointer; }
.hidden{ display:none !important; }
.screen{ animation:fadeIn .25s ease; }
@keyframes fadeIn{ from{opacity:0;} to{opacity:1;} }

body.game-active .topbar{ display:none !important; }

/* ====================================================================
   顶栏
   ==================================================================== */
.topbar{
  display:flex; justify-content:space-between; align-items:center;
  padding:10px 20px; background:#000;
  border-bottom:1px solid var(--border);
  position:sticky; top:0; z-index:100;
}
.topbar-left{ display:flex; align-items:center; gap:18px; }
.logo{ font-size:14px; font-weight:700; color:var(--gold); letter-spacing:.5px; }
.nav-link{
  color:var(--text-2); font-size:13px; text-decoration:none;
  padding:6px 12px; border-radius:6px; transition:all .15s; cursor:pointer;
}
.nav-link:hover{ color:var(--text); background:rgba(255,255,255,.04); }
.nav-link.active{ color:var(--gold); background:var(--gold-soft); }
.topbar-right{ display:flex; align-items:center; gap:10px; }
.lang-select{
  background:#000; color:var(--text); border:1px solid var(--border);
  padding:6px 10px; border-radius:6px; font-size:12px; cursor:pointer;
}
.status-pill{
  display:flex; align-items:center; gap:6px; font-size:12px; color:var(--text-2);
  padding:5px 10px; border-radius:16px;
  background:rgba(255,255,255,.03); border:1px solid var(--border);
}
.status-pill .dot{ width:6px; height:6px; border-radius:50%; background:var(--gold); box-shadow:0 0 6px var(--gold); }
.btn-wallet{
  background:var(--gold); color:#000; border:none;
  padding:7px 16px; border-radius:6px; font-size:13px; font-weight:700; transition:all .15s;
}
.btn-wallet:hover{ background:var(--gold-2); box-shadow:0 0 14px rgba(251,191,36,.4); }
.btn-wallet.connected{ background:var(--green); color:#fff; }

/* ====================================================================
   顶栏"准备好了"
   ==================================================================== */
.btn-ready-top{
  background: var(--gold);
  color: #000;
  border: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  transition: all .15s;
}
.btn-ready-top:hover{ background: var(--gold-2); }
.btn-ready-top.hidden{ display: none !important; }
.btn-ready-top.cancel{
  background: rgba(239,68,68,.2);
  color: #fca5a5;
  border: 1px solid rgba(239,68,68,.5);
}

/* ====================================================================
   大厅
   ==================================================================== */
.lobby-container{ max-width:1180px; margin:0 auto; padding:24px 20px; }
.page-title{ font-size:24px; font-weight:700; margin:0 0 8px; }
.page-desc{ color:var(--text-2); font-size:13px; line-height:1.7; margin:0 0 24px; max-width:900px; }
.section-heading{ font-size:15px; font-weight:700; color:var(--text); margin:26px 0 14px; }

.mode-switch{
  display:inline-flex; gap:6px; padding:4px;
  background:var(--panel); border:1px solid var(--border);
  border-radius:10px; margin-bottom:20px;
}
.mode-tab{
  display:flex; align-items:center; gap:8px;
  padding:9px 20px; border-radius:7px;
  font-size:13px; font-weight:700;
  border:none; background:transparent; color:var(--text-2);
  transition:all .15s;
}
.mode-tab:hover{ color:var(--text); }
.mode-tab.active{ background:var(--gold); color:#000; box-shadow:0 0 14px rgba(251,191,36,.4); }
.mode-dot{ width:6px; height:6px; border-radius:50%; }
.mode-dot.blue{ background:#3b82f6; }
.mode-dot.green{ background:var(--green); }
.mode-dot.gold{ background:var(--gold); }

.hero-card{
  display:grid; grid-template-columns:1fr 1fr; gap:30px;
  padding:32px 36px; border-radius:18px;
  border:1px solid var(--border);
  margin-bottom:16px;
  overflow:hidden; position:relative;
}
.hero-ai{
  background:linear-gradient(135deg, rgba(59,130,246,.18) 0%, rgba(30,64,175,.35) 60%, rgba(10,13,20,.4) 100%);
  border-color:rgba(59,130,246,.35);
}
.hero-points{
  background:linear-gradient(135deg, rgba(16,185,129,.18) 0%, rgba(6,95,70,.35) 60%, rgba(10,13,20,.4) 100%);
  border-color:rgba(16,185,129,.35);
}
.hero-real{
  background:linear-gradient(135deg, rgba(251,191,36,.15) 0%, rgba(120,53,15,.3) 60%, rgba(10,13,20,.4) 100%);
  border-color:rgba(251,191,36,.35);
}
.hero-left{ display:flex; flex-direction:column; justify-content:center; }
.hero-badge{
  display:inline-flex; align-items:center; gap:8px;
  font-size:12px; color:var(--text-2);
  padding:5px 12px; background:rgba(0,0,0,.35);
  border-radius:20px; width:fit-content;
  border:1px solid rgba(255,255,255,.08);
  margin-bottom:14px;
}
.hero-badge .dot{ width:6px; height:6px; border-radius:50%; }
.hero-badge .dot.blue{ background:#3b82f6; }
.hero-badge .dot.green{ background:var(--green); }
.hero-badge .dot.gold{ background:var(--gold); }
.hero-title{
  font-size:38px; line-height:1.15; font-weight:800;
  margin:0 0 12px; letter-spacing:-.5px;
  background:linear-gradient(180deg,#fff,#cbd5e1);
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent;
}
.hero-desc{ font-size:13px; color:var(--text-2); line-height:1.7; margin:0 0 20px; max-width:420px; }
.hero-actions{ display:flex; gap:10px; flex-wrap:wrap; }
.btn-hero-primary{
  padding:12px 26px; border-radius:10px;
  background:var(--gold); color:#000; border:none;
  font-size:14px; font-weight:800; letter-spacing:.3px;
  transition:all .15s;
}
.btn-hero-primary:hover{ background:var(--gold-2); box-shadow:0 0 24px rgba(251,191,36,.5); transform:translateY(-1px); }
.btn-hero-secondary{
  padding:12px 24px; border-radius:10px;
  background:rgba(0,0,0,.35); color:var(--text);
  border:1px solid rgba(255,255,255,.15);
  font-size:14px; font-weight:700;
  transition:all .15s;
}
.btn-hero-secondary:hover{ background:rgba(0,0,0,.5); border-color:var(--gold); }

.wallet-card{
  width:100%; max-width:340px;
  padding:16px; background:rgba(0,0,0,.5);
  border:1px solid rgba(251,191,36,.25);
  border-radius:12px;
}
.wallet-row{ display:flex; justify-content:space-between; align-items:center; padding:8px 0; }
.wallet-label{ font-size:12px; color:var(--text-2); }
.wallet-value{ font-size:15px; font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; }
.wallet-value.gold{ color:var(--gold); }
.wallet-addr{ font-size:11px; color:var(--muted); font-family:monospace; }
.wallet-divider{ height:1px; background:var(--border); margin:8px 0; }
.wallet-note{ font-size:11px; color:var(--muted); margin-top:8px; text-align:center; }
.wallet-warning{
  margin-top:10px; padding:8px 12px;
  background:rgba(251,191,36,.08);
  border:1px solid rgba(251,191,36,.3);
  border-radius:8px;
  font-size:11px; color:#fbbf24;
  line-height:1.6;
}
.small-select{
  background:#000; color:var(--text); border:1px solid var(--border);
  padding:6px 8px; border-radius:6px; font-size:12px; cursor:pointer;
}
.mini-btn{
  padding:6px 14px; font-size:12px; font-weight:700;
  border-radius:6px; border:1px solid var(--gold);
  background:var(--gold); color:#000; transition:all .15s;
}
.mini-btn:hover{ background:var(--gold-2); }
.mini-btn.ghost{ background:transparent; color:var(--text-2); border-color:var(--border-2); }
.mini-btn.ghost:hover{ color:var(--text); border-color:var(--text-2); }
.mini-btn.gold{ background:var(--gold); color:#000; }

.table-grid{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:16px; margin-bottom:24px;
}
.table-card{
  background:var(--panel); border:1px solid var(--border);
  border-radius:14px; padding:16px;
  transition:all .15s;
  display:flex; flex-direction:column; gap:14px;
}
.table-card:hover{ border-color:var(--gold); box-shadow:0 0 24px rgba(251,191,36,.15); transform:translateY(-2px); }
.table-card-head{ display:flex; align-items:center; gap:10px; }
.table-card-avatar{
  width:38px; height:38px; border-radius:50%;
  background:radial-gradient(circle at 30% 30%, #7c3aed, #4c1d95);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:700; color:#fff; flex-shrink:0;
}
.table-card-title{ flex:1; min-width:0; }
.table-card-name{ font-size:14px; font-weight:700; color:var(--text); margin-bottom:2px; }
.table-card-blinds{ font-size:11px; color:var(--muted); font-variant-numeric:tabular-nums; }
.table-card-preview{
  height:100px; border-radius:10px;
  background:radial-gradient(ellipse at center, var(--felt-1), var(--felt-2));
  border:3px solid #5a3a20;
  position:relative;
  display:flex; align-items:center; justify-content:center;
}
.table-card-preview .seats{ position:absolute; inset:0; }
.table-card-preview .dot-seat{
  position:absolute; width:14px; height:14px; border-radius:50%;
  background:#1e293b; border:2px solid rgba(255,255,255,.25);
}
.table-card-preview .dot-seat.empty{ opacity:.35; }
.table-card-preview .card-row{ display:flex; gap:3px; opacity:.35; }
.table-card-preview .mini-blank{
  width:18px; height:26px; border-radius:3px;
  border:1px dashed rgba(255,255,255,.3);
}
.table-card-meta{ display:flex; justify-content:space-between; font-size:12px; color:var(--text-2); font-variant-numeric:tabular-nums; }
.table-card-meta strong{ color:var(--text); }
.table-card-actions{ display:flex; gap:8px; }
.table-card-actions button{
  flex:1; padding:9px; border-radius:8px;
  font-size:12px; font-weight:800;
  cursor:pointer; transition:all .15s;
  border:1px solid var(--gold);
  background:var(--gold); color:#000;
}
.table-card-actions button:hover{ background:var(--gold-2); box-shadow:0 0 12px rgba(251,191,36,.4); }
.table-card-actions button.btn-join{ background:transparent; color:var(--gold); }
.table-card-actions button.btn-join:hover{ background:rgba(251,191,36,.15); }

.section-heading-row{
  display:flex; justify-content:space-between; align-items:center;
  margin:26px 0 14px;
}
.section-heading-row .section-heading{ margin:0; }
.seats-picker{
  display:flex; gap:4px; align-items:center;
  padding:4px; background:var(--panel);
  border:1px solid var(--border); border-radius:10px;
}
.seats-picker-label{ font-size:12px; color:var(--text-2); padding:0 10px; }
.seats-btn{
  width:34px; height:30px; border-radius:7px;
  font-size:13px; font-weight:800;
  border:none; background:transparent; color:var(--text-2);
  transition:all .15s; cursor:pointer;
}
.seats-btn.active{ background:var(--gold); color:#000; }

.room-count-badge{
  display:inline-flex; align-items:center; gap:5px;
  padding:4px 10px; border-radius:8px;
  background:rgba(16,185,129,.12);
  border:1px solid rgba(16,185,129,.4);
  font-size:11px; font-weight:800; color:#bbf7d0;
}
.room-count-badge.zero{ background:rgba(255,255,255,.04); border-color:var(--border-2); color:var(--muted); }
.room-count-badge .pulse{ width:6px; height:6px; border-radius:50%; background:#10b981; }
.room-count-badge.zero .pulse{ background:#475569; }

.room-list{
  display:grid; grid-template-columns:repeat(auto-fill,minmax(260px,1fr));
  gap:10px; margin-bottom:24px;
}
.room-list:empty{ display:none; }
.room-item{
  display:flex; align-items:center; gap:10px;
  padding:12px 14px; background:var(--panel);
  border:1px solid rgba(168,85,247,.4);
  border-radius:10px; transition:all .15s; cursor:pointer;
}
.room-item-avatar{
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,#a855f7,#6d28d9);
  display:flex; align-items:center; justify-content:center;
  font-size:16px; font-weight:800; color:#fff; flex-shrink:0;
}
.room-item-info{ flex:1; min-width:0; }
.room-item-name{ font-size:13px; font-weight:700; color:var(--text); }
.room-item-meta{ font-size:11px; color:var(--muted); margin-top:2px; }
.room-item-players{ font-size:12px; font-weight:800; color:#10b981; }
.room-item-join{
  padding:6px 12px; border-radius:8px;
  background:#a855f7; color:#fff; border:none;
  font-size:12px; font-weight:800; cursor:pointer;
}

.lobby-footer{
  margin-top:40px; padding-top:20px;
  border-top:1px solid var(--border);
  font-size:12px; color:var(--muted); line-height:1.8;
}
.lobby-footer p{ margin:4px 0; }
.lobby-footer .muted{ color:var(--muted); }

/* ====================================================================
   规则页 / 我的数据
   ==================================================================== */
.rules-container{ max-width:1080px; margin:0 auto; padding:32px 20px; }
.rule-grid{ display:grid; grid-template-columns:repeat(auto-fill,minmax(300px,1fr)); gap:16px; margin-top:20px; }
.rule-card{
  padding:20px; background:var(--panel);
  border:1px solid var(--border); border-radius:14px;
  position:relative;
}
.rule-num{
  position:absolute; top:16px; right:18px;
  font-size:32px; font-weight:900; color:rgba(251,191,36,.15);
  line-height:1;
}
.rule-card h3{ font-size:15px; color:var(--gold); margin:0 0 10px; font-weight:700; }
.rule-card p{ font-size:13px; color:var(--text-2); line-height:1.75; margin:0; }

.faq-heading{ font-size:18px; font-weight:800; color:var(--text); margin:36px 0 16px; }
.faq-list{ display:flex; flex-direction:column; gap:8px; }
.faq-item{
  background:var(--panel); border:1px solid var(--border);
  border-radius:10px; overflow:hidden; transition:border-color .15s;
}
.faq-item[open]{ border-color:var(--gold); }
.faq-item summary{
  padding:14px 18px; cursor:pointer;
  font-size:13px; font-weight:700; color:var(--text);
  list-style:none; position:relative;
}
.faq-item summary::-webkit-details-marker{ display:none; }
.faq-item summary::after{
  content:"+"; position:absolute; right:18px; top:50%;
  transform:translateY(-50%);
  font-size:18px; color:var(--text-2);
}
.faq-item[open] summary::after{ content:"−"; color:var(--gold); }
.faq-item p{
  padding:0 18px 16px; margin:0;
  font-size:13px; color:var(--text-2); line-height:1.8;
  border-top:1px solid var(--border); padding-top:14px;
}

.numbers-container{ max-width:1180px; margin:0 auto; padding:32px 20px; }
.numbers-header{ display:flex; justify-content:space-between; align-items:baseline; margin-bottom:20px; }
.numbers-sub{ font-size:12px; color:var(--muted); }
.stats-hero{
  display:grid; grid-template-columns:1.6fr 1fr 1fr 1fr 1fr 1fr 1fr;
  gap:12px; margin-bottom:20px;
}
.stat-big{ padding:18px; background:var(--panel); border:1px solid var(--border); border-radius:12px; }
.stat-big-value{ font-size:28px; font-weight:800; font-variant-numeric:tabular-nums; }
.stat-big-value.positive{ color:var(--green); }
.stat-big-value.negative{ color:var(--red); }
.stat-big-label{ font-size:11px; color:var(--text-2); margin-top:6px; letter-spacing:1px; text-transform:uppercase; }
.stat-cell{
  padding:18px 14px; background:var(--panel);
  border:1px solid var(--border); border-radius:12px;
  display:flex; flex-direction:column; justify-content:center;
}
.stat-cell span{ font-size:10px; color:var(--muted); text-transform:uppercase; margin-bottom:8px; }
.stat-cell strong{ font-size:18px; font-weight:800; color:var(--text); font-variant-numeric:tabular-nums; }

.sessions-table{
  background:var(--panel); border:1px solid var(--border);
  border-radius:12px; overflow:hidden;
}
.session-row{
  display:grid; grid-template-columns:1.2fr 1fr 1fr 1fr 1fr .8fr .8fr 1fr;
  gap:10px; padding:12px 18px; font-size:12px;
  border-bottom:1px solid var(--border);
  font-variant-numeric:tabular-nums;
}
.session-row:last-child{ border-bottom:none; }
.session-head{
  background:var(--panel-2); color:var(--text-2);
  font-weight:700; text-transform:uppercase; font-size:11px;
}
.session-row .pos{ color:var(--green); font-weight:600; }
.session-row .neg{ color:var(--red); font-weight:600; }
.session-empty{ padding:32px; text-align:center; color:var(--muted); font-size:13px; }

.hand-history{
  display:flex; flex-direction:column; gap:6px;
  max-height:380px; overflow-y:auto; margin-bottom:20px;
}
.hand-history-item{
  display:grid; grid-template-columns:50px 1fr 1fr 80px;
  gap:10px; padding:10px 14px;
  background:var(--panel); border:1px solid var(--border);
  border-radius:10px; font-size:12px; align-items:center;
}
.hand-history-item .hh-hand{ font-weight:800; color:var(--gold); }
.hand-history-item .hh-cards,
.hand-history-item .hh-community{ display:flex; gap:4px; flex-wrap:wrap; }
.hand-history-item .hh-cards .mini-card{ width:22px; height:32px; }
.hand-history-item .hh-cards .mini-card.face .v{ font-size:10px; }
.hand-history-item .hh-cards .mini-card.face .s{ font-size:13px; }
.hand-history-item .hh-result{ font-weight:700; text-align:right; }
.hand-history-item .hh-result.pos{ color:var(--green); }
.hand-history-item .hh-result.neg{ color:var(--red); }
.hand-history-empty{
  padding:24px; text-align:center; color:var(--muted);
  font-size:13px; background:var(--panel);
  border:1px dashed var(--border); border-radius:10px;
}

/* ====================================================================
   游戏页
   ==================================================================== */
.game-topbar{
  display:flex; align-items:center; gap:16px;
  padding:10px 20px; background:#000;
  border-bottom:1px solid var(--border);
}
.btn-back{
  background:transparent; color:var(--text-2); border:1px solid var(--border);
  padding:6px 12px; border-radius:6px; font-size:12px; transition:all .15s;
}
.btn-back:hover{ color:var(--gold); border-color:var(--gold); }
.game-info{ display:flex; align-items:center; gap:8px; color:var(--text-2); font-size:13px; }
#gameLevelLabel{ color:var(--gold); font-weight:700; }
.sep{ color:var(--border-2); }
.stage-pill{
  font-size:11px; padding:3px 9px; border-radius:5px;
  background:var(--gold-soft); color:var(--gold); font-weight:700;
}
.mode-tag{
  font-size:11px; padding:3px 9px; border-radius:5px;
  background:var(--green-soft); color:var(--green); font-weight:700;
}
.mode-tag.real{ background:var(--gold-soft); color:var(--gold); }
.game-right{ margin-left:auto; display:flex; align-items:center; gap:6px; }
.btn-fullscreen{
  background:transparent; color:var(--gold);
  border:1px solid var(--gold);
  padding:5px 9px; border-radius:6px;
  font-size:13px; font-weight:700; line-height:1;
  transition:all .15s;
}
.btn-fullscreen:hover{ background:rgba(251,191,36,.15); }

.btn-zoom{ display:none !important; }

.game-layout{
  display:grid; grid-template-columns:240px minmax(0,1fr) 340px;
  gap:14px; padding:14px; max-width:1700px; margin:0 auto; align-items:start;
}

.side-left{ display:flex; flex-direction:column; gap:12px; }
.panel{ background:var(--panel); border:1px solid var(--border); border-radius:10px; padding:12px; }
.panel-title{
  font-size:11px; color:var(--text-2); letter-spacing:1.5px;
  text-transform:uppercase; margin-bottom:8px; padding-bottom:6px;
  border-bottom:1px solid var(--border);
}
.log-area{ max-height:280px; overflow-y:auto; font-size:12px; color:var(--text-2); line-height:1.7; }
.log-line{ margin:2px 0; }
.log-line.hl{ color:var(--gold); font-weight:600; }
.log-line.win{ color:var(--green); font-weight:600; }
.log-line.action{ color:var(--text); }
.log-line.showdown{ color:#60a5fa; }
.hand-info{ font-size:12px; color:var(--text-2); line-height:1.8; }
.hand-info .row{ display:flex; justify-content:space-between; }
.hand-info .row strong{ color:var(--text); font-weight:600; }

.table-area{ position:relative; padding-top:48px; }
.dealer-seat{
  position:absolute; top:0; left:50%; transform:translateX(-50%);
  display:flex; flex-direction:column; align-items:center; z-index:6;
}
.dealer-avatar{
  width:44px; height:44px; border-radius:50%;
  background:#1a1f2e; border:2px solid var(--gold);
  display:flex; align-items:center; justify-content:center; font-size:22px;
  box-shadow:0 0 16px rgba(251,191,36,.35);
}
.dealer-name{ margin-top:3px; font-size:11px; color:var(--gold); letter-spacing:1.5px; }

.poker-table{
  position:relative;
  width:100%;
  aspect-ratio:16 / 10;
  border-radius:50%;
  background:radial-gradient(ellipse at 50% 45%, var(--felt-1) 0%, var(--felt-2) 92%);
  border:14px solid;
  border-color:#5a3a20 #2e1c0e #2e1c0e #5a3a20;
  box-shadow:inset 0 0 80px rgba(0,0,0,.7),0 20px 60px rgba(0,0,0,.6),0 0 0 1px rgba(251,191,36,.15);
  overflow:visible;
}
.table-center{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  display:flex; flex-direction:column; align-items:center; gap:8px;
  z-index:3; width:60%;
}
.pot-display{
  display:flex; align-items:baseline; gap:8px;
  font-size:14px; color:var(--gold); font-weight:700;
  text-shadow:0 0 8px rgba(251,191,36,.4);
}
.pot-label{ font-size:11px; color:var(--text-2); font-weight:600; }
.pot-value{ font-size:18px; }
.pot-side{ color:#fbcfe8; font-size:12px; }
.pot-side.hidden{ display:none !important; }
.board-cards{
  display:flex; gap:8px; justify-content:center;
  min-height:80px; align-items:center;
}

.shuffle-deck{
  position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
  width:32px; height:46px; opacity:0; transition:opacity .2s; z-index:4;
}
.shuffle-deck.shuffling{ opacity:1; }
.shuffle-card{
  position:absolute; inset:0; border-radius:5px;
  background:linear-gradient(145deg,#2a4a72,#1a3a5a);
  border:1px solid #3b5f88;
  box-shadow:0 4px 10px rgba(0,0,0,.6);
}
.shuffle-deck.shuffling .c1{ animation:sh1 .5s ease-in-out; }
.shuffle-deck.shuffling .c2{ animation:sh2 .5s ease-in-out; }
.shuffle-deck.shuffling .c3{ animation:sh3 .5s ease-in-out; }
@keyframes sh1{0%,100%{transform:translate(0,0);}25%{transform:translate(-14px,-6px) rotate(-12deg);}75%{transform:translate(14px,6px) rotate(12deg);}}
@keyframes sh2{0%,100%{transform:translate(0,0);}50%{transform:translate(0,-10px);}}
@keyframes sh3{0%,100%{transform:translate(0,0);}25%{transform:translate(14px,6px) rotate(12deg);}75%{transform:translate(-14px,-6px) rotate(-12deg);}}

.seats-layer{ position:absolute; inset:0; pointer-events:none; overflow:visible; }
.seat{
  position:absolute; transform:translate(-50%,-50%);
  width:150px; padding:9px 10px;
  background:rgba(12,15,22,.96);
  border:1.5px solid var(--border-2); border-radius:11px;
  pointer-events:auto; transition:all .2s;
  box-shadow:0 8px 20px rgba(0,0,0,.6);
  overflow:visible;
}
.seat.folded{ opacity:.35; filter:grayscale(.7); }
.seat.empty{
  opacity:.5; border-style:dashed;
  border-color:rgba(168,85,247,.35);
  background:rgba(0,0,0,.25);
}
.seat.empty .seat-cards{ display:none; }
.seat.empty .seat-chips,
.seat.empty .seat-bet,
.seat.empty .seat-head{ visibility:hidden; }
.seat.empty .empty-label{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  color:#94a3b8; font-size:12px; font-weight:600;
}

.seat.active{
  border-color:var(--gold) !important;
  box-shadow:0 0 24px rgba(251,191,36,.5),0 8px 20px rgba(0,0,0,.6) !important;
  z-index:10;
}
.seat.me{
  border-color:#3b82f6;
  box-shadow:0 8px 20px rgba(0,0,0,.6),0 0 10px rgba(59,130,246,.35);
}
.seat.me.active{
  border-color:var(--gold) !important;
  box-shadow:0 0 24px rgba(251,191,36,.5),0 8px 20px rgba(0,0,0,.6) !important;
}

.seat.spectating{
  opacity: .55;
  filter: grayscale(.6);
}
.seat.spectating::after{
  content: '观战中';
  position: absolute;
  top: -8px; left: 50%;
  transform: translateX(-50%);
  background: rgba(168,85,247,.9);
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
}

/* All-in 玩家红色高亮 */
.seat.all-in{
  border-color: #ef4444 !important;
  background: rgba(30,12,15,.96) !important;
  box-shadow:
    0 0 26px rgba(239,68,68,.7),
    0 0 52px rgba(239,68,68,.35),
    0 8px 20px rgba(0,0,0,.6) !important;
  animation: allInPulse 1.4s ease-in-out infinite;
}
.seat.all-in .seat-name{ color: #fca5a5 !important; }
.seat.all-in .seat-chips{ color: #ef4444 !important; font-weight: 900 !important; }
.seat.all-in .mini-card{
  border-color: #ef4444 !important;
  box-shadow: 0 0 8px rgba(239,68,68,.6), 0 2px 6px rgba(0,0,0,.5) !important;
}
@keyframes allInPulse{
  0%,100%{ box-shadow: 0 0 26px rgba(239,68,68,.7), 0 0 52px rgba(239,68,68,.35), 0 8px 20px rgba(0,0,0,.6); }
  50%    { box-shadow: 0 0 36px rgba(239,68,68,.9), 0 0 72px rgba(239,68,68,.5), 0 8px 20px rgba(0,0,0,.6); }
}

.seat-head{ display:flex; align-items:center; gap:7px; margin-bottom:5px; }
.avatar-wrap{
  width:36px; height:36px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:18px; flex-shrink:0;
  border:2px solid rgba(255,255,255,.15);
}
.seat-meta{ flex:1; min-width:0; }
.seat-name{
  font-size:12px; font-weight:700; color:var(--text);
  white-space:nowrap; overflow:hidden; text-overflow:ellipsis;
  margin-bottom:2px;
}
.pos-badge{
  display:inline-block; font-size:10px; font-weight:800;
  padding:2px 7px; border-radius:5px;
  background:var(--gold-soft); color:var(--gold);
  border:1px solid rgba(251,191,36,.4);
}
.pos-badge.sb{ background:rgba(236,72,153,.12); color:#fbcfe8; border-color:rgba(236,72,153,.4); }
.pos-badge.bb{ background:rgba(16,185,129,.12); color:#bbf7d0; border-color:rgba(16,185,129,.4); }
.seat-style{
  font-size:9px; padding:1px 6px; border-radius:5px;
  background:rgba(255,255,255,.06); color:var(--text-2);
  display:inline-block; margin-left:4px;
}
.seat-chips{
  font-size:13px; color:var(--gold); font-weight:800;
  font-variant-numeric:tabular-nums; margin-top:3px;
}
.seat-bet{ font-size:10px; color:var(--text-2); margin-top:2px; min-height:12px; }
.seat-cards{ display:flex; gap:3px; margin-top:5px; justify-content:center; }

.mini-card{
  width:26px; height:38px; border-radius:4px;
  background:linear-gradient(145deg,#1e3a5f,#16304f);
  border:1px solid #2b4a6f; position:relative;
  box-shadow:0 2px 6px rgba(0,0,0,.5);
  transition:all .35s;
}
.mini-card::after{
  content:""; position:absolute; inset:3px;
  border:1px solid rgba(96,165,250,.4); border-radius:3px;
}
.mini-card.face{ background:linear-gradient(160deg,#fff,#e8eef7); border-color:#5b6b82; }
.mini-card.face::after{ display:none; }
.mini-card.face .v{ font-size:11px; font-weight:900; position:absolute; top:3px; left:4px; }
.mini-card.face .s{ font-size:15px; position:absolute; bottom:2px; right:4px; line-height:1; }
.mini-card.face.red .v,.mini-card.face.red .s{ color:#d61f1f; }
.mini-card.face.black .v,.mini-card.face.black .s{ color:#000; }
.mini-card.highlight{ box-shadow:0 0 14px 3px var(--gold); border-color:var(--gold); }
.seat.reveal .mini-card{ width:42px; height:60px; }
.seat.reveal .mini-card.face .v{ font-size:17px; }
.seat.reveal .mini-card.face .s{ font-size:26px; }

.seat .ready-badge,
.seat .not-ready-badge{
  position:absolute; top:-9px; right:-9px;
  font-size:10px; font-weight:800;
  padding:3px 8px; border-radius:99px;
}
.seat .ready-badge{ background:#16a34a; color:#fff; }
.seat .not-ready-badge{
  background:rgba(148,163,184,.25); color:#cbd5e1;
  border:1px solid rgba(148,163,184,.35);
}

.seat.intent-reveal{
  opacity:1 !important;
  filter:none !important;
  border-color:#3b82f6 !important;
  box-shadow:
    0 0 24px rgba(59,130,246,.7),
    0 0 48px rgba(59,130,246,.35),
    0 8px 20px rgba(0,0,0,.6) !important;
  animation:intentRevealPulse 1.2s ease-in-out;
}
.seat.intent-reveal .mini-card{
  border-color:#60a5fa !important;
  box-shadow:0 0 10px rgba(59,130,246,.7),0 2px 6px rgba(0,0,0,.5) !important;
}
.seat.intent-reveal .seat-name{ color:#93c5fd !important; }
@keyframes intentRevealPulse{
  0%{ transform:translate(-50%,-50%) scale(1); }
  40%{ transform:translate(-50%,-50%) scale(1.08); }
  100%{ transform:translate(-50%,-50%) scale(1); }
}

.card{
  width:54px; height:76px;
  background:linear-gradient(160deg,#fff,#e8eef7);
  border:2px solid #5b6b82; border-radius:8px;
  display:flex; flex-direction:column; justify-content:space-between;
  padding:5px; box-shadow:0 6px 14px rgba(0,0,0,.5);
  transition:all .3s;
}
.card.highlight{ box-shadow:0 0 18px 4px var(--gold); border-color:var(--gold); }
.card.card-new,.mini-card.card-new{ animation:cardIn .3s ease; }
@keyframes cardIn{ from{opacity:0;transform:translateY(-10px) rotate(-3deg);} to{opacity:1;transform:translateY(0) rotate(0);} }
.card .v{ font-size:16px; font-weight:900; text-align:left; }
.card .s{ font-size:24px; text-align:right; line-height:1; }
.card.red .v,.card.red .s{ color:#d61f1f; }
.card.black .v,.card.black .s{ color:#000; }

.flying-card{
  position:fixed; width:24px; height:34px;
  background:linear-gradient(145deg,#1e3a5f,#16304f);
  border:1px solid #2b4a6f; border-radius:4px;
  z-index:9999; pointer-events:none;
  transition:transform .5s cubic-bezier(.3,.85,.55,1),opacity .5s;
  box-shadow:0 4px 12px rgba(0,0,0,.6);
}

.side-right{
  display:flex; flex-direction:column; gap:10px; padding:14px;
  background:var(--panel); border:1px solid var(--border); border-radius:12px;
}
.hand-panel-head{ display:flex; justify-content:space-between; align-items:center; }
.hand-label{ font-size:12px; color:var(--text-2); letter-spacing:1.5px; font-weight:700; }
.hand-bem{ font-size:11px; color:var(--gold); font-variant-numeric:tabular-nums; }
.hand-cards-large{ display:flex; gap:12px; justify-content:center; padding:4px 0; }
.hand-cards-large .card{ width:105px; height:150px; border-radius:12px; padding:9px; border-width:3px; }
.hand-cards-large .card .v{ font-size:36px; font-weight:900; line-height:1; }
.hand-cards-large .card .s{ font-size:54px; font-weight:900; line-height:1; text-align:right; }

.turn-timer{
  display:flex; align-items:center; gap:8px; padding:8px 10px;
  background:rgba(0,0,0,.4); border:1px solid var(--border-2); border-radius:8px;
}
.timer-bar{
  flex:1; height:8px; border-radius:4px;
  background:rgba(255,255,255,.06); overflow:hidden;
  border:1px solid var(--border-2);
}
.timer-fill{
  height:100%; width:100%;
  background:linear-gradient(90deg,var(--gold),var(--red));
  transition:width .1s linear;
}
.timer-text{
  font-size:14px; font-weight:800; color:var(--gold);
  font-variant-numeric:tabular-nums; min-width:38px; text-align:right;
}
.timer-text.warn{ color:var(--red); }

.human-actions{ display:flex; flex-direction:column; gap:7px; margin-top:8px; }
.human-actions button{
  width:100%; padding:12px 14px; font-size:14px; font-weight:700;
  border-radius:8px; border:1px solid rgba(251,191,36,.4);
  background:rgba(251,191,36,.1); color:var(--gold);
  transition:all .15s;
}
.human-actions button:hover{ background:rgba(251,191,36,.2); }
.human-actions button.danger{
  border-color:rgba(239,68,68,.4);
  background:rgba(239,68,68,.1); color:#fca5a5;
}
.human-actions button.danger:hover{ background:rgba(239,68,68,.2); }

.raise-panel{
  margin-top:10px; padding:12px;
  background:rgba(0,0,0,.4);
  border:1px solid rgba(251,191,36,.3);
  border-radius:10px;
  display:flex; flex-direction:column; gap:10px;
}
.raise-amount-display{
  text-align:center; font-size:24px; font-weight:800;
  color:var(--gold); font-variant-numeric:tabular-nums;
}
.raise-input-row{ display:flex; gap:6px; align-items:center; }
.raise-input-row .raise-step{
  width:36px; height:36px; border-radius:8px;
  background:rgba(251,191,36,.15);
  border:1px solid rgba(251,191,36,.5);
  color:var(--gold); font-size:18px; font-weight:800;
  line-height:1; flex-shrink:0;
}
.raise-input-row .raise-input{
  flex:1; min-width:0; height:36px; text-align:center;
  background:#000; color:var(--gold);
  border:1px solid var(--border-2);
  border-radius:8px;
  font-size:16px; font-weight:800;
  font-variant-numeric:tabular-nums;
}
.raise-slider{
  -webkit-appearance:none; appearance:none;
  width:100%; height:6px; border-radius:3px;
  background:linear-gradient(90deg,rgba(251,191,36,.4),var(--gold));
  outline:none; cursor:pointer;
}
.raise-slider::-webkit-slider-thumb{
  -webkit-appearance:none; appearance:none;
  width:20px; height:20px; border-radius:50%;
  background:#fff; border:2px solid var(--gold);
  box-shadow:0 0 12px rgba(251,191,36,.7);
}
.raise-minmax{
  display:flex; justify-content:space-between;
  font-size:11px; color:var(--muted);
  font-variant-numeric:tabular-nums;
}
.raise-presets{ display:grid; grid-template-columns:repeat(4, 1fr); gap:6px; }
.raise-presets button{
  padding:9px 4px; font-size:12px; font-weight:700;
  border-radius:7px; border:1px solid var(--border-2);
  background:rgba(255,255,255,.04); color:var(--text);
  transition:all .15s;
}
.raise-presets button:hover{
  background:rgba(251,191,36,.15);
  border-color:var(--gold); color:var(--gold);
}
.raise-presets button.allin{
  border-color:rgba(239,68,68,.5);
  color:#fca5a5; background:rgba(239,68,68,.1);
}
.raise-buttons{ display:flex; gap:8px; }
.raise-buttons button{
  flex:1; padding:10px; border-radius:8px;
  font-size:13px; font-weight:700;
}
.btn-cancel{ border:1px solid var(--border-2); background:transparent; color:var(--text-2); }
.btn-confirm{ border:1px solid var(--gold); background:var(--gold); color:#000; }

.next-btn{
  display:block; margin:8px auto 0;
  padding:10px 30px;
  font-size:13px; font-weight:700;
  border-radius:8px; border:1px solid var(--gold);
  background:var(--gold); color:#000;
}
.show-cards-btn{
  display:block; margin:8px auto 0;
  padding:10px 26px;
  font-size:13px; font-weight:800;
  border-radius:8px;
  border:1px solid #3b82f6;
  background:rgba(59,130,246,.18);
  color:#93c5fd;
}
.show-cards-btn.hidden{ display:none; }

/* ====================================================================
   覆盖层
   ==================================================================== */
.overlay{
  position:fixed; inset:0; background:rgba(0,0,0,.85);
  backdrop-filter:blur(6px);
  display:flex; align-items:center; justify-content:center;
  z-index:999; padding:20px;
}
.overlay-card{
  max-width:440px; width:100%; padding:24px;
  background:var(--panel); border:1px solid var(--border-2);
  border-radius:14px; text-align:center;
}
.overlay-card h2{ margin:0 0 12px; color:var(--gold); font-size:18px; }
.overlay-card p{ margin:0 0 20px; color:var(--text-2); font-size:13px; line-height:1.6; }
.overlay-actions{ display:flex; gap:10px; justify-content:center; flex-wrap:wrap; }
.overlay-actions button{
  padding:10px 20px; border-radius:8px;
  font-size:13px; font-weight:700; min-width:120px;
}
.btn-primary{ border:1px solid var(--gold); background:var(--gold); color:#000; }
.btn-secondary{ border:1px solid var(--border-2); background:transparent; color:var(--text-2); }
.room-input{
  width:100%; padding:12px 14px;
  background:rgba(0,0,0,.5);
  border:1px solid var(--border-2);
  border-radius:10px; color:var(--text);
  font-family:monospace; font-size:14px;
  letter-spacing:1px; margin-bottom:18px;
  text-align:center;
}
.rebuy-amount-row{
  display:flex; gap:8px; justify-content:center;
  margin:16px 0; flex-wrap:wrap;
}
.rebuy-amount-btn{
  padding:8px 12px; font-size:12px; font-weight:700;
  border-radius:8px; border:1px solid var(--border-2);
  background:rgba(255,255,255,.04); color:var(--text);
  line-height:1.3;
}
.rebuy-amount-btn.active{
  background:var(--gold); color:#000;
  border-color:var(--gold);
}

/* ====================================================================
   等待栏 / 提示
   ==================================================================== */
.waiting-bar{
  position:absolute; left:50%; bottom:18px; transform:translateX(-50%);
  z-index:20; display:flex; gap:12px; align-items:center;
  padding:10px 16px; border-radius:14px;
  background:rgba(12,10,24,.92);
  border:1px solid rgba(168,85,247,.35);
  box-shadow:0 8px 24px rgba(0,0,0,.6);
}
.waiting-bar.hidden{ display:none !important; }
.waiting-bar .waiting-room{
  color:#c4b5fd; font-size:12px;
  padding-right:10px; border-right:1px solid rgba(168,85,247,.3);
}
.waiting-bar .waiting-room b{ color:var(--gold); font-family:monospace; }
.waiting-bar .waiting-info{ color:#e9d5ff; font-size:13px; font-weight:700; }
.waiting-bar .mini-btn{ padding:7px 14px; font-size:12px; }

.next-hand-toast{
  position:absolute; left:50%; top:32%; transform:translate(-50%,-50%);
  z-index:15; min-width:160px; text-align:center;
  padding:14px 22px; border-radius:16px;
  background:rgba(0,0,0,.72);
  border:1px solid var(--gold);
  color:var(--gold);
  font-size:22px; font-weight:800;
}
.next-hand-toast.hidden{ display:none !important; }

.tie-display{
  position:absolute; left:50%; top:50%;
  transform:translate(-50%,-50%);
  z-index:20;
  padding:14px 34px; border-radius:14px;
  background:rgba(0,0,0,.82);
  border:2px solid var(--gold);
  color:var(--gold);
  font-size:26px; font-weight:900;
  letter-spacing:4px;
  box-shadow:0 0 32px rgba(251,191,36,.6);
  pointer-events:none;
}
.tie-display.hidden{ display:none !important; }

/* ====================================================================
   筹码堆（基础样式）
   ==================================================================== */
.chip-stack-wrap{
  display:flex; flex-direction:row; align-items:flex-end;
  justify-content:center; gap:2px; margin:3px 0 2px;
  pointer-events:none; min-height:8px;
}
.chip-stack-wrap.empty{ display:none; }
.chip-column{
  display:flex; flex-direction:column-reverse;
  align-items:center; position:relative; width:20px;
}
.chip-piece{
  width:20px; height:4px; border-radius:50%;
  margin-top:-1.5px; flex-shrink:0;
  border:1px solid rgba(0,0,0,.55);
  box-shadow:0 1px 1px rgba(0,0,0,.45),inset 0 1px 0 rgba(255,255,255,.28);
}
.chip-piece.chip-5000{ background:linear-gradient(180deg,#fde68a 0%,#f59e0b 45%,#b45309 100%); }
.chip-piece.chip-1000{ background:linear-gradient(180deg,#fef3c7 0%,#fcd34d 45%,#d97706 100%); }
.chip-piece.chip-500{ background:linear-gradient(180deg,#e9d5ff 0%,#a855f7 45%,#6d28d9 100%); }
.chip-piece.chip-100{ background:linear-gradient(180deg,#475569 0%,#1e293b 45%,#0f172a 100%); }
.chip-piece.chip-25{ background:linear-gradient(180deg,#bbf7d0 0%,#22c55e 45%,#15803d 100%); }
.chip-piece.chip-5{ background:linear-gradient(180deg,#fecaca 0%,#ef4444 45%,#991b1b 100%); }
.chip-piece.chip-1{ background:linear-gradient(180deg,#fff 0%,#e2e8f0 45%,#94a3b8 100%); }
.chip-label{
  font-size:8px; font-weight:800; color:#fbbf24;
  text-align:center;
  position:absolute; bottom:-11px; left:50%;
  transform:translateX(-50%);
  white-space:nowrap;
  text-shadow:0 0 4px rgba(0,0,0,.9);
}

.pot-chips{
  position:absolute;
  right:calc(50% + 70px);
  top:50%;
  transform:translateY(calc(-50% - 60px));
  display:flex; flex-direction:row;
  align-items:flex-end; justify-content:center;
  gap:8px; margin:0;
  padding:8px 12px 16px 12px;
  background:rgba(0,0,0,.55);
  border:1px solid rgba(251,191,36,.35);
  border-radius:12px;
  box-shadow:0 4px 16px rgba(0,0,0,.7);
  min-height:auto; max-width:180px;
  pointer-events:none; z-index:5;
}
.pot-chips.empty{ display:none !important; }
.pot-chips .pot-chips-inner,
.pot-chips .chip-stack-wrap{
  display:flex; flex-direction:row;
  align-items:flex-end; justify-content:center;
  gap:8px;
}
.pot-chips .chip-column{
  display:flex; flex-direction:column-reverse;
  align-items:center;
  width:22px; padding:0 2px;
  border-right:1px dashed rgba(255,255,255,.12);
  position:relative;
}
.pot-chips .chip-column:last-child{ border-right:none; }
.pot-chips .chip-piece{
  width:22px; height:5px; margin-top:-2px;
  border-radius:50%; border:1px solid rgba(0,0,0,.7);
  box-shadow:
    0 1px 2px rgba(0,0,0,.7),
    inset 0 1px 0 rgba(255,255,255,.35),
    inset 0 -1px 0 rgba(0,0,0,.4);
}
.pot-chips .chip-label{
  position:absolute; bottom:-12px; left:50%;
  transform:translateX(-50%);
  font-size:9px; font-weight:800; color:#fde68a;
  text-shadow:0 0 3px #000, 0 0 3px #000;
  white-space:nowrap; letter-spacing:-0.3px;
}

/* ====================================================================
   聊天
   ==================================================================== */
.chat-fab{
  position:fixed; right:16px; bottom:24px;
  width:52px; height:52px; border-radius:50%;
  background:linear-gradient(135deg,#fbbf24,#f59e0b);
  color:#000; font-size:24px;
  display:flex; align-items:center; justify-content:center;
  cursor:pointer; z-index:200;
  box-shadow:0 6px 20px rgba(0,0,0,.5),0 0 16px rgba(251,191,36,.5);
  transition:transform .15s;
  user-select:none;
}
.chat-fab.hidden{ display:none !important; }

.chat-panel{
  position:fixed; right:16px; bottom:86px;
  width:300px; max-width:calc(100vw - 32px);
  max-height:420px;
  background:#131822;
  border:1px solid rgba(251,191,36,.35);
  border-radius:12px;
  z-index:201;
  display:flex; flex-direction:column;
  overflow:hidden;
  box-shadow:0 12px 40px rgba(0,0,0,.7);
  pointer-events:auto;
}
.chat-panel.hidden{ display:none !important; }

.chat-panel-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 12px; background:#000;
  border-bottom:1px solid var(--border);
  font-size:13px; font-weight:700; color:var(--gold);
  pointer-events:auto;
}

.chat-close{
  pointer-events:auto !important;
  z-index:10 !important;
  min-width:32px !important;
  min-height:32px !important;
  padding:6px 10px !important;
  font-size:22px !important;
  font-weight:400 !important;
  line-height:1 !important;
  background:transparent !important;
  border:none !important;
  color:var(--text-2) !important;
  cursor:pointer !important;
  display:flex !important;
  align-items:center !important;
  justify-content:center !important;
}
.chat-close:hover{ color:var(--gold) !important; }
.chat-close:active{ transform:scale(.92) !important; }

.chat-messages{
  flex:1; overflow-y:auto;
  padding:8px 12px; font-size:12px;
  line-height:1.6; min-height:100px;
}
.chat-msg{ margin-bottom:4px; }
.chat-msg .chat-name{ color:var(--gold); font-weight:700; margin-right:6px; }
.chat-msg.self .chat-name{ color:#10b981; }
.chat-msg .chat-text{ color:var(--text); word-break:break-word; }

.chat-quick{
  display:grid;
  grid-template-columns:repeat(4,1fr);
  gap:4px; padding:8px;
  border-top:1px solid var(--border);
  flex-shrink:0;
}
.chat-quick button{
  padding:7px 4px; font-size:12px;
  border-radius:6px; border:1px solid var(--border-2);
  background:rgba(255,255,255,.04); color:var(--text);
  cursor:pointer;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.chat-quick button:hover{ background:rgba(251,191,36,.15); border-color:var(--gold); color:var(--gold); }

.chat-input-row{
  display:flex; gap:6px; padding:8px;
  border-top:1px solid var(--border);
  flex-shrink:0;
}
.chat-input-row input{
  flex:1; min-width:0; padding:7px 10px;
  background:#000; border:1px solid var(--border);
  border-radius:6px; color:var(--text);
  font-size:12px;
}
.chat-input-row button{
  padding:7px 14px;
  background:var(--gold); color:#000;
  border:none; border-radius:6px;
  font-size:12px; font-weight:700;
  cursor:pointer;
}

.chat-bubble{
  position:absolute; left:50%; bottom:100%;
  transform:translate(-50%,-8px);
  background:#fff; color:#0a0d14;
  padding:6px 12px; border-radius:14px;
  font-size:13px; font-weight:700; line-height:1.3;
  white-space:nowrap; max-width:200px;
  overflow:hidden; text-overflow:ellipsis;
  box-shadow:0 6px 18px rgba(0,0,0,.55);
  z-index:40; pointer-events:none;
  animation:bubbleIn .25s cubic-bezier(.3,1.5,.6,1);
  transition:opacity .35s ease,transform .35s ease;
}
.chat-bubble::after{
  content:''; position:absolute;
  left:50%; top:100%;
  transform:translateX(-50%);
  border:6px solid transparent;
  border-top-color:#fff; margin-top:-1px;
}
.chat-bubble.fade{ opacity:0; transform:translate(-50%,-20px) scale(.9); }
@keyframes bubbleIn{
  0%{ opacity:0; transform:translate(-50%,4px) scale(.7); }
  60%{ opacity:1; transform:translate(-50%,-12px) scale(1.05); }
  100%{ opacity:1; transform:translate(-50%,-8px) scale(1); }
}

.ingame-history{
  position:fixed; left:50%; top:50%;
  transform:translate(-50%,-50%);
  width:480px; max-width:calc(100vw - 40px);
  max-height:70vh;
  background:#131822;
  border:1px solid rgba(251,191,36,.35);
  border-radius:14px;
  z-index:210;
  display:flex; flex-direction:column;
  box-shadow:0 20px 60px rgba(0,0,0,.8);
}
.ingame-history.hidden{ display:none !important; }
.ingame-history-head{
  display:flex; justify-content:space-between; align-items:center;
  padding:12px 16px; background:#000;
  border-bottom:1px solid var(--border);
  font-size:14px; font-weight:700; color:var(--gold);
}
.ingame-history-body{ flex:1; overflow-y:auto; padding:10px; }
.ingame-history-item{
  padding:10px 12px; margin-bottom:8px;
  background:var(--panel); border:1px solid var(--border);
  border-radius:9px; font-size:12px;
}
.ihi-row{ display:flex; align-items:center; gap:8px; margin:3px 0; }
.ihi-row .ihi-label{ color:var(--text-2); min-width:32px; font-size:11px; }
.ihi-result{ margin-left:auto; font-weight:800; }
.ihi-result.pos{ color:var(--green); }
.ihi-result.neg{ color:var(--red); }
.mini-card-inline{
  display:inline-block; padding:1px 5px;
  border-radius:4px; background:#fff;
  font-family:monospace; font-weight:900;
  font-size:11px; border:1px solid #999;
}
.mini-card-inline.red{ color:#d61f1f; }
.mini-card-inline.black{ color:#000; }

/* ====================================================================
   竖屏提示
   ==================================================================== */
.portrait-hint{
  display:none; flex-direction:column;
  align-items:center; justify-content:center;
  padding:40px 20px; text-align:center;
  color:var(--text-2);
}
.portrait-hint.hidden{ display:none !important; }
.portrait-hint-icon{ font-size:48px; margin-bottom:14px; }
.portrait-hint-title{
  font-size:22px; font-weight:800; color:var(--gold);
  letter-spacing:2px; margin-bottom:10px;
}
.portrait-hint-desc{ font-size:13px; color:var(--text-2); line-height:1.6; }

/* ====================================================================
   中屏平板
   ==================================================================== */
@media (max-width:1200px) and (min-width:901px){
  .game-layout{
    grid-template-columns:200px minmax(0,1fr) 300px;
    gap:10px; padding:10px;
  }
  .side-right{ padding:12px; }
  .hand-cards-large .card{ width:88px; height:128px; }
  .hand-cards-large .card .v{ font-size:30px; }
  .hand-cards-large .card .s{ font-size:46px; }
}

/* ====================================================================
   手机通用
   ==================================================================== */
body.is-mobile{
  -webkit-text-size-adjust:100%;
  -webkit-tap-highlight-color:transparent;
  overscroll-behavior:none;
}
body.is-mobile button,
body.is-mobile .nav-link,
body.is-mobile .mode-tab,
body.is-mobile .seats-btn,
body.is-mobile .table-card,
body.is-mobile .room-item{
  touch-action:manipulation;
}
body.is-mobile .topbar{ padding:6px 10px; gap:6px; }
body.is-mobile .topbar-left{ gap:6px; }
body.is-mobile .logo{ font-size:11px; letter-spacing:0; }
body.is-mobile .nav-link{ padding:4px 8px; font-size:12px; }
body.is-mobile .lang-select{
  display:block !important;
  padding:3px 6px; font-size:10px;
  min-width:60px; height:26px; border-radius:6px;
}
body.is-mobile .status-pill{ padding:3px 7px; font-size:10px; }
body.is-mobile .btn-wallet{ padding:5px 10px; font-size:11px; }

body.is-mobile .lobby-container{ padding:10px; }
body.is-mobile .mode-switch{ display:flex; width:100%; padding:3px; margin-bottom:12px; }
body.is-mobile .mode-tab{ flex:1; padding:8px 4px; font-size:11px; justify-content:center; gap:4px; }
body.is-mobile .hero-card{ grid-template-columns:1fr; padding:16px; gap:12px; border-radius:14px; }
body.is-mobile .hero-title{ font-size:24px; }
body.is-mobile .hero-desc{ font-size:12px; max-width:none; }
body.is-mobile .hero-actions{ flex-direction:column; gap:6px; }
body.is-mobile .btn-hero-primary,
body.is-mobile .btn-hero-secondary{ width:100%; padding:12px; font-size:13px; }
body.is-mobile .hero-right{
  display:flex !important;
  align-items:center; justify-content:center;
  width:100%; margin-top:12px;
}
body.is-mobile .hero-right .wallet-card{
  max-width:100%; width:100%; padding:14px;
  background:rgba(0,0,0,.55);
  border-radius:14px;
  border:1px solid rgba(251,191,36,.22);
}
body.is-mobile .hero-right .wallet-card .wallet-label{ font-size:12px; }
body.is-mobile .hero-right .wallet-card .wallet-value{ font-size:15px; }
body.is-mobile .table-grid{ grid-template-columns:repeat(auto-fill,minmax(150px,1fr)); gap:8px; }
body.is-mobile .table-card{ padding:10px; gap:8px; border-radius:10px; }
body.is-mobile .table-card-preview{ height:60px; }
body.is-mobile .section-heading{ font-size:13px; margin:14px 0 8px; }
body.is-mobile .section-heading-row{
  flex-direction:column; align-items:flex-start; gap:8px;
  margin:14px 0 8px;
}
body.is-mobile .seats-picker{ width:100%; justify-content:space-between; }

body.is-mobile .numbers-container{ padding:12px; }
body.is-mobile .stats-hero{ grid-template-columns:repeat(2,1fr); gap:8px; }
body.is-mobile .stat-big{ grid-column:span 2; padding:14px; }
body.is-mobile .session-row{
  grid-template-columns:1.2fr 1fr 1fr 1fr;
  font-size:11px; padding:8px 10px; gap:6px;
}
body.is-mobile .session-row > span:nth-child(n+5){ display:none; }

body.is-mobile .rules-container{ padding:16px 12px; }
body.is-mobile .rule-grid{ grid-template-columns:1fr; gap:10px; }
body.is-mobile .faq-item summary{ padding:12px 14px; font-size:12px; }
body.is-mobile .faq-item p{ font-size:12px; padding:0 14px 12px; }

/* ====================================================================
   手机横屏：核心布局
   ==================================================================== */
body.is-mobile.orientation-landscape.game-active .topbar{ display:none !important; }

body.is-mobile.orientation-landscape{
  position:fixed; inset:0;
  width:100vw; height:100vh; height:100dvh;
  overflow:hidden; margin:0; padding:0;
}

body.is-mobile.orientation-landscape #gameScreen{
  position:fixed; inset:0;
  width:100vw; height:100vh; height:100dvh;
  overflow:hidden;
  display:flex; flex-direction:column;
  padding:0; margin:0;
}

body.is-mobile.orientation-landscape #gameScreen .game-topbar{
  flex-shrink:0;
  height:36px;
  padding:4px 8px; gap:6px;
  display:flex; align-items:center;
  background:#000;
  border-bottom:1px solid var(--border);
}
body.is-mobile.orientation-landscape #gameScreen .btn-back{ padding:4px 8px; font-size:11px; }
body.is-mobile.orientation-landscape #gameScreen .game-info{
  display:flex; align-items:center; gap:4px;
  font-size:11px; flex:1; min-width:0;
  overflow:hidden; white-space:nowrap;
}
body.is-mobile.orientation-landscape #gameScreen #gameLevelLabel{ font-size:11px; }
body.is-mobile.orientation-landscape #gameScreen #gameHandLabel{ font-size:11px; }
body.is-mobile.orientation-landscape #gameScreen .mode-tag,
body.is-mobile.orientation-landscape #gameScreen .stage-pill{
  font-size:10px; padding:2px 6px;
}
body.is-mobile.orientation-landscape #gameScreen #gameWalletPill{ display:none; }
body.is-mobile.orientation-landscape #gameScreen .game-right{ margin-left:auto; gap:3px; display:flex; align-items:center; }
body.is-mobile.orientation-landscape #gameScreen .btn-fullscreen{ padding:4px 8px; font-size:12px; }
body.is-mobile.orientation-landscape #gameScreen .btn-zoom{
  padding:3px 7px !important;
  font-size:12px !important;
  min-width:22px !important;
}
body.is-mobile.orientation-landscape #gameScreen .btn-back{
  background:rgba(239,68,68,.15) !important;
  border-color:rgba(239,68,68,.7) !important;
  color:#fca5a5 !important;
  font-weight:800 !important;
  padding:5px 10px !important;
  font-size:11px !important;
}
body.is-mobile.orientation-landscape #gameScreen .btn-back:active{
  background:rgba(239,68,68,.4) !important;
}

body.is-mobile.orientation-landscape #gameScreen .game-layout{
  display:flex; flex:1;
  min-height:0;
  width:100%; margin:0; padding:0;
  gap:0; position:relative;
}

body.is-mobile.orientation-landscape #gameScreen .side-left{ display:none; }

body.is-mobile.orientation-landscape #gameScreen .table-area{
  flex:1; min-width:0;
  position:relative;
  display:flex; align-items:center; justify-content:center;
  padding:26px 6px 34px;
  overflow:hidden;
}

body.is-mobile.orientation-landscape #gameScreen .poker-table{
  position:relative;
  width:min(100%, calc((100vh - 96px) * 1.6));
  width:min(100%, calc((100dvh - 96px) * 1.6));
  aspect-ratio:16 / 10;
  height:auto;
  border-radius:50%;
  margin:0;
  border-width:6px;
  border-color:#5a3a20 #2e1c0e #2e1c0e #5a3a20;
  flex-shrink:0;
}

body.is-mobile.orientation-landscape #gameScreen .dealer-seat{ top:2px; }
body.is-mobile.orientation-landscape #gameScreen .dealer-avatar{
  width:30px; height:30px; font-size:15px;
}
body.is-mobile.orientation-landscape #gameScreen .dealer-name{ font-size:9px; }

body.is-mobile.orientation-landscape #gameScreen .side-right{
  width:200px; min-width:180px; max-width:32vw;
  flex-shrink:0;
  padding:6px 8px; margin:0;
  border-left:1px solid rgba(251,191,36,.35);
  border-radius:0;
  overflow-y:auto; overflow-x:hidden;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:thin;
  display:flex; flex-direction:column;
  gap:4px;
}
body.is-mobile.orientation-landscape #gameScreen .side-right::-webkit-scrollbar{ width:4px; }
body.is-mobile.orientation-landscape #gameScreen .side-right::-webkit-scrollbar-thumb{
  background:rgba(251,191,36,.5); border-radius:2px;
}
body.is-mobile.orientation-landscape #gameScreen .hand-panel-head{ font-size:10px; }
body.is-mobile.orientation-landscape #gameScreen .hand-label{ font-size:10px; }
body.is-mobile.orientation-landscape #gameScreen .hand-bem{ font-size:10px; }
body.is-mobile.orientation-landscape #gameScreen .hand-cards-large{
  gap:5px; padding:2px 0; justify-content:center;
}
body.is-mobile.orientation-landscape #gameScreen .hand-cards-large .card{
  width:52px; height:74px;
  padding:3px; border-radius:6px;
  border-width:1px;
}
body.is-mobile.orientation-landscape #gameScreen .hand-cards-large .card .v{
  font-size:16px; font-weight:900;
}
body.is-mobile.orientation-landscape #gameScreen .hand-cards-large .card .s{
  font-size:22px; font-weight:900;
}
body.is-mobile.orientation-landscape #gameScreen .turn-timer{ padding:3px 6px; gap:5px; }
body.is-mobile.orientation-landscape #gameScreen .timer-bar{ height:5px; }
body.is-mobile.orientation-landscape #gameScreen .timer-text{
  font-size:11px; min-width:26px;
}

body.is-mobile.orientation-landscape #gameScreen .human-actions{
  display:grid;
  grid-template-columns:repeat(3, 1fr);
  gap:4px; margin-top:0;
}
body.is-mobile.orientation-landscape #gameScreen .human-actions button{
  padding:8px 2px;
  font-size:11px; font-weight:800;
  min-height:34px;
  border-radius:6px;
  line-height:1.1;
}

body.is-mobile.orientation-landscape #gameScreen .raise-panel{
  padding:6px; gap:4px;
  margin-top:4px; border-radius:8px;
}
body.is-mobile.orientation-landscape #gameScreen .raise-amount-display{ font-size:18px; }
body.is-mobile.orientation-landscape #gameScreen .raise-input-row{ margin-bottom:3px; gap:4px; }
body.is-mobile.orientation-landscape #gameScreen .raise-input-row .raise-step{
  width:28px; height:28px; font-size:14px;
}
body.is-mobile.orientation-landscape #gameScreen .raise-input-row .raise-input{
  height:28px; font-size:13px;
}
body.is-mobile.orientation-landscape #gameScreen .raise-slider{ height:4px; }
body.is-mobile.orientation-landscape #gameScreen .raise-minmax{ font-size:9px; }
body.is-mobile.orientation-landscape #gameScreen .raise-presets{
  grid-template-columns:repeat(4, 1fr); gap:3px;
}
body.is-mobile.orientation-landscape #gameScreen .raise-presets button{
  padding:5px 2px; font-size:10px;
  min-height:26px; border-radius:5px;
}
body.is-mobile.orientation-landscape #gameScreen .raise-buttons button{
  padding:7px; font-size:11px;
}
body.is-mobile.orientation-landscape #gameScreen .show-cards-btn,
body.is-mobile.orientation-landscape #gameScreen .next-btn{
  padding:7px 16px; font-size:11px; margin-top:4px;
}

body.is-mobile.orientation-landscape #gameScreen .seat{
  width:66px; padding:3px 5px;
  border-radius:8px; border-width:1px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me{
  width:78px; border-width:2px;
}
body.is-mobile.orientation-landscape #gameScreen .seat-head{
  gap:4px; margin-bottom:2px;
}
body.is-mobile.orientation-landscape #gameScreen .avatar-wrap{
  width:20px; height:20px;
  font-size:11px; border-width:1px;
}
body.is-mobile.orientation-landscape #gameScreen .seat-name{
  font-size:9px; font-weight:700; margin-bottom:0;
}
body.is-mobile.orientation-landscape #gameScreen .pos-badge{
  font-size:7px; padding:1px 3px;
}
body.is-mobile.orientation-landscape #gameScreen .seat-style{ display:none; }
body.is-mobile.orientation-landscape #gameScreen .seat-chips{
  font-size:10px; font-weight:800; margin-top:1px;
}
body.is-mobile.orientation-landscape #gameScreen .seat-bet{
  font-size:8px; margin-top:1px; min-height:9px;
}
body.is-mobile.orientation-landscape #gameScreen .seat-cards{
  gap:2px; margin-top:3px;
}
body.is-mobile.orientation-landscape #gameScreen .mini-card{
  width:13px; height:19px; border-radius:3px;
}
body.is-mobile.orientation-landscape #gameScreen .mini-card::after{ inset:2px; }
body.is-mobile.orientation-landscape #gameScreen .mini-card.face .v{
  font-size:8px; top:1px; left:2px;
}
body.is-mobile.orientation-landscape #gameScreen .mini-card.face .s{
  font-size:10px; bottom:0; right:2px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me .mini-card{
  width:18px; height:26px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me .mini-card.face .v{
  font-size:11px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me .mini-card.face .s{
  font-size:14px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card{
  width:20px; height:30px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .v{
  font-size:11px;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .s{
  font-size:14px;
}

body.is-mobile.orientation-landscape #gameScreen .board-cards{
  gap:3px; min-height:34px;
}
body.is-mobile.orientation-landscape #gameScreen .board-cards .card{
  width:30px; height:42px;
  padding:2px; border-radius:4px;
  border-width:1px;
}
body.is-mobile.orientation-landscape #gameScreen .board-cards .card .v{
  font-size:11px; font-weight:900;
}
body.is-mobile.orientation-landscape #gameScreen .board-cards .card .s{
  font-size:16px; font-weight:900;
}

body.is-mobile.orientation-landscape #gameScreen .pot-display{
  font-size:11px; gap:3px;
}
body.is-mobile.orientation-landscape #gameScreen .pot-label{ font-size:10px; }
body.is-mobile.orientation-landscape #gameScreen .pot-value{ font-size:14px; }
body.is-mobile.orientation-landscape #gameScreen .pot-side{ font-size:10px; }

body.is-mobile.orientation-landscape #gameScreen .pot-chips{
  position:absolute;
  right:calc(50% + 55px);
  top:50%;
  transform:translateY(calc(-50% - 40px));
  padding:5px 8px 11px 8px;
  gap:5px; max-width:120px;
  border-radius:8px;
  margin:0; min-height:auto;
}
body.is-mobile.orientation-landscape #gameScreen .pot-chips .pot-chips-inner,
body.is-mobile.orientation-landscape #gameScreen .pot-chips .chip-stack-wrap{ gap:5px; }
body.is-mobile.orientation-landscape #gameScreen .pot-chips .chip-column{
  width:14px; padding:0 1px;
}
body.is-mobile.orientation-landscape #gameScreen .pot-chips .chip-piece{
  width:14px; height:3px;
  margin-top:-1.2px; border-width:0.5px;
}
body.is-mobile.orientation-landscape #gameScreen .pot-chips .chip-label{
  font-size:7px; bottom:-9px;
}
body.is-mobile.orientation-landscape #gameScreen .table-center{
  width:60%; gap:4px;
}

body.is-mobile.orientation-landscape #gameScreen .waiting-bar{
  position:absolute;
  left:8px; right:8px; bottom:6px;
  top:auto; transform:none;
  z-index:60;
  padding:5px 10px; font-size:10px;
  justify-content:space-between;
}
body.is-mobile.orientation-landscape #gameScreen .waiting-bar .waiting-room{
  font-size:10px; padding-right:6px;
}
body.is-mobile.orientation-landscape #gameScreen .waiting-bar .waiting-info{
  font-size:10px;
}
body.is-mobile.orientation-landscape #gameScreen .waiting-bar .mini-btn{
  padding:4px 8px; font-size:10px;
}
body.is-mobile.orientation-landscape #gameScreen .next-hand-toast{
  font-size:14px; padding:8px 14px; min-width:100px;
}
body.is-mobile.orientation-landscape #gameScreen .tie-display{
  font-size:18px; padding:8px 20px;
}
body.is-mobile.orientation-landscape #gameScreen .chat-bubble{
  font-size:10px; padding:3px 8px;
  max-width:100px; border-radius:10px;
}
body.is-mobile.orientation-landscape #gameScreen .chat-bubble::after{
  border-width:4px;
}

body.is-mobile.orientation-landscape .ingame-history{
  width:60vw; max-height:70vh;
}

body.is-mobile.orientation-landscape #gameScreen .seat.intent-reveal{
  box-shadow:
    0 0 18px rgba(59,130,246,.7),
    0 0 32px rgba(59,130,246,.3),
    0 8px 20px rgba(0,0,0,.6) !important;
}

/* ====================================================================
   手机竖屏：完整牌桌布局
   ==================================================================== */
body.is-mobile.orientation-portrait #gameScreen{
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 0;
  margin: 0;
  overflow: hidden;
  background: var(--bg);
}

body.is-mobile.orientation-portrait #gameScreen .game-topbar{
  height: 42px;
  padding: 4px 8px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  background: #000;
  border-bottom: 1px solid var(--border);
}
body.is-mobile.orientation-portrait #gameScreen .btn-back{
  padding: 4px 8px;
  font-size: 11px;
}
body.is-mobile.orientation-portrait #gameScreen .game-info{
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 10px;
  flex: 1;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}
body.is-mobile.orientation-portrait #gameScreen .game-info .sep{ display: none; }
body.is-mobile.orientation-portrait #gameScreen #gameLevelLabel,
body.is-mobile.orientation-portrait #gameScreen #gameHandLabel{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .mode-tag,
body.is-mobile.orientation-portrait #gameScreen .stage-pill{
  font-size: 9px;
  padding: 2px 6px;
}
body.is-mobile.orientation-portrait #gameScreen #gameWalletPill{ display: none; }
body.is-mobile.orientation-portrait #gameScreen .game-right{
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
}
body.is-mobile.orientation-portrait #gameScreen .btn-fullscreen{
  padding: 4px 8px;
  font-size: 12px;
}
body.is-mobile.orientation-portrait #gameScreen .btn-ready-top{
  padding: 5px 10px;
  font-size: 11px;
}

body.is-mobile.orientation-portrait #gameScreen .game-layout{
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  min-height: 0;
  overflow: hidden;
  padding: 0;
  margin: 0;
  gap: 0;
  position: relative;
  grid-template-columns: none;
  grid-template-rows: none;
}
body.is-mobile.orientation-portrait #gameScreen .side-left{ display: none; }

body.is-mobile.orientation-portrait #gameScreen .table-area{
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
  padding: 30px 4px 4px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
body.is-mobile.orientation-portrait #gameScreen .poker-table{
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  aspect-ratio: unset;
  border-radius: 50% / 45%;
  border-width: 5px;
  border-color: #5a3a20 #2e1c0e #2e1c0e #5a3a20;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .dealer-seat{
  position: absolute;
  top: -8px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
}
body.is-mobile.orientation-portrait #gameScreen .dealer-avatar{
  width: 30px;
  height: 30px;
  font-size: 15px;
}
body.is-mobile.orientation-portrait #gameScreen .dealer-name{
  font-size: 9px;
  margin-top: 1px;
}

body.is-mobile.orientation-portrait #gameScreen .seat{
  width: 62px;
  padding: 3px 5px;
  border-radius: 8px;
  border-width: 1px;
}
body.is-mobile.orientation-portrait #gameScreen .seat.me{
  width: 74px;
  border-width: 2px;
}
body.is-mobile.orientation-portrait #gameScreen .seat-head{
  gap: 3px;
  margin-bottom: 2px;
}
body.is-mobile.orientation-portrait #gameScreen .avatar-wrap{
  width: 20px;
  height: 20px;
  font-size: 11px;
  border-width: 1px;
}
body.is-mobile.orientation-portrait #gameScreen .seat-name{
  font-size: 9px;
  font-weight: 700;
  margin-bottom: 0;
}
body.is-mobile.orientation-portrait #gameScreen .pos-badge{
  font-size: 7px;
  padding: 1px 3px;
}
body.is-mobile.orientation-portrait #gameScreen .seat-style{ display: none; }
body.is-mobile.orientation-portrait #gameScreen .seat-chips{
  font-size: 10px;
  font-weight: 800;
  margin-top: 1px;
}
body.is-mobile.orientation-portrait #gameScreen .seat-bet{
  font-size: 8px;
  margin-top: 1px;
  min-height: 9px;
}
body.is-mobile.orientation-portrait #gameScreen .seat-cards{
  gap: 2px;
  margin-top: 3px;
}
body.is-mobile.orientation-portrait #gameScreen .mini-card{
  width: 13px;
  height: 19px;
  border-radius: 3px;
}
body.is-mobile.orientation-portrait #gameScreen .mini-card::after{ inset: 2px; }
body.is-mobile.orientation-portrait #gameScreen .mini-card.face .v{
  font-size: 8px;
  top: 1px;
  left: 2px;
}
body.is-mobile.orientation-portrait #gameScreen .mini-card.face .s{
  font-size: 10px;
  bottom: 0;
  right: 2px;
}
body.is-mobile.orientation-portrait #gameScreen .seat.me .mini-card{
  width: 18px;
  height: 26px;
}
body.is-mobile.orientation-portrait #gameScreen .seat.me .mini-card.face .v{ font-size: 11px; }
body.is-mobile.orientation-portrait #gameScreen .seat.me .mini-card.face .s{ font-size: 14px; }

body.is-mobile.orientation-portrait #gameScreen .board-cards{
  gap: 3px;
  min-height: 40px;
}
body.is-mobile.orientation-portrait #gameScreen .board-cards .card{
  width: 34px;
  height: 48px;
  padding: 3px;
  border-radius: 5px;
  border-width: 1px;
}
body.is-mobile.orientation-portrait #gameScreen .board-cards .card .v{ font-size: 12px; }
body.is-mobile.orientation-portrait #gameScreen .board-cards .card .s{ font-size: 18px; }

body.is-mobile.orientation-portrait #gameScreen .pot-display{
  font-size: 12px;
  gap: 4px;
}
body.is-mobile.orientation-portrait #gameScreen .pot-label{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .pot-value{ font-size: 15px; }
body.is-mobile.orientation-portrait #gameScreen .pot-side{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .pot-chips{
  position: absolute;
  right: calc(50% + 45px);
  top: 50%;
  transform: translateY(calc(-50% - 35px));
  padding: 3px 6px 8px 6px;
  gap: 3px;
  max-width: 100px;
}
body.is-mobile.orientation-portrait #gameScreen .pot-chips .chip-column{ width: 10px; }
body.is-mobile.orientation-portrait #gameScreen .pot-chips .chip-piece{
  width: 10px;
  height: 3px;
  margin-top: -1px;
}
body.is-mobile.orientation-portrait #gameScreen .pot-chips .chip-label{
  font-size: 6px;
  bottom: -7px;
}
body.is-mobile.orientation-portrait #gameScreen .table-center{
  width: 75%;
  gap: 4px;
}

body.is-mobile.orientation-portrait #gameScreen .side-right{
  flex: 0 0 auto;
  width: 100%;
  max-height: 42vh;
  padding: 6px 8px calc(8px + env(safe-area-inset-bottom, 0px));
  margin: 0;
  border-left: none;
  border-top: 1px solid rgba(251,191,36,.35);
  border-radius: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
  overflow-y: auto;
  background: linear-gradient(180deg, #0e131c, #0a0d14);
}
body.is-mobile.orientation-portrait #gameScreen .hand-panel-head{
  font-size: 11px;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .hand-label,
body.is-mobile.orientation-portrait #gameScreen .hand-bem{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .hand-cards-large{
  gap: 8px;
  padding: 4px 0;
  justify-content: center;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .hand-cards-large .card{
  width: 68px;
  height: 96px;
  padding: 4px;
  border-radius: 8px;
  border-width: 2px;
}
body.is-mobile.orientation-portrait #gameScreen .hand-cards-large .card .v{
  font-size: 24px;
  font-weight: 900;
}
body.is-mobile.orientation-portrait #gameScreen .hand-cards-large .card .s{
  font-size: 34px;
  font-weight: 900;
}

body.is-mobile.orientation-portrait #gameScreen .turn-timer{
  padding: 4px 8px;
  gap: 5px;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .timer-bar{ height: 5px; }
body.is-mobile.orientation-portrait #gameScreen .timer-text{
  font-size: 11px;
  min-width: 28px;
}

body.is-mobile.orientation-portrait #gameScreen .human-actions{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-top: 0;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .human-actions button{
  padding: 12px 4px;
  font-size: 13px;
  font-weight: 800;
  min-height: 44px;
  border-radius: 9px;
  line-height: 1.1;
}

body.is-mobile.orientation-portrait #gameScreen .raise-panel{
  padding: 8px;
  gap: 6px;
  margin-top: 4px;
  border-radius: 10px;
  flex-shrink: 0;
}
body.is-mobile.orientation-portrait #gameScreen .raise-amount-display{ font-size: 20px; }
body.is-mobile.orientation-portrait #gameScreen .raise-input-row{ margin-bottom: 4px; gap: 5px; }
body.is-mobile.orientation-portrait #gameScreen .raise-input-row .raise-step{
  width: 32px;
  height: 32px;
  font-size: 16px;
}
body.is-mobile.orientation-portrait #gameScreen .raise-input-row .raise-input{
  height: 32px;
  font-size: 14px;
}
body.is-mobile.orientation-portrait #gameScreen .raise-slider{ height: 5px; }
body.is-mobile.orientation-portrait #gameScreen .raise-minmax{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .raise-presets{
  grid-template-columns: repeat(4, 1fr);
  gap: 4px;
}
body.is-mobile.orientation-portrait #gameScreen .raise-presets button{
  padding: 8px 2px;
  font-size: 11px;
  min-height: 34px;
  border-radius: 6px;
}
body.is-mobile.orientation-portrait #gameScreen .raise-buttons{
  gap: 6px;
}
body.is-mobile.orientation-portrait #gameScreen .raise-buttons button{
  padding: 10px;
  font-size: 13px;
  border-radius: 8px;
}

body.is-mobile.orientation-portrait #gameScreen .next-btn,
body.is-mobile.orientation-portrait #gameScreen .show-cards-btn{
  padding: 10px 24px;
  font-size: 13px;
  margin-top: 4px;
  flex-shrink: 0;
}

body.is-mobile.orientation-portrait #gameScreen .waiting-bar{
  position: absolute;
  left: 6px;
  right: 6px;
  bottom: 6px;
  top: auto;
  transform: none;
  z-index: 60;
  padding: 6px 10px;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
}
body.is-mobile.orientation-portrait #gameScreen .waiting-bar .waiting-room{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .waiting-bar .waiting-info{ font-size: 10px; }
body.is-mobile.orientation-portrait #gameScreen .waiting-bar .mini-btn{
  padding: 5px 10px;
  font-size: 11px;
}

body.is-mobile.orientation-portrait .ingame-history{
  width: calc(100vw - 32px);
  max-height: 70vh;
}

body.is-mobile.orientation-portrait .portrait-hint{ display: none !important; }

body.is-mobile.orientation-portrait #gameScreen .spectator-panel{
  padding: 10px;
  margin-bottom: 6px;
}
body.is-mobile.orientation-portrait #gameScreen .spectator-title{ font-size: 12px; }
body.is-mobile.orientation-portrait #gameScreen .btn-take-seat{
  padding: 12px 14px;
  font-size: 14px;
}

/* ====================================================================
   全屏模式
   ==================================================================== */
body.is-fullscreen.is-mobile.orientation-landscape #gameScreen{
  height:100vh;
  height:100dvh;
}

#gameScreen {
  zoom: var(--zoom-scale, 1);
}
body.zoom-active #gameScreen {
  right: auto !important;
  bottom: auto !important;
  width: var(--zoom-w, 100vw);
  height: var(--zoom-h, 100vh);
}

/* ====================================================================
   手机端对局记录按钮 + 面板
   ==================================================================== */
.mobile-log-fab{
  position:fixed;
  right:calc(200px + 12px);
  top:44px;
  width:36px; height:36px; border-radius:10px;
  background:rgba(20,26,38,.95);
  border:1px solid rgba(251,191,36,.5);
  color:var(--gold);
  font-size:18px;
  display:flex; align-items:center; justify-content:center;
  z-index:80;
  box-shadow:0 4px 12px rgba(0,0,0,.6),0 0 8px rgba(251,191,36,.3);
  cursor:pointer; user-select:none;
}
.mobile-log-fab:active{ background:rgba(251,191,36,.25); }
.mobile-log-fab.hidden{ display:none !important; }

.mobile-log-panel{
  position:fixed;
  left:8px;
  right:calc(200px + 12px);
  top:44px; bottom:8px;
  background:#0e131c;
  border:1px solid rgba(251,191,36,.4);
  border-radius:10px;
  z-index:90;
  display:flex; flex-direction:column;
  overflow:hidden;
  box-shadow:0 8px 32px rgba(0,0,0,.85);
}
.mobile-log-panel.hidden{ display:none !important; }
.mobile-log-head{
  display:flex; align-items:center; justify-content:space-between;
  padding:5px 8px; background:#000;
  border-bottom:1px solid var(--border);
  flex-shrink:0;
}
.mobile-log-tabs{ display:flex; gap:4px; }
.mobile-log-tab{
  padding:4px 10px; font-size:11px; font-weight:700;
  border-radius:6px;
  border:1px solid var(--border-2);
  background:transparent; color:var(--text-2);
  cursor:pointer;
}
.mobile-log-tab.active{
  background:var(--gold); color:#000;
  border-color:var(--gold);
}
.mobile-log-body{
  flex:1; min-height:0;
  overflow-y:auto; padding:8px;
}
.mobile-log-body.hidden{ display:none !important; }
body.is-mobile.orientation-landscape #mobileLogArea{
  max-height:none !important;
  font-size:11px;
}
body.is-desktop .mobile-log-fab,
body.is-desktop .mobile-log-panel{ display:none !important; }

/* ====================================================================
   Toast
   ==================================================================== */
.app-toast{
  position: fixed;
  left: 50%;
  top: 20px;
  transform: translateX(-50%) translateY(-20px);
  background: rgba(20,26,38,.98);
  border: 1px solid rgba(251,191,36,.6);
  color: var(--text);
  padding: 12px 20px;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  z-index: 10000;
  box-shadow: 0 8px 32px rgba(0,0,0,.8), 0 0 16px rgba(251,191,36,.3);
  opacity: 0;
  transition: opacity .25s, transform .25s;
  pointer-events: none;
  max-width: 90vw;
  text-align: center;
  white-space: pre-wrap;
}
.app-toast.show{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.app-toast.error{
  border-color: rgba(239,68,68,.7);
  box-shadow: 0 8px 32px rgba(0,0,0,.8), 0 0 16px rgba(239,68,68,.35);
}
.app-toast.success{
  border-color: rgba(16,185,129,.7);
  box-shadow: 0 8px 32px rgba(0,0,0,.8), 0 0 16px rgba(16,185,129,.35);
}

/* ====================================================================
   观战席 + 房主控制
   ==================================================================== */
.room-type-picker{
  display: flex; gap: 8px; justify-content: center;
  margin: 12px 0 16px;
}
.room-type-btn{
  flex: 1;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border-2);
  background: rgba(255,255,255,.04);
  color: var(--text-2);
  font-size: 13px; font-weight: 700;
  cursor: pointer;
  transition: all .15s;
}
.room-type-btn.active{
  background: var(--gold); color: #000;
  border-color: var(--gold);
}

.spectator-panel{
  padding: 10px;
  background: rgba(168,85,247,.1);
  border: 1px solid rgba(168,85,247,.4);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 8px;
  margin-bottom: 8px;
}
.spectator-panel.hidden{ display: none !important; }

.spectator-head{ text-align: center; }
.spectator-title{
  font-size: 12px; font-weight: 700;
  color: #c4b5fd;
  letter-spacing: 1px;
}

.btn-take-seat{
  padding: 12px 14px;
  background: linear-gradient(135deg,#a855f7,#6d28d9);
  color: #fff; border: none;
  border-radius: 8px;
  font-size: 14px; font-weight: 800;
  cursor: pointer;
  transition: all .15s;
}
.btn-take-seat:hover{
  box-shadow: 0 0 16px rgba(168,85,247,.6);
  transform: translateY(-1px);
}
.btn-take-seat.hidden{ display: none !important; }

.btn-leave-seat{
  padding: 8px 12px;
  background: transparent;
  color: #c4b5fd;
  border: 1px solid rgba(168,85,247,.5);
  border-radius: 8px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}
.btn-leave-seat.hidden{ display: none !important; }

.spectator-list-title{
  font-size: 11px; color: var(--text-2);
  letter-spacing: 1px;
  margin-top: 4px;
}
.spectator-list{
  display: flex; flex-direction: column; gap: 4px;
  max-height: 100px; overflow-y: auto;
}
.spectator-item{
  font-size: 12px;
  color: var(--text-2);
  padding: 4px 8px;
  background: rgba(0,0,0,.3);
  border-radius: 6px;
}
.spectator-empty{
  font-size: 11px; color: var(--muted);
  text-align: center; padding: 4px;
}

.host-control-panel{
  padding: 8px;
  background: rgba(251,191,36,.1);
  border: 1px solid rgba(251,191,36,.4);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px;
  margin-bottom: 8px;
}
.host-control-panel.hidden{ display: none !important; }
.host-panel-title{
  font-size: 11px; font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
  text-align: center;
}
.btn-host-mini{
  padding: 8px 10px;
  background: rgba(251,191,36,.15);
  color: var(--gold);
  border: 1px solid rgba(251,191,36,.5);
  border-radius: 6px;
  font-size: 12px; font-weight: 700;
  cursor: pointer;
}

.players-list{
  display: flex; flex-direction: column; gap: 6px;
  max-height: 50vh; overflow-y: auto;
  margin: 12px 0;
  text-align: left;
}
.player-row{
  display: flex; align-items: center; gap: 8px;
  padding: 8px 10px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 12px;
}
.player-row-name{ flex: 1; font-weight: 700; }
.player-row-role{
  font-size: 10px; padding: 2px 6px;
  border-radius: 4px;
  background: rgba(251,191,36,.15);
  color: var(--gold);
}
.player-row-role.spectator{
  background: rgba(148,163,184,.2);
  color: #cbd5e1;
}
.player-row-btn{
  padding: 4px 8px;
  font-size: 11px; font-weight: 700;
  border-radius: 5px;
  border: 1px solid var(--border-2);
  background: transparent;
  color: var(--text-2);
  cursor: pointer;
}
.player-row-btn.kick{
  border-color: rgba(239,68,68,.5);
  color: #fca5a5;
}
.player-row-btn.host{
  border-color: rgba(251,191,36,.5);
  color: var(--gold);
}

.overlay-card-wide{ max-width: 520px; }

/* ====================================================================
   ★★★ 最终修复包（覆盖前面所有相关规则）
   1. 浮动按钮上移
   2. 筹码堆浮到座位外侧（不再归位）
   3. All-in 红色高亮（已在前面定义，此处重复确保生效）
   ==================================================================== */

/* --- 浮动按钮：竖屏 --- */
body.is-mobile.orientation-portrait .chat-fab{
  right: 10px !important;
  bottom: auto !important;
  top: calc(env(safe-area-inset-top, 0px) + 50px) !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 20px !important;
  z-index: 300 !important;
}
body.is-mobile.orientation-portrait .mobile-log-fab{
  right: 58px !important;
  bottom: auto !important;
  top: calc(env(safe-area-inset-top, 0px) + 50px) !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 20px !important;
  z-index: 300 !important;
}
body.is-mobile.orientation-portrait .chat-panel{
  right: 8px !important;
  bottom: auto !important;
  top: calc(env(safe-area-inset-top, 0px) + 96px) !important;
  max-height: 55vh !important;
}

/* --- 浮动按钮：横屏 --- */
body.is-mobile.orientation-landscape .chat-fab{
  right: calc(200px + 12px) !important;
  bottom: auto !important;
  top: 46px !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 20px !important;
  z-index: 300 !important;
}
body.is-mobile.orientation-landscape .mobile-log-fab{
  right: calc(200px + 60px) !important;
  bottom: auto !important;
  top: 46px !important;
  width: 40px !important;
  height: 40px !important;
  font-size: 20px !important;
  z-index: 300 !important;
}
body.is-mobile.orientation-landscape .chat-panel{
  right: calc(200px + 12px) !important;
  bottom: auto !important;
  top: 92px !important;
  max-height: 60vh !important;
}
body.is-mobile.orientation-landscape .mobile-log-panel{
  left: 8px !important;
  right: calc(200px + 12px) !important;
  top: 92px !important;
  bottom: 8px !important;
}

/* --- 筹码堆：浮到座位外侧（关键：用 !important 压过前面所有规则） --- */
body.is-desktop .seat .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat .chip-stack-wrap{
  position: absolute !important;
  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 2px !important;
  margin: 0 !important;
  padding: 3px 5px 5px 5px !important;
  background: rgba(0,0,0,.92) !important;
  border: 1px solid rgba(251,191,36,.5) !important;
  border-radius: 8px !important;
  box-shadow: 0 2px 10px rgba(0,0,0,.9), 0 0 6px rgba(251,191,36,.25) !important;
  max-width: 100px !important;
  width: auto !important;
  height: auto !important;
  z-index: 8 !important;
  white-space: nowrap !important;
  pointer-events: none !important;
  overflow: visible !important;
}

body.is-desktop .seat[data-chip-side="top"] .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat[data-chip-side="top"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="top"] .chip-stack-wrap{
  left: 50% !important; right: auto !important;
  bottom: calc(100% + 4px) !important; top: auto !important;
  transform: translateX(-50%) !important;
}
body.is-desktop .seat[data-chip-side="bottom"] .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat[data-chip-side="bottom"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="bottom"] .chip-stack-wrap{
  left: 50% !important; right: auto !important;
  top: calc(100% + 4px) !important; bottom: auto !important;
  transform: translateX(-50%) !important;
}
body.is-desktop .seat[data-chip-side="left"] .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat[data-chip-side="left"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="left"] .chip-stack-wrap{
  right: calc(100% + 4px) !important; left: auto !important;
  top: 50% !important; bottom: auto !important;
  transform: translateY(-50%) !important;
}
body.is-desktop .seat[data-chip-side="right"] .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat[data-chip-side="right"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="right"] .chip-stack-wrap{
  left: calc(100% + 4px) !important; right: auto !important;
  top: 50% !important; bottom: auto !important;
  transform: translateY(-50%) !important;
}

/* 桌面端筹码片尺寸 */
body.is-desktop .seat .chip-column{ width: 14px !important; }
body.is-desktop .seat .chip-piece{
  width: 14px !important; height: 4px !important; margin-top: -1.2px !important;
}
body.is-desktop .seat .chip-label{
  font-size: 8px !important; bottom: -10px !important;
}

/* 手机横屏筹码片尺寸 */
body.is-mobile.orientation-landscape #gameScreen .seat .chip-column{ width: 9px !important; }
body.is-mobile.orientation-landscape #gameScreen .seat .chip-piece{
  width: 9px !important; height: 3px !important;
  margin-top: -0.5px !important;
  border-width: 0.5px !important;
  border-radius: 50% !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat .chip-label{
  font-size: 6px !important; bottom: -8px !important;
  color: #fbbf24 !important; letter-spacing: -0.3px !important;
  text-shadow: 0 0 2px #000 !important;
}

/* 竖屏筹码片尺寸 */
body.is-mobile.orientation-portrait .seat .chip-column{ width: 11px !important; }
body.is-mobile.orientation-portrait .seat .chip-piece{
  width: 11px !important; height: 3px !important;
  margin-top: -0.8px !important;
  border-radius: 50% !important;
}
body.is-mobile.orientation-portrait .seat .chip-label{
  font-size: 7px !important; bottom: -9px !important;
}

body .seat .chip-stack-wrap.empty{ display: none !important; }

/* ====================================================================
   ★★★ 最终回滚：筹码堆回到座位内部（紧凑显示，不再浮出外侧）
   此段必须放在 CSS 文件最末尾，覆盖前面所有"浮出"规则
   ==================================================================== */

/* 1. 取消所有浮出定位，回到座位内部 */
body.is-desktop .seat .chip-stack-wrap,
body.is-desktop .seat.me .chip-stack-wrap,
body.is-desktop .seat[data-chip-side] .chip-stack-wrap,

body.is-mobile .seat .chip-stack-wrap,
body.is-mobile .seat.me .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat.me .chip-stack-wrap,
body.is-mobile.orientation-portrait .seat[data-chip-side] .chip-stack-wrap,

body.is-mobile.orientation-landscape #gameScreen .seat .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat.me .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="top"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="bottom"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="left"] .chip-stack-wrap,
body.is-mobile.orientation-landscape #gameScreen .seat[data-chip-side="right"] .chip-stack-wrap{
  position: static !important;
  top: auto !important;
  bottom: auto !important;
  left: auto !important;
  right: auto !important;
  transform: none !important;

  display: flex !important;
  flex-direction: row !important;
  justify-content: center !important;
  align-items: flex-end !important;
  gap: 1px !important;
  margin: 2px auto 1px auto !important;
  padding: 0 !important;

  background: transparent !important;
  border: none !important;
  box-shadow: none !important;

  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  z-index: auto !important;
  white-space: normal !important;
  pointer-events: none !important;
  overflow: visible !important;
}

/* 2. 桌面端筹码片尺寸（紧凑） */
body.is-desktop .seat .chip-column{
  width: 12px !important;
}
body.is-desktop .seat .chip-piece{
  width: 12px !important;
  height: 3px !important;
  margin-top: -1px !important;
}
body.is-desktop .seat .chip-label{
  font-size: 7px !important;
  bottom: -9px !important;
}

/* 3. 手机横屏筹码片尺寸（更紧凑，7 人局也不挤） */
body.is-mobile.orientation-landscape #gameScreen .seat .chip-column{
  width: 7px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat .chip-piece{
  width: 7px !important;
  height: 2px !important;
  margin-top: -0.5px !important;
  border-width: 0.5px !important;
  border-radius: 50% !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat .chip-label{
  font-size: 5px !important;
  bottom: -6px !important;
  color: #fbbf24 !important;
  letter-spacing: -0.3px !important;
  text-shadow: 0 0 2px #000 !important;
}

/* 4. 手机竖屏筹码片尺寸（更紧凑） */
body.is-mobile.orientation-portrait .seat .chip-column{
  width: 8px !important;
}
body.is-mobile.orientation-portrait .seat .chip-piece{
  width: 8px !important;
  height: 2px !important;
  margin-top: -0.5px !important;
  border-radius: 50% !important;
}
body.is-mobile.orientation-portrait .seat .chip-label{
  font-size: 5px !important;
  bottom: -6px !important;
}

/* 5. 座位高度不再被筹码堆撑高（给筹码堆一个固定的小高度） */
body.is-mobile.orientation-landscape #gameScreen .seat .chip-stack-wrap{
  max-height: 18px !important;
}
body.is-mobile.orientation-portrait .seat .chip-stack-wrap{
  max-height: 20px !important;
}

/* 6. 空筹码堆隐藏 */
body .seat .chip-stack-wrap.empty{
  display: none !important;
}
/* ====================================================================
   ★ mini-card 内部：数字和花色不再互相遮挡
   （追加到 CSS 最末尾，覆盖前面所有相关字号规则）
   ==================================================================== */

/* ---- 手机竖屏：普通座位小牌 ---- */
body.is-mobile.orientation-portrait #gameScreen .mini-card.face .v{
  font-size: 7px !important;
  font-weight: 900 !important;
  top: 1px !important;
  left: 1.5px !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-portrait #gameScreen .mini-card.face .s{
  font-size: 9px !important;
  bottom: 0.5px !important;
  right: 1.5px !important;
  line-height: 1 !important;
}

/* ---- 手机竖屏：玩家自己的小牌（稍大一点，但仍要分得开） ---- */
body.is-mobile.orientation-portrait #gameScreen .seat.me .mini-card.face .v{
  font-size: 9px !important;
  top: 1px !important;
  left: 2px !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.me .mini-card.face .s{
  font-size: 11px !important;
  bottom: 0.5px !important;
  right: 2px !important;
}

/* ---- 手机竖屏：摊牌时放大显示 ---- */
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 11px !important;
  top: 2px !important;
  left: 3px !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 14px !important;
  bottom: 1px !important;
  right: 3px !important;
}

/* ---- 手机横屏：普通座位小牌 ---- */
body.is-mobile.orientation-landscape #gameScreen .mini-card.face .v{
  font-size: 7px !important;
  font-weight: 900 !important;
  top: 1px !important;
  left: 1.5px !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-landscape #gameScreen .mini-card.face .s{
  font-size: 9px !important;
  bottom: 0.5px !important;
  right: 1.5px !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me .mini-card.face .v{
  font-size: 9px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.me .mini-card.face .s{
  font-size: 11px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 11px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 14px !important;
}

/* ---- 桌面端 ---- */
body.is-desktop .mini-card.face .v{
  font-size: 9px !important;
  font-weight: 900 !important;
  top: 2px !important;
  left: 3px !important;
  line-height: 1 !important;
}
body.is-desktop .mini-card.face .s{
  font-size: 12px !important;
  bottom: 2px !important;
  right: 3px !important;
  line-height: 1 !important;
}
body.is-desktop .seat.me .mini-card.face .v{
  font-size: 11px !important;
}
body.is-desktop .seat.me .mini-card.face .s{
  font-size: 14px !important;
}
body.is-desktop .seat.reveal .mini-card.face .v{
  font-size: 14px !important;
}
body.is-desktop .seat.reveal .mini-card.face .s{
  font-size: 18px !important;
}

/* ---- 把 mini-card 内部设置为 flex + padding 模式，彻底避免重叠 ---- */
body .mini-card.face{
  display: block !important;
  padding: 1px 2px !important;
  box-sizing: border-box !important;
}
body .mini-card.face .v{
  position: absolute !important;
  text-align: left !important;
}
body .mini-card.face .s{
  position: absolute !important;
  text-align: right !important;
}

/* ====================================================================
   ★ 摊牌时小牌放大（追加到最末尾，覆盖前面的尺寸规则）
   ==================================================================== */

/* ---- 手机竖屏：摊牌放大 ---- */
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card{
  width: 26px !important;
  height: 36px !important;
  border-radius: 4px !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 13px !important;
  font-weight: 900 !important;
  top: 2px !important;
  left: 3px !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 16px !important;
  bottom: 1px !important;
  right: 3px !important;
  line-height: 1 !important;
}

/* ---- 手机横屏：摊牌放大 ---- */
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card{
  width: 24px !important;
  height: 34px !important;
  border-radius: 4px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 12px !important;
  font-weight: 900 !important;
  top: 2px !important;
  left: 2.5px !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 15px !important;
  bottom: 1px !important;
  right: 2.5px !important;
  line-height: 1 !important;
}

/* ---- 桌面端：确认尺寸（避免被后面规则覆盖） ---- */
body.is-desktop .seat.reveal .mini-card{
  width: 42px !important;
  height: 60px !important;
  border-radius: 6px !important;
}
body.is-desktop .seat.reveal .mini-card.face .v{
  font-size: 18px !important;
  top: 4px !important;
  left: 5px !important;
  line-height: 1 !important;
}
body.is-desktop .seat.reveal .mini-card.face .s{
  font-size: 26px !important;
  bottom: 3px !important;
  right: 5px !important;
  line-height: 1 !important;
}

/* ====================================================================
   ★ 摊牌状态：座位加宽 + 牌放大 + 数字大 + 花色小
   （追加到 CSS 最末尾，覆盖前面所有相关规则）
   ==================================================================== */

/* ---- 手机竖屏 ---- */
body.is-mobile.orientation-portrait #gameScreen .seat.reveal{
  width: 78px !important;
  padding: 4px 4px !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card,
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face{
  width: 32px !important;
  height: 44px !important;
  border-radius: 5px !important;
  padding: 0 !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 16px !important;
  font-weight: 900 !important;
  top: 3px !important;
  left: 3px !important;
  right: auto !important;
  bottom: auto !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 9px !important;
  font-weight: 700 !important;
  bottom: 3px !important;
  right: 3px !important;
  top: auto !important;
  left: auto !important;
  line-height: 1 !important;
  opacity: 0.85 !important;
}
body.is-mobile.orientation-portrait #gameScreen .seat.reveal .seat-cards{
  gap: 3px !important;
}

/* ---- 手机横屏 ---- */
body.is-mobile.orientation-landscape #gameScreen .seat.reveal{
  width: 78px !important;
  padding: 4px 4px !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card,
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face{
  width: 32px !important;
  height: 44px !important;
  border-radius: 5px !important;
  padding: 0 !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .v{
  font-size: 16px !important;
  font-weight: 900 !important;
  top: 3px !important;
  left: 3px !important;
  right: auto !important;
  bottom: auto !important;
  line-height: 1 !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .mini-card.face .s{
  font-size: 9px !important;
  font-weight: 700 !important;
  bottom: 3px !important;
  right: 3px !important;
  top: auto !important;
  left: auto !important;
  line-height: 1 !important;
  opacity: 0.85 !important;
}
body.is-mobile.orientation-landscape #gameScreen .seat.reveal .seat-cards{
  gap: 3px !important;
}

/* ---- 桌面端 ---- */
body.is-desktop .seat.reveal{
  width: 150px !important;
}
body.is-desktop .seat.reveal .mini-card,
body.is-desktop .seat.reveal .mini-card.face{
  width: 46px !important;
  height: 64px !important;
  border-radius: 7px !important;
  padding: 0 !important;
}
body.is-desktop .seat.reveal .mini-card.face .v{
  font-size: 22px !important;
  font-weight: 900 !important;
  top: 5px !important;
  left: 6px !important;
  right: auto !important;
  bottom: auto !important;
  line-height: 1 !important;
}
body.is-desktop .seat.reveal .mini-card.face .s{
  font-size: 13px !important;
  font-weight: 700 !important;
  bottom: 5px !important;
  right: 6px !important;
  top: auto !important;
  left: auto !important;
  line-height: 1 !important;
  opacity: 0.85 !important;
}
body.is-desktop .seat.reveal .seat-cards{
  gap: 4px !important;
}

/* ---- 关键：让 mini-card 使用 absolute 布局，确保数字和花色不互相压 ---- */
body .mini-card.face{
  position: relative !important;
  display: block !important;
  box-sizing: border-box !important;
}
body .mini-card.face .v{
  position: absolute !important;
}
body .mini-card.face .s{
  position: absolute !important;
}

/* ====================================================================
   ★ 新增：牌型提醒 / 座位牌型 / 赢家高亮 / 气泡下注 / 更多筹码面值
   ==================================================================== */

/* 手牌下方牌型标签 */
.hand-type-badge{
  display: block;
  width: fit-content;
  margin: 6px auto 0;
  padding: 5px 18px;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(168,85,247,.35), rgba(251,191,36,.25));
  border: 1px solid rgba(251,191,36,.7);
  color: #fff;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  text-align: center;
  box-shadow: 0 0 12px rgba(251,191,36,.35);
  text-shadow: 0 0 6px rgba(0,0,0,.8);
  flex-shrink: 0;
}
.hand-type-badge.hidden{ display: none !important; }

/* 座位牌型标签（秀牌阶段） */
.seat-hand-type{
  position: absolute;
  left: 50%;
  bottom: -22px;
  transform: translateX(-50%);
  background: rgba(0,0,0,.9);
  border: 1px solid rgba(251,191,36,.8);
  color: var(--gold);
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 6px;
  white-space: nowrap;
  z-index: 8;
  pointer-events: none;
  text-shadow: 0 0 4px #000;
}

/* 赢家座位紫色高亮 */
.seat.winner{
  border-color: #a855f7 !important;
  box-shadow:
    0 0 24px rgba(168,85,247,.9),
    0 0 48px rgba(168,85,247,.45),
    0 8px 20px rgba(0,0,0,.6) !important;
  z-index: 14;
  animation: winnerGlow 1.5s ease-in-out infinite;
}
.seat.winner::before{
  content: '🏆';
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 20px;
  filter: drop-shadow(0 0 8px #a855f7);
  z-index: 15;
  animation: winnerTrophy 1.5s ease-in-out infinite;
}
@keyframes winnerGlow{
  0%,100%{ box-shadow: 0 0 24px rgba(168,85,247,.9), 0 0 48px rgba(168,85,247,.45), 0 8px 20px rgba(0,0,0,.6); }
  50%{ box-shadow: 0 0 36px rgba(168,85,247,1), 0 0 72px rgba(168,85,247,.7), 0 8px 20px rgba(0,0,0,.6); }
}
@keyframes winnerTrophy{
  0%,100%{ transform: translateX(-50%) scale(1) rotate(-5deg); }
  50%{ transform: translateX(-50%) scale(1.15) rotate(5deg); }
}

.bubble-bet-panel{
  position: fixed;
  left: 50%;
  bottom: 40vh;                 /* ★ 桌面端：屏幕中下部，比之前高一些 */
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  z-index: 250;
  pointer-events: none;
  opacity: 0;
  transition: opacity .2s;
  overflow: visible;
}
.bubble-bet-panel.show{ opacity: 1; pointer-events: auto; }

.bubble-bet-panel .bubble-center{
  position: absolute;
  left: 50%;
  top: 100%;                    /* ★ 圆心精确落在 panel 底边 */
  transform: translate(-50%, -50%);  /* ★ 不再往下推 42px */
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: linear-gradient(135deg,#a855f7,#6d28d9);
  border: 3px solid #fff;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 0 24px rgba(168,85,247,.8), 0 4px 12px rgba(0,0,0,.5);
  z-index: 10;
  user-select: none;
}
.bubble-bet-panel .bubble-center:active{ transform: translate(-50%, -50%) scale(.94); }
.bubble-bet-panel .bubble-center .bc-label{
  font-size: 11px; opacity: .85;
}
.bubble-bet-panel .bubble-center .bc-amt{
  font-size: 16px; font-weight: 900; margin-top: 2px;
}

.bubble-bet-panel .bubble-item{
  position: absolute;
  width: 62px;
  height: 62px;
  border-radius: 50%;
  background: rgba(20,26,38,.96);
  border: 2px solid rgba(251,191,36,.75);
  color: var(--gold);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,.7), 0 0 8px rgba(251,191,36,.3);
  user-select: none;
  transition: box-shadow .15s;
}
.bubble-bet-panel .bubble-item .bi-label{
  font-size: 11px; font-weight: 900; letter-spacing: .5px;
}
.bubble-bet-panel .bubble-item .bi-amt{
  font-size: 10px; color: #fde68a; margin-top: 1px;
}
.bubble-bet-panel .bubble-item:active{
  box-shadow: 0 0 20px rgba(251,191,36,.9);
}
.bubble-bet-panel .bubble-item.allin{
  border-color: rgba(239,68,68,.85);
  color: #fca5a5;
  background: rgba(60,10,10,.96);
  box-shadow: 0 4px 12px rgba(0,0,0,.7), 0 0 12px rgba(239,68,68,.5);
}
.bubble-bet-panel .bubble-item.allin .bi-label{ color: #ff6b6b; }

/* 气泡背景遮罩 */
.bubble-backdrop{
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 249;
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.bubble-backdrop.show{ opacity: 1; pointer-events: auto; }

/* ===== 更多筹码面值（高额桌） ===== */
.chip-piece.chip-100000{ background: linear-gradient(180deg,#fecaca 0%,#dc2626 45%,#7f1d1d 100%); }
.chip-piece.chip-50000{ background: linear-gradient(180deg,#fde68a 0%,#ea580c 45%,#7c2d12 100%); }
.chip-piece.chip-20000{ background: linear-gradient(180deg,#c7d2fe 0%,#4f46e5 45%,#312e81 100%); }
.chip-piece.chip-10000{ background: linear-gradient(180deg,#fbcfe8 0%,#db2777 45%,#831843 100%); }

/* 手机端适配 */
body.is-mobile.orientation-portrait .hand-type-badge{
  font-size: 12px; padding: 4px 14px; margin-top: 4px;
}
body.is-mobile.orientation-portrait .seat-hand-type{
  font-size: 9px; bottom: -18px; padding: 2px 6px;
}
body.is-mobile.orientation-portrait .bubble-bet-panel{
  width: 340px;
  height: 340px;
  bottom: 34vh;                 /* ★ 手机端：屏幕中下部，拇指可及 */
}
body.is-mobile.orientation-portrait .bubble-bet-panel .bubble-item{
  width: 56px; height: 56px;
}
body.is-mobile.orientation-portrait .bubble-bet-panel .bubble-center{
  width: 72px; height: 72px;
}
