/* ============================================================
   德州扑克 · 联机牌桌 —— 统一视觉系统
   深绿绒布 + 香槟金，桌面/手机共用同一套组件
   ============================================================ */
:root {
  --bg-0: #060a08;
  --bg-1: #0a100d;
  --surface: #111b16;
  --surface-2: #16221c;
  --line: rgba(216, 178, 106, .13);
  --line-strong: rgba(216, 178, 106, .28);
  --gold: #d8b26a;
  --gold-soft: #f2e0b4;
  --text: #eae5da;
  --text-2: #b9c4bc;
  --muted: #7f8d85;
  --green: #3fa87a;
  --green-soft: #7fe0b2;
  --red: #d1544a;
  --red-soft: #ff9f92;
  --r-sm: 10px;
  --r-md: 14px;
  --r-lg: 20px;
  --r-xl: 26px;
  --shadow-1: 0 6px 20px rgba(0, 0, 0, .38);
  --shadow-2: 0 18px 48px rgba(0, 0, 0, .52);
  --ease: cubic-bezier(.22, .61, .36, 1);
  --felt-a: #17624a;
  --felt-b: #0a3527;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background:
    radial-gradient(1100px 640px at 50% -8%, #13251c 0%, transparent 62%),
    radial-gradient(800px 520px at 108% 106%, #101e18 0%, transparent 60%),
    var(--bg-0);
  color: var(--text);
  font: 15px/1.55 "Noto Sans SC", "PingFang SC", "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}
.hidden { display: none !important; }
.dim { color: var(--muted); }
b { font-weight: 650; }
input, button, select { font: inherit; color: inherit; }
::selection { background: rgba(216, 178, 106, .28); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: rgba(216, 178, 106, .18); border-radius: 8px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 衬线标题 ---------- */
.brand b, .section-head h2, .panel h3, .modalbox h3, .authhd, .result .big, .pot b, .wallet .amount {
  font-family: "Georgia", "Songti SC", "Noto Serif SC", "SimSun", serif;
  letter-spacing: .06em;
}

/* ---------- 控件 ---------- */
button {
  cursor: pointer;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .035);
  border-radius: 8px;
  padding: 11px 18px;
  min-height: 42px;
  color: var(--text);
  font-size: 14px;
  transition: background .16s var(--ease), border-color .16s var(--ease),
              transform .08s var(--ease), box-shadow .16s var(--ease);
}
button:hover { background: rgba(255, 255, 255, .07); border-color: var(--line-strong); }
button:active { transform: translateY(1px) scale(.995); }
button:disabled { opacity: .34; cursor: not-allowed; transform: none; }
button:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
button.primary {
  min-height: 44px;
  background: linear-gradient(180deg, #efd49a, #c69a4f);
  border-color: #f3dda9;
  color: #2a1e08;
  font-weight: 650;
  box-shadow: 0 4px 14px rgba(198, 154, 79, .28), inset 0 1px 0 rgba(255, 255, 255, .35);
}
button.primary:hover { background: linear-gradient(180deg, #f8e2b0, #d4a95e); }
button.ghost { background: transparent; }
button.ghost:hover { background: rgba(255, 255, 255, .05); }
button.small { padding: 6px 11px; font-size: 12.5px; border-radius: 9px; }
button.wide { flex: 1; }

input {
  background: rgba(0, 0, 0, .3);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 13px;
  outline: none;
  min-width: 0;
  transition: border-color .16s, box-shadow .16s;
}
input:focus { border-color: rgba(216, 178, 106, .5); box-shadow: 0 0 0 3px rgba(216, 178, 106, .09); }
input::placeholder { color: #64706a; }

/* ---------- 结构 ---------- */
.view { height: 100dvh; display: flex; flex-direction: column; }
.pip { color: var(--gold); }
.logo-mark { width: 22px; height: 22px; color: var(--gold); vertical-align: -5px; flex: none; }
.brand .logo-mark { width: 19px; height: 19px; opacity: .85; }
.authhd .logo-mark { width: 23px; height: 23px; }

/* ---------- 合规提示条 ---------- */
.legal-bar {
  padding: 6px 20px;
  font-size: 11.5px; letter-spacing: .04em; text-align: center;
  color: rgba(185, 196, 188, .72);
  background: rgba(216, 178, 106, .045);
  border-bottom: 1px solid rgba(216, 178, 106, .1);
}
@media (max-width: 780px) { .legal-bar { font-size: 10px; padding: 6px 10px; line-height: 1.5; } }

/* ---------- 大厅 ---------- */
.topbar {
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  background: linear-gradient(180deg, rgba(14, 22, 18, .92), rgba(8, 12, 10, .55));
  backdrop-filter: blur(10px);
  position: relative; z-index: 5;
}
.brand { display: flex; align-items: baseline; gap: 9px; }
.brand .pip { font-size: 21px; }
.brand b {
  font-size: 21px; letter-spacing: .26em; font-weight: 500;
  font-family: "Georgia", "Songti SC", "Noto Serif SC", serif;
}
.brand i { font-size: 10px; color: var(--muted); font-style: normal; letter-spacing: .18em; text-transform: uppercase; }

.wallet { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.wallet .label { font-size: 11px; color: var(--muted); letter-spacing: .12em; }
.wallet .amount {
  font: 600 22px/1 "Georgia", serif;
  color: var(--gold-soft);
  font-variant-numeric: tabular-nums;
  text-shadow: 0 2px 12px rgba(216, 178, 106, .25);
}
.topacts { display: flex; align-items: center; gap: 8px; }
.topacts .me { color: var(--muted); font-size: 13px; }

/* 旧布局保留但不再使用 */
.lobby-grid {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 340px;
  gap: 26px; padding: 24px 28px 30px;
}
.col-main { min-width: 0; display: flex; flex-direction: column; min-height: 0; }
.section-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.section-head h2 {
  margin: 0; font-size: 12px; letter-spacing: .2em; color: var(--muted);
  font-weight: 500; text-transform: uppercase;
}
.head-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.head-actions input { width: 108px; text-transform: uppercase; letter-spacing: .2em; text-align: center; }

.rooms {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 18px; align-content: start; padding: 4px 8px 4px 2px;
}
.room {
  position: relative;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  background: linear-gradient(155deg, #16231c 0%, #0c1411 72%);
  padding: 22px 24px 20px 26px;
  display: flex; flex-direction: column; gap: 14px;
  cursor: pointer; overflow: hidden; min-height: 132px;
  transition: transform .18s var(--ease), border-color .18s var(--ease), box-shadow .18s var(--ease);
}
.room::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 1px;
  background: linear-gradient(180deg, rgba(216,178,106,.55), rgba(216,178,106,.06));
}
.room::after {
  content: ""; position: absolute; left: 22px; top: 26px;
  width: 5px; height: 5px; transform: rotate(45deg);
  background: var(--gold); opacity: .5;
}
.room:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.room .rt { display: flex; align-items: center; gap: 9px; }
.room .rt b {
  font-size: 20px; letter-spacing: .06em; font-weight: 500;
  font-family: "Georgia", "Songti SC", "Noto Serif SC", serif;
  padding-left: 16px;
}
.room .tag {
  font-size: 11px; padding: 3px 8px; border-radius: 7px;
  border: 1px solid var(--line); color: var(--gold);
  background: rgba(216, 178, 106, .07); white-space: nowrap;
}
.room .tag.nocap { color: #e79072; border-color: rgba(231, 144, 114, .35); background: rgba(231, 144, 114, .08); }
.room .meta { display: flex; gap: 18px; font-size: 12px; color: var(--muted); letter-spacing: .04em; }
.room .state {
  font-size: 10.5px; letter-spacing: .22em; color: var(--gold);
  opacity: .55; text-align: right; margin-top: 2px;
}
.room .bar { height: 3px; border-radius: 3px; background: rgba(255, 255, 255, .06); overflow: hidden; }
.room .bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); transition: width .3s var(--ease); }
.room .go {
  margin-left: auto; color: var(--gold); font-size: 12px;
  opacity: .75; transition: opacity .16s, transform .16s;
}
.room:hover .go { opacity: 1; transform: translateX(2px); }
.empty { color: var(--muted); font-size: 13px; padding: 30px 6px; }

.col-side { display: flex; flex-direction: column; gap: 14px; min-height: 0; overflow-y: auto; padding-right: 2px; padding-bottom: 300px; }
.panel {
  position: relative;
  border: 1px solid rgba(216, 178, 106, .17);
  border-radius: var(--r-lg);
  background: linear-gradient(170deg, rgba(22, 34, 28, .9), rgba(11, 17, 14, .92));
  padding: 15px 16px;
}
.panel > .diamond, .panel::before, .panel::after {
  content: ""; position: absolute; width: 11px; height: 11px;
  border: 1px solid rgba(216, 178, 106, .5); pointer-events: none;
}
.panel::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.panel { position: relative; }
.panel > .diamond {
  position: absolute; left: 50%; top: -3px; width: 6px; height: 6px;
  transform: translateX(-50%) rotate(45deg);
  background: var(--gold); opacity: .55; pointer-events: none;
}
.panel::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }

details.panel.fold { padding: 0; }
details.panel.fold > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px;
  padding: 14px 16px; font-size: 11px; letter-spacing: .18em; color: var(--muted);
  font-weight: 500; text-transform: uppercase; transition: color .15s;
}
details.panel.fold > summary:hover { color: var(--gold-soft); }
details.panel.fold > summary::-webkit-details-marker { display: none; }
details.panel.fold > summary::after {
  content: "+"; margin-left: auto; color: var(--gold); font-size: 15px; line-height: 1; opacity: .85;
}
details.panel.fold[open] > summary::after { content: "\2212"; }
details.panel.fold[open] > summary { border-bottom: 1px solid var(--line); }
details.panel.fold > div, details.panel.fold > .row { margin: 12px 16px 0; }
details.panel.fold > :last-child { margin-bottom: 14px; }

.panel h3 {
  margin: 0 0 11px; font-size: 11px; letter-spacing: .18em;
  color: var(--muted); font-weight: 500; text-transform: uppercase;
  display: flex; align-items: center; gap: 8px;
}
.panel h3::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, var(--line), transparent); }
.panel .row { display: flex; gap: 8px; margin-top: 11px; }
.panel .row input { flex: 1; }
.list { display: flex; flex-direction: column; gap: 2px; max-height: 200px; overflow-y: auto; }
.item {
  display: flex; align-items: center; gap: 9px;
  font-size: 13px; padding: 7px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, .045);
}
.item:last-child { border-bottom: 0; }
.item .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .num { font-variant-numeric: tabular-nums; }
.item .up { color: var(--green-soft); }
.item .down { color: var(--red-soft); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: #46524c; flex: none; }
.dot.on { background: var(--green); box-shadow: 0 0 8px rgba(63, 168, 122, .8); }

/* ---------- 牌桌 ---------- */
.tablebar {
  display: flex; align-items: center; gap: 16px;
  padding: 10px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .04);
  background: rgba(9, 14, 11, .6);
  backdrop-filter: blur(8px);
  position: relative; z-index: 6;
}
.tinfo { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.tinfo b { font-size: 16px; }
.tcode { margin-left: auto; display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tcode b {
  font: 600 15px/1 "Georgia", serif; letter-spacing: .22em;
  color: var(--gold-soft); padding: 4px 8px;
  border: 1px solid var(--line); border-radius: 8px;
  background: rgba(216, 178, 106, .05);
}

.stage {
  flex: 1; min-height: 0;
  display: grid; grid-template-columns: minmax(0, 1fr) 372px;
  gap: 16px; padding: 16px 20px 14px;
}
.feltcol { flex: 1; min-width: 0; min-height: 0; display: flex; flex-direction: column; gap: 12px; }

.felt {
  flex: 1; min-height: 0; position: relative;
  border-radius: 46% / 50%;
  background:
    radial-gradient(ellipse at 50% 38%, #1d7a5b 0%, var(--felt-a) 32%, var(--felt-b) 76%, #051a13 100%);
  box-shadow:
    inset 0 0 0 2px rgba(216, 178, 106, .2),
    inset 0 0 110px rgba(0, 0, 0, .6),
    0 30px 70px rgba(0, 0, 0, .62);
  border: 12px solid #221a12;
  outline: 1px solid rgba(216, 178, 106, .22);
  outline-offset: 3px;
}
.felt::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background-image: radial-gradient(rgba(0, 0, 0, .2) 1px, transparent 1px);
  background-size: 4px 4px; opacity: .3; mix-blend-mode: multiply;
}
.felt-inner { position: absolute; inset: 0; }
.felt-inner::before {
  content: ""; position: absolute; left: 50%; top: 43%;
  width: 42%; aspect-ratio: 1; transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px solid rgba(216, 178, 106, .10);
  box-shadow: 0 0 0 14px rgba(216, 178, 106, .03), inset 0 0 60px rgba(216, 178, 106, .035);
  pointer-events: none;
}

.board-wrap {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  z-index: 3;
}
.pot {
  display: flex; align-items: baseline; gap: 8px;
  padding: 4px 14px; border-radius: 999px;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(216, 178, 106, .28);
  box-shadow: 0 4px 16px rgba(0, 0, 0, .35);
  font-variant-numeric: tabular-nums;
}
.pot .label { font-size: 10.5px; color: var(--gold); letter-spacing: .14em; }
.pot b { font: 600 17px/1.3 "Georgia", serif; color: var(--gold-soft); }
.board { display: flex; gap: 8px; }
.street { font-size: 10.5px; letter-spacing: .22em; color: rgba(255, 255, 255, .38); }

/* 座位 */
.seats { position: absolute; inset: 0; }
.seat {
  position: absolute; left: var(--x); top: var(--y);
  transform: translate(-50%, -50%);
  width: 124px;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  transition: opacity .25s var(--ease);
  z-index: 2;
}
.seat.folded { opacity: .38; }
.seat .avatar {
  width: 50px; height: 50px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 16px; font-weight: 600;
  background: linear-gradient(165deg, #2d473b, #142019);
  border: 2px solid rgba(216, 178, 106, .22);
  color: var(--gold-soft);
  position: relative;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .07);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.seat .avatar .ring {
  position: absolute; inset: -6px; border-radius: 50%;
  background: conic-gradient(var(--gold) calc(var(--p, 0) * 1%), transparent 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
  opacity: 0; transition: opacity .2s;
}
.seat.active .ring { opacity: 1; }
.seat.active .avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(216, 178, 106, .12), 0 0 26px rgba(216, 178, 106, .4);
}
.seat.ready .avatar { border-color: rgba(63, 168, 122, .75); box-shadow: 0 0 0 3px rgba(63, 168, 122, .14); }
.seat.ready .nm { color: var(--green-soft); }
.seat.winner .avatar { border-color: var(--green-soft); box-shadow: 0 0 0 4px rgba(127, 224, 178, .16), 0 0 30px rgba(127, 224, 178, .45); }
.seat .nm {
  font-size: 12px; max-width: 118px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--text-2); padding: 1px 7px; border-radius: 4px;
  background: rgba(6, 12, 9, .45); letter-spacing: .02em;
}
.seat .stk {
  font: 600 13px/1.4 "Georgia", serif; color: var(--gold-soft);
  font-variant-numeric: tabular-nums; letter-spacing: .02em;
}
.seat .hole { display: flex; gap: 2px; height: 0; opacity: 0; transition: height .22s var(--ease), opacity .22s; }
.seat.has-cards .hole { height: 35px; opacity: 1; }
.seat .bet {
  font: 600 11px/1 "Georgia", serif; color: #ffe9b0;
  background: rgba(6, 12, 9, .72);
  border: 1px solid rgba(216, 178, 106, .38);
  padding: 3px 8px; border-radius: 999px;
  margin-top: -6px; position: relative; z-index: 3;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
  font-variant-numeric: tabular-nums;
}
.seat .act { font-size: 11px; color: var(--gold); min-height: 15px; letter-spacing: .04em; }
.seat .tags { display: flex; gap: 3px; position: absolute; top: -10px; left: -6px; }
.seat .tags span {
  font-size: 9px; padding: 1px 5px; border-radius: 5px;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--line); color: var(--text-2);
}
.seat .tags .dealer { background: #efe6d2; color: #2a2012; border-color: #efe6d2; font-weight: 700; }
.seat .tags .off { color: #e07a5f; border-color: rgba(224, 122, 95, .4); }

/* 扑克牌 */
.card {
  width: 46px; height: 66px; border-radius: 5px;
  background: linear-gradient(158deg, #fffefb 0%, #f7f2e8 55%, #e9e0d1 100%);
  color: #1b1a22; position: relative; overflow: hidden;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .45), inset 0 0 0 1px rgba(0, 0, 0, .07);
  user-select: none; flex: none;
}
.card .rk {
  position: absolute; left: 4px; top: 2px;
  font: 700 17px/1.05 "Georgia", "Times New Roman", serif;
  letter-spacing: -.02em;
}
.card .big {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -46%);
  font-size: 27px; line-height: 1; opacity: .9;
}
.card.red { color: #c0392b; }
.card.red .big { color: #c0392b; }
.card.back {
  background:
    repeating-linear-gradient(45deg, rgba(255, 255, 255, .06) 0 3px, transparent 3px 6px),
    linear-gradient(150deg, #23364d, #152538 60%, #0e1b29);
  box-shadow: inset 0 0 0 2px #0b1826, 0 2px 7px rgba(0, 0, 0, .5);
}
.card.back::after { content: ""; position: absolute; inset: 5px; border: 1px solid rgba(216, 178, 106, .4); border-radius: 3px; }
.card.slot { background: rgba(255, 255, 255, .035); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.card.small { width: 27px; height: 38px; border-radius: 3.5px; }
.card.small .rk { font-size: 10px; left: 2.5px; top: 1.5px; }
.card.small .big { font-size: 15px; left: 50%; top: 54%; transform: translate(-50%, -50%); }
.card.flip { animation: flipIn .34s var(--ease); }
@keyframes flipIn {
  0% { transform: rotateY(88deg) scale(.94); opacity: 0; }
  100% { transform: rotateY(0) scale(1); opacity: 1; }
}
.card.win { box-shadow: 0 0 0 2px var(--green-soft), 0 0 22px rgba(127, 224, 178, .55); }

/* 结算条 */
.result {
  position: absolute; left: 50%; top: 58%; transform: translate(-50%, -50%);
  z-index: 5; text-align: center;
  padding: 12px 26px; border-radius: var(--r-md);
  background: rgba(4, 10, 8, .86);
  border: 1px solid rgba(216, 178, 106, .34);
  box-shadow: var(--shadow-2);
  backdrop-filter: blur(6px);
  animation: pop .3s var(--ease);
}
@keyframes pop { from { transform: translate(-50%, -50%) scale(.92); opacity: 0; } }
.result .big { font: 700 21px/1.3 "Georgia", serif; color: var(--gold-soft); }
.result .sm { font-size: 12px; color: var(--muted); margin-top: 4px; }

/* 底部操作台 */
.hud {
  display: grid; grid-template-columns: auto minmax(0, 1fr);
  gap: 20px; align-items: center;
  padding: 12px 18px;
  border-radius: var(--r-lg);
  background: linear-gradient(180deg, rgba(20, 30, 25, .9), rgba(9, 14, 11, .96));
  border: 1px solid var(--line);
  box-shadow: 0 -10px 34px rgba(0, 0, 0, .42), inset 0 1px 0 rgba(255, 255, 255, .04);
}
.mycards { display: flex; align-items: center; gap: 12px; }
.mycards .cards { display: flex; gap: 5px; }
.mycards .cards .card { width: 50px; height: 72px; }
.mycards .cards .card .rk { font-size: 19px; }
.mycards .cards .card .big { font-size: 30px; }
.myhand { font-size: 12px; color: var(--gold); letter-spacing: .04em; }

.actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.actions > .btn-fold { margin-right: auto; }
.actions > .btn-fold ~ * { flex: 0 0 auto; }
.actions .hint { color: var(--muted); font-size: 13px; }
.actions > button { min-width: 104px; min-height: 54px; padding: 14px 20px; font-size: 15px; border-radius: 12px; }
.btn-fold { border-color: rgba(209, 84, 74, .45); color: var(--red-soft); background: rgba(209, 84, 74, .07); }
.btn-fold:hover { background: rgba(209, 84, 74, .14); border-color: rgba(209, 84, 74, .7); }
.btn-call { border-color: rgba(63, 168, 122, .45); color: var(--green-soft); background: rgba(63, 168, 122, .08); }
.btn-call:hover { background: rgba(63, 168, 122, .16); border-color: rgba(63, 168, 122, .7); }
.btn-raise {
  border-color: rgba(216, 178, 106, .5); color: #2a1e08;
  background: linear-gradient(180deg, #efd49a, #c69a4f);
  border-radius: var(--r-md); font-weight: 650;
  box-shadow: 0 4px 14px rgba(198, 154, 79, .25);
}
.btn-raise:hover { background: linear-gradient(180deg, #f8e2b0, #d4a95e); }
.actions .raise { display: flex; align-items: center; gap: 8px; }
.actions .raise input {
  width: 104px; text-align: center;
  font-variant-numeric: tabular-nums; font-size: 15px; padding: 11px 8px;
}
.actions .mix { display: flex; gap: 5px; }
.actions .mix button { min-width: 0; padding: 9px 10px; font-size: 12px; border-radius: 9px; }

/* 荷官 */
.dealercol { position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 2px; }
.dealercol .bubble { position: absolute; left: 0; right: 0; bottom: 78.5%; margin: 0 0 6px; z-index: 3; font-size: 13px; line-height: 1.65; padding: 12px 16px; opacity: 0; transform: translateY(4px); transition: opacity .35s var(--ease), transform .35s var(--ease); pointer-events: none; }
.dealercol .bubble.on { opacity: 1; transform: none; }
.dealercol .bubble::after { left: 50%; right: auto; margin-left: -5.5px; bottom: -6px; }
.bubble {
  position: relative;
  background: linear-gradient(170deg, rgba(24, 38, 30, .97), rgba(11, 19, 14, .97));
  border: 1px solid var(--line-strong);
  border-radius: 16px 16px 16px 14px;
  padding: 11px 15px; font-size: 12.5px; color: #e6efe9;
  margin-bottom: 12px; line-height: 1.6;
  min-height: 52px; box-shadow: var(--shadow-1);
  animation: bubbleIn .26s var(--ease);
}
/* 指向人物的小尾巴 */
.bubble::after {
  content: ""; position: absolute; right: 26px; bottom: -6px;
  width: 11px; height: 11px;
  background: linear-gradient(135deg, rgba(20, 32, 26, .97), rgba(14, 24, 18, .97));
  border-right: 1px solid var(--line-strong);
  border-bottom: 1px solid var(--line-strong);
  transform: rotate(45deg);
  border-radius: 0 0 3px 0;
}
@keyframes bubbleIn {
  0% { opacity: 0; transform: translateY(6px) scale(.97); }
  100% { opacity: 1; transform: none; }
}
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } }
.dealer-name { text-align: center; font-size: 10.5px; letter-spacing: .24em; color: var(--muted); margin-top: -4px; }

/* ---------- Live2D ---------- */
.l2d-host { position: relative; width: 100%; height: 100%; min-height: 0; }
.l2d-stage { position: absolute; inset: 0; overflow: hidden; }
.l2d-canvas { width: 100%; height: 100%; display: block; touch-action: manipulation; }
.l2d-fallback { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 12px; letter-spacing: .1em; }
.dealer-frame { flex: 1; min-height: 0; position: relative; }

.lobby-dealer { position: fixed; right: 14px; bottom: 10px; width: 320px; height: 448px; z-index: 30; pointer-events: none; }
.lobby-slot { width: 100%; height: 100%; pointer-events: auto; }
.lobby-dealer .bubble.small {
  position: absolute; left: -40px; right: 6px; top: auto; bottom: 93%;
  font-size: 12px; min-height: 0; padding: 8px 12px;
  opacity: 0; transition: opacity .25s; pointer-events: none; z-index: 2;
}
.lobby-dealer .bubble.small.on { opacity: 1; }

.disclaimer {
  position: fixed; left: 20px; bottom: 12px; z-index: 25;
  max-width: 44vw; font-size: 10.5px; line-height: 1.5;
  color: rgba(127, 141, 133, .7); letter-spacing: .02em; pointer-events: none;
}

/* ---------- 聊天 ---------- */
.chatdock { position: fixed; left: 18px; bottom: 112px; z-index: 40; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.chat-toggle { background: rgba(12, 20, 16, .94); border-color: var(--line); backdrop-filter: blur(8px); box-shadow: var(--shadow-1); }
.chatpanel {
  width: 272px; height: 320px; display: flex; flex-direction: column;
  background: rgba(8, 14, 11, .97);
  border: 1px solid var(--line); border-radius: var(--r-md);
  overflow: hidden; box-shadow: var(--shadow-2);
}
.chatlog { flex: 1; overflow-y: auto; padding: 12px; font-size: 12.5px; display: flex; flex-direction: column; gap: 6px; }
.chatlog .m { line-height: 1.5; word-break: break-word; color: var(--text-2); }
.chatlog .who { color: var(--gold); }
.chatinput { display: flex; gap: 6px; padding: 9px; border-top: 1px solid var(--line); }
.chatinput input { flex: 1; padding: 7px 10px; font-size: 12.5px; }

/* 私聊 */
.dmlog { height: 320px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; padding: 4px 2px; }
.dm { display: flex; flex-direction: column; gap: 2px; max-width: 84%; }
.dm .who { font-size: 10.5px; color: var(--muted); letter-spacing: .08em; }
.dm .txt { background: rgba(255,255,255,.05); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; font-size: 13px; line-height: 1.6; }
.dm.me { align-self: flex-end; align-items: flex-end; }
.dm.me .txt { background: rgba(216,178,106,.12); border-color: rgba(216,178,106,.3); }
.link { cursor: pointer; }
.link:hover { color: var(--gold-soft); }

/* ---------- 弹层 ---------- */
.overlay {
  position: fixed; inset: 0; z-index: 60;
  background: rgba(3, 6, 5, .8);
  backdrop-filter: blur(7px);
  display: grid; place-items: center; padding: 20px;
}
.authbox {
  width: min(404px, 100%);
  background: linear-gradient(170deg, #16231c, #0a100d);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 28px 27px 24px; box-shadow: var(--shadow-2);
  display: flex; flex-direction: column; gap: 11px;
}
.authhd { font-size: 21px; font-weight: 600; letter-spacing: .08em; display: flex; align-items: center; gap: 9px; }
.authbox p { margin: 0 0 6px; font-size: 12.5px; }
.authbtns { display: flex; gap: 10px; margin-top: 4px; }
.err { color: var(--red-soft); font-size: 12.5px; min-height: 18px; }

.modalbox {
  width: min(480px, 100%); max-height: 86vh; overflow-y: auto;
  background: linear-gradient(170deg, #16231c, #0a100d);
  border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: 24px; box-shadow: var(--shadow-2);
  animation: popModal .22s var(--ease);
}
@keyframes popModal { from { transform: scale(.96); opacity: 0; } }
.modalbox h3 { margin: 0 0 16px; font-size: 17px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 15px; }
.field > label { font-size: 11.5px; color: var(--muted); letter-spacing: .1em; }
.types { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.type {
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 11px 12px;
  cursor: pointer; background: rgba(255, 255, 255, .02);
  transition: border-color .15s, background .15s;
}
.type:hover { border-color: var(--line-strong); }
.type.on { border-color: var(--gold); background: rgba(216, 178, 106, .1); }
.type b { display: block; font-size: 13.5px; }
.type span { font-size: 11.5px; color: var(--muted); }
.modalfoot { display: flex; gap: 10px; margin-top: 18px; }
.modalfoot button { flex: 1; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translate(-50%, 16px);
  background: rgba(12, 20, 16, .97); border: 1px solid var(--line-strong);
  padding: 11px 20px; border-radius: var(--r-sm);
  font-size: 13px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 90;
  box-shadow: var(--shadow-2); max-width: 86vw; text-align: center;
}
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* 规则 / 记录 */
.rules { max-height: 56vh; overflow-y: auto; padding-right: 4px; }
.rules details { border-bottom: 1px solid var(--line); padding: 8px 0; }
.rules summary { cursor: pointer; font-size: 13.5px; color: var(--gold-soft); padding: 4px 0; list-style: none; font-weight: 550; }
.rules summary::-webkit-details-marker { display: none; }
.rules summary::before { content: "▸ "; color: var(--gold); }
.rules details[open] summary::before { content: "▾ "; }
.rules p { font-size: 12.5px; line-height: 1.85; color: #c6d0c9; margin: 8px 0; }
.rules .ranks { margin: 6px 0 0; padding-left: 16px; font-size: 12.5px; }
.rules .ranks li { margin: 7px 0; display: flex; gap: 9px; }
.rules .ranks b { color: var(--gold-soft); min-width: 76px; font-weight: 600; }
.rules .ranks span { color: var(--muted); }

.loglist { max-height: 52vh; overflow-y: auto; font-size: 12.5px; }
.logrow { display: flex; gap: 10px; padding: 7px 0; align-items: baseline; border-bottom: 1px dashed rgba(255, 255, 255, .06); }
.logrow .dim { width: 56px; flex: none; font-size: 11.5px; }
.logrow b { min-width: 64px; flex: none; font-weight: 500; }
.logrow span:last-child { color: var(--text-2); }

/* ---------- 平板 ---------- */
@media (max-width: 1180px) {
  .stage { grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; }
  .lobby-grid { grid-template-columns: minmax(0, 1fr) 290px; gap: 16px; }
  .mycards .cards .card { width: 44px; height: 64px; }
  .actions > button { min-width: 80px; padding: 11px 13px; font-size: 13.5px; }
}
@media (max-width: 980px) {
  .lobby-grid { grid-template-columns: minmax(0, 1fr); }
  .col-side { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .lobby-dealer { width: 260px; height: 364px; }
}

/* ---------- 手机竖屏 ---------- */
@media (max-width: 780px) {
  body { font-size: 14px; }

  .topbar { padding: 10px 12px; gap: 10px; }
  .brand .pip { font-size: 18px; }
  .brand b { font-size: 15px; letter-spacing: .06em; }
  .brand i, .topacts .me { display: none; }
  .wallet { gap: 6px; }
  .wallet .label { display: none; }
  .wallet .amount { font-size: 18px; }
  .topacts { gap: 5px; }
  .topacts button { padding: 5px 9px; font-size: 11.5px; }

  .lobby-grid { padding: 12px 12px 84px; gap: 12px; }
  .section-head { flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
  .section-head h2 { font-size: 11px; }
  .head-actions { margin-left: 0; width: 100%; }
  .head-actions input { flex: 1; }
  .rooms { grid-template-columns: 1fr; gap: 10px; }
  .room { padding: 14px 15px 12px 19px; border-radius: var(--r-md); }
  .room .rt b { font-size: 15px; }
  .col-side { grid-template-columns: 1fr; }
  .lobby-dealer { width: 196px; height: 276px; right: 2px; bottom: 52px; opacity: .97; }
  .lobby-dealer .bubble.small { left: -104px; font-size: 11px; }
  .disclaimer { max-width: 58vw; font-size: 9.5px; left: 12px; bottom: 8px; }

  .tablebar { padding: 7px 10px; gap: 8px; }
  .tablebar #btnBack { padding: 6px 9px; font-size: 12px; }
  .tablebar .tinfo b { font-size: 13px; max-width: 96px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .tablebar #tMeta { display: none; }
  .tablebar .tcode .label { display: none; }
  .tablebar .tcode { gap: 6px; }
  .tablebar .tcode b { font-size: 12px; letter-spacing: .12em; padding: 3px 6px; }
  .tablebar #btnRules, .tablebar #btnCopy { padding: 5px 8px; font-size: 11px; }

  .stage { display: flex; flex-direction: column; padding: 6px 8px 6px; gap: 6px; }
  .feltcol { gap: 6px; }
  .felt { flex: 1 1 auto; min-height: 0; border-radius: 48% / 42%; border-width: 7px; outline-offset: 2px; }
  .board-wrap { top: 40%; gap: 7px; }
  .board { gap: 4px; }
  .board .card { width: 40px; height: 57px; }
  .board .card .rk { font-size: 14px; }
  .board .card .big { font-size: 21px; }
  .pot { padding: 3px 12px; }
  .pot b { font-size: 15px; }
  .street { font-size: 10px; }

  .seat { width: 76px; gap: 1px; }
  .seat .avatar { width: 34px; height: 34px; font-size: 12px; border-width: 1.5px; }
  .seat .nm { font-size: 10px; max-width: 72px; }
  .seat .stk { font-size: 10.5px; }
  .seat .act { font-size: 10px; min-height: 12px; }
  .seat .bet { padding: 2px 7px; font-size: 10px; }
  .card.small { width: 19px; height: 27px; border-radius: 3px; }
  .card.small .rk { font-size: 8px; left: 2px; top: 1px; }
  .card.small .big { font-size: 11px; }
  .seat .tags span { font-size: 8px; padding: 0 3px; }

  .hud {
    display: grid; grid-template-columns: auto minmax(0, 1fr);
    gap: 10px; align-items: end;
    padding: 10px 12px 12px; border-radius: var(--r-md);
  }
  .mycards { flex-direction: column; align-items: flex-start; gap: 4px; }
  .mycards .cards .card { width: 42px; height: 58px; }
  .mycards .cards .card .rk { font-size: 15px; }
  .mycards .cards .card .big { font-size: 22px; }
  .myhand { font-size: 10.5px; }

  .actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; width: 100%; }
  .actions > button { min-width: 0; min-height: 52px; padding: 14px 4px; font-size: 14.5px; border-radius: 12px; }
  .actions .hint { grid-column: 1 / -1; text-align: center; font-size: 11.5px; }
  .actions .raise { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; align-items: center; }
  .actions .raise input { width: 100%; padding: 11px 8px; }
  .actions .raise .mix { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .actions .raise .mix button { min-width: 0; padding: 7px 0; font-size: 11.5px; }

  .dealercol {
    position: fixed; right: 0; bottom: 146px;
    width: 124px; height: 182px; z-index: 8;
    padding: 0; opacity: .97; pointer-events: none;
  }
  .dealercol .dealer-name { display: none; }
  .dealercol .bubble {
    display: block; left: auto; right: 0; bottom: 100%;
    max-width: 200px; font-size: 11px; padding: 8px 11px; margin-bottom: 6px;
    border-radius: 12px;
  }
  .dealercol .bubble::after { right: 18px; }
  .dealercol .dealer-frame { pointer-events: auto; }

  .chatdock { left: 8px; top: 92px; bottom: auto; }
  .chat-toggle { padding: 8px 13px; font-size: 12px; border-radius: 999px; }
  .chatpanel { left: 8px; right: 8px; bottom: 8px; width: auto; height: 46vh; z-index: 46; }
}

@media (max-width: 420px) {
  .seat { width: 68px; }
  .seat .avatar { width: 30px; height: 30px; font-size: 11px; }
  .seat .nm { font-size: 9.5px; max-width: 64px; }
  .board .card { width: 34px; height: 49px; }
  .board .card .rk { font-size: 12px; }
  .board .card .big { font-size: 18px; }
  .mycards .cards .card { width: 38px; height: 53px; }
  .actions > button { padding: 12px 2px; font-size: 13px; }
}




/* ===== 按钮尺寸系统 ===== */
/* 三档高度：常规 44 / 主行动 54 / 次级 32；宽度按内容 + 最小宽度 */
:root {
  --btn-h: 44px;
  --btn-h-lg: 54px;
  --btn-h-sm: 32px;
  --btn-pad: 18px;
  --btn-pad-sm: 12px;
}
button {
  min-height: var(--btn-h);
  min-width: 88px;
  padding: 0 var(--btn-pad);
  display: inline-flex; align-items: center; justify-content: center;
  line-height: 1;
}
button.small { min-height: var(--btn-h-sm); min-width: 56px; padding: 0 var(--btn-pad-sm); font-size: 12.5px; }
button.primary { min-height: var(--btn-h); }

/* 牌桌操作区：左右两组，等宽等高 */
.actions { display: flex; align-items: center; gap: 10px; }
.actions > button {
  flex: 0 0 auto; min-width: 108px; min-height: var(--btn-h-lg);
  font-size: 15px; padding: 0 22px;
}
.actions > .btn-fold { margin-right: auto; }
.actions .raise { display: flex; align-items: center; gap: 10px; }
.actions .raise input { min-height: var(--btn-h-lg); width: 112px; }
.actions .raise .mix { display: flex; gap: 6px; }
.actions .raise .mix button { min-width: 64px; min-height: 38px; padding: 0 12px; font-size: 12px; }

/* 大厅快捷区 */
.quick-join input, .quick-join button, .quickbar .primary { min-height: 52px; }
.quick-join button { min-width: 92px; }
.quickbar .primary { min-width: 168px; }

/* 手机端：两列网格，所有按钮等宽 */
@media (max-width: 780px) {
  :root { --btn-h: 48px; --btn-h-lg: 52px; --btn-h-sm: 34px; }
  .actions {
    display: grid; grid-template-columns: 1fr 1fr; gap: 8px; width: 100%;
  }
  .actions > button {
    width: 100%; min-width: 0; min-height: var(--btn-h-lg);
    padding: 0 8px; font-size: 14.5px; margin: 0;
  }
  .actions > .btn-fold { margin-right: 0; }
  .actions .raise {
    grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 8px;
  }
  .actions .raise input { width: 100%; min-height: 48px; }
  .actions .raise .mix { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .actions .raise .mix button { width: 100%; min-width: 0; min-height: 40px; }
  .actions .hint { grid-column: 1 / -1; text-align: center; }
}


/* ============================================================
   大厅：牌桌为主 + 浮动看板娘 + 「我的」抽屉
   ============================================================ */
.lobby-stage {
  flex: 1; min-height: 0;
  display: flex; flex-direction: column; gap: 14px;
  padding: 18px 26px 34px;
}
.quickbar { display: flex; align-items: center; gap: 12px; }
.quick-join { display: flex; gap: 8px; }
.quick-join input {
  width: 132px; text-align: center; letter-spacing: .24em; min-height: 52px;
  font-family: "Georgia", serif;
}
.quick-join button { min-height: 52px; padding: 0 20px; }
.quickbar .primary {
  margin-left: auto; min-width: 168px; min-height: 52px;
  font-size: 15px; letter-spacing: .22em;
  font-family: "Georgia", "Songti SC", serif;
}
.list-head h2 { margin: 0; font-size: 11px; letter-spacing: .26em; color: var(--muted); font-weight: 500; }

.rooms {
  flex: 1; min-height: 0; overflow-y: auto;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px; align-content: start;
  padding: 2px 300px 2px 2px;
}

/* 浮动的看板娘 */
.mascot {
  position: fixed; right: 6px; bottom: 0; width: 300px; height: 468px;
  z-index: 18; pointer-events: none;
}
.mascot .l2d-stage { pointer-events: auto; }
.mascot::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 90px;
  background: linear-gradient(180deg, transparent, var(--bg-0) 82%);
  pointer-events: none;
}
.mascot-bubble {
  position: fixed; right: 20px; bottom: 430px; width: 262px; margin: 0;
  opacity: 0; transform: translateY(4px);
  transition: opacity .35s var(--ease), transform .35s var(--ease);
  pointer-events: none; z-index: 19;
}
.mascot-bubble.on { opacity: 1; transform: none; }
.mascot-bubble::after { left: auto; right: 70px; }

/* 「我的」抽屉 */
.drawer { position: fixed; inset: 0; z-index: 55; }
.drawer-bg { position: absolute; inset: 0; background: rgba(4, 4, 3, .62); backdrop-filter: blur(3px); }
.drawer-panel {
  position: absolute; right: 0; top: 0; bottom: 0; width: min(400px, 92vw);
  background: linear-gradient(180deg, #17150f, #0d0c09);
  border-left: 1px solid rgba(233, 223, 199, .14);
  display: flex; flex-direction: column;
  box-shadow: -20px 0 50px rgba(0, 0, 0, .55);
  animation: drawerIn .28s var(--ease);
}
@keyframes drawerIn { from { transform: translateX(24px); opacity: 0; } }
.drawer-head {
  display: flex; align-items: center; gap: 12px; padding: 16px 18px;
  border-bottom: 1px solid rgba(233, 223, 199, .1);
}
.drawer-head h3 { margin: 0; font-size: 15px; letter-spacing: .3em; color: var(--gold-soft); font-weight: 400; }
.drawer-head button { margin-left: auto; }
.drawer-body { flex: 1; min-height: 0; overflow-y: auto; padding: 14px; display: flex; flex-direction: column; gap: 12px; }

/* ============================================================
   1999 档案卡：直角 + 双线框 + 角标
   ============================================================ */
.room {
  position: relative; min-height: 136px; padding: 20px 22px 16px 24px;
  border: 1px solid rgba(233, 223, 199, .18);
  border-radius: 2px;
  background: linear-gradient(160deg, #1a1812 0%, #100f0b 76%);
  display: flex; flex-direction: column; gap: 12px;
  cursor: pointer; overflow: hidden;
  transition: border-color .16s var(--ease), background .16s var(--ease);
}
.room::before {
  content: ""; position: absolute; inset: 3px; border: 1px solid rgba(233, 223, 199, .07);
  pointer-events: none;
}
.room::after {
  content: ""; position: absolute; left: 24px; top: 0; width: 1px; height: 14px;
  background: rgba(201, 168, 106, .55);
}
.room:hover { border-color: rgba(201, 168, 106, .5); background: linear-gradient(160deg, #201d15 0%, #12110c 76%); }
.room .rt b { font-size: 19px; letter-spacing: .1em; font-weight: 400; color: #efe4c8;
  font-family: "Georgia", "Songti SC", serif; }
.room .tag {
  font-size: 10px; letter-spacing: .16em; padding: 3px 8px; border-radius: 1px;
  border: 1px solid rgba(201, 168, 106, .3); color: var(--gold); background: transparent;
}
.room .meta { font-size: 11.5px; letter-spacing: .06em; color: #8b8272; gap: 16px; }
.room .bar { height: 1px; background: rgba(233, 223, 199, .1); }
.room .bar i { background: linear-gradient(90deg, rgba(201,168,106,.25), var(--gold)); }
.room .state { font-size: 10px; letter-spacing: .26em; color: var(--gold); opacity: .55; text-align: right; }
.room .go { letter-spacing: .1em; font-size: 11px; }

/* 按钮：直角、细线、主按钮黄铜 */
button { border-radius: 2px; }
button.primary {
  background: linear-gradient(180deg, #dcc08a, #b8934f);
  border-color: #e6cfa0; color: #14110a;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22);
}

/* ============================================================
   手机端：整页可滚，卡片不再被裁掉
   ============================================================ */
@media (max-width: 980px) {
  #lobby { height: 100dvh; overflow-y: auto; display: block; -webkit-overflow-scrolling: touch; }
  .lobby-stage { padding: 12px 16px 190px; }
  .rooms { overflow: visible; padding-right: 2px; }
  .mascot { width: 200px; height: 312px; right: 0; opacity: .96; }
  .mascot::after { height: 60px; }
  .mascot-bubble { right: 10px; bottom: 350px; width: 210px; }
}
@media (max-width: 780px) {
  .lobby-stage { padding: 10px 12px 200px; gap: 10px; }
  .quickbar { flex-wrap: wrap; gap: 8px; }
  .quick-join { flex: 1 1 auto; }
  .quick-join input { width: 100%; }
  .quickbar .primary { flex: 1 1 100%; margin-left: 0; min-height: 48px; }
  .rooms { grid-template-columns: 1fr; }
  .room { min-height: 124px; padding: 16px 18px 14px 20px; }
  .mascot { width: 148px; height: 232px; }
  .mascot-bubble { right: 8px; bottom: 258px; width: 186px; font-size: 11px; }
}


/* 私聊面板 */
.dmlog {
  height: 360px; overflow-y: auto; display: flex; flex-direction: column; gap: 10px;
  padding: 14px 12px; border-radius: 2px;
  background:
    linear-gradient(180deg, rgba(0,0,0,.28), rgba(0,0,0,.12)),
    repeating-linear-gradient(0deg, rgba(233,223,199,.02) 0 1px, transparent 1px 26px);
  border: 1px solid rgba(233, 223, 199, .1);
}
.dm { display: flex; flex-direction: column; gap: 3px; max-width: 82%; }
.dm .who { font-size: 10px; color: #83795f; letter-spacing: .18em; }
.dm .txt {
  background: rgba(233, 223, 199, .045); border: 1px solid rgba(233, 223, 199, .12);
  padding: 9px 13px; font-size: 13px; line-height: 1.7; border-radius: 2px;
}
.dm.me { align-self: flex-end; align-items: flex-end; }
.dm.me .txt { background: rgba(201, 168, 106, .13); border-color: rgba(201, 168, 106, .34); color: #f0e3c6; }
.dm-empty { margin: auto; text-align: center; color: #6f6656; font-size: 12px; letter-spacing: .2em; }


/* 私聊面板：日志与输入区同宽同边 */
.dm-wrap {
  display: flex; flex-direction: column;
  border: 1px solid rgba(233, 223, 199, .14);
  background: rgba(0, 0, 0, .22);
}
.dm-wrap .dmlog {
  height: 340px; flex: none; border: 0; border-radius: 0; padding: 14px 16px;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, .2), rgba(0, 0, 0, .06)),
    repeating-linear-gradient(0deg, rgba(233, 223, 199, .022) 0 1px, transparent 1px 26px);
}
.dm-compose {
  display: grid; grid-template-columns: minmax(0, 1fr) 104px; gap: 8px;
  padding: 12px 16px; border-top: 1px solid rgba(233, 223, 199, .12);
  background: rgba(0, 0, 0, .28);
}
.dm-compose input { width: 100%; min-height: 42px; }
.dm-compose button { min-height: 42px; width: 100%; }


/* ============================================================
   牌桌：座位铭牌化
   ============================================================ */
.seat {
  border-radius: 3px;
  padding: 6px 8px 4px;
  background: linear-gradient(180deg, rgba(6, 14, 10, .30), rgba(6, 14, 10, .12));
  border: 1px solid rgba(233, 223, 199, .07);
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.seat.mine { border-color: rgba(201, 168, 106, .28); }
.seat.active {
  border-color: rgba(216, 178, 106, .62);
  background: linear-gradient(180deg, rgba(60, 46, 20, .40), rgba(18, 26, 20, .20));
}
.seat.folded { opacity: .48; }

/* 标签收进头像右上角，缩小、直角 */
.seat .tags {
  position: absolute; top: -6px; right: -6px; left: auto;
  display: flex; gap: 2px; z-index: 3;
}
.seat .tags span {
  font-size: 8.5px; line-height: 1.5; padding: 0 4px;
  border-radius: 1px; letter-spacing: .04em;
  background: rgba(8, 12, 9, .92); border: 1px solid rgba(233, 223, 199, .2);
  color: #b9ae95;
}
.seat .tags .dealer { background: #e9dfc7; color: #1a1710; border-color: #e9dfc7; font-weight: 600; }
.seat .tags .off { color: #d98b76; border-color: rgba(217, 139, 118, .45); }

/* 名字与积分：一行铭牌 */
.seat .nm {
  font-size: 11.5px; letter-spacing: .06em; padding: 1px 6px;
  border-radius: 1px; background: rgba(4, 9, 6, .55);
  max-width: 112px;
}
.seat .stk {
  font: 600 12.5px/1.5 "Georgia", serif; color: var(--gold-soft);
  letter-spacing: .04em;
}

/* 底池信息带 */
.pot {
  border-radius: 2px;
  border: 1px solid rgba(201, 168, 106, .26);
  background: linear-gradient(180deg, rgba(14, 22, 17, .86), rgba(7, 12, 9, .92));
  padding: 5px 16px;
  letter-spacing: .12em;
}
.pot b {
  font-family: "Georgia", serif; letter-spacing: .04em;
  color: var(--gold-soft); font-size: 17px;
}

/* 操作区：主次分明 */
.actions > .btn-fold { color: #c9a19a; border-color: rgba(181, 84, 75, .34); }
.actions > .btn-fold:hover { background: rgba(181, 84, 75, .12); }
.actions .raise input {
  border-radius: 2px; letter-spacing: .1em;
  font-family: "Georgia", serif; text-align: center;
}


/* ===== 信息带：底池 · 公共牌 · 街数 ===== */
.board-wrap {
  display: flex; flex-direction: row; align-items: center; gap: 0;
  padding: 12px 20px;
  border: 1px solid rgba(233, 223, 199, .1);
  background: linear-gradient(180deg, rgba(7, 15, 11, .62), rgba(4, 9, 7, .42));
  border-radius: 2px;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .3);
}
.board-wrap::before, .board-wrap::after {
  content: ""; position: absolute; width: 10px; height: 10px;
  border: 1px solid rgba(201, 168, 106, .42); pointer-events: none;
}
.board-wrap::before { left: -1px; top: -1px; border-right: 0; border-bottom: 0; }
.board-wrap::after { right: -1px; bottom: -1px; border-left: 0; border-top: 0; }
.board-wrap { position: absolute; }

.pot {
  border: 0; background: transparent; box-shadow: none; padding: 0;
  border-radius: 0; margin-right: 18px;
}
.pot .label { font-size: 10px; letter-spacing: .24em; color: #9d937c; }
.pot b { font-size: 18px; }

.board { padding-left: 18px; border-left: 1px solid rgba(233, 223, 199, .12); }
.street {
  padding-left: 18px; border-left: 1px solid rgba(233, 223, 199, .12);
  font-size: 10px; letter-spacing: .26em; color: #8b8272;
}

@media (max-width: 780px) {
  .board-wrap { padding: 9px 12px; max-width: calc(100vw - 24px); }
  .pot { margin-right: 10px; }
  .pot b { font-size: 15px; }
  .board { padding-left: 10px; gap: 5px; }
  .street { display: none; }
}

/* ===== 私聊：信笺装饰 ===== */
.dm-wrap { position: relative; }
.dm-wrap::before {
  content: ""; position: absolute; left: 50%; top: -3px;
  width: 6px; height: 6px; transform: translateX(-50%) rotate(45deg);
  background: var(--gold); opacity: .55; pointer-events: none; z-index: 2;
}
.dm-wrap .dmlog {
  background-image:
    linear-gradient(90deg, transparent 0 41px, rgba(201, 168, 106, .10) 41px 42px, transparent 42px),
    repeating-linear-gradient(0deg, rgba(233, 223, 199, .02) 0 1px, transparent 1px 26px);
}
.dm-compose { border-top: 1px solid rgba(233, 223, 199, .12); }


/* 座位：去掉整块底板，只保留名字铭牌与头像高亮 */
.seat {
  background: none; border: 1px solid transparent; padding: 0;
}
.seat.mine { border-color: transparent; }
.seat.active { border-color: transparent; background: none; }
.seat.active .face {
  box-shadow: 0 0 0 2px rgba(216, 178, 106, .75), 0 6px 18px rgba(0, 0, 0, .45);
}
.seat.folded { opacity: .42; }
.seat .face { transition: box-shadow .18s var(--ease); }


/* 复选框 */
input[type="checkbox"] {
  width: 15px; height: 15px; min-height: 0; padding: 0;
  margin: 0 7px 0 0; vertical-align: -2px;
  accent-color: #c9a86a; cursor: pointer;
  border-radius: 2px;
}

.room .tag.priv { color: #d7b26a; border-color: rgba(215, 178, 106, .45); }


/* 头像 */
.seat .face.has-img, .me-av.has-img {
  background-size: cover; background-position: center 30%;
  color: transparent; text-shadow: none;
}
.me-card {
  display: flex; align-items: center; gap: 12px;
  padding: 12px; border: 1px solid rgba(233, 223, 199, .12);
  background: linear-gradient(180deg, rgba(26, 24, 18, .9), rgba(14, 13, 10, .95));
}
.me-av {
  width: 52px; height: 52px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: rgba(201, 168, 106, .18);
  border: 1px solid rgba(201, 168, 106, .35);
  font-family: "Georgia", serif; font-size: 20px; color: var(--gold-soft);
}
.me-meta { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.me-meta b { font-size: 14px; font-weight: 500; color: #ecdfc2; }
.me-meta span { font-size: 11.5px; }
.me-card button { margin-left: auto; }


/* ===== 平板横屏 / 矮屏适配 ===== */
@media (orientation: landscape) and (max-height: 820px) and (min-width: 760px) {
  .lobby-stage { padding: 12px 20px 20px; }
  .room { min-height: 118px; padding: 16px 18px 14px 20px; }
  .dealercol { width: 260px; }
  .seat { transform: translate(-50%, -50%) scale(.86); }
  .card { width: 42px; height: 60px; }
  .hud { padding: 8px 14px; }
  .actions > button { min-height: 46px; min-width: 96px; font-size: 14px; }
  .board-wrap { padding: 8px 14px; }
}
@media (orientation: landscape) and (max-height: 680px) {
  .seat { transform: translate(-50%, -50%) scale(.76); }
  .card { width: 36px; height: 52px; }
  .dealercol { width: 232px; }
  .board-wrap { gap: 10px; padding: 6px 12px; }
  .pot b { font-size: 15px; }
}
@media (max-height: 620px) {
  .seat { transform: translate(-50%, -50%) scale(.68); }
  .dealercol .bubble { font-size: 11.5px; padding: 8px 11px; }
}


/* 好友头像 */
.item .fm-av {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  background-size: cover; background-position: center 30%;
  border: 1px solid rgba(201, 168, 106, .35);
  background-color: rgba(201, 168, 106, .12);
}
.item { align-items: center; gap: 8px; }

/* 右侧看板娘列：内容居中，不留单边空白 */
.dealercol { align-items: center; }
.dealer-frame { width: 100%; }
.dealer-frame canvas { display: block; margin: 0 auto; }

@media (orientation: landscape) and (max-height: 820px) and (min-width: 760px) {
  .dealercol { width: 250px; padding-right: 6px; }
}

.avatar.has-img { background-size: cover; background-position: center 32%; }
.avatar.has-img .ring { opacity: .35; }
.avatar.has-img .face { display: none; }


/* 未读角标 */
.has-badge { position: relative; }
.has-badge::after {
  content: attr(data-n);
  position: absolute; top: -6px; right: -6px;
  min-width: 17px; height: 17px; padding: 0 4px;
  border-radius: 9px; background: #c0503f; color: #fff;
  font: 600 10.5px/17px "Helvetica Neue", Arial, sans-serif;
  text-align: center; letter-spacing: 0;
  box-shadow: 0 0 0 2px var(--bg-0);
  pointer-events: none;
}

/* 牌桌操作区永远压在助手模型之上 */
.hud { position: relative; z-index: 20; }
@media (max-width: 980px) {
  .dealercol { z-index: 6; bottom: 172px; }
  .hud { z-index: 22; }
}

.pot .label { white-space: nowrap; }
@media (max-width: 780px) { .pot .label { letter-spacing: .1em; font-size: 9px; } .board-wrap { gap: 8px; } }


/* 好友行的删除按钮 */
.item .icon-del {
  flex: none; width: 22px; height: 22px; min-width: 0; min-height: 0;
  padding: 0; border-radius: 50%;
  border: 1px solid rgba(233, 223, 199, .14);
  background: transparent; color: #8b8272;
  font-size: 14px; line-height: 1; display: grid; place-items: center;
  opacity: 0; transition: opacity .15s, color .15s, border-color .15s;
}
.item:hover .icon-del { opacity: 1; }
.item .icon-del:hover { color: #e79a90; border-color: rgba(231, 154, 144, .5); }
@media (max-width: 780px) { .item .icon-del { opacity: .75; } }
