/*
 * 十三水 H5：横屏布局，「霓虹夜场」风格——深紫夜色、发光牌桌、渐变发光的立体按钮、金色大字。
 * 整个游戏画在 #stage 上，--gw / --gh 是横屏画面的宽高（由 app.js 计算）。
 * 手机竖着拿时 #stage 旋转 90° 显示成横屏；打包成 App 后锁定横屏，就不会旋转。
 *
 * 颜色、圆角都用下面的变量；渐变、发光等效果在 skin-neon.css 里。换皮肤改这两处。
 */
:root {
  /* 底色与表面：深紫夜色，面板是半透明的「玻璃」 */
  --bg: #090316;
  --stage-hi: #3b1a7a;
  --stage-mid: #1a0b3d;
  --stage-lo: #090316;
  --surface: rgba(32, 12, 74, 0.72);
  --surface-2: rgba(255, 255, 255, 0.08);
  --surface-3: rgba(255, 255, 255, 0.16);
  --line: rgba(255, 255, 255, 0.12);
  --line-strong: rgba(255, 255, 255, 0.24);
  /* 文字 */
  --text: #f6efff;
  --muted: #bba8e0;
  --faint: #806ca9;
  /* 霓虹色：粉（主操作）、青（次操作 / 选中）、金（大字、我、重要信息） */
  --pink: #ff4fa0;
  --pink-glow: rgba(255, 90, 210, 0.6);
  --cyan: #7af3ff;
  --cyan-glow: rgba(122, 243, 255, 0.55);
  --gold: #ffb800;
  --gold-light: #fff6c2;
  --gold-glow: rgba(255, 184, 0, 0.55);
  --primary: #ff4fa0;
  --primary-press: #d93a86;
  --primary-soft: rgba(255, 79, 160, 0.18);
  --accent: #ffc83a;
  --accent-soft: rgba(255, 200, 58, 0.15);
  --pos: #7affb0;
  --pos-soft: rgba(122, 255, 176, 0.15);
  --neg: #ff6b8a;
  --neg-soft: rgba(255, 107, 138, 0.16);
  --horse: #ff3b5c;
  /* 扑克牌 */
  --card-bg: #ffffff;
  --card-red: #e3343c;
  --card-black: #1b2030;
  --back-1: #ff5ad2;
  --back-2: #6a2bd9;
  --radius: 16px;
  --radius-sm: 10px;

  --gw: 100vw;
  --gh: 100vh;
  /* 摆牌页牌宽：按画面高度算，保证 三道 + 牌型按钮 + 手牌 一屏放下 */
  --cw: clamp(30px, calc((var(--gh) - 118px) / 5.6), 70px);
  --mini: 26px;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
body {
  color: var(--text); font-size: 14px;
  touch-action: manipulation; -webkit-text-size-adjust: 100%;
  overscroll-behavior: none; -webkit-font-smoothing: antialiased;
}
button, input { font: inherit; color: inherit; }
h2 { font-size: 14px; font-weight: 700; margin: 0 0 8px; color: var(--text); letter-spacing: .5px; }

#stage {
  position: fixed; top: 0; left: 0; width: var(--gw); height: var(--gh); overflow: hidden;
  background: radial-gradient(120% 90% at 50% 0%, var(--stage-hi), var(--stage-lo) 70%);
}
/* 竖屏时旋转成横屏：先绕左上角转 90°，再右移一个屏宽 */
.rotated #stage { transform: translateX(100vw) rotate(90deg); transform-origin: top left; }

.screen {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  padding: 6px max(12px, env(safe-area-inset-right, 0px)) 6px max(12px, env(safe-area-inset-left, 0px));
}
.rotated .screen { padding: 6px 12px; }
.center { text-align: center; }
.grow { flex: 1; }
.hint { color: var(--muted); font-size: 12px; }
.scroll { overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: var(--surface-3) transparent; }
.pos { color: var(--pos); }
.neg { color: var(--neg); }

.logo { font-size: 44px; font-weight: 800; letter-spacing: 8px; color: var(--text); }
.logo b { color: var(--primary); }
.logo.small { font-size: 18px; letter-spacing: 3px; }
.tagline { color: var(--muted); margin: 4px 0 18px; letter-spacing: 1px; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.panel.form { width: 300px; max-width: 90%; display: flex; flex-direction: column; gap: 8px; text-align: left; }
.panel.form label { color: var(--muted); font-size: 12px; }
.panel.rules p { margin: 0 0 6px; line-height: 1.6; font-size: 12.5px; color: #c3cbd8; }

.row { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; flex-wrap: wrap; }
.row .lbl { width: 34px; color: var(--muted); font-size: 12px; flex: none; }
.row input { flex: 1; min-width: 0; }

input {
  background: var(--surface-2); border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  padding: 8px 10px; outline: none; transition: border-color .15s;
}
input::placeholder { color: var(--faint); }
input:focus { border-color: var(--primary); }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 10px;
  padding: 7px 14px; cursor: pointer; font-weight: 600; white-space: nowrap; letter-spacing: .3px;
  transition: background .15s, border-color .15s, transform .08s;
}
.btn:active { transform: scale(.97); background: var(--surface-3); }
.btn:disabled { opacity: .38; cursor: not-allowed; transform: none; }
.btn.primary { background: var(--primary); border-color: transparent; color: #fff; }
.btn.primary:active { background: var(--primary-press); }
.btn.blue { background: var(--primary-soft); border-color: rgba(79,124,255,.35); color: #a9c0ff; }
.btn.gold { background: var(--accent); border-color: transparent; color: #2b1d00; }
.btn.ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.btn.ghost:active { background: var(--surface-2); color: var(--text); }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: var(--radius-sm); }
.btn.wide { width: 100%; padding: 9px; font-size: 15px; }
.btn.round { width: 28px; height: 28px; padding: 0; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 13px; }
.btn.icon { padding: 3px 8px; }

.chip {
  border: 1px solid var(--line-strong); background: var(--surface-2); border-radius: 999px;
  padding: 4px 11px; cursor: pointer; font-size: 12.5px; white-space: nowrap; transition: background .15s;
}
.chip:active { background: var(--surface-3); }
.chip.num { width: 28px; height: 28px; padding: 0; border-radius: 50%; font-weight: 700; }
.chip.on { background: var(--primary); color: #fff; border-color: transparent; font-weight: 700; }
.stepper { display: inline-flex; align-items: center; gap: 4px; }
.stepper b { min-width: 22px; text-align: center; color: var(--primary); }

/* ---------- 顶栏 ---------- */
.topbar { display: flex; align-items: center; gap: 10px; height: 30px; flex: none; font-size: 13px; white-space: nowrap; min-width: 0; color: var(--muted); }
.topbar > * { flex: none; }
.topbar > .rulesline { flex: 1; min-width: 0; }
.topbar .right { margin-left: auto; display: flex; align-items: center; gap: 6px; }
.code { color: var(--text); letter-spacing: 1px; font-weight: 700; }
.roomcards { background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 3px 10px; color: var(--text); }
.rulesline { color: var(--faint); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 倒计时：圆环 + 数字，环随剩余时间缩短 */
.timer { position: relative; width: 28px; height: 28px; display: none; }
.timer.on { display: inline-block; }
.timer svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.timer circle { fill: none; stroke-width: 3; }
.timer .trk { stroke: var(--surface-3); }
.timer .prog { stroke: var(--primary); stroke-linecap: round; transition: stroke-dashoffset .5s linear, stroke .3s; }
.timer b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-size: 11px; color: var(--text); font-variant-numeric: tabular-nums; }
.timer.urgent .prog { stroke: var(--neg); }
.timer.urgent b { color: var(--neg); }

/* ---------- 大厅 ---------- */
.lobby { display: grid; grid-template-columns: 1.15fr 1fr; gap: 10px; min-height: 0; flex: 1; }
.lobby > .col { display: flex; flex-direction: column; gap: 10px; min-height: 0; }
.lobby > .col > .panel:first-child { min-height: 0; }
.lobby .rules { flex: 1; min-height: 0; }

/* ---------- 牌桌与座位（等待、旁观共用） ---------- */
.table { position: relative; flex: 1; min-height: 0; }
/* 椭圆桌面 */
.table::before {
  content: ''; position: absolute; left: 13%; right: 13%; top: 9%; bottom: 9%; border-radius: 50%;
  background: radial-gradient(70% 70% at 50% 40%, #1b2537, #121925); border: 1px solid var(--line);
  box-shadow: inset 0 0 0 10px rgba(255,255,255,.015), 0 20px 60px rgba(0,0,0,.35);
}
.seat { position: absolute; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 3px; width: 92px; z-index: 1; }
.avatar {
  position: relative; width: 44px; height: 44px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 17px; font-weight: 700; color: #fff; box-shadow: 0 0 0 2px var(--surface), 0 0 0 3px var(--line-strong);
  flex: none;
}
.avatar img { position: absolute; inset: 0; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar.empty { background: transparent; box-shadow: none; border: 1.5px dashed var(--line-strong); color: var(--faint); font-size: 12px; font-weight: 500; }
.avatar.off { filter: grayscale(1) brightness(.6); }
.badge {
  position: absolute; top: -9px; left: 50%; transform: translateX(-50%); z-index: 2; font-size: 10px; font-weight: 700;
  padding: 1px 6px; border-radius: 999px; white-space: nowrap; background: var(--surface-3); color: var(--text); border: 1px solid var(--line-strong);
}
.badge.ok { background: var(--pos); color: #04281a; border-color: transparent; }
.badge.off { background: var(--surface-2); color: var(--faint); }
.badge.bot { background: var(--surface-3); color: var(--muted); }
.kick { position: absolute; right: -6px; bottom: -4px; z-index: 2; width: 18px; height: 18px; border-radius: 50%; border: 0; background: var(--neg); color: #fff; font-size: 10px; line-height: 18px; padding: 0; cursor: pointer; }
.sname { font-size: 12px; max-width: 92px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); }
.sname.me { color: var(--accent); font-weight: 700; }
.sscore { font-size: 12px; font-weight: 700; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 0 9px; min-width: 40px; text-align: center; font-variant-numeric: tabular-nums; }

.tablecenter { position: absolute; z-index: 1; left: 50%; top: 51%; transform: translate(-50%, -50%); display: flex; flex-direction: column; align-items: center; gap: 6px; text-align: center; width: 62%; }
.bigcode { font-size: 30px; font-weight: 800; letter-spacing: 8px; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.tablecenter .btns { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; align-items: center; }
.avatar.sit { cursor: pointer; color: var(--primary); border-color: var(--primary); font-size: 13px; font-weight: 700; background: var(--primary-soft); }

/* ---------- 扑克牌 ---------- */
.card {
  position: relative; width: var(--cw); height: calc(var(--cw) * 1.4); flex: none;
  background: var(--card-bg); color: var(--card-black); border-radius: calc(var(--cw) * .1);
  box-shadow: 0 1px 0 rgba(255,255,255,.6) inset, 0 2px 6px rgba(0,0,0,.35);
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; cursor: pointer;
  transition: transform .12s, box-shadow .12s; overflow: hidden;
}
.card.red { color: var(--card-red); }
/* 经典衬线：左上角大号点数 + 花色（叠牌时也露得出来），数字牌右下大花色，J/Q/K 右侧放宫廷人物图 */
.card .cr { position: absolute; z-index: 1; top: 3px; left: 3px; font-family: Georgia, "Times New Roman", serif; font-weight: 700; font-size: calc(var(--cw) * .44); line-height: 1; letter-spacing: -.05em; }
.card .cs { position: absolute; z-index: 1; top: calc(var(--cw) * .5); left: 4px; font-size: calc(var(--cw) * .42); line-height: 1; font-variant-emoji: text; }
.card .cb { position: absolute; right: calc(var(--cw) * .08); bottom: calc(var(--cw) * .06); font-size: calc(var(--cw) * .72); line-height: 1; font-variant-emoji: text; }
/* 王牌：竖排 JOKER + 皇冠，大王红、小王黑 */
.card.joker .jw { position: absolute; top: 3px; left: 3px; width: 1em; font-size: calc(var(--cw) * .2); font-weight: 900; line-height: .98; word-break: break-all; }
.card.joker .jc { position: absolute; right: 3px; bottom: 2px; font-size: calc(var(--cw) * .5); line-height: 1; }
.card.joker.big { color: var(--card-red); }
.card.joker.big .jc { color: #e8a200; }
.card.joker.small { color: var(--card-black); }
.card.joker.small .jc { color: #8b93a3; }
.card.selected { transform: translateY(-12px); box-shadow: 0 0 0 2px var(--primary), 0 8px 16px rgba(79,124,255,.35); }
.card.slot { background: rgba(255,255,255,.025); border: 1px dashed var(--line-strong); box-shadow: none; }
.card.mini { --cw: var(--mini); border-radius: 3px; cursor: default; box-shadow: 0 1px 2px rgba(0,0,0,.3); }
.card.mini .cr { top: 1px; left: 1px; font-size: calc(var(--mini) * .54); }
.card.mini .cs { top: auto; bottom: 1px; left: 2px; font-size: calc(var(--mini) * .5); }
.card.mini .cb { display: none; }
.card.mini.joker .jw { font-size: calc(var(--mini) * .24); }
.card.mini.joker .jc { font-size: calc(var(--mini) * .5); }
.card.horse::after {
  content: '马'; position: absolute; right: 1px; top: 1px; font-size: calc(var(--cw) * .22); line-height: 1;
  background: var(--horse); color: #fff; border-radius: 3px; padding: 1px 2px; font-weight: 800;
}

/* ---------- 摆牌 ---------- */
.arrange { flex: 1; min-height: 0; display: grid; grid-template-columns: auto 1fr auto auto; gap: 8px; align-items: center; }
.opps { display: flex; flex-direction: column; gap: 4px; width: 112px; align-self: stretch; justify-content: center; }
.opp {
  position: relative; display: flex; align-items: center; gap: 6px; background: var(--surface); border: 1px solid var(--line);
  border-radius: 10px; padding: 4px 6px; min-width: 0; transition: border-color .3s, background .3s;
}
.opp.done { border-color: rgba(61,220,151,.35); background: linear-gradient(90deg, var(--pos-soft), var(--surface) 70%); }
.opp .avatar { width: 28px; height: 28px; font-size: 12px; }
.opp .obody { min-width: 0; flex: 1; display: flex; flex-direction: column; gap: 2px; }
.opp .oline { display: flex; justify-content: space-between; gap: 3px; font-size: 11px; line-height: 1.15; }
.opp .oname { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; color: var(--muted); }
.opp .done-mark { position: absolute; right: -4px; bottom: -4px; z-index: 2; width: 14px; height: 14px; border-radius: 50%; background: var(--pos); color: #04281a; font-size: 9px; line-height: 14px; text-align: center; font-weight: 900; box-shadow: 0 0 0 2px var(--surface); }

/* 牌背：还在摆时 13 张扇形排开（--fs 间距），摆好后收成 3/5/5 三道（--rs 列距，--rg 行距） */
.backs { --bw: 10px; --bh: 13px; --fs: 4.3px; --rs: 8px; --rg: 9px; position: relative; flex: none;
  width: calc(var(--fs) * 12 + var(--bw)); height: calc(var(--rg) * 2 + var(--bh)); }
.backs .back {
  position: absolute; top: calc(var(--rg)); width: var(--bw); height: var(--bh); border-radius: 2px;
  background: linear-gradient(135deg, rgba(255,255,255,.12), transparent 60%), repeating-linear-gradient(45deg, var(--back-1) 0 2px, var(--back-2) 2px 4px);
  border: 1px solid rgba(169,192,255,.45); box-shadow: 0 1px 2px rgba(0,0,0,.45);
}
.seat .backs { --bw: 12px; --bh: 16px; --fs: 5px; --rs: 10px; --rg: 10px; margin-top: 2px; }
.table.watching .seat { gap: 1px; }
.table.watching .seat .avatar { width: 32px; height: 32px; font-size: 14px; }
.table.watching .seat .backs { --bw: 11px; --bh: 15px; --fs: 4.6px; --rs: 9px; --rg: 9px; }

.lanes { display: flex; flex-direction: column; gap: 4px; justify-self: center; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.25); }
.lane { display: flex; align-items: center; gap: 6px; border-radius: 10px; padding: 2px 4px; cursor: pointer; transition: background .15s; }
.lane.locked { cursor: default; }
.lane:not(.locked):active { background: var(--primary-soft); }
@media (hover: hover) { .lane:not(.locked):hover { background: rgba(255,255,255,.03); } }
.lname { width: 58px; flex: none; display: flex; flex-direction: column; gap: 3px; align-items: flex-start; }
.lname b { font-size: 13px; color: var(--muted); font-weight: 600; letter-spacing: 2px; }
.lname small { font-weight: 700; font-size: 11px; white-space: nowrap; padding: 1px 7px; border-radius: 999px; background: var(--primary-soft); color: #a9c0ff; }
.lname small:empty { visibility: hidden; }
.lname small.bad { background: var(--neg-soft); color: var(--neg); }
.lcards { display: flex; gap: 3px; flex-wrap: nowrap; }
.lbtns { width: 30px; display: flex; flex-direction: column; gap: 4px; align-items: center; }

.side { display: flex; flex-direction: column; gap: 6px; width: 112px; align-self: stretch; justify-content: center; }
.side .suggest { display: flex; flex-direction: column; gap: 4px; }
.side .suggest .chip { overflow: hidden; text-overflow: ellipsis; font-size: 11px; padding: 5px 6px; border-radius: var(--radius-sm); background: var(--surface); }
.warn { color: var(--neg); font-size: 12px; text-align: center; background: var(--neg-soft); border-radius: var(--radius-sm); padding: 3px 4px; line-height: 1.35; }

.types { display: flex; gap: 4px; flex: none; margin-top: 4px; }
.types .tbtn {
  flex: 1; min-width: 0; padding: 5px 0; border-radius: var(--radius-sm); border: 1px solid var(--line-strong);
  background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 12.5px; cursor: pointer; white-space: nowrap; transition: background .15s;
}
.types .tbtn:active { background: var(--surface-3); }
.types .tbtn:disabled { opacity: .3; cursor: default; }
.types .tbtn.on { background: var(--primary); border-color: transparent; color: #fff; }

.hand { display: flex; justify-content: center; padding: 14px 0 2px; flex: none; touch-action: none; /* 在手牌上滑动是选牌，不是滚动 */ }
/* 横屏通常放得下 13 张不重叠；放不下时自动叠放 */
.hand .card + .card { margin-left: min(4px, calc((var(--gw) - 24px - var(--cw) * 13) / 12)); }
.waitmsg { flex: none; text-align: center; color: var(--muted); padding: 10px 0; }
.special { background: var(--accent-soft); border: 1px solid rgba(245,181,68,.4); border-radius: var(--radius-sm); padding: 4px 6px; font-size: 12px; text-align: center; }

/* ---------- 结算 ---------- */
.results { flex: 1; min-height: 0; display: grid; gap: 6px; }
.rblock { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 7px; display: flex; flex-direction: column; min-width: 0; min-height: 0; overflow: hidden; }
.rblock.me { border-color: rgba(245,181,68,.45); background: linear-gradient(180deg, var(--accent-soft), var(--surface) 45%); }
.rhead { display: flex; align-items: center; gap: 4px; min-width: 0; height: 20px; flex: none; }
.rplayer { font-weight: 700; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.rblock.me .rplayer { color: var(--accent); }
.rsum { font-size: 11px; color: var(--muted); white-space: nowrap; }
.rtotal { margin-left: auto; font-size: 18px; font-weight: 800; font-variant-numeric: tabular-nums; }
.tag { font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--surface-3); white-space: nowrap; flex: none; line-height: 16px; }
.tag.bad { background: var(--neg-soft); color: var(--neg); }
.tag.gun { background: rgba(255,140,60,.18); color: #ffa45c; font-weight: 700; }
.tag.horse { background: rgba(229,72,77,.18); color: #ff8a8d; font-weight: 700; }
.tag.watch { background: var(--primary-soft); color: #a9c0ff; font-size: 11px; padding: 0 7px; }
.rlanes { display: flex; flex-direction: column; gap: 2px; flex: 1; justify-content: space-around; }
.rlane { display: flex; align-items: center; gap: 5px; }
.rcards { display: flex; gap: 1px; flex: none; }
.rname { font-size: 11px; color: var(--muted); white-space: nowrap; overflow: hidden; min-width: 0; flex: 1; }
.rvs { font-size: 12px; font-weight: 700; flex: none; font-variant-numeric: tabular-nums; }
.spbadge { color: var(--accent); font-weight: 800; padding: 6px 0; text-align: center; }
.homerun { color: #ffa45c; font-weight: 800; }
.bottombar { flex: none; display: flex; align-items: center; justify-content: center; gap: 12px; padding-top: 6px; }
.bottombar .btn { min-width: 160px; }

/* ---------- 总结算 ---------- */
.final { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; }
.final .panel { min-height: 0; display: flex; flex-direction: column; }
.board { list-style: none; margin: 0; padding: 0; }
.board li { display: flex; justify-content: space-between; padding: 6px 2px; border-bottom: 1px solid var(--line); font-size: 14px; font-variant-numeric: tabular-nums; }
.board li:last-child { border-bottom: 0; }
.board li.me span { color: var(--accent); font-weight: 700; }
.history { width: 100%; border-collapse: collapse; font-size: 12px; text-align: center; font-variant-numeric: tabular-nums; }
.history th, .history td { padding: 5px 3px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.history th { color: var(--muted); font-weight: 600; position: sticky; top: 0; background: var(--surface); }
.history tr.clickable { cursor: pointer; }
.history tr.clickable:active td { background: var(--primary-soft); }
.history tr.sum td { font-weight: 800; border-top: 1px solid var(--line-strong); }
.history td.left { text-align: left; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }

.offline { position: absolute; top: 0; left: 0; right: 0; z-index: 40; background: var(--neg); color: #fff; text-align: center; padding: 4px; font-size: 12px; font-weight: 600; }
.toast {
  position: absolute; left: 50%; bottom: 26%; transform: translateX(-50%); z-index: 50;
  background: rgba(29,38,56,.96); border: 1px solid var(--line-strong); padding: 8px 16px; border-radius: 999px; font-size: 13px;
  max-width: 80%; text-align: center; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

/* ---------- 聊天气泡 ---------- */
.bubble {
  position: absolute; z-index: 5; left: 50%; bottom: calc(100% + 4px); transform: translateX(calc(-50% + var(--bx, 0px)));
  max-width: 180px; width: max-content; background: var(--text); color: #141a26; font-size: 12px; font-weight: 600;
  padding: 4px 10px; border-radius: 12px; box-shadow: 0 4px 14px rgba(0,0,0,.45); animation: bubbleIn .25s ease-out;
  white-space: normal; text-align: center; line-height: 1.35;
}
.bubble::after { content: ''; position: absolute; left: calc(50% - var(--bx, 0px)); top: 100%; transform: translateX(-50%); border: 5px solid transparent; border-top-color: var(--text); }
/* 上面放不下：放到头像下面，小尖角朝上 */
.bubble.below { bottom: auto; top: calc(100% + 4px); }
.bubble.below::after { top: auto; bottom: 100%; border-top-color: transparent; border-bottom-color: var(--text); }
.opp .bubble { left: calc(100% + 6px); bottom: auto; top: 50%; transform: translateY(-50%); animation: none; }
.opp .bubble::after { left: -10px; top: 50%; transform: translateY(-50%); border-top-color: transparent; border-right-color: var(--text); }
.opps:last-child .opp .bubble { left: auto; right: calc(100% + 6px); }
.opps:last-child .opp .bubble::after { left: auto; right: -10px; border-right-color: transparent; border-left-color: var(--text); }
.rblock .bubble { bottom: auto; top: 22px; }
.rblock .bubble::after { display: none; }

/* ---------- 弹层 ---------- */
.overlay { position: absolute; inset: 0; z-index: 30; background: rgba(5,8,14,.66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); display: flex; align-items: center; justify-content: center; padding: 12px; }
.sheet {
  background: var(--surface); border: 1px solid var(--line-strong); border-radius: 16px;
  width: min(640px, 92%); max-height: 100%; display: flex; flex-direction: column; padding: 8px 12px 12px; box-shadow: 0 20px 50px rgba(0,0,0,.55);
}
.sheet.small { width: min(360px, 90%); }
.sheet.wide { width: 100%; height: 100%; }
.sheet.wide .results { flex: 1; min-height: 0; }
.sheethead { display: flex; align-items: center; justify-content: space-between; padding-bottom: 6px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.sheethead b { font-size: 15px; }
.sheetbody { min-height: 0; flex: 1; }

.setrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 2px; border-bottom: 1px solid var(--line); }
.setrow:last-child { border-bottom: 0; }
.switch { width: 44px; height: 26px; border-radius: 13px; border: 0; background: var(--surface-3); position: relative; cursor: pointer; flex: none; transition: background .15s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: left .15s; }
.switch.on { background: var(--primary); }
.switch.on i { left: 21px; }

.chat { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-height: 0; flex: 1; }
.phrases { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; }
.phrases .chip { text-align: left; border-radius: var(--radius-sm); padding: 6px 10px; }
.chatside { display: flex; flex-direction: column; gap: 6px; min-height: 0; }
.emojis { display: flex; flex-wrap: wrap; gap: 4px; }
.emoji { font-size: 20px; width: 34px; height: 32px; border: 0; border-radius: var(--radius-sm); background: var(--surface-2); cursor: pointer; padding: 0; }
.emoji:active { background: var(--surface-3); }
.chatlog { flex: 1; min-height: 50px; background: var(--bg); border-radius: var(--radius-sm); padding: 6px 8px; font-size: 12px; }
.chatline { padding: 2px 0; word-break: break-all; }
.chatline b { color: var(--muted); }
.chatline b.me { color: var(--accent); }

/* ---------- 打枪 / 全垒打 特效 ---------- */
.gunfx {
  position: absolute; left: 50%; top: 48%; z-index: 20; pointer-events: none; text-align: center;
  background: rgba(21,28,41,.96); border: 1px solid rgba(255,140,60,.5); border-radius: 18px;
  padding: 12px 26px; font-size: 14px; font-weight: 600; line-height: 1.7; color: var(--text);
  box-shadow: 0 0 0 6px rgba(255,140,60,.08), 0 20px 50px rgba(0,0,0,.6);
}
.gunfx .fxbig { font-size: 28px; font-weight: 800; color: #ffa45c; letter-spacing: 4px; }

/* ---------- 动画 ---------- */
/* 发牌：从牌桌中间飞到手里（只用 backwards 填充，播完不影响选中时的上移） */
@keyframes dealIn { from { transform: translate(0, -160px) rotate(-12deg) scale(.5); opacity: 0; } to { transform: none; opacity: 1; } }
/* 开牌：每道牌翻开 */
@keyframes laneIn { from { transform: perspective(400px) rotateX(80deg); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes scorePop { 0% { transform: scale(.3); opacity: 0; } 70% { transform: scale(1.3); opacity: 1; } 100% { transform: scale(1); } }
@keyframes popIn { 0% { transform: scale(.2); opacity: 0; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
/* 牌背：摆牌中轻轻起伏；摆好时从扇形位置飞到三道的位置（--fx/--fy 是起点相对终点的偏移） */
@keyframes backWave { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-2px); } }
@keyframes backMove { from { transform: translate(var(--fx), var(--fy)); } to { transform: none; } }
@keyframes bubbleIn { from { opacity: 0; transform: translateX(calc(-50% + var(--bx, 0px))) scale(.6); } to { opacity: 1; transform: translateX(calc(-50% + var(--bx, 0px))) scale(1); } }
/* 打枪 / 全垒打：中间弹出，停一会儿后淡出 */
@keyframes gunPop {
  0% { transform: translate(-50%, -50%) scale(.6); opacity: 0; }
  12% { transform: translate(-50%, -50%) scale(1.06); opacity: 1; }
  20% { transform: translate(-50%, -50%) scale(1); }
  80% { opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

/* ---------- 小屏 ---------- */
/* 窄屏（如 iPhone SE 横屏 568 宽）：两列对手 + 三道 + 右侧按钮要挤进 544px */
.narrow .lobby { grid-template-columns: 1.4fr 1fr; }
.narrow .chip { padding: 4px 8px; }
.narrow .chip.num { padding: 0; }
.narrow .topbar { gap: 6px; font-size: 12px; }
.narrow .topbar .rulesline { display: none; }
.narrow .arrange { gap: 4px; --cw: min(clamp(30px, calc((var(--gh) - 118px) / 5.6), 70px), calc((var(--gw) - 384px) / 5.2)); }
.narrow .opps { width: 76px; }
.narrow .opp { gap: 3px; padding: 2px 3px; }
.narrow .opp .avatar { width: 20px; height: 20px; font-size: 10px; }
.narrow .opp .oname { display: none; }
.narrow .opp .oline { justify-content: flex-end; }
.narrow .backs { --bw: 8px; --bh: 10px; --fs: 2.9px; --rs: 6.5px; --rg: 7px; }
.narrow .side { width: 86px; }
.narrow .lname { width: 40px; }
.narrow .lname b { font-size: 12px; letter-spacing: 0; }
.narrow .lname small { padding: 1px 4px; font-size: 10px; }
.narrow .lbtns { width: 26px; }
.narrow .lbtns .btn.round { width: 24px; height: 24px; font-size: 12px; }
/* 矮屏（如 320 高）：对手只留头像 + 牌背，名字分数在结算里看 */
.short .side { gap: 4px; }
.short .side .btn { padding: 5px 8px; }
.short .side .suggest .chip:nth-child(n+3) { display: none; }
.short .opps { gap: 2px; }
.short .opp { padding: 2px 3px; }
.short .opp .oline { display: none; }

/* ---------- 俱乐部 ---------- */
.clubtabs { display: flex; gap: 6px; flex: none; margin: 2px 0 6px; }
.clubbody { flex: 1; min-height: 0; }
.dotbadge { display: inline-block; min-width: 16px; height: 16px; line-height: 16px; border-radius: 8px; background: var(--neg); color: #fff; font-size: 10px; font-style: normal; text-align: center; padding: 0 4px; margin-left: 2px; }
.roomcards.low { border-color: rgba(255,107,107,.5); color: var(--neg); }
.tag.club { background: var(--accent-soft); color: var(--accent); font-size: 11px; padding: 0 7px; }
.clubbody > .empty { text-align: center; color: var(--muted); padding: 40px 0; line-height: 2.4; }
.clubtables { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px; margin-bottom: 8px; }
.ctable { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; }
.ctable.playing { opacity: .85; }
.cthead { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; }
.cthead .live { color: var(--pos); font-weight: 600; }
.ctseats { display: flex; flex-wrap: wrap; gap: 6px; }
.ctseats .avatar { width: 30px; height: 30px; font-size: 12px; }
.ctfoot { display: flex; justify-content: space-between; align-items: center; }
.mrow { display: flex; align-items: center; gap: 8px; padding: 6px 2px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.mrow:last-child { border-bottom: 0; }
.mrow .avatar { width: 26px; height: 26px; font-size: 11px; }
.clubbody .panel { margin-bottom: 8px; }
.btn.danger { color: var(--neg); border-color: rgba(255,107,107,.3); }
.clubsheet { display: grid; grid-template-columns: 1.1fr 1fr; gap: 12px; min-height: 0; flex: 1; }
.clubsheet > .scroll { min-height: 0; max-height: 60vh; }
.clubrow { width: 100%; display: flex; align-items: center; gap: 8px; text-align: left; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 8px 10px; margin-bottom: 6px; cursor: pointer; flex-wrap: wrap; }
.clubrow .hint { flex: 1; }
.narrow .clubtables { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }

/* ---------- 正常比牌：牌型名弹出、剧透内容等翻完再出现 ---------- */
@keyframes namePop { 0% { transform: scale(.4); opacity: 0; } 55% { transform: scale(1.45); opacity: 1; color: var(--accent); } 100% { transform: scale(1); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.rname { display: inline-block; transform-origin: left center; }
.rtags { display: inline-flex; gap: 4px; min-width: 0; }
.revealstage { color: var(--accent); }

/* ---------- 玩家头像与 ID ---------- */
.sid { font-size: 10px; color: var(--muted); margin-top: -2px; font-variant-numeric: tabular-nums; }
.opp .oid { font-size: 10px; line-height: 1.1; color: var(--muted); font-variant-numeric: tabular-nums; }
.opp .backs { --bw: 8px; --bh: 10px; --fs: 3.6px; --rs: 7px; --rg: 5px; }
.opp { padding-top: 3px; padding-bottom: 3px; }
.rhead .avatar { width: 20px; height: 20px; font-size: 10px; flex: none; }
.rid { font-size: 10px; color: var(--muted); white-space: nowrap; flex: none; font-variant-numeric: tabular-nums; margin-right: 6px; }
.mechip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px 2px 2px; border-radius: 999px; background: rgba(0,0,0,.25); border: 1px solid var(--line); font-size: 12px; }
.mechip .avatar { width: 22px; height: 22px; font-size: 11px; }
.mechip b { color: var(--accent); }
.narrow .mechip { display: none; }
/* 矮屏：对手卡片只留 ID + 牌背（名字分数在结算里看） */
.short .opp .oid { font-size: 9px; }
.rfoot { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; overflow: hidden; }
.opp .obody { gap: 0; }
.opps { gap: 3px; }
.opp .oid { margin-bottom: 1px; }

/* ---------- 围桌视图（出牌后等待、旁观、比牌结算） ---------- */
/* --tc 是座位上小牌的宽度；人少时牌大一些，自己的牌再大一号 */
.table.tview { --tcbase: clamp(15px, calc(var(--gh) * .058), 30px); }
.table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .075), 36px); }
.tview .tablecenter { width: 34%; gap: 8px; }
.tstage { font-size: 22px; font-weight: 900; font-style: italic; letter-spacing: 2px; white-space: nowrap; }
.tseat { position: absolute; z-index: 1; display: flex; align-items: center; gap: 4px; transform: translate(-26px, -50%); }
.tseat.side-l { flex-direction: row-reverse; transform: translate(calc(-100% + 26px), -50%); }
.tinfo { position: relative; width: 52px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 1px; }
.tinfo .avatar { width: 36px; height: 36px; font-size: 15px; }
.tinfo .sname { font-size: 11px; max-width: 58px; text-align: center; }
.tinfo .sid, .tinfo .tsum { font-size: 9px; max-width: 76px; text-align: center; white-space: nowrap; color: var(--muted); }
.tinfo .tsum b { font-size: 10px; }
.ttot {
  position: absolute; z-index: 3; left: 50%; bottom: -5px; transform: translateX(-50%); font-size: 12px; font-weight: 900; line-height: 14px;
  padding: 0 5px; border-radius: 999px; border: 1px solid currentColor; background: rgba(10, 4, 30, .92); white-space: nowrap; color: var(--text);
}
.ttags { position: absolute; z-index: 3; bottom: 100%; left: 50%; transform: translateX(-50%); display: flex; gap: 2px; margin-bottom: 1px; }
.tinfo .bubble { bottom: auto; top: -26px; z-index: 6; }
.tcards { --tc: var(--tcbase); --mini: var(--tc); position: relative; display: flex; flex-direction: column; border-radius: 6px; }
.tseat.me .tcards { --tc: calc(var(--tcbase) * 1.3); }
.trow { display: flex; align-items: flex-start; gap: 3px; }
.side-l .trow { flex-direction: row-reverse; }
/* 三道上下叠放，每道只露出上面一截（点数 + 花色） */
.trow + .trow { margin-top: calc(var(--tc) * -.52); }
.tcs { display: flex; flex: none; }
.tcs .card + .card { margin-left: calc(var(--tc) * -.5); }
.trow.fan .tcs .card + .card { margin-left: calc(var(--tc) * -.78); }
.trow.fan { margin-top: calc(var(--tc) * .88); }
.tflip { display: grid; flex: none; }
.tflip > .tcs { grid-area: 1 / 1; }
.side-l .tflip > .tcs { justify-self: end; }
.tcards .card.mini { border-radius: calc(var(--tc) * .12); }
.tcards .card.mini .cr { top: 1px; left: 2px; font-size: calc(var(--cw) * .48); }
.tcards .card.mini .cs { top: calc(var(--cw) * .47); bottom: auto; left: 2px; font-size: calc(var(--cw) * .38); }
.card.tback { background: linear-gradient(135deg, rgba(255,255,255,.12), transparent 60%), repeating-linear-gradient(45deg, var(--back-1) 0 2px, var(--back-2) 2px 4px); border: 1px solid #ffd1f4; }
.tlab { display: flex; align-items: center; gap: 2px; height: calc(var(--tc) * .88); white-space: nowrap; font-size: 10px; }
.side-l .tlab { flex-direction: row-reverse; }
.tlab .tn { font-weight: 700; padding: 0 4px; line-height: 14px; border-radius: 4px; background: rgba(106, 43, 217, .78); border: 1px solid rgba(255, 90, 210, .6); color: #fff; }
.tlab .tv { font-size: 11px; font-weight: 900; min-width: 18px; }
.side-l .tlab .tv { text-align: right; }
.tstate {
  position: absolute; z-index: 4; left: 50%; top: 50%; transform: translate(-50%, -50%); white-space: nowrap; font-size: 10px; font-weight: 800;
  padding: 1px 6px; border-radius: 999px; background: rgba(10, 4, 30, .8); color: #cfc3ef; border: 1px solid rgba(255, 255, 255, .3);
}
.tstate.ok { color: var(--pos); border-color: var(--pos); }
.tstate.sp { top: 0; transform: translate(-50%, -70%); font-size: 12px; color: #4a2a00; background: linear-gradient(#fff6c2, #ffb800); border: 0; box-shadow: 0 0 10px rgba(255, 184, 0, .8); }
.tcards .fx-shooter { font-size: 20px; margin-left: -36px; top: -14px; }
.tcards .fx-crosshair { width: 56px; height: 56px; margin: -28px 0 0 -28px; }
.tcards .fx-holes i { width: 14px; height: 14px; }
@keyframes hideOut { from { opacity: 1; } to { opacity: 0; } }
.short .tinfo .sid { display: none; }
.short .tinfo .avatar { width: 30px; height: 30px; font-size: 13px; }
.tview .tablecenter .btn.primary { padding: 7px 14px; font-size: 13px; white-space: nowrap; }
.tview .tablecenter .hint { max-width: 100%; }
/* 窄屏时左右两家的牌型标签会挤到中间按钮，人少也不放大 */
.narrow .table.tview.few { --tcbase: clamp(15px, calc(var(--gh) * .058), 30px); }

/* ---------- 摆牌浮层：浮在牌桌上，左右两边露出别人的头像和进度 ---------- */
.tview.floating { --aside: 96px; }
.afloat {
  --aw: calc(var(--gw) - var(--aside) * 2 - 24px); /* 24px 是画面左右留白 */
  position: absolute; z-index: 5; top: 0; bottom: 0; left: var(--aside); right: var(--aside);
  display: flex; flex-direction: column; min-height: 0;
}
.afloat .arrange { grid-template-columns: auto auto; justify-content: center; gap: 10px; }
.afloat .arrange::before { display: none; }
.afloat .hand .card + .card { margin-left: min(4px, calc((var(--aw) - 12px - var(--cw) * 13) / 12)); }
.narrow .afloat .arrange { --cw: min(clamp(30px, calc((var(--gh) - 118px) / 5.6), 70px), calc((var(--aw) - 190px) / 5.2)); }
.tinfo .done-mark { position: absolute; right: 4px; top: 22px; z-index: 3; width: 15px; height: 15px; border-radius: 50%; font-size: 9px; line-height: 15px; text-align: center; font-weight: 900; color: #04281a; background: linear-gradient(#b8ffd6, #2bd67b); box-shadow: 0 0 6px rgba(122, 255, 176, .8); }
/* 自己摆牌时：别人的牌被浮层挡住，只留头像和进度；自己的座位藏起来 */
.tview .tstat { display: none; }
.narrow .tview.floating { --aside: 80px; }

/* 扇形：一道 3 张 / 5 张以底部为轴散开，两边的牌稍微低一点 */
.tcs.f3 .card, .tcs.f5 .card { transform-origin: 50% 100%; }
.tcs.f3 .card:nth-child(1) { transform: rotate(-9deg) translateY(calc(var(--tc) * .08)); }
.tcs.f3 .card:nth-child(3) { transform: rotate(9deg) translateY(calc(var(--tc) * .08)); }
.tcs.f5 .card:nth-child(1) { transform: rotate(-16deg) translateY(calc(var(--tc) * .22)); }
.tcs.f5 .card:nth-child(2) { transform: rotate(-8deg) translateY(calc(var(--tc) * .06)); }
.tcs.f5 .card:nth-child(4) { transform: rotate(8deg) translateY(calc(var(--tc) * .06)); }
.tcs.f5 .card:nth-child(5) { transform: rotate(16deg) translateY(calc(var(--tc) * .22)); }
.trow:has(.f3), .trow:has(.f5) { gap: calc(var(--tc) * .2); }
/* 还在摆牌：牌背一张张往上翘；摆好：收拢成三道 */
@keyframes backLift {
  0%, 30%, 100% { transform: translateY(0) rotate(0); }
  10% { transform: translateY(-38%) rotate(-10deg); }
  20% { transform: translateY(-12%) rotate(4deg); }
}
@keyframes stackIn { from { transform: scaleX(1.8); opacity: .3; } to { transform: none; opacity: 1; } }
.tcards { transform-origin: left center; }
.side-l .tcards { transform-origin: right center; }

/* 自己摆牌时：左右两列贴边，头像小一号，牌背放在头像旁边 */
.narrow .tseat.me .tcards { --tc: calc(var(--tcbase) * 1.15); }
/* 头道 3 张和中道、尾道 5 张居中对齐 */
.lcards { width: calc(var(--cw) * 5 + 12px); justify-content: center; }
.tcs.f3 { min-width: calc(var(--tc) * 3); justify-content: center; }
/* 宽屏（电脑浏览器）：摆牌浮层不要拉满整行 */
.afloat { left: max(var(--aside), calc(50% - 400px)); right: max(var(--aside), calc(50% - 400px)); }

/* ---------- 比牌座位：参考图比例，牌更大、叠得更紧（每张露出左上角点数和花色） ---------- */
.table.tview, .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .1), 46px); }
.narrow .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .1), 46px); }
.tseat.me .tcards { --tc: calc(var(--tcbase) * 1.1); }
.narrow .tseat.me .tcards { --tc: var(--tcbase); }
.tcs .card + .card { margin-left: calc(var(--tc) * -.64); }
.trow + .trow { margin-top: calc(var(--tc) * -.8); }
.tlab { height: calc(var(--tc) * .6); }
.tcards .card.mini .cr { font-size: calc(var(--cw) * .42); letter-spacing: -.1em; }
.tcards .card.mini .cs { top: calc(var(--cw) * .4); font-size: calc(var(--cw) * .3); left: 1px; }
.tcs.f3 { min-width: calc(var(--tc) * 2.44); }
.tcs.f3 .card:nth-child(1) { transform: rotate(-5deg) translateY(calc(var(--tc) * .03)); }
.tcs.f3 .card:nth-child(3) { transform: rotate(5deg) translateY(calc(var(--tc) * .03)); }
.tcs.f5 .card:nth-child(1) { transform: rotate(-10deg) translateY(calc(var(--tc) * .1)); }
.tcs.f5 .card:nth-child(2) { transform: rotate(-5deg) translateY(calc(var(--tc) * .03)); }
.tcs.f5 .card:nth-child(4) { transform: rotate(5deg) translateY(calc(var(--tc) * .03)); }
.tcs.f5 .card:nth-child(5) { transform: rotate(10deg) translateY(calc(var(--tc) * .1)); }
.trow:has(.f3), .trow:has(.f5) { gap: calc(var(--tc) * .12); }
.tlab .tv { font-size: 13px; }
/* 窄屏放不下牌型名，只留得失分（参考图也是只显示分数） */
.narrow .tview .tlab .tn { display: none; }
/* 摆牌浮层两侧的小牌背保持原来的叠法 */
.tview .trow.fan .tcs .card + .card { margin-left: calc(var(--tc) * -.78); }
.tview .trow.fan .tcs .card + .card { margin-left: calc(var(--tc) * -.88); }
.tview .trow.fan { margin-top: calc(var(--tc) * .6); }
/* 跳过比牌：大一号，一眼能点到 */
.btn.skipbtn {
  padding: 9px 26px; font-size: 16px; font-weight: 900; letter-spacing: 2px; white-space: nowrap; border-radius: 999px; color: #fff;
  background: linear-gradient(rgba(122, 243, 255, .35), rgba(106, 43, 217, .55)); border: 1.5px solid var(--cyan);
  box-shadow: 0 0 14px rgba(122, 243, 255, .55), 0 3px 0 rgba(0, 0, 0, .35);
}
.btn.skipbtn:active { transform: translateY(2px); box-shadow: 0 0 10px rgba(122, 243, 255, .55); }
.short .btn.skipbtn { padding: 7px 20px; font-size: 14px; }

/* 花色图形：大小跟着原来的字号走（.82em ≈ 原来字体里符号的大小） */
.card .cs svg, .card .cb svg { display: block; width: .82em; height: .82em; fill: currentColor; }
/* 摆牌浮层两侧的小牌背（上面的通用规则会把它放大，这里改回来） */
.tview .trow:has(.f3), .tview .trow:has(.f5) { gap: calc(var(--tc) * .26); }

/* ---------- 游戏风格确认框（代替浏览器自带弹框） ---------- */
.gdialog {
  position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px;
  background: rgba(6, 2, 18, .62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: fadeIn .18s ease-out;
}
.gpanel {
  width: min(380px, 92%); padding: 16px 18px 14px; border-radius: 18px; text-align: center; color: #fff;
  background: linear-gradient(160deg, rgba(74, 28, 150, .96), rgba(28, 10, 64, .97) 60%);
  border: 1.5px solid rgba(255, 215, 106, .75);
  box-shadow: 0 0 0 1px rgba(255, 90, 210, .25) inset, 0 0 26px rgba(255, 184, 0, .3), 0 18px 40px rgba(0, 0, 0, .55);
  animation: popIn .25s ease-out;
}
.gtitle {
  font-size: 18px; font-weight: 900; letter-spacing: 3px; margin-bottom: 8px;
  background: linear-gradient(#fff6c2, #ffb800); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 6px rgba(255, 184, 0, .55));
}
.gtext { font-size: 14px; line-height: 1.55; color: #e9e2ff; margin-bottom: 12px; }
.ginput {
  width: 100%; margin-bottom: 12px; padding: 7px 10px; border-radius: 10px; font-size: 12px; color: #fff;
  background: rgba(0, 0, 0, .35); border: 1px solid rgba(122, 243, 255, .5); outline: none;
}
.gbtns { display: flex; gap: 12px; justify-content: center; }
.gbtns .btn { min-width: 108px; padding: 9px 18px; font-size: 15px; font-weight: 800; border-radius: 999px; }
.btn.gdanger { color: #fff; border-color: transparent; background: linear-gradient(#ff8a9b, #e0203a); box-shadow: 0 4px 0 #8a0f22, 0 0 14px rgba(255, 59, 92, .55); }
.btn.gdanger:active { transform: translateY(2px); box-shadow: 0 2px 0 #8a0f22; }
.short .gpanel { padding: 12px 14px 10px; }
.short .gtitle { font-size: 16px; margin-bottom: 4px; }
.short .gtext { margin-bottom: 8px; }
/* 手牌全部摆进三道后手牌区只剩一行提示，高度变矮会让上面的摆牌框往下挪；固定成一排牌的高度 */
.afloat .hand { min-height: calc(var(--cw) * 1.4 + 16px); align-items: center; }
/* 摆牌浮层下面是正常的牌桌；浮层上的按钮做成不透明，免得后面的牌背透出来；自己的座位被手牌挡住，先藏起来 */
.afloat .side .chip, .afloat .side .btn.ghost, .afloat .types .tbtn { background: #2a1260; }
.afloat .types .tbtn:disabled { opacity: 1; color: rgba(255, 255, 255, .3); }
.tview.floating .tseat.me { display: none; }
.tview.floating .afloat .side .suggest .chip, .tview.floating .afloat .side .btn.ghost, .tview.floating .afloat .types .tbtn { background: #2a1260; }
.tview.floating .afloat .side .btn:disabled { opacity: 1; background: #3a1f5a; color: rgba(255, 255, 255, .35); box-shadow: none; }
/* 总结算：名字后面显示玩家 ID */
.board .bid { margin-left: 6px; font-size: 11px; color: var(--muted); font-weight: 500; }
.history .thid { display: block; font-size: 9px; color: var(--muted); font-weight: 500; white-space: nowrap; }
/* 战绩列表「同桌」名字后面的 ID */
.history .recid { margin-left: 3px; font-size: 10px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- 自定义牌型积分 ---------- */
.scoregrid { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.7fr 1fr; gap: 12px; }
.scoregrid > .scroll { min-height: 0; overflow: auto; }
.scoregrid .hint { margin: 2px 0 6px; font-size: 11px; }
.stable { width: 100%; border-collapse: collapse; font-size: 12px; }
.stable th { text-align: left; font-weight: 700; color: var(--muted); white-space: nowrap; padding: 3px 6px 3px 0; }
.stable tr.sh th { text-align: center; color: var(--gold, #ffb800); }
.stable td { text-align: center; padding: 2px 2px; border-top: 1px solid rgba(255, 255, 255, .06); }
.sstep { display: inline-flex; align-items: center; gap: 3px; }
.sbtn { width: 22px; height: 22px; padding: 0; border-radius: 50%; border: 1px solid rgba(122, 243, 255, .5); background: rgba(122, 243, 255, .1); color: #fff; font-size: 14px; line-height: 20px; cursor: pointer; }
.sbtn:active { transform: scale(.9); }
.sv { display: inline-block; min-width: 24px; color: var(--gold, #ffb800); font-weight: 900; font-variant-numeric: tabular-nums; }
.sbtns { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; flex: none; }
.sheet:has(.scoregrid) { height: 92%; }
/* 积分数字可以直接点开输入 */
input.sv { width: 38px; padding: 1px 0; border: 1px solid transparent; border-radius: 6px; background: rgba(0, 0, 0, .25); text-align: center; font-size: 13px; -moz-appearance: textfield; appearance: textfield; }
input.sv:focus { outline: none; border-color: var(--cyan, #7af3ff); }
input.sv::-webkit-inner-spin-button, input.sv::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
/* 特殊牌型开关 */
.scheck { width: 18px; height: 18px; margin-right: 5px; padding: 0; vertical-align: -3px; border-radius: 5px; border: 1.5px solid rgba(122, 243, 255, .6); background: rgba(0, 0, 0, .3); color: #04281a; font-size: 12px; font-weight: 900; line-height: 15px; cursor: pointer; }
.scheck.on { background: linear-gradient(#b8ffd6, #2bd67b); border-color: transparent; box-shadow: 0 0 6px rgba(122, 255, 176, .7); }
.stable tr.off th { color: rgba(255, 255, 255, .35); text-decoration: line-through; }
.stable tr.off .sstep { opacity: .35; }
input.sv { width: 30px; }
.sstep { gap: 2px; }
.narrow .sbtn { width: 20px; height: 20px; line-height: 18px; font-size: 13px; }
.narrow input.sv { width: 26px; font-size: 12px; }
.narrow .scoregrid { gap: 8px; }
/* 摆牌时每道牌型下面标出：这一道赢了能得几分 */
.lname .lpts { font-style: normal; font-size: 11px; font-weight: 800; color: var(--pos); white-space: nowrap; text-shadow: 0 0 6px rgba(122, 255, 176, .45); }
.narrow .lname .lpts { font-size: 10px; }
.afloat .lname { gap: 1px; }
.afloat .lbtns { gap: 2px; }

/* ---------- 推荐摆法 / 重摆按钮 ---------- */
.side .suggest { gap: 5px; }
.tview.floating .afloat .side .suggest .sugg, .sugg {
  display: flex; align-items: center; justify-content: center; gap: 0; width: 100%; padding: 6px 4px; cursor: pointer;
  border-radius: 12px; border: 1px solid rgba(255, 215, 106, .35); color: #fff; font-size: 11px; font-weight: 800; white-space: nowrap; overflow: hidden;
  background: linear-gradient(180deg, #3b1b7a, #26105a); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .12), 0 2px 0 rgba(0, 0, 0, .35);
}
.sugg i { width: 1px; height: 10px; margin: 0 4px; background: rgba(255, 255, 255, .25); flex: none; }
.sugg:active { transform: translateY(1px); box-shadow: none; }
.tview.floating .afloat .side .suggest .sugg.on, .sugg.on {
  border-color: var(--gold, #ffb800); background: linear-gradient(180deg, #5a2aa8, #3a1580);
  box-shadow: 0 0 10px rgba(255, 184, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .2);
}
.sugg .st0 { color: #b9b2d6; }
.sugg .st1 { color: #7af3ff; }
.sugg .st2 { color: #7dffb0; }
.sugg .st3 { color: #ffd76a; }
.sugg .st4 { color: #ff8ad8; text-shadow: 0 0 6px rgba(255, 90, 210, .7); }
.narrow .sugg { font-size: 10px; padding: 5px 2px; }
.narrow .sugg i { margin: 0 2px; }
.short .side .suggest .sugg:nth-child(n+3) { display: none; }
.tview.floating .afloat .side .btn.resetbtn, .btn.resetbtn {
  color: #ffd3dc; border: 1px solid rgba(255, 107, 138, .6); background: linear-gradient(180deg, #4a1640, #2e0c2c);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 2px 0 rgba(0, 0, 0, .35); font-weight: 800;
}
.btn.resetbtn:active { transform: translateY(1px); }
/* 玩法规则弹层：本房玩法一行标签 */
.roomrules { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 8px; flex: none; }
.roomrules span { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; color: #ffe9a8; background: rgba(255, 184, 0, .14); border: 1px solid rgba(255, 215, 106, .45); }
/* 战绩 / 记录里报到的人：三道牌旁边是金色的「报到 / 牌型 / 每家得分」 */
.rname.sp { color: var(--gold, #ffb800); font-weight: 900; text-shadow: 0 0 8px rgba(255, 184, 0, .55); white-space: nowrap; }
/* 自己座位上的牌可以点：盖住 / 翻开 */
.tcards[data-action="toggleMine"] { cursor: pointer; }
.tcards[data-action="toggleMine"]:active { transform: scale(.97); }
/* 出牌后等别人：中间内容往上挪一点，别压到自己座位上的牌 */
.tview.waitarr .tablecenter { top: 45%; width: 44%; gap: 6px; }
.tview.waitarr .tstage { font-size: 18px; }

/* ---------- 手机上字整体加粗（手机系统字体偏细，电脑上不变） ---------- */
@media (pointer: coarse) {
  body, .hint, .sname, .sid, .tsum, .tinfo, .history td, .sheet, .gtext, .rulesline, .topbar, .rid, .rfoot, .board li span { font-weight: 600; }
  .btn, .chip, .tbtn, .sugg, .lname b, .lname small, .history th, .tag, .badge, .tstate, .tlab .tn, .rname, .stable th, .setrow { font-weight: 800; }
  .card .cr { font-weight: 900; -webkit-text-stroke: .35px currentColor; }
  .sv, .tlab .tv, .ttot, .rvs, .rtotal { font-weight: 900; }
}

/* 手机上扑克牌的点数、花色再大一号（电脑不变） */
@media (pointer: coarse) {
  .card .cr { font-size: calc(var(--cw) * .54); letter-spacing: -.08em; top: 2px; left: 2px; }
  .card .cs { top: calc(var(--cw) * .58); font-size: calc(var(--cw) * .46); left: 3px; }
  .card.mini .cr { font-size: calc(var(--mini) * .6); }
  .card.mini .cs { font-size: calc(var(--mini) * .54); }
  .tcards .card.mini .cr { font-size: calc(var(--cw) * .48); }
  .tcards .card.mini .cs { top: calc(var(--cw) * .45); font-size: calc(var(--cw) * .34); }
}
/* 手机上牌面字体再大一号（第二次调整） */
@media (pointer: coarse) {
  .card .cr { font-size: calc(var(--cw) * .62); letter-spacing: -.1em; top: 1px; left: 1px; }
  .card .cs { top: calc(var(--cw) * .64); font-size: calc(var(--cw) * .5); left: 2px; }
  .card .cb { font-size: calc(var(--cw) * .66); }
  .card.mini .cr { font-size: calc(var(--mini) * .66); }
  .card.mini .cs { font-size: calc(var(--mini) * .58); }
  .tcards .card.mini .cr { font-size: calc(var(--cw) * .54); letter-spacing: -.12em; }
  .tcards .card.mini .cs { top: calc(var(--cw) * .5); font-size: calc(var(--cw) * .36); }
}
/* 报到按钮：金色、一行 */
.btn.declarebtn { width: 100%; padding: 6px 4px; font-size: 12px; font-weight: 900; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: declareGlow 1.6s ease-in-out infinite; }
.narrow .btn.declarebtn { font-size: 11px; }
@keyframes declareGlow { 0%, 100% { box-shadow: 0 0 6px rgba(255, 184, 0, .5); } 50% { box-shadow: 0 0 16px rgba(255, 184, 0, .95); } }
/*
 * 每张牌自成一层：扇形里两边的牌有旋转（会自成一层），正中间那张没旋转，
 * 它角上的点数、花色（z-index: 1）就会跑到后一张牌上面。所有牌都单独成层，后面的牌就总能盖住前面的。
 */
.card { isolation: isolate; }

/* ---------- 座位上的牌（第二版）：每道多露一点，点数下面的花色也露出来；扇形放平一点，三道对得更齐 ---------- */
.table.tview, .table.tview.few, .narrow .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .093), 44px); }
.tview .trow + .trow { margin-top: calc(var(--tc) * -.6); }   /* 每道露出 0.8 张牌高：点数 + 花色 */
.tview .tlab { height: calc(var(--tc) * .8); }
.tcards .card.mini .cr { font-size: calc(var(--cw) * .44); top: 1px; left: 2px; letter-spacing: -.1em; }
.tcards .card.mini .cs { top: calc(var(--cw) * .44); font-size: calc(var(--cw) * .32); left: 2px; }
@media (pointer: coarse) {
  .tcards .card.mini .cr { font-size: calc(var(--cw) * .46); letter-spacing: -.12em; }
  .tcards .card.mini .cs { top: calc(var(--cw) * .46); font-size: calc(var(--cw) * .32); }
}
/* 扇形角度减小：两边的牌只稍微斜一点，三道的牌角基本排成直线 */
.tcs.f3 .card:nth-child(1) { transform: rotate(-3deg); }
.tcs.f3 .card:nth-child(3) { transform: rotate(3deg); }
.tcs.f5 .card:nth-child(1) { transform: rotate(-6deg) translateY(calc(var(--tc) * .03)); }
.tcs.f5 .card:nth-child(2) { transform: rotate(-3deg); }
.tcs.f5 .card:nth-child(4) { transform: rotate(3deg); }
.tcs.f5 .card:nth-child(5) { transform: rotate(6deg) translateY(calc(var(--tc) * .03)); }
/* 摆牌浮层两侧的小牌背不受影响 */
.tview.floating .trow + .trow { margin-top: calc(var(--tc) * -.52); }

/*
 * 牌角（第三版）：点数和花色放在一列里，花色在点数正下方居中；
 * 点数改用数字一样高的字体（Georgia 的数字有高有低：3、4、5、7、9 往下沉，6、8 往上冒）
 */
.card .ci {
  position: absolute; z-index: 1; top: calc(var(--cw) * .04); left: calc(var(--cw) * .04);
  display: flex; flex-direction: column; align-items: center; line-height: 1;
}
.card .ci .cr, .card .ci .cs { position: static; top: auto; left: auto; bottom: auto; }
.card .ci .cr {
  font-family: "Times New Roman", Times, "Noto Serif", "Source Han Serif SC", serif; font-weight: 800;
  font-variant-numeric: lining-nums; letter-spacing: -.06em; line-height: .9;
}
.card .ci .cs { margin-top: calc(var(--cw) * .03); }
.card.mini .ci { top: 1px; left: 1px; }
.tcards .card.mini .ci { top: 1px; left: 1px; }
.tcards .card.mini .ci .cs { margin-top: 1px; }
/* 比牌座位上的牌已经够大了，和手牌一样在右下角画大花色（原来按小牌处理藏起来了） */
.tcards .card.mini .cb { display: block; right: calc(var(--cw) * .07); bottom: calc(var(--cw) * .05); font-size: calc(var(--cw) * .66); }

/* ==========================================================================
 * 统一牌面（第四版）：手牌、摆牌、比牌座位、记录里的小牌是同一套牌，只按牌宽等比例缩放。
 * 牌角点数 / 花色 / 右下大花色 / 圆角都按 --cw 的同一比例；手机上整体大一号。
 * 写在最后并用更具体的选择器，覆盖前面各处的单独设置。
 * ========================================================================== */
.card, .card.mini, .tcards .card.mini { border-radius: calc(var(--cw) * .1); }
.card .ci, .card.mini .ci, .tcards .card.mini .ci { top: calc(var(--cw) * .05); left: calc(var(--cw) * .05); }
.card .ci .cr, .card.mini .ci .cr, .tcards .card.mini .ci .cr { font-size: calc(var(--cw) * .5); letter-spacing: -.1em; }
.card .ci .cs, .card.mini .ci .cs, .tcards .card.mini .ci .cs { font-size: calc(var(--cw) * .4); margin-top: calc(var(--cw) * .03); }
.card .cb, .tcards .card.mini .cb { right: calc(var(--cw) * .07); bottom: calc(var(--cw) * .05); font-size: calc(var(--cw) * .66); }
@media (pointer: coarse) {
  .card .ci .cr, .card.mini .ci .cr, .tcards .card.mini .ci .cr { font-size: calc(var(--cw) * .56); }
  .card .ci .cs, .card.mini .ci .cs, .tcards .card.mini .ci .cs { font-size: calc(var(--cw) * .44); }
}

/* 比牌座位：叠放时每张露出的那一截正好放得下牌角（点数 + 花色），所以只是叠法不同，牌本身和手牌一样 */
.table.tview, .table.tview.few, .narrow .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .085), 40px); --peek: .86; --side: .48; }
@media (pointer: coarse) { .table.tview, .table.tview.few, .narrow .table.tview.few { --peek: .94; } }
.tview .trow + .trow { margin-top: calc(var(--tc) * (var(--peek) - 1.4)); }
.tview .tlab { height: calc(var(--tc) * var(--peek)); }
.tview .tcs .card + .card { margin-left: calc(var(--tc) * (var(--side) - 1)); }
.tcs.f3 { min-width: calc(var(--tc) * (1 + 4 * var(--side))); }
/* 摆牌浮层两侧的小牌背、还在摆的人的一排牌背保持原样 */
.tview.floating .trow + .trow { margin-top: calc(var(--tc) * -.52); }
.tview.floating .tcs .card + .card { margin-left: calc(var(--tc) * -.5); }
.tview .trow.fan .tcs .card + .card { margin-left: calc(var(--tc) * -.88); }
.tview.floating .trow.fan .tcs .card + .card { margin-left: calc(var(--tc) * -.78); }

/* 点数图形：高度跟着点数的字号走，线条粗细统一；手机上线条稍粗 */
.card .ci .cr { display: block; line-height: 0; -webkit-text-stroke: 0; }
.card .ci .cr svg { display: block; height: 1.1em; width: auto; overflow: visible; }
.card .ci .cr svg path { fill: none; stroke: currentColor; stroke-width: 13; stroke-linecap: round; stroke-linejoin: round; }
@media (pointer: coarse) { .card .ci .cr svg path { stroke-width: 15; } }
/* 点数图形高度跟字号一样；比牌座位每道多露一点，下面的小花色不再被下一道压住 */
.card .ci .cr svg { height: 1em; }
.table.tview, .table.tview.few, .narrow .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .082), 40px); --peek: .92; }
@media (pointer: coarse) { .table.tview, .table.tview.few, .narrow .table.tview.few { --peek: 1.02; } }
/* 点数风格：C 方头粗体（直角收尾、笔画加粗） */
.card .ci .cr svg path { stroke-width: 17; stroke-linecap: square; stroke-linejoin: miter; stroke-miterlimit: 3; }
@media (pointer: coarse) { .card .ci .cr svg path { stroke-width: 18; } }
/* 点数：高 0.82em、宽按字形放宽（不再瘦长）；线条用屏幕像素粗细，不随拉伸变形 */
.card .ci .cr svg { height: .82em; }
.card .ci .cr svg path { vector-effect: non-scaling-stroke; stroke-width: calc(var(--cw) * .075); }
@media (pointer: coarse) { .card .ci .cr svg path { stroke-width: calc(var(--cw) * .08); } }
/* 比牌座位：横向每张多露一点，点数和下面的花色都不被右边那张盖住 */
.table.tview, .table.tview.few, .narrow .table.tview.few { --side: .56; }
/* 矮屏手机：座位上的牌再小一点，上下两个座位的三道不叠在一起 */
.short .table.tview, .short .table.tview.few { --tcbase: clamp(18px, calc(var(--gh) * .077), 40px); }
/* 倒水：出牌按钮变成红色提示，点了只提示原因，不出牌 */
.btn.foulbtn { color: #fff; font-weight: 900; font-size: 12px; white-space: nowrap; border: 1px solid #ff6b8a; background: linear-gradient(#7a1630, #4a0c1e); box-shadow: 0 0 10px rgba(255, 59, 92, .5); animation: foulPulse 1.2s ease-in-out infinite; }
@keyframes foulPulse { 0%, 100% { box-shadow: 0 0 6px rgba(255, 59, 92, .4); } 50% { box-shadow: 0 0 14px rgba(255, 59, 92, .85); } }

/* 摆牌右侧：去掉自动 / 重摆后，推荐摆法按钮做大（最多 4 个） */
.afloat .side { width: 132px; gap: 7px; }
.narrow .afloat .side { width: 108px; }
.afloat .side .suggest { gap: 7px; }
.tview.floating .afloat .side .suggest .sugg, .afloat .sugg { padding: 10px 6px; font-size: 14px; border-radius: 14px; }
.narrow .afloat .sugg, .tview.floating.narrow .afloat .side .suggest .sugg { padding: 8px 3px; font-size: 12px; }
.short .afloat .sugg, .tview.floating .afloat .side .suggest .sugg { min-height: 0; }
.short .side .suggest .sugg:nth-child(n+3) { display: flex; }
.short .afloat .side .suggest .sugg { padding: 7px 4px; }
.afloat .sugg i { height: 13px; margin: 0 6px; }
.afloat .side .btn.primary, .afloat .side .btn.foulbtn { padding: 10px 6px; font-size: 15px; }
.narrow .tview.floating .afloat .side .suggest .sugg { padding: 8px 3px; font-size: 12px; }
.short .tview.floating .afloat .side .suggest .sugg { padding-top: 7px; padding-bottom: 7px; }
/* 矮屏：推荐摆法按钮和间距收紧，整列不压到下面的牌型按钮 */
.short .afloat .side, .short .afloat .side .suggest { gap: 5px; }
.short .tview.floating .afloat .side .suggest .sugg { padding-top: 6px; padding-bottom: 6px; }
.short .afloat .side .btn.primary, .short .afloat .side .btn.foulbtn { padding: 7px 6px; font-size: 14px; }
/* 确定出牌和上面的推荐按钮、下面的牌型按钮都隔开一段，避免点错 */
.afloat .side { justify-content: flex-start; padding-bottom: 14px; }
.afloat .side .btn.primary, .afloat .side .btn.foulbtn { margin-top: auto; }
.afloat .side .suggest { margin-bottom: 12px; }
.short .afloat .side { padding-bottom: 10px; }
.short .afloat .side .suggest { margin-bottom: 8px; }
.afloat .side { padding-bottom: 18px; }
.short .afloat .side { padding-bottom: 16px; }
.short .tview.floating .afloat .side .suggest .sugg { padding-top: 5px; padding-bottom: 5px; }
.short .afloat .side .suggest { gap: 4px; margin-bottom: 6px; }
.short .afloat .side { padding-bottom: 12px; }
.short .afloat .side { padding-bottom: 18px; }
/* 普通高度的手机：推荐按钮略收一点，整列不超过左边三道的高度 */
.tview.floating .afloat .side .suggest .sugg { padding-top: 7px; padding-bottom: 7px; }
.afloat .side .suggest { gap: 6px; margin-bottom: 10px; }
.afloat .side .btn.primary, .afloat .side .btn.foulbtn { padding: 8px 6px; }
/* 推荐摆法：在确定出牌上方的空间里均匀分开（不挤在最上面，按钮之间留空隙） */
.afloat .side { padding-top: 4px; }
.afloat .side .suggest, .short .afloat .side .suggest { flex: 1; justify-content: space-evenly; gap: 8px; margin-bottom: 10px; }
.afloat .side .btn.primary, .afloat .side .btn.foulbtn { margin-top: 0; }
/* 推荐改回 3 个：上面留出一点空，按钮之间空隙更大 */
.afloat .side { padding-top: 12px; }
.afloat .side .suggest, .short .afloat .side .suggest { gap: 12px; }
.short .afloat .side { padding-top: 6px; }
.short .afloat .side .suggest { gap: 9px; }
/* 推荐按钮之间固定 12px，多出来的空间放在上下 */
.afloat .side .suggest, .short .afloat .side .suggest { justify-content: center; gap: 12px; }

/* ---------- 大厅（第二版） ---------- */
.lobby2 { gap: 8px; }
.lhead { display: flex; align-items: center; gap: 10px; flex: none; }
.lme { display: flex; align-items: center; gap: 8px; padding: 4px 14px 4px 4px; border-radius: 999px; background: rgba(0, 0, 0, .28); border: 1px solid rgba(255, 255, 255, .14); }
.lme .avatar { width: 38px; height: 38px; font-size: 16px; }
.lme b { display: block; font-size: 14px; }
.lme span { font-size: 11px; color: var(--muted); }
/* 大厅顶上的「房卡」小牌子（只在大厅；摆牌框里的三道也叫 .lcards，以前被这里的圆角底色、边框套上了，看着像一个没用的椭圆框） */
.lhead .lcards { display: flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 999px; cursor: pointer; color: #ffe9a8; font-size: 13px; font-weight: 800;
  background: rgba(0, 0, 0, .3); border: 1px solid rgba(255, 215, 106, .55); box-shadow: 0 0 8px rgba(255, 184, 0, .3); }
.lhead .lcards b { font-size: 16px; color: var(--gold, #ffb800); }
.lhead .logo { margin-left: auto; font-size: 22px; }
.lnotice { display: flex; align-items: center; gap: 8px; flex: none; padding: 4px 12px; border-radius: 999px; font-size: 12px; color: #e9e2ff; background: rgba(0, 0, 0, .25); overflow: hidden; white-space: nowrap; }
.lnotice i { font-style: normal; }
.lnotice span { animation: lMarquee 14s linear infinite; }
@keyframes lMarquee { 0% { transform: translateX(60%); } 100% { transform: translateX(-100%); } }
/*
 * 大厅中间（2026-10-21 方案 A「霓虹升级」，效果图 design/home.html）：
 * 左边四张游戏海报（点了带着这个游戏开创建房间），右边一列：创建（主按钮）/ 加入 / 俱乐部 / 战绩。
 */
.lmain { flex: 1; min-height: 0; display: flex; gap: 12px; padding: 4px 6px; }
.lgames { flex: 1; min-width: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; --pk: clamp(26px, calc(var(--gh) * .11), 50px); }
.lgame { --n: #ff4fa0; --n2: rgba(120, 20, 100, .9);
  position: relative; overflow: hidden; min-width: 0; padding: 0; border-radius: 18px; cursor: pointer; color: #fff;
  border: 2px solid var(--n); background: linear-gradient(160deg, var(--n2), rgba(18, 6, 40, .95) 75%);
  box-shadow: 0 0 12px var(--n), inset 0 0 20px rgba(0, 0, 0, .4); transition: transform .12s, box-shadow .15s; }
.lgame.pink { --n: #ff4fa0; --n2: rgba(110, 18, 90, .9); }
.lgame.cyan { --n: #7af3ff; --n2: rgba(12, 74, 90, .9); }
.lgame.gold { --n: #f2c14e; --n2: rgba(96, 62, 8, .9); }
.lgame.violet { --n: #c08bff; --n2: rgba(64, 18, 120, .9); }
.lgame::before { content: ''; position: absolute; inset: 0; background: linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, .14) 50%, transparent 60%); transform: translateX(-100%); animation: lShine 5.5s ease-in-out infinite; }
@keyframes lShine { 0%, 65% { transform: translateX(-100%); } 100% { transform: translateX(100%); } }
.lgame.on { box-shadow: 0 0 18px var(--n), 0 0 36px var(--n), inset 0 0 20px rgba(0, 0, 0, .3); }
.lgame:active { transform: scale(.97); }
.lgame b { position: absolute; left: 0; right: 0; bottom: 10%; text-align: center; font-size: clamp(16px, calc(var(--gh) * .058), 24px); font-weight: 900; letter-spacing: 3px; white-space: nowrap; text-shadow: 0 0 8px var(--n), 0 0 18px var(--n); }
.lgtag { position: absolute; left: 8px; top: 8px; z-index: 1; padding: 1px 8px; border-radius: 8px; font-size: 11px; font-weight: 900; font-style: normal; color: #2a0a20; background: var(--n); }
.lgart { position: absolute; left: 0; right: 0; top: 22%; display: flex; justify-content: center; }
/* 海报里的牌扇形排开 */
.lgart .mpk { margin: 0 calc(var(--pk) * -.06); }
.lgart .mmt { margin: 0 calc(var(--pk) * .04); }
.lgart > :first-child { transform: rotate(-14deg) translateY(8%); }
.lgart > :nth-child(3) { transform: rotate(14deg) translateY(8%); }
.lgart.g-diaoyu { flex-direction: column; align-items: center; }
.lgart .hook { width: calc(var(--pk) * .9); margin-top: 6px; fill: none; stroke: #d9b8ff; stroke-width: 3.5; stroke-linecap: round; filter: drop-shadow(0 0 4px #c08bff); }
.lgart.g-diaoyu > :first-child { transform: none; }
/* 小扑克牌 / 小麻将牌（登录页和海报共用，大小跟着 --pk） */
.mpk, .mmt { display: block; flex: none; font-style: normal; box-shadow: 0 0 0 1px rgba(0, 0, 0, .25), 0 4px 10px rgba(0, 0, 0, .45); }
.mpk { width: var(--pk); height: calc(var(--pk) * 1.4); border-radius: calc(var(--pk) * .13); padding: calc(var(--pk) * .1) calc(var(--pk) * .12); box-sizing: border-box;
  background: linear-gradient(#fffef8, #f1e8cf); color: #1a1a1a; font: 900 calc(var(--pk) * .38)/1 Georgia, serif; text-align: left; }
.mpk.r { color: #c8102e; }
.mpk em { display: block; font-style: normal; font-size: calc(var(--pk) * .33); margin-top: 2px; }
.mpk.back { background: linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 60%), repeating-linear-gradient(45deg, #2a6fd6 0 3px, #1a4fa8 3px 6px); box-shadow: 0 0 0 1.5px #f2c14e, 0 4px 10px rgba(0, 0, 0, .45); }
.mmt { width: calc(var(--pk) * .76); height: var(--pk); border-radius: calc(var(--pk) * .13); background: linear-gradient(#fffef6, #e9e2cc);
  box-shadow: 0 calc(var(--pk) * -.09) 0 #2f8f5a inset, 0 0 0 1px rgba(0, 0, 0, .25), 0 4px 8px rgba(0, 0, 0, .45);
  color: #c8102e; font: 900 calc(var(--pk) * .5)/calc(var(--pk) * .9) "KaiTi", "STKaiti", serif; text-align: center; }
.mmt.g { color: #157a43; }
.lgart .mmt:nth-child(3) { color: #1a3a8a; }
/* 右边一列：创建房间是全页唯一的实心主按钮，其余深色玻璃 + 霓虹描边 */
.lacts { flex: none; width: clamp(128px, calc(var(--gw) * .19), 170px); display: flex; flex-direction: column; gap: 10px; }
.lact { --n: #7af3ff; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 8px; padding: 0 10px; border-radius: 14px; cursor: pointer; color: #fff;
  border: 1.5px solid var(--n); background: rgba(10, 4, 30, .55); box-shadow: 0 0 10px var(--n); transition: transform .1s; }
.lact:active { transform: scale(.97); }
.lact i { width: 22px; height: 22px; flex: none; color: var(--n); font-style: normal; }
.lact .ico { width: 100%; height: 100%; filter: drop-shadow(0 0 3px var(--n)); }
.lact b { font-size: clamp(14px, calc(var(--gh) * .045), 17px); font-weight: 900; letter-spacing: 2px; white-space: nowrap; }
.lact.create { flex: 1.35; border: 0; background: linear-gradient(#ff9ad0, #ff4fa0 50%, #b14cff); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .6), 0 4px 0 #6a1a8a, 0 0 18px rgba(255, 79, 160, .7); }
.lact.create i { color: #fff; }
.lact.create b { font-size: clamp(16px, calc(var(--gh) * .052), 20px); }
.lact.join { --n: #7af3ff; }
.lact.club { --n: #f2c14e; }
.lact.records { --n: #c08bff; }
/* 底部一排小功能：线条图标，按下时亮一下 */
.lbar { display: flex; justify-content: center; gap: 4px; flex: none; padding: 2px 0 4px; }
.lnav { display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 64px; padding: 4px 8px; border: 0; border-radius: 12px; background: none; color: #e9e2ff; cursor: pointer; font-size: 11px; font-weight: 800; }
.lnav i { width: 22px; height: 22px; font-style: normal; color: #f4ecff; }
.lnav .ico { width: 100%; height: 100%; filter: drop-shadow(0 0 3px rgba(255, 140, 230, .7)); }
.lnav:active { background: rgba(255, 255, 255, .08); }
.lnav:active i { color: var(--cyan); }
/* 通用线条图标 */
.ico { display: block; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lhead .lcards .ico { width: 18px; height: 18px; color: var(--gold, #ffb800); filter: drop-shadow(0 0 3px rgba(255, 184, 0, .7)); }
.lnotice i .ico { width: 16px; height: 16px; color: #ffd34d; }
/* 弹出面板 */
.joinbox { display: flex; gap: 8px; margin: 6px 0 10px; }
.joinbox input { flex: 1; font-size: 20px; letter-spacing: 4px; text-align: center; padding: 8px; }
.service p { margin: 6px 0; line-height: 1.6; }
.service .gold { color: var(--gold, #ffb800); font-size: 18px; }
.service .pidbig { font-size: 24px; letter-spacing: 3px; color: var(--gold, #ffb800); margin-right: 8px; }
.sheet .rules p { line-height: 1.65; margin: 6px 0; }
.short .lnav i { font-size: 19px; }
.lhead .lcards { flex: none; width: auto; }

/* 推荐摆法里牌型名字长（如「对子 / 同花顺 / 同花顺」）时缩小字号、收紧分隔线，三道名字都放得下 */
.tview.floating .afloat .side .suggest .sugg.long, .sugg.long { font-size: 12px; padding-left: 3px; padding-right: 3px; letter-spacing: -.3px; }
.afloat .sugg.long i, .sugg.long i { margin: 0 3px; }
.narrow .tview.floating .afloat .side .suggest .sugg.long, .narrow .sugg.long { font-size: 10px; }

/* 座位上一直显示的本场累计：做成小胶囊，比 ID 醒目 */
.tinfo .tsum.tacc { margin-top: 2px; padding: 1px 7px; border-radius: 999px; font-size: 10px; color: #d9cffb; background: rgba(20, 6, 48, .72); border: 1px solid rgba(255, 215, 106, .35); max-width: none; line-height: 1.4; }
.tinfo .tsum.tacc b { font-size: 12px; font-weight: 800; display: inline-block; }
.short .tinfo .tsum.tacc { font-size: 9px; padding: 0 5px; }
.short .tinfo .tsum.tacc b { font-size: 11px; }
/* 顶栏自己的名字和 ID 上下排，省出位置放累计 */
.mechip .mename { display: flex; flex-direction: column; line-height: 1.1; font-size: 10px; }
.mechip .mename b { font-size: 11px; }

/* 座位上的累计（如「累计 -1802」）比信息栏宽时，往外侧（远离牌的一边）伸出去，不压到牌上 */
.tseat.side-r .tinfo .tsum.tacc { align-self: flex-end; }
.tseat.side-l .tinfo .tsum.tacc { align-self: flex-start; }
.tinfo .tsum.tacc { padding: 1px 5px; }
.tinfo .tsum.tacc b { font-size: 11px; }
/* 正上 / 正下的座位两边都有邻座：累计居中，信息栏和牌之间多留点空 */
.tseat.mid { gap: 10px; }
.tseat.mid .tinfo .tsum.tacc { align-self: center; }

/* 王牌：左上竖排 JOKER（线条画），右下小丑头像；全部按 --cw 比例，大小牌、手机电脑一个样 */
.card.joker.big { background: radial-gradient(circle at 70% 70%, #fff6dc 0, #fff 70%); }
.card.joker.small { background: radial-gradient(circle at 70% 70%, #eef1f6 0, #fff 70%); }
.card.joker .jw { position: absolute; z-index: 1; top: calc(var(--cw) * .07); left: calc(var(--cw) * .07); width: auto; height: calc(var(--cw) * .9); font-size: inherit; overflow: visible; }
.card.joker .jw path { fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: calc(var(--cw) * .045); }
.card.joker .jf { position: absolute; right: calc(var(--cw) * .04); bottom: calc(var(--cw) * .05); width: calc(var(--cw) * .68); height: auto; filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .25)); }

/* 悬浮摆牌框：三道的牌比手牌略小、上下留白收紧，整块高度不超出上半区，不挡下面一排牌型按钮 */
.tview.floating .afloat .lanes { padding-top: 2px; padding-bottom: 2px; }
.tview.floating .afloat .lane { padding-top: 0; padding-bottom: 0; }
.tview.floating .afloat .lcards { padding-top: 3px; padding-bottom: 3px; }
.afloat .arrange { --cw: clamp(26px, calc((var(--gh) - 134px) / 5.6), 70px); }
.narrow .afloat .arrange { --cw: min(clamp(26px, calc((var(--gh) - 134px) / 5.6), 70px), calc((var(--aw) - 190px) / 5.2)); }

/* 13 张摆好后牌框下方的「取消 / 确定出牌」：手牌那一行的位置，高度不变，牌框不会跳 */
.afloat .hand.done { justify-content: center; }
.donebar { position: relative; display: flex; align-items: center; justify-content: center; gap: clamp(16px, 6vw, 60px); width: 100%; }
.donebar .dbtn { min-width: clamp(110px, 24%, 230px); height: clamp(36px, calc(var(--cw) * .9), 54px); padding: 0 18px; border-radius: 14px; font-size: clamp(15px, calc(var(--cw) * .38), 22px); font-weight: 900; letter-spacing: 2px; color: #fff; border: 0; text-shadow: 0 1px 2px rgba(0, 0, 0, .35); }
/* 摆好牌：取消 = 深色玻璃 + 青色霓虹描边；确定出牌 = 全站统一的粉紫霓虹主按钮（不再是绿 / 蓝两块糖果色） */
.donebar .dbtn.cancel { color: #e9fdff; background: linear-gradient(rgba(30, 14, 70, .92), rgba(12, 4, 34, .92)); border: 1.5px solid #7af3ff;
  text-shadow: 0 0 6px rgba(122, 243, 255, .8); box-shadow: 0 0 10px rgba(122, 243, 255, .45), inset 0 0 10px rgba(122, 243, 255, .15); }
.donebar .dbtn.ok { background: linear-gradient(135deg, #ff9ad0 0%, #ff4fa0 42%, #b14cff 100%); border: 1.5px solid rgba(255, 210, 245, .85);
  text-shadow: 0 1px 0 rgba(90, 0, 70, .55); box-shadow: 0 3px 0 #7a1a8f, 0 0 16px rgba(255, 90, 210, .6), 0 0 26px rgba(177, 76, 255, .35), inset 0 1px 0 rgba(255, 255, 255, .45); }
.donebar .dbtn.foulbtn { letter-spacing: 0; }
.donebar .dbtn:active { transform: scale(.96); }
.donebar .dhint { position: absolute; left: 50%; bottom: calc(100% + 1px); transform: translateX(-50%); white-space: nowrap; font-size: 10px; opacity: .75; }

/* ---------- 申请解散的投票框（盖在所有牌桌上面） ---------- */
.dissbox { position: fixed; inset: 0; z-index: 70; display: flex; align-items: center; justify-content: center; padding: 12px; background: rgba(5, 8, 14, .66); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); }
.dissheet { max-height: 100%; overflow: auto; }
.dissheet p { margin: 4px 0; font-size: 13px; }
.disslist { list-style: none; margin: 6px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 4px 10px; }
.disslist li { display: flex; align-items: center; gap: 6px; font-size: 12px; min-width: 0; }
.disslist li .avatar { width: 24px; height: 24px; font-size: 11px; flex: none; }
.disslist li b { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.disslist li span { color: var(--muted); }
.disslist li.ok span { color: var(--mate, #2fd27a); font-weight: 700; }
.dissbtns { display: flex; gap: 10px; justify-content: center; margin-top: 6px; }
.dissbtns .btn { min-width: 110px; }

/* ---------- 登录 / 注册（手机横屏高度很紧：注册的四个框排两列） ---------- */
/* 左右两栏：左边霓虹招牌 + 飘着的牌，右边玻璃登录框（2026-10-21 方案 A） */
.loginscreen { flex-direction: row; align-items: center; justify-content: center; gap: clamp(16px, calc(var(--gw) * .05), 56px); }
.lhero { flex: 0 1 auto; min-width: 0; display: flex; flex-direction: column; align-items: center; --pk: clamp(30px, calc(var(--gh) * .13), 52px); }
.nsign { padding: calc(var(--gh) * .05) calc(var(--gh) * .08); border: 3px solid #7af3ff; border-radius: 18px;
  box-shadow: 0 0 8px #7af3ff, 0 0 24px rgba(122, 243, 255, .6), inset 0 0 14px rgba(122, 243, 255, .5); }
.nsign span { display: block; font-size: clamp(36px, calc(var(--gh) * .16), 70px); line-height: 1; font-weight: 900; letter-spacing: .14em; margin-right: -.14em; white-space: nowrap; color: #fff;
  text-shadow: 0 0 4px #fff, 0 0 12px #ff4fa0, 0 0 26px #ff4fa0, 0 0 46px #b14cff; animation: nFlick 5s infinite; }
@keyframes nFlick { 0%, 92%, 100% { opacity: 1; } 93% { opacity: .35; } 95% { opacity: 1; } 96% { opacity: .5; } }
.lhero .tagline { margin: calc(var(--gh) * .04) 0 0; color: #c9b8ff; letter-spacing: 3px; font-size: 13px; white-space: nowrap; }
.lfly { display: flex; align-items: flex-end; gap: calc(var(--pk) * .25); margin-top: calc(var(--gh) * .06); }
.lfly > * { animation: lFloat 4s ease-in-out infinite; }
.lfly > :nth-child(1) { --r: -14deg; }
.lfly > :nth-child(2) { --r: -4deg; animation-delay: .4s; }
.lfly > :nth-child(3) { --r: 8deg; animation-delay: .8s; }
.lfly > :nth-child(4) { --r: 16deg; animation-delay: 1.2s; }
.lfly > :nth-child(5) { --r: -10deg; animation-delay: 1.6s; }
@keyframes lFloat { 0%, 100% { transform: translateY(0) rotate(var(--r)); } 50% { transform: translateY(-8px) rotate(var(--r)); } }
.loginscreen.reg .lfly, .loginscreen.reg .tagline { display: none; } /* 注册的框宽，左边只留招牌 */
.loginscreen.reg .loginform.reg { width: min(460px, calc(var(--gw) - 230px)); }
.loginscreen.reg .nsign span { font-size: clamp(30px, calc(var(--gh) * .12), 52px); }
.loginform { width: 360px; flex: none; }
.loginform.reg { width: 460px; }
.loginform .ltitle { margin: 0; text-align: center; font-size: 17px; font-weight: 900; letter-spacing: 4px; color: #fff; text-shadow: 0 0 8px rgba(255, 79, 160, .7); }
.lswitch { margin: 0; text-align: center; font-size: 13px; color: var(--muted); }
.linkbtn { padding: 2px 4px; border: 0; background: none; cursor: pointer; font: inherit; font-weight: 800; color: #7af3ff; text-decoration: underline; text-underline-offset: 3px; }
.lfields { display: grid; grid-template-columns: 1fr; gap: 6px; }
.loginform.reg .lfields { grid-template-columns: 1fr 1fr; }
.lfield { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.lfield span { color: var(--muted); font-size: 12px; }
.lfield input { width: 100%; box-sizing: border-box; }

/* ---------- 选头像 ---------- */
.avtabs { display: flex; gap: 4px; margin-bottom: 6px; }
.avtab { flex: 1; padding: 4px 0; border-radius: 8px; border: 1px solid var(--line-strong); background: var(--surface-2, rgba(255,255,255,.06)); color: var(--muted); font-size: 12px; font-weight: 700; cursor: pointer; }
.avtab.on { color: #2a1200; background: linear-gradient(var(--gold-light, #fff1a8), var(--gold, #ffd34d)); border-color: transparent; }
.avpick { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px; }
.avopt { padding: 0; border: 2px solid transparent; border-radius: 50%; background: none; cursor: pointer; aspect-ratio: 1; line-height: 0; transition: transform .12s; }
.avopt img { width: 100%; height: 100%; border-radius: 50%; display: block; }
.avopt.on { border-color: var(--gold, #ffd34d); box-shadow: 0 0 10px rgba(255, 211, 77, .8); transform: scale(1.08); }
.loginform.reg { width: 460px; }
/* 注册页：当前头像 + 换头像按钮（选头像在弹窗里分类选，注册框不会太高） */
.regav { display: flex; align-items: center; gap: 8px; }
.regav img { width: 40px; height: 40px; border-radius: 50%; box-shadow: 0 0 0 2px var(--gold, #ffd34d); }
.regav .hint { flex: 1; }
.avsheet .avopt img { min-width: 0; }
.profiletop { display: flex; align-items: flex-end; gap: 10px; margin-bottom: 8px; }
.profiletop .avatar { width: 52px; height: 52px; font-size: 20px; flex: none; }
.profiletop .lfield { flex: 1; }
.lme[data-action] { cursor: pointer; }

/* ---------- 添加到桌面的说明 ---------- */
.installtop { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.installtop img { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 0 12px rgba(255, 90, 210, .45); }
.installtop b { display: block; font-size: 16px; }
.installtop span { font-size: 12px; color: var(--muted); }
.installsteps { list-style: none; margin: 6px 0 10px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.installsteps li { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.installsteps li > b { flex: none; width: 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: #2a1200; background: linear-gradient(var(--gold-light, #fff1a8), var(--gold, #ffd34d)); }
.kbd { display: inline-block; min-width: 18px; padding: 0 5px; border-radius: 5px; border: 1px solid var(--line-strong); font-style: normal; text-align: center; }

/* 顶栏的小图标按钮（设置、聊天）：线条图标 */
.btn.icon .ico { width: 16px; height: 16px; }

/* ---------- 开局发牌动画（public/deal-fx.js） ---------- */
#dealfxlayer { position: absolute; inset: 0; z-index: 46; pointer-events: none; overflow: visible; }
.dealghost, .dealdeck { position: absolute; }
.dealghost > *, .dealdeck > * { position: absolute; inset: 0; width: 100% !important; height: 100% !important; margin: 0 !important; }
.dealdeck > :nth-child(2) { transform: translate(-2px, -2px); }
.dealdeck > :nth-child(3) { transform: translate(-4px, -4px); }
.card.dealback { cursor: default; border: 1.5px solid #f2c14e; box-shadow: 0 3px 8px rgba(0, 0, 0, .45);
  background: linear-gradient(135deg, rgba(255, 255, 255, .15), transparent 60%), repeating-linear-gradient(45deg, var(--cb-1, #2a6fd6) 0 3px, var(--cb-2, #1a4fa8) 3px 6px); }

/* 手机上长按不选字、不弹「复制 / 全选」菜单（用户 2026-10-20：长按会变成复制，影响操作）；输入框里照常能选字、粘贴 */
#stage, #stage * { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; }
#stage input, #stage textarea, #stage [contenteditable="true"] { -webkit-user-select: text; user-select: text; -webkit-touch-callout: default; }
#stage img { -webkit-user-drag: none; }

/* 设置里的音量：10 格 + −/＋ */
.volrow { display: flex; align-items: center; gap: 6px; padding: 0 2px 8px; }
.volrow.off { opacity: .45; }
.volrow .btn.sm { min-width: 30px; padding: 2px 0; font-size: 15px; line-height: 1.2; }
.volbars { flex: 1; display: flex; align-items: flex-end; gap: 3px; height: 22px; }
.volbars i { flex: 1; height: 100%; border-radius: 3px; cursor: pointer; background: rgba(255, 255, 255, .14); }
.volbars i:nth-child(1) { height: 40%; } .volbars i:nth-child(2) { height: 46%; } .volbars i:nth-child(3) { height: 52%; }
.volbars i:nth-child(4) { height: 58%; } .volbars i:nth-child(5) { height: 64%; } .volbars i:nth-child(6) { height: 70%; }
.volbars i:nth-child(7) { height: 76%; } .volbars i:nth-child(8) { height: 82%; } .volbars i:nth-child(9) { height: 90%; }
.volbars i.on { background: linear-gradient(#ffe48a, #f2b705); box-shadow: 0 0 6px rgba(255, 200, 80, .5); }
.volrow b { min-width: 36px; text-align: right; font-size: 12px; color: var(--text); }
