/* =========================================================
   Royce Poker · black-gold Texas Hold'em UI
   ========================================================= */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
:root {
  --gold-1: #fff6d5;
  --gold-2: #f0d27a;
  --gold-3: #d4af37;
  --gold-4: #9a7222;
  --gold-5: #5b4312;
  --ink: #050507;
  --panel: #0b0a08;
  --text: #efe4c8;
  --muted: #a9976f;
  --red: #e23b3b;
  --blue: #2b7be4;
  --felt-1: #1e9a66;
  --felt-2: #0c6541;
  --felt-3: #04301f;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
}
html { height: 100%; }
body {
  min-height: 100dvh;
  background:
    radial-gradient(ellipse at 50% -10%, rgba(126, 92, 26, .35) 0%, rgba(20, 15, 8, .2) 38%, transparent 70%),
    radial-gradient(ellipse at 50% 100%, rgba(80, 55, 10, .2), transparent 60%),
    #030304;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
button, input { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
button:disabled { cursor: default; }
svg { display: block; }
.hidden { display: none !important; }

.app {
  position: relative;
  width: min(100%, 460px);
  height: 100dvh;
  max-height: 940px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #050507;
  isolation: isolate;
}
@media (min-width: 520px) and (min-height: 780px) {
  .app {
    border-radius: 28px;
    border: 1px solid rgba(212, 175, 55, .22);
    box-shadow: 0 0 80px rgba(212, 175, 55, .12), 0 30px 90px rgba(0, 0, 0, .85);
  }
}

/* ======================= 顶栏 ======================= */
.topbar {
  position: relative;
  z-index: 30;
  flex: 0 0 auto;
  height: 54px;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 9px;
  background:
    linear-gradient(180deg, rgba(20, 16, 9, .98) 0%, rgba(9, 8, 6, .92) 60%, rgba(6, 6, 8, .85) 100%);
  border-bottom: 1px solid rgba(212, 175, 55, .32);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .55);
}
.topbar::after {
  content: "";
  position: absolute;
  left: 12%; right: 12%; bottom: -1px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 224, 138, .55), transparent);
}
.icon-btn {
  width: 27px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  color: #e9d49a;
  flex: 0 0 auto;
  position: relative;
}
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn:active { transform: scale(.94); }
.back svg { width: 19px; height: 19px; }

.brand { display: flex; align-items: center; gap: 5px; min-width: 0; }
.brand-mark {
  position: relative;
  width: 31px; height: 38px;
  display: flex; align-items: flex-end; justify-content: center;
  flex: 0 0 auto;
}
.brand-mark span {
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: .9;
  background: linear-gradient(180deg, #fff7d6 0%, #f1d47c 38%, #b8872a 75%, #6f4d0d 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .7));
}
.brand-mark .crown {
  position: absolute;
  top: -1px; left: 50%;
  transform: translateX(-50%);
  width: 26px; height: 15px;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8));
}
.brand-text { min-width: 0; }
.brand-text h1 {
  margin: 0;
  font-family: var(--serif);
  font-size: 16.5px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: .2px;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff8dd 0%, #f3d986 45%, #c69a37 100%);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .8));
}
.brand-text p {
  margin: 1px 0 0;
  font-size: 7px;
  letter-spacing: .9px;
  color: #9b8a62;
  white-space: nowrap;
  text-transform: uppercase;
}

.top-actions { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
.wallet {
  height: 28px;
  display: flex; align-items: center; gap: 4px;
  padding: 0 3px 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #211a0d, #0c0a06);
  border: 1px solid rgba(212, 175, 55, .55);
  box-shadow: inset 0 1px 0 rgba(255, 235, 170, .15), 0 2px 6px rgba(0, 0, 0, .5);
}
.coin {
  width: 18px; height: 18px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 900; color: #5b3d00;
  background: radial-gradient(circle at 35% 28%, #fff5c8, #e6c15e 45%, #a5761b 80%);
  border: 1px solid #ffe9a8;
  box-shadow: 0 0 6px rgba(255, 210, 90, .5);
  flex: 0 0 auto;
}
.wallet b {
  font-size: 11.5px;
  font-weight: 700;
  color: #f4d98d;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
}
.wallet-plus {
  width: 18px; height: 18px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #ffe9a0, #c99a2c 70%);
  color: #3d2800;
  font-size: 14px; font-weight: 900; line-height: 1;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 0 6px rgba(255, 210, 90, .35);
}
.vip {
  height: 27px;
  display: flex; align-items: center; gap: 3px;
  padding: 0 7px;
  border-radius: 6px;
  background: linear-gradient(180deg, #3a2a0b, #140f05);
  border: 1px solid rgba(255, 219, 130, .65);
  color: #ffe6a0;
  font-size: 9px; font-weight: 800;
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, .25), 0 0 10px rgba(212, 175, 55, .15);
}
.vip svg { width: 14px; height: 11px; }
.vip:active { transform: scale(.96); }
.gift .dot {
  position: absolute; top: 3px; right: 2px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #e33b3b;
  border: 1px solid #2a0b0b;
  box-shadow: 0 0 5px rgba(227, 59, 59, .8);
}
.menu-btn svg { width: 21px; height: 21px; }

/* ======================= 场景 ======================= */
.scene {
  position: relative;
  flex: 1 1 auto;
  min-height: 330px;
  overflow: hidden;
  background: #06070b;
}
.scene-bg {
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(255, 196, 80, .12), transparent 46%),
    radial-gradient(ellipse at 8% 60%, rgba(255, 166, 40, .10), transparent 34%),
    radial-gradient(ellipse at 92% 56%, rgba(255, 166, 40, .10), transparent 34%),
    url("assets/casino-bg.svg") center / cover no-repeat,
    linear-gradient(180deg, #0b0b12 0%, #06070a 52%, #030304 100%);
  z-index: 0;
}
.scene-bg::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, .15), transparent 22%, transparent 70%, rgba(0, 0, 0, .55));
}
.bokeh {
  position: absolute;
  border-radius: 50%;
  filter: blur(12px);
  background: radial-gradient(circle, rgba(255, 205, 105, .55), rgba(255, 180, 50, .08) 60%, transparent 70%);
  z-index: 1;
  pointer-events: none;
  animation: bokehFloat 7s ease-in-out infinite alternate;
}
.b1 { width: 56px; height: 56px; left: 4%; top: 24%; opacity: .55; }
.b2 { width: 38px; height: 38px; right: 7%; top: 17%; opacity: .45; animation-delay: -2s; }
.b3 { width: 26px; height: 26px; left: 16%; top: 9%; opacity: .3; animation-delay: -4s; }
@keyframes bokehFloat { from { transform: translateY(-4px) scale(.95); } to { transform: translateY(6px) scale(1.08); } }

.hostess {
  position: absolute;
  left: 50%;
  top: -8px;
  width: 150px;
  height: 212px;
  transform: translateX(-50%);
  z-index: 2;
  pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(0, 0, 0, .65));
}
.hostess-art { width: 100%; height: 100%; }
.hostess::after {
  content: "";
  position: absolute;
  left: 50%; bottom: -4px;
  width: 120%; height: 26px;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(0, 0, 0, .55), transparent 70%);
}

.table-info {
  position: absolute;
  top: 8px; left: 8px;
  z-index: 12;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px 6px 8px;
  border-radius: 10px;
  background: linear-gradient(160deg, rgba(26, 22, 13, .92), rgba(6, 6, 8, .88));
  border: 1px solid rgba(212, 175, 55, .55);
  box-shadow: 0 5px 16px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 235, 170, .12);
  backdrop-filter: blur(4px);
  cursor: pointer;
  user-select: none;
  transition: border-color .2s, box-shadow .2s;
}
.table-info:hover, .table-info.open {
  border-color: rgba(245, 214, 130, .95);
  box-shadow: 0 6px 22px rgba(0, 0, 0, .62), 0 0 0 1px rgba(245, 214, 130, .25) inset;
}
.trophy { width: 19px; height: 19px; color: #e8c56a; flex: 0 0 auto; filter: drop-shadow(0 0 5px rgba(255, 205, 90, .4)); }
.ti-title { font-size: 11px; font-weight: 700; color: #ffe9b0; letter-spacing: .5px; line-height: 1.2; }
.ti-sub { font-size: 8px; color: #bfae86; line-height: 1.45; white-space: nowrap; }
.ti-sub b { color: #f5d98e; font-weight: 700; }
.ti-main { display: flex; flex-direction: column; gap: 1px; }
.table-action {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 14;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid #e3c66f;
  border-radius: 8px;
  background: linear-gradient(180deg, #f3d77f, #b88b2e);
  color: #211704;
  font: 800 11px/1 system-ui, sans-serif;
  letter-spacing: .02em;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .5);
}
.table-action.leave { border-color: #6b5a2f; background: rgba(16, 14, 9, .92); color: #e8d59a; font-weight: 700; }
.table-action.locked { border-color: #514c3d; background: rgba(16, 14, 9, .9); color: #9b937f; font-weight: 700; cursor: not-allowed; }
.table-action.locked:hover { filter: none; }
.table-action:hover { filter: brightness(1.1); }
.table-action[hidden] { display: none !important; }

/* ======================= 牌桌 ======================= */
.table-wrap {
  position: absolute;
  left: 50%;
  top: 53%;
  width: 100%;
  height: min(72%, 420px);
  transform: translate(-50%, -50%);
  z-index: 4;
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .65));
}
.table-wrap::before {
  content: "";
  position: absolute;
  left: 50%; top: 54%;
  width: 112%; height: 112%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(ellipse, rgba(255, 193, 72, .13), transparent 62%);
  z-index: -1;
  pointer-events: none;
}
.table-rim {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50% / 47%;
  padding: 7px;
  background:
    linear-gradient(145deg, #f9e8ad 0%, #c79a3c 12%, #6b4a14 30%, #b9882e 47%, #f5dfa0 52%, #8a6420 68%, #4a320d 84%, #e8cd83 100%);
  box-shadow:
    0 0 0 2px #241806,
    0 0 0 3px rgba(255, 226, 150, .22),
    0 10px 24px rgba(0, 0, 0, .8),
    inset 0 0 0 1px rgba(255, 248, 214, .5),
    inset 0 -3px 6px rgba(0, 0, 0, .55);
}
.table-rim::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: inherit;
  border: 1px dashed rgba(255, 241, 190, .25);
  pointer-events: none;
}
.table-felt {
  position: relative;
  width: 100%; height: 100%;
  border-radius: 50% / 47%;
  overflow: hidden;
  background:
    radial-gradient(ellipse at 50% 38%, #24a66e 0%, #10804f 30%, #075a38 56%, #033a24 78%, #022417 100%);
  box-shadow:
    inset 0 0 0 2px rgba(255, 232, 160, .22),
    inset 0 4px 16px rgba(255, 255, 255, .13),
    inset 0 -10px 30px rgba(0, 0, 0, .7),
    inset 0 0 60px rgba(0, 0, 0, .45);
}
.table-felt::before {
  content: "";
  position: absolute;
  inset: 7px;
  border-radius: inherit;
  border: 1px solid rgba(255, 226, 150, .22);
  box-shadow: inset 0 0 18px rgba(0, 0, 0, .25);
  pointer-events: none;
}
.table-felt::after {
  content: "";
  position: absolute; inset: 0;
  border-radius: inherit;
  opacity: .18;
  background-image:
    repeating-linear-gradient(0deg, rgba(255, 255, 255, .07) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(0, 0, 0, .09) 0 1px, transparent 1px 4px);
  pointer-events: none;
  mix-blend-mode: overlay;
}
.felt-watermark {
  position: absolute;
  left: 50%; top: 52%;
  transform: translate(-50%, -50%);
  font-family: var(--serif);
  font-size: 190px;
  font-weight: 700;
  color: rgba(255, 223, 140, .045);
  text-shadow: 0 0 30px rgba(255, 210, 90, .08);
  pointer-events: none;
  user-select: none;
}
.table-sheen {
  position: absolute;
  left: 8%; right: 8%; top: 2%; height: 32%;
  border-radius: 50%;
  background: radial-gradient(ellipse at 50% 0%, rgba(255, 255, 255, .14), transparent 68%);
  pointer-events: none;
  z-index: 2;
}

/* ---------- 底池 ---------- */
.pot {
  position: absolute;
  left: 50%; top: 27%;
  transform: translateX(-50%);
  z-index: 5;
  text-align: center;
  min-width: 94px;
  pointer-events: none;
}
.pot-label {
  font-size: 9px;
  letter-spacing: 2px;
  color: #d8c79a;
  text-shadow: 0 1px 2px #000;
}
.pot-amount {
  font-size: 19px;
  font-weight: 800;
  line-height: 1.05;
  color: #ffe08a;
  text-shadow: 0 0 12px rgba(255, 200, 80, .5), 0 2px 3px rgba(0, 0, 0, .9);
  font-variant-numeric: tabular-nums;
}
.pot-chips { display: flex; justify-content: center; gap: 1px; margin-top: 2px; height: 12px; }
.chip {
  width: 12px; height: 12px;
  border-radius: 50%;
  display: block;
  border: 2px solid #f3e2b0;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .7);
  background: repeating-conic-gradient(#c0392b 0 20deg, #f6efdd 20deg 40deg);
}
.chip.c-blue { background: repeating-conic-gradient(#1f6fd8 0 20deg, #f6efdd 20deg 40deg); }
.chip.c-gold { background: repeating-conic-gradient(#2b2b2b 0 20deg, #e8c56a 20deg 40deg); }
.pot-chips .chip:nth-child(1) { transform: translateY(1px) rotate(10deg); }
.pot-chips .chip:nth-child(2) { transform: translateY(-1px); }
.pot-chips .chip:nth-child(3) { transform: translateY(1px) rotate(-10deg); }

/* ---------- 公共牌 ---------- */
.board {
  position: absolute;
  left: 50%; top: 44.5%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 5px;
  z-index: 6;
}
.board .card { --cw: 42px; --ch: 60px; }
@media (max-width: 380px) {
  .board { gap: 4px; }
  .board .card { --cw: 38px; --ch: 54px; }
}

/* ---------- 手牌 ---------- */
.hero-hand {
  position: absolute;
  left: 50%; top: 68%;
  transform: translate(-50%, -50%);
  display: flex;
  gap: 1px;
  z-index: 6;
  filter: drop-shadow(0 5px 8px rgba(0, 0, 0, .6));
}
.hero-hand .card { --cw: 42px; --ch: 58px; }
.hero-hand .card:nth-child(1) { --rot: -4deg; }
.hero-hand .card:nth-child(2) { --rot: 4deg; margin-left: -4px; }
.hero-hand .card.dim { opacity: .55; filter: saturate(.6); }
@media (max-width: 380px) {
  .hero-hand .card { --cw: 38px; --ch: 52px; }
}

/* ---------- 座位 ---------- */
.seats { position: absolute; inset: 0; z-index: 8; pointer-events: none; }
.seat {
  position: absolute;
  width: 86px;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: opacity .3s, filter .3s;
  z-index: 3;
}
.seat.folded { opacity: .48; filter: grayscale(.75); }
.seat.folded .seat-cards { opacity: 0; }
.seat-you .seat-cards { display: none; }
.seat-you .action-bubble { display: none; }
.seat.active { z-index: 9; }
.seat.winner { z-index: 10; }
.seat.winner .avatar-wrap {
  box-shadow: 0 0 0 2px #ffe9a8, 0 0 26px rgba(255, 205, 90, .95), 0 0 46px rgba(255, 190, 50, .5);
  animation: winnerPulse 1.1s ease-in-out infinite alternate;
}
@keyframes winnerPulse { from { filter: brightness(1); } to { filter: brightness(1.18); } }

.avatar-wrap {
  position: relative;
  width: 45px; height: 45px;
  border-radius: 50%;
  padding: 2px;
  background: linear-gradient(145deg, #fff0bd 0%, #d9b45a 30%, #7a5516 65%, #e8cd83 100%);
  box-shadow: 0 2px 7px rgba(0, 0, 0, .75), 0 0 0 1px #2a1d08;
  flex: 0 0 auto;
  transition: box-shadow .2s;
}
.avatar {
  width: 100%; height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: #0d1016;
}
.avatar svg { width: 100%; height: 100%; display: block; }
.avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.seat.active .avatar-wrap {
  box-shadow: 0 0 0 2px rgba(255, 233, 168, .95), 0 0 18px rgba(255, 205, 90, .7);
}
.turn-ring {
  position: absolute;
  inset: -5px;
  border-radius: 50%;
  background: conic-gradient(#ffe08a calc(var(--p, 100) * 1%), rgba(255, 255, 255, .08) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 2px), #000 calc(100% - 2px));
  opacity: 0;
  transition: opacity .2s;
  pointer-events: none;
}
.seat.active .turn-ring { opacity: 1; }
.seat.turn-urgent .turn-ring {
  background: conic-gradient(#ff6b6b calc(var(--p, 100) * 1%), rgba(255, 255, 255, .08) 0);
  filter: drop-shadow(0 0 4px rgba(255, 90, 90, .65));
}

.seat-cards {
  position: absolute;
  top: -14px;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  display: flex;
  z-index: 4;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .8));
}
.mini-card {
  width: 14px; height: 20px;
  border-radius: 2px;
  border: 1px solid #c9a44e;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 2px, transparent 2px 5px),
    linear-gradient(135deg, #1c2c4d, #0a1326 65%);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 160, .16);
  margin-left: -4px;
  transform: rotate(-7deg);
}
.mini-card:nth-child(2) { transform: rotate(7deg) translateY(1px); }
.mini-card.face-up {
  background: linear-gradient(160deg, #fffdf6, #efe5d0);
  color: #16181d;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.mini-card.face-up b { font-size: 8px; line-height: 9px; }
.mini-card.face-up i { font-size: 7px; line-height: 8px; font-style: normal; }
.mini-card.face-up.red { color: #c22f3d; }

.nameplate {
  position: relative;
  z-index: 2;
  margin-top: -5px;
  min-width: 72px;
  padding: 2px 6px 3px;
  border-radius: 5px;
  text-align: center;
  background: linear-gradient(180deg, rgba(36, 29, 15, .97), rgba(7, 6, 5, .97));
  border: 1px solid rgba(212, 175, 55, .62);
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 235, 170, .12);
}
.nameplate .name {
  display: block;
  font-size: 9px;
  line-height: 1.15;
  letter-spacing: .2px;
  color: #f0e0b4;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nameplate .stack {
  display: block;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 700;
  color: #ffd77a;
  font-variant-numeric: tabular-nums;
}
.seat.active .nameplate { border-color: #ffe08a; box-shadow: 0 0 10px rgba(255, 205, 90, .35), 0 2px 6px rgba(0, 0, 0, .6); }

.seat-badge {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%) rotate(-8deg);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 8px;
  font-weight: 900;
  letter-spacing: .5px;
  color: #2a1a02;
  background: linear-gradient(180deg, #ffe9a0, #d2a33a);
  border: 1px solid #fff1bd;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .7);
  opacity: 0;
  pointer-events: none;
  white-space: nowrap;
}
.seat.allin .seat-badge { opacity: 1; }
.seat.folded .seat-badge { opacity: 0; }

.hand-label {
  position: absolute;
  top: calc(100% + 1px);
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(4, 4, 5, .82);
  border: 1px solid rgba(212, 175, 55, .4);
  color: #ffe6a3;
  font-size: 8px;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s;
}
.hand-label.show { opacity: 1; }

.action-bubble {
  position: absolute;
  top: -38px;
  left: 50%;
  transform: translateX(-50%) translateY(3px);
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(6, 6, 8, .92);
  border: 1px solid rgba(212, 175, 55, .55);
  color: #ffe9a8;
  font-size: 8.5px;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity .2s, transform .2s;
  pointer-events: none;
  z-index: 6;
}
.action-bubble.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* 下注筹码 */
.bets { position: absolute; inset: 0; z-index: 7; pointer-events: none; }
.bet-chip {
  position: absolute;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  opacity: 0;
  transition: opacity .2s;
}
.bet-chip.show { opacity: 1; }
.chip-stack { position: relative; width: 22px; height: 22px; }
.chip-stack i {
  position: absolute;
  width: 18px; height: 18px;
  border-radius: 50%;
  border: 2px solid #f4e2ac;
  background: repeating-conic-gradient(#c0392b 0 18deg, #f7f1e3 18deg 36deg);
  box-shadow: 0 1px 2px rgba(0, 0, 0, .8);
}
.chip-stack i:nth-child(1) { bottom: 0; left: 0; }
.chip-stack i:nth-child(2) { bottom: 3px; left: 2px; background: repeating-conic-gradient(#1f6fd8 0 18deg, #f7f1e3 18deg 36deg); }
.chip-stack i:nth-child(3) { bottom: 6px; left: 4px; background: repeating-conic-gradient(#2c2c2c 0 18deg, #e8c56a 18deg 36deg); }
.bet-chip span {
  font-size: 9px;
  font-weight: 700;
  color: #ffe6a3;
  background: rgba(0, 0, 0, .66);
  padding: 1px 4px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .35);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* 庄家按钮 */
.dealer-badge {
  position: absolute;
  right: -6px;
  bottom: -3px;
  z-index: 3;
  width: 17px;
  height: 17px;
  display: none;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 9px;
  font-weight: 900;
  color: #332200;
  background: radial-gradient(circle at 35% 30%, #fff7d4, #e7c76d 45%, #a97b22 85%);
  border: 1px solid #fff0b8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .8), 0 0 8px rgba(255, 210, 90, .5);
  pointer-events: none;
}
.seat.dealer .dealer-badge { display: flex; }
.dealer-chip {
  position: absolute;
  z-index: 9;
  width: 19px; height: 19px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  display: flex; align-items: center; justify-content: center;
  font-size: 9px; font-weight: 900;
  color: #332200;
  background: radial-gradient(circle at 35% 30%, #fff7d4, #e7c76d 45%, #a97b22 85%);
  border: 1px solid #fff0b8;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .8), 0 0 8px rgba(255, 210, 90, .5);
  transition: left .4s cubic-bezier(.2, .8, .25, 1), top .4s cubic-bezier(.2, .8, .25, 1);
  pointer-events: none;
}

/* ---------- 卡牌 ---------- */
.card {
  width: var(--cw, 42px);
  height: var(--ch, 60px);
  position: relative;
  perspective: 500px;
  flex: 0 0 auto;
  transform: rotate(var(--rot, 0deg));
}
.card-inner {
  position: relative;
  width: 100%; height: 100%;
  transform-style: preserve-3d;
  transition: transform .45s cubic-bezier(.2, .8, .25, 1);
}
.card.face-up .card-inner { transform: rotateY(180deg); }
.card-face {
  position: absolute; inset: 0;
  border-radius: 5px;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
}
.card-back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .05) 0 2px, transparent 2px 6px),
    linear-gradient(135deg, #1d2f52 0%, #0a1326 55%, #182a4c 100%);
  border: 1px solid #c9a44e;
  box-shadow: inset 0 0 0 2px #0a1222, inset 0 0 0 3px rgba(212, 175, 55, .3), 0 2px 5px rgba(0, 0, 0, .5);
  display: flex; align-items: center; justify-content: center;
}
.card-back::before {
  content: "";
  position: absolute; inset: 4px;
  border: 1px solid rgba(212, 175, 55, .32);
  border-radius: 3px;
}
.card-back .back-r {
  position: relative;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  color: rgba(232, 197, 106, .75);
  text-shadow: 0 0 8px rgba(232, 197, 106, .45);
}
.card-front {
  transform: rotateY(180deg);
  background: linear-gradient(160deg, #fffdf6 0%, #f7efdd 60%, #e9dcc1 100%);
  border: 1px solid #d8c9a4;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .7);
  color: #14161b;
}
.card-front::after {
  content: "";
  position: absolute; inset: 0;
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .65), transparent 55%);
  pointer-events: none;
}
.card .corner {
  position: absolute;
  text-align: center;
  line-height: .9;
  font-family: "Arial Narrow", "Segoe UI", Arial, sans-serif;
  z-index: 2;
}
.card .corner.tl { top: 3px; left: 4px; }
.card .corner.br { bottom: 3px; right: 4px; transform: rotate(180deg); }
.card .corner b { display: block; font-size: 13px; font-weight: 800; letter-spacing: -.3px; }
.card .corner i { display: block; font-size: 10px; font-style: normal; margin-top: 1px; }
.card .pip {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  font-size: 23px;
  line-height: 1;
  opacity: .92;
  z-index: 1;
}
.card.red .corner, .card.red .pip { color: #c22f3d; }
.card.black .corner, .card.black .pip { color: #15171c; }
.card.empty .card-back { opacity: .3; filter: saturate(.55); }
.card.empty .card-front { opacity: 0; }
.card.dim { opacity: .55; filter: saturate(.6); }
.hero-hand .card .corner b { font-size: 14px; }
.hero-hand .card .corner i { font-size: 10px; }
.hero-hand .card .pip { font-size: 25px; }
.hero-hand .card .corner.tl { top: 3px; left: 4px; }
.hero-hand .card .corner.br { bottom: 3px; right: 4px; }

@keyframes dealIn {
  from { transform: translateY(-18px) scale(.86) rotate(calc(var(--rot, 0deg) - 5deg)); }
  to { transform: translateY(0) scale(1) rotate(var(--rot, 0deg)); }
}
.card.dealt { animation: dealIn .38s cubic-bezier(.2, .8, .25, 1) both; }

/* 浮动赢分 */
.float-win {
  position: absolute;
  z-index: 40;
  transform: translate(-50%, -50%);
  font-size: 15px;
  font-weight: 900;
  color: #ffe08a;
  text-shadow: 0 0 10px rgba(255, 200, 80, .8), 0 2px 3px #000;
  pointer-events: none;
  animation: floatWin 1.6s cubic-bezier(.2, .8, .25, 1) forwards;
  white-space: nowrap;
}
@keyframes floatWin {
  0% { opacity: 0; transform: translate(-50%, -30%) scale(.7); }
  18% { opacity: 1; transform: translate(-50%, -60%) scale(1.1); }
  100% { opacity: 0; transform: translate(-50%, -160%) scale(1); }
}

/* ======================= 战况条 ======================= */
.ticker {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  height: 30px;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  background: linear-gradient(180deg, rgba(13, 12, 9, .96), rgba(5, 5, 7, .96));
  border-top: 1px solid rgba(212, 175, 55, .16);
  border-bottom: 1px solid rgba(212, 175, 55, .26);
  font-size: 10px;
  color: #c9b98e;
}
.ticker-dot {
  width: 5px; height: 5px;
  border-radius: 50%;
  background: #e8c56a;
  box-shadow: 0 0 7px #e8c56a;
  flex: 0 0 auto;
  animation: dotBlink 1.6s ease-in-out infinite;
}
@keyframes dotBlink { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
.ticker-text {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticker-text b { color: #f3d788; font-weight: 600; }
.ticker-chat {
  position: relative;
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  color: #e8c56a;
  flex: 0 0 auto;
}
.ticker-chat svg { width: 17px; height: 17px; }
.ticker-chat .dot {
  position: absolute;
  top: 3px; right: 2px;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: #e23b3b;
  border: 1px solid #1a0505;
  display: none;
}
.ticker-chat .dot.show { display: block; }

/* ======================= 操作面板 ======================= */
.action-panel {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  padding: 7px 10px calc(9px + var(--safe-bottom) * .3);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, .08), transparent 55%),
    linear-gradient(180deg, rgba(12, 11, 8, .98), #040405);
  border-top: 1px solid rgba(212, 175, 55, .32);
  box-shadow: 0 -10px 26px rgba(0, 0, 0, .55);
}
.panel-top {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 34px;
}
.timer {
  position: relative;
  width: 34px; height: 34px;
  flex: 0 0 auto;
}
.timer-ring { width: 100%; height: 100%; transform: rotate(-90deg); }
.tr-bg { fill: none; stroke: rgba(255, 255, 255, .1); stroke-width: 3; }
.tr-fg {
  fill: none;
  stroke: #e8c56a;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 106.8;
  stroke-dashoffset: 0;
  transition: stroke-dashoffset .2s linear;
  filter: drop-shadow(0 0 3px rgba(255, 205, 90, .5));
}
.timer span {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800;
  color: #ffe6a3;
  font-variant-numeric: tabular-nums;
}
.timer.idle span { color: #6f6450; font-size: 12px; }
.timer.low .tr-fg { stroke: #ff5a5a; filter: drop-shadow(0 0 4px rgba(255, 70, 70, .65)); }
.timer.low span { color: #ff8d8d; }
.raise-readout { display: flex; flex-direction: column; line-height: 1.05; min-width: 70px; }
.raise-readout span { font-size: 9px; color: #a9976f; letter-spacing: .3px; }
.raise-readout b {
  font-size: 18px;
  color: #ffe08a;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 10px rgba(255, 200, 80, .25);
  line-height: 1.15;
}
.quick-btns { margin-left: auto; display: flex; gap: 5px; }
.quick-btns button {
  height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, .45);
  background: linear-gradient(180deg, #1d1810, #0b0906);
  color: #e8d5a4;
  font-size: 9px;
  font-weight: 600;
  box-shadow: inset 0 1px 0 rgba(255, 235, 170, .08);
  transition: transform .1s;
}
.quick-btns button:active:not(:disabled) { transform: scale(.95); }
.quick-btns button:disabled { opacity: .35; }

.slider-row {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 26px;
  margin-top: 1px;
}
.step-btn {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .5);
  background: radial-gradient(circle at 35% 30%, #3a2f1b, #120e08 75%);
  color: #ffe6a3;
  font-size: 15px;
  line-height: 1;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.step-btn:disabled { opacity: .3; }
.step-btn:active:not(:disabled) { transform: scale(.92); }
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  height: 5px;
  border-radius: 99px;
  background: linear-gradient(90deg, #e8c56a 0%, #e8c56a var(--fill, 30%), #2a2418 var(--fill, 30%), #2a2418 100%);
  outline: none;
  min-width: 0;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 17px; height: 17px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #d6ad4a 58%, #7a5612 100%);
  border: 1px solid #fff0b8;
  box-shadow: 0 0 9px rgba(255, 210, 100, .75), 0 1px 2px rgba(0, 0, 0, .6);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #fff6cf, #d6ad4a 58%, #7a5612 100%);
  border: 1px solid #fff0b8;
}
input[type="range"]:disabled { opacity: .35; }

.action-buttons {
  display: flex;
  gap: 7px;
  height: 54px;
  margin-top: 6px;
}
.act-btn {
  position: relative;
  flex: 1;
  border-radius: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .2);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 3px 10px rgba(0, 0, 0, .5);
  transition: transform .1s, filter .15s;
  min-width: 0;
  white-space: nowrap;
}
.act-btn svg { width: 19px; height: 19px; flex: 0 0 auto; }
.act-btn span { display: flex; align-items: baseline; gap: 3px; }
.act-btn span b { font-size: 15px; font-weight: 900; font-variant-numeric: tabular-nums; }
.act-btn.fold { flex: .92; background: linear-gradient(180deg, #e14d4d 0%, #b52222 52%, #7d0d0d 100%); }
.act-btn.call { flex: 1.08; background: linear-gradient(180deg, #4595f2 0%, #1762c9 52%, #08347c 100%); }
.act-btn.raise {
  flex: 1.2;
  background: linear-gradient(180deg, #ffe9a4 0%, #f0cc6e 30%, #c48a1f 62%, #8a5c0c 100%);
  color: #2a1a02;
  border-color: #ffe9b0;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .35);
}
.act-btn:active:not(:disabled) { transform: translateY(1px) scale(.99); }
.act-btn:disabled { filter: grayscale(.72) brightness(.5); box-shadow: none; }
.act-btn.call.pulse { animation: callPulse 1.4s ease-in-out infinite; }
@keyframes callPulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 0 0 rgba(60, 150, 255, 0); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 255, 255, .38), 0 0 16px rgba(70, 150, 255, .65); }
}

/* 结果 */
.result-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 123px;
  padding: 0 2px;
  animation: fadeUp .25s ease both;
}
@keyframes fadeUp { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }
.result-copy { flex: 1; min-width: 0; }
.result-title {
  font-size: 17px;
  font-weight: 800;
  color: #ffe08a;
  text-shadow: 0 0 12px rgba(255, 200, 80, .3);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.result-sub {
  margin-top: 3px;
  font-size: 11px;
  color: #c9b98e;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.next-btn {
  height: 46px;
  padding: 0 18px;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffe9a4 0%, #f0cc6e 30%, #c48a1f 62%, #8a5c0c 100%);
  color: #2a1a02;
  font-weight: 900;
  font-size: 14px;
  border: 1px solid #ffe9b0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5), 0 4px 14px rgba(212, 175, 55, .3);
  white-space: nowrap;
  flex: 0 0 auto;
}
.next-btn:active { transform: translateY(1px); }
.next-btn span { font-size: 11px; opacity: .75; font-weight: 700; }
.rebuy { background: linear-gradient(180deg, #e14d4d, #8f1414); color: #fff; border-color: #ffb3b3; }

/* ======================= 底部导航 ======================= */
.bottom-nav {
  position: relative;
  z-index: 20;
  flex: 0 0 auto;
  height: 58px;
  display: flex;
  background: linear-gradient(180deg, #0b0a08 0%, #030304 100%);
  border-top: 1px solid rgba(212, 175, 55, .3);
  padding-bottom: calc(var(--safe-bottom) * .5);
}
.bottom-nav button {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  color: #6e6653;
  font-size: 9px;
  position: relative;
  transition: color .2s;
  min-width: 0;
}
.bottom-nav button svg { width: 21px; height: 21px; }
.bottom-nav button.active { color: #f3d788; }
.bottom-nav button.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%;
  width: 36px; height: 2px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, #ffd97a, transparent);
  box-shadow: 0 0 9px #ffd97a;
}
.bottom-nav button.active svg { filter: drop-shadow(0 0 6px rgba(255, 205, 90, .55)); }
.nav-badge {
  position: absolute;
  top: 5px;
  left: calc(50% + 8px);
  background: #e23b3b;
  color: #fff;
  font-size: 8px;
  font-style: normal;
  line-height: 13px;
  padding: 0 4px;
  border-radius: 999px;
  border: 1px solid #360808;
}

/* ======================= 抽屉 ======================= */
.drawer-mask {
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(0, 0, 0, .58);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.drawer-mask.show { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed;
  left: 50%;
  bottom: 0;
  width: min(100%, 460px);
  height: 62%;
  max-height: 620px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  transform: translate(-50%, 104%);
  transition: transform .32s cubic-bezier(.2, .8, .25, 1);
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, .09), transparent 45%),
    linear-gradient(180deg, #14110a 0%, #060608 55%, #040405 100%);
  border: 1px solid rgba(212, 175, 55, .38);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .7);
}
.drawer.open { transform: translate(-50%, 0); }
.drawer-head {
  display: flex;
  align-items: center;
  padding: 9px 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.drawer-tabs { display: flex; gap: 18px; flex: 1; }
.drawer-tabs button {
  position: relative;
  padding: 8px 2px 10px;
  font-size: 13px;
  font-weight: 700;
  color: #8d7c58;
}
.drawer-tabs button.active { color: #ffe08a; }
.drawer-tabs button.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffe08a, #b9882e);
  box-shadow: 0 0 8px rgba(255, 205, 90, .5);
}
.drawer-close {
  width: 30px; height: 30px;
  font-size: 22px;
  line-height: 1;
  color: #a9976f;
}
.drawer-body { flex: 1; min-height: 0; position: relative; }
.log-list, .chat-list {
  position: absolute; inset: 0;
  overflow-y: auto;
  padding: 6px 14px 12px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, .35) transparent;
}
.log-list::-webkit-scrollbar, .chat-list::-webkit-scrollbar { width: 3px; }
.log-list::-webkit-scrollbar-thumb, .chat-list::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, .35); border-radius: 3px; }
.log-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  font-size: 11px;
  color: #cbbd97;
  border-bottom: 1px solid rgba(255, 255, 255, .035);
}
.log-avatar {
  width: 22px; height: 22px;
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid rgba(212, 175, 55, .5);
  flex: 0 0 auto;
  background: #0d1016;
}
.log-avatar svg { width: 100%; height: 100%; display: block; }
.log-avatar img { width: 100%; height: 100%; display: block; object-fit: cover; }
.log-text { min-width: 0; }
.log-text b { color: #f0dcaa; font-weight: 600; }
.log-item.raise .log-text, .log-item.allin .log-text { color: #ffe08a; }
.log-item.win .log-text { color: #7fe0a8; }
.log-item.fold .log-text { opacity: .62; }
.log-divider {
  text-align: center;
  font-size: 9px;
  letter-spacing: 1px;
  color: #8d7c58;
  padding: 9px 0 5px;
}
.chat-item { display: flex; gap: 7px; margin: 8px 0; align-items: flex-start; }
.chat-item .log-avatar { width: 24px; height: 24px; }
.chat-item > div:last-child { min-width: 0; max-width: 80%; }
.chat-item.me > div:last-child { text-align: right; }
.chat-bubble {
  display: inline-block;
  max-width: 100%;
  padding: 6px 9px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .06);
  font-size: 11px;
  line-height: 1.4;
  color: #ded2b4;
  word-break: break-word;
  text-align: left;
}
.chat-item.me { flex-direction: row-reverse; }
.chat-item.me .chat-bubble {
  background: linear-gradient(180deg, #3a2c10, #211806);
  border-color: rgba(212, 175, 55, .42);
  color: #ffe6a3;
}
.chat-name { font-size: 8.5px; color: #8d7c58; margin-bottom: 2px; }
.chat-item.me .chat-name { text-align: right; }
.chat-input {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px calc(10px + var(--safe-bottom) * .4);
  border-top: 1px solid rgba(255, 255, 255, .07);
  background: rgba(0, 0, 0, .25);
}
.emoji-btn {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  color: #e8c56a;
  font-size: 16px;
  flex: 0 0 auto;
}
.chat-input input {
  flex: 1;
  height: 32px;
  min-width: 0;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .3);
  background: rgba(255, 255, 255, .05);
  padding: 0 12px;
  font-size: 11px;
  color: #efe4c8;
  outline: none;
}
.chat-input input::placeholder { color: #7d7055; }
.send-btn {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: linear-gradient(180deg, #f0d27a, #b9882e);
  color: #2a1a02;
  display: flex; align-items: center; justify-content: center;
  flex: 0 0 auto;
}
.send-btn svg { width: 16px; height: 16px; }

/* ======================= 菜单 / 弹窗 ======================= */
.sheet-mask {
  position: fixed; inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.sheet-mask.show { opacity: 1; pointer-events: auto; }
.sheet {
  position: fixed;
  left: 50%; bottom: 0;
  width: min(100%, 460px);
  z-index: 115;
  transform: translate(-50%, 105%);
  transition: transform .3s cubic-bezier(.2, .8, .25, 1);
  background: linear-gradient(180deg, #14110a, #070708);
  border: 1px solid rgba(212, 175, 55, .38);
  border-bottom: 0;
  border-radius: 18px 18px 0 0;
  padding: 8px 14px calc(16px + var(--safe-bottom));
  box-shadow: 0 -20px 50px rgba(0, 0, 0, .7);
}
.sheet.open { transform: translate(-50%, 0); }
.sheet-handle { width: 34px; height: 4px; border-radius: 99px; background: rgba(255, 255, 255, .16); margin: 2px auto 8px; }
.sheet-title { font-size: 13px; font-weight: 700; color: #ffe08a; padding: 2px 2px 8px; }
.sheet-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 4px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  font-size: 12px;
  color: #ded2b4;
  text-align: left;
}
.sheet-item b { font-size: 11px; font-weight: 600; color: #a9976f; }
.sheet-item:active { background: rgba(255, 255, 255, .03); }

.modal-mask {
  position: fixed; inset: 0;
  z-index: 120;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0, 0, 0, .72);
  backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}
.modal-mask.show { opacity: 1; pointer-events: auto; }
.modal {
  width: min(100%, 400px);
  max-height: 78dvh;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, #16120b 0%, #08080a 100%);
  border: 1px solid rgba(212, 175, 55, .45);
  border-radius: 16px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .85), inset 0 1px 0 rgba(255, 235, 170, .12);
  overflow: hidden;
  transform: translateY(10px) scale(.98);
  transition: transform .2s;
}
.modal-mask.show .modal { transform: none; }
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px 10px;
  border-bottom: 1px solid rgba(212, 175, 55, .18);
}
.modal-head h2 { margin: 0; font-size: 15px; color: #ffe08a; letter-spacing: .5px; }
.modal-close { width: 28px; height: 28px; font-size: 21px; color: #a9976f; line-height: 1; }
.modal-body { padding: 12px 15px 18px; overflow-y: auto; }
.share-code { color: #ffe08a; letter-spacing: .14em; }
.share-field { display: grid; gap: 6px; margin-top: 10px; color: #c9b98e; font-size: 11px; }
.share-field input { height: 40px; padding: 0 11px; border: 1px solid #4b432e; border-radius: 6px; outline: 0; background: #0f110d; color: #f5efd9; font-size: 13px; }
.share-field input:focus { border-color: #c8a857; }
.share-actions { display: grid; gap: 8px; margin-top: 14px; }
.share-btn { height: 42px; border: 1px solid #5c502f; border-radius: 6px; background: #17140d; color: #d9c68f; font-size: 12px; font-weight: 700; cursor: pointer; }
.share-btn.primary { border-color: #f0d48a; background: linear-gradient(180deg, #f3d77f, #b88b2e); color: #211704; }
.share-btn:disabled { opacity: .45; cursor: not-allowed; }
.modal-lead { margin: 0 0 10px; font-size: 11px; line-height: 1.7; color: #bfae86; }
.rule-row {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid rgba(255, 255, 255, .05);
  font-size: 10.5px;
  line-height: 1.55;
}
.rule-row b { flex: 0 0 62px; color: #f0dcaa; font-weight: 600; }
.rule-row span { color: #bfae86; }
.rebuy-modal { text-align: center; padding: 22px 20px 24px; }
.rebuy-icon {
  width: 45px; height: 45px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px;
  color: #ffe08a;
  background: radial-gradient(circle at 35% 30%, #3a2c10, #100c06 75%);
  border: 1px solid rgba(212, 175, 55, .6);
  box-shadow: 0 0 24px rgba(255, 205, 90, .2);
}
.rebuy-modal h2 { margin: 0 0 6px; font-size: 18px; color: #ffe08a; }
.rebuy-modal p { margin: 0 0 16px; font-size: 11px; line-height: 1.6; color: #bfae86; }
.rebuy-modal .next-btn { width: 100%; }

.toast {
  position: fixed;
  left: 50%; bottom: 92px;
  z-index: 200;
  max-width: 82%;
  padding: 8px 15px;
  border-radius: 999px;
  background: rgba(10, 9, 7, .96);
  border: 1px solid rgba(212, 175, 55, .5);
  color: #ffe6a3;
  font-size: 11px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .7);
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition: opacity .22s, transform .22s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.turn-toast {
  position: absolute;
  left: 50%;
  bottom: 4px;
  transform: translateX(-50%);
  z-index: 15;
  padding: 3px 10px;
  border-radius: 999px;
  background: rgba(6, 6, 8, .8);
  border: 1px solid rgba(212, 175, 55, .45);
  color: #ffe6a3;
  font-size: 9px;
  opacity: 0;
  transition: opacity .25s;
  pointer-events: none;
  white-space: nowrap;
}
.turn-toast.show { opacity: 1; }

/* ======================= 响应式 ======================= */
@media (max-width: 400px) {
  .brand-text p { display: none; }
  .vip { display: none; }
  .gift { display: none; }
  .brand-text h1 { font-size: 15px; }
  .topbar { gap: 5px; padding: 0 7px; }
  .wallet b { font-size: 10.5px; }
  .table-info { transform: scale(.92); transform-origin: top left; }
  .act-btn { font-size: 12.5px; gap: 4px; }
  .act-btn svg { width: 17px; height: 17px; }
  .act-btn span b { font-size: 13px; }
  .quick-btns button { padding: 0 6px; font-size: 8.5px; }
}
@media (max-height: 740px) {
  .topbar { height: 48px; }
  .table-info { transform: scale(.86); transform-origin: top left; }
  .ticker { height: 26px; }
  .panel-top { height: 29px; }
  .timer { width: 30px; height: 30px; }
  .slider-row { height: 23px; }
  .action-buttons { height: 47px; margin-top: 4px; }
  .act-btn { font-size: 12px; }
  .act-btn svg { width: 17px; height: 17px; }
  .act-btn span b { font-size: 13px; }
  .bottom-nav { height: 52px; }
  .bottom-nav button svg { width: 19px; height: 19px; }
  .result-controls { height: 103px; }
  .next-btn { height: 42px; }
  .hostess { width: 128px; height: 182px; }
  .hero-hand .card { --cw: 40px; --ch: 55px; }
  .board .card { --cw: 38px; --ch: 55px; }
  .avatar-wrap { width: 40px; height: 40px; }
  .nameplate { min-width: 66px; }
  .nameplate .stack { font-size: 10px; }
}
@media (max-height: 640px) {
  .hostess { width: 104px; height: 150px; top: -12px; }
  .table-info { transform: scale(.8); transform-origin: top left; }
  .hero-hand .card { --cw: 36px; --ch: 50px; }
  .board .card { --cw: 34px; --ch: 49px; }
  .seat { width: 76px; }
  .avatar-wrap { width: 36px; height: 36px; }
  .nameplate { min-width: 60px; padding: 1px 4px 2px; }
  .nameplate .name { font-size: 8px; }
  .nameplate .stack { font-size: 9px; }
  .action-buttons { height: 42px; }
  .result-controls { height: 78px; }
  .result-title { font-size: 15px; }
}
.online-lobby { position:absolute; z-index:25; top:100px; left:8px; width:min(300px,calc(100% - 16px)); max-height:calc(100% - 118px); overflow:auto; padding:12px; border:1px solid rgba(223,184,91,.5); border-radius:12px; color:#f5e7c2; background:rgba(8,10,13,.96); box-shadow:0 14px 38px #000c; font:12px/1.45 system-ui,sans-serif; }
.online-lobby[hidden] { display:none !important; }
.online-lobby::-webkit-scrollbar { width:7px; height:7px; }
.online-lobby::-webkit-scrollbar-thumb { border-radius:6px; background:#5b4d2b; }
.online-lobby::-webkit-scrollbar-track { background:transparent; }
.online-lobby [hidden] { display:none !important; }
.online-active .play-controls, .online-active .result-controls { display:none !important; }
.online-active .board .card.empty { visibility:hidden; }
.online-title { color:#e8c56a; font-weight:700; margin-bottom:8px; }
.online-controls { display:flex; gap:6px; margin:5px 0; flex-wrap:wrap; }
.online-lobby input { min-width:0; width:100%; padding:7px; color:#fff; background:#191a1d; border:1px solid #51452a; border-radius:6px; }
.online-lobby button { white-space:nowrap; padding:6px 9px; color:#1a1408; background:#e8c56a; border:0; border-radius:6px; font-weight:700; cursor:pointer; }
#onlineStatus { margin-top:7px; color:#bbb; }
#onlineRoster { word-break:break-word; }
#onlineRoster ol { margin:5px 0; padding-left:20px; }
#onlineRebuy { width:100%; margin-top:6px; border:1px solid #b6964f; border-radius:5px; background:#2a2414; color:#f0d99a; padding:9px; font-size:12px; cursor:pointer; }
.online-lobby .online-close {
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  padding: 0;
  border: 1px solid #514c3d;
  border-radius: 50%;
  background: transparent;
  color: #d7c88f;
  font-size: 16px;
  line-height: .9;
}
.online-lobby .online-close:hover { border-color: #b6964f; background: rgba(255, 233, 168, .08); color: #ffe9a8; }
.online-foot { margin-top: 9px; padding-top: 9px; border-top: 1px solid rgba(212, 175, 55, .22); }
.online-lobby .online-fair {
  width: 100%;
  padding: 7px 9px;
  border: 1px solid #514c3d;
  border-radius: 6px;
  background: transparent;
  color: #d7c88f;
  font-size: 10px;
}
.online-lobby .online-fair:hover { border-color: #b6964f; background: rgba(255, 233, 168, .06); color: #ffe9a8; }
.online-rule { margin-top: 8px; padding-top: 8px; border-top: 1px solid rgba(212, 175, 55, .2); color: #d9c68f; font-size: 10px; line-height: 1.5; }

/* Full-screen multiplayer lobby; the local demo table stays hidden until a server room is joined. */
body.lobby-mode #app { display:none; }
body:not(.lobby-mode) #lobbyScreen { display:none; }
body.online-active #menuRestart { display:none; }
.lobby-screen{position:fixed;inset:0;z-index:1000;overflow:auto;background:radial-gradient(ellipse at 50% 22%,#24352a 0,#151a17 38%,#0b0d0c 100%);color:#f1eee4;font-family:Inter,"Segoe UI","Microsoft YaHei",sans-serif}
.lobby-screen:before{content:"";position:fixed;inset:0;pointer-events:none;opacity:.16;background:linear-gradient(120deg,transparent 20%,#c7a75d 20.2%,transparent 20.4%,transparent 76%,#c7a75d 76.2%,transparent 76.4%)}
.lobby-topbar{position:relative;z-index:1;height:72px;padding:0 max(22px,calc((100vw - 1050px)/2));display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ffffff18}
.lobby-brand{display:flex;align-items:center;gap:11px;color:#eee8d6;text-decoration:none;letter-spacing:.12em;font-size:12px}.lobby-brand-mark{display:grid;place-items:center;width:34px;height:34px;border:1px solid #b89b5b;border-radius:50%;color:#d7bf7b;font:20px Georgia,serif}.lobby-brand small{display:block;margin-top:4px;color:#aaa99e;font-size:9px;letter-spacing:.13em}
.lobby-topbar nav{display:flex;gap:20px}.lobby-topbar nav a{color:#c3b889;text-decoration:none;font-size:11px}
.lobby-content{position:relative;z-index:1;width:min(880px,calc(100% - 36px));margin:0 auto;padding:56px 0 30px}
.lobby-intro{text-align:center;margin-bottom:30px}.lobby-eyebrow{color:#d9bd70;font-size:10px;letter-spacing:.22em}.lobby-intro h1{font:500 clamp(29px,5vw,43px)/1.35 Georgia,"Microsoft YaHei",serif;margin:15px 0 10px}.lobby-intro h1 em{color:#dfc276;font-style:normal}.lobby-intro p{color:#aaa99e;font-size:13px}
.lobby-card,.lobby-rooms{border:1px solid #d5be762e;border-radius:9px;background:#121512d9;box-shadow:0 18px 60px #0005}.lobby-card{padding:23px 25px}.lobby-join input{height:42px;padding:0 12px;border:1px solid #44453b;border-radius:5px;outline:0;background:#0f110f;color:#f5f0df;font-size:13px}.lobby-join input:focus{border-color:#c8a857}.lobby-action-row{display:flex;gap:12px;margin-top:16px}.lobby-primary,.lobby-join button{height:42px;padding:0 18px;border:0;border-radius:5px;background:#d4b765;color:#19180f;font-weight:700;cursor:pointer}.lobby-primary{min-width:180px}
.lobby-resume{width:100%;margin-top:10px;padding:10px;border:1px solid #75643a;border-radius:5px;background:#211f16;color:#e6d49b;font-size:11px;cursor:pointer}
.lobby-resume[hidden]{display:none!important}.lobby-join{display:flex;gap:8px;flex:1}.lobby-join input{min-width:0;flex:1;text-transform:uppercase;letter-spacing:.12em}.lobby-join button{background:#27281f;color:#e4d39c;border:1px solid #79683c}.lobby-status{min-height:18px;margin-top:12px;color:#9f9e94;font-size:11px}
.lobby-member{display:flex;align-items:center;gap:7px;margin-top:12px;padding:8px 10px;border:1px solid #ffffff12;border-radius:5px;background:#0d0f0d;color:#b9b3a2;font-size:11px}
.lobby-member i{width:6px;height:6px;border-radius:50%;background:#c8a857;flex:0 0 auto}
.lobby-member.on i{background:#4fc27a;box-shadow:0 0 6px #4fc27a}
.lobby-member span{flex:1;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.lobby-member button{border:1px solid #79683c;border-radius:4px;background:#211f16;color:#e6d49b;padding:6px 10px;font-size:10px;cursor:pointer;white-space:nowrap}
.lobby-rooms{margin-top:20px;padding:22px 25px}.lobby-rooms-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:14px}.lobby-rooms-heading h2{margin:0 0 5px;font:500 18px Georgia,"Microsoft YaHei",serif}.lobby-rooms-heading p{margin:0;color:#8f8f86;font-size:11px}.lobby-refresh{border:1px solid #55513f;border-radius:4px;background:transparent;color:#d7c487;padding:8px 11px;font-size:11px;cursor:pointer}.lobby-room-list{display:grid;gap:9px}.lobby-room{display:flex;align-items:center;gap:14px;padding:13px 14px;border:1px solid #ffffff16;border-radius:6px;background:#ffffff05}.lobby-room-main{flex:1;min-width:0}.lobby-room-code{color:#e1c578;font-weight:700;letter-spacing:.1em}.lobby-room-meta{margin-top:5px;color:#999990;font-size:11px}.lobby-room button{border:1px solid #75643a;border-radius:4px;background:#211f16;color:#e6d49b;padding:8px 12px;cursor:pointer}.lobby-room button:disabled{opacity:.4;cursor:not-allowed}.lobby-empty{padding:22px;text-align:center;color:#77796f;font-size:12px}.lobby-footer{position:relative;z-index:1;width:min(880px,calc(100% - 36px));margin:0 auto;padding:14px 0 24px;border-top:1px solid #ffffff14;display:flex;justify-content:space-between;color:#74766e;font-size:9px;letter-spacing:.14em}
.online-panel-head{display:flex;align-items:center;justify-content:space-between;gap:7px;flex-wrap:nowrap;padding-bottom:7px;border-bottom:1px solid rgba(212,175,55,.18)}.online-panel-head .online-title{margin-bottom:0}.online-head-actions{display:flex;gap:6px;flex-wrap:wrap}.online-leave{border:1px solid #514c3d!important;background:transparent!important;color:#d7c88f!important;font-size:10px}
@media(max-width:600px){.lobby-topbar{height:62px;padding:0 16px}.lobby-topbar nav{gap:12px}.lobby-topbar nav a{font-size:10px}.lobby-content{width:calc(100% - 24px);padding:38px 0 22px}.lobby-intro{margin-bottom:23px}.lobby-intro h1{font-size:30px}.lobby-intro p{font-size:11px;line-height:1.7}.lobby-card{padding:18px 16px}.lobby-action-row{flex-direction:column}.lobby-primary{width:100%}.lobby-join{width:100%}.lobby-rooms{padding:18px 14px}.lobby-room{gap:9px;padding:11px}.lobby-room button{padding:8px}.lobby-footer{width:calc(100% - 24px)}}

/* Supplied portrait felt: preserve the photographed table and place game UI over it. */
.app {
  background: #080704 url("assets/poker-table-bg.jpg?v=bg2") center / 100% 100% no-repeat;
}
.scene { background: transparent; }
.scene-bg, .scene > .bokeh, .scene > .hostess { display: none !important; }
.table-wrap {
  inset: 0;
  width: 100%;
  height: 100%;
  transform: none;
  filter: none;
}
.table-wrap::before { display: none; }
.table-rim {
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.table-rim::before, .table-felt::before, .table-felt::after, .table-sheen,
.felt-watermark { display: none; }
.table-felt {
  overflow: visible;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.seat { width: 78px; }
.board { top: 45%; }
.pot { top: 29%; }
.hero-hand { top: 65%; }
.online-lobby {
  border-color: rgba(239, 205, 125, .72);
  background: rgba(13, 11, 7, .97);
  backdrop-filter: blur(8px);
}
.table-info { background: rgba(12, 10, 6, .72); backdrop-filter: blur(7px); }
.ticker { background: rgba(9, 8, 5, .86); backdrop-filter: blur(7px); }
.action-panel { background: linear-gradient(180deg, rgba(14, 12, 7, .95), rgba(4, 4, 4, .98)); }
@media (min-width: 520px) {
  .app { border-radius: 0; }
}
.bottom-nav { display: none !important; }
/* Keep the local player below the table; align opponent seats with the chair cushions. */
#seats .seat:nth-child(1) { left: 50% !important; top: calc(86% - 60px) !important; }
#seats .seat:nth-child(2) { left: 8.5% !important; top: 73% !important; }
#seats .seat:nth-child(3) { left: 8.5% !important; top: 56.5% !important; }
#seats .seat:nth-child(4) { left: 10% !important; top: calc(41.5% - 50px) !important; }
#seats .seat:nth-child(5) { left: calc(13.5% + 30px) !important; top: calc(24.5% - 60px) !important; }
#seats .seat:nth-child(6) { left: calc(83% - 20px) !important; top: calc(24.5% - 50px) !important; }
#seats .seat:nth-child(7) { left: 88% !important; top: calc(41.5% - 50px) !important; }
#seats .seat:nth-child(8) { left: 91.5% !important; top: 56.5% !important; }
#seats .seat:nth-child(9) { left: 91.5% !important; top: 73% !important; }
@media (max-width: 400px) {
  #seats .seat:nth-child(2), #seats .seat:nth-child(3), #seats .seat:nth-child(4) { left: 10% !important; }
  #seats .seat:nth-child(7), #seats .seat:nth-child(8), #seats .seat:nth-child(9) { left: 88% !important; }
  .seat { width: 72px; }
  .nameplate { min-width: 68px; padding-right: 3px; padding-left: 3px; }
}
/* Enlarged opponent hole cards on the felt */
#seats .seat:not(.seat-you) .mini-card { width: 24px; height: 34px; margin-left: -5px; }
#seats .seat:not(.seat-you) .mini-card.face-up { font-size: 12px; }
#seats .seat:not(.seat-you) .mini-card.face-up b { font-size: 10px; line-height: 11px; }
#seats .seat:not(.seat-you) .mini-card.face-up i { font-size: 9px; line-height: 10px; }
#seats .seat:nth-child(2) .seat-cards { left: calc(50% + 115px); top: -5px; }
#seats .seat:nth-child(3) .seat-cards { left: calc(50% + 115px); top: -5px; }
#seats .seat:nth-child(4) .seat-cards { left: calc(50% + 100px); top: -5px; }
#seats .seat:nth-child(5) .seat-cards { left: calc(50% + 58px); top: 36px; }
#seats .seat:nth-child(6) .seat-cards { left: calc(50% - 58px); top: 36px; }
#seats .seat:nth-child(7) .seat-cards { left: calc(50% - 100px); top: -5px; }
#seats .seat:nth-child(8) .seat-cards { left: calc(50% - 115px); top: -5px; }
#seats .seat:nth-child(9) .seat-cards { left: calc(50% - 115px); top: -5px; }

/* Keep wagers on the felt and separated from hole cards */
#bets .bet-chip:nth-child(1) { left: 50% !important; top: calc(76% - 30px) !important; }
#bets .bet-chip:nth-child(2) { left: 34% !important; top: calc(68% - 20px) !important; }
#bets .bet-chip:nth-child(3) { left: calc(23% + 85px) !important; top: 54% !important; }
#bets .bet-chip:nth-child(4) { left: calc(26% + 24px) !important; top: calc(31% + 58px) !important; }
#bets .bet-chip:nth-child(5) { left: 34% !important; top: calc(29% - 30px) !important; }
#bets .bet-chip:nth-child(6) { left: 66% !important; top: calc(29% - 30px) !important; }
#bets .bet-chip:nth-child(7) { left: calc(74% - 39px) !important; top: calc(31% + 57px) !important; }
#bets .bet-chip:nth-child(8) { left: calc(77% - 90px) !important; top: 54% !important; }
#bets .bet-chip:nth-child(9) { left: calc(76% - 50px) !important; top: calc(68% - 20px) !important; }

#dealerChip { display: none !important; }

/* ======================= Lobby home ======================= */
.lobby-screen {
  background: #050505;
  color: #f3ecd9;
  font-family: Inter, "Segoe UI", "Microsoft YaHei", sans-serif;
}
.lobby-screen:before { display: none; }
.home-bg {
  position: fixed;
  top: 0;
  bottom: 0;
  left: 50%;
  width: min(460px, 100%);
  transform: translateX(-50%);
  z-index: 0;
  background: #07080a url("assets/lobby-bg.jpg?v=lobby4") center center / cover no-repeat;
  filter: none;
  pointer-events: none;
}
.home-topbar {
  position: sticky;
  top: 0;
  z-index: 12;
  width: min(460px, 100%);
  margin: 0 auto;
  min-height: 58px;
  padding: 8px 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(180deg, rgba(9, 8, 5, .72), rgba(12, 10, 6, .55));
  border-bottom: 1px solid rgba(212, 175, 55, .28);
  backdrop-filter: blur(10px);
}
.home-brand { display: flex; align-items: center; gap: 7px; color: #f3e7c2; text-decoration: none; min-width: 0; }
.home-logo {
  width: 27px; height: 27px; flex: 0 0 auto;
  display: grid; place-items: center;
  border: 1px solid #e3c66f;
  border-radius: 50%;
  color: #f5d98d;
  font: 700 17px/1 Georgia, serif;
  background: radial-gradient(circle at 35% 30%, #3b2c11, #120e07);
  box-shadow: 0 0 8px #d4af5540;
}
.home-title { font: 600 16px/1 Georgia, "Microsoft YaHei", serif; letter-spacing: .04em; white-space: nowrap; }
.home-title em { color: #e9c86e; font-style: normal; }
.home-wallet {
  margin-left: auto;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 7px 0 5px;
  border: 1px solid #9b7a34;
  border-radius: 99px;
  background: linear-gradient(180deg, #2b2413, #151108);
  color: #f0d792;
  font-size: 11px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.home-coin { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff3bd, #d5a62e 55%, #7c4f0b); color: #3b2600; font-size: 10px; font-weight: 900; }
.home-wallet button { width: 16px; height: 16px; display: grid; place-items: center; padding: 0; border-radius: 50%; background: #e7c76d; color: #2c1e04; font-size: 13px; font-weight: 900; line-height: 1; }
.home-wallet[hidden], .home-vip[hidden], .home-login[hidden] { display: none !important; }
.home-login {
  margin-left: auto;
  height: 28px;
  padding: 0 12px;
  border: 1px solid #e3c66f;
  border-radius: 99px;
  background: linear-gradient(180deg, #f3d77f, #b88b2e);
  color: #211704;
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}
.home-vip { height: 28px; display: flex; align-items: center; gap: 3px; padding: 0 8px; border: 1px solid #9b7a34; border-radius: 4px; background: linear-gradient(180deg, #3a2b10, #171106); color: #f3d788; font-size: 11px; font-weight: 700; white-space: nowrap; }
.home-menu-btn { width: 28px; height: 28px; display: grid; place-items: center; color: #e8c56a; font-size: 17px; line-height: 1; }
.home-menu {
  position: absolute;
  top: 54px;
  right: 10px;
  z-index: 15;
  width: 150px;
  padding: 5px;
  border: 1px solid #6b5624;
  border-radius: 7px;
  background: rgba(10, 9, 6, .98);
  box-shadow: 0 10px 28px #000c;
}
.home-menu[hidden] { display: none !important; }
.home-menu a, .home-menu button { display: block; width: 100%; padding: 9px 10px; border-radius: 4px; color: #e6d9b1; font-size: 12px; text-align: left; text-decoration: none; background: transparent; }
.home-menu a:hover, .home-menu button:hover { background: #251e0f; color: #ffe08a; }

.home-main { position: relative; z-index: 1; width: min(460px, 100%); margin: 0 auto; padding: 0 16px 92px; }
.home-hero { position: relative; margin-top: 10px; }
.home-hero-art { display: block; width: 100%; height: auto; filter: drop-shadow(0 10px 22px rgba(0, 0, 0, .65)); }

.home-marquee { position: relative; z-index: 5; margin-top: -8px; height: 36px; display: flex; align-items: center; padding: 0; overflow: visible; border: 0; background: none; box-shadow: none; color: #f6f1e2; font-size: 12px; }
.home-marquee-icon { position: absolute; left: 0; top: 50%; transform: translateY(-50%); z-index: 2; width: 36px; height: 36px; flex: 0 0 36px; display: grid; place-items: center; border-radius: 50%; border: 1px solid rgba(245, 214, 130, .8); background: radial-gradient(circle at 35% 28%, rgba(255, 236, 174, .3), transparent 46%), radial-gradient(circle at 35% 30%, #3b2c11, #120e07); color: #f0cf7f; box-shadow: 0 0 12px rgba(232, 197, 106, .38), 0 0 24px rgba(232, 197, 106, .18), inset 0 1px 0 rgba(255, 236, 174, .25); }
.home-marquee-icon svg { width: 17px; height: 17px; }
.home-marquee-body { position: relative; flex: 1; height: 30px; display: flex; align-items: center; gap: 8px; padding: 0 11px 0 45px; overflow: hidden; border: 1px solid rgba(232, 197, 106, .58); border-radius: 999px; background: radial-gradient(ellipse at 50% -10%, rgba(255, 224, 138, .15), transparent 58%), linear-gradient(100deg, rgba(36, 28, 14, .95) 0%, rgba(12, 10, 7, .92) 46%, rgba(45, 34, 16, .95) 100%); box-shadow: 0 4px 14px rgba(0, 0, 0, .38), 0 0 12px rgba(232, 197, 106, .26), 0 0 26px rgba(232, 197, 106, .12), inset 0 1px 0 rgba(255, 236, 174, .18), inset 0 -10px 20px rgba(0, 0, 0, .25); }
.home-marquee-track { flex: 1; height: 100%; display: flex; flex-direction: column; overflow: visible; white-space: normal; animation: homeMarqueeY 12s ease-in-out infinite; }
.home-marquee-track span { flex: 0 0 100%; display: flex; align-items: center; height: 100%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.home-marquee-track b { color: #f3cf78; font-weight: 700; }
.home-marquee-arrow { flex: 0 0 auto; padding-right: 2px; color: #e8c56a; font: 16px/1 Georgia, serif; opacity: .85; }
@keyframes homeMarqueeY {
  0%, 22% { transform: translateY(0); }
  28%, 47% { transform: translateY(-100%); }
  53%, 72% { transform: translateY(-200%); }
  78%, 97% { transform: translateY(-300%); }
  100% { transform: translateY(-300%); }
}

.home-quick { position: relative; margin-top: 10px; display: grid; grid-template-columns: repeat(5, 1fr); gap: 2px; padding: 10px 20px; border: 1px solid rgba(232, 197, 106, .55); border-radius: 999px; background: radial-gradient(ellipse at 50% -10%, rgba(255, 224, 138, .16), transparent 58%), linear-gradient(100deg, rgba(36, 28, 14, .96) 0%, rgba(12, 10, 7, .92) 46%, rgba(45, 34, 16, .96) 100%); box-shadow: 0 0 0 1px rgba(255, 224, 138, .1), 0 0 14px rgba(232, 197, 106, .3), 0 0 30px rgba(232, 197, 106, .12), inset 0 1px 0 rgba(255, 236, 174, .18), inset 0 -12px 24px rgba(0, 0, 0, .28); }
.home-quick button { position: relative; display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 2px; color: #e8d6a6; font-size: 14px; }
.home-quick button + button::before { content: ""; position: absolute; left: -1px; top: 16%; bottom: 16%; width: 1px; background: linear-gradient(180deg, transparent, rgba(212, 175, 55, .45) 30%, rgba(212, 175, 55, .45) 70%, transparent); pointer-events: none; }
.home-quick svg { width: 24px; height: 24px; color: #e8c56a; }

.home-tiers { position: relative; margin-top: 12px; display: flex; align-items: center; gap: 3px; }
.tier-list { flex: 1; display: flex; align-items: stretch; gap: 7px; overflow-x: auto; padding: 20px 2px 4px; scrollbar-width: none; scroll-snap-type: x mandatory; }
.tier-list::-webkit-scrollbar { display: none; }
.tier-card { position: relative; flex: 0 0 132px; display: flex; flex-direction: column; align-items: center; padding: 18px 9px 10px; border: 1px solid rgba(212, 175, 55, .4); border-radius: 9px; background: linear-gradient(180deg, rgba(23, 19, 10, .96), rgba(8, 8, 7, .97)); box-shadow: 0 5px 14px #0009; scroll-snap-align: center; }
.tier-card.center { flex-basis: 148px; padding-top: 20px; border-color: #f2d37c; background: radial-gradient(ellipse at 50% 0%, #5a4315, #1c1609 58%, #0a0906); box-shadow: 0 0 0 1px #4d3510, 0 0 18px #d4af5533, 0 8px 20px #000b; transform: translateY(-4px); }
.tier-crown { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); width: 26px; height: 26px; display: grid; place-items: center; border: 1px solid #e3c66f; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #6a4d17, #1a1205); color: #f6d376; font-size: 13px; box-shadow: 0 2px 7px #000b; }
.tier-card.center .tier-crown { background: radial-gradient(circle at 35% 30%, #a77a22, #2a1d07); box-shadow: 0 0 12px #e8c56a66; }
.tier-card h3 { margin: 0; color: #f0d88d; font: 600 17px/1.2 Georgia, "Microsoft YaHei", serif; }
.tier-card.center h3 { color: #ffe8a7; font-size: 19px; }
.tier-range { margin: 9px 0 0; color: #f0e1b5; font-size: 11px; }
.tier-meta { margin-top: 10px; padding-top: 8px; width: 100%; border-top: 1px solid rgba(255, 255, 255, .1); text-align: center; color: #c9b98e; font-size: 10px; }
.tier-people { margin-top: 3px; color: #b8a982; font-size: 10px; }
.tier-enter { width: 100%; height: 30px; margin-top: 9px; border: 1px solid #c9a85b; border-radius: 5px; background: linear-gradient(180deg, #d8b969, #8b651e); color: #241804; font-size: 11px; font-weight: 800; box-shadow: inset 0 1px 0 #fff4c8aa; }
.tier-arrow { width: 28px; height: 28px; flex: 0 0 28px; display: flex; align-items: center; justify-content: center; padding: 0; border-radius: 50%; border: 1px solid rgba(212, 175, 55, .3); background: rgba(0, 0, 0, .48); backdrop-filter: blur(4px); box-shadow: 0 2px 8px rgba(0, 0, 0, .45); color: #e8c56a; }
.tier-arrow svg { width: 14px; height: 14px; display: block; }
.tier-arrow:hover { background: rgba(0, 0, 0, .68); border-color: rgba(232, 197, 106, .55); }
.tier-arrow:active { transform: scale(.9); }

.home-daily { margin-top: 12px; display: flex; align-items: center; gap: 9px; padding: 10px 20px; border: 1px solid rgba(232, 197, 106, .55); border-radius: 999px; background: radial-gradient(ellipse at 50% -10%, rgba(255, 224, 138, .16), transparent 58%), linear-gradient(100deg, rgba(36, 28, 14, .96) 0%, rgba(12, 10, 7, .92) 46%, rgba(45, 34, 16, .96) 100%); box-shadow: 0 0 0 1px rgba(255, 224, 138, .1), 0 0 14px rgba(232, 197, 106, .3), 0 0 30px rgba(232, 197, 106, .12), inset 0 1px 0 rgba(255, 236, 174, .18), inset 0 -12px 24px rgba(0, 0, 0, .28); }
.home-daily-gift { width: 42px; height: 42px; display: grid; place-items: center; font-size: 27px; filter: drop-shadow(0 2px 4px #000); }
.home-daily-copy { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.home-daily-copy b { color: #ffe6a1; font-size: 16px; }
.home-daily-copy span { color: #c9b98e; font-size: 13px; }
.home-daily button { height: 32px; padding: 0 12px; border: 1px solid #f3d37f; border-radius: 5px; background: linear-gradient(180deg, #ffeaae, #dca63b); color: #432a04; font-size: 12px; font-weight: 800; white-space: nowrap; }
.home-activity { margin-top: 12px; padding: 14px 16px; border: 1px solid rgba(212, 175, 55, .28); border-radius: 14px; background: linear-gradient(180deg, rgba(20, 17, 10, .92), rgba(8, 8, 7, .94)); }
.home-activity-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.home-activity-head h2 { margin: 0; display: flex; align-items: center; gap: 7px; color: #f2e2b0; font: 600 14px Georgia, "Microsoft YaHei", serif; }
.home-activity-head small { color: #8f8a7b; font-size: 9px; letter-spacing: .12em; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #6ee7a0; box-shadow: 0 0 8px #6ee7a0; animation: livePulse 1.6s infinite; }
.home-activity-list { display: grid; max-height: 176px; overflow-y: auto; scrollbar-width: none; }
.home-activity-list::-webkit-scrollbar { display: none; }
.activity-row { display: flex; align-items: center; gap: 9px; height: 44px; padding: 6px 0; border-top: 1px solid rgba(212, 175, 55, .1); box-sizing: border-box; }
.activity-row:first-child { border-top: 0; }
.activity-icon { width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center; border: 1px solid rgba(212, 175, 55, .3); border-radius: 50%; background: #17180f; color: #e8c56a; font-size: 13px; }
.activity-icon.win { color: #f3cf78; border-color: rgba(232, 197, 106, .55); box-shadow: 0 0 8px rgba(232, 197, 106, .18); }
.activity-icon.join { color: #9fc9e8; }
.activity-icon.create { color: #d9c68f; }
.activity-icon.rebuy { color: #c9b98e; }
.activity-copy { flex: 1; min-width: 0; color: #c9c0a4; font-size: 11px; line-height: 1.45; }
.activity-copy b { color: #f1e3b7; font-weight: 600; }
.activity-copy small { display: block; margin-top: 2px; color: #7f7d72; font-size: 9px; }
.activity-amount { color: #f3cf78; font-size: 11px; font-weight: 700; white-space: nowrap; }
.home-activity-empty { padding: 16px 0; text-align: center; color: #7f7d72; font-size: 11px; }
@keyframes livePulse { 0%, 100% { opacity: 1; transform: scale(1); } 50% { opacity: .4; transform: scale(.7); } }

.home-nav { position: fixed; left: 50%; bottom: 12px; transform: translateX(-50%); z-index: 30; width: min(428px, calc(100% - 32px)); display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 8px 10px calc(8px + var(--safe-bottom) * .5); border: 1px solid rgba(232, 197, 106, .55); border-radius: 999px; background: linear-gradient(180deg, rgba(10, 9, 6, .72), rgba(5, 5, 5, .55)); backdrop-filter: blur(10px); box-shadow: 0 8px 24px rgba(0, 0, 0, .55), 0 0 14px rgba(232, 197, 106, .22), 0 0 26px rgba(232, 197, 106, .1), inset 0 1px 0 rgba(255, 236, 174, .18); }
.home-nav button, .home-nav a { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; padding: 2px; color: #9f9478; font-size: 14px; text-decoration: none; }
.home-nav button + button::before, .home-nav a + a::before, .home-nav button + a::before, .home-nav a + button::before { content: ""; position: absolute; left: -1px; top: 18%; bottom: 18%; width: 1px; background: linear-gradient(180deg, transparent, rgba(212, 175, 55, .4) 30%, rgba(212, 175, 55, .4) 70%, transparent); pointer-events: none; }
.home-nav svg { width: 21px; height: 21px; }
.home-nav button.active, .home-nav a.active { color: #f1ce72; }
.home-nav button.active svg, .home-nav a.active svg { filter: drop-shadow(0 0 5px #e8c56a77); }
body[data-wallet-page="recharge"] .wallet-main { padding-bottom: 104px; }

.home-toast { position: fixed; left: 50%; bottom: 76px; z-index: 70; max-width: 86%; transform: translate(-50%, 12px); opacity: 0; pointer-events: none; padding: 8px 14px; border: 1px solid #d4af5577; border-radius: 99px; background: rgba(10, 9, 6, .96); color: #f5e7c2; font-size: 12px; transition: opacity .2s, transform .2s; }
.home-toast.show { opacity: 1; transform: translate(-50%, 0); }

.rooms-mask { position: fixed; inset: 0; z-index: 60; background: #000a; opacity: 0; pointer-events: none; transition: opacity .2s; }
.rooms-mask.show { opacity: 1; pointer-events: auto; }
.rooms-sheet { position: fixed; left: 50%; bottom: 0; z-index: 61; width: min(460px, 100%); max-height: 88vh; overflow-y: auto; transform: translate(-50%, 105%); padding: 9px 16px calc(18px + var(--safe-bottom)); border: 1px solid rgba(212, 175, 55, .4); border-bottom: 0; border-radius: 16px 16px 0 0; background: linear-gradient(180deg, #15130d, #070706); box-shadow: 0 -14px 40px #000d; transition: transform .28s cubic-bezier(.2, .8, .25, 1); }
.rooms-sheet.show { transform: translate(-50%, 0); }
.rooms-sheet-handle { width: 34px; height: 4px; margin: 1px auto 9px; border-radius: 99px; background: #ffffff26; }
.rooms-sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.rooms-sheet-head small { color: #8e7c52; font-size: 8px; letter-spacing: .22em; }
.rooms-sheet-head h2 { margin: 2px 0 0; color: #ffe29a; font: 600 21px/1.1 Georgia, "Microsoft YaHei", serif; }
.rooms-sheet-head > button { width: 30px; height: 30px; color: #b9a575; font-size: 22px; }
.rooms-sheet .lobby-member { margin-top: 0; }
.rooms-sheet .lobby-rooms { padding: 0; margin-top: 14px; border: 0; background: none; box-shadow: none; }
.lobby-room-filter { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 10px; padding: 9px 11px; border: 1px solid rgba(212, 175, 55, .36); border-radius: 7px; background: linear-gradient(180deg, rgba(43, 33, 14, .9), rgba(14, 12, 8, .9)); color: #e8d59a; font-size: 11px; }
.lobby-room-filter[hidden] { display: none !important; }
.lobby-room-filter span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lobby-room-filter button { flex: 0 0 auto; border: 1px solid #6b5a2f; border-radius: 4px; background: #211f16; color: #e6d49b; padding: 5px 8px; font-size: 10px; cursor: pointer; }
.lobby-create-mask { position: fixed; inset: 0; z-index: 260; display: grid; place-items: center; padding: 20px; background: rgba(0, 0, 0, .72); backdrop-filter: blur(4px); }
.lobby-create-mask[hidden] { display: none !important; }
.lobby-create-dialog { width: min(340px, 92vw); padding: 16px; border: 1px solid rgba(212, 175, 55, .5); border-radius: 12px; background: linear-gradient(180deg, #1b160c, #090806); box-shadow: 0 24px 70px #000c, inset 0 1px 0 #ffe9aa22; }
.lobby-create-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.lobby-create-head small { color: #b79a52; font-size: 9px; letter-spacing: .16em; }
.lobby-create-head h3 { margin: 3px 0 0; color: #ffe08a; font: 700 18px/1.2 Georgia, "Microsoft YaHei", serif; }
.lobby-create-head button { width: 28px; height: 28px; border: 1px solid #6b5a2f; border-radius: 50%; background: #151109; color: #d9c68f; font-size: 18px; line-height: 1; cursor: pointer; }
.lobby-create-sub, .lobby-create-hint { margin: 10px 0 0; color: #a99b7e; font-size: 11px; line-height: 1.6; }
.lobby-create-field { display: grid; gap: 6px; margin-top: 14px; color: #c9b98e; font-size: 11px; }
.lobby-create-field input { height: 40px; padding: 0 11px; border: 1px solid #4b432e; border-radius: 6px; outline: 0; background: #0f110d; color: #f5efd9; font-size: 13px; }
.lobby-create-field input:focus { border-color: #c8a857; }
.lobby-create-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 16px; }
.lobby-create-actions button { height: 40px; border: 1px solid #5c502f; border-radius: 6px; background: #17140d; color: #d9c68f; font-size: 12px; font-weight: 700; cursor: pointer; }
.lobby-create-actions button.primary { border-color: #f0d48a; background: linear-gradient(180deg, #f3d77f, #b88b2e); color: #211704; }
.rooms-sheet .lobby-rooms-heading { margin-bottom: 8px; }
.rooms-sheet .lobby-rooms-heading h2 { font-size: 16px; }
.rooms-sheet .lobby-room-list { max-height: 30vh; overflow-y: auto; }

@media (max-width: 600px) {
  .home-title { font-size: 14px; }
  .home-wallet b { font-size: 10px; }
  .home-quick { padding: 8px 18px; }
  .home-quick svg { width: 24px; height: 24px; }
  .home-quick button { font-size: 14px; }
  .tier-card { flex-basis: 118px; padding-left: 6px; padding-right: 6px; }
  .tier-card.center { flex-basis: 136px; }
  .tier-card h3 { font-size: 15px; }
  .tier-card.center h3 { font-size: 17px; }
  .tier-range { font-size: 10px; }
  .tier-enter { font-size: 10px; }
  .home-daily { padding: 8px 18px; }
  .home-daily-copy b { font-size: 15px; }
  .home-daily-copy span { font-size: 12px; }
  .home-daily button { height: 30px; padding: 0 10px; font-size: 11px; }
}

.dock {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  gap: 8px;
  padding: 8px 9px calc(8px + var(--safe-bottom) * .3);
  z-index: 26;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(212, 175, 55, .1), transparent 58%),
    linear-gradient(180deg, rgba(14, 12, 8, .99), #030304);
  border-top: 1px solid rgba(212, 175, 55, .36);
  box-shadow: 0 -8px 22px rgba(0, 0, 0, .65);
}
body.online-active .dock { display: flex; }
body.online-active .ticker,
body.online-active .action-panel { visibility: hidden !important; pointer-events: none !important; }
body.online-active #onlineActions { display: none !important; }

.dock-side {
  width: 152px;
  flex: 0 0 152px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-right: 8px;
  border-right: 1px solid rgba(255, 255, 255, .08);
}
.dock-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dock-play { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.dock-main.result .dock-play { display: none; }
.dock-result { display: none; flex: 1; min-width: 0; flex-direction: column; justify-content: center; gap: 6px; }
.dock-result[hidden] { display: none !important; }
.dock-main.result .dock-result { display: flex; }
.dock-winner { color: #e9dfc7; font-size: 11px; line-height: 1.35; }
.dock-winner b { color: #ffe08a; }
.dock-trophy { color: #ffcf5a; margin-right: 2px; }
.dock-next {
  height: 36px;
  flex: 0 0 auto;
  border: 2px solid #ffe9a8;
  border-radius: 9px;
  background: linear-gradient(180deg, #ffe9a0 0%, #ffcb52 30%, #d99a1f 66%, #985d06 100%);
  color: #5a2d00;
  font-size: 13px;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .4);
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .45), inset 0 -4px 7px rgba(0, 0, 0, .3), 0 0 0 1px #4a2c08, 0 4px 9px rgba(0, 0, 0, .5);
}
.dock-next:disabled { opacity: .45; }

.dock-timer {
  width: max-content;
  height: 20px;
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0 6px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 5px;
  background: rgba(0, 0, 0, .4);
  color: #ffe08a;
  font-size: 11px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.dock-timer svg { width: 13px; height: 13px; color: #e8c56a; }
.dock-timer.urgent { color: #ff8d8d; border-color: rgba(255, 90, 90, .45); }
.dock-timer.urgent svg { color: #ff6a6a; }

.dock-log {
  flex: 1;
  min-height: 44px;
  max-height: 46px;
  overflow: hidden;
  padding: 3px 5px;
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 5px;
  background: rgba(0, 0, 0, .26);
  font-size: 9.5px;
  line-height: 1.55;
}
.dock-line { display: flex; align-items: baseline; gap: 4px; white-space: nowrap; overflow: hidden; }
.dock-line i { width: 4px; height: 4px; border-radius: 50%; background: #e8c56a; flex: 0 0 auto; margin-top: 4px; }
.dock-line b { color: #f0d99a; font-weight: 600; max-width: 58px; overflow: hidden; text-overflow: ellipsis; }
.dock-line span { color: #b9ad90; overflow: hidden; text-overflow: ellipsis; }
.dock-line.chat i { background: #7fa8e8; }
.dock-line.chat b { color: #9fc0f5; }
.dock-line.chat span { color: #c3d3ee; }
.dock-empty { color: #7d7055; font-size: 9px; padding: 2px; }

.dock-chat { display: flex; align-items: center; gap: 3px; height: 24px; }
.dock-emoji {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: grid; place-items: center;
  padding: 0;
  color: #e8c56a; font-size: 15px; line-height: 1;
}
.dock-emoji svg { width: 16px; height: 16px; display: block; }
.dock-chat input {
  flex: 1; min-width: 0; height: 24px;
  padding: 0 8px;
  color: #fff;
  font-size: 10px;
  background: #14120c;
  border: 1px solid #51452a;
  border-radius: 99px;
  outline: none;
}
.dock-chat input::placeholder { color: #7d7055; }
.dock-send {
  width: 22px; height: 22px; flex: 0 0 auto;
  display: grid; place-items: center;
  color: #e8c56a;
}
.dock-send svg { width: 14px; height: 14px; }

.dock-emoji-panel {
  position: absolute;
  left: 8px;
  bottom: 38px;
  z-index: 60;
  width: 206px;
  padding: 7px;
  border: 1px solid #6b5624;
  border-radius: 9px;
  background: rgba(9, 8, 6, .98);
  box-shadow: 0 12px 30px rgba(0, 0, 0, .8);
}
.dock-emoji-panel[hidden] { display: none !important; }
.dock-emoji-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 5px;
  color: #c9b98e;
  font-size: 10px;
  letter-spacing: .1em;
}
.dock-emoji-head button {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  padding: 0;
  color: #a9976f;
  font-size: 14px;
  border-radius: 4px;
}
.dock-emoji-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 4px; }
.dock-emoji-grid button {
  height: 28px;
  display: grid;
  place-items: center;
  padding: 0;
  font-size: 17px;
  line-height: 1;
  border: 1px solid rgba(255, 255, 255, .04);
  border-radius: 5px;
  background: #1b1710;
}
.dock-emoji-grid button:hover { background: #2b2416; border-color: #6b5624; }
.dock-emoji.active { color: #191307; background: #e8c56a; border-radius: 50%; }

.dock-raise-row { display: flex; align-items: center; gap: 6px; height: 18px; color: #a9976f; font-size: 10px; }
.dock-raise-row b { color: #ffe08a; font-size: 14px; font-variant-numeric: tabular-nums; }
.dock-quick { margin-left: auto; display: flex; gap: 4px; }
.dock-quick button {
  height: 20px;
  padding: 0 6px;
  border: 1px solid #6b5624;
  border-radius: 4px;
  background: #211a0b;
  color: #e8c56a;
  font-size: 9px;
  font-weight: 700;
}
.dock-quick button:active { background: #33270e; }
.dock-quick button:disabled { opacity: .4; }

.dock-slider-row { display: flex; align-items: center; gap: 5px; height: 20px; }
.dock-slider-row > button {
  width: 18px; height: 18px; flex: 0 0 auto;
  display: grid; place-items: center;
  padding: 0;
  border: 1px solid #6b5624;
  border-radius: 50%;
  background: #1c160a;
  color: #e8c56a;
  font-size: 13px;
  line-height: 1;
}
.dock-slider-row > button svg { width: 12px; height: 12px; display: block; }
.dock-slider-row input[type=range] {
  flex: 1; min-width: 0; height: 4px;
  accent-color: #e8c56a;
  cursor: pointer;
}
.dock-slider-row input[type=range]:disabled { opacity: .4; cursor: default; }

.dock-actions { display: flex; gap: 5px; margin-top: auto; }
.dock-btn {
  position: relative;
  flex: 1;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  overflow: hidden;
  border: 2px solid #e8c76f;
  border-radius: 9px;
  font-weight: 800;
  box-shadow: inset 0 2px 1px rgba(255, 255, 255, .45), inset 0 -4px 7px rgba(0, 0, 0, .35), 0 0 0 1px #4a2c08, 0 4px 9px rgba(0, 0, 0, .55);
}
.dock-btn::before {
  content: "";
  position: absolute;
  left: 3px; right: 3px; top: 2px;
  height: 44%;
  border-radius: 7px 7px 45% 45%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .5), rgba(255, 255, 255, .04));
  pointer-events: none;
}
.dock-ico { position: relative; z-index: 1; width: 20px; height: 20px; flex: 0 0 auto; display: grid; place-items: center; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .35)); }
.dock-ico svg { width: 20px; height: 20px; display: block; }
.dock-txt { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.02; }
.dock-txt > span { font-size: 9px; font-weight: 700; letter-spacing: .5px; }
.dock-txt > b { font-size: 15px; font-weight: 900; line-height: 1.05; }
.dock-fold .dock-txt > span { font-size: 11px; }
.dock-btn:disabled { opacity: .35; filter: saturate(.45); }
.dock-fold { background: linear-gradient(180deg, #ff8585 0%, #db3030 28%, #a91212 62%, #6d0808 100%); color: #fff; text-shadow: 0 1px 2px #4a0000; }
.dock-call { background: linear-gradient(180deg, #9bd6ff 0%, #4193e5 28%, #165ca9 64%, #082f63 100%); color: #fff; text-shadow: 0 1px 2px #06284f; }
.dock-raise { background: linear-gradient(180deg, #fff0b0 0%, #ffcb52 30%, #dc9a1c 66%, #985d06 100%); color: #5a2d00; border-color: #fff0b8; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.dock-raise .dock-txt > span { color: #6a3800; }

@media (max-width: 400px) {
  .dock-side { width: 132px; flex-basis: 132px; }
  .dock-btn { height: 34px; }
  .dock-ico, .dock-ico svg { width: 18px; height: 18px; }
  .dock-txt > b { font-size: 14px; }
  .dock-quick button { padding: 0 4px; font-size: 8px; }
  .dock-raise-row b { font-size: 13px; }
}


/* ---------- deal animation ---------- */
.deal-layer {
  position: absolute;
  inset: 0;
  z-index: 30;
  overflow: hidden;
  pointer-events: none;
}
.deal-fly {
  position: absolute;
  width: 26px;
  height: 36px;
  border-radius: 3px;
  border: 1px solid #c9a44e;
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 5px),
    linear-gradient(135deg, #1d2f52 0%, #0a1326 55%, #182a4c 100%);
  box-shadow: inset 0 0 0 1px rgba(255, 230, 160, .2), 0 4px 10px rgba(0, 0, 0, .7);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #e8c56a;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 0 6px rgba(232, 197, 106, .5);
  transform: translate(-50%, -50%);
  will-change: transform, opacity;
}
.deal-fly::after {
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px solid rgba(212, 175, 55, .32);
  border-radius: 2px;
}

/* ================= 发牌公平性面板 ================= */
.online-head-actions { display: flex; align-items: center; gap: 6px; }
.online-fair { border: 1px solid #5c4c27 !important; background: #161208 !important; color: #e8c56a !important; font-size: 10px; }
.online-fair:hover { background: #2a2212 !important; border-color: #a8863e !important; }
.fair-mask {
  position: fixed; inset: 0; z-index: 140;
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, .76);
  backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none;
  transition: opacity .2s;
}
.fair-mask.show { opacity: 1; pointer-events: auto; }
.fair-mask[hidden] { display: none !important; }
.fair-panel {
  width: min(100%, 580px); max-height: 86dvh;
  display: flex; flex-direction: column;
  border: 1px solid rgba(212, 175, 55, .5); border-radius: 16px;
  background: linear-gradient(160deg, #17130c 0%, #08080a 70%);
  box-shadow: 0 26px 80px rgba(0, 0, 0, .9), inset 0 1px 0 rgba(255, 235, 170, .12);
  overflow: hidden;
  transform: translateY(12px) scale(.98);
  transition: transform .2s;
}
.fair-mask.show .fair-panel { transform: none; }
.fair-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
  padding: 15px 17px 12px;
  border-bottom: 1px solid rgba(212, 175, 55, .18);
  background: radial-gradient(ellipse at 20% 0%, rgba(212, 175, 55, .12), transparent 60%);
}
.fair-kicker { display: block; color: #9d8752; font-size: 8px; letter-spacing: .22em; margin-bottom: 4px; }
.fair-head h2 { margin: 0; font: 500 18px/1.2 Georgia, "Microsoft YaHei", serif; color: #ffe08a; }
.fair-close {
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  width: 30px; height: 30px; border: 1px solid rgba(212, 175, 55, .3); border-radius: 50%;
  background: transparent; color: #c9b47a; font-size: 19px; line-height: 1; cursor: pointer;
}
.fair-close:hover { color: #ffe08a; border-color: #d4af37; }
.fair-body { padding: 14px 17px 18px; overflow: auto; display: flex; flex-direction: column; gap: 12px; }
.fair-foot {
  display: flex; justify-content: space-between; gap: 10px;
  padding: 9px 17px 12px;
  border-top: 1px solid rgba(212, 175, 55, .12);
  color: #7f7358; font-size: 9px; letter-spacing: .06em;
}
.fair-current {
  border: 1px solid rgba(212, 175, 55, .22); border-radius: 12px;
  padding: 12px 13px;
  background: linear-gradient(180deg, rgba(212, 175, 55, .06), rgba(255, 255, 255, .015));
}
.fair-current-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 9px; }
.fair-current-head b { color: #f3dfaa; font-size: 13px; }
.fair-status {
  font-size: 9px; border: 1px solid rgba(212, 175, 55, .28); border-radius: 999px;
  padding: 3px 8px; color: #d8b95f; white-space: nowrap;
}
.fair-status.ok { color: #6ee7a0; border-color: rgba(110, 231, 160, .35); background: rgba(110, 231, 160, .08); }
.fair-status.pending { color: #e8c56a; background: rgba(232, 197, 106, .07); }
.fair-status.bad { color: #ff9a9a; border-color: rgba(255, 110, 110, .4); background: rgba(255, 80, 80, .08); }
.fair-row { display: flex; align-items: baseline; gap: 8px; padding: 3px 0; font-size: 10px; line-height: 1.45; }
.fair-row label { flex: 0 0 70px; color: #9d8d68; }
.fair-row code {
  flex: 1; min-width: 0; color: #d9c58c;
  font: 10px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
  word-break: break-all;
}
.fair-row .fair-sub { color: #7f7358; font-size: 9px; }
.fair-actions { display: flex; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.fair-btn {
  border: 1px solid #6b5624; border-radius: 7px;
  background: linear-gradient(180deg, #2a2314, #151109);
  color: #f0d99a; padding: 7px 11px; font-size: 10px; font-weight: 700; cursor: pointer;
}
.fair-btn:hover { border-color: #c8a44e; color: #fff0bd; }
.fair-btn.primary { border-color: #b6964f; background: linear-gradient(180deg, #e8c56a, #b98f2f); color: #1b1406; }
.fair-seeds { display: grid; gap: 4px; margin-top: 5px; }
.fair-seed { display: flex; align-items: center; gap: 7px; font-size: 9px; color: #b7a882; }
.fair-seed span { flex: 0 0 auto; min-width: 64px; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fair-seed code { flex: 1; min-width: 0; color: #8f8162; font: 9px ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fair-seed i { font-style: normal; font-size: 8px; border-radius: 999px; padding: 2px 6px; color: #7ee2a8; background: rgba(110, 231, 160, .08); }
.fair-seed i.auto { color: #d8b95f; background: rgba(232, 197, 106, .08); }
.fair-verify { margin-top: 9px; border-radius: 9px; padding: 9px 10px; background: rgba(0, 0, 0, .28); border: 1px dashed rgba(212, 175, 55, .24); font-size: 10px; color: #a99a76; }
.fair-verify.ok { border-style: solid; border-color: rgba(110, 231, 160, .35); background: rgba(110, 231, 160, .06); color: #a9f0c4; }
.fair-verify.bad { border-style: solid; border-color: rgba(255, 110, 110, .4); background: rgba(255, 80, 80, .07); color: #ffb3b3; }
.fair-check { display: flex; align-items: center; gap: 6px; padding: 3px 0; color: #b7a882; }
.fair-check b { font-size: 9px; font-weight: 600; }
.fair-check .ok { color: #7ee2a8; }
.fair-check .bad { color: #ff9a9a; }
.fair-check code { margin-left: auto; font: 8px ui-monospace, Consolas, monospace; color: #7f7358; max-width: 60%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fair-history { margin-top: 2px; }
.fair-risk {
  border: 1px solid rgba(255, 196, 90, .25); border-radius: 12px;
  padding: 10px 12px; background: rgba(255, 196, 90, .04);
}
.fair-risk h3 { margin: 0 0 7px; color: #e8c56a; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.fair-risk-row { display: flex; gap: 8px; align-items: baseline; padding: 2px 0; }
.fair-risk-row b { flex: 0 0 48px; color: #ffcf5a; font-size: 9px; }
.fair-risk-row span { color: #d8c58c; font-size: 10px; line-height: 1.45; }
.fair-risk-note { margin: 6px 0 0; color: #8f8162; font-size: 9px; line-height: 1.5; }
.fair-history h3 { margin: 0 0 7px; color: #c9b47a; font-size: 11px; font-weight: 600; letter-spacing: .04em; }
.fair-history-item {
  border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px;
  padding: 8px 10px; margin-bottom: 6px; background: rgba(255, 255, 255, .02);
  display: flex; align-items: center; gap: 8px;
}
.fair-history-item.bad { border-color: rgba(255, 110, 110, .35); background: rgba(255, 80, 80, .05); }
.fair-badge { font-style: normal; font-size: 8px; color: #ffb3b3; background: rgba(255, 80, 80, .12); border: 1px solid rgba(255, 110, 110, .35); border-radius: 999px; padding: 2px 6px; flex: 0 0 auto; }
.fair-history-item b { color: #ead79f; font-size: 10px; flex: 0 0 auto; }
.fair-history-item code { flex: 1; min-width: 0; color: #8f8162; font: 8px ui-monospace, Consolas, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fair-history-item button { flex: 0 0 auto; font-size: 9px; padding: 4px 7px; }
.fair-deck { margin-top: 2px; border: 1px solid rgba(255, 255, 255, .07); border-radius: 9px; padding: 7px 9px; background: rgba(0, 0, 0, .2); }
.fair-deck summary { cursor: pointer; color: #b8a778; font-size: 9px; outline: none; }
.fair-deck code { display: block; margin-top: 6px; color: #7f7358; font: 8px/1.6 ui-monospace, Consolas, monospace; word-break: break-all; }
.fair-empty { color: #8f8162; font-size: 11px; line-height: 1.7; text-align: center; padding: 22px 10px; }
@media (max-width: 600px) {
  .fair-mask { padding: 10px; }
  .fair-panel { max-height: 92dvh; }
  .fair-body { padding: 12px 13px 15px; }
  .fair-row label { flex-basis: 60px; }
  .fair-foot { font-size: 8px; }
  .online-head-actions { gap: 4px; }
}
