
:root { --bg: #080b11;
  --bg2: #0e141d;
  --panel: #141b26;
  --panel2: #1a2331;
  --line: #253044;
  --ink: #e9eef7;
  --muted: #8795ac;
  --gold: #edbe4c;
  --gold-d: #b98c1f;
  --red: #f0545f;
  --green: #2fbf71;
  --felt-a: #1b5c46;
  --felt-b: #0b2b21;
  --radius: 16px;
  /* e226：底部全局导航栏高度。safe-area 一起算进来，body 留白、固定浮层避让
     和导航栏自身高度全部引用同一个变量，横屏矮屏只需覆盖这一处。 */
  /* e298：去掉「34px 钳制」。原钳制是为防个别安卓 ROM 把 safe-area-inset-bottom
     报成 60~80px 把导航栏顶太高；但钳制会让 --tb-h 比设备真实安全区更矮，
     在 iPhone 上表现为「导航栏没盖住底部安全区、下方露出一大截空白」。
     改用真实 env()：导航栏始终完整盖住设备安全区，下方不再留白（异常大值仍用
     50px 上限兜底，兼顾安卓极端情况）。 */
  --tb-h: calc(58px + min(env(safe-area-inset-bottom, 0px), 50px));
  /* e304：【导航栏内容垂直居中·上抬量】原先写死 12px，在 border-box 下会把内容盒
     压矮、图标+文字整体上移约 6px，用户反馈「偏上、不在导航栏板块居中、不协调」。
     现在默认只留 2px 极小的圆弧避让，图标文字基本在可见区内垂直居中。
     想再往上抬就改大这个值（如 4px/6px），想完全居中就设 0px。 */
  --tb-lift: 2px;
  /* e521：苹果安全区，由 index.html 的 syncBottomGap 写入；非苹果端保持 0。 */
  --ios-safe-top: 0px;
  --ios-safe-bottom: 0px;
  --ios-nav-height: 52px;
  --ios-nav-bottom: 0px;
  /* e515：苹果端网页视口比屏幕短时（底部安全区没算进视口），导航栏需要向下补的距离。
     JS 会按 screen.height - innerHeight 写入；非苹果 / 正常机型保持 0px，布局完全不变。 */
  --ios-bottom-gap: 0px; }
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent;
  /* e288/e289：关掉安卓 Chrome 长按唤出的系统标注菜单（「手动标记广告」等）。
     Chrome 安卓不吃 -webkit-touch-callout，靠 JS 全局拦截 contextmenu 才拦得住；
     这里同时 user-select:none，防止长按选中文本后弹出「标记为广告」选择工具条。
     输入框单独放开（见下行）。 */
  -webkit-touch-callout: none; -webkit-user-select: none; user-select: none; }
/* 输入框仍需可聚焦与选中文本，单独放开 user-select */
input, textarea, [contenteditable="true"] { -webkit-user-select: auto; user-select: text; }
/* e378：小米浏览器长按图片/SVG 弹「标记为广告」——禁止长按图片行为 */
img, svg, canvas { -webkit-touch-callout: none !important; -webkit-user-drag: none; }
html, body { margin: 0; padding: 0; height: 100%;
  /* e534 ★根因修复★：原先这里是 radial-gradient(#1a2434 → var(--bg)=#080b11)，
     而 .view 全透明、顶栏 #0a0e15、导航 #161e2b→#0f1622、html 兜底 #0f1622，
     全站共有 4 档底色。iPhone 上叠加半透明状态栏与安全区裁切后，就变成用户反复
     圈出的「上下一条条颜色分层的黑边」。逐像素扫描（tools/_pixdiag.cjs）实测：
       y=0..95 rgb(8,16,24) / y=771..791 rgb(8,8,16) /
       y=793..823 rgb(24,32,40) / y=838..843 rgb(15,22,34)。
     现在全站统一一个纯色，视口怎么裁、状态栏怎么盖，露出的都是同一种颜色，
     从根上不再产生任何「分层带」。这是确定性修复，不依赖 env / 机型 / 窗口判定。 */
  background: #0f1622;
  /* e532：底色与 html 的兜底色、theme-color、导航渐变末端统一为 #0f1622。
     原先 html=#0f1622 / body=#080b11 不一致：iOS 视口比物理屏矮时，
     底部露出的那一截是 html 底色，和页面主体差一档 → 被看成「一条黑边」。 */
  background-color: #0f1622;
  color: var(--ink);
  font-family: system-ui, -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 0.9375rem;
  color-scheme: dark;
  overflow: hidden;
  /* e378：小米浏览器长按弹「标记为广告」——禁止长按选中/拖拽图片，从CSS层挡住 */
  -webkit-touch-callout: none !important;
  -webkit-user-select: none !important;
  user-select: none !important;
  touch-action: manipulation; }
/* e284f：html 兜底纯深色底，确保任何间隙都不会露出系统默认白画布
   e302：【全局文字大小·唯一总开关】固定根字号 17px（不再由 JS 按屏宽算，避免安卓/苹果不一致、文字爆大溢出）。
        所有 font-size 都已折算成 rem（= 相对此根字号），所以改这一个数字即可整体放大/缩小全部文字，
        且苹果/安卓/鸿蒙 拿到同一个值、显示完全一致。想更大改 18/19，想更小改 16（不建议低于 16）。
        text-size-adjust:100% 关掉安卓浏览器对小字的“自动放大”，从根上保证三端一致。
        e344：安卓端按用户要求单独小幅收紧到 16.5px，规则在文件末尾
              html[data-dev="android"]{font-size:16.5px}；改/回退去那一处，别动这里的 17px。 */
html { background-color: #0f1622; font-size: 17px;
  -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit;
  /* e307：显式化按钮文字对齐基线，避免各机型 UA 默认值不同造成细微偏移 */
  text-align: center; vertical-align: middle; }
input { font-family: inherit; }
.muted { color: var(--muted); }
.dot { margin: 0 6px; color: var(--line); }

/* ───────────── 视图切换 ───────────── */
/* e284f：视图改用 fixed + inset:0 锚定「可视视口」，彻底规避 iOS/Android 在
   PWA 独立模式下 100vh/100% 算错、键盘弹起或旋转后视口重算导致的「底部白条
   时有时无」。顶部让出状态栏安全区（修掉内容顶进半透明状态栏被模糊），
   底部让出常驻导航栏高度（内容不再被 tabbar 盖住）。 */
.view { display: none; position: fixed; inset: 0;
  /* e534：视图自身铺不透明同色底，内容再短也不会透出 body 渐变末端那截近黑区 */
  background: #0f1622;
  padding-top: env(safe-area-inset-top, 0px);
  padding-bottom: var(--tb-h);
  flex-direction: column;
  /* e298：每个视图独立层叠上下文，避免 iOS Safari 把相邻视图/公告栏错误叠绘穿透 */
  isolation: isolate; }
.view.active { display: flex; }
/* 已登录刷新瞬间：登录/注册页先不画，避免登录页和左上角音乐浮球闪现（showView 会立刻摘掉该类） */
html.has-token #viewLogin, html.has-token #viewRegister { display: none; }

/* ── e226：每个页面底部常驻的全局导航栏 ──
   贴视口底部，5 个按钮 flex:1 1 0 严格等宽、均匀分布；图标统一 24 视框
   线性 SVG，不依赖 emoji 字体，任何设备上大小粗细都一致。
   z-index 45：低于模态弹窗(50)/用户小面板(60)/toast(100)，弹窗打开时
   导航栏自然被遮住；高于页面内容，任何时候都能点。 */
.tabbar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 45;
  height: var(--tb-h);
  display: flex; align-items: stretch; justify-content: space-between;
  /* e304：【导航栏垂直居中】env() 只负责让出系统安全区（Home 指示条 / 圆弧），
     额外的上抬量改由变量 --tb-lift 控制，默认 2px。
     e302 曾固定写死 12px，导致图标文字被顶上去、明显偏上不居中，现已纠正。
     想调整上抬幅度：改 :root 里的 --tb-lift（0px = 完全居中）。栏背景仍铺满底部不露白。 */
  padding-bottom: calc(env(safe-area-inset-bottom, 0px) + var(--tb-lift));
  /* e286b：底部渐变收口到近黑色，与系统导航栏（color-scheme:dark 下的黑条）无缝融合，
     消掉「导航栏下方一段突兀黑区」的割裂感 */
  /* 底部安全区不再用「接近页面底色」收口，否则 iPhone 上这一截会被看成凭空多出的空白 */
  /* e534：导航渐变 + 向下投影正是「导航上方一条近黑带、下方一条异色带」的来源，
     统一为全站纯色；只保留 1px 金色描边作为设计分界（不再是色块）。 */
  background: #0f1622;
  border-top: 1px solid rgba(237, 190, 76, .20); }
.tb-item { flex: 1 1 0; min-width: 0;                 /* 五等分，不因文字长短而宽窄不一 */
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; padding: 4px 2px;
  /* e302：【底部导航栏文字·五个标签：首页/充值/好友/买房卡/我的】在全局放大基础上再单独加大一档，
     想更醒目就调大此值（如 0.875rem）。图标尺寸见下方 .tb-item svg 的 width/height。 */
  color: var(--muted); font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.0187rem;
  white-space: nowrap;
  transition: color .15s, transform .12s; }
/* e302：【底部导航栏图标】21→22px，与文字同步放大 */
.tb-item svg { width: 22px; height: 22px; flex: 0 0 auto;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round; }
.tb-item:active { transform: scale(.93); }
.tb-item.active { color: var(--gold); }
.tb-item.active svg { filter: drop-shadow(0 0 6px rgba(237, 190, 76, .45)); }
@media (max-width: 360px) {
.tb-item { font-size: 0.625rem; }
.tb-item svg { width: 19px; height: 19px; }}
@media (max-height: 460px) and (orientation: landscape) {
:root { --tb-h: calc(46px + min(env(safe-area-inset-bottom, 0px), 50px)); }
.tb-item { gap: 1px; font-size: 0.5938rem; }
.tb-item svg { width: 18px; height: 18px; }}

/* e226：「好友」导航按钮打开的邀请弹窗（推荐码 / 链接 / 返佣战绩） */
.tb-ref-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-ref-code { font-size: 1.25rem; letter-spacing: 0.125rem; color: var(--gold); }
.tb-ref-link { flex: 1 1 160px; min-width: 0;
  font-size: 0.7188rem; color: var(--muted); word-break: break-all; }

/* ───────────── 通用按钮 ───────────── */
.btn { border-radius: 10px; padding: 9px 16px; font-size: 0.875rem; font-weight: 600;
  transition: transform .12s, filter .15s, background .15s;
  max-width: 100%; white-space: nowrap; }
.btn:active { transform: scale(.97); }
.btn.sm { padding: 6px 12px; font-size: 0.8125rem; }
.btn-gold { background: linear-gradient(180deg, #f7d374, var(--gold) 45%, var(--gold-d));
  color: #2a1e00;
  box-shadow: 0 4px 14px rgba(237, 190, 76, .22), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-gold:hover { filter: brightness(1.06); }
.btn-gold:disabled { opacity: .38; filter: grayscale(.5); box-shadow: none; cursor: not-allowed; }
.btn-ghost:disabled { opacity: .38; filter: grayscale(.5); box-shadow: none; cursor: not-allowed; }
.btn-ghost { background: rgba(255,255,255,.05);
  border: 1px solid var(--line);
  color: var(--ink); }
.btn-ghost:hover { background: rgba(255,255,255,.1); }
/* 危险操作按钮：红描边，用于「清空数据」等不可逆操作 */
.btn-danger { background: rgba(240,84,95,.08);
  border: 1px solid rgba(240,84,95,.5);
  color: var(--red, #f0545f); }
.btn-danger:hover { background: rgba(240,84,95,.16); border-color: var(--red, #f0545f); }

/* e307：【全站「图标/emoji + 文字」按钮统一对齐】
   审查发现有 21 个按钮把符号与文字直接写进同一个文本节点：emoji 是彩色位图、
   ♠♥ 是文本符号、汉字又是另一套字形，三者基线不同 → 视觉上一高一低、忽大忽小。
   统一结构 = <button class="ico-txt"><span class="ico">…</span><span class="txt">…</span></button>：
   图标占固定宽度槽、文字按内容宽，整组 inline-flex 双向居中、line-height:1。
   该左对齐的（如聊天「+」面板）加 .left，保持 justify-content:flex-start。 */
.ico-txt { display: inline-flex; align-items: center; justify-content: center;
  gap: 6px; line-height: 1; text-align: center; vertical-align: middle; }
.ico-txt.left { justify-content: flex-start; text-align: left; }
.ico-txt .ico { flex: 0 0 auto; width: 1.3em; font-size: 1.0625rem; line-height: 1;
  text-align: center; }
.ico-txt .txt { flex: 0 1 auto; min-width: 0; line-height: 1; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }

/* e307：【全站防溢出 / 对齐加固】依据 tools/audit-layout.cjs 静态审查结果
   ① 盲注模式 JS 会给 #bpKeys 设 hidden，但 .bp-keys 的 display:grid 会盖掉浏览器
      默认的 [hidden]{display:none}，花色按钮其实藏不住 → 这里显式兜底。
   ② 以下是「可能变长的单行文本」容器：统一 max-width + 省略号，窄屏不再撑破卡片。
   ③ flex 子项补 min-width:0：缺它时子项永不收缩，ellipsis 根本不会触发
      （e303「最近登入」撑破个人中心就是这个原因）。
   注：grid 列已全部由 1fr 改为 minmax(0,1fr)，防止长内容把列撑出容器。 */
.bp-keys[hidden] { display: none; }
.lh-sub, .round-info, .bs-label, .mr-tag, .bet-mode button {
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.mr-meta, .rc-up-body, .side .room-chat-panel, .profile-wrap, .side .panel,
.chips-wrap, .wd-submit-field { min-width: 0; }

/* ───────────── 登录 ───────────── */
#viewLogin { align-items: center; justify-content: center; }
.login-wrap { width: 380px; max-width: 92vw; text-align: center; }
/* e566：gap 不接受负值，原值被浏览器直接忽略；重叠效果本来就是靠 .bc 的负 margin 实现的 */
.brand-cards { display: flex; justify-content: center; margin-bottom: 8px; height: 74px; }
.bc { width: 52px; height: 72px; border-radius: 9px;
  background: linear-gradient(160deg, #fdfefe, #d9e0ea);
  color: #12161f; font-size: 1.875rem; line-height: 72px;
  box-shadow: 0 10px 24px rgba(0,0,0,.5);
  display: inline-block; margin: 0 -9px; }
.bc1 { transform: rotate(-14deg) translateY(6px); }
.bc2 { transform: rotate(-5deg) translateY(-2px); color: var(--red); }
.bc3 { transform: rotate(5deg) translateY(-2px); }
.bc4 { transform: rotate(14deg) translateY(6px); color: var(--red); }
/* e331：letter-spacing 会在行尾多占一格空白，居中时整串墨迹被推左 half(ls)。
   text-indent 取一整格 ls，等于把墨迹往右挪回 ls/2，和 .lh-txt b 的既有做法一致。 */
.brand h1 { font-size: 2.125rem; letter-spacing: 0.625rem; text-indent: 0.625rem; margin: 14px 0 4px; font-weight: 800;
  background: linear-gradient(180deg, #ffe9a8, var(--gold));
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.brand-sub { color: var(--muted); font-size: 0.8125rem; letter-spacing: 0.125rem; text-indent: 0.125rem; margin: 0 0 26px; }
.login-card { background: rgba(20, 27, 38, .9); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; text-align: left;
  box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.login-card label { font-size: 0.6875rem; color: var(--muted); letter-spacing: 0.0625rem; }
.login-card input { width: 100%; margin: 8px 0 16px; --login-inp-py: 12px; padding: var(--login-inp-py) 14px; border-radius: 10px;
  background: #0b1119; border: 1px solid var(--line); color: var(--ink);
  font-size: 0.9375rem; outline: none; transition: border-color .15s; }
.login-card input:focus { border-color: var(--gold); }
.login-card .btn { width: 100%; padding: 12px; font-size: 0.9375rem; }
.login-msg { margin: 0 0 12px; padding: 10px 12px; border-radius: 8px; font-size: 0.75rem; line-height: 1.5; text-align: center; background: rgba(240,84,95,.12); border: 1px solid rgba(240,84,95,.35); color: #ffb3b8; }
/* e319：全局灰色说明文字统一收小一档（用户批注「所有页面带框中有灰色文字的字体都偏大，
   统一改小一点」）。原来 0.75rem = 12.75px 在手机上显得比正文还抢眼，
   降到 0.6875rem = 11.69px 并把行高固定成 1.55，长句换行后不再挤成一团。 */
.hint { font-size: 0.6875rem; line-height: 1.55; color: var(--muted); text-align: center; margin: 14px 0 0; }
/* 限红说明折叠：默认收起，点击「限红」标签展开；标签带 ? 徽标提示可点 */
.hint-collapsed { display: none; }
.hint-toggle { cursor: pointer; user-select: none; color: var(--fg); }
.hint-toggle .hint-q { display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; margin-left: 4px; border-radius: 50%;
  border: 1px solid var(--muted); font-size: 0.625rem; font-style: normal;
  color: var(--muted); vertical-align: 1px; transition: all .15s; }
.hint-toggle.open .hint-q, .hint-toggle:active .hint-q { color: var(--gold); border-color: var(--gold); }

/* ───────────── 顶栏 ───────────── */
.topbar { height: 58px; flex: 0 0 58px; display: flex; align-items: center; gap: 14px;
  padding: 0 18px; border-bottom: 1px solid var(--line);
  /* e298：去掉 backdrop-filter —— iOS Safari 上它会引发相邻元素（公告栏）错误叠绘/穿透，
     造成「公告栏压到上方用户信息」的视觉重叠。顶栏底色已 92% 不透明，去模糊几乎无观感差异 */
  /* e534：顶栏与全站同色，状态栏区 / 顶栏 / 内容区连成一整块，不再分层 */
  background: #0f1622;
  position: relative; z-index: 3; }
.logo { font-weight: 800; letter-spacing: 0.125rem; color: var(--gold); font-size: 0.9375rem; }
.wallet { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.wallet-item { display: flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  border-radius: 9px; padding: 5px 10px; font-size: 0.8125rem;
  white-space: nowrap; flex: 0 0 auto; }
.wallet-item i { font-style: normal; color: var(--muted); font-size: 0.6875rem; white-space: nowrap; }
.wallet-item b { color: var(--gold); font-variant-numeric: tabular-nums; }
/* 房间页顶栏昵称（替代积分显示）：不换行，超长截断 */
.wallet-item.who b { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }
/* 本庄限红规则说明：阶段签与倒计时之间的空档，超长省略号，完整说明在 title 悬浮 */
.table-head .rule-note { flex: 1 1 auto; min-width: 0;
  color: rgba(255,255,255,.55); font-size: 0.75rem; line-height: 1.2;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  cursor: help; }
.room-title { display: flex; align-items: baseline; gap: 10px; font-size: 0.9375rem; }
.room-title span { font-size: 0.75rem; }
/* 点击房名复制房间号/密码：房名可点 + 复制小按钮 */
.room-title b { cursor: pointer; }
.room-title b:hover { color: var(--gold, #e8c064); }
.room-copy { align-self: center;
  background: none; border: 1px solid var(--line); border-radius: 6px;
  color: var(--muted, #9aa5b1); font-size: 0.75rem; line-height: 1;
  padding: 3px 6px; cursor: pointer; transition: color .15s, border-color .15s; }
.room-copy:hover { color: var(--gold, #e8c064); border-color: var(--gold, #e8c064); }
/* 顶栏玩家昵称（renderRoom 写 #roomWho；此前元素缺失导致静默失效） */
.room-who { font-size: 0.7188rem; color: var(--gold, #e8c064); background: rgba(0,0,0,.25);
  border: 1px solid rgba(232,192,100,.35); border-radius: 12px; padding: 2px 9px; align-self: center;
  max-width: 9em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.room-who:empty { display: none; }
/* 断线恢复正向反馈：顶部居中绿色胶囊，短暂浮现后自动淡出 */
.recover-banner { position: fixed; top: 10px; left: 50%; z-index: 1200; pointer-events: none;
  transform: translate(-50%, -18px); opacity: 0; transition: opacity .35s, transform .35s;
  background: rgba(38, 92, 64, .95); color: #c9f5d8; border: 1px solid rgba(111, 214, 165, .6);
  border-radius: 999px; padding: 7px 18px; font-size: .8125rem; font-weight: 700;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .45); }
.recover-banner.show { opacity: 1; transform: translate(-50%, 0); }

/* 复制选项小浮层：挂在房号/复制按钮下方，无遮罩 */
.copy-pop { position: fixed; z-index: 600; min-width: 210px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 12px; padding: 6px;
  box-shadow: 0 12px 30px rgba(0,0,0,.5); }
.copy-pop .cp-opt { display: flex; flex-direction: column; width: 100%; padding: 10px 12px;
  background: none; border: none; color: var(--ink); font-size: .875rem; text-align: left;
  cursor: pointer; border-radius: 8px; }
.copy-pop .cp-opt:hover { background: rgba(255,255,255,.06); }
.copy-pop .cp-opt b { font-weight: 600; }
.copy-pop .cp-opt span { font-size: .7rem; color: var(--muted); margin-top: 2px; }
.copy-pop .cp-cancel { color: var(--muted); text-align: center; align-items: center; }

/* ════════ 大厅新页眉：头像 + 昵称 + 余额 / 右侧图标操作 ════════ */
.home-topbar { justify-content: space-between; gap: 10px; padding: 0 14px; }
.home-user { display: flex; align-items: center; gap: 10px; min-width: 0; cursor: pointer;
  border: none; background: none; padding: 0; }
.home-user:focus-visible { outline: 2px solid var(--gold, #f2b134); outline-offset: 2px; border-radius: 10px; }
.home-avatar { width: 42px; height: 42px; flex: 0 0 42px; border-radius: 50%;
  border: 2px solid var(--gold, #f2b134);
  background: #0c121b center/cover no-repeat;
  color: var(--gold, #f2b134); font-weight: 800; font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; user-select: none; }
.home-meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
/* e303：顶栏两行信息全部锁死「单行不换行」。原先爆字时「余额」两字会被 flex 压成竖排、
   把 .home-meta 撑高，进而顶出 50px 顶栏被视口上沿裁掉（账号只露下半截）。 */
.home-nick { display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
/* e239：顶栏第一行 = 「账号」金框徽标 + 登录账号（不可改） */
.home-acc-label { flex: 0 0 auto; font-size: 0.625rem; line-height: 1; padding: 3px 6px;
  border-radius: 6px; color: var(--gold, #f2b134); font-weight: 700; letter-spacing: 0.0625rem;
  background: rgba(242,177,52,.12); border: 1px solid rgba(242,177,52,.45); white-space: nowrap; }
#homeNick { color: #eef3f8; font-weight: 700; font-size: 0.875rem; max-width: 130px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.home-vip { font-size: 0.625rem; line-height: 1; padding: 2px 5px; border-radius: 6px;
  background: linear-gradient(135deg, #f7d774, #c9962b); color: #2a1c00; font-weight: 800; white-space: nowrap; }
/* e303：整行 nowrap；标签 flex:0 0 auto 不再被压缩换行，数字超长则省略号收尾，
   保证「余额 2,600,231」始终一排、行高恒定，不会撑高顶栏。 */
.home-bal { display: flex; align-items: center; gap: 5px; flex-wrap: nowrap; white-space: nowrap; min-width: 0; }
.home-bal-label { flex: 0 0 auto; color: var(--muted, #9aa5b1); font-size: 0.6875rem; white-space: nowrap; }
#homeBalance { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--gold, #f2b134); font-weight: 800; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
/* e303：应用户要求已删除「余额」旁的 ⟳ 刷新按钮（窄屏挤压造成换行/溢出），
   余额改为随服务端推送自动更新，故 .home-refresh 相关样式一并移除。 */
.home-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
.ha-btn { display: inline-flex; align-items: center; gap: 5px; position: relative;
  height: 34px; padding: 0 11px; border-radius: 18px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line, #1e2c3d);
  color: #d7dee8; font-size: 0.75rem; cursor: pointer; white-space: nowrap;
  transition: background .15s, border-color .15s, color .15s; }
.ha-btn:hover { background: rgba(255,255,255,.09); border-color: var(--gold, #f2b134); color: #fff; }
.ha-btn:active { transform: scale(.96); }
.ha-ico { width: 16px; height: 16px; flex: 0 0 auto; fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.ha-btn b { color: var(--gold, #f2b134); font-variant-numeric: tabular-nums; font-weight: 800; }
/* 音乐按钮：复用 .js-music-btn，paintMusicBtn 自动填充 🎵 / 🔇 */
.ha-btn.js-music-btn { width: 34px; padding: 0; justify-content: center; font-size: 1rem; }
.ha-btn.js-music-btn.off { color: var(--muted, #9aa5b1); opacity: .7; }
.ha-btn .dot-badge { top: -3px; right: -3px; }
/* 私密房进房密码：输入框 + 粘贴按钮同行 */
.pwd-paste-row { display: flex; gap: 8px; align-items: center; }
.pwd-paste-row input { flex: 1; }

/* 房间页顶栏：左侧 返回+房间名，右侧与首页一致的图标操作条 */
.room-topbar { justify-content: flex-start; }
.room-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.room-left .room-title { min-width: 0; }
.room-left #roomName { max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pwd-paste-row .btn { flex: none; white-space: nowrap; }

/* ───────────── 大厅 ───────────── */
/* e286b：lobby 改为 flex 列，玩法说明(.rules) 用 margin-top:auto 钉在底部紧贴导航栏，
   消除「内容短时空出一大段黑」；底部 padding 仅作呼吸间距（.view 已预留导航栏高度） */
.lobby { flex: 1; min-height: 0; display: flex; flex-direction: column; overflow-y: auto; padding: 24px 28px 24px; }
.lobby-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
/* e239：大厅标题精修——金色渐变大字 + 黑桃徽标 + 英文副题，庄重有辨识度 */
.lh-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.lh-title h2 { margin: 0; display: inline-flex; align-items: center; gap: 8px;
  font-size: 1.375rem; font-weight: 800; letter-spacing: 0.1875rem; line-height: 1.1;
  background: linear-gradient(180deg, #ffedbe 8%, #f5c455 52%, #cf9420 92%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
  text-shadow: 0 2px 10px rgba(242,177,52,.18); }
.lh-suit { width: 18px; height: 18px; flex: 0 0 18px; fill: #f5c455;
  filter: drop-shadow(0 1px 3px rgba(242,177,52,.45)); }
.lh-sub { font-size: 0.625rem; letter-spacing: 0.1563rem; color: var(--muted, #8fa1b5); font-weight: 600; white-space: nowrap; }
/* e239：开房按钮——房卡图标 + 主文案「开 房」+ 房卡消耗小字，双行金钮 */
.lh-create { display: inline-flex; align-items: center; gap: 9px;
  padding: 8px 18px 8px 14px; border-radius: 14px; box-shadow: 0 6px 16px rgba(216,158,42,.30); }
.lh-card-ico { width: 22px; height: 22px; flex: 0 0 22px; fill: none;
  stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; opacity: .95; }
.lh-txt { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; line-height: 1; }
.lh-txt b { font-size: 0.9375rem; font-weight: 800; letter-spacing: 0.1875rem; text-indent: 3px; }
.lh-txt i { font-style: normal; font-size: 0.625rem; font-weight: 600; letter-spacing: 0.0313rem; opacity: .9; white-space: nowrap; }
.room-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(268px, 1fr)); gap: 14px; }
.room-card { background: linear-gradient(180deg, var(--panel2), var(--panel));
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; cursor: pointer; transition: transform .15s, border-color .15s;
  position: relative; overflow: hidden; }
.room-card:hover { transform: translateY(-3px); border-color: rgba(237,190,76,.5); }
.room-card::after { content: ''; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 100% 0%, rgba(237,190,76,.1), transparent 60%); }
.rc-top { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.rc-name { font-weight: 700; font-size: 0.9375rem; }
.rc-badge { font-size: 0.6875rem; padding: 3px 8px; border-radius: 20px; background: rgba(47,191,113,.15); color: var(--green); }
.rc-badge.wait { background: rgba(135,149,172,.15); color: var(--muted); }
/* e362：撤销 e359 的 justify-content:center —— 用户澄清「其他布局都不要动，
   保持原有左侧对齐」，真正的问题只是「房主」这个胶囊里的字比同行低 2px。
   根因：.rc-owner 是 padding:1px + border:1px 的胶囊，弹进 flex 行后默认
   align-items:stretch 让其余 span 撑满行高、文字贴在盒顶（偏移 0），而胶囊
   自带 align-self:center 把自己居中，文字自然比同行低 2px。
   改法：行内改成基线对齐（align-items:baseline），胶囊改 inline-block（浏览器
   按内嵌文字基线参与对齐）、去掉 align-self。行高 21.84px 与原值一致，
   只有胶囊里的字落到与「庄家/赔率/底注」同一条水平线上。 */
.rc-meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 12px; font-size: 0.75rem; color: var(--muted); }
.rc-meta b { color: var(--ink); font-weight: 600; }
/* e323：房间卡片「开房人」标签，用金色轻微强调，区别于庄家（默认 ink） */
.rc-owner b { color: var(--gold); }
/* e913 房间卡主行：决策字段放大，身份与门槛字段退到下方小字 */
.rc-primary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  padding: 10px 6px; margin: 2px 0 10px; border-radius: 12px;
  background: rgba(255,255,255,.045); border: 1px solid rgba(255,255,255,.07); }
.rc-stat { display: flex; flex-direction: column; align-items: center; gap: 3px; min-width: 0; }
.rc-stat i { font-style: normal; font-size: 0.625rem; color: var(--muted); line-height: 1; }
.rc-stat b { font-size: 1.0625rem; font-weight: 700; color: var(--ink);
  line-height: 1.15; font-variant-numeric: tabular-nums; }
.rc-stat:first-child b { color: var(--gold); }
.rc-dots { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; max-width: 100%; }
.rc-dots i { width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.2); }
.rc-dots i.on { background: #8ff0ba; }
.rc-bar { display: block; width: 78%; height: 3px; border-radius: 3px;
  background: rgba(255,255,255,.13); overflow: hidden; }
.rc-bar i { display: block; height: 100%; background: var(--gold); border-radius: 3px; }
.empty { text-align: center; color: var(--muted); padding: 4px 0; font-size: 0.8125rem; }
/* 招募广告栏 */
.ad-board { margin: 10px 0; background: rgba(20,27,38,.6); border: 1px solid var(--line); border-radius: 14px; padding: 12px; }
.ad-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.ad-title { font-weight: 700; color: var(--gold); font-size: 0.9375rem; }
.ad-list { display: flex; flex-direction: column; gap: 6px; max-height: none; overflow-y: auto; min-height: 60px; }
.ad-item { background: rgba(255,255,255,.04); border-radius: 8px; padding: 8px 10px; font-size: 0.8125rem; }
.ad-item .ad-name { color: var(--gold); font-weight: 600; }
.ad-item .ad-text { color: var(--ink); margin: 2px 0; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ad-item .ad-text.expanded { white-space: normal; word-break: break-all; }
.ad-item .ad-time { color: var(--muted); font-size: 0.6875rem; }
.ad-item .ad-pin { background: var(--gold); color: #000; font-size: 0.625rem; padding: 1px 6px; border-radius: 4px; margin-left: 6px; }

.rules { margin-top: auto; background: rgba(20,27,38,.6); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 18px 22px; }
.rules h3 { margin: 0 0 10px; font-size: 0.875rem; color: var(--gold); }
.rules ol { margin: 0; padding-left: 20px; color: var(--muted); font-size: 0.8125rem; line-height: 2; }
.rules b { color: var(--ink); }

/* #276 真五门公平特色卡片（金色调，结构对齐十三水平验区块） */
.zm-fair { margin-top: 18px; background: linear-gradient(180deg, rgba(62,50,22,.5), rgba(28,24,16,.72));
  border: 1px solid rgba(245,209,138,.3); border-radius: var(--radius); padding: 15px 17px;
  box-shadow: inset 0 1px 0 rgba(255,251,229,.08); }
.zm-fair-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.zm-fair-ico { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px;
  border-radius: 9px; border: 1px solid rgba(255,231,171,.34); background: rgba(255,255,255,.07);
  font-family: Georgia, serif; font-size: .8rem; font-weight: 800; color: var(--gold); }
.zm-fair-head h3 { margin: 0; font-size: .92rem; letter-spacing: .08em; color: var(--gold); }
.zm-fair-tag { margin-left: auto; padding: 2px 8px; border-radius: 999px; border: 1px solid rgba(245,209,138,.35);
  background: rgba(0,0,0,.2); font-size: .6rem; letter-spacing: .08em; color: rgba(245,220,170,.85); white-space: nowrap; }
.zm-fair-list { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.zm-fair-list li { position: relative; padding-left: 14px; font-size: .8125rem; line-height: 1.7; color: var(--muted); }
.zm-fair-list li::before { content: ''; position: absolute; left: 0; top: .6em; width: 5px; height: 5px;
  border-radius: 50%; background: var(--gold); }
.zm-fair-list li b { color: var(--ink); font-weight: 800; margin-right: 2px; }
/* 🃏 属彩色 emoji 图样，单独套彩色 emoji 字体栈；若走正文默认栈，Windows 会回退 Segoe UI Symbol 单色空心框。 */
.zm-fair-list .zm-emoji { font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif; }

/* ───────────── 牌桌 ───────────── */
.table-wrap { flex: 1; display: grid; grid-template-columns: minmax(0, 1fr) 288px; gap: 16px; padding: 16px; min-height: 0; }
.felt { position: relative; border-radius: 22px; padding: 16px 18px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(255,255,255,.07), transparent 60%),
    linear-gradient(170deg, var(--felt-a), var(--felt-b) 70%);
  border: 1px solid rgba(237,190,76,.22);
  box-shadow: inset 0 0 90px rgba(0,0,0,.55), 0 20px 50px rgba(0,0,0,.4);
  display: flex; flex-direction: column; gap: 12px; min-height: 0; }

/* 顶行整体单行布局：局数 / 阶段签 / 限红说明 / 倒计时秒数，任何阶段都不折行 */
.table-head { display: flex; align-items: center; gap: 12px; font-size: 0.8125rem; }
/* e308：用户批注「第 N 局这几个字可以稍微往右移一点点，整体更美观」。
   ── 只改下面这个 padding-left 的数字（单位 px，固定值不会像改根字号那样影响三端适配）；
      填 0 就回到贴着左边缘。e324：反馈「还可以再往右一点点」，6px → 12px。 */
.round-info { color: rgba(255,255,255,.62); white-space: nowrap; flex: 0 0 auto;
  padding-left: 12px; }
.round-info b { color: var(--gold); }
.phase-pill { padding: 4px 12px; border-radius: 20px; font-size: 0.75rem; font-weight: 600;
  background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.14); color: #cfe0d8;
  white-space: nowrap; flex: 0 0 auto; }
.phase-pill.betting { background: rgba(47,191,113,.18); border-color: rgba(47,191,113,.45); color: #7fe3ac; }
.phase-pill.commit { background: rgba(237,190,76,.16); border-color: rgba(237,190,76,.4); color: var(--gold); }
.phase-pill.locked { background: rgba(240,84,95,.16); border-color: rgba(240,84,95,.4); color: #ff9aa1; }
.phase-pill.reveal { background: rgba(140,120,255,.18); border-color: rgba(140,120,255,.45); color: #c0b4ff; }

/* 倒计时：只留秒数文字（进度条已移除），仅下注阶段显示 */
.countdown { margin-left: auto; flex: 0 0 auto; display: flex; align-items: center; }
.countdown[hidden] { display: none; }
#cdText { font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.7813rem;
  color: #d8ecdf; background: rgba(0,0,0,.3); border: 1px solid rgba(255,255,255,.12);
  border-radius: 20px; padding: 3px 10px; line-height: 1.4;
  transition: color .2s, border-color .2s; }
.countdown.warn #cdText { color: #ffb08a; border-color: rgba(240,132,69,.5); }
/* 倒计时环形进度：随剩余时间收缩的圆弧，最后5秒变橙红并脉冲 */
.cd-ring { width: 1.05rem; height: 1.05rem; transform: rotate(-90deg); flex: 0 0 auto; }
.cd-ring .cd-track { fill: none; stroke: rgba(255,255,255,.16); stroke-width: 4; }
.cd-ring .cd-arc { fill: none; stroke: #6fd6a5; stroke-width: 4; stroke-linecap: round;
  stroke-dasharray: 97.39; stroke-dashoffset: 0;
  transition: stroke-dashoffset .25s linear, stroke .25s; }
.countdown.warn .cd-arc { stroke: #f08445; }
.countdown.warn .cd-ring { animation: cd-pulse .9s ease-in-out infinite; }
@keyframes cd-pulse { 0%,100% { transform: rotate(-90deg) scale(1); } 50% { transform: rotate(-90deg) scale(1.18); } }
@media (prefers-reduced-motion: reduce) {
  .countdown.warn .cd-ring { animation: none; }
  .cd-ring .cd-arc { transition: stroke-dashoffset .25s linear; }
}

/* e252：庄家条恒为一行。旧版「可赔（庄家账户余额）」与「还可亏（止损剩余）」
   两个数字口径不同并列显示，看起来像算错；现在只留「还可赔」= 止损额度 + 本庄累计盈亏，
   「托管设置」挪到本行最右，窄屏超长时中间文字自动省略，不折行、不溢出。 */
.banker-strip { display: flex; align-items: center; flex-wrap: nowrap; gap: 10px; font-size: 0.7813rem;
  background: rgba(0,0,0,.28); border-radius: 10px; padding: 7px 12px;
  border: 1px solid rgba(237,190,76,.16); min-width: 0; overflow: hidden; }
.bs-label { color: rgba(255,255,255,.45); flex: 0 0 auto; white-space: nowrap; }
.bs-name { font-weight: 700; color: var(--gold); flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bs-bal { color: rgba(255,255,255,.5); flex: 0 1 auto; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bs-bal.warn { color: #ff9aa1; }   /* 亏到止损线：还可赔归 0 */
/* e257：庄家本人点「还可赔」即可补进可赔额度。用金色虚线下划线 + 小加号提示可点，
   不额外加按钮，保持庄家条单行紧凑（e252 要求）。 */
.bs-bal.clickable { color: var(--gold); cursor: pointer;
  text-decoration: underline dotted rgba(237,190,76,.6); text-underline-offset: 3px; }
.bs-bal.clickable::after { content: ' ＋'; color: var(--gold); font-weight: 700; }
.bs-bal.clickable.warn { color: #ff9aa1; }
.bs-host { flex: 0 0 auto; }
.bs-hash { margin-left: 0; flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem;
  color: rgba(255,255,255,.42); letter-spacing: 0.0187rem; }

/* 四个门（--joker-d：大王圆卡直径） */
.suit-grid { position: relative; flex: 1; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; min-height: 0;
  --joker-d: 116px; }
.suit-card { position: relative; border-radius: 16px; padding: 14px 10px;
  background: linear-gradient(180deg, rgba(255,255,255,.1), rgba(255,255,255,.03));
  border: 1.5px solid rgba(255,255,255,.14);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px;
  transition: transform .16s, border-color .16s, box-shadow .16s, background .16s;
  overflow: hidden; }
/* e317：flex 的 justify-content 在部分安卓 WebView / iOS 的 <button> 上不生效，
   内容会从卡片顶部开始往下堆，底部空出一大块（用户截图里 ♠ 的盒顶几乎贴着
   内容区顶边、下方却空了 20 多像素就是这个原因）。
   用 flex 的 auto margin 吸收剩余空间替代它对居中：任何实现下都严格上下居中，
   且上下留白完全相等。justify-content 保留作双保险。 */
.suit-card:not(.joker) > .suit-sym { display: block; width: 100%; text-align: center; margin-top: auto; }
.suit-card:not(.joker) > .suit-mine { margin-bottom: auto; }
.suit-card:hover { transform: translateY(-4px); border-color: rgba(237,190,76,.6); box-shadow: 0 12px 28px rgba(0,0,0,.35); }
/* 多门模式：已选中的门（金框 + 角标勾） */
.suit-card.picked { border-color: var(--gold);
  background: linear-gradient(180deg, rgba(237,190,76,.2), rgba(237,190,76,.06));
  box-shadow: 0 0 0 2px rgba(237,190,76,.28), 0 10px 24px rgba(0,0,0,.32); }
.suit-card.picked::after { content: '✓'; position: absolute; top: 6px; left: 8px;
  width: 17px; height: 17px; border-radius: 50%;
  background: var(--gold); color: #10231a;
  font-size: 0.6875rem; font-weight: 900; line-height: 17px; text-align: center; }
/* 抢注模式：点门即下注，光标提示更直接 */
.suit-grid.rush .suit-card:not(:disabled) { cursor: crosshair; }
.suit-card:disabled { cursor: default; transform: none; }
.suit-card .suit-sym { font-size: 3.25rem; line-height: 1; color: #f2f6ff; text-shadow: 0 4px 14px rgba(0,0,0,.45); }
.suit-card.red .suit-sym { color: var(--red); }
/* e317：金额行「1,079」与「我 1,000」原来是 inline span 作 flex 子项，
   只按「内容宽度」居中；再叠加 tabular-nums 的等宽字距，中英文混排时视觉重心
   读起来会偏左。line-height 又都是 normal，行盒高度随字体度量浮动，
   四张卡在不同机型上金额与「我X」会一高一低。
   现在统一成：满宽块级 + 文字自己在行盒内居中 + 固定行高。
   这样横向严格对齐卡片中线，纵向四卡严格同一水平线（与本卡内容宽窄无关）。 */
.suit-name, .suit-total, .suit-mine { display: block; width: 100%; text-align: center; }
.suit-name { line-height: 1.25; font-size: 0.8125rem; color: rgba(255,255,255,.66); }
.suit-total { margin-top: 4px; line-height: 1.3; font-size: 1.0625rem; font-weight: 800;
  color: var(--gold); font-variant-numeric: tabular-nums; }
.suit-mine { line-height: 1.35; font-size: 0.7188rem; color: #8ff0c0;
  min-height: 15px; font-variant-numeric: tabular-nums; }
/* e318：把「我」从居中流里摘出来。
   原来整串「我 1,166」按总宽居中，等于让「我」吃掉一半宽度，数字被顶到中线右侧
   约 6px，和上方金额（纯数字居中）错开一截，看起来就是没对齐。
   现在：.mine-part 只包数字 → 数字严格居中、与上方金额同一条竖线；
   「我」用绝对定位挂在数字左侧 2px 处，只是个小前缀，不参与居中计算。 */
/* e329：标签与数字改成 flex 中线对齐，不再靠基线对齐。
   标签是中文、数字是西文，字号也不同（标签 0.86~0.92em）。按基线对齐时，
   西文数字的墨迹只占基线以上、字身框下沿是给降部留的空位，中文标签却几乎
   占满整个字身框，于是标签看上去比数字低 1~1.5px（用户批注
   「我和数字 / 已选和数字都没有水平居中对齐」）。
   实测旧规则：两段模式「我」比数字低 0.50px、「已选」低 0.67px（真机上 1~1.5px）；
   单段模式「我」反而高 1.00px。
   现在每个「标签 + 数字」是一组 inline-flex，align-items:center 按盒中线对齐，
   与两边字号、字体度量彻底无关；再用 --mine-opt 做一次字体光学补偿。 */
.suit-mine .mine-part { position: relative; display: inline-flex; align-items: center; }
.suit-mine .mine-num { display: inline-block; font-variant-numeric: tabular-nums; }
/* 光学补偿：盒中线对齐后，数字的墨迹仍比盒中线偏上（数字用不到降部那段留白），
   所以把标签整体再上移 0.8px，两边的墨迹中线才重合。
   该值是按 4 倍像素密度、逐块隔离渲染取墨迹质心，在 360 / 390 / 430px 三个宽度
   反复扫描 -2 ~ +1px 得到的零点（两段模式 -0.89px、单段悬挂 -0.68px，取中间 -0.8px，
   两种模式残差都在 ±0.1px 内）。 */
.suit-mine { --mine-opt: -0.8px; }
/* e332：换布局思路 —— 不再用「标签悬挂 + 缩字号」去凑一条竖线，
   改成把「我 X」整行做成一个左右对称、自带底色的居中胶囊。
   为什么前两版都必然失败：这一行只要含一个左置标签，三件事就不可能同时成立 ——
     「标签正常字号」+「数字压中线」+「整行居中」。
     e318/e331 取数字压中线 → 整行左侧多出一截，看着偏左（用户 17:21、18:05 两次判「歪」）；
     e330 取整组居中     → 数字被推到金额右侧约 6px（用户 17:35 判「还是不对」）。
   胶囊是第三种解法：有边框的令牌本身严格落在卡片中线上，标签恢复到 0.88em
   （用户 18:05 批注「字有变小了那么多」），数字只在胶囊内部偏右约 4px ——
   眼睛比对的是胶囊整体与上方金额是否一条竖线，而不是胶囊里文字的墨迹。 */
.suit-card:not(.joker) .suit-mine:not(.flow) { display: flex; justify-content: center; }
/* 单段「我 30」：胶囊只包这一段，整块居中 */
.suit-card:not(.joker) .suit-mine:not(.flow) .mine-part {
  padding: 1px 8px 1px 6px; border-radius: 999px;
  background: rgba(111,217,168,.13); border: 1px solid rgba(111,217,168,.30); }
.suit-mine .mine-tag { position: static; margin: 0 3px 0 0;
  font-style: normal; font-weight: 400; font-size: 0.88em; color: #6fd9a8; opacity: .95;
  line-height: 1.2; white-space: nowrap;
  transform: translateY(var(--mine-opt)); }
.suit-mine .mine-sep { margin: 0 4px; font-style: normal; opacity: .5; }
/* e320：一行里有两段（我 300 · 已选 100）时，标签不能悬挂——
   悬挂标签不占布局宽度，第二段的「已选」会直接压到分隔点和前一段数字上（重叠）。
   e332：两段这一行本身做成胶囊（宽度自适应、由卡片 flex 居中），
   标签入流、字号与单段统一（单段 0.88em / 两段 0.82em，同一屏看不出大小差）。 */
.suit-mine.flow .mine-tag { position: static; margin: 0 3px 0 0; font-size: 0.82em; opacity: .9;
  /* e329：这里原来用 vertical-align:middle，小字号的中文标签会落到数字基线下方；
     flex 组内由 align-items:center 统一中线，纵向微调只留 --mine-opt 一处 */
  transform: translateY(var(--mine-opt)); }
.suit-mine.flow .mine-part { white-space: nowrap; }
.suit-mine.flow { white-space: nowrap; }
/* 两段行不做胶囊：360px 下胶囊左右各多占 ~8px，右端会钻到大王圆卡下面（圆卡是覆盖层）。
   两段行本身首尾对称，整组居中已经视觉平衡，保持行内流即可。 */
.suit-mine.flow .mine-sep { margin: 0 3px; }
/* 大王圆卡内空间太小，放不下胶囊，仍用「数字压中线 + 标签贴左悬挂」，
   标签 0.8em、间距 2px（圆内不溢出，数字与平卡同一口径） */
.suit-card.joker .suit-mine .mine-tag { position: absolute; right: 100%; top: 50%;
  transform: translateY(calc(-50% + var(--mine-opt)));
  margin: 0 2px 0 0; font-size: 0.8em; color: inherit; opacity: .8; }
/* 大王圆卡里两段（我 + 已选）横排绝对塞不进 116px 的圆，
   这里改成两行竖排、每行仍居中，分隔点省掉——圆内不会溢出，也不会互相压字。
   （选择器要带 .suit-card.joker 才压得住上面那条同名的悬挂规则） */
.suit-card.joker .suit-mine.flow { white-space: normal; }
/* e329：竖排两行时每行是小 flex（标签+数字横向成组、中线对齐），
   不能用 display:block——block 里标签又回到基线对齐，圆内会一高一低 */
.suit-card.joker .suit-mine.flow .mine-part { display: flex; justify-content: center; align-items: center; }
/* e331：圆卡里的标签也回到悬挂，数字压中线——否则圆内「我」占位，数字右移 5px，
   和同屏的平卡对不上（用户看的就是数字与金额是否一条竖线） */
.suit-card.joker .suit-mine.flow .mine-tag { position: absolute; right: 100%; top: 50%;
  transform: translateY(calc(-50% + var(--mine-opt))); margin-right: 2px; font-size: 0.8em; }
.suit-card.joker .suit-mine.flow .mine-sep { display: none; }
/* 大王门：圆形卡悬浮于四门中央。
   四卡的「切除缝隙 + 缝合边线」挂在门卡区 ::after（见下），与圆卡同圆心、
   且不随开奖时的 .lose 变透明，任何阶段切角效果都保持 */
/* e308：大王圆卡内部原来是「19px 顶距 + 各行默认 1.5 倍行高」堆叠，
   总高度超过圆直径 → 🃏/大王/注额/我下注会挤出圆边（用户批注「文字有点溢出」）。
   ── ① 顶部 padding 由 19px 加到 24px：把 🃏 往下推，和顶部 20x 徽标拉开距离；
      ② 下面统一 line-height / 收小数字字号，让五行都稳稳落在圆内；
      ③ overflow:hidden 作最后兜底，任何机型都不会再溢出圆外。
   想再拉开图案与 20x，就调大这个 padding-top；想数字再大点，改下面的 font-size。 */
/* e314：按用户手绘批注「应该这样布局且要均匀协调分配做到美观」重排大王圆卡：
   三行纵向均匀分布（space-evenly）——
     顶部：20× 赔率徽标（居中）
     中间：🃏 图标 + 大王 横排成一组
     底部：具体下注数额（累计 + 我下注）
   三行在圆内上下均匀留白，左右居中，视觉平衡不挤。圆卡仍是圆形，外侧切角缝合线不变。 */
.suit-card.joker { position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: var(--joker-d); height: var(--joker-d); padding: 8px 6px;
  border-radius: 50%;
  flex-direction: column; align-items: center; justify-content: space-evenly; gap: 0;
  background: radial-gradient(circle at 50% 28%, rgba(237,190,76,.30), rgba(24,19,7,.94) 74%);
  border: 2px solid rgba(237,190,76,.55);
  box-shadow: 0 8px 24px rgba(0,0,0,.45), 0 0 20px rgba(237,190,76,.14);
  z-index: 5;
  overflow: hidden; }
/* 切角圆槽：::after 圆盘盖住四卡内角形成切角留缝；永不透明、与圆卡同圆心。
   z-index 4：压在四卡(z0)之上、圆卡(z5)之下 */
.suit-grid:not(.jokerless)::after { content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--joker-d) + 8px); height: calc(var(--joker-d) + 8px);
  border-radius: 50%;
  background: #0a241b;
  box-shadow: 0 8px 24px rgba(0,0,0,.4);
  z-index: 4;
  pointer-events: none; }
/* 缝合边线：淡色弧段，随卡片在网格缝隙处自然断开（每卡独立、不相连）。
   遮罩在网格中缝的方位角处挖缺口：一行四列中缝在左右（90/270），2×2 中缝在四轴（见断点） */
.suit-grid:not(.jokerless)::before { content: ''; position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--joker-d) + 8px); height: calc(var(--joker-d) + 8px);
  border-radius: 50%;
  border: 1.5px solid rgba(255,255,255,.18);
  box-shadow: 0 0 10px rgba(0,0,0,.25);
  z-index: 5; /* 必须高于圆槽盘 ::after(z4)：同半径时被盘压住只剩 0.75px 细丝，视觉上等于没有 */
  pointer-events: none;
  --w: 6deg;
  -webkit-mask-image: conic-gradient(#000 0deg, #000 calc(90deg - var(--w)), transparent calc(90deg - var(--w)) calc(90deg + var(--w)), #000 calc(90deg + var(--w)) calc(270deg - var(--w)), transparent calc(270deg - var(--w)) calc(270deg + var(--w)), #000 calc(270deg + var(--w)));
  mask-image: conic-gradient(#000 0deg, #000 calc(90deg - var(--w)), transparent calc(90deg - var(--w)) calc(90deg + var(--w)), #000 calc(90deg + var(--w)) calc(270deg - var(--w)), transparent calc(270deg - var(--w)) calc(270deg + var(--w)), #000 calc(270deg + var(--w))); }
/* 开奖后：淡色环整体让位给金色 .joker-seam（只显示中奖门一侧）。
   .revealed 由 app.js 渲染层落（:has() 在 X5 等手机内核不支持，不能依赖） */
.suit-grid:not(.jokerless).revealed::before { opacity: 0; }
/* 金色缝合弧（开奖专用）：颜色取中奖卡同款 --gold 消除断层；
   扇区两端各避开 --w（网格缝隙方位），不与卡框生硬相接。
   --sf=扇区起点（0°=正上方顺时针）、--sl=扇区长度，默认整环（大王中奖/不邻切角的门）。
   [data-hit] 由 app.js 在开奖时写成中奖门 key（spade/heart/club/diamond/joker） */
.joker-seam { position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: calc(var(--joker-d) + 8px); height: calc(var(--joker-d) + 8px);
  border-radius: 50%;
  border: 1.5px solid var(--gold);
  box-shadow: 0 0 14px rgba(237,190,76,.35);
  opacity: 0; pointer-events: none; z-index: 5; /* 高于圆槽盘 z4，否则整条弧被盘盖住（e123 教训） */
  transition: opacity .25s;
  --w: 6deg; }
.suit-grid .joker-seam[data-hit] { opacity: 1;
  -webkit-mask-image: conic-gradient(from calc(var(--sf, 0deg) + var(--w)), #000 0deg, #000 calc(var(--sl, 360deg) - var(--w) * 2), transparent calc(var(--sl, 360deg) - var(--w) * 2));
  mask-image: conic-gradient(from calc(var(--sf, 0deg) + var(--w)), #000 0deg, #000 calc(var(--sl, 360deg) - var(--w) * 2), transparent calc(var(--sl, 360deg) - var(--w) * 2)); }
.suit-grid.jokerless .joker-seam { display: none; }
/* 一行四列（桌面/横屏）：圆卡居中，缝合线只区分左右邻卡——红心左半环、梅花右半环；黑桃/方块不邻切角，保底整环 */
.suit-grid .joker-seam[data-hit="heart"] { --sf: 90deg;  --sl: 180deg; }
.suit-grid .joker-seam[data-hit="club"] { --sf: 270deg; --sl: 180deg; }
/* e314：大王圆卡内部三块——中间行 = 🃏 图标 + 大王 横排成组（.suit-joker-main），
   底部 = 具体下注数额（.suit-joker-amt 里累计 + 我下注）。整卡由父级 space-evenly 上下均匀分布。 */
.suit-card.joker .suit-joker-main { display: inline-flex; flex-direction: row;
  align-items: center; justify-content: center; gap: 4px; line-height: 1; }
/* e336：原 e315 这里是一整段「🃏 彩色 emoji 图标」的规则（清投影、锁彩色字体栈、
   字号收到 1.375rem、上提 0.5px 凑墨迹中线）。用户 20:0x 批注「用纯 CSS 画一张横卡」，
   图标本身改成 HTML 里的 <i class="joker-ico">，绘制规则见文件末尾 e336 块；
   e334 的 top:0.7px / translateX(-2.3px) 两处 emoji 墨迹补偿也一并作废。 *//* e317：圆卡里「大王」是 .suit-joker-main 横排中的内联文字，不能跟着四门卡
   变成满宽块级（会撑断横排），所以这里回退成行内、宽度交给内容。 */
.suit-card.joker .suit-name { display: inline; width: auto; text-align: left;
  font-size: 0.8125rem; font-weight: 700; color: #ffe9ad; line-height: 1; }
.suit-card.joker .suit-joker-amt { display: inline-flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 0; line-height: 1.1; min-height: 22px; }
/* e342：总池与「我·已选」胶囊要在固定 24px 底部行里上下共存，字号从 14px 收到 12px、
   行高压到 1（12 + 胶囊 11.6 ≈ 23.6px 正好放得下）；金色不变，与绿色胶囊一眼可分。 */
.suit-card.joker .suit-total { width: auto; margin-top: 0; font-size: 0.75rem; font-weight: 800; color: var(--gold); line-height: 1; }
.suit-card.joker .suit-mine { width: auto; min-height: 11px; font-size: 0.625rem; line-height: 1.1; }
/* 赔率徽标回到顶部居中，作为第一行参与 space-evenly 均匀分布（不再绝对定位到右上角） */
.suit-card.joker .suit-odds { position: static; top: auto; right: auto; left: auto; bottom: auto; transform: none;
  font-size: 0.625rem; padding: 0.5px 6px; border-radius: 999px; line-height: 1.3;
  background: rgba(237,190,76,.16); border: 1px solid rgba(237,190,76,.5); }
/* 圆卡定位靠 transform，hover/按下/禁用/命中都要带上位移，避免「跳位」 */
.suit-card.joker:hover { transform: translate(-50%, -50%) scale(1.04); }
.suit-card.joker:disabled { transform: translate(-50%, -50%); }
.suit-card.joker.hit { animation: popJoker .5s ease; }
@keyframes popJoker {
  0% { transform: translate(-50%, -50%) scale(1); }
  45% { transform: translate(-50%, -50%) scale(1.09); }
  100% { transform: translate(-50%, -50%) scale(1.04); }
}
.suit-card.hit { border-color: var(--gold);
  background: linear-gradient(180deg, rgba(237,190,76,.3), rgba(237,190,76,.08));
  box-shadow: 0 0 0 3px rgba(237,190,76,.22), 0 0 46px rgba(237,190,76,.42);
  animation: pop .5s ease; }
@keyframes pop { 0% { transform: scale(1); } 45% { transform: scale(1.07); } 100% { transform: scale(1.03); } }
.suit-card.lose { opacity: .32; filter: grayscale(.6); }
.reveal-badge { position: absolute; left: 50%; bottom: 12px; transform: translate(-50%, 0) scale(.9);
  padding: 10px 22px; border-radius: 14px; font-weight: 800; font-size: 0.9375rem;
  background: rgba(8,11,17,.9); border: 1px solid rgba(237,190,76,.5); color: var(--gold);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; white-space: nowrap;
  box-shadow: 0 16px 40px rgba(0,0,0,.6);
  z-index: 6; }
.reveal-badge.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

/* 庄家面板 */
.banker-panel { display: none; background: rgba(0,0,0,.34); border: 1px solid rgba(237,190,76,.28);
  border-radius: 14px; padding: 12px 14px; }
.banker-panel.show { display: block; animation: fadeUp .25s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.bp-title { font-size: 0.7813rem; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
/* e307 → e311：【答案锁定花色按钮·图标与文字同一水平居中 + 恢复彩色大王图样】
   e307 把 5 个按钮拆成 .bp-key-ico + .bp-key-txt，修好了「符号与文字一高一低」，
   但给图标槽统一套了「符号字体栈」：Windows 的 Segoe UI Symbol 里恰好有 U+1F0CF(🃏)
   的**单色**字形，于是原来的彩色扑克牌 emoji 被顶掉，变成一个金色空心小方块，
   和另外四个饱满的 ♠♥♣♦ 完全不匹配（截图红框批注「大王也没彩色图样了」）。
   e311 修法：
   ① 🃏 单独落彩色 emoji 字体栈，恢复原来的彩色图样；♠♥♣♦ 继续用符号字体。
   ② 图标槽用 inline-flex 双向居中，符号/彩色图样都落在行盒中线上，不被各自字形度量拖偏。
   ③ 整组（图标 + gap + 文字）由按钮双向居中。
   注：e311 原先把槽宽写死 1.3rem，e316 已改为自适应字形宽度——定宽会让「图标到文字」
   的真实视觉间隙在 ♠(8.5px) 与 🃏(6.34px) 之间差 2px 多，看上去不连体（详见下方 .bp-key-ico）。 */
.bp-keys { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.bp-key { display: inline-flex; align-items: center; justify-content: center;
  gap: 5px; min-width: 0; min-height: 40px; padding: 8px 3px;
  border-radius: 10px; font-size: 0.875rem; font-weight: 700; line-height: 1;
  white-space: nowrap; overflow: hidden;
  background: rgba(255,255,255,.06); border: 1.5px solid rgba(255,255,255,.12);
  transition: all .15s; }
/* e316（用户批注「这个图标和方块文字是连体、适当间隙，然后保持和方框水平居中垂直居中」）：
   e311 曾把图标槽写成固定 1.3rem(22.09px) 方块，本意是让五键图标位置一致，
   但符号字形只有 13.09px、🃏 位图有 17.41px —— 槽内空白 9px vs 4.69px，
   叠上 gap 之后「图标到文字」的真实视觉间隙变成 **8.5px vs 6.34px**（差 2.16px），
   整组按字形算还整体偏右 2.24px。用户看图第一眼就是「方块那格间隙特别大」。
   改法：槽宽自适应字形（width:auto），槽内不再留空白 → 五键视觉间隙都等于 gap(5px)，
   「图标+文字」天然连成一体；整组仍由 .bp-key 的 justify-content:center 水平居中、
   align-items:center 垂直居中（实测水平偏差 0.01px、上下留白 9/9）。
   高度仍锁 1.3rem：让 ♠♥♣♦ 与 🃏 的行盒等高，五键图标不会一高一低。 */
.bp-key-ico { flex: 0 0 auto; width: auto; min-width: 0; height: 1.3rem;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.125rem; line-height: 1; text-align: center;
  font-family: "Segoe UI Symbol", "Apple Symbols", "Noto Sans Symbols 2", "Arial Unicode MS", sans-serif; }
/* 彩色图样专用字体栈：绝不能继承上面的符号字体，否则 🃏 会被渲染成单色空心框。
   Apple Color Emoji(iOS/macOS) → Segoe UI Emoji(Windows/Edge) → Noto Color Emoji(安卓/鸿蒙)。
   想调大王图样大小就改这里的 font-size；想调五个图标的统一位置就改上面的 1.3rem。 */
.bp-key-ico.emoji {
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Twemoji Mozilla", sans-serif;
  /* e315：彩色位图自带四周留白 + 黑色牌边，同样的 font-size 下观感比 ♠♥♣♦ 大一圈、且图案重心偏下。
     字号收到 0.9375rem、上提 0.5px，五个图标的视觉重量与中线才真正一致（实测图标/文字偏差 0.14px）。 */
  font-size: 0.9375rem; position: relative; top: -0.5px; }
.bp-key-txt { flex: 0 1 auto; min-width: 0; line-height: 1; position: relative; top: 0.5px; }
/* e315（用户批注「红字换回和黑桃梅花一样白色，每个框中图标和文字水平垂直均匀居中」）：
   ① 红心/方块原来整键 color: var(--red)，连「红心」「方块」四个字一起染红，
      五个按钮里两红两白一金，读起来花 → 只让 ♥♦ 图标保留花色本红（继承下面 .red 的 color），
      文字单独拉回与黑桃/梅花同一个白，五键文字统一。
   ② 上面 .bp-key-txt 加了 position:relative; top:.5px：中文方字的重心比字母基线盒中心
      高约 0.6px，纯 flex 居中时「图标略低、文字略高」，肉眼能看出半像素错位；下移半像素对齐。
   ③ 高度/宽度仍是按钮自带 align-items/justify-content 双向居中，五键整组严格居中（实测偏差 0px）。 */
.bp-key.red { color: var(--red); }
.bp-key.red .bp-key-txt { color: #e9eef7; }
/* 「大王」的金色保留：五键变成「四白 + 一金」，金色只作大王标识，不再有两个红字干扰 */
.bp-key.gold { color: var(--gold); }
/* e324：用户批注「大王两个字还可以往大王图标靠近一点会更协调」。其它四键 icon—文字
   保持原 gap(5px) 不变，只把金色大王键的间距收紧到 2px，让 🃏 与「大王」贴得更紧、
   整组更贴合按钮外框（不影响五键整体居中与等高）。 */
.bp-key.gold { gap: 2px; }
.bp-key:hover { background: rgba(255,255,255,.12); }
.bp-key.on { background: rgba(237,190,76,.2); border-color: var(--gold); box-shadow: 0 0 0 2px rgba(237,190,76,.15); }
.bp-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.bp-label { font-size: 0.6875rem; color: rgba(255,255,255,.55); }
.bp-secs { display: flex; gap: 6px; }
.bp-secs button { padding: 6px 12px; border-radius: 8px; font-size: 0.7813rem; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12); }
.bp-secs button.on { background: rgba(237,190,76,.22); border-color: var(--gold); color: var(--gold); font-weight: 700; }
.bp-row .btn { margin-left: auto; }
.bp-hint { font-size: 0.6563rem; color: rgba(255,255,255,.42); margin: 10px 0 0; }
.bp-hint b { color: var(--gold); }

/* 托管行 / 本庄战绩 */
.bp-host { margin-bottom: 10px; padding-bottom: 9px; border-bottom: 1px dashed rgba(255,255,255,.12); }
.bp-host .btn { margin-left: 0; }
/* 状态说明 + 锁键倒计时同行：文字居左，徽标在剩余空间水平居中 */
.host-state-line { flex: 1 1 100%; display: flex; align-items: center; gap: 10px; min-width: 0; }
.bp-host-state { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.6875rem; color: rgba(255,255,255,.45); }
/* 锁键倒计时徽标（手动开盘时显示，最后 30 秒变红 + 滴答） */
.host-cd { flex: 0 1 auto; margin-left: auto; margin-right: auto;
  font-variant-numeric: tabular-nums; font-weight: 700; font-size: 0.8125rem;
  color: #d8ecdf; background: rgba(0,0,0,.32); border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px; padding: 2px 9px; letter-spacing: 0.0625rem; white-space: nowrap; }
.host-cd.warn { color: #ff9aa1; border-color: rgba(240,84,95,.55);
  animation: hostCdPulse 1s ease-in-out infinite; }
@keyframes hostCdPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,84,95,0); }
  50% { box-shadow: 0 0 8px 1px rgba(240,84,95,.4); }
}
/* 开启托管前的确认行：下注倒计时选定 + 确认/取消 */
.bp-host-confirm { display: flex; align-items: center; flex-wrap: wrap; gap: 8px;
  margin: -4px 0 10px; padding: 8px 10px;
  background: rgba(0,0,0,.22); border: 1px dashed rgba(237,190,76,.4); border-radius: 10px; }
.bp-host-confirm[hidden] { display: none; }
.bhc-label { font-size: 0.6563rem; color: rgba(255,255,255,.55); flex: 0 0 auto; }
.bp-secs.sm { gap: 5px; }
.bp-secs.sm button { min-height: 26px; padding: 3px 10px; font-size: 0.75rem; }
.hq-secs-row { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.bs-host { font-size: 0.6563rem; padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(140,120,255,.18); border: 1px solid rgba(140,120,255,.45); color: #c0b4ff; }
.bs-host[hidden] { display: none; }
/* e252：本庄盈亏第二行已移除，盈亏明细改由「还可赔」的 title 悬浮说明给出 */
/* e252：按钮吃掉剩余空间固定在整行最右（移动端哈希隐藏也不会留下空白）。
   用 #bankerStrip 提高特异性，覆盖后面 media 里 .btn.sm 的 32px 最小高度，保持单行紧凑 */
#bankerStrip .bs-host-btn { flex: 0 0 auto; margin-left: auto; white-space: nowrap; font-size: 0.6875rem;
  padding: 2px 9px; min-height: 26px; line-height: 1.2; }
#bankerStrip .bs-host-btn[hidden] { display: none; }

/* 托管设置弹窗 */
.host-state-box { display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.1); }
.host-state-box b { font-size: 0.8125rem; color: rgba(255,255,255,.72); }
.host-state-box span { font-size: 0.6563rem; line-height: 1.5; color: var(--muted); }
.host-state-box.on { background: rgba(140,120,255,.1); border-color: rgba(140,120,255,.4); }
.host-state-box.on b { color: #c0b4ff; }
.host-acts { display: flex; gap: 8px; margin: 10px 0; flex-wrap: wrap; }
.host-acts .btn { flex: 1 1 44%; min-height: 40px; font-size: 0.875rem; line-height: 1.2; }
/* e321 起：两枚主按钮（开启/关闭托管、批量预设结果）做成同族等高等字号。
   e325：用户反馈「开启托管」不该用黄色、要和「批量预设结果」同款（不要一黄一白）→
   两枚都落到 .btn-ghost（金色细描边 + 浅金字），视觉成对、不再有金色填充按钮。
   「确认开启」（在 #hsConfirm 内、是确认动作）仍用 .btn-gold 作区分，不在 .host-acts 内。 */
.host-acts .btn-ghost { background: rgba(237,190,76,.06); border-color: rgba(237,190,76,.5); color: var(--ink); }

/* e319 托管设置弹窗「分组卡片」---------------------------------------------
   用户批注（局部截取_20261107_022748.png）：「这个框中文字布局太尴尬太乱了，要协调优化一下」。
   原来「开奖展示」标题、秒数按钮、三段长说明、输入框、当前值全部平铺在弹窗里，
   左右对齐不一致、行间距忽大忽小。现在每块内容收进 .hs-card：
     标题行（左标题 + 可选 ? + 右侧当前值）→ 控件 → 一行小字说明
   卡片之间统一 10px 间距，卡片内说明与控件统一 8px 间距，四边留白一致。 */
.hs-card { padding: 11px 12px; margin: 0 0 10px; border-radius: 12px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.09); }
.hs-card-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; min-width: 0; }
.hs-card-title { flex: 0 0 auto; font-size: 0.75rem; font-weight: 600; color: rgba(255,255,255,.82); }
.hs-card-now { margin-left: auto; flex: 0 0 auto; font-size: 0.6563rem; color: rgba(255,255,255,.42); }
.hs-card-now b { color: var(--gold, #e7c66b); font-weight: 700; }
.hs-card-note { margin: 8px 0 0; font-size: 0.6563rem; line-height: 1.5;
  color: var(--muted); text-align: left; }
.hs-card-note b { color: rgba(255,255,255,.78); font-weight: 600; }
.hs-input-row { display: flex; align-items: center; gap: 8px; }
.hs-input-row input { flex: 1 1 auto; min-width: 0; padding: 9px 11px; border-radius: 9px;
  font-size: 0.8125rem; background: #0b1119; border: 1px solid var(--line);
  color: var(--ink); outline: none; }
.hs-input-row input::placeholder { font-size: 0.6875rem; color: rgba(255,255,255,.4); }
.hs-input-row input:focus { border-color: var(--gold); }
.hs-input-row .btn { flex: 0 0 auto; }
/* 弹窗底部一行胶囊式摘要（限红 / 最大亏损 / 还可赔），替代原来两条挤在一起的长句 */
.hs-summary { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
/* 本弹窗走统一 10px 纵向节奏（标题 10 / 块 10 / 按钮组 14），不再出现 18 与 0 混排 */
.modal-box.is-host-settings h3 { margin: 0 0 10px; }
.modal-box.is-host-settings .modal-actions { margin-top: 14px; }
.hs-summary span { padding: 3px 9px; border-radius: 999px; font-size: 0.6563rem;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08); }
.hs-summary b { color: rgba(255,255,255,.78); font-weight: 600; }

/* 批量预设开奖结果 */
/* e304：批量预设改为跟随房间局数，可能达几百上千局 → 工具条允许换行、
   局号宽度自适应「第 2000 局」，并给出分批加载提示。列表本身仍是 46vh 滚动区。 */
.hq-tools { display: flex; align-items: center; gap: 8px; margin: 2px 0 8px; flex-wrap: wrap; }
.hq-tools [hidden] { display: none; }
.hq-count { margin-left: auto; font-size: 0.6563rem; color: var(--muted); }
.hq-list { display: grid; gap: 6px; max-height: 46vh; overflow: auto; padding-right: 4px; }
.hq-more { margin: 6px 2px 2px; text-align: center; font-size: 0.6875rem; color: var(--muted); }
.hq-more:empty { display: none; }
.hq-row { display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 9px;
  background: rgba(255,255,255,.04); border: 1px solid rgba(255,255,255,.07); }
.hq-row.done { background: rgba(237,190,76,.07); border-color: rgba(237,190,76,.35); }
.hq-no { flex: 0 0 auto; min-width: 52px; width: auto; white-space: nowrap; font-size: 0.6563rem; color: rgba(255,255,255,.5); }
.hq-btns { display: flex; gap: 6px; }
.hq-suit { width: 38px; height: 30px; border-radius: 8px; font-size: 0.875rem; color: #dfe8e3;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); }
.hq-suit.red { color: #ff8a90; }
.hq-suit.on { background: rgba(237,190,76,.22); border-color: var(--gold); color: var(--gold); font-weight: 700; }

/* 大厅「我的房间」：房主回大厅但房间保留 */.myroom { display: flex; align-items: center; gap: 10px; margin: 0 0 10px; padding: 10px 12px;
  border-radius: 12px; background: rgba(237,190,76,.08); border: 1px solid rgba(237,190,76,.35); }
.myroom[hidden] { display: none; }
.mr-info { display: flex; align-items: center; gap: 8px; flex: 1 1 auto; min-width: 0; flex-wrap: wrap; }
.mr-info b { font-size: 0.8438rem; color: #fff; }
.mr-tag { font-size: 0.6563rem; padding: 1px 7px; border-radius: 999px; white-space: nowrap;
  background: rgba(237,190,76,.2); border: 1px solid rgba(237,190,76,.4); color: var(--gold); }
.mr-meta { flex: 1 1 100%; font-size: 0.6563rem; color: var(--muted); }
.mr-acts { display: flex; gap: 6px; flex: 0 0 auto; }

/* 等待 */
.wait-panel { display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px; border-radius: 14px; background: rgba(0,0,0,.24);
  font-size: 0.8125rem; color: rgba(255,255,255,.6); }
.wait-panel[hidden] { display: none; }
.spin { width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(237,190,76,.25); border-top-color: var(--gold);
  animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 下注栏 */
.bet-bar { display: flex; align-items: center; gap: 12px; padding-top: 2px; }
/* e306：【提示锁定一行 + 自动缩小字号】用户要求这句始终单行显示，
   文案变长时自动把字号缩小到刚好放得下（由 app.js 的 fitBetModeTip() 实测计算），
   而不是像 e305 那样折成两行，更不像 e303 那样用 ellipsis 截断成半句。
   CSS 这里只负责 nowrap + 溢出裁切兜底，真正的自适应字号在 JS。同行居中的布局不变。 */
.bet-mode-row { display: flex; align-items: center; gap: 8px; margin: 2px 0 -2px; flex-wrap: nowrap; }
.bet-mode { display: inline-flex; padding: 2px; gap: 2px; flex: 0 0 auto;
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 999px; }
.bet-mode button { padding: 4px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 700;
  color: var(--muted); background: transparent; transition: all .14s; white-space: nowrap; }
.bet-mode button:hover { color: var(--fg); }
.bet-mode button.on { background: var(--gold); color: #10231a; box-shadow: 0 1px 6px rgba(237,190,76,.28); }
.bet-mode-tip { flex: 1 1 auto; min-width: 0; font-size: 0.6563rem; color: var(--muted);
  text-align: center; line-height: 1.3; white-space: nowrap; overflow: hidden; }
.bet-mode-tip b { color: var(--gold); font-weight: 700; }
.chips { display: flex; gap: 8px; min-width: 0; }
/* e303：筹码按钮锁死不压缩、不换行。原先 flex 子项可被挤到只剩一个字宽，
   爆字时「100/500/自定义」会竖排或顶出胶囊（用户反馈牌桌筹码行文字溢出）。
   e306：补显式 inline-flex 居中 —— 不同浏览器/机型对 <button> 默认 text-align
   处理不一致，安卓上「100/500/1k」会贴着胶囊右侧，看起来整体偏右。 */
.chip { flex: 0 0 auto; min-width: 54px; padding: 9px 14px; border-radius: 999px; font-weight: 700; font-size: 0.8125rem;
  white-space: nowrap; max-width: 100%;
  display: inline-flex; align-items: center; justify-content: center; text-align: center;
  background: rgba(255,255,255,.07); border: 1.5px solid rgba(255,255,255,.14);
  font-variant-numeric: tabular-nums; transition: all .14s; }
.chip:hover { background: rgba(255,255,255,.13); }
.chip.on { background: linear-gradient(180deg, #f7d374, var(--gold));
  color: #2a1e00; border-color: transparent;
  box-shadow: 0 4px 16px rgba(237,190,76,.3); }
.bet-actions { margin-left: auto; display: flex; gap: 8px; }

/* 侧栏 */
.side { display: flex; flex-direction: column; gap: 12px; min-height: 0; position: relative; }
.panel { background: rgba(20,27,38,.75); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px; overflow: hidden;
  display: flex; flex-direction: column; }
/* e306：座位 / 最近开奖的标题原本是纯文字贴着卡片顶部，
   用户批注「这个文字应该显示在这个框体垂直居中」。给标题条一个最小高度 + flex 垂直居中，
   座位与开奖两个面板标题保持同一水平线；各 @media 只覆盖 margin-bottom/font-size，不冲突。
   e308：用户二次批注「还是没有垂直居中」→ 把标题条改成明确的 26px 固定高度（不再只靠
   min-height 让文字贴顶），文字在条内真正上下居中；并补 padding-left（与下方 .seat / .hist
   第一行的第一个字左侧对齐，用户批注「这线文字和下方第1个文字左对齐」）。
   9px = 列表的 8px 内边距 + 列表那 1px 透明边框，真渲染四视口测出来偏差 0.00px。
   ── 想改标题条高度就调 height/min-height；想改与列表的对齐就调 padding-left。 */
.panel-title { display: flex; align-items: center; height: 26px; min-height: 26px; line-height: 1.2;
  padding: 0 9px; font-size: 0.75rem; color: var(--muted); margin-bottom: 10px; letter-spacing: 0.0313rem; }
.seat-list { display: flex; flex-direction: column; gap: 6px; overflow-y: auto; max-height: 150px; }
.seat { display: flex; align-items: center; gap: 9px; padding: 9px 8px; border-radius: 10px;
  background: rgba(255,255,255,.03); border: 1px solid transparent;
  /* e263：原来过渡属性写成 all，会把「余额/已押文字变化」也算作过渡目标，
     整行跟着重绘，视觉上被放大成「头像闪一下」。这里只过渡颜色，不动布局。 */
  transition: background-color .15s ease, border-color .15s ease; }
.seat.banker { background: rgba(237,190,76,.1); border-color: rgba(237,190,76,.32); }
.seat.me { border-color: rgba(120,180,255,.4); }
.seat-avatar { width: 28px; height: 28px; border-radius: 50%; flex: 0 0 28px;
  display: grid; place-items: center; font-size: 0.75rem; font-weight: 700;
  background: linear-gradient(150deg, #2b3a52, #1a2331); color: #b9c6db;
  /* e263：头像不参与任何过渡，也不做缩放动画，避免重绘时出现「亮一下」 */
  transition: none; }
.seat.banker .seat-avatar { background: linear-gradient(150deg, #f5d074, #b98c1f); color: #2a1e00; }
.seat-info { flex: 1; min-width: 0; }
.seat-name { font-size: 0.8125rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.seat-sub { font-size: 0.6875rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.seat-tag { font-size: 0.625rem; padding: 2px 6px; border-radius: 6px; background: rgba(237,190,76,.2); color: var(--gold); }
.seat-rank { flex: 0 0 auto; min-width: 24px; text-align: center; font-size: 0.58rem; line-height: 1.35;
  font-weight: 800; color: #f5d074; padding: 1px 4px; border-radius: 5px;
  border: 1px solid rgba(237,190,76,.36); background: rgba(237,190,76,.12);
  font-variant-numeric: tabular-nums; }

/* 点选房间用户 → 屏蔽 TA 的语音 / 打字聊天 */
.seat.tappable { cursor: pointer; }
.seat.tappable:hover { background: rgba(255,255,255,.075); border-color: rgba(120,180,255,.32); }
.seat.tappable:active { transform: scale(.99); }
.seat-tag.blocked { background: rgba(240,84,95,.16); color: #ff9aa2; }

/* e273：座位栏版本徽章已移除（改为「人数 / 本房上限」） */

/* 谁在说话：座位右侧「喇叭 + 波浪」闪烁提示。
   多人可同时说话 → 每个正在说话的人那一行各自亮，不互斥、不轮占。 */
.seat-spk { flex: none; display: inline-flex; align-items: center; gap: 2px;
  margin-left: 4px; padding: 2px 6px; border-radius: 9px;
  color: #7fe3ac; background: rgba(47,191,113,.14);
  border: 1px solid rgba(47,191,113,.38);
  font-size: 0.6875rem; line-height: 1; white-space: nowrap;
  animation: seatSpkGlow 1.1s ease-in-out infinite; }
.seat-spk[hidden] { display: none; }
.seat-spk i { display: block; width: 2px; height: 9px; border-radius: 2px;
  background: currentColor; transform-origin: center;
  animation: seatSpkWave .8s ease-in-out infinite; }
.seat-spk i:nth-of-type(2) { animation-delay: .16s; }
.seat-spk i:nth-of-type(3) { animation-delay: .32s; }
@keyframes seatSpkWave {
  0%, 100% { transform: scaleY(.35); opacity: .55; }
  50% { transform: scaleY(1.25); opacity: 1; }
}
@keyframes seatSpkGlow { 0%, 100% { opacity: .78; } 50% { opacity: 1; } }
.seat.speaking { border-color: rgba(47,191,113,.55); background: rgba(47,191,113,.10); }
.rc-block-btn { width: 100%; padding: 12px 14px; border-radius: 10px; text-align: left;
  font-size: 0.8438rem; color: var(--ink); background: rgba(255,255,255,.05);
  border: 1px solid var(--line); cursor: pointer; transition: all .15s; }
.rc-block-btn:hover { border-color: rgba(120,180,255,.42); background: rgba(255,255,255,.08); }
.rc-block-btn.on { background: rgba(240,84,95,.12); border-color: rgba(240,84,95,.45); color: #ffb0b6; }

/* 点选房间用户：屏幕内可拖动的小浮窗（固定浮层，不用全屏遮罩，房间视图仍可见可操作）
   e265：按用户反馈改成「自由拖动 + 默认落在屏幕中下部（截图绿框位置）+ 再收窄一点」。
   旧规则是贴右侧、锚在房间顶栏下方；现在用 left/top 定位（这里是 JS 未跑时的兜底值），
   实际位置由 rcPlaceUserPanel() 按视口比例或用户拖过的位置计算，再夹进屏幕内。
   e232 布局：flex 纵向——头部(✕)与底部(返回)固定不滚，只有 .rc-up-body 滚动。 */
.rc-user-panel { position: fixed; left: 22%; top: 43%; z-index: 60;
  width: min(216px, 58vw); padding: 12px;
  display: flex; flex-direction: column;
  /* 展开下注历史后面板会变高：夹在视口内，内容区内部滚动，绝不顶出屏幕 */
  max-height: calc(100vh - 16px); max-height: calc(100dvh - 16px);
  overflow: hidden;
  transform: none;
  background: rgba(15,22,33,.98); border: 1px solid rgba(120,180,255,.30);
  border-radius: 14px; box-shadow: 0 16px 44px rgba(0,0,0,.6);
  color: var(--ink); font-size: 0.7813rem;
  animation: rcUpIn .18s ease-out both; }
.rc-user-panel[hidden] { display: none; }
/* 拖动中：停掉入场动画（否则 transform 会和拖动位置打架），阴影压深、光标变抓取 */
.rc-user-panel.dragging { animation: none; box-shadow: 0 22px 56px rgba(0,0,0,.72); }
/* 入场只做淡入，不做位移：面板位置由 left/top 精确决定，
   带 translate 会让「刚打开时」量到的位置偏一点，拖动一开始也会跳一下。 */
@keyframes rcUpIn { from { opacity: 0; }
  to { opacity: 1; } }
.rc-user-panel .rc-block-btn { padding: 9px 11px; font-size: 0.7813rem; }
.rc-up-head { flex: none; display: flex; align-items: center; justify-content: space-between;
  gap: 6px; margin-bottom: 10px; padding-bottom: 6px;
  border-bottom: 1px dashed rgba(255,255,255,.08);
  /* e265：标题条就是拖动手柄 */
  cursor: move; touch-action: none;
  user-select: none; -webkit-user-select: none; }
.rc-user-panel.dragging .rc-up-head { cursor: grabbing; }
/* 拖动手柄：两列小圆点（纯 CSS 画的，保持轻量） */
.rc-up-grip { flex: none; width: 8px; height: 14px; border-radius: 2px; opacity: .5;
  background-image: radial-gradient(rgba(190,210,235,.9) 1px, transparent 1.2px);
  background-size: 4px 4px; background-position: center; }
.rc-up-name { flex: 1 1 auto; min-width: 0;
  font-size: 0.8125rem; font-weight: 600; color: #dce8f8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-up-x { flex: none; width: 26px; height: 26px; border-radius: 8px; cursor: pointer;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  color: var(--muted); font-size: 0.75rem; }
.rc-up-x:hover { color: var(--ink); border-color: rgba(120,180,255,.45); }
/* e232：唯一滚动区——头部✕/底部返回固定，只有这里随内容滚 */
.rc-up-body { flex: 1 1 auto; min-height: 0;
  display: flex; flex-direction: column; gap: 8px;
  overflow-y: auto; overscroll-behavior: contain; }
.rc-up-hist { flex: none; width: 100%; padding: 9px 11px; border-radius: 10px; text-align: left; cursor: pointer;
  font-size: 0.7813rem; color: #bcd6f5; background: rgba(120,180,255,.10);
  border: 1px solid rgba(120,180,255,.32); }
.rc-up-hist:hover { background: rgba(120,180,255,.18); }
.rc-up-foot { flex: none; margin-top: 10px; }
.rc-up-back { width: 100%; padding: 8px; border-radius: 9px; cursor: pointer; font-size: 0.7813rem;
  background: rgba(255,255,255,.05); border: 1px solid var(--line); color: var(--muted); }
.rc-up-back:hover { color: var(--ink); }
.rc-up-loading, .rc-up-empty { text-align: center; color: #aab8cd; font-size: 0.75rem; padding: 18px 4px; }
.rc-up-sum { flex: none;
  display: flex; flex-direction: column; gap: 4px; padding: 8px 10px; border-radius: 9px;
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09);
  font-size: 0.7188rem; color: #aab8cd; }
.rc-up-sum b { color: var(--ink); font-variant-numeric: tabular-nums; }
.rc-up-sum .win b { color: #ff8b93; }
.rc-up-sum .lose b { color: #5fd08a; }
/* e232：列表不再自带 max-height/overflow（双层滚动是「滑不动」的根因），随 body 一起滚 */
.rc-up-list { display: flex; flex-direction: column; gap: 6px; }
.rc-up-row { padding: 8px 9px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); }
/* e360：庄家视角的记录行——庄家不下注，这里展示的是「本局庄家盈亏」，用金色描边区分 */
.rc-up-row.banker { background: rgba(240,196,90,.07); border-color: rgba(240,196,90,.28); }
.rc-up-row.banker .rc-up-bets { color: #e7cf9a; }
.rc-up-row-top { display: flex; justify-content: space-between; gap: 6px; font-size: 0.6875rem; color: #cddcf0; }
.rc-up-time { color: #8fa3bd; font-variant-numeric: tabular-nums; }
.rc-up-bets { margin: 5px 0; font-size: 0.7188rem; color: var(--ink); font-variant-numeric: tabular-nums; word-break: break-all; }
.rc-up-row-bot { display: flex; justify-content: space-between; gap: 6px; font-size: 0.6875rem; color: #9fb2cc; }
.rc-up-net.win { color: #ff8b93; }   /* 赢=红，涨红跌绿 */
.rc-up-net.lose { color: #5fd08a; }  /* 输=绿 */

/* e225：横屏 / 矮屏时四门下注区占满左半宽，右侧栏只剩约 260px。
   e265：可拖动后不再需要"钉在右侧栏"，宽度继续收窄，拖到哪都不会压住门卡。 */
@media (orientation: landscape) and (max-height: 540px) { .rc-user-panel { width: min(200px, 54vw); padding: 9px; }
  .rc-up-head { margin-bottom: 7px; }
  .rc-up-body { gap: 6px; }
  .rc-user-panel .rc-block-btn, .rc-up-hist { padding: 7px 9px; font-size: 0.75rem; } }
.history-list { display: flex; flex-direction: column; gap: 5px; overflow-y: auto; max-height: 120px; }
/* e306：开奖局号恢复「第46局」完整文字（之前只剩数字 46）。
   整行自动适配：局号 / 花色 / 名称 / 盈亏固定不压缩，只有中间的哈希缩写可收缩省略，
   窄屏也不会把「第46局」挤没或撑出框外。 */
.hist { display: flex; align-items: center; gap: 8px; font-size: 0.75rem; white-space: nowrap;
  padding: 6px 8px; border-radius: 8px; background: rgba(255,255,255,.03); }
.hist-no { flex: 0 0 auto; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.hist-sym { flex: 0 0 auto; font-size: 1rem; }
.hist > .muted { flex: 0 0 auto; white-space: nowrap; }
.hist-hash { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: var(--muted); font-size: 0.625rem; font-family: ui-monospace, Consolas, monospace; opacity: .8; }
.hist-sym.red { color: var(--red); }
.hist-gain { flex: 0 0 auto; margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 700; }
.hist-gain.plus { color: var(--green); }
.hist-gain.minus { color: var(--red); }

/* ── 房间聊天：文字 / 表情 / 截图，消息走限时气泡（停留秒数后台可配） ── */
.room-chat-panel { flex: 0 0 auto; position: relative; overflow: visible; } /* overflow 放开：表情/更多面板可伸出面板顶部 */

/* 「+」更多面板：聊天记录 / 发送截图。悬浮在输入行上方，不占布局 */
.rc-plus-panel { position: absolute; right: 6px; bottom: 50px; z-index: 31;
  min-width: 168px; padding: 6px; border-radius: 12px;
  background: rgba(13,18,27,.97); border: 1px solid var(--line);
  box-shadow: 0 10px 28px rgba(0,0,0,.55);
  display: flex; flex-direction: column; gap: 4px; }
.rc-plus-panel[hidden] { display: none; }
.rc-plus-panel button { text-align: left; font-size: 0.8125rem; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid transparent;
  border-radius: 8px; padding: 9px 11px; cursor: pointer; }
.rc-plus-panel button:hover { background: rgba(255,255,255,.11); border-color: rgba(255,255,255,.12); }
.rc-plus { font-size: 1.25rem; line-height: 1; }

/* 聊天限时气泡：浮在侧栏下方空白区，新消息自下而上堆叠，到点自动淡出。
   pointer-events:none 保证不挡座位 / 最近开奖列表的点击。 */
.rc-pop-layer { position: absolute; left: 4px; right: 4px; bottom: 8px; z-index: 22;
  display: flex; flex-direction: column; justify-content: flex-end; gap: 6px;
  pointer-events: none; }
.rc-pop { max-width: 100%; padding: 8px 11px; border-radius: 12px;
  background: rgba(18,26,38,.94); border: 1px solid rgba(120,180,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.45); color: var(--ink);
  font-size: 0.7813rem; line-height: 1.5; word-break: break-word;
  animation: rcPopIn .22s ease-out both; }
.rc-pop.mine { border-color: rgba(237,190,76,.42); background: rgba(38,31,18,.94); }
.rc-pop b { color: #9fb2cc; font-weight: 600; margin-right: 5px; font-size: 0.7188rem; }
.rc-pop.mine b { color: var(--gold); }
/* 消息时间：小字、等宽数字，弱于正文但清晰可读；聊天记录里靠名字行右侧 */
.rc-time { display: inline-block; margin: 0 6px 0 2px; color: #8fa3bd;
  font-size: 0.6875rem; font-weight: 400; font-variant-numeric: tabular-nums;
  white-space: nowrap; }
.rc-pop.mine .rc-time, .rc-msg.mine .rc-time { color: #c9ac72; }
.rc-history .rc-msg .rc-time { float: right; margin: 1px 0 0 8px; }
.rc-pop.out { animation: rcPopOut .35s ease-in both; }
@keyframes rcPopIn { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes rcPopOut { to { opacity: 0; transform: translateY(-6px) scale(.98); } }
.rc-pop-img { display: block; max-width: 100%; max-height: 120px; border-radius: 8px; margin-top: 5px; }

/* 聊天图片消息（聊天记录弹窗里用）与记录列表 —— 弹窗内提高对比度，避免深色底上文字发灰 */
.rc-img { display: block; max-width: 100%; max-height: 180px; border-radius: 8px; margin-top: 6px;
  border: 1px solid var(--line); cursor: zoom-in; }
.rc-history { display: flex; flex-direction: column; gap: 9px; max-height: 56vh; overflow-y: auto;
  overscroll-behavior: contain; padding: 4px 3px; }
.rc-history .rc-msg { padding: 9px 11px; border-radius: 10px; color: var(--ink);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.10); }
.rc-history .rc-msg.mine { background: rgba(237,190,76,.10); border-color: rgba(237,190,76,.30); }
.rc-history-empty { text-align: center; color: #aab8cd; font-size: 0.8125rem; padding: 26px 0; }
.rc-msg { font-size: 0.8125rem; line-height: 1.55; word-break: break-word; }
.rc-msg b { display: block; color: #cddcf0; font-weight: 600; font-size: 0.75rem; margin: 0 0 3px; }
.rc-msg.mine b { color: var(--gold); }
.rc-voice { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; font-size: 0.75rem;
  background: rgba(237,190,76,.12); border: 1px solid rgba(237,190,76,.35);
  color: #f2d489; border-radius: 14px; padding: 3px 11px; font-variant-numeric: tabular-nums; }
.rc-voice.playing { opacity: .55; }
/* e443：按用户批注再往下贴近胶囊一点（+6px → -4px，整条下移 10px）。
   「↑ 轻轻上滑，松手切换自由麦」与「松开手指，开启自由麦」是同一个浮层的两种
   文案状态，位置共用，一起跟随下移；仍不占布局、不挡触摸。 */
.rc-holdhint { position: absolute; left: 50%; bottom: calc(100% - 4px); transform: translateX(-50%);
  z-index: 10001; max-width: 96%; padding: 6px 12px; border-radius: 999px;
  background: rgba(10,14,22,.62); border: 1px solid rgba(255,255,255,.22);
  color: rgba(255,255,255,.92); font-size: 0.75rem; line-height: 1.4; text-align: center;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  pointer-events: none; user-select: none; -webkit-user-select: none; }
.rc-holdhint[hidden] { display: none; }
.rc-holdhint.on { background: rgba(120,70,10,.62); border-color: rgba(255,196,86,.75); color: #ffe2a6; }

.room-chat-bar { display: flex; gap: 4px; align-items: center; }
/* hidden 属性必须能盖过 .rc-tool 的 display:grid（否则麦克风/胶囊用 hidden 关不掉） */
.room-chat-bar .rc-tool[hidden] { display: none; }
.rc-text { flex: 1; min-width: 0; background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.14); border-radius: 16px;
  height: 32px; box-sizing: border-box; padding: 7px 12px; color: var(--ink);
  font-size: 0.8125rem; outline: none; }
/* e326：房间聊天输入框占位符「和房间里的朋友聊聊…」收小到 0.6875rem(≈11.69px)，
   与全站其它灰字提示统一（此前继承输入框 0.8125rem=13px，偏大） */
.rc-text::placeholder { color: var(--muted, #8a93a6); opacity: 1; font-size: 0.6875rem; }
.rc-text:focus { border-color: rgba(237,190,76,.45); }
.rc-tool { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14);
  border-radius: 50%; width: 32px; height: 32px; flex: 0 0 32px;
  display: grid; place-items: center; cursor: pointer; font-size: 0.9375rem; color: var(--ink);
  line-height: 1; padding: 0; transition: all .15s; }
/* e246：触摸设备点一下 :hover 会残留（sticky hover）。原来这条无条件的
   .rc-tool:hover 优先级 (0,2,0) 会盖过 .rc-holdtalk 的白底 (0,1,0)，
   导致「按住 说话」胶囊被点一下就永久变成半透明灰、看似卡死。
   只在真正带鼠标悬停能力的设备应用 hover 高亮；触摸设备一律不应用。 */
@media (hover: hover) and (pointer: fine) { .rc-tool:hover { background: rgba(255,255,255,.12); } }
/* hover / active / focus 命中时，语音胶囊只微微提亮到 .rc-tool:hover 同色阶，
   与输入框/圆钮保持同一视觉语言；触摸设备无 hover 不会残留（e246 根治）。 */
.rc-holdtalk:hover, .rc-holdtalk:active, .rc-holdtalk:focus { background: rgba(255,255,255,.12); color: #fff; }
/* e254 微信式语音切换图标：圆环 + 喇叭声波，与键盘图标共用 currentColor。
   圆环/声波由 SVG 自带 stroke=currentColor 绘制；rect 规则给键盘图标的按键用。 */
.rc-ico { width: 18px; height: 18px; display: block; pointer-events: none; }
.rc-ico rect { fill: currentColor; }
.rc-ico rect[fill="none"] { fill: none; }
/* e255：只保留一个圆环。按钮自身的灰底/灰边去掉，SVG 铺满 32px 按钮，
   白色圆环（r=11.1 + 描边）外径≈31.9px 直接贴住按钮外沿；圈内三角与两条声波
   在 24 viewBox 里等比收进中心，跟外圈留白协调，不再有「内亮圈 + 外灰圈」。
   语音模式切成键盘图标时恢复普通圆钮 + 18px 小图标，避免键盘被大圆环框住。
   #rcMic（真五门）与 #xqMic（象棋）共用这套样式。 */
#rcMic.rc-tool, #xqMic.rc-tool { background: transparent; border: 0; color: #aab4c4; }
#rcMic .rc-ico, #xqMic .rc-ico { width: 32px; height: 32px; }
#rcMic.rc-tool.voice-on, #xqMic.rc-tool.voice-on { background: rgba(58,70,92,.6); border: 1px solid rgba(120,140,170,.4); }
#rcMic.rc-tool.voice-on .rc-ico, #xqMic.rc-tool.voice-on .rc-ico { width: 18px; height: 18px; }
/* 去掉灰底后桌面端仍给一点悬停反馈（不放背景，避免又变出一个圆） */
@media (hover: hover) and (pointer: fine) { #rcMic.rc-tool:hover, #xqMic.rc-tool:hover { transform: scale(1.06); } }
/* 语音模式下的「按住说话」胶囊：宽圆角药丸，占满输入框同一位置。
   e281：外观与 .rc-text 输入框完全一致（淡半透明白底 + 细白边 + 浅色字），
   让整条输入栏（输入框 / 圆钮 / 胶囊）保持同色系、不再有刺眼或过重的色块。
   e282：加平滑过渡，按下变红 / 松开回淡白都是渐变，不再生硬闪跳。 */
/* e288：长按目标再加一层 callout:none（与全局 * 双保险），彻底掐掉
   安卓 Chrome 在「按住说话」上弹出的「手动标记广告」系统菜单 */
.rc-holdtalk, .rc-tool, .room-chat-bar { -webkit-touch-callout: none; }
.rc-holdtalk { flex: 1 1 auto; width: auto; border-radius: 16px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.125rem; color: var(--ink);
  background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.14);
  user-select: none; -webkit-user-select: none; touch-action: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease; }
/* e256：按下只换红底 + 文字「松开 结束」，尺寸、位移、外扩光晕全部不变，
   不放大、不盖住相邻的表情 / + 键；动画与光晕一律关掉。
   e282：红底由实心 .92 改为半透明 .5，和整站「说话人」红色（圆钮 live 态 .32）
   同一色相、同一视觉语言，不再是一块死板的实红；边框用同色系 .7 提亮轮廓，
   配合基础过渡，松开时平滑退回淡白。 */
.rc-holdtalk.live { background: rgba(255,70,70,.5); color: #fff; border-color: rgba(255,95,95,.7);
  transform: none; animation: none; box-shadow: none; }
/* e437 自由麦常开：琥珀色（区别于「按住中」的红），长文案缩一档字号、去字距防溢出。
   放在 .live 之后同特异性靠后覆盖；这个按钮就是「点击关闭」的开关。 */
.rc-holdtalk.freemic { background: rgba(255,178,54,.24); color: #ffe2a6;
  border-color: rgba(255,196,86,.8); font-size: 0.75rem; letter-spacing: 0;
  transform: none; animation: none; box-shadow: none; }
/* 按住说话：红色=我正在说话（松手停止）。
   别人说话时按钮保持普通麦克风，绝不变喇叭：房间内每个人都能同时按住说话，
   「谁在说」由提示浮层的用户名 + 座位上的喇叭波浪提示表达。
   e256：胶囊不走这条放大规则（:not(.rc-holdtalk)）——按下去放大 14% 再叠 6px
   光晕会盖住旁边的表情 / + 键，用户反馈别扭，胶囊保持原有大小。 */
.rc-tool.live:not(.rc-holdtalk) { background: rgba(255,70,70,.32); border-color: rgba(255,95,95,.7); animation: rcPulse 1.2s infinite; transform: scale(1.14); box-shadow: 0 0 0 6px rgba(255,70,70,.16), 0 0 22px rgba(255,70,70,.55); }
/* e247：说话脉冲不再用 opacity —— 半透明白叠深色底会被看成「变灰」。
   改为只改变光晕强度，即便状态残留，胶囊也不会发灰。
   e256 起胶囊不再播放这个脉冲动画，规则留给其它 .rc-tool.live 元素。 */
@keyframes rcPulse { 50% { box-shadow: 0 0 0 3px rgba(255,70,70,.10), 0 0 10px rgba(255,70,70,.35); } }

/* ── e288：PWA「安装到桌面」横幅（安卓 Chrome 捕获 beforeinstallprompt 后显示）──
   贴在大厅 / 房间底部导航栏之上，常驻不挡操作；点「安装」走原生安装，
   点 × 收起。配色与全站一致（深色底 + 金边）。 */
.install-banner { position: fixed; left: 12px; right: 12px;
  bottom: calc(var(--tb-h) + 8px); z-index: 60;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 14px;
  background: rgba(20, 27, 38, .97); border: 1px solid rgba(237, 190, 76, .45);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .5); }
.install-banner[hidden] { display: none; }
.ib-ico { font-size: 1.25rem; line-height: 1; flex: 0 0 auto; }
.ib-text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; }
.ib-text b { font-size: 0.8438rem; color: var(--ink); }
.ib-text span { font-size: 0.6563rem; color: var(--muted); margin-top: 1px; }
.ib-btn { flex: 0 0 auto; border: none; border-radius: 10px; padding: 8px 14px;
  font-size: 0.8125rem; font-weight: 700; color: #1a1206; cursor: pointer;
  background: linear-gradient(180deg, #f3cf6a, #e0b13f); }
.ib-btn:active { transform: scale(.96); }
.ib-x { flex: 0 0 auto; width: 26px; height: 26px; border-radius: 50%;
  border: none; background: rgba(255, 255, 255, .08); color: var(--muted);
  font-size: 1rem; line-height: 1; cursor: pointer; }
.ib-x:active { background: rgba(255, 255, 255, .16); }
/* 个人中心里的常驻「安装到桌面」入口（触摸设备才显示） */
.pf-install { margin: 12px 0 4px; text-align: center; }
.pf-install[hidden] { display: none; }

/* ── 按住说话提示浮层 ──
   e223：不再放屏幕中央。那里正好是四门下注区，别人一说话就把赔率与
   下注额盖住，害其他玩家看不见自己下注的门。改为贴底显示（哈希条上方）：
   窄屏上下堆叠时下注区在上半屏、底部是座位/最近开奖面板；宽屏左右双栏时
   再单独贴到右侧栏，左侧下注区同样零遮挡。声波柱仍由真实麦克风音量驱动，
   pointer-events:none 保证浮层本身不拦截任何点击。 */
.ptt-tip { /* e226：底部多了常驻导航栏，整体上移一栏高度，避免提示卡压在导航按钮上 */
  position: fixed; left: 50%; bottom: calc(54px + var(--tb-h)); transform: translateX(-50%);
  z-index: 9999; pointer-events: none;
  display: flex; flex-direction: column; align-items: center;
  /* e256：收紧成小提示条，少盖座位与其它按钮；去掉 7px 外扩光晕和大留白，
     信息一项不少（声波柱 / 正在说话 / 松手停止 / 音量条） */
  min-width: 0; max-width: 82vw; padding: 10px 18px 12px;
  border-radius: 16px; text-align: center; color: #fff;
  background: rgba(24, 18, 14, .93); border: 2px solid rgba(255, 95, 95, .8);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .5); }
.ptt-tip[hidden] { display: none; }
.ptt-tip.others { min-width: 0; padding: 8px 16px 10px;
  background: rgba(12, 26, 20, .92); border-color: rgba(60, 200, 120, .7);
  box-shadow: 0 8px 22px rgba(0, 0, 0, .45); }
.ptt-waves { display: flex; align-items: center; justify-content: center; gap: 5px; height: 30px; margin-bottom: 2px; }
.ptt-waves i { display: block; width: 7px; height: 26px; border-radius: 5px;
  transform-origin: center; transform: scaleY(.2);
  background: linear-gradient(180deg, #ffd76e, #ff5b5b);
  transition: transform .08s linear; }
.ptt-tip.others .ptt-waves { height: 24px; }
.ptt-tip.others .ptt-waves i { width: 6px; height: 20px; background: linear-gradient(180deg, #7ff0b0, #2ec97a);
  animation: pttBob .9s ease-in-out infinite; }
.ptt-tip.others .ptt-waves i:nth-child(2n) { animation-delay: -.3s; }
.ptt-tip.others .ptt-waves i:nth-child(3n) { animation-delay: -.6s; }
@keyframes pttBob { 0%, 100% { transform: scaleY(.25); } 50% { transform: scaleY(.95); } }
.ptt-title { font-size: 1rem; font-weight: 700; letter-spacing: 0.0313rem; }
.ptt-tip.others .ptt-title { font-size: 0.875rem; max-width: 78vw; line-height: 1.4; word-break: break-all; }
.ptt-sub { font-size: 0.6875rem; opacity: .82; margin-top: 3px; line-height: 1.4; white-space: nowrap; }
.ptt-meter { width: 100%; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .14); overflow: hidden; margin-top: 6px; }
.ptt-meter span { display: block; height: 100%; width: 0; border-radius: 4px; background: linear-gradient(90deg, #ffd76e, #ff5b5b); transition: width .08s linear; }
.ptt-tip.others .ptt-meter { display: none; }

/* e223：>900px 是左右双栏，下注区与筹码/操作栏都在左侧，居中贴底会压到
   筹码栏；改贴右侧栏（座位/最近开奖那一列），并限宽，绝不往左侵入下注区。 */
@media (min-width: 901px) { .ptt-tip { left: auto; right: 16px; transform: none; max-width: 320px; } }
/* e223：561~900px 单列布局会把下注区拉得很高（平板竖屏 / 桌面窄窗口），
   底部留给提示卡的条带只有一百多像素，原大卡片会顶回下注区。这类视口
   再收一波尺寸；手机竖屏（<=560px）从 e256 起也已是紧凑小条，这里继续压。 */
@media (min-width: 561px) and (max-width: 900px) and (min-height: 621px) { .ptt-tip, .ptt-tip.others {
    left: auto; right: 12px; transform: none; min-width: 0; max-width: 260px;
    bottom: calc(46px + var(--tb-h)); padding: 10px 20px 12px;
  }
  .ptt-waves, .ptt-tip.others .ptt-waves { height: 30px; margin-bottom: 2px; }
  .ptt-waves i, .ptt-tip.others .ptt-waves i { height: 26px; }
  .ptt-title, .ptt-tip.others .ptt-title { font-size: 1rem; }
  .ptt-sub { margin-top: 3px; font-size: 0.6875rem; }
  .ptt-meter { margin-top: 6px; } }
/* e223：横屏 / 矮屏可用高度只剩几十像素，压成极简条，绝不顶回下注区。
   选择器把 .ptt-tip.others 的派生规则一起写上，避免被更高特异性覆盖。
   这几类视口里筹码栏被拉到左侧靠下，浮层改贴右，水平方向彻底避开。 */
@media (max-height: 620px) { .ptt-tip, .ptt-tip.others {
    left: auto; right: 12px; transform: none; min-width: 0; max-width: 240px;
    bottom: calc(44px + var(--tb-h)); padding: 6px 16px 8px;
  }
  .ptt-waves, .ptt-tip.others .ptt-waves { height: 20px; margin-bottom: 1px; }
  .ptt-waves i, .ptt-tip.others .ptt-waves i { height: 17px; }
  .ptt-title, .ptt-tip.others .ptt-title { font-size: 0.8125rem; }
  .ptt-sub { margin-top: 1px; font-size: 0.6563rem; }
  .ptt-meter { margin-top: 4px; } }
.rc-send { background: rgba(237,190,76,.2); border-color: rgba(237,190,76,.45); color: var(--gold); font-size: 0.875rem; }
.rc-emoji { /* 悬浮层：盖在消息区上方，不占布局空间，工具行永不被遮挡；高度自适应完整展示全部表情 */
  display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px;
  padding: 7px; background: rgba(13,18,27,.97); border: 1px solid var(--line);
  border-radius: 10px;
  position: absolute; left: 10px; right: 10px; bottom: 50px;
  z-index: 30;
  box-shadow: 0 10px 28px rgba(0,0,0,.5); }
.rc-emoji button { background: none; border: none; font-size: 1.25rem; cursor: pointer; padding: 4px; border-radius: 6px; line-height: 1; }
.rc-emoji[hidden] { display: none; }
.rc-emoji button { background: none; border: none; font-size: 1.125rem; cursor: pointer; padding: 3px; border-radius: 6px; line-height: 1; }
.rc-emoji button:hover { background: rgba(255,255,255,.1); }

/* 底栏哈希 */
.hashbar { flex: 0 0 auto; height: 40px; display: flex; align-items: center; gap: 10px;
  flex-wrap: nowrap; /* e227：强制单行，绝不换行成竖排占高度 */
  padding: 0 18px; border-top: 1px solid var(--line);
  background: rgba(10,14,21,.9); font-size: 0.75rem; }
.hb-tag { padding: 2px 8px; border-radius: 6px; font-size: 0.6875rem; font-weight: 700;
  white-space: nowrap; flex: 0 0 auto; /* e227：标签不换行、不被压缩成竖排 */
  background: rgba(47,191,113,.15); color: var(--green); }
.hb-tag.warn { background: rgba(240,84,95,.15); color: var(--red); }
.hb-text { color: var(--muted); font-family: ui-monospace, Menlo, monospace; font-size: 0.7188rem;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  flex: 1 1 auto; min-width: 0; /* e227：占满剩余宽度并省略，长哈希不撑破整行 */ }
.hb-text b { color: var(--gold); font-weight: 600; }

/* 弹窗 */
.modal { position: fixed; inset: 0; background: rgba(4,7,11,.72); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center;
  /* z-index 提到好友/私聊全屏页（.fr-ov 999999）、通话层与大图查看(1000001/1000002)之上：
     此前在聊天页点赠送/设置交易密码，全局弹窗被整页盖住，看起来「点了没反应」。 */
  z-index: 1000003; }
.modal.show { display: flex; }
.modal-box { width: 380px; max-width: 92vw; background: var(--panel); border: 1px solid var(--line);
  border-radius: 18px; padding: 22px; box-shadow: 0 30px 70px rgba(0,0,0,.6);
  animation: fadeUp .2s ease; }
.modal-box h3 { margin: 0 0 18px; font-size: 1rem; }
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 0.6875rem; color: var(--muted); margin-bottom: 6px; }
/* e271：字段内单独一行的小字说明（如申请上庄的「单注限红」），放在输入框正上方 */
.field .field-note { display: block; font-size: 0.6875rem; line-height: 1.2; color: var(--gold, #e7c66b);
  opacity: .85; letter-spacing: 0.0313rem; margin: -2px 0 6px; }
.field input, .field select { width: 100%; padding: 10px 12px; border-radius: 9px; font-size: 0.875rem;
  background: #0b1119; border: 1px solid var(--line); color: var(--ink); outline: none; }
.field input:focus, .field select:focus { border-color: var(--gold); }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
/* e312：【字段说明收进「?」折叠】申请上庄弹窗原来有三段长说明直接铺在表单里，
   把输入框挤到很下面、整屏不整齐（截图红框批注）。现在每段说明挂在对应字段的
   问号按钮上，默认收起、点击才展开，弹窗一眼能看全所有输入项。
   ── 想改问号大小改 width/height；想改展开面板配色改 .help-body 的 background/border。 */
.field-label-row { display: flex; align-items: center; gap: 6px; margin-bottom: 6px; min-width: 0; }
.field-label-row label { display: block; flex: 0 1 auto; min-width: 0; margin-bottom: 0; }
.field-note-row { display: flex; align-items: center; gap: 6px; margin: -2px 0 6px; min-width: 0; }
.field-note-row .field-note { display: inline-block; flex: 0 0 auto; margin: 0; }
.help-q { display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 16px; width: 16px; height: 16px; padding: 0; margin: 0;
  border-radius: 50%; border: 1px solid rgba(237,190,76,.55);
  background: rgba(237,190,76,.1); color: var(--gold, #e7c66b);
  font-family: inherit; font-size: 0.6875rem; font-weight: 700; line-height: 1;
  text-align: center; vertical-align: middle; cursor: pointer;
  transition: background .15s, color .15s; }
.help-q:hover, .help-q.on { background: var(--gold, #e7c66b); color: #1a1407; }
.help-body { display: block; margin: 8px 0 2px; padding: 9px 11px;
  border-radius: 9px; border: 1px solid rgba(255,255,255,.1);
  background: rgba(255,255,255,.05); color: var(--muted, #8a93a6);
  font-size: 0.6563rem; line-height: 1.55; text-align: left; }
/* 作者样式 display:block 会盖掉浏览器默认的 [hidden]{display:none}（e307 / e310 同款坑），
   必须显式兜底，否则问号永远关不掉。 */
.help-body[hidden] { display: none; }
.help-body p { margin: 0 0 6px; }
.help-body p:last-child { margin-bottom: 0; }
.help-body b { color: var(--gold, #e7c66b); }
.modal-actions { display: flex; gap: 10px; margin-top: 20px; }
.modal-actions .btn { flex: 1; }

/* 许可证激活弹窗 */
.license-modal { position: fixed; inset: 0; z-index: 9999; background: rgba(0,0,0,.88); display: flex; align-items: center; justify-content: center; padding: 20px; }
.license-modal[hidden] { display: none; }
.license-box { background: #141b26; border: 1px solid rgba(255,255,255,.1); border-radius: 16px; padding: 28px 24px; width: 100%; max-width: 340px; text-align: center; }
.license-box h2 { font-size: 1.1rem; color: #e9c46a; margin-bottom: 12px; }
.license-desc { font-size: 0.8rem; color: #888; line-height: 1.5; margin-bottom: 18px; }
.license-input { width: 100%; padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,.15); background: #0d1117; color: #fff; font-size: 1rem; font-family: monospace; text-align: center; letter-spacing: 2px; text-transform: uppercase; margin-bottom: 14px; box-sizing: border-box; }
.license-input:focus { outline: none; border-color: #e9c46a; }
.license-btn { width: 100%; padding: 12px; border: none; border-radius: 10px; background: #e9c46a; color: #141b26; font-size: 0.95rem; font-weight: bold; cursor: pointer; }
.license-btn:active { opacity: .85; }
.license-error { color: #e94560; font-size: 0.82rem; margin-bottom: 12px; line-height: 1.5; min-height: 1.2em; }
.license-error:not([hidden]) { display: block; }
.license-contact { margin-top: 14px; font-size: 0.78rem; color: #666; line-height: 1.5; }
.license-meta { margin-bottom: 14px; font-size: 0.78rem; color: #9aa7b8; line-height: 1.7; text-align: left; }
.license-meta div { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.license-meta[hidden] { display: none; }

/* Toast */
.toast { /* e226：抬到全局导航栏上方，提示不会盖住 5 个导航按钮
   e420：z-index 提到好友全屏页（999999）之上——此前在好友页里点添加/同意，
   toast 被整页盖住完全看不见，用户以为「提示跑到别的页面去了」。 */
  position: fixed; left: 50%; bottom: calc(68px + var(--tb-h)); transform: translate(-50%, 20px);
  background: rgba(20,27,38,.97); border: 1px solid var(--line);
  color: var(--ink); padding: 11px 20px; border-radius: 11px; font-size: 0.8438rem;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 1000004;
  box-shadow: 0 14px 36px rgba(0,0,0,.5); max-width: 80vw; text-align: center;
  white-space: pre-line; line-height: 1.55; } /* e291：支持 \n 多行（权限指引步骤） */
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.err { border-color: rgba(240,84,95,.5); color: #ffb3b8;
  text-align: left; max-width: 88vw; white-space: pre-line; } /* e291：错误指引左对齐、更宽、可换行 */
.toast.ok { border-color: rgba(47,191,113,.5); color: #9af0c4; }

/* 响应式 */
@media (max-width: 900px) { .table-wrap { grid-template-columns: 1fr; grid-template-rows: 1fr auto; padding: 10px; gap: 10px; }
  .side { flex-direction: row; flex-wrap: wrap; align-content: flex-start; }
  .side .panel { flex: 1; max-height: 150px; }
  .side .room-chat-panel { flex: 1 1 100%; max-height: 118px; }
  .suit-card .suit-sym { font-size: 2.375rem; }
  .suit-grid { --joker-d: 106px; }
  .suit-total { font-size: 0.9375rem; }
  .lobby { padding: 16px; }
  .room-list { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
.topbar { padding: 0 10px; gap: 8px; }
.wallet-item i { display: none; }
.suit-grid { gap: 7px; }
.suit-card { padding: 10px 4px; }
.suit-card .suit-sym { font-size: 1.875rem; }
.suit-name { font-size: 0.6875rem; }
.bp-keys { gap: 5px; }
.bp-key { padding: 9px 4px; font-size: 0.7813rem; }
.chip { min-width: 44px; padding: 8px 10px; font-size: 0.75rem; }
.bet-bar { flex-wrap: wrap; }
.hashbar { font-size: 0.6875rem; }}

/* ───────────── 盲注与公平模式 ───────────── */
.blind-note { display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; border-radius: 10px; font-size: 0.7813rem;
  background: rgba(120, 90, 255, .14);
  border: 1px dashed rgba(150, 120, 255, .45);
  color: #c9bcff; }
.blind-note[hidden] { display: none; }
.bp-seed { margin-bottom: 10px; }
.bp-seed-text { margin: 0 0 8px; font-size: 0.7813rem; line-height: 1.75;
  color: rgba(255,255,255,.66);
  background: rgba(0,0,0,.22); border-radius: 9px; padding: 9px 11px; }
.bp-seed-text b { color: var(--gold); }
.seed-codes { display: flex; flex-direction: column; gap: 4px; }
.seed-codes code { font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem;
  color: rgba(255,255,255,.45);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.suit-card.locked .suit-total { color: rgba(255,255,255,.35); font-size: 1.25rem; letter-spacing: 0.125rem; }
.hb-more { margin-left: auto; color: var(--gold); font-size: 0.7188rem; white-space: nowrap; opacity: .8; }
.hashbar { cursor: pointer; }
.hashbar:hover .hb-more { opacity: 1; }
.mode-badge { font-size: 0.625rem; padding: 2px 7px; border-radius: 6px; margin-left: 6px;
  background: rgba(120, 90, 255, .18); color: #b5a4ff; border: 1px solid rgba(150,120,255,.35); }
.mode-badge.manual { background: rgba(237,190,76,.14); color: var(--gold); border-color: rgba(237,190,76,.3); }

/* 验证弹窗 */
.proof-block { background: #0b1119; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; margin-bottom: 10px; font-size: 0.75rem; line-height: 1.9; }
.proof-block .pf-row { display: flex; gap: 8px; }
.proof-block .pf-k { color: var(--muted); flex: 0 0 96px; }
.proof-block .pf-v { font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem;
  color: #cfe0f5; word-break: break-all; flex: 1; }
.proof-ok { color: var(--green); font-weight: 700; }
.proof-bad { color: var(--red); font-weight: 700; }
.proof-formula { font-family: ui-monospace, Menlo, monospace; font-size: 0.6875rem;
  background: rgba(237,190,76,.08); border-left: 2px solid var(--gold);
  padding: 8px 10px; border-radius: 0 6px 6px 0; color: #e2cf9a;
  margin-bottom: 12px; word-break: break-all; }

/* 模式选择卡 */
.mode-pick { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; margin-bottom: 16px; }
.mode-opt { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px;
  background: rgba(255,255,255,.02); cursor: pointer; transition: all .15s; }
.mode-opt:hover { border-color: rgba(237,190,76,.4); }
.mode-opt.on { border-color: var(--gold); background: rgba(237,190,76,.1); }
.mode-opt b { display: block; font-size: 0.8438rem; margin-bottom: 5px; }
.mode-opt span { font-size: 0.6875rem; color: var(--muted); line-height: 1.6; }
.mode-opt .tag { font-size: 0.625rem; color: var(--green); display: block; margin-top: 6px; }

/* ───────────── 自定义快捷筹码 ───────────── */
.chips-wrap { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.chip-custom-group { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip-custom { width: 88px; padding: 9px 10px; border-radius: 10px;
  border: 1px solid var(--line); background: rgba(0,0,0,.28);
  color: var(--text); font-size: 0.8125rem; outline: none; text-align: center; }
.chip-custom:focus { border-color: var(--gold); }
.chip-custom::placeholder { color: var(--muted); font-size: 0.8125rem; }
.chip-custom::-webkit-outer-spin-button, .chip-custom::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.chip-custom { -moz-appearance: textfield; appearance: textfield; }
.chip-edit { flex: 0 0 auto; width: 34px; height: 34px; border-radius: 10px;
  /* e307：纯符号按钮显式双向居中，✎ 不再受各机型默认基线影响 */
  display: inline-flex; align-items: center; justify-content: center; line-height: 1;
  border: 1px dashed rgba(237,190,76,.45); background: rgba(237,190,76,.08);
  color: var(--gold); font-size: 0.875rem; cursor: pointer; transition: background .15s; }
.chip-edit:hover { background: rgba(237,190,76,.18); }
.hint.subtle { color: rgba(255,255,255,.34); font-size: 0.6563rem; margin-top: 6px; }

/* ───────────── 公告条 ───────────── */
.announce { margin: 0; padding: 9px 18px; font-size: 0.7813rem;
  background: linear-gradient(90deg, rgba(237,190,76,.16), rgba(237,190,76,.03));
  border-bottom: 1px solid rgba(237,190,76,.22);
  color: #f0dca6; display: flex; gap: 8px; align-items: center;
  /* e298：固定为不伸缩的整行，并抬到独立层，防止 iOS 上被顶栏叠绘穿透/错位 */
  flex: 0 0 auto; position: relative; z-index: 2; box-sizing: border-box; }
.announce[hidden] { display: none; }
.announce .ann-horn { filter: drop-shadow(0 0 4px rgba(237,190,76,.35)); }
/* e307：纯符号「♪」按钮统一双向居中 + line-height:1，消除符号字形基线偏移 */
.icon-btn { width: 34px; padding: 0 !important; font-size: 0.9375rem;
  display: inline-flex; align-items: center; justify-content: center; line-height: 1; }
.icon-btn.off { opacity: .42; }

/* ───────────── 背景音乐按钮：全页面可见 + 静音红色角标 ───────────── */
.js-music-btn { position: relative; }
.js-music-btn.off { opacity: .85; } /* 关闭时按钮本体保持醒目，状态靠红色静音角标表达 */
.js-music-btn.hidden-music { display: none !important; } /* 后台关闭/未配置该房背景音时，房内音乐开关整体隐藏 */
.js-music-btn .mute-flag { position: absolute; right: -5px; bottom: -5px;
  width: 15px; height: 15px; display: block;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,.55)); }
.music-fab { position: fixed; top: 14px; left: 16px; z-index: 60;
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; padding: 0; line-height: 1;
  font-size: 1.0625rem; color: var(--gold);
  background: rgba(20,27,38,.92); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.4); }
.music-fab .mute-flag { width: 17px; height: 17px; right: -2px; bottom: -2px; }

/* ───────────── 个人中心 ───────────── */
.profile-wrap { flex: 1 1 auto; min-height: 0; height: auto; overflow-y: auto;
  padding: 22px 24px 60px; max-width: 1040px; margin: 0 auto; width: 100%;
  -webkit-overflow-scrolling: touch; }
.profile-hero { display: flex; flex-direction: column; gap: 8px;
  background: linear-gradient(135deg, #182231, #121a26);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px; margin-bottom: 10px; }
/* e241：头部一行 = 头像在左 + 昵称/账号行与头像水平同排（垂直居中） */
.pf-head { display: flex; align-items: center; gap: 10px; min-width: 0; width: 100%; box-sizing: border-box; }
.pf-head .pf-name { flex: 1 1 auto; min-width: 0; }
.pf-head .avatar-wrap { margin: 0; }
.avatar { width: 66px; height: 66px; border-radius: 20px; flex: 0 0 66px;
  display: grid; place-items: center; font-size: 1.625rem; font-weight: 800;
  background: linear-gradient(135deg, #f0cc6a, #c9962a); color: #2a1f04;
  box-shadow: 0 10px 24px rgba(237,190,76,.22); }
.pf-name { font-size: 1.25rem; font-weight: 700; letter-spacing: 0.0313rem; }
.pf-wallet { display: flex; gap: 22px; }
.pf-card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 13px 16px; margin-bottom: 10px; }
.pf-card h4 { font-size: 0.8125rem; margin-bottom: 14px; font-weight: 700; display: flex; gap: 8px; align-items: baseline; }
.pf-card h4 .muted { font-size: 0.6875rem; font-weight: 400; }
.stat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.stat-cell { background: rgba(0,0,0,.2); border-radius: 10px; padding: 11px 12px; }
.stat-cell span { display: block; font-size: 0.6875rem; color: var(--muted); margin-bottom: 6px; }
.stat-cell b { font-size: 1rem; font-variant-numeric: tabular-nums; }
.stat-cell b.pos { color: var(--green); }
.stat-cell b.neg { color: var(--red); }
.pf-card .field { margin-bottom: 10px; }
.pf-card .field label { font-size: 0.6875rem; color: var(--muted); display: block; margin-bottom: 5px; }
.pf-card .field input { width: 100%; padding: 9px 11px; border-radius: 9px; background: #0b1119;
  border: 1px solid var(--line); color: var(--ink); font-size: 0.8125rem; outline: none; }
.pf-card .field input:focus { border-color: var(--gold); }
.pf-actions { display: flex; gap: 10px; margin-top: 12px; }
.pf-rooms { display: flex; flex-direction: column; gap: 8px; }
.pf-room-row { display: grid; grid-template-columns: minmax(0, 1fr) 70px 100px 100px 100px 16px;
  gap: 10px; align-items: center; font-size: 0.7813rem;
  padding: 9px 12px; border-radius: 10px; background: rgba(0,0,0,.18); }
.pf-room-row.head { background: none; color: var(--muted); font-size: 0.6875rem; padding-top: 0; }
.pf-legacy-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: rgba(255,255,255,.04); color: var(--muted, #8fa1b5); font-size: 0.6875rem; line-height: 1.6; }
/* 房间名较长（如「真五门519084」）时省略显示，悬停可看完整名 */
.pf-room-row span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* e238：注单查询——房间行按钮化，点击展开逐局注单 */
.pf-room-item { display: flex; flex-direction: column; gap: 6px; }
.pf-room-btn { appearance: none; border: 0; width: 100%; min-width: 0;
  text-align: left; cursor: pointer; color: inherit; font: inherit;
  transition: background .15s; }
.pf-room-btn:hover { background: rgba(0,0,0,.3); }
.pf-room-caret { color: var(--muted); font-size: 0.6875rem; text-align: right; transition: transform .15s; }
.pf-room-item.open .pf-room-caret { transform: rotate(90deg); color: var(--gold); }
.pf-room-detail { padding: 0 4px 2px; display: flex; flex-direction: column; gap: 6px; }
.pf-room-detail[hidden] { display: none; }
.pf-room-loading { color: var(--muted); font-size: 0.7188rem; padding: 4px 2px; }
/* e248：注单查询逐局明细，与房间内「本房下注」结算卡同款：
   ① 第N局·开X门 + 时间  ② 五门各注额  ③ 投注 + 本局净输赢（涨红跌绿） */
.pf-round { padding: 8px 10px; border-radius: 9px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.09); }
.pf-round-top { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 0.75rem; color: #cddcf0; }
.pf-round-top > span:first-child { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-round-t { color: var(--muted); font-size: 0.6875rem; flex: 0 0 auto; }
.pf-round-top .hit { font-style: normal; color: var(--green); font-size: 0.6875rem; margin-left: 6px; }
.pf-round-bets { margin: 5px 0; font-size: 0.7813rem; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-x: auto; }
.pf-round-bot { display: flex; justify-content: space-between; gap: 6px; font-size: 0.6563rem; color: #9fb2cc; font-variant-numeric: tabular-nums; }
.pf-round-net.win { color: #ff8b93; }   /* 赢=红，涨红跌绿 */
.pf-round-net.lose { color: #5fd08a; }
.pf-empty { color: var(--muted); font-size: 0.7813rem; padding: 14px 0; text-align: center; }

/* e250：个人中心「充值记录 / 提现记录」独立列表 —— 两行式，手机端状态不隐藏、长单号可换行 */
.pf-rec-list { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 7px; -webkit-overflow-scrolling: touch; }
.pf-rec-row { padding: 9px 11px; border-radius: 9px; background: rgba(0,0,0,.15); border: 1px solid var(--line); font-size: 0.7813rem; }
.pf-rec-l1, .pf-rec-l2 { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pf-rec-l1 .t { color: var(--muted); font-size: 0.6563rem; margin-left: auto; white-space: nowrap; }
.pf-rec-l2 { margin-top: 6px; }
.pf-rec-money { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-rec-pts { margin-left: auto; flex: 0 0 auto; font-variant-numeric: tabular-nums; color: var(--muted); }
.pf-rec-pts.pos { color: var(--green); }
.pf-rec-pts.neg { color: var(--red); }
.pf-rec-meta { margin-top: 5px; font-size: 0.6875rem; color: var(--muted); word-break: break-all; }
.pf-rec-meta .wd-ord-id { cursor: pointer; color: #9fb2cc; text-decoration: underline dotted; }
.pf-rec-memo { margin-top: 5px; font-size: 0.7188rem; color: #f0a35e; word-break: break-all; }
/* e251：充值前 / 后余额（上分那一刻的账户余额，不是当前余额） */
.pf-rec-bal { margin-top: 5px; font-size: 0.6563rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.pf-rec-bal b { color: var(--ink); font-weight: 600; }
.pf-rec-bal b.pos { color: var(--green); }
.pf-rec-bal .muted { font-size: 0.6563rem; }
@media (max-width: 640px) {
.pf-rec-list { max-height: none; }}

@media (max-width: 860px) {
.profile-hero { flex-wrap: wrap; }
.pf-wallet { border-left: 0; padding-left: 0; }}

/* 充值弹窗 */
.rc-tiers { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 14px 0; }
.rc-tier { border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 8px;
  text-align: center; cursor: pointer; transition: all .15s; background: rgba(255,255,255,.02); }
.rc-tier:hover { border-color: rgba(237,190,76,.45); }
.rc-tier.on { border-color: var(--gold); background: rgba(237,190,76,.12); }
.rc-tier b { display: block; font-size: 1rem; }
.rc-tier span { font-size: 0.6875rem; color: var(--muted); }
.rc-scan { display: flex; gap: 14px; align-items: center; padding: 12px;
  background: rgba(0,0,0,.22); border-radius: 12px; margin-top: 12px; }
.rc-scan img { width: 108px; height: 108px; object-fit: contain; border-radius: 8px; background: #fff; }
.rc-scan .rc-scan-tip { font-size: 0.6563rem; color: var(--muted); line-height: 1.9; }
/* 按支付方式展示的收款信息面板（账号/卡号/地址 + 收款码） */
/* e305：【收款码左对齐】旧版 .rc-paybox 左侧 12px 内边距 + .rc-qr 10px 内边距且居中，
   累计把二维码往右推了约 22px，与上方「支付方式」文字错开，看起来跟之前不一样、不协调。
   现在左侧不再额外留白：灰框左边缘与「支付方式」文字齐平，码图再往左收 2px。
   灰框内部仍保持 center 对称，「扫描二维码进行支付」提示不会顶出框外。 */
.rc-paybox { display: flex; gap: 14px; align-items: flex-start; padding: 12px 12px 12px 0;
  background: rgba(0,0,0,.22); border-radius: 12px; margin-top: 6px; }
/* 二维码灰框：码图 + 底部「扫描二维码进行支付」提示，整体与上方文字顶部齐平 */
.rc-qr { display: flex; flex-direction: column; align-items: center; gap: 7px;
  flex: 0 0 auto; background: #43484f; border-radius: 10px; padding: 8px;
  margin-top: 5px; /* 抵消右侧文字行高的半行留白，使灰框顶边与文字首行顶边齐平 */ }
.rc-qr img { width: 104px; height: 104px; object-fit: contain; border-radius: 6px; background: #fff; display: block; }
.rc-qr-tip { font-size: 0.6875rem; color: #edbe4c; white-space: nowrap; }
.rc-paybox .rc-scan-tip { font-size: 0.6563rem; color: var(--muted); line-height: 1.9; word-break: break-all; }
.rc-paybox .rc-scan-tip b { color: #edbe4c; }
@media (max-width: 480px) {
.rc-qr { padding: 6px; gap: 5px; }
.rc-qr img { width: 92px; height: 92px; }
.rc-qr-tip { font-size: 0.625rem; }}

/* USDT 货币兑换换算器（收款信息下方，USDT ⇄ 人民币双向联动） */
.rc-conv { margin-top: 10px; padding: 12px 14px;
  background: rgba(0,0,0,.22); border: 1px solid rgba(255,255,255,.06); border-radius: 12px; }
/* 头部：标题独占一行，两条汇率在下一行（窄屏自动换行，不再被挤到卡片外溢出右边界） */
.rc-conv-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; margin-bottom: 10px; }
.rc-conv-title { font-size: 0.7813rem; color: #cfd8e3; white-space: nowrap; flex: 1 0 100%; }
.rc-conv-rate { font-size: 0.72rem; color: #edbe4c; white-space: nowrap; }
.rc-conv-row { display: flex; gap: 10px; align-items: center; }
.rc-conv-box { display: flex; align-items: center; gap: 6px; flex: 1 1 0; min-width: 0;
  background: #0a1119; border: 1px solid #24344a; border-radius: 10px; padding: 7px 10px; }
.rc-conv-box:focus-within { border-color: rgba(237,190,76,.55); }
.rc-conv-ic { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border-radius: 50%; font-size: 0.8125rem; font-weight: 700; color: #fff; flex: 0 0 auto; }
.rc-conv-ic.usdt { background: #26a17b; }
.rc-conv-ic.cny { background: #de2910; font-size: 0.75rem; }
.rc-conv-name { font-size: 0.8125rem; color: #e8eef7; flex: 0 0 auto; }
/* e329：让灰字占位符「输入数量 / 输入金额」与左边的圆图标、USDT/人民币 落在同一水平中线上。
   实测（8 倍像素逐块截图）：占位符的墨迹中心比标签文字低 0.62px，比圆图标中线也低 0.5px 左右，
   而输入后的正文数字又比标签高 0.56px —— 这是字号不同（占位符 11.69px、正文 14px、标签 13px）
   带来的字体度量差，改内边距 / 行高实测都动不了它（padding 4px→0、line-height normal→1/1.5/26px
   六种组合量出来都是 +0.62px）。
   所以：输入框本身按行盒居中（line-height:1 + 去掉纵向内边距，父级 flex 的 align-items:center 生效），
   再只在「空着、显示占位符」这一态把整行上移 0.6px 对齐标签中线；
   一旦有输入内容就撤掉这 0.6px，正文数字不会被顶高。 */
.rc-conv-box input { flex: 1 1 auto; min-width: 0; border: none; outline: none; background: transparent;
  color: #e8eef7; font-size: 0.875rem; padding: 0 2px; line-height: 1; align-self: center; }
.rc-conv-box input:placeholder-shown { transform: translateY(-0.6px); }
/* e326：币币兑换两输入框占位符「输入数量 / 输入金额」收小到 0.6875rem(≈11.69px)，
   与全站其它灰字提示统一（此前桌面继承 0.875rem=14px、窄屏 0.8125rem=13px，偏大） */
.rc-conv-box input::placeholder { color: rgba(232,238,247,.4); font-size: 0.6875rem; }
.rc-conv-swap { font-size: 1.25rem; color: #8fa3b8; flex: 0 0 auto; }
/* 窄屏：换算框保持同一行不堆叠，自动收缩图标/字号/间距避免文字截断 */
@media (max-width: 480px) { .rc-conv { padding: 10px 10px; }
  .rc-conv-title { font-size: 0.6875rem; }
  .rc-conv-rate { font-size: 0.6563rem; }
  .rc-conv-row { gap: 6px; }
  .rc-conv-box { gap: 4px; padding: 6px 8px; }
  .rc-conv-ic { width: 22px; height: 22px; font-size: 0.6875rem; }
  .rc-conv-name { font-size: 0.7188rem; }
  .rc-conv-box input { font-size: 0.8125rem; }
  .rc-conv-swap { font-size: 1rem; } }

/* 音乐被浏览器自动播放策略拦住时，按钮轻微脉冲提示「点我」 */
.icon-btn.nudge { animation: music-nudge 1.9s ease-in-out infinite;
  border-color: rgba(237,190,76,.5);
  color: var(--gold); }
@keyframes music-nudge {
  0%, 100% { box-shadow: 0 0 0 0 rgba(237,190,76,0); }
  50%      { box-shadow: 0 0 0 5px rgba(237,190,76,.14); }
}

/* ───────────── 声音设置（个人中心） ───────────── */
.sound-list { display: flex; flex-direction: column; gap: 14px; margin-bottom: 4px; }
.sound-row { display: grid; grid-template-columns: 84px minmax(0, 1fr) 54px; align-items: center; gap: 12px; }
.sound-name { font-size: 0.7813rem; color: var(--ink); white-space: nowrap; }
.sound-val { font-size: 0.75rem; color: var(--gold); text-align: right;
  font-variant-numeric: tabular-nums; font-weight: 600; }

/* 开关 */
.switch { width: 46px; height: 25px; border-radius: 13px; padding: 0; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.07);
  position: relative; justify-self: start;
  transition: background .16s, border-color .16s; }
.switch i { position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%;
  background: #7b8697; transition: transform .18s, background .18s; }
.switch.on { background: rgba(237,190,76,.22); border-color: rgba(237,190,76,.55); }
.switch.on i { transform: translateX(21px); background: var(--gold); }
.switch:hover { border-color: rgba(237,190,76,.45); }

/* 滑块 */
.slider { -webkit-appearance: none; appearance: none; width: 100%; height: 4px;
  border-radius: 2px; outline: none; cursor: pointer;
  background: rgba(255,255,255,.13); }
.slider::-webkit-slider-thumb { -webkit-appearance: none; appearance: none;
  width: 15px; height: 15px; border-radius: 50%;
  background: var(--gold); border: 2px solid #121821;
  box-shadow: 0 0 0 3px rgba(237,190,76,.14);
  cursor: pointer; margin-top: -0.5px; }
.slider::-moz-range-thumb { width: 13px; height: 13px; border-radius: 50%;
  background: var(--gold); border: 2px solid #121821; cursor: pointer; }
.slider:disabled { opacity: .35; cursor: not-allowed; }
.slider:disabled::-webkit-slider-thumb { background: #6d7686; cursor: not-allowed; }

/* ───────────── 同机双开（多账号测试） ───────────── */
#viewLogin { overflow-y: auto; padding: 24px 16px; }
.login-wrap { margin: auto; }
.wallet-item.who b { color: var(--ink); max-width: 96px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; }


/* ───────────── 注册页 ───────────── */
#viewRegister { align-items: center; justify-content: center; overflow-y: auto; }
#viewRegister .login-wrap { margin: auto; }
.login-card .hint a { text-decoration: none; font-weight: 600; }
.login-card .hint a:hover { text-decoration: underline; }

/* ───────────── 大厅公告栏 ───────────── */
.announce { padding: 10px 18px; font-size: 0.8125rem;
  background: linear-gradient(90deg, rgba(237,190,76,.2), rgba(237,190,76,.04) 60%);
  border-bottom: 1px solid rgba(237,190,76,.3);
  /* e298：与基础规则一致，确保公告栏是独立、不伸缩的一行，不被顶栏叠绘穿透 */
  flex: 0 0 auto; position: relative; z-index: 2; }
.announce b, .announce strong { color: var(--gold); }

/* ───────────── 客服按钮红点 ───────────── */
.btn { position: relative; }
.dot-badge { position: absolute; top: -4px; right: -4px;
  width: 10px; height: 10px; border-radius: 50%;
  background: var(--red); border: 2px solid var(--bg); }

/* ───────────── 客服聊天 ───────────── */
.chat-log { height: 320px; overflow-y: auto; padding: 4px 2px;
  display: flex; flex-direction: column; gap: 10px;
  background: rgba(0,0,0,.25); border: 1px solid var(--line);
  border-radius: 12px; margin-bottom: 12px; }
.chat-msg { display: flex; }
.chat-msg.mine { justify-content: flex-end; }
.chat-msg .bubble { max-width: 78%; padding: 9px 12px; border-radius: 12px;
  font-size: 0.8438rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.chat-msg.cs .bubble { background: rgba(255,255,255,.07); border: 1px solid var(--line);
  border-top-left-radius: 4px; color: var(--ink); }
.chat-msg.mine .bubble { background: linear-gradient(180deg, #f7d374, var(--gold));
  color: #2a1e00; border-top-right-radius: 4px; font-weight: 500; }
.chat-msg .bubble .t { display: block; font-style: normal; font-size: 0.6563rem; margin-top: 4px;
  opacity: .55; text-align: right; }
.chat-input { display: flex; gap: 8px; }

/* ── 客服聊天增强：发送者标注 / 工具条 / 表情面板 / 图片与文件 ── */
.chat-sender { font-size: 0.6563rem; color: var(--muted); margin-bottom: 3px;
  padding: 0 4px; }
.chat-msg.mine .chat-sender { text-align: right; }
.chat-tools { display: flex; gap: 2px; margin: 6px 0 2px; }
.chat-tools button { width: 34px; height: 30px; border: none; background: transparent;
  font-size: 1.0625rem; cursor: pointer; border-radius: 8px; line-height: 1;
  transition: background .15s; }
.chat-tools button:hover { background: rgba(255,255,255,.08); }
.chat-emoji { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px;
  background: #0b1119; border: 1px solid var(--line); border-radius: 10px;
  padding: 6px; margin: 2px 0 6px; max-height: 132px; overflow-y: auto; }
.chat-emoji[hidden] { display: none; }
.chat-emoji button { border: none; background: transparent; font-size: 1.125rem; cursor: pointer;
  padding: 4px 0; border-radius: 6px; line-height: 1; }
.chat-emoji button:hover { background: rgba(255,255,255,.08); }
.chat-img { display: block; max-width: 180px; max-height: 180px; border-radius: 8px;
  margin-bottom: 2px; cursor: zoom-in; }
.chat-file { display: inline-block; color: var(--gold, #edbe4c); text-decoration: none;
  font-size: 0.8125rem; padding: 6px 10px; background: rgba(237,190,76,.1);
  border: 1px solid rgba(237,190,76,.3); border-radius: 8px; }
/* 自己的金色气泡里，附件链接改用深色保证可读 */
.chat-msg.mine .chat-file { color: #1a2230; background: rgba(255,255,255,.55); border-color: rgba(0,0,0,.15); }
.chat-cap { font-size: 0.7813rem; margin-top: 3px; word-break: break-all; }
.chat-input input { flex: 1; padding: 11px 13px; border-radius: 10px;
  background: #0b1119; border: 1px solid var(--line); color: var(--ink);
  font-size: 0.875rem; outline: none; transition: border-color .15s; }
.chat-input input:focus { border-color: var(--gold); }

/* ───────── e309：官方客服弹窗 · 白底黑字主题 ─────────
   用户批注「整改模版改成白底黑字样式」。只作用于客服弹窗：
   openModal(html, 'is-support') 给 .modal-box 加 is-support，别的弹窗保持原深色。
   ── 想调底色改 #fff；想调正文黑度改 #1a1a1a；想调浅灰面板改 #f8f9fb。
   我方气泡保留一点淡金（#fff3cf）是为了还能分清左右，正文仍是黑字。 */
.modal-box.is-support { background: #fff; border-color: #d8dee8; color: #1a1a1a;
  box-shadow: 0 30px 70px rgba(16,24,40,.28); }
/* 标题行：左边标题、右上角关闭 ×，同一行垂直居中，互不重叠 */
.modal-box.is-support .support-head { display: flex; align-items: center;
  justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.modal-box.is-support .support-head h3 { margin: 0; min-width: 0;
  color: #111; font-size: 1rem; line-height: 1.3; }
.modal-box.is-support .support-close { flex: 0 0 30px; width: 30px; height: 30px;
  display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: 1px solid #d8dee8; border-radius: 8px; background: #f7f8fa;
  color: #4a5565; line-height: 1; }
.modal-box.is-support .support-close:hover { background: #eceff4; color: #111; }
.modal-box.is-support .chat-log { background: #f8f9fb; border-color: #e0e5ed; }
.modal-box.is-support .chat-sender { color: #6b7280; }
.modal-box.is-support .chat-msg.cs .bubble { background: #eef1f6;
  border-color: #dfe4ec; color: #1a1a1a; }
.modal-box.is-support .chat-msg.mine .bubble { background: #fff3cf; color: #1a1a1a; }
.modal-box.is-support .chat-msg .bubble .t { color: #6b7280; opacity: 1; }
.modal-box.is-support .chat-tools button { display: inline-flex; align-items: center;
  justify-content: center; color: #333; }
.modal-box.is-support .chat-tools button:hover { background: #eceff4; }
.modal-box.is-support .chat-tools button svg { display: block; }
.modal-box.is-support .chat-emoji { background: #fff; border-color: #e0e5ed; }
.modal-box.is-support .chat-emoji button:hover { background: #eceff4; }
.modal-box.is-support .chat-input input { background: #fff; color: #1a1a1a;
  border-color: #d8dee8; }
.modal-box.is-support .chat-input input::placeholder { color: #8a93a3; font-size: 0.75rem; }
.modal-box.is-support .chat-file { color: #8a5b00; background: #fff7e6;
  border-color: #f0d9a8; }
.modal-box.is-support .chat-msg.mine .chat-file { color: #1a1a1a;
  background: rgba(255,255,255,.7); border-color: rgba(0,0,0,.15); }
.modal-box.is-support .chat-cap { color: #333; }
/* 说明文字左对齐 + 固定行高，避免长句居中折三行显得散乱 */
.modal-box.is-support .hint.subtle { color: #6b7280; text-align: left;
  margin-top: 10px; line-height: 1.5; }

/* e889：好友流程弹出的全局弹窗（赠送积分 / 交易密码 / 凭证删除清空）沿用好友页浅色模板；
   仅作用于带 is-fr-light 的 modal-box，大厅 / 开房 / 提现等其余全局弹窗保持深色不变。 */
.modal-box.is-fr-light { background: #fff; border-color: #e5e5e5; color: #1a1a1a;
  box-shadow: 0 30px 70px rgba(0,0,0,.22); }
.modal-box.is-fr-light h3 { color: #1a1a1a; }
.modal-box.is-fr-light .hint { color: #888888; }
.modal-box.is-fr-light .field label { color: #888888; }
.modal-box.is-fr-light .field input,
.modal-box.is-fr-light .field select,
.modal-box.is-fr-light .field textarea { background: #f5f5f5; border-color: #e5e5e5; color: #1a1a1a; }
.modal-box.is-fr-light .field input::placeholder,
.modal-box.is-fr-light .field select::placeholder,
.modal-box.is-fr-light .field textarea::placeholder { color: #888888; }
.modal-box.is-fr-light .field .field-note { color: #b98c1f; }
.modal-box.is-fr-light .btn-ghost { background: #f5f5f5; border-color: #e5e5e5; color: #1a1a1a; }
.modal-box.is-fr-light .btn-ghost:hover { background: #eeeeee; }
/* #269：赠送弹窗信息行 / 摘要 / 备注行在浅色弹窗内统一白底黑字（变量回落全局深色会露底） */
.modal-box.is-fr-light .gift-peer { background: #f5f5f5; border-color: #e5e5e5; }
.modal-box.is-fr-light .gift-peer .fr-name { color: #1a1a1a; }
.modal-box.is-fr-light .gift-peer .fr-sub { color: #888888; }
.modal-box.is-fr-light .gift-summary { color: #1a1a1a; }
.modal-box.is-fr-light .gift-note-line { color: #888888; }
/* #269：赠送说明默认折叠，点该行文字展开输入框；文字大小/位置/布局沿用 .field label 原样 */
.gift-note-toggle { cursor: pointer; }
.modal-box.is-fr-light .field label.gift-note-toggle { color: #b98c1f; }
.modal-box.is-fr-light .field label.gift-note-toggle:hover { color: #9a7418; }
.modal-box.is-fr-light .field textarea[hidden] { display: none; }
/* #269：浅色弹窗内自绘数字键盘按键 / 点位统一白底黑字 */
.modal-box.is-fr-light .np-key { background: #f5f5f5; border-color: #e5e5e5; color: #1a1a1a; }
.modal-box.is-fr-light .np-key:active { background: #eeeeee; }
.modal-box.is-fr-light .np-key-ghost { color: #888888; }
.modal-box.is-fr-light .np-dot { border-color: #e5e5e5; background: #ffffff; }
.modal-box.is-fr-light .np-dot.on { background: #1a1a1a; border-color: #1a1a1a; }

/* ───────── #262 赠送弹窗：对方信息行 / 摘要 / 备注 ───────── */
.gift-peer { display: flex; align-items: center; gap: 10px; padding: 10px 12px; margin-bottom: 14px;
  background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; }
.gift-peer .fr-ava { width: 40px; height: 40px; border-radius: 12px; }
.gift-peer .fr-name { color: var(--ink); }
.gift-peer .fr-sub { color: var(--muted); }
.gift-summary { margin: 0 0 14px; font-size: 0.875rem; color: var(--ink); }
.gift-summary b { color: var(--gold); }
.gift-note-line { margin-top: 4px; font-size: 0.75rem; color: var(--muted); }
.modal-box .field textarea { width: 100%; padding: 10px 12px; border-radius: 9px; resize: none;
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink); font-size: 0.875rem; }
.modal-box .field textarea::placeholder { color: var(--muted); }

/* ───────── #262 自绘防监听数字键盘（点位 + 0-9/删除/清空） ───────── */
.np-dots-wrap { display: flex; }
.np-dots { display: flex; justify-content: center; gap: 12px; padding: 8px 2px; }
.np-dot { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--panel); }
.np-dot.on { background: var(--ink); border-color: var(--ink); }
.np-dots.off { opacity: .4; }
.np-pad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 14px 0 4px; }
.np-key { height: 48px; border: 1px solid var(--line); border-radius: 12px; background: var(--panel2);
  color: var(--ink); font-size: 1.125rem; font-weight: 600; cursor: pointer; }
.np-key:active { background: var(--line); }
.np-key-ghost { font-size: 0.8125rem; color: var(--muted); }
.fr-gift-note { margin-top: 2px; opacity: .85; }

/* ───────────── 花色卡赔率角标 ───────────── */
.suit-card { position: relative; }
/* 下注成功原位「+N」飘字：门卡右上角上浮淡出，替代中心 toast（e365） */
.float-plus { position: absolute; top: 30px; right: 8px; z-index: 6; pointer-events: none;
  font-weight: 800; font-size: 0.9rem; color: #ffd977; letter-spacing: .3px;
  text-shadow: 0 1px 4px rgba(0,0,0,.75), 0 0 10px rgba(255,217,119,.35);
  animation: float-rise 1.05s ease-out forwards; }
@keyframes float-rise {
  0% { opacity: 0; transform: translateY(10px) scale(.85); }
  18% { opacity: 1; transform: translateY(2px) scale(1); }
  100% { opacity: 0; transform: translateY(-16px) scale(1.08); }
}
@media (prefers-reduced-motion: reduce) {
  @keyframes float-rise { 0% { opacity: 1; } 100% { opacity: 0; } }
}
.suit-odds { position: absolute; top: 8px; right: 10px;
  font-size: 0.6875rem; font-weight: 700; color: var(--gold);
  background: rgba(237,190,76,.12); border: 1px solid rgba(237,190,76,.35);
  border-radius: 999px; padding: 1px 7px;
  font-variant-numeric: tabular-nums; }

/* ───────────── 头像更换 ───────────── */
.avatar-wrap { position: relative; flex: 0 0 66px; width: 66px; height: 66px;
  cursor: pointer; border-radius: 20px; }
.avatar-wrap .avatar { width: 100%; height: 100%; }
.avatar-edit { position: absolute; left: 0; right: 0; bottom: 0;
  font-size: 0.625rem; text-align: center; padding: 2px 0 3px;
  color: #fff; background: rgba(0,0,0,.55);
  border-radius: 0 0 20px 20px; opacity: 0; transition: opacity .15s;
  pointer-events: none; }
.avatar-wrap:hover .avatar-edit { opacity: 1; }
.avatar-wrap:hover .avatar { filter: brightness(.85); }

/* ───────────── 昵称就地编辑 ───────────── */
.pf-name { cursor: pointer; display: flex; align-items: center; gap: 8px; }
.pf-name:hover { color: var(--gold); }
.pf-name-edit { font-size: 0.8125rem; opacity: .45; font-weight: 400; }
.pf-name:hover .pf-name-edit { opacity: 1; }
.pf-name-editor { display: flex; align-items: center; gap: 6px; }
.pf-name-editor input { width: 150px; padding: 5px 9px; border-radius: 8px;
  background: #0b1119; border: 1px solid var(--gold);
  color: var(--ink); font-size: 1rem; font-weight: 700; outline: none; }

/* 编辑昵称时不挤压右侧余额：钱包列不缩、金额不换行 */
.pf-wallet { flex: 0 0 auto; }
.pf-name-editor input { width: 120px; }

/* ════════════════════════════════════════════════════════════
   H5 多屏自适应
   目标：手机竖屏 / 手机横屏 / 平板 / 桌面上都能正常显示，
        刘海屏不被遮挡、地址栏不吞掉底栏、输入框不触发 iOS 缩放。
   ════════════════════════════════════════════════════════════ */

/* ① 视口高度：用 dvh 跟住手机浏览器地址栏的伸缩，老浏览器退回 100% */
@supports (height: 100dvh) { html, body { height: 100dvh; } }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { overscroll-behavior: none; }

/* 顶栏钱包的两组内容在桌面是「透明」的，不改变原有排版 */
.wallet-nums { display: contents; }

/* 滚动容器统一用惯性滚动 */
.lobby, .profile-wrap, .seat-list, .history-list, .chat-log { -webkit-overflow-scrolling: touch; }

/* 触摸设备：去掉 hover 抬升，避免点完一直「悬空」 */
@media (hover: none) { .room-card:hover, .suit-card:hover, .mode-opt:hover, .rc-tier:hover, .bp-key:hover,
  .chip:hover, .switch:hover, .avatar-wrap:hover .avatar { transform: none; filter: none; }
  .room-card:hover { border-color: var(--line); }
  .suit-card:hover { border-color: rgba(255,255,255,.14); box-shadow: none; }
  .btn:active { transform: scale(.97); }
  .room-card:active { transform: scale(.995); border-color: rgba(237,190,76,.5); }
  .suit-card:active { transform: scale(.98); }
  /* 大王圆卡：触摸设备同样保住定位位移 */
  .suit-card.joker:hover { transform: translate(-50%, -50%); border-color: rgba(237,190,76,.55); }
  .suit-card.joker:active { transform: translate(-50%, -50%) scale(.97); } }

/* ② 手机竖屏（≤720px）：顶栏两行、花色 2×2、底栏贴安全区 */
@media (max-width: 720px) { body { font-size: 0.875rem; }
  .topbar { height: 50px; flex-basis: 50px; gap: 8px; padding: 0 10px; }

  /* e496：顶部安全区只由 .view 的 padding-top 让一次；这里不再重复加 env(top)，
     否则 iOS 独立窗口会出现「刘海高度加两遍」，顶栏被顶到屏幕中间。 */
  /* e515：顶栏不再写死 50px。账号 + 余额是两行，50px 在 iPhone 上会被余额撑破，
     多出来的文字落到公告栏下面，看起来就是页眉发糊、公告压字。
     改成 auto + 最小高度，内容多就自己长高，公告栏自然被推下去。 */
  #viewLobby .home-topbar { height: auto; min-height: 56px; flex: 0 0 auto;
    align-items: center; flex-wrap: nowrap; gap: 8px;
    /* e534：大厅顶栏同色 */
    background: #0f1622;
    padding: 4px calc(10px + env(safe-area-inset-right)) 4px calc(10px + env(safe-area-inset-left)); }
  #viewLobby .home-meta { gap: 1px; line-height: 1.12; justify-content: center; }
  #viewLobby .home-nick, #viewLobby .home-bal { line-height: 1.12; }
  #viewLobby .home-avatar { width: 38px; height: 38px; flex-basis: 38px; font-size: 0.9375rem; }
  #viewLobby .ha-btn { height: 32px; padding: 0 10px; }
  #viewLobby .ha-btn.js-music-btn { width: 32px; }
  #viewLobby #homeNick { max-width: 92px; }

  .wallet-item { padding: 4px 8px; font-size: 0.75rem; }
  .wallet-item.who b { max-width: 64px; }
  .btn.sm { padding: 6px 10px; font-size: 0.75rem; min-height: 32px; }

  /* 房间页顶栏：窄屏下与首页同样单行收缩，房间名截断、操作条不换行 */
  #viewRoom .room-left { gap: 6px; }
  #viewRoom .room-left #roomName { max-width: 72px; }
  #viewRoom .home-actions { gap: 6px; }
  #viewRoom .ha-btn { height: 32px; padding: 0 9px; font-size: 0.7188rem; }
  #viewRoom .ha-btn.js-music-btn { width: 32px; }
  .icon-btn { width: 32px; }
  .room-title { min-width: 0; font-size: 0.8125rem; gap: 6px; }
  .room-title span { display: none; }
  .room-title b { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .announce { padding: 7px 12px; font-size: 0.75rem; }

  /* 大厅（e303：底部多留 8px，玩法说明滚到底也不会贴着底部导航栏） */
  .lobby { padding: 12px 12px 24px; }
  .lobby-head { flex-wrap: wrap; gap: 10px; margin-bottom: 12px; }
  .lobby-head h2 { font-size: 1.25rem; letter-spacing: 0.125rem; }
  .room-list { grid-template-columns: 1fr; gap: 10px; }
  .room-card { padding: 13px; }
  .rules { margin-top: auto; padding: 14px 16px; }
  .rules ol { font-size: 0.7813rem; line-height: 1.9; }
  .zm-fair-list { font-size: 0.7813rem; line-height: 1.6; }

  /* 牌桌：花色两列两行，拇指好点 */
  .table-wrap { padding: 8px; gap: 8px; }
  .felt { padding: 10px; gap: 8px; border-radius: 16px; }
  /* e317：显式两行等高。此前只定义了列，行高由各卡内容自动决定，
     一行内容多一行内容少时两行卡高不等，四卡的金额就会落在不同高度。 */
  .suit-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 8px; --joker-d: 102px; }
  /* 2×2 缝合线扇区（0°=正上方顺时针）：黑桃左上(270-360)、红心右上(0-90)、梅花左下(180-270)、方块右下(90-180) */
  .suit-grid .joker-seam[data-hit="spade"]   { --sf: 270deg; --sl: 90deg; }
  .suit-grid .joker-seam[data-hit="heart"]   { --sf: 0deg;   --sl: 90deg; }
  .suit-grid .joker-seam[data-hit="club"]    { --sf: 180deg; --sl: 90deg; }
  .suit-grid .joker-seam[data-hit="diamond"] { --sf: 90deg;  --sl: 90deg; }
  /* 2×2 中缝在四轴：淡色缝合弧在 0/90/180/270 各挖缺口，四卡弧段独立断开 */
  .suit-grid:not(.jokerless)::before {
    -webkit-mask-image: conic-gradient(transparent 0deg var(--w), #000 var(--w) calc(90deg - var(--w)), transparent calc(90deg - var(--w)) calc(90deg + var(--w)), #000 calc(90deg + var(--w)) calc(180deg - var(--w)), transparent calc(180deg - var(--w)) calc(180deg + var(--w)), #000 calc(180deg + var(--w)) calc(270deg - var(--w)), transparent calc(270deg - var(--w)) calc(270deg + var(--w)), #000 calc(270deg + var(--w)) calc(360deg - var(--w)), transparent calc(360deg - var(--w)));
    mask-image: conic-gradient(transparent 0deg var(--w), #000 var(--w) calc(90deg - var(--w)), transparent calc(90deg - var(--w)) calc(90deg + var(--w)), #000 calc(90deg + var(--w)) calc(180deg - var(--w)), transparent calc(180deg - var(--w)) calc(180deg + var(--w)), #000 calc(180deg + var(--w)) calc(270deg - var(--w)), transparent calc(270deg - var(--w)) calc(270deg + var(--w)), #000 calc(270deg + var(--w)) calc(360deg - var(--w)), transparent calc(360deg - var(--w)));
  }
  .suit-card { padding: 10px 6px; min-height: 92px; }
  .suit-card .suit-sym { font-size: 2.125rem; }
  .suit-name { font-size: 0.7188rem; }
  .suit-total { font-size: 1rem; }
  .suit-mine { font-size: 0.6875rem; }
  .suit-odds { top: 6px; right: 7px; font-size: 0.625rem; padding: 1px 6px; }
  .table-head { gap: 8px; font-size: 0.75rem; }
  /* 手机上限红规则说明单行省略号（完整规则长按/悬浮可见），保证整行不折行 */
  .table-head .rule-note { font-size: 0.6875rem; }
  .phase-pill { padding: 3px 9px; font-size: 0.6875rem; }
  #cdText { font-size: 0.7188rem; padding: 2px 8px; }
  .banker-strip { font-size: 0.7188rem; padding: 6px 10px; gap: 7px; }
  .bs-hash { display: none; }
  .bp-keys { gap: 6px; }
  .bp-key { padding: 9px 4px; font-size: 0.7813rem; }
  .bp-secs { flex-wrap: wrap; }
  .bp-row { gap: 8px; }
  .bp-row .btn { margin-left: 0; width: 100%; }
  .bp-host .btn { width: auto; flex: 1 1 0; min-width: 0; padding: 7px 8px; font-size: 0.75rem; }
  .bp-host-state { font-size: 0.6563rem; }
  .host-cd { font-size: 0.75rem; padding: 2px 7px; }
  .bp-host-confirm { gap: 6px; padding: 7px 8px; }
  /* 大厅「我的房间」窄屏改两行 */
  .myroom { flex-wrap: wrap; padding: 9px 10px; }
  .mr-acts { width: 100%; justify-content: flex-end; }
  .mr-acts .btn { padding: 6px 10px; font-size: 0.75rem; }
  .hq-suit { width: 34px; height: 28px; font-size: 0.8125rem; }
  .hq-no { min-width: 46px; width: auto; font-size: 0.6875rem; }
  .side { flex-direction: row; gap: 8px; flex-wrap: wrap; align-content: flex-start; }
  .side .panel { max-height: 104px; padding: 8px 10px; }
  .side .room-chat-panel { flex: 1 1 100%; max-height: 118px; }
  .panel-title { margin-bottom: 6px; }

  /* 底栏：留出 iPhone 底部横条 */
  .hashbar {
    height: auto; min-height: 34px; font-size: 0.6875rem;
    padding: 5px 10px 6px;
    gap: 8px;
  }
  .hb-text { font-size: 0.6563rem; }
  .hb-more { font-size: 0.6563rem; }

  /* 下注栏：42px 以上的触摸目标 */
  .bet-bar { gap: 8px; flex-wrap: wrap; }
  .bet-mode-row { gap: 6px; }
  .bet-mode button { padding: 5px 11px; font-size: 0.75rem; min-height: 30px; }
  /* e305：提示与模式胶囊同行，小屏只收紧间距与字号，不换行到下一行 */
  .bet-mode-tip { font-size: 0.6875rem; }
  .chips-wrap { gap: 6px; }
  .chips { gap: 6px; }
  .chip { min-width: 48px; min-height: 38px; padding: 8px 10px; font-size: 0.7813rem; }
  .chip-custom { width: 66px; min-height: 38px; font-size: 0.8125rem; }
  .chip-edit { width: 38px; height: 38px; }
  .bet-actions { gap: 6px; }
  .bet-actions .btn { padding: 8px 12px; font-size: 0.7813rem; }

  /* 个人中心 */
  .profile-wrap { padding: 12px 12px 16px; }
  .profile-hero { padding: 12px 14px; gap: 8px; }
  .avatar-wrap, .avatar { width: 56px; height: 56px; border-radius: 16px; flex-basis: 56px; }
  .avatar-wrap { flex-basis: 56px; margin: 0; }
  .avatar { font-size: 1.375rem; }
  .avatar-edit { opacity: .9; font-size: 0.625rem; border-radius: 0 0 16px 16px; }
  .pf-name { font-size: 1.0625rem; }
  .pf-name-editor input { width: 96px; }
  .pf-wallet { gap: 14px; }
  .pf-money b { font-size: 1.125rem; }
  .pf-card { padding: 13px 14px; }
  .stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat-cell b { font-size: 0.9375rem; }
  .pf-room-row { grid-template-columns: minmax(0, 1fr) 46px 74px 74px 14px; gap: 6px; font-size: 0.75rem; }
  .pf-room-row > span:nth-child(4) { display: none; }
  .pf-room-row.head > span:nth-child(4) { display: none; }
  .pf-ledger-row { grid-template-columns: 68px minmax(0, 1fr) 74px; gap: 6px; font-size: 0.75rem; }
  .pf-ledger-row > span:nth-child(4) { display: none; }
  .pf-ledger { max-height: none; }
  .sound-row { grid-template-columns: 76px minmax(0, 1fr) 48px; gap: 10px; }
  .modal-actions .btn { padding: 11px 12px; }

  /* 弹窗 / 客服：限高可滚，键盘弹起也不会顶飞 */
  .modal { padding: 12px; }
  .modal-box { width: 100%; max-width: 460px; max-height: calc(100dvh - 24px); overflow-y: auto; padding: 16px; }
  .chat-log { height: min(300px, 42dvh); }
  .chat-input input { min-height: 42px; }
  .field input, .field select { min-height: 42px; }
  .rc-tiers { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .rc-tier { padding: 10px 6px; }
  .rc-scan img { width: 92px; height: 92px; }

  .toast { bottom: calc(76px + var(--tb-h)); font-size: 0.8125rem; padding: 10px 16px; max-width: 86vw; }

  /* iOS 上输入框 <16px 会整页放大，这里统一顶到 16px */
  input, select, textarea { font-size: 1rem; }
  .chip-custom { font-size: 1rem; }
  .pf-card .field input { font-size: 1rem; }
  .login-card input { font-size: 1rem; }
  .pf-name-editor input { font-size: 1rem; }

  /* 登录 / 注册：小屏竖向压缩，保证按钮在首屏内 */
  #viewLogin, #viewRegister { padding: 16px 14px; justify-content: flex-start; }
  #viewLogin .login-wrap, #viewRegister .login-wrap { margin: auto; width: 100%; max-width: 420px; }
  .brand-cards { height: 56px; margin-bottom: 4px; }
  .bc { width: 40px; height: 54px; line-height: 54px; font-size: 1.375rem; margin: 0 -7px; }
  .brand h1 { font-size: 1.625rem; letter-spacing: 0.375rem; text-indent: 0.375rem; margin: 10px 0 2px; }
  .brand-sub { font-size: 0.75rem; text-indent: 0.125rem; margin-bottom: 16px; }
  .login-card { padding: 16px; border-radius: 14px; }
  .login-card input { margin: 6px 0 12px; --login-inp-py: 11px; padding: var(--login-inp-py) 12px; }
  .login-card .btn { padding: 12px; } }

/* ③ 手机横屏（高度有限的机型，如 740×360 / 812×375）：全部压扁并排 */
@media (orientation: landscape) and (max-height: 540px) { body { font-size: 0.8125rem; }
  .topbar { height: 42px; flex-basis: 42px; padding: 0 8px; gap: 8px; }
  #viewLobby .topbar {
    height: 42px; flex-basis: 42px; flex-wrap: nowrap;
    padding: calc(0px + env(safe-area-inset-top)) calc(8px + env(safe-area-inset-right)) 0 calc(8px + env(safe-area-inset-left));
  }
  #viewLobby .home-topbar { flex-wrap: nowrap; }
  #viewLobby .home-avatar { width: 34px; height: 34px; flex-basis: 34px; font-size: 0.8125rem; }
  /* e303：余额刷新符号已整体移除，无需再在横屏隐藏 */
  #viewLobby .ha-btn { height: 30px; padding: 0 8px; font-size: 0.6875rem; }
  #viewLobby .ha-btn.js-music-btn { width: 30px; }
  #viewLobby .home-bal-label { display: none; }
  #viewLobby #homeNick { max-width: 80px; }
  .wallet-item { padding: 3px 7px; font-size: 0.7188rem; }
  .wallet-item i { display: none; }
  .btn.sm { padding: 5px 8px; font-size: 0.7188rem; min-height: 28px; }
  .icon-btn { width: 28px; }
  .room-title { font-size: 0.7813rem; }
  .room-title span { display: none; }
  .room-title b { max-width: 30vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .announce { padding: 4px 10px; font-size: 0.6875rem; }

  .lobby { padding: 8px 10px 14px; }
  .lobby-head { margin-bottom: 8px; }
  .lobby-head h2 { font-size: 1.125rem; letter-spacing: 0.125rem; }
  .room-list { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
  .room-card { padding: 10px 12px; }
  .rc-meta { gap: 8px; font-size: 0.6875rem; }
  .rules { display: none; }
  .empty { padding: 20px 0; }

  .table-wrap { grid-template-columns: 1fr 186px; grid-template-rows: 1fr; padding: 6px; gap: 6px; }
  .felt { padding: 7px 9px; gap: 6px; border-radius: 14px; }
  .table-head { font-size: 0.7188rem; gap: 8px; }
  .banker-strip { padding: 4px 8px; font-size: 0.6875rem; }
  .bs-hash { display: none; }
  .suit-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; --joker-d: 78px; }
  .suit-card { min-height: 0; padding: 6px 4px; }
  .suit-card .suit-sym { font-size: 1.625rem; }
  /* e314：横屏圆卡只有 78px，三行空间更紧，内边距/字号整体收一档 */
  .suit-card.joker { padding: 4px 3px; gap: 0; }
  .suit-card.joker .suit-odds { font-size: 0.625rem; padding: 0 4px; line-height: 1.2; }
  .suit-card.joker .suit-joker-main { gap: 3px; }
  .suit-card.joker .suit-name { font-size: 0.625rem; }
  .suit-card.joker .suit-joker-amt { min-height: 18px; }
  .suit-card.joker .suit-total { font-size: 0.6875rem; }
  .suit-card.joker .suit-mine { font-size: 0.625rem; min-height: 9px; }
  .suit-name { font-size: 0.6563rem; }
  .suit-total { font-size: 0.875rem; }
  .suit-mine { font-size: 0.625rem; min-height: 12px; }
  .suit-odds { top: 4px; right: 5px; font-size: 0.5938rem; padding: 0 5px; }
  .bp-key { padding: 7px 4px; font-size: 0.75rem; }
  .bp-row .btn { margin-left: auto; width: auto; }
  .side { flex-direction: column; gap: 6px; }
  .side .panel { max-height: none; padding: 7px 9px; flex: 1 1 auto; }
  .panel-title { margin-bottom: 5px; font-size: 0.6875rem; }
  .seat { padding: 5px 8px; gap: 6px; }
  .seat-avatar { width: 22px; height: 22px; flex-basis: 22px; font-size: 0.625rem; }
  .seat-name { font-size: 0.75rem; }
  .hashbar { height: 28px; min-height: 28px; padding: 0 10px; font-size: 0.6563rem; gap: 8px; }
  .hb-text { font-size: 0.625rem; }
  .chip { min-width: 40px; min-height: 30px; padding: 5px 8px; font-size: 0.7188rem; }
  .chip-custom { width: 60px; min-height: 30px; font-size: 0.75rem; }
  .chip-edit { width: 30px; height: 30px; font-size: 0.75rem; }
  .bet-bar { gap: 8px; flex-wrap: nowrap; }
  .bet-actions .btn { padding: 5px 9px; font-size: 0.7188rem; }
  .chips { flex-wrap: wrap; }

  /* 登录 / 注册：横屏改成左右两栏，一屏放得下 */
  #viewLogin, #viewRegister {
    flex-direction: row; align-items: center; justify-content: center;
    padding: 10px 14px; overflow: auto;
  }
  #viewLogin .login-wrap, #viewRegister .login-wrap {
    margin: 0; width: auto; max-width: none;
    display: flex; align-items: center; gap: 26px; text-align: left;
  }
  .brand-cards { display: none; }
  .brand h1 { font-size: 1.5rem; letter-spacing: 0.3125rem; margin: 0 0 6px; }
  .brand-sub { margin: 0; font-size: 0.7188rem; }
  .login-card { width: 330px; padding: 14px 16px; }
  .login-card input { margin: 5px 0 10px; --login-inp-py: 9px; padding: var(--login-inp-py) 12px; }
  .hint { margin-top: 10px; }

  .profile-wrap { padding: 8px 10px 14px; }
  .profile-hero { padding: 10px 12px; gap: 7px; }
  .avatar-wrap, .avatar { width: 44px; height: 44px; flex-basis: 44px; border-radius: 14px; }
  .pf-name { font-size: 0.9375rem; }
  .pf-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 8px; }
  .pf-card { padding: 10px 12px; margin-bottom: 8px; }
  .pf-ledger { max-height: 96px; }
  .modal-box { max-height: calc(100dvh - 16px); overflow-y: auto; padding: 14px; }
  .chat-log { height: min(180px, 46dvh); }
  .rc-tiers { grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 8px 0; }
  .rc-tier { padding: 8px 4px; }
  .toast { bottom: calc(36px + var(--tb-h)); }
  input, select, textarea { font-size: 1rem; } }

/* ④ 超窄屏（≤360 宽，如 iPhone SE / 老安卓）：再收一档 */
@media (max-width: 360px) { .btn.sm { padding: 6px 8px; font-size: 0.7188rem; }
  .wallet-item { padding: 4px 6px; font-size: 0.7188rem; }
  .suit-card { min-height: 82px; }
  .suit-card .suit-sym { font-size: 1.875rem; }
  .chip { min-width: 44px; padding: 7px 8px; }
  .bet-actions .btn { padding: 8px 10px; } }

/* ⑤ 平板（721~1024）：花色仍四列，但整体留白收紧 */
@media (min-width: 721px) and (max-width: 1024px) { .topbar { padding: 0 14px; gap: 10px; }
  .lobby { padding: 18px 18px 32px; }
  .table-wrap { grid-template-columns: 1fr 240px; gap: 12px; padding: 12px; }
  .suit-card .suit-sym { font-size: 2.75rem; }
  .profile-wrap { padding: 18px 18px 40px; } }

/* ⑥ 横屏时不因高度限制而裁掉底部操作（兜底可滚） */
@media (max-height: 460px) and (orientation: landscape) { .felt { overflow-y: auto; } }

/* 手机竖屏顶栏有两行空间，恢复 积分/房卡 文字标签（老规则在 ≤560px 隐藏了它们） */
@media (max-width: 720px) { .wallet-item i { display: inline; } }

/* 手机竖屏：下注栏改成「筹码一行 + 操作一行」，避免筹码被挤成竖排 */
@media (max-width: 720px) { .bet-bar { flex-direction: column; align-items: stretch; gap: 8px; }
  .chips-wrap { flex: 1 1 100%; width: 100%; }
  .chips { flex: 1 1 auto; }
  .bet-actions { margin-left: 0; justify-content: flex-end; }
  .bet-actions .btn { flex: 1 1 auto; } }

/* 修复：column + wrap 会变成多列布局，把操作按钮挤到屏幕外 → 竖屏下注栏禁止 wrap */
@media (max-width: 720px) { .bet-bar { flex-wrap: nowrap; }
  .chips { flex-wrap: wrap; } }

/* ── 历史对单：最近开奖可点击复算 ── */
.hist { cursor: pointer; transition: background .15s, border-color .15s; border: 1px solid transparent; }
.hist:hover { background: rgba(237,190,76,.08); border-color: rgba(237,190,76,.25); }
.hist-hash { color: var(--muted); font-size: 0.625rem; font-family: ui-monospace, Consolas, monospace; opacity: .8; }
.proof-mono { font-family: ui-monospace, Consolas, monospace; font-size: 0.6875rem;
  word-break: break-all; color: #cfd8e6; }

/* ── 下注栏：余额显示 + 待确认下注（确定/取消/重复上次） ── */
.chip-balance { display: inline-flex; align-items: center; gap: 5px; flex: 0 0 auto;
  min-width: 54px; max-width: 100%; padding: 9px 14px; border-radius: 999px;
  background: rgba(237,190,76,.10); border: 1.5px dashed rgba(237,190,76,.45);
  font-variant-numeric: tabular-nums; white-space: nowrap; }
.chip-balance i { flex: 0 0 auto; font-style: normal; font-size: 0.6875rem; color: #b9a05a; }
/* e303：余额数字超长时收在胶囊内省略，不把整行筹码撑破 */
.chip-balance b { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  font-size: 0.8125rem; color: var(--gold, #edbe4c); font-weight: 700; }
img.seat-avatar { object-fit: cover; }

/* ── 手机竖屏：下注操作按钮可换行，不挤爆 ── */
@media (max-width: 720px) { .bet-actions { flex-wrap: wrap; }
  .chip-balance { padding: 8px 10px; min-width: 0; }
  .chip-balance b { font-size: 0.7813rem; } }

/* ════════════════════════════════════════════════════════════
   手机竖屏二轮调优：
   ① 四门卡片均衡缩小上移，给座位/开奖记录腾更多空间
   ② 下注栏（余额+筹码+自定义）文字大小统一、排列整齐
   ════════════════════════════════════════════════════════════ */
@media (max-width: 720px) { /* 牌桌整体收紧行距 */
  .table-wrap { padding: 6px; gap: 6px; }
  .felt { padding: 7px 6px; gap: 6px; border-radius: 14px; }
  .table-head { font-size: 0.7188rem; gap: 6px; }
  .banker-strip { font-size: 0.6875rem; padding: 5px 9px; gap: 6px; }

  /* 四门：矮一截、上移，徽标/花色/文字等比缩小 */
  .suit-grid { gap: 6px; }
  .suit-card { min-height: 68px; padding: 6px 4px; border-radius: 12px; }
  .suit-card .suit-sym { font-size: 1.625rem; }
  /* e314：≤720px 竖屏圆卡 106px，三行均匀分布，上下内边距略收 */
  .suit-card.joker { padding: 6px 5px; gap: 0; }
  .suit-card.joker .suit-joker-main { gap: 4px; }
  .suit-name { font-size: 0.6563rem; margin-top: 1px; }
  .suit-total { font-size: 0.8125rem; margin-top: 2px; }
  .suit-mine { font-size: 0.5938rem; min-height: 11px; }
  .suit-odds { top: 4px; right: 5px; font-size: 0.625rem; padding: 0 5px; }

  /* 侧栏面板：高度放宽，多显示几行数据 */
  .side { gap: 6px; flex-wrap: wrap; align-content: flex-start; }
  .side .panel { max-height: 150px; padding: 7px 9px; }
  .side .room-chat-panel { max-height: 118px; }
  .seat { padding: 4px 8px; gap: 6px; }
  .seat-avatar { width: 20px; height: 20px; flex-basis: 20px; font-size: 0.625rem; }
  .seat-name { font-size: 0.7188rem; }
  .seat-sub { font-size: 0.625rem; }
  .hist { padding: 4px 8px; font-size: 0.6875rem; gap: 6px; }
  .hist-sym { font-size: 0.8125rem; }
  .hist-hash { font-size: 0.625rem; }
  .panel-title { font-size: 0.6875rem; margin-bottom: 4px; }

  /* 下注栏：一行放得下 余额+全部筹码+自定义，字号统一 12px */
  .bet-bar { gap: 6px; }
  .chips-wrap { gap: 5px; }
  .chips { gap: 5px; }
  .chip { min-width: 40px; min-height: 32px; padding: 5px 9px; font-size: 0.75rem; }
  .chip-custom { width: 58px; min-height: 32px; padding: 5px 8px; font-size: 0.75rem; border-radius: 999px; }
  .chip-edit { width: 32px; height: 32px; font-size: 0.8125rem; }
  .chip-balance { padding: 5px 10px; gap: 4px; border-radius: 999px; }
  .chip-balance i { font-size: 0.6563rem; }
  .chip-balance b { font-size: 0.75rem; }

  /* 操作按钮行：与筹码等高、字重一致 */
  .bet-actions { gap: 6px; }
  .bet-actions .btn { padding: 7px 10px; font-size: 0.75rem; min-height: 32px; }

  /* 申请上庄横条也压矮 */
  .bp-row .btn { padding: 9px 12px; font-size: 0.8125rem; } }

/* 超窄屏（≤360）：筹码再小一号，保证一行不放就两行也整齐 */
@media (max-width: 360px) { .chip { min-width: 36px; padding: 5px 7px; font-size: 0.7188rem; }
  .chip-balance i { display: none; }
  .bet-actions .btn { padding: 6px 8px; font-size: 0.7188rem; } }

/* 竖屏：四门卡片按内容收缩（不再被 flex:1 拉高），省出的高度给侧栏数据 */
@media (max-width: 720px) { .suit-grid { flex: 0 0 auto; }
  .side .panel { max-height: 240px; } }

/* 竖屏下注栏最终定稿：一行放下 余额+四枚筹码+自定义，文字等高协调 */
@media (max-width: 720px) { .chip-balance i { display: none; }            /* 只显金色数字，title 里有说明 */
  .chip { min-width: 34px; min-height: 30px; padding: 4px 7px; font-size: 0.7188rem; }
  .chip-custom { width: 50px; min-height: 30px; padding: 4px 7px; font-size: 0.7188rem; }
  .chip-edit { width: 30px; height: 30px; font-size: 0.75rem; }
  .chip-balance { padding: 4px 9px; }
  .chip-balance b { font-size: 0.7188rem; }
  .bet-actions { flex-wrap: nowrap; }
  .bet-actions .btn { padding: 6px 8px; font-size: 0.7188rem; min-height: 30px; }
  .bp-row .btn { padding: 8px 10px; font-size: 0.7813rem; }

  /* 开奖记录行不换行，哈希缩写让位 */
  .hist { white-space: nowrap; }
  .hist-hash { flex-shrink: 1; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
  .hist-gain { flex-shrink: 0; } }

/* ── 第20轮修复（竖屏）──────────────────────────────────────
   ① 牌桌底部不再被拉出大块空白：grid 行高改为「牌桌按内容自适应、
      剩余高度全部给座位/开奖面板」，牌桌下边线紧贴「申请上庄」按钮下方
   ② 余额完整显示：恢复「余额」文字 + 金色数字，筹码组整体推到右侧
   ══════════════════════════════════════════════════════════ */
@media (max-width: 720px) { /* 牌桌按内容收缩，省出的高度给侧栏（座位 + 最近开奖） */
  .table-wrap { grid-template-rows: auto minmax(0, 1fr); }
  .felt { flex: 0 0 auto; min-height: 0; overflow-y: auto; }

  /* 余额胶囊：文字 + 数字完整显示，固定不压缩；筹码推到最右 */
  .chips-wrap { justify-content: flex-start; }
  .chip-balance { flex-shrink: 0; min-width: 0; padding: 4px 12px; margin-left: 8px; }
  .chip-balance i { display: inline; font-size: 0.75rem; }
  .chip-balance b { font-size: 0.8438rem; }
  /* e306：筹码组内的按钮改为居中排布（原来 flex-end 会把整组往右推），
     每个胶囊内部的文字另由基础 .chip 的 inline-flex 居中保证。 */
  .chips { margin-left: auto; flex: 0 0 auto; justify-content: center; flex-wrap: nowrap; }
  .chip-custom-group { gap: 5px; }
  .chip-custom { width: 50px; }

  /* 座位/最近开奖面板填满牌桌省出的剩余高度，内部各自滚动 */
  .side .panel { max-height: none; flex: 1 1 auto; min-height: 0; }
  .side .room-chat-panel { max-height: 118px; } /* 聊天窗不参与填满，保持紧凑 */ }

/* ── 窄屏自适应（≤430）：下注栏一行自适应排布 ──
   余额(左) + 四枚筹码 + 自定义 + ✎ 全部同一行；
   空间不足时筹码/自定义框等比收缩（min-width 兜底），不再掉到第二行 */
@media (max-width: 430px) { .chips-wrap { flex-wrap: nowrap; }
  .chips { flex: 0 1 auto; min-width: 0; }
  .chip { flex: 0 1 auto; min-width: 30px; padding: 4px 5px; }
  .chip-custom { width: 52px; min-width: 40px; }
  .chip-edit { width: 28px; flex-shrink: 0; }
  .chip-balance { flex-shrink: 0; } }

/* 超窄屏（≤360）：余额只显金色数字、筹码再小一号，一行仍然放得下 */
@media (max-width: 360px) { .chip-balance { flex-shrink: 1; min-width: 0; overflow: hidden; }
  .chip-balance i { display: none; }
  .chip-balance b { font-size: 0.6875rem; }
  .chip { min-width: 26px; padding: 4px 3px; font-size: 0.6875rem; }
  .chip-custom { width: 44px; min-width: 36px; font-size: 0.6875rem; }
  .chip-edit { width: 26px; height: 26px; font-size: 0.6875rem; }
  .chips-wrap { gap: 4px; }
  .chips { gap: 4px; } }

/* ════════════════════════════════════════════════════════════
   iPad 专项（第23轮）：统一按「横屏兼容」布局，不做手机竖屏适配
   ① 竖屏：全屏引导旋转，可选「仍以竖屏浏览」
   ② 牌桌/四门卡片按内容高度，不再纵向拉满（原来竖屏卡片被拉到 680px）
   ════════════════════════════════════════════════════════════ */

/* ① 竖屏旋转引导层 */
.rotate-hint { display: none; }
html.ipad-portrait .rotate-hint { position: fixed; inset: 0; z-index: 9999;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 14px; padding: 34px; text-align: center; color: #eaf2ff;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(47,191,113,.10), transparent 62%),
    linear-gradient(170deg, #0e1a15, #080b11 72%); }
html.ipad-portrait body { overflow: hidden; }
.rotate-hint h3 { margin: 0; font-size: 1.3125rem; letter-spacing: 0.0938rem; color: var(--gold, #edbe4c); }
.rotate-hint p { margin: 0; font-size: 0.8125rem; line-height: 1.8; color: rgba(255,255,255,.62); max-width: 330px; }
.rotate-hint .btn { margin-top: 6px; padding: 8px 18px; font-size: 0.7813rem; }
.rh-icon { color: var(--gold, #edbe4c); animation: rh-rotate 2.6s ease-in-out infinite; }
@keyframes rh-rotate {
  0%, 55% { transform: rotate(0deg); }
  78%, 100% { transform: rotate(-90deg); }
}

/* ② iPad 牌桌：按内容高度排布，空余高度留给座位/开奖面板 */
html.is-ipad .table-wrap { align-items: start; }
html.is-ipad .felt { align-self: start; }
html.is-ipad .suit-grid { flex: 0 0 auto; }
html.is-ipad .suit-card { min-height: clamp(130px, 32vh, 280px); }

/* ── 开奖徽标：赔付文案更长（到账/净赢），竖屏允许换行不溢出牌桌 ── */
@media (max-width: 720px) { .reveal-badge {
    white-space: normal; max-width: calc(100% - 22px); text-align: center;
    line-height: 1.45; font-size: 0.8438rem; padding: 8px 14px;
  } }

/* ── 对单弹窗：庄家锁定截图 ── */
.pf-shot-wrap { margin: 4px 0 10px; }
.pf-shot-title { font-size: 0.8125rem; font-weight: 600; color: #edbe4c; margin: 6px 0; }
.pf-shot { display: block; width: 100%; max-width: 420px; margin: 0 auto;
  border-radius: 10px; border: 1px solid rgba(255,255,255,.14);
  cursor: zoom-in; background: #0a0f14; }
.pf-shot-note { font-size: 0.6875rem; color: #8795ac; margin-top: 6px; line-height: 1.6; }

/* ── 最后一局提示 + 解散投票横幅 ── */
.final-bar, .dis-bar { margin: 0 0 10px; padding: 9px 14px; border-radius: 10px;
  font-size: 0.8438rem; line-height: 1.6; text-align: center; }
.final-bar { background: linear-gradient(90deg, rgba(237,110,76,.16), rgba(237,110,76,.05));
  border: 1px solid rgba(237,110,76,.45); color: #ffb08f; }
.final-bar b { color: #ff8a5c; }
.dis-bar { background: linear-gradient(90deg, rgba(237,190,76,.14), rgba(237,190,76,.04));
  border: 1px solid rgba(237,190,76,.4); color: #edbe4c; }
.dis-acts { display: inline-flex; gap: 8px; margin-left: 10px; vertical-align: middle; }
/* 投票横幅里的「同意关闭」：与「拒绝」同款带框按钮（金框金字区分） */
.dis-acts .btn-agree { background: rgba(237, 190, 76, .16);
  border: 1px solid var(--gold, #edbe4c);
  color: var(--gold, #edbe4c); }
.dis-acts .btn-agree:hover { background: rgba(237, 190, 76, .28); }
/* e257 可赔额度暂停横幅：偏红警示，庄家端带倒计时 + 补额度 / 下庄按钮 */
.credit-bar { background: linear-gradient(90deg, rgba(255,90,90,.16), rgba(255,90,90,.04));
  border: 1px solid rgba(255,120,120,.48); color: #ffc0c0; }
.credit-bar b { color: #ff9a9a; }
.credit-bar .dis-acts { margin-left: 8px; }
.credit-bar .btn.sm { padding: 4px 10px; font-size: 0.75rem; min-height: 26px; }
/* e361：进行中预警（本局还没结束、尚未暂停）用琥珀色，与「已暂停」的红色区分开；
   两种状态共用同一个 #creditBar，所以只切这个类，不会再出现两条框、四个胶囊。 */
.credit-bar.credit-warn { background: linear-gradient(90deg, rgba(237,190,76,.16), rgba(237,190,76,.04));
  border-color: rgba(237,190,76,.46); color: #f0d79a; }
.credit-bar.credit-warn b { color: #edbe4c; }
@media (max-width: 720px) {
.final-bar, .dis-bar { font-size: 0.75rem; padding: 8px 10px; }
.dis-acts { margin-left: 4px; }}
@media (max-width: 560px) {
.credit-bar { font-size: 0.7188rem; padding: 7px 9px; }
.credit-bar .dis-acts { display: flex; justify-content: center; flex-wrap: wrap; margin: 6px 0 0; }}

/* 开房表单：label 文字改为输入框内灰色占位提示 */
/* e322：占位符字号独立于输入框正文，统一收到灰色提示基准 0.6875rem（≈11.7px），
   否则会继承输入框正文字号（桌面 0.875rem / 移动 1rem），比周围灰字明显偏大 */
.field input::placeholder, .field select::placeholder, .pf-card .field input::placeholder { color: var(--muted, #8a93a6);
  opacity: 1; font-size: 0.6875rem; line-height: 1.4; }

/* ───────────── 大厅房间归类：可折叠（公开 / 私密） ───────────── */
.room-group { margin-bottom: 12px; }
.rg-title { /* e913：升级为 96px 主入口卡；e221 的窄容器换行容错保留 */
  position: relative;
  width: 100%; display: flex; align-items: center; flex-wrap: wrap; gap: 10px;
  min-height: 96px;
  padding: 14px 16px; margin: 0;
  background: linear-gradient(180deg, rgba(47,191,113,.13), rgba(47,191,113,.035));
  border: 1px solid rgba(47,191,113,.28);
  border-radius: 16px;
  font-family: inherit; font-size: 0.9063rem; font-weight: 700;
  color: var(--gold); text-align: left; letter-spacing: 0.025rem;
  cursor: pointer;
  transition: background .18s, border-color .18s, box-shadow .18s; }
.room-group[data-grp="priv"] .rg-title {
  background: linear-gradient(180deg, rgba(237,190,76,.13), rgba(237,190,76,.035));
  border-color: rgba(237,190,76,.28); }
.rg-main { flex: 1 1 auto; min-width: 0; display: flex; align-items: center; gap: 12px; }
.rg-label { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rg-sub { font-size: 0.6875rem; font-weight: 400; color: var(--muted);
  letter-spacing: 0; line-height: 1.2; white-space: nowrap; }
.rg-title:hover { border-color: rgba(237,190,76,.45);
  box-shadow: 0 8px 20px rgba(0,0,0,.28); }
.rg-caret { flex: 0 0 auto; display: inline-block; font-size: 0.6875rem; line-height: 1;
  color: var(--muted); transition: transform .2s ease, color .2s ease; }
.room-group.open .rg-caret { transform: rotate(90deg); color: var(--gold); }
.rg-icon { flex: 0 0 auto; width: 44px; height: 44px;
  display: grid; place-items: center; line-height: 1;
  font-size: 1.25rem; border-radius: 14px; color: #8ff0ba;
  background: rgba(47,191,113,.14); border: 1px solid rgba(47,191,113,.3); }
.room-group[data-grp="priv"] .rg-icon { color: var(--gold);
  background: rgba(237,190,76,.14); border-color: rgba(237,190,76,.3); }
.rg-name { flex: 0 0 auto; font-size: 1.0625rem; line-height: 1.2; }
/* e221：占满剩余宽度 + 内部徽章可换行，徽章不会被压扁溢出到右侧提示上 */
.rg-stats { flex: 1 1 auto; min-width: 0;
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px; row-gap: 4px;
  margin-left: 2px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(56px, 1fr));
  max-width: min(52%, 210px); }
.rg-chip { flex: 0 0 auto;
  display: inline-flex; align-items: baseline; gap: 4px;
  padding: 3px 9px; border-radius: 999px; white-space: nowrap;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.07);
  font-size: 0.6563rem; font-weight: 400; color: var(--muted);
  flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 7px 8px; border-radius: 11px; }
.rg-chip b { font-size: 1.0625rem; font-weight: 700; color: var(--ink);
  line-height: 1.1; font-variant-numeric: tabular-nums; }
.rg-chip i { font-style: normal; font-size: 0.625rem; line-height: 1; }
.rg-chip.online { align-items: center;
  background: rgba(47,191,113,.12); border-color: rgba(47,191,113,.3); color: #7ed6a3; }
.rg-chip.online b { color: #8ff0ba; }
.live-dot { width: 6px; height: 6px; border-radius: 50%; background: #2fbf71;
  animation: livePulse 1.8s ease-out infinite; }
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(47,191,113,.55); }
  70% { box-shadow: 0 0 0 5px rgba(47,191,113,0); }
  100% { box-shadow: 0 0 0 0 rgba(47,191,113,0); }
}
.rg-chip.hot { background: rgba(237,190,76,.11); border-color: rgba(237,190,76,.28); color: var(--gold); }
.rg-chip.hot b { color: #ffd986; }
.rg-tip { /* e221：文字已简化为「展开/收起」，且不被压缩、不折行，始终靠右不重叠 */
  flex: 0 0 auto; margin-left: auto; white-space: nowrap;
  font-size: 0.7188rem; font-weight: 400; color: var(--muted);
  position: absolute; right: 12px; top: 8px; margin-left: 0; }
.room-group.open .rg-title { border-color: rgba(237,190,76,.45);
  background: linear-gradient(180deg, rgba(237,190,76,.13), rgba(237,190,76,.05)); }
.room-group[data-grp="pub"].open .rg-title { border-color: rgba(47,191,113,.5);
  background: linear-gradient(180deg, rgba(47,191,113,.19), rgba(47,191,113,.06)); }
.room-group[data-grp="priv"].open .rg-title { border-color: rgba(237,190,76,.5);
  background: linear-gradient(180deg, rgba(237,190,76,.19), rgba(237,190,76,.06)); }
.room-group.open .rg-tip { color: rgba(237,190,76,.85); }
.rg-body { display: none; padding-top: 12px; }
.room-group.open .rg-body { display: block; }
.rg-empty { margin: 0; padding: 8px 4px 14px; font-size: 0.7813rem; color: var(--muted); }

/* ───────────── 大厅房间搜索 ───────────── */
.lobby-search { position: relative; display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 4px 6px 4px 12px;
  background: rgba(255,255,255,.045);
  border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .18s, background .18s; }
.lobby-search:focus-within { border-color: rgba(237,190,76,.55); background: rgba(237,190,76,.06); }
.lobby-search .ls-ico { font-size: 0.8125rem; opacity: .75; flex: 0 0 auto; }
.lobby-search input { flex: 1 1 auto; min-width: 0; padding: 9px 0;
  background: transparent; border: 0; outline: none; text-overflow: ellipsis;
  color: var(--ink); font-size: 0.8438rem; }
.lobby-search input::placeholder { color: var(--muted); opacity: 1; font-size: 0.75rem; }
.lobby-search input::-webkit-search-cancel-button { filter: invert(.6); }
.lobby-search .btn { flex: 0 0 auto; }
.ls-results { position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 40;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 16px 38px rgba(0,0,0,.5);
  overflow: hidden auto; max-height: 320px; }
.ls-item { display: flex; align-items: center; gap: 10px;
  padding: 11px 14px; font-size: 0.8125rem; cursor: pointer;
  background: rgba(255,255,255,.06); border-radius: 10px; margin-bottom: 6px; }
.ls-item:hover { background: rgba(237,190,76,.1); }
.ls-name { font-weight: 600; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ls-sub { font-size: 0.7188rem; color: var(--muted); margin-top: 2px; }
.ls-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 4px; background: rgba(237,190,76,.18); color: var(--gold); font-size: 0.6875rem; vertical-align: middle; }
.ls-id { font-size: 0.7188rem; color: var(--gold); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; flex: 0 0 auto; }
.ls-meta { margin-left: auto; font-size: 0.7188rem; color: var(--muted); white-space: nowrap; flex: 0 0 auto; }
.ls-none { margin: 0; padding: 14px; font-size: 0.7813rem; color: var(--muted); }

/* ───────────── 公告喇叭：循环左移跑马灯 ───────────── */
.announce { overflow: hidden; white-space: nowrap; }
/* 喇叭独立固定：文字只在右侧滚动窗内移动，不会盖到喇叭 */
.announce { display: flex; align-items: center; gap: 9px; }
.announce .ann-horn { flex: 0 0 auto; font-size: 0.875rem; line-height: 1; }
.announce .ann-viewport { flex: 1 1 auto; min-width: 0; overflow: hidden; white-space: nowrap; }
.announce .ann-track { display: inline-flex; min-width: 100%; }
.announce .ann-item { display: inline-block; padding-right: 80px; }
.announce.scrolling .ann-track { animation: annScroll var(--ann-dur, 18s) linear infinite; }
@keyframes annScroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
.announce.scrolling .ann-track { animation: none; }}

/* 小屏：搜索栏与折叠标题收紧 */
@media (max-width: 430px) { .lobby-search { padding: 3px 5px 3px 10px; gap: 6px; }
  .lobby-search input { font-size: 0.8125rem; padding: 9px 0; }
  .lobby-search .btn { padding: 7px 12px; font-size: 0.8125rem; }
  .rg-title { font-size: 0.8438rem; padding: 9px 11px; gap: 7px; }
  .rg-icon { width: 26px; height: 26px; font-size: 0.8125rem; border-radius: 9px; }
  .rg-stats { gap: 5px; }
  .rg-chip { padding: 2px 7px; font-size: 0.625rem; }
  .rg-chip b { font-size: 0.75rem; }
  /* e221：不再隐藏热局徽章与「展开/收起」，靠上面的 flex-wrap 自适应换行防重叠 */
  .rg-title { row-gap: 6px; }
  .rg-stats { max-width: none; width: 100%; }
  .rg-sub { white-space: normal; }
  .ls-meta { display: none; } }

/* ───────────── 提现（我的） ───────────── */
.wd-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.wd-tab { padding: 8px 14px; border-radius: 999px; font-size: 0.8125rem; font-weight: 600;
  color: var(--muted); background: rgba(255,255,255,.05);
  border: 1px solid var(--line); transition: all .15s; }
.wd-tab:hover { color: var(--ink); border-color: rgba(237,190,76,.4); }
.wd-tab.active { color: var(--gold); background: rgba(237,190,76,.14);
  border-color: rgba(237,190,76,.5); }
.wd-form .field-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wd-form .field { flex: 1 1 160px; min-width: 0; }
.wd-qr-row { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; padding: 12px; border: 1px dashed var(--line); border-radius: 12px; }
.wd-qr-box { flex: 0 0 auto; width: 110px; height: 110px; border-radius: 10px;
  background: rgba(255,255,255,.05); border: 1px solid var(--line);
  display: grid; place-items: center; overflow: hidden; }
.wd-qr-box img { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.wd-qr-box span { font-size: 0.7188rem; color: var(--muted); }
.wd-qr-ops { flex: 1 1 auto; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-start; }
.wd-qr-ops .hint { width: 100%; }
.wd-request { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.wd-request .field-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.wd-request .field { flex: 1 1 140px; min-width: 0; }
.wd-st { font-size: 0.75rem; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.wd-st-pending { color: var(--gold); background: rgba(237,190,76,.14); }
.wd-st-done { color: var(--green); background: rgba(47,191,113,.14); }
.wd-st-rejected { color: var(--red); background: rgba(240,84,95,.14); }
@media (max-width: 430px) {
.wd-qr-row { flex-direction: column; align-items: center; }
.wd-qr-ops { justify-content: center; }}

/* ───────────── 提现入口按钮 + 提现独立页 ───────────── */

.pf-wd-btn { display: inline-block; margin-top: 6px;
  padding: 4px 12px !important; font-size: 0.75rem !important; line-height: 1.5; }

/* 提现金额区 */
.wd-amount-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; margin-bottom: 12px;
  background: rgba(237,190,76,.08); border: 1px solid rgba(237,190,76,.25); border-radius: 12px; }
.wd-avail { font-size: 0.8125rem; color: var(--muted); }
.wd-avail b { color: var(--gold); font-size: 1rem; font-variant-numeric: tabular-nums; }
.wd-submit-field { flex: 0 0 auto; align-self: flex-end; }
.wd-submit-field .btn { white-space: nowrap; }

@media (max-width: 640px) {
.wd-submit-field { flex: 1 1 100%; }
.wd-submit-field .btn { width: 100%; }}

/* ───────────── 提现三步进度条 ───────────── */
.wd-progress-card { margin-bottom: 16px; }
.wd-progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.wd-progress-head h4 { margin: 0; }
.wd-progress-head .muted { font-size: 0.75rem; }
.wd-steps { display: flex; align-items: center; gap: 8px; }
/* 两步均分整行宽度：每步各占一半，连线固定窄宽 */
.wd-step { display: flex; align-items: center; justify-content: center; gap: 8px; flex: 1 1 0; min-width: 0; }
.wd-step-dot { width: 26px; height: 26px; border-radius: 50%; flex: 0 0 auto;
  display: grid; place-items: center;
  font-size: 0.7813rem; font-weight: 700;
  color: var(--muted); background: rgba(255,255,255,.06);
  border: 1.5px solid var(--line);
  transition: all .25s ease; }
.wd-step-txt { font-size: 0.7813rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.wd-step-line { flex: 0 0 34px; height: 2px; background: var(--line); border-radius: 2px; transition: background .25s ease; }
.wd-step.active .wd-step-dot { color: #1a2231; background: var(--gold); border-color: var(--gold);
  box-shadow: 0 0 0 4px rgba(237,190,76,.18); }
.wd-step.active .wd-step-txt { color: var(--gold); font-weight: 600; }
.wd-step.done .wd-step-dot { color: var(--green); background: rgba(47,191,113,.16); border-color: rgba(47,191,113,.5); }
.wd-step.done .wd-step-dot::before { content: '✓'; }
.wd-step.done .wd-step-txt { color: var(--green); }
.wd-step.done .wd-step-dot { font-size: 0; }
.wd-step-line.done-line { background: rgba(47,191,113,.5); }
.wd-progress-tip { margin: 12px 0 0; font-size: 0.7813rem; color: var(--muted); }
.wd-progress-tip.bad { color: var(--red); }

@media (max-width: 640px) {
.wd-step-line { flex: 0 0 22px; }
.wd-step-txt { font-size: 0.75rem; }}

/* ───────────── 收款信息折叠卡 ───────────── */
.wd-acc-card { padding: 0; overflow: hidden; }
.wd-acc-head { width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 16px; margin: 0;
  background: none; border: none; cursor: pointer; text-align: left;
  color: inherit; font: inherit; }
.wd-acc-head:hover { background: rgba(255,255,255,.03); }
.wd-acc-title { font-weight: 700; font-size: 0.9063rem;
  /* e310：苹果端文字放大到 120~130% 时，折叠卡标题（如「注单查询」）会被挤成两行，
     单独一个字掉到下一行很不整齐。标题不折行、剩余空间交给带省略号的摘要。 */
  white-space: nowrap; flex: 0 0 auto; }
.wd-acc-summary { flex: 1 1 auto; min-width: 0; font-size: 0.75rem; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wd-acc-caret { flex: 0 0 auto; color: var(--muted); transition: transform .25s ease; font-size: 0.8125rem; }
.wd-acc-head.open .wd-acc-caret { transform: rotate(90deg); }
.wd-acc-body { padding: 4px 16px 14px; border-top: 1px dashed var(--line); }
.wd-acc-body[hidden] { display: none; }

/* 新增状态胶囊：审核通过·等待出款中 */
.wd-st-approved { color: #4da3ff; background: rgba(77,163,255,.14); }

/* 步骤异常态：审核未通过（红） */
.wd-step.bad .wd-step-dot { color: var(--red); background: rgba(240,84,95,.16); border-color: rgba(240,84,95,.5); box-shadow: none; }
.wd-step.bad .wd-step-txt { color: var(--red); font-weight: 600; }

/* 可复制的单号：虚线下划 + hover 提示 */
.wd-copy-id.has-id { cursor: pointer; border-bottom: 1px dashed rgba(255,255,255,.35); padding-bottom: 1px; }
.wd-copy-id.has-id:hover { color: var(--ink, #e8ecf4); }
.wd-ord-id:hover { color: var(--ink, #e8ecf4); }

/* ───────────── 个人中心：信息卡排版优化 ───────────── */
/* e237：昵称行 = 「昵称：X ✎」，一行自适应：越长字号越小、超长省略
   e247：按标注图，登入账号胶囊回到昵称行右侧。.pf-head 已约束 100% 宽、
   #pfNameText 可省略，胶囊设为不收缩，长账号完整显示且整行不撑破卡片（e242 溢出教训） */
.pf-name { white-space: nowrap; overflow: hidden; }
.pf-name-label { flex: 0 0 auto; font-weight: 600; color: var(--gold); }
.pf-name-sm { font-size: 1.0625rem; }
.pf-name-xs { font-size: 0.9375rem; }
/* e304：【昵称编辑图标紧贴名字最后一字】原来 #pfNameText 用 flex:1 1 auto 撑满
   整行，把 ✎ 推到行尾（离名字十万八千里，看着像跟「登入账号」胶囊一组）。
   改为 0 1 auto = 只占名字本身宽度、超长仍可收缩省略，✎ 自然紧跟最后一字。 */
.pf-name #pfNameText { flex: 0 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-name-edit { flex: 0 0 auto; margin-left: -2px; }
.pf-acc-chip { flex: 0 0 auto; max-width: 70%;
  display: inline-flex; align-items: center; gap: 3px;
  padding: 3px 9px; border-radius: 999px;
  background: rgba(255,255,255,.06); border: 1px solid var(--line);
  font-size: 0.6875rem; font-weight: 400; letter-spacing: 0; color: var(--muted);
  white-space: nowrap; }
.pf-acc-chip b { color: var(--ink); font-weight: 600; font-variant-numeric: tabular-nums;
  min-width: 0; overflow: hidden; text-overflow: ellipsis; }
/* e359：登录账号胶囊内的复制按钮（批注：登录账号这页添加一个复制账号功能） */
.pf-acc-copy { flex: 0 0 auto; width: 18px; height: 18px; margin-left: 1px;
  display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 6px;
  background: transparent; color: var(--muted); font-size: 0.75rem; line-height: 1;
  cursor: pointer; transition: color .12s, background .12s, transform .1s; }
.pf-acc-copy:hover { color: var(--gold); background: rgba(232,192,100,.15); }
.pf-acc-copy:active { transform: scale(.9); }

/* 安全退出：紧凑胶囊按钮、水平居中；e237 按标注缩小红色区域、收紧左右留白 */
.pf-logout-wrap { display: flex; justify-content: center; margin: 10px auto 4px; max-width: 520px; padding: 0 4px; }
.pf-logout-btn { display: flex; align-items: center; justify-content: center;
  width: auto; min-width: 0; min-height: 38px; padding: 8px 22px;
  color: #fff; background: linear-gradient(180deg, #ff6b78, #e03548);
  border: 0; border-radius: 20px;
  font-size: 0.875rem; font-weight: 700; letter-spacing: 0.125rem; text-indent: 2px;
  cursor: pointer; box-shadow: 0 6px 16px rgba(240,84,95,.35);
  transition: filter .15s, transform .1s; }
.pf-logout-btn:hover { filter: brightness(1.1); }

/* ───────────── e246：版本可见 + 新版本提示 ───────────── */
/* 个人中心底部小字：一眼确认玩家端实际加载的是哪一版，避免「改了却没生效」反复扯皮 */
.pf-build { text-align: center; font-size: 0.6875rem; color: var(--muted); opacity: .5; margin: 2px 0 10px; letter-spacing: 0.0313rem; }
/* 页面长时间开着时，服务端发新版会浮出提示；点一下才刷新，不打断牌局 */
.build-toast { position: fixed; left: 50%; bottom: 74px; transform: translateX(-50%); z-index: 9999;
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap; max-width: 92vw;
  padding: 10px 12px 10px 16px; border-radius: 16px;
  background: #222d3d; border: 1px solid rgba(237,190,76,.45);
  box-shadow: 0 8px 28px rgba(0,0,0,.5);
  font-size: 0.75rem; color: var(--ink); text-align: center; }
.build-toast[hidden] { display: none; }
.build-toast button { background: var(--gold, #edbe4c); color: #1a2230; border: 0; border-radius: 999px;
  padding: 6px 13px; font-size: 0.75rem; font-weight: 700; cursor: pointer; }
.pf-logout-btn:active { transform: translateY(1px); box-shadow: 0 3px 8px rgba(240,84,95,.3); }

/* 信息列表：键值成行，两列对齐，类目清晰（e241 起整行铺开，间距交给 hero gap） */
/* e344：用户 00:21 安卓截图批注「这框的地方都溢出了、ip 所在地这条没有自动省略适配、
   用户ID和邀请码复制图标完全溢出」。
   真渲染实测（390px / 根字号 17px）：.profile-hero 右边界 378，但 .pf-info-list
   被撑到 386.3（整块右侧溢出 8.3px），长文本那行 .v 是 261px 且 scrollWidth==clientWidth，
   省略号压根没触发。根因不是 e303 补的 min-width:0 不够，而是 .v 用 flex:1 1 auto，
   flex-basis 取「文字自身宽度」→ 长文本先把行撑宽、再把列表和整个 hero 撑出屏幕。
   修法：①列表/行都钉死 width:100% + max-width:100%，不再跟着内容长；
        ②.v 改 flex:1 1 0%（基准从 0 起算，只分剩余空间）→ 长文本必定触发省略号；
        ③复制按钮也收小 2px，整块更协调。四档屏宽实测 hero 无横向滚动、图标偏差 0px。 */
.pf-info-list { padding: 8px 12px; min-width: 0;
  width: 100%; max-width: 100%; box-sizing: border-box;
  background: rgba(255,255,255,.03); border: 1px solid var(--line);
  border-radius: 10px;
  display: flex; flex-direction: column; gap: 6px; }
/* e344：用户「安卓字体文字在整体调小那么一点点」——只收个人中心信息行这一档
   （0.75rem→0.7188rem，12.75→12.22px，约 -4%）。不动全站根字号 17px：
   那是牌桌/弹窗所有像素级对齐的基准，全站降会连带几十处几何一起偏。 */
.pf-info-row { display: flex; align-items: center; gap: 12px; min-width: 0;
  width: 100%; max-width: 100%; box-sizing: border-box;
  font-size: 0.7188rem; line-height: 1.4; }
/* e356：用户 15:18 苹果端截图批注——「最近登入 / 加入时长」左侧标签明明排得下却换行成两行，
   而「最近登入」的值（归属地·IP·时间）较长时也没用省略号。
   根因：.k 缺 white-space:nowrap，iOS Safari 对中文默认允许在字符间断行（比 Chrome 更激进），
   即便 60px 内放得下也会断成「最近登/入」；.v 因自带 nowrap 才没被波及。
   修法：① .k 锁 white-space:nowrap 且把 60px 提到 64px 兜底 iOS 中文字体略宽的情况，
        标签永不换行；② .v 补 display:block 增强 iOS 下 flex 子项省略号的可靠性。
   .v 的 overflow/text-overflow/nowrap/min-width:0 沿用，完整内容仍在 title 里可看全文。 */
.pf-info-row .k { flex: 0 0 64px; color: var(--muted); white-space: nowrap; }
/* e303：恢复「最近登入」等长文本的省略号。原先 .v 只有 overflow/text-overflow 却缺
   flex:1 1 auto + min-width:0 —— flex 子项默认 min-width:auto（=整串文本宽度），
   永远不收缩，省略号完全不生效，归属地·IP·时间一长就撑破卡片（用户反馈「溢出/功能失效」）。
   e344：再把 flex-basis 从 auto 改成 0% —— 只补 min-width:0 仍会被 max-content 撑开。
   完整内容仍放在 title 里（app.js e303），长按/悬浮可看全文。 */
.pf-info-row .v { flex: 1 1 0%; min-width: 0; display: block;
  color: var(--ink); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* e235：用户 ID / 邀请码行尾的复制小按钮 */
.pf-copy { flex: 0 0 auto; margin-left: auto; width: 20px; height: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 0; border-radius: 6px; cursor: pointer; font-size: 0.75rem;
  color: var(--muted); background: rgba(255,255,255,.06);
  transition: background .15s, color .15s; }
.pf-copy:hover { color: var(--gold); background: rgba(232,192,100,.15); }

/* 钱包区（e237/e241/e249）：整行铺开 + 顶部虚线分隔。
   e249 改三列两行网格：数值列 | 提现按钮 | 数值列；标签行 | 数值行（固定 38px）。
   按钮独占中列且只落在数值行 → 余额数字、提现、房卡数字严格同一水平线；
   两列数字各自居中，标签与数字同轴（旧版按钮占宽曾把数字推偏 29px）。 */
.pf-wallet { width: 100%; display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto 38px; column-gap: 10px; row-gap: 0; align-items: center; justify-content: center; border-top: 1px dashed var(--line); padding-top: 10px; }
.pf-w-col { flex: 1 1 0; display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 0; text-align: center; }
.pf-w-col:first-child { grid-column: 1; grid-row: 1 / 3; }
.pf-w-col:last-child { grid-column: 3; grid-row: 1 / 3; }
.pf-w-label { font-size: 0.6875rem; color: var(--muted); white-space: nowrap; text-align: center; }
.pf-w-val { display: flex; align-items: center; justify-content: center; gap: 10px; height: 38px; }
.pf-w-val b { font-size: 1.25rem; color: var(--gold); font-variant-numeric: tabular-nums; line-height: 1; white-space: nowrap; }
/* 提现按钮 = 中列、只占数值行，垂直与两侧数字严格同轴。
   .btn 自带 margin-top:6px 会把按钮推下 3px，必须清零；不再用 translateY 硬凑基线 */
.pf-wallet > .pf-wd-btn { grid-column: 2; grid-row: 2; flex: 0 0 auto; align-self: center; margin: 0; padding-top: 5px; padding-bottom: 5px; line-height: 1.2; transform: none; }
@media (max-width: 420px) {
.pf-w-val b { font-size: 1.0625rem; }
.pf-wallet { column-gap: 8px; }}

/* 移动端：钱包整行铺开（e241），三列仍整体居中 */
@media (max-width: 640px) { .pf-wallet { justify-content: center; } }

/* e249：点昵称改名时账号胶囊占了 138px，昵称区只剩 122px，而编辑器需 198px，
   配合 .pf-name 的 overflow:hidden 会把「保存 / 取消」裁掉（实测保存按钮只露出「保」）。
   编辑态临时收起胶囊并放开溢出；保存/取消走 renderNameView() 自动恢复显示。 */
.pf-head.editing .pf-acc-chip { display: none; }
.pf-head.editing .pf-name { overflow: visible; }

/* e237：个人中心顶栏「客服」按钮的耳机图标（与首页 btnSupport 同款 SVG） */
.pf-ico { width: 14px; height: 14px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; margin-right: 5px; }

/* 大厅房卡：上庄门槛金色标记 */
.rc-banker-min b { color: var(--gold); }
.pf-ref-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pf-ref-code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 1.375rem; letter-spacing: 0.1875rem; color: var(--gold, #edbe4c);
  padding: 6px 14px; border-radius: 10px;
  background: rgba(237,190,76,.10); border: 1px dashed rgba(237,190,76,.45);
  user-select: all; }
.pf-ref-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 560px) {
.pf-ref-code { font-size: 1.125rem; letter-spacing: 0.125rem; }
.pf-ref-line .btn { flex: 1 1 auto; }}

/* ─────────────── 个人中心：统一折叠卡（推荐返佣/声音/房间战绩/安全设置） ─────────────── */
.pf-card.wd-acc-card { padding: 0; overflow: hidden; }
.pf-card.wd-acc-card .wd-acc-head { width: 100%; }
.pf-card.wd-acc-card .wd-acc-body { padding: 6px 16px 16px; }
.pf-card.wd-acc-card .stat-grid { margin-top: 10px; }
/* 战绩统计折叠卡：body 内只有 stat-grid，去掉双重上间距 */
#pfStatsBody { padding: 14px 16px 16px; }
#pfStatsBody .stat-grid { margin-top: 0; }

/* ── 头像选择弹窗：预置头像九宫格（e69） ── */
.avatar-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px;
  padding: 4px 2px; }
.avatar-grid .av-opt { aspect-ratio: 1; border-radius: 50%; overflow: hidden; padding: 0;
  border: 2px solid var(--line); background: #0b1119; cursor: pointer;
  transition: transform .12s ease, border-color .12s ease; }
.avatar-grid .av-opt img { width: 100%; height: 100%; display: block; }
.avatar-grid .av-opt:hover { transform: scale(1.08); border-color: var(--gold, #f2b134); }
.avatar-grid .av-opt:active { transform: scale(0.96); }

/* ── 黑门（黑桃/梅花）赔率徽标移到左上角（红门保持右上） ── */
.suit-card[data-suit="spade"] .suit-odds, .suit-card[data-suit="club"] .suit-odds { right: auto; left: 10px; }
@media (max-width: 560px) {
.suit-card[data-suit="spade"] .suit-odds, .suit-card[data-suit="club"] .suit-odds { left: 7px; }}
@media (max-width: 720px) {
.suit-card[data-suit="spade"] .suit-odds, .suit-card[data-suit="club"] .suit-odds { left: 5px; }}

/* ══════════════════════════════════════════════════════════════════════
   e219：座位 / 最近开奖两个方框「自动适配到页面最底部」
   ──────────────────────────────────────────────────────────────────────
   旧行为：两个面板只包住内容（还叠着 150 / 120 / 104 / 240px 等各轮
   max-height），侧栏在窄屏又是 row + align-content:flex-start，iPad 下
   .table-wrap 还是 align-items:start —— 结果面板下方留一大块空白直到哈希栏。
   新行为：侧栏吃满 .table-wrap 分配到的整行高度，两个列表面板把剩余高度
   分掉，列表内部滚动；聊天输入栏保持紧凑，不参与拉伸。
   规则集中放在样式表最后，统一覆盖前面各轮 @media 的残留限制。
   纯样式改动，不触碰任何游戏逻辑与接口。
   ══════════════════════════════════════════════════════════════════════ */

/* ① 侧栏本身撑满 grid 行/列：覆盖 html.is-ipad .table-wrap { align-items:start }
      （align-self 定义在 item 上，优先于容器的 align-items） */
#viewRoom .table-wrap > .side { align-self: stretch; min-height: 0; }

/* ② 纵向布局（桌面 / 横屏）：两个列表面板按剩余高度均分，聊天栏不拉伸 */
#viewRoom .side > .panel:not(.room-chat-panel) { flex: 1 1 0; min-height: 0; max-height: none; }
#viewRoom .side > .room-chat-panel { flex: 0 0 auto; }

/* ③ 列表吃满面板剩余高度、内部滚动；去掉固定 max-height 造成的空白 */
#viewRoom .side .seat-list, #viewRoom .side .history-list { flex: 1 1 auto; min-height: 0; max-height: none; }

/* ④ 手机竖屏（≤720px）：侧栏在牌桌下方、横向两列，改用 grid 明确
      「聊天栏一行 + 两个列表面板一行」，第二行 1fr 一直拉到哈希栏上方。 */
@media (max-width: 720px) and (orientation: portrait) { #viewRoom .table-wrap { grid-template-rows: minmax(0, auto) minmax(0, 1fr); }
  #viewRoom .felt { overflow-y: auto; }
  #viewRoom .side {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr);
    align-content: stretch;
  }
  #viewRoom .side > .room-chat-panel { grid-column: 1 / -1; max-height: 118px; } }

/* ⑤ 平板竖屏（721~1024px，含 iPad 竖屏）：这个区间另有一条规则把
      .table-wrap 改回「牌桌 | 侧栏」左右两列，侧栏只有 240px 宽。
      因此这里不能给 .table-wrap 设两行（会空出整行）、也不能让侧栏
      横向并排（会挤成两细条）；改为上下堆叠，靠 ① 的 align-self:stretch
      把整列高度吃满，两个面板再按 ② 均分，一起贴到哈希栏上方。 */
@media (min-width: 721px) and (max-width: 1024px) and (orientation: portrait) { #viewRoom .side { flex-direction: column; flex-wrap: nowrap; align-content: stretch; } }

/* ─────────── e307：真机渲染（Edge 无头）查出的两处溢出，局部兜底 ───────────
   用 tools/render-layout-check.cjs 在 390×844 / 412×915 / 360×780 / 844×390 四个视口
   实测 getBoundingClientRect 发现：
   ① 360px 小屏：5 个花色按钮每列约 58px，「符号槽 + 黑桃两字」比列宽多 7px，
      文字被按钮 overflow 裁成半字 → 收紧符号槽 / gap / 内边距，保证完整显示。
   ② 844×390 横屏（及 721~1024px 平板）：侧栏只有 240px，聊天工具行的 5 个固定
      32px 圆钮 + 输入框把 .panel 撑到 343px，右边界越出视口 91px
      → 面板限宽到父容器、工具行可收缩、圆钮收到 28px，功能按钮一个不少。
   这两条只作用在对应断点，竖屏 390/412 的布局完全不变。 */
/* e311：360px 小屏每列约 58px，槽宽与字号一起收一档（槽仍用 rem 保持五键等宽），
   彩色大王图样同步缩小但继续保持彩色字体栈，文字不会被按钮 overflow 裁掉。 */
@media (max-width: 380px) {
  .bp-keys { gap: 4px; }
  .bp-key { gap: 2px; padding: 8px 2px; font-size: 0.75rem; }
  .bp-key-ico { flex-basis: 1.1rem; width: 1.1rem; height: 1.1rem; font-size: 0.9375rem; }
  .bp-key-ico.emoji { font-size: 0.875rem; }
}
@media (min-width: 721px) and (max-width: 1024px) {
  .side, .side > .panel { min-width: 0; max-width: 100%; }
  .room-chat-bar { min-width: 0; max-width: 100%; gap: 3px; }
  .room-chat-bar .rc-tool { width: 28px; height: 28px; flex-basis: 28px; }
  .room-chat-bar .rc-text { height: 28px; }
}

/* ═════════════════ e310：苹果端独立可调 + 鸿蒙专项最佳适配 ═════════════════
   由 index.html 早期的 GFS_FIT 脚本给 <html> 打上 data-dev，并只在苹果端写
   --ios-fit / --ios-pad / 根字号。安卓端 never 命中下面任何一条规则，
   所以安卓仍是「html{font-size:17px} + 固定 58px 导航栏」的原样设置。
   ── 所有 calc 在默认档（--ios-fit=1、--ios-pad=0）都与原值逐像素相等，
      用户不调 = 页面和以前一模一样，不会重演「改数字导致爆字外溢」。 */

/* ① 苹果：e532 真机安全区自适应（不再猜、不再硬编码 47/34）
   ★前四版全错的根因★：验证一直跑在 Chromium 里，env(safe-area-inset-*) 恒为 0，
   于是「零留白」每次都判 PASS；而 iPhone 独立 PWA 真机是 top=47 / bottom=34。
   真机上 e531 的零留白导致：页眉顶进半透明状态栏被糊、导航贴在 Home 区上沿、
   下面露出一条与页面主体不同色的 html 底色带 → 用户第 5 次截图仍「上下留黑」。
   e532 用「系统真值 + 负 bottom 延伸」，同一套规则数学上适配两种视口：
     · 视口=物理屏（viewport-fit=cover 生效）：bottom:-34、height:52+34，
       导航内容恰好占 innerH-52..innerH，多出的 34px 在屏外 → 贴底无缝。
     · 视口=物理屏-34（系统把 fixed 限制在安全区上沿）：多出的 34px 正好填满
       Home 指示条区，导航底色铺到物理最底，下方不再有任何带。
   顶部同理：padding-top 取 env(top)；状态栏半透明时页面背景铺到状态栏下
   （与 theme-color / html 同色），内容从 47px 起不被糊；视口已在安全区内时
   env=0 自然贴顶。env() 全程只用系统真值，绝不再按机型推算。 */
html[data-dev="ios"] {
  /* e535 ② 用户批注「把导航栏的高度上下调得比图标和文字再高一点，
     但要保证图标文字居中」：图标 22px + 3px 间距 + 文字 18px ≈ 43px，
     原 52px 只剩上下各 4.5px，太挤。内容区加到 62px → 上下各 9.5px，
     图标文字仍由 .tb-item 的 align-items / justify-content:center 双向居中。
     --tb-h 由本值推导，.view 的下留白同步跟着变，贴底与全屏底色不变。 */
  --nav-h: 62px;
  /* e533 ★真机根因修复★：这台 iPhone 的 env(safe-area-inset-top) 返回 0，
     但 black-translucent 状态栏仍浮在页面顶部 47px；e532 只认 env 就等于 0 让位，
     页眉整个顶进状态栏被糊。现在改为 max(env 真值, JS 几何实测兜底)：
       · JS 用「物理屏高 - 布局视口高」判断页面是否铺到状态栏下（不依赖 standalone、UA、机型猜测）
       · env 有真值用系统值；env=0 且确实全屏时用几何兜底；Safari 网页模式兜底为 0
       · 用户在「显示适配 → 状态栏让位」可一键强制 0/47/59，覆盖自动值
     底部 --safe-b 保持 e532 原样（只认 env），不动已正常的贴底导航。 */
  --safe-t: max(env(safe-area-inset-top, 0px), var(--ios-safe-top, 0px));
  --safe-b: env(safe-area-inset-bottom, 0px);
  /* 导航整条 = 内容 52 + Home 指示条区；.view 的下留白同步引用，三处恒等 */
  --tb-h: calc(var(--nav-h) + var(--safe-b));
  --radius: calc(16px * var(--ios-fit, 1));
}
/* e534：删除 .view::before 让位区实底。状态栏已由系统独占（meta=black），
   页面视口本就从状态栏下方开始，顶部让位恒为 0，任何额外遮罩都只会变成一条空带。 */
/* 宽松档给内容左右留白（最多 12px），紧凑档贴边；默认档 0px = 原状 */
html[data-dev="ios"] .view {
  /* 只认系统真值：真机 47px 让出状态栏（不被糊），网页模式 0px 自然贴顶 */
  padding-top: var(--safe-t);
  /* e536 ③ ★底部黑块根因★
     .tabbar 用 bottom:-safe-b + height:--tb-h 把 Home 指示条区铺到屏外，
     所以导航「顶边」其实是 innerH - (--tb-h - --safe-b)，而不是 innerH - --tb-h。
     旧值 var(--tb-h) 多让了一整个 safe-b（这台真机 34px），内容底边比导航顶边
     高 34px → 「答案已锁定」哈希栏下方凭空多出一条 34px 纯色黑块，整页被往上挤。
     实测（390×844，注入 safe-b=34）：旧值 padBottom=96、gap=34；
     新值 padBottom=62、gap=0。改为只让出「导航内容区」高度，内容底边恰好落在
     导航顶边，任何 env 真值 / 网页模式 0 / 横屏矮屏 46px 档都数学恒等贴合，
     既不会留缝，也不会被导航盖住。 */
  padding-bottom: calc(var(--tb-h) - var(--safe-b));
  padding-left: var(--ios-pad, 0px);
  padding-right: var(--ios-pad, 0px);
}
html[data-dev="ios"] .tabbar {
  /* 关键：负 bottom 让导航底色向下延伸进 Home 指示条区，铺到物理最底 */
  bottom: calc(-1 * var(--safe-b));
  height: var(--tb-h);
  padding-bottom: var(--safe-b);
}
html[data-dev="ios"] .tabbar .tb-item {
  /* e535：栏高加到 62px 后，图标与文字整体继续在栏内垂直 + 水平居中 */
  align-items: center;
  justify-content: center;
}
/* e534：极端情况下 iOS 把 fixed 限制在安全区上沿时，向下再铺 60px 同色底。
   因为全站已统一为 #0f1622，这段不会再表现为「异色带」，只负责盖掉任何露底。 */
html[data-dev="ios"] .tabbar::after {
  content: '';
  position: absolute;
  left: 0; right: 0; top: 100%;
  height: 60px;
  background: #0f1622;
  pointer-events: none;
}
/* e531 已删除 .view::before（47px 实底遮罩）与 .tabbar::after（80px 同色铺底）：
   前者颜色与页面主体不一致，本身就是一条顶部色带；后者在异常窗口会露出黑块。
   e532 保持删除，改由「全站同色 + 负 bottom 延伸」从根上消除色带。 */
/* 文字缩到 0.90 档时 1rem 只有 15.3px，而 iOS 输入框 <16px 会触发整页自动放大。
   这里把所有断点里出现过的输入框选择器都列举一遍（优先级压得住），统一顶到 16px。 */
html[data-dev="ios"] input,
html[data-dev="ios"] select,
html[data-dev="ios"] textarea,
html[data-dev="ios"] .chip-custom,
html[data-dev="ios"] .pf-card .field input,
html[data-dev="ios"] .login-card input,
html[data-dev="ios"] .pf-name-editor input { font-size: max(1rem, 16px); }

/* ② 鸿蒙：UA 常带 Android，识别已在 GFS_FIT.detectDev 里优先于安卓处理。
   专项解决三件事：系统字号自动放大、手势条安全区、鸿蒙系统字体与状态栏。 */
html[data-dev="harmony"] {
  /* 鸿蒙手势导航条比 iOS 略高：env 正常时取真值，报 0 时至少留 8px，异常大值封顶 50px */
  --tb-h: calc(58px + min(max(env(safe-area-inset-bottom, 0px), 8px), 50px));
  --tb-lift: 4px; /* 导航内容多避让一点，不压到手势条 */
  font-family: "HarmonyOS Sans SC", "HarmonyOS Sans", "Huawei Sans", system-ui,
    -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  /* 华为浏览器/ArkWeb 会按系统「字体大小」把网页文字再次放大，锁死 100% 才不爆字 */
  -webkit-text-size-adjust: 100% !important;
  text-size-adjust: 100% !important;
}
/* 部分鸿蒙机型未开 viewport-fit=cover 时 env(safe-area-inset-top) 报 0，
   内容会顶进半透明状态栏；给 8px 兜底，刘海机型仍取系统真值 */
html[data-dev="harmony"] .view {
  padding-top: max(env(safe-area-inset-top, 0px), 8px);
}
/* 横屏矮屏（≤460px 高）原本就把导航栏压到 46px，这里必须跟着用 46px 基准，
   否则默认档会被上面 58px 的规则顶回去、横屏底部凭空多出 12px（真渲染抓到过）。 */
@media (max-height: 460px) and (orientation: landscape) {
  html[data-dev="ios"] {
    --tb-h: calc(46px * var(--ios-fit, 1) + var(--safe-b));
  }
  html[data-dev="harmony"] {
    --tb-h: calc(46px + min(max(env(safe-area-inset-bottom, 0px), 8px), 50px));
    /* 横屏刘海在侧边，顶部不需要 8px 兜底，交回系统真值 */
  }
  html[data-dev="harmony"] .view { padding-top: env(safe-area-inset-top, 0px); }
}

/* ④ 安卓：不靠固定高度撑导航栏，恢复原来高度。
   白块问题靠 html 深色背景兜底（已在 html/body 加 background-color:#080b11）。
   Chrome PWA 的 env(safe-area-inset-bottom) 会自动返回手势条高度。 */
html[data-dev="android"] {
  --tb-lift: 0px;
}

/* ③ 个人中心「显示适配」卡片（复用声音设置的 .sound-row / .slider 栅格；e338 删掉了字号预览示例卡） */
.fit-dev { font-size: 0.75rem; color: var(--muted); margin: 2px 0 12px; }
.fit-list { display: flex; flex-direction: column; gap: 14px; }
/* e310：作者样式 display:flex 会盖掉 UA 的 [hidden]{display:none}（e307 在 .bp-keys 上踩过），
   不写这条的话安卓 / 鸿蒙端仍会看到苹果专属的滑块，隔离就形同虚设。 */
.fit-list[hidden] { display: none; }

.fit-presets { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.fit-presets button { padding: 8px 2px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 0.75rem; color: var(--muted); background: rgba(255,255,255,.03); }
.fit-presets button.on { border-color: var(--gold); color: var(--gold);
  background: rgba(237,190,76,.12); }
.fit-readonly { font-size: 0.7813rem; line-height: 1.7; color: var(--muted); }
.fit-readonly b { color: var(--gold); }
/* e533：状态栏让位手动档（只 iOS 显示）。五档按钮与上方预设同宽，视觉一致 */
.fit-safe-row { margin-top: 2px; padding-top: 12px; border-top: 1px solid var(--line); }
.fit-safe-head { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 8px; font-size: 0.8125rem; color: var(--ink); }
.fit-safe-row .fit-presets button { font-size: 0.6875rem; }
.fit-safe-row .hint { line-height: 1.55; }

/* ── e331 全站显示排查的收尾修复（用 390×900、DPR4 真页面逐视图量墨迹得出） ── */
/* ① 自定义下注输入框的占位符被裁字：窄屏 .chip-custom 宽 52px、padding 4px 7px
   → 内容盒只有 38px，而 ::placeholder 是 0.8125rem(13.81px) × 3 个汉字 = 41.4px，
   截图里第三字被右边界切掉半个。字号收到 0.72rem(12.24px)×3=36.7px 并收窄内边距，
   360 / 390 / 430 三个宽度都不再裁字，输入的数字本身字号不变。 */
.chip-custom { padding-left: 3px; padding-right: 3px; }
.chip-custom::placeholder { font-size: 0.72rem; }

/* ── e333 全站「文字在输入框 / 胶囊里没有垂直居中」的根治 ────────────────────
   用户 181317 截图批注「文字在胶囊中显示偏移靠下了」，量的是房间聊天输入框；
   顺着把全站同类框（开房弹窗、大厅搜索、客服弹窗、充值换算、下注自定义、
   提现/资料/改密表单、登录、昵称编辑）逐块用 390×900、DPR 4 渲染再逐像素量墨迹，
   确认这是同一个成因，不是谁的内边距写错：

   输入框里单行文字的行盒由「输入框自身字号」决定（行高 normal），而灰字占位符
   被 e322 / e326 统一收小到 0.6875rem（≈11.7px）。两者共用同一条基线：
   小字号的墨迹只占到行盒下半截，于是占位符的墨迹中心天生比框中线低 0.4~1.9px；
   内容盒比行盒高的框（.field input 这类 42px 高、内容盒 20px）还会再低一截。
   眼睛看到的就是「字贴着胶囊下沿」。

   办法不动字号、不动框高：只在「空着、显示占位符」这一态把上下内边距对调一个
   补偿量（两者之和 = 原纵向内边距之和），框的高度、圆角、与同行按钮的相对位置
   全部不变，只是把占位符挪回正中；一旦输入内容就自动回到原内边距，正文位置不动。
   补偿量 = 实测偏移（方向为上内边距减、下内边距加），括号内是修前偏移。

   修后实测（390×900、DPR4、逐块量墨迹中心 vs 框中线）：聊天输入框 -0.25px（框高仍 34）、
   开房弹窗 0.00px、客服白底输入框 -0.12px、.field 表单 +0.38px、资料卡表单 +0.25px
   （.field 空态框高 43px，与修前一致）；开房弹窗那行因 flex 撑高多了 2px，属弹窗内局部、
   不影响任何功能。剩下几处本来就在 0.5px 以内（下注「自定义」0.5、大厅搜索 0.38、
   登录 / 昵称 0.38、提现「全部提现」按钮 0），已低于半个像素，肉眼量测都判为居中。 */

/* 房间聊天输入框「和房间里的朋友聊聊…」（本次反馈的那一处，修前 +0.75px） */
.rc-text:placeholder-shown { padding-top: 6.25px; padding-bottom: 7.75px; }

/* 开房 / 房东设置弹窗的输入框（修前 +1.00px） */
.hs-input-row input:placeholder-shown { padding-top: 8.5px; padding-bottom: 11.5px; }

/* 客服弹窗（白底主题）输入框（修前 +0.88px；深色主题本来就只差 0.12px，不动） */
.modal-box.is-support .chat-input input:placeholder-shown { padding-top: 10.1px; padding-bottom: 11.9px; }

/* 提现 / 开房表单等 .field 输入框：空态修前 +1.88px，有内容时 +0.62px。
   这类框是 42px 高、内容盒 20px，行盒只有 17.8px 富余被压在下沿，偏得最多。 */
.field input:placeholder-shown { padding-top: 9.7px; padding-bottom: 12.3px; }

/* 个人资料卡里的 .field 输入框（纵向内边距是 9/11，不同于上面那组）：空态 +2.75px，有内容 +0.88px */
.pf-card .field input:placeholder-shown { padding-top: 8px; padding-bottom: 12px; }
/* ── e334 四门卡「我 X」与大王圆卡的整块对齐 ──────────────────────────────
   用户 184006 / 185738 两张截图：①「大王两个字和图案也没水平居中」②「整个卡片
   布局完全不协调」③红框「我字和数字都是有点偏移不水平一线居中」。

   量出来的事实（390×900、DPR4、逐元素裁图量墨迹 bbox 中心）：
   · 四门卡两段行里「我」的墨迹中心比数字高 1.09px（--mine-opt 的 -0.8px 反向过头），
     单段胶囊里也高 0.81px —— 所以两种形态都像「我」浮在数字上头一点，不在一条中线。
   · 大王圆卡：卡片盒是居中的，但 🃏 的墨迹（28.5px 高，比盒高 3px）中心比「大王」
     二字高 1.2px，看着就是一高一低；底部「我 X」「已选 Y」两行各自居中、标签却
     挂在左边不同距离上，两个数字因此不落同一根竖轴上，整块左沿参差。

   改法（只动几何，不动字号/结构/交互）：
   ① --mine-opt 归零（单段胶囊的墨迹中线本来就差 0.01px），两段行单独取 +0.3px
      —— 两段行的标签字号 0.82em 比单段的 0.88em 小，光学校正量不同，必须分开给。
   ② 大王圆卡底部两行改成「数字压中线 + 标签右对齐贴在一根竖线上」：每行是相对定位的
      块、数字只在行内参与居中，标签绝对定位到 right:100%（宽度固定 20px 右对齐），
      于是「我」「已选」的右边缘永远落在同一条竖线、左沿也等宽，两个数字（连同上方
      累计数额）全部落在圆卡中轴上。（先试过 right: calc(50% + Npx) 让标签各自居中，
      但「我」1 字与「已选」2 字宽度不同，两行标签右沿差 3.00px，所以改成固定列宽右对齐。）
   ③ 🃏 的 top 由 -0.5px 改到 +0.7px，把它的墨迹中心落到「大王」二字的中线上（差 0.09px）；
      位图 emoji 的墨迹比 em 盒窄、左沿天生空档，整组再按墨迹左移 2.3px，
      圆内左右留白由 26.25 / 21.64 变成各 24.0。 */

/* ① 两段行 / 单段胶囊的标签光学校正量 */
.suit-mine { --mine-opt: 0px; }
.suit-mine.flow { --mine-opt: 0px; }

/* ②③ 大王圆卡底部 / 中间的旧版式（两段竖排 + 标签绝对定位悬挂 + 🃏 emoji 的 top/位移补偿）
   已在 e336 全部作废：圆卡中间行换成纯 CSS 横卡，底部改成「我 X · 已选 Y」装进同一枚胶囊，
   具体规则集中在文件末尾的 e336 块（搜索「e336 大王圆卡：纯 CSS 横卡图标」）。 *//* ── e335 托管设置：两个动作按钮并排一行 + 新增「开奖倒计时」卡 ──────────────
   .host-acts 本来就是 flex + wrap、.btn 默认 flex:1 1 44%，但「关闭托管」和
   「批量预设结果」原本分在两个 .host-acts 容器里，各自独占一整行。并进同一个
   容器后两者各占一半。字号保持 .host-acts .btn 的 0.875rem 不缩小（用户此前明确
   否决「把字改小」）；「批量预设结果（剩 158 局）」共 15 字在 360px 的半个按钮
   （145px 内宽）里一行放不下（0.875rem 下实宽 178px），拆成主标题 + 副行两排，
   左右内边距收到 6px，实测 360/390/430 三档 scrollWidth === clientWidth 无溢出。 */
.modal-box.is-host-settings .host-acts-pair { margin-bottom: 10px; }
.modal-box.is-host-settings .host-acts-pair .btn {
  flex: 1 1 0;
  min-width: 0;
  padding: 0 6px;
  /* 字号沿用 .host-acts .btn 的 0.875rem，不缩小（用户此前明确否决「把字改小」） */
  line-height: 1.2;
  white-space: normal;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
}
/* 「批量预设结果（剩 158 局）」在 360px 的半个按钮宽（145px）里放不下一行，
   拆成主标题 + 一档次行：主行 6 字 78px、副行「剩 158 局」约 73px，两行都在 145px 内。 */
.modal-box.is-host-settings .host-acts-pair .hs-queue-sub {
  display: block;
  font-size: 0.6875rem;
  font-weight: 400;
  line-height: 1.15;
  color: rgba(255,255,255,.62);
  white-space: nowrap;
}
/* ── e336 大王圆卡：纯 CSS 横卡图标 + 底部「我 X · 已选 Y」同一枚胶囊 ──────────────
   用户连着三条批注：
     · 19:45「红圈中图标目前是竖着摆放的改成横着摆放」+ 手绘目标版图（20× ／ 横卡+大王 ／ 我 200）
     · 19:08 截图「绿色的我和数字还是不在水平线上布局怎么还没修复好」
     · 20:0x「用纯 CSS 画一张横卡，你改的把普通模式里的已选字样去掉了看不到了，
       我和数字没放在一个胶囊显示」
   所以三件事一起做：图标真的画成横卡（不再用 🃏 emoji）、两段都保留显示、
   每段「标签 + 数字」合成一枚胶囊。
   ① 图标：`.joker-ico` 是 26×18 的纯 CSS 卡面（奶白渐变 + 金描边 + 中央菱形 + 两枚角点）。
      🃏 时代为了凑彩色位图的墨迹中轴，e334 打过 top:0.7px 与 translateX(-2.3px) 两个补丁，
      换成真正的盒子后左右天然对称，两个补丁全部作废（见上面 e336 的说明注释）。
   ② 底部：**只保留一枚胶囊**，「我 40」和「已选 10」都装在这一枚里横排同行
      （用户 20:0x「我和数字没放在一个胶囊显示」）。做两枚胶囊（一段一枚、上下排）
      在这个 102px 圆里几何上无解：圆内可用高只有 86px，20×（13）+ 中间行（18）+
      两枚胶囊（37）+ 两道间距已经接近 74px，下面那枚胶囊的**下沿**会落到 dy≈41px，
      该高度的弦长只剩 ±22px，13px 的「已选 10」宽 55px 立刻被金色边圈切掉
      （实测四角余量 −1.22px，换成「已选 5,678」是 −7.66px）。
   ③ 圆卡底部不再单独占一行显示总池（`.amt-mine` 隐藏）；没有任何下注时仍显示总池。
   圆内几何：卡 102px，内边距 8/6、边框 2 → 可用宽 88px、可用高 86px；
   三行合计 20×（13）+ 中间行（18）+ 一枚胶囊（18）≈ 49px，整块垂直居中后
   胶囊中心落在 dy≈20px 处、弦长 ±42px，所以胶囊宽度必须压在 76px 以内。 */
.suit-card.joker .joker-ico {
  flex: 0 0 auto;
  display: block;
  position: relative;
  width: 26px;
  height: 18px;
  border-radius: 3.5px;
  border: 1px solid rgba(237,190,76,.9);
  background: linear-gradient(180deg, #fffdf6, #f6e5c2);
  box-shadow: 0 1px 1.5px rgba(0,0,0,.35), inset 0 0 0 1px rgba(237,190,76,.20);
  /* 盒子中线比「大王」二字的中线高 0.5px（实测 −0.50），下压半像素同线。
     e340：改用 em——「文字整屏适配」把字号放大 1.3 倍时，固定 0.5px 就不再成比例，
     图标和文字会从「齐」变成「歪」，这就是用户说「有时候水平有时候歪」的一半成因。 */
  top: 0.04em;
}
/* e338：用户 20:57 批注「你画的不是大王都是一个方块去了」——牌面中央原来是一个
   旋转 45° 的方块（菱形），26×18 下只会读成「一个方块」。改画一顶金冠（三条尖
   + 一颗红宝石）：冠形是一段 clip-path 多边形，上亮下暗两层金色；宝石是 ::after
   的圆点。冠心落在牌面正中（牌 26×18，冠 15×11 居中，宝石压冠身中线）。 */
.suit-card.joker .joker-ico::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 3.2px;
  width: 16px;
  height: 10.6px;
  margin-left: -8px;
  background: linear-gradient(180deg, #ffe98a, #eeb03a);
  clip-path: polygon(0% 100%, 0% 6%, 27% 52%, 50% 0%, 73% 52%, 100% 6%, 100% 100%);
}
.suit-card.joker .joker-ico::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 7.4px;
  width: 3.6px;
  height: 3.6px;
  margin: 0 0 0 -1.8px;
  border-radius: 50%;
  background: radial-gradient(circle at 33% 27%, #ff9a90, #c02f28 74%);
}
/* 中间行：图标与「大王」横排成组，整组压圆心竖轴（图标是盒子，无需 emoji 的光学位移） */
.suit-card.joker .suit-joker-main { transform: none; gap: 6px; }
/* 三行整块垂直居中 + 固定 3px 行距：交给 space-evenly 等分时底部那行会被推到圆的
   收窄段（dy≈36px 处只剩 ±33px），胶囊会被金色边圈切掉；收紧行距反而让底部行更靠中线 */
.suit-card.joker { justify-content: center; gap: 3px; }
/* 「我 X」与「已选 Y」合在**同一枚胶囊**里（用户 20:0x「我和数字没放在一个胶囊显示」）：
   胶囊底色/描边直接画在 .suit-mine 上，两段是它的两个子元素；圆卡里两段一律横排同行，
   两段都在时字号降一档（见下面的 .flow）。 */
.suit-card.joker .suit-mine {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 2px;
  width: auto;
  padding: 1px 6px;
  border-radius: 999px;
  background: rgba(111,217,168,.13);
  border: 1px solid rgba(111,217,168,.30);
  white-space: nowrap;
  /* e341：76px 上限会让「我 3,500 · 已选 200」这类两段金额贴着圆角、看着像溢出胶囊
     （用户 22:5x：「字…切溢出胶囊外」）。胶囊自身会跟着文字撑开，76 压不住它，
     真正的上限应取圆内可用宽度：圆卡 102px 减去左右各 6px 内边距 ≈ 90，留 2px 安全线取 88。
     JS 判定仍是「真溢出才收紧」，不会再把第二段删掉。 */
  max-width: 90px;
  /* e343：用户 00:11「这个100文字有点胖和其他我中的数字不协调」。
     真渲染实测：圆卡胶囊 13.8125px / 字重 600，四门卡胶囊 12.75px / 字重 400，
     字号大 1.06px、字重多 200 —— 「胖」主要是这 200 的半粗体。
     统一到四门卡同款（0.75rem / 400）；圆内更小一号反而更宽松，不会溢出金圈。 */
  font-size: 0.75rem;
  line-height: 1.2;
  font-weight: 400;
  min-height: 0;
  /* e339：用户 21:39「在一个框中我和数字怎么排列又倾斜又是歪的」——标签 0.8em 时墨迹
     本来就比数字矮一截，再叠 -0.3px 上提就浮起来了。标签字号提到 0.9em、校正量归零，
     两者按盒中线对齐后，DPR8 分色测墨迹「我」的中心仍低 0.88px，补偿 -0.8px */
  /* e340：同样改成相对量。-1.2px 是在 12.75px 基准字号下测出来的，
     字号被缩放面板放大/缩小后比例就不对了；-0.105em 恒等于标签自身字号的 10.5%。 */
  --mine-opt: -0.03em;
}
/* 两段（我 + 已选）同时出现时必须显式回到 row：e334 给 `.suit-mine.flow` 写过
   「竖排两行」的规则（0,3,0），会压过上面这条同名的 0,2,0 规则。
   字号降到 10.5px 且左右内边距收到 4px：13px 下一整行 73.88px，落在 dy≈20px 处、
   圆内弦长只有 ±42px，胶囊四角会顶出金圈（实测余量 −0.9px）；10.5px + 左右 4px + gap 2px
   后实测 70.30px（我 40 · 已选 10，四角余量 3.37px）/ 73.56px（我 100 · 已选 20，余量 2.34px），
   四位数两段（我 2,000 · 已选 5,678 约 99px）几何上不可能塞进这个圆，交给 JS 兜底。 */
.suit-card.joker .suit-mine.flow {
  flex-direction: row;
  gap: 2px;
  font-size: 0.65625rem;
  padding-left: 4px;
  padding-right: 4px;
}
/* 胶囊里标签入流跟着数字走，压掉 e320/e331 的「悬挂 + 绝对定位 20px 列宽」两版规则 */
.suit-card.joker .suit-mine .mine-part,
.suit-card.joker .suit-mine.flow .mine-part,
.suit-card.joker .suit-mine:not(.flow) .mine-part {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  text-align: left;
}
.suit-card.joker .suit-mine .mine-tag,
.suit-card.joker .suit-mine.flow .mine-tag,
.suit-card.joker .suit-mine:not(.flow) .mine-tag {
  position: static;
  right: auto;
  top: auto;
  left: auto;
  width: auto;
  margin: 0;
  text-align: left;
  font-size: 0.9em;
  /* e343：标签也回到常规 400（四门卡标签就是 400），否则「我」比「100」还粗 */
  font-weight: 400;
  color: #6fd9a8;
  opacity: .95;
  transform: translateY(var(--mine-opt));
}
/* 胶囊里两段靠 2px 间距隔开就够了，不再放分隔点（每个字符都在挤圆内的弦长）；
   分隔点只在四门卡（非圆卡）保留，规则在文件前半段 */
.suit-card.joker .suit-mine .mine-sep,
.suit-card.joker .suit-mine.flow .mine-sep { display: none; }
/* e342：用户批注「自己下注了遮盖了别人下注的数字，看不到别人下注多少了」。
   真因：原来有「我 / 已选」时把 .suit-total（本门总下注，含别人下的注）直接 display:none，
   圆卡里只剩自己的胶囊 → 别人下注多少彻底看不见。真渲染实测：总池「200」被隐藏、h=0。
   现在总池始终显示，与胶囊上下同处底部固定高度区（上：金色总池 / 下：绿色「我·已选」），
   高度恒定 24px，不因有无下注而变，e339 的「固定行高防上下跳动」继续成立。 */
.suit-card.joker.amt-mine .suit-total { display: block; }
.suit-card.joker.amt-mine .suit-joker-amt { min-height: 24px; }
/* 空胶囊不能 display:none：那样底部行只剩一行，总池会往下掉 ~6px，切局时上下跳（e339 的坑）。
   保留盒高但整体隐形，总池无论有无下注都钉在第一行同一位置。 */
.suit-card.joker .suit-mine:empty { display: flex; visibility: hidden; min-height: 11px; }
/* ── e338 圆卡上两块上抬 + 四门卡「我 / 已选」合并成一枚胶囊 ───────────────
   用户 20:57 批注（205742）：
     ·「这里 20x 和图标和大王可以适当往上调上去一点，让在圆内显得更新布局协调美观」
     ·「好像大王图标和大王两个文字没有水平居中」（图标原先是斜向渐变 + 一个偏右的
        菱形，视觉重心偏，看着就不在一条横轴上；换成正中对称的金冠后既不是方块、
        整组也严格压圆心竖轴）
     ·「这些也像大王卡片中一样都做一个胶囊里面才确保文字和数字都能水平居中，
        然后字体还可以适当再调大一点点」（指四门卡的「我 X · 已选 Y」） */
/* ① 圆卡三块整体上抬。用相对定位而不是改 padding：78px 横屏圆卡、106px 竖屏
   圆卡都吃同一条，内边距与既有断点规则一个字都不用动。
   e339：用户 21:39 又说「布局 20x 和大王和图标还要往上调整往上移一点」，3px → 6px。
   三块同抬，两道 3px 间距保持不变；102px 圆卡实测上留白 18.91→15.91、下留白 24.91→21.91。 */
.suit-card.joker > .suit-odds,
.suit-card.joker > .suit-joker-main,
.suit-card.joker > .suit-joker-amt { position: relative; top: -6px; }
/* ② 四门卡：胶囊画在 .suit-mine 自己身上，两段横排装进同一枚胶囊（与圆卡同构）。
   字号由断点里的 0.5938rem(10.1px) 提到 0.75rem(12.75px)（用户要「再调大一点点」）。
   实测 360~430px：卡片内容宽 169px，「我 20 · 已选 10」整枚 96.4px，
   四位数「我 2,000 · 已选 5,678」132.4px，都装得下，不会顶到卡片边。 */
.suit-card:not(.joker) .suit-mine {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  gap: 3px;
  width: auto;
  max-width: 100%;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(111,217,168,.13);
  border: 1px solid rgba(111,217,168,.30);
  font-size: 0.75rem;
  line-height: 1.25;
  white-space: nowrap;
}
/* 压掉 e332 给单段写的「.mine-part 自带小胶囊」：胶囊现在只有外层一枚 */
.suit-card:not(.joker) .suit-mine .mine-part,
.suit-card:not(.joker) .suit-mine.flow .mine-part,
.suit-card:not(.joker) .suit-mine:not(.flow) .mine-part {
  position: static;
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  white-space: nowrap;
}
.suit-card:not(.joker) .suit-mine .mine-tag,
.suit-card:not(.joker) .suit-mine.flow .mine-tag {
  position: static;
  right: auto;
  top: auto;
  left: auto;
  width: auto;
  margin: 0 2px 0 0;
  text-align: left;
  font-size: 0.92em;
  transform: translateY(var(--mine-opt));
}
.suit-card:not(.joker) .suit-mine .mine-sep,
.suit-card:not(.joker) .suit-mine.flow .mine-sep { margin: 0 1px; opacity: .45; }
/* ③ 显示适配面板：两个滑块标签变长（文字整屏适配 / 底部导航），第一列放宽 8px，
   否则 6 个汉字会顶到滑块上 */
.fit-list .sound-row { grid-template-columns: 92px minmax(0, 1fr) 54px; gap: 10px; }

/* ══ e339 圆卡三行固定行高：不再因为内容增减整体上下跳 ══════════════════════════════
   用户 22:02 批注（局部截取_20261107_220258）：「这个有时候会上下移位跳动，包括绿色
   我和数字都是会上上下跳动，是不是有副局代码重复干扰了是不是有多个代码布局请检查」。

   真因（不是"重复规则谁压谁"，是行高会变）：
   e336 给圆卡写的是 `justify-content: center; gap: 3px`，三行高度此前全是内容撑出来的：
     · .suit-odds          —— 13px/16.8px（随断点字号变）
     · .suit-joker-main    —— 18px（固定）
     · .suit-joker-amt     —— 有「我/已选」时 min-height:0（17.4px，只有胶囊）；无下注时
                              min-height:22px 且要多显示一行总池；.amt-mine 又把 total 隐藏
   于是「我 540」出现 / 已选出现 / 总池切换的那一帧，三行总高变化，居中就重新算一遍 →
   中间行（图标+大王）和底部胶囊一起上下窜。这不是两条规则打架，是容器在跟着内容重排。
   修法：三行各钉死行高，居中位置就再也不变；里层内容自己做垂直居中。
   e342：底部行为了同时容纳「金色总池 + 绿色我/已选胶囊」，由 18px 抬到 24px，
   总高随之恒等于 17+3+18+3+24=65px（仍远小于最小圆卡 78px）；三行依旧全部钉死，不跳动。 */
.suit-card.joker { justify-content: center; }
.suit-card.joker > .suit-odds { height: 17px; box-sizing: border-box; }
.suit-card.joker > .suit-joker-main { height: 18px; box-sizing: border-box; }
.suit-card.joker > .suit-joker-amt,
.suit-card.joker.amt-mine > .suit-joker-amt {
  /* e343：24px 装不下「金色总池 12.8px + 胶囊 19.9px = 32.7px」，flex 默认会
     把胶囊压到 11.25px —— 真渲染截图里「我 100」整个字顶出胶囊上下边框。
     抬到 32px 并禁止子项收缩，胶囊恢复完整圆角与上下内边距；仍是固定行高，
     e339 的「三行钉死防上下跳动」继续成立（有无下注高度都一样）。 */
  height: 32px;
  min-height: 32px;
  justify-content: center;
}
.suit-card.joker > .suit-joker-amt > * { flex-shrink: 0; }
.suit-card.joker > .suit-joker-amt .suit-mine { min-height: 0; }

/* ══ e340 圆卡两段超长：不再静默砍掉「已选」 ══════════════════════════════════════
   用户：「普通模式里『已选』看不到」「有时候显示有时候点击一下就不显示了」。
   真因不是几何无解，是 app.js 在**字体还没加载完**时量 scrollWidth（字体未就绪时
   数字量出来更窄，同一状态下两次渲染结论不同）→ 一帧有两段、下一帧被删掉，看起来
   就是「有时候有、点一下就没了」。
   现在 JS 只在 document.fonts.status === 'loaded' 之后才判定，且超宽时**不删内容**，
   只按两级收字号 + 放宽胶囊上限（102px 圆里下注行所在高度的弦长约 96px）。 */
.suit-card.joker .suit-mine .mine-num,
.suit-card.joker .suit-total,
.suit-card.joker .suit-odds { font-variant-numeric: tabular-nums; }

/* e341：两段金额（我 2,000 · 已选 5,678）在 102px 圆里一行塞不下时，
   不再靠压字号硬挤（收到 9px 之后文字会贴死胶囊圆角，用户 22:5x 判为「切溢出胶囊外」），
   改成**同一枚胶囊内换两行**：字号保持原样、左右各留 7px、绝不删段。
   命中时底部那行高度从 18px 抬到 25px，由 app.js 同步给 .suit-joker-amt 加 wrap2 类。 */
.suit-card.joker .suit-mine.wrap2 {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0;
  white-space: normal;
  max-width: 88px;
  padding: 1px 7px;
  line-height: 1.18;
}
.suit-card.joker .suit-mine.wrap2 .mine-part { display: flex; justify-content: center; }
.suit-card.joker .suit-mine.wrap2 .mine-sep { display: none; }
/* e342：超长金额换两行时，底部行还要再容纳上面那行金色总池（12px），25px 不够 → 36px。 */
.suit-card.joker.amt-mine > .suit-joker-amt.wrap2 {
  height: auto;
  min-height: 36px;
}

/* ══ e342 绿色框（20× + 大王）整体上移 + 与上方金色圆弧留间隙 ════════════════════
   用户 00:07 批注：「红框中绿色框中整体往上移动一点，20x 和上圆弧内线不要挨到一起
   就可以，留有适当的间隙」。绿色框 = 圆卡内「20× 徽标 + 皇冠/大王横排」这两块。
   用 transform 而不是改 padding/gap/行高：
     · 不改变任何行盒高度 → e339 的三行固定行高（防上下跳动）完全不受影响；
     · 上移 2px 后与下方「总池 / 我·已选」拉开，圆内上两块更紧凑、层次更清楚；
     · 20× 顶边距圆卡上边真渲染实测 15.5px（102px 圆卡）/ 22.5px（116px），
       上移 2px 后仍有 13.5px / 20.5px，远大于 8px 安全线，不会与金色圆弧内线粘连。
   想再微调只改下面这一处数字即可（负值=上移，正值=下移）。
   e343：底部行由 24px 加高到 32px 后，三行整体被居中算法上推约 4px，
     20× 顶距真渲染从 13.5px 掉到 6.5px（贴圆弧了）。把 e342 的 -2px 回调成 +2px
     做补偿，间隙回到 10px 以上；净效果相对 e341 原始布局仍整体上移约 3px，
     e342「绿色框往上、与圆弧留间隙」的诉求继续成立。 */
.suit-card.joker > .suit-odds,
.suit-card.joker > .suit-joker-main { transform: translateY(2px); }

/* ══ e343 横屏矮屏（78px 圆卡）专用收紧 ══════════════════════════════════════════
   78px 圆卡扣掉 padding(4+4) 与描边(2+2) 后内容区只有 66px，
   若沿用竖屏的「17 + 3 + 18 + 3 + 32 = 73px」会溢出 7px。
   横屏本来就该整体小一档：行距归零、底部行收回 24px、总池/胶囊各收 10px，
   内部「总池 10px + 胶囊 12px = 22px < 24px」不再被压缩，三行合计 59px < 66px。 */
@media (orientation: landscape) and (max-height: 540px) {
  .suit-card.joker { gap: 0; }
  .suit-card.joker > .suit-joker-amt,
  .suit-card.joker.amt-mine > .suit-joker-amt { height: 24px; min-height: 24px; }
  .suit-card.joker .suit-total { font-size: 0.625rem; line-height: 1; }
  .suit-card.joker > .suit-joker-amt > .suit-mine {
    font-size: 0.625rem; line-height: 1; padding-top: 0; padding-bottom: 0;
  }
}

/* ══ e344 安卓端整体文字小幅收紧 ══════════════════════════════════════════════
   用户 00:21「要不安卓字体文字在整体调小那么一点点看看效果是不是很多地方都会更协调」。
   只在 html[data-dev="android"] 上生效：17px → 16.5px（约 -3%，"那么一点点"）。
     · 苹果端走 GFS_FIT 的 de.style.fontSize 内联样式，优先级更高且 data-dev="ios"，
       不会被这条命中；鸿蒙 data-dev="harmony"、桌面 "other" 也都不受影响。
     · 圆卡直径 --joker-d、卡片 min-height 等是固定 px，内容用 rem → 缩 3% 后
       留白反而更宽松，不会挤压牌桌几何（真渲染 320~430px 已验）。
     · 想回退或再调：只改这一处数字（17px = 恢复原样）。 */
html[data-dev="android"] { font-size: 16.5px; }

/* ══ e345 四门卡下注数字组：整组上移 + 黄/绿两行收紧 ═══════════════════════════
   用户 01:46 批注（局部截取_20261108_001641）：四个红框分别圈住每张门卡的
   「黄色本门总下注（含别人下的注）+ 绿色我 X 胶囊」，批注：
     「红色框的这些布局都分别协调的往上移动那么一点点，
       黄色别人下注的数字和我数字可以稍微在紧凑一点点」。

   用 transform 而不是改 padding / gap / margin（与 e342 同一套做法）：
     · 不改任何行盒高度 → e317 的 auto margin 居中、e339 的固定行高防跳动、
       各断点写死的 min-height / padding / font-size 全都不受影响；
     · 四张卡结构完全相同，同一个 transform 天然「分别协调」一致，
       真渲染 320~430px 六视口四卡 top 极差 0px；
     · 用 :not(.joker) > 直接子选择器，圆卡里同名的 .suit-total / .suit-mine
       （包在 .suit-joker-amt 里）一律不命中，e342/e343 圆卡布局原样保留。

   数值（相对 e344 基线，17px 根字号）：
     · .suit-total -3px：黄色数字上移 3px，与上方花色名行盒间距 6 → 3px（竖屏）
       / 8 → 5px（横屏），墨迹仍留约 5~7px，不粘连；
     · .suit-mine  -5px：比黄字多上移 2px，两行 flex gap 4px 视觉收紧到 2px；
       卡片下留白 7 → 12px，数字组重心整体上抬，正是批注要的「往上一点点」。
   想再微调只改下面两个数字（负值 = 上移；两者差值 = 两行净间距 4px - 差值）。 */
.suit-card:not(.joker) > .suit-total { transform: translateY(-3px); }
.suit-card:not(.joker) > .suit-mine  { transform: translateY(-5px); }

/* ══ e347 声音设置：开关行的「开 / 关」贴近胶囊开关 ══════════════════════════
   用户 01:52 批注（局部截取_20261108_015234）：红框圈住「游戏音效」行，
   「把开字贴近胶囊开关」。原 .sound-row 是 `84px / 1fr / 54px` 三列，
   开关在第二列最左（justify-self:start）、「开」被推到第三列最右，
   中间空出整条 1fr → 截图里两者隔了 150px 以上。
   现在开关行改用 `84px / auto / 1fr`：第二列只包 46px 的胶囊，
   第三列「开」改左对齐 → 距开关右缘只剩 10px gap，三行开关仍严格同一竖线
   （固定 84px 第一列，不用 max-content，否则每行开关会各歪一点）。
   特异性 0,3,0，能压住窄屏断点里 0,1,0 的 .sound-row 覆盖。 */
.sound-list .sound-row.toggle-row { grid-template-columns: 84px auto 1fr; gap: 10px; }
.sound-list .sound-row.toggle-row .sound-val { text-align: left; justify-self: start; }

/* ══ e348 「我 X · 已选 Y」胶囊溢出时压在大王圆卡上层 ══════════════════════════
   用户 00:38 批注（局部截取_20261108_003804）：2×2 牌桌上，上排两张卡的
   「我 200 · 已选 200」「我 100 · 已选 200」两排文字：
     「这两排在选择已选下注的时候溢出被大王卡牌遮挡了，
       把这个数字调整成溢出时候显示在大王卡牌上层」。

   真因不是文字真的「溢出卡片」——.suit-card 自带 overflow:hidden，
   而是圆卡覆盖层压在四卡内角上：
     · .suit-grid::after  圆槽盘  z-index 4（比圆卡大 4px，最先吃掉文字末位）
     · .suit-grid::before 缝合线  z-index 5 / .joker-seam z-index 5
     · .suit-card.joker   圆卡本体 z-index 5
   胶囊是 .suit-card 的子元素，父级 position:relative + z-index:auto 不建层叠
   上下文，所以只要给胶囊自己 position:relative + z-index:6，就能在同一层叠
   上下文里越过上述全部覆盖层，文字与胶囊底都完整露出来。

   为什么用 6：5 是覆盖层最高值（圆卡 / 缝线 / 金色弧），6 刚好压过它们，
   仍低于模态弹窗(50) / 用户面板(60) / toast(100)，不会冒到弹窗上面。
   `:not(.joker)` 排除圆卡内部同名的 .suit-mine（它要继续待在圆卡里）；
   单段「我 X」短胶囊不碰圆卡，提层后视觉零变化，所以不按 .flow 限定——
   任何数字（含单段大额）伸到圆卡下面时都会自动显示在上层。

   实测（Playwright + Edge，2×2 + 一行四列多视口）：
     320px 圆盘遮 19.7px / 圆卡遮 14.3px，360px 遮 9.7 / 4.3px，
     390px 遮 2.2 / 0px；提层后所有采样点最上层都是胶囊，圆卡内
     「20× / 大王 / 已选 100」仍完整清晰，无叠字。 */
.suit-card:not(.joker) .suit-mine { position: relative; z-index: 6; }

/* ══ e349 「开局播报」行右侧常驻说明 ═════════════════════════════════════════
   用户 02:46 批注（局部截取_20261108_024658）：红框圈「开局播报」开关，
   「如果关闭该开关时候默认采用嘟嘟两声以提示可以开始下注，然后后面绿框
     添加一个文字说明（关闭默认采用嘟嘟两声）提示」。

   绿框就在该行第三列（e347 改成的 84px / auto / 1fr，第三列原本只有
   一个「开」字，右侧整片是空的）。现在把第三列做成 flex 尾槽：
   「开」不压缩、说明小字可换行，窄屏自动折成两行也不挤出面板。
   字号 0.625rem、淡灰，比主行名弱一档，不与滑块的百分比抢视觉。 */
.sound-list .sound-row .sound-tail {
  display: flex; align-items: center; gap: 8px; min-width: 0;
}
.sound-list .sound-row .sound-tail .sound-val { flex: 0 0 auto; }
.sound-list .sound-row .sound-note {
  min-width: 0; font-size: 0.625rem; line-height: 1.25;
  color: rgba(255,255,255,.46); overflow-wrap: anywhere;
}

/* ══ e351 大厅标题右移 + 房间卡「房主」标识 ═══════════════════════════════
   用户 03:20 批注（局部截取_20261108_032049）：
     ① 绿框「游戏大厅 / 五门竞猜 · 实时开局」整体往右移动一点位置；
     ② 红框房间卡「加一个体现谁是房主，就是该房间是谁开的，私密房也一样添加」。

   ① 用 transform 只做视觉位移，不动 flex 盒：.lobby-head 是 space-between，
      左侧标题与右侧「开房」金钮在 320px 已经换行，改 padding/margin 会挤压
      按钮或让副题 nowrap 溢出；translateX(10px) 两行一起右移，按钮位置不变。
   ② 原 e323 的「开房 昵称」夹在「庄家 / 赔率 / 底注」一串数字里，容易被
      读成开房数量，改成明确的「房主 昵称」金色小胶囊（CSS 圆点 + 浅金底），
      公开房与私密房共用同一个 card() 渲染函数，天然两边都有；房主昵称缺失
      时显示「—」，保证每张卡都有这一项而不是整块消失。 */
.lh-title { transform: translateX(10px); }
/* e362：胶囊原本 display:inline-flex + align-self:center，作为 flex 子项会被
   居中，里面的字比同行其它 span 低 2px（padding 1 + border 1）。改成
   inline-block 后浏览器按「内嵌文字的基线」参与 .rc-meta 的基线对齐，
   字就与「庄家 / 赔率 / 底注」落在同一条水平线上；盒子的 padding、圆角、
   边框、底色全部保留，视觉尺寸不变。圆点从 flex 子项改成 inline-block，
   用 margin-right 代替原来的 gap:4px。 */
.rc-owner {
  display: inline-block; align-self: auto;
  padding: 1px 7px; border-radius: 999px; line-height: 1.4;
  background: rgba(237,190,76,.10);
  border: 1px solid rgba(237,190,76,.30);
  color: var(--gold);
}
.rc-owner::before {
  content: ''; display: inline-block; vertical-align: middle;
  width: 5px; height: 5px; margin-right: 4px;
  border-radius: 50%; background: var(--gold); opacity: .85;
}

/* ══ e352 充值弹窗「付款人姓名」占位符收小 ═══════════════════════════════
   用户 03:22 批注（局部截取_20261108_032219）：红框圈住姓名输入框，
   「这个姓名文字可能稍微偏大了点调整小一点」。

   #rcPayer 是 openRecharge() 里用内联样式生成的、没有类名，e322/e326
   统一全站灰字 / 占位符到 0.6875rem 时漏掉了它，占位符仍继承输入框
   正文的 17px，而同一行「付款人姓名（必填）」标签只有 11.69px。
   只改 ::placeholder 的字号：不动 input 自身 font-size，所以玩家真正
   输入姓名时字号、输入框 39px 高度、与左边金额框的对齐全部不变，
   也不影响 #rcMoney 的数值显示。其它占位符用的也是这个基准。 */
#rcPayer::placeholder { font-size: 0.6875rem; }
/* 占位符字号变小后，input 的行盒仍按正文 17px 排，小字会偏下约 2.75px。
   沿用 e326 的 :placeholder-shown 补偿法：上下 padding 总和仍是 16px
   （输入框高度、与左边金额框的对齐不变），只把内容区上移 2px。
   ★ 这两个 input 的 padding 写在 app.js 的内联 style 里，内联优先级高于
   外部选择器，所以必须 !important；玩家一输入姓名，:placeholder-shown
   立即失效，padding 自动回到内联的 8/8，正文位置不变。 */
#rcPayer:placeholder-shown { padding-top: 6px !important; padding-bottom: 10px !important; }

/* ══ e353 注册页「必须点选才可注册」的法律声明 ═══════════════════════════
   用户 03:31 批注（局部截取_20261108_033105）：注册页面要新增一个
   「点选才可注册」的法律声明：严禁赌博 / 未成年禁止 / 仅限娱乐 /
   任何人私下赌博与本平台无关等系列声明。

   ① 放在推荐码与「注册并进入游戏」之间：声明属于提交动作的前置条件，
      视觉上与按钮同组，不会被当成事后补充说明而忽略。
   ② 复选框默认【不勾】，HTML 里不写 checked；每次从登录页切回注册页
      也会复位，保证每一次注册都是玩家主动点选的结果。
   ③ .login-card input 是「width:100% + 12px padding」的通用样式，
      会命中 checkbox；这里用 #regAgree（ID 优先级）把尺寸、边距、
      边框全部收回来，做成 16px 的金色对勾方钮。
   ④ .login-card label 也会命中这一行，用 .login-card .reg-legal-label
      提权覆盖成正文色 + 无字距；链接放在 label 外，点击只开条款弹窗。
   ⑤ 摘要小字整行水平居中（text-align:center），flex 换行到第二行，
      320px 窄屏下链接自动折行、不横向溢出卡片。 */
.reg-legal {
  display: flex; flex-wrap: wrap; align-items: center; column-gap: 4px;
  margin: 2px 0 14px; padding: 10px 12px;
  border: 1px solid rgba(237,190,76,.24); border-radius: 10px;
  background: rgba(237,190,76,.05);
}
.login-card .reg-legal-label {
  display: inline-flex; align-items: center; gap: 7px;
  min-width: 0; cursor: pointer;
  font-size: 0.6875rem; letter-spacing: 0; color: var(--fg);
}
#regAgree {
  appearance: none; -webkit-appearance: none;
  flex: 0 0 16px; width: 16px; height: 16px;
  margin: 0; padding: 0; border-radius: 4px;
  border: 1.5px solid rgba(255,255,255,.38); background: #0b1119;
  position: relative; cursor: pointer; transition: border-color .15s, background .15s;
}
#regAgree:checked { background: var(--gold); border-color: var(--gold); }
#regAgree:checked::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 5px; height: 9px; border: solid #1a1408; border-width: 0 2px 2px 0;
  transform: rotate(42deg);
}
#regAgree:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.reg-legal-link {
  color: var(--gold); font-size: 0.6875rem; line-height: 1.5;
  text-decoration: none; white-space: nowrap;
}
.reg-legal-link:hover, .reg-legal-link:active { text-decoration: underline; }
.reg-legal-note {
  flex: 1 0 100%; margin: 7px 0 0;
  font-size: 0.625rem; line-height: 1.55; color: var(--muted);
  text-align: center;
}
/* 条款弹窗：正文可滚动，按钮等高并排，长声明不会把弹窗撑出屏幕 */
.reg-legal-doc {
  max-height: 60vh; overflow-y: auto; text-align: left;
  font-size: 0.75rem; line-height: 1.75; color: var(--muted);
}
.reg-legal-doc > p { margin: 0 0 10px; }
.reg-legal-doc h4 { margin: 14px 0 3px; font-size: 0.75rem; color: var(--gold); }
.reg-legal-doc h4:first-child { margin-top: 0; }
.reg-legal-tip {
  margin: 8px 0 0; font-size: 0.625rem; line-height: 1.5;
  color: var(--muted); text-align: center;
}
.reg-legal-actions { margin-top: 14px; }
.reg-legal-actions .btn { flex: 1; }

/* ⑥ 同批注补充：注册界面每个输入栏里的灰色占位文字明显偏大，统一收到全站
   灰字基准 0.6875rem(11.69px)，与上方「账号 / 密码 / 确认密码 / 推荐码」
   标签一致。原占位符继承 input 正文 0.9375rem(15.94px，iOS 17px)，
   比小标签大了一档，看起来像正文。
   ★ 只改 ::placeholder：玩家真正输入时仍是原来的正文字号，
     iOS 防自动缩放的 input{font-size:1rem} 也不动，输入框高度不变。
     登录页两个输入框共用 .login-card input，一起统一。
   ★ 小字落在 17px 行盒里会往下偏约 2px，沿用 e326 / e352 的
     :placeholder-shown 补偿法：上下 padding 各减 / 加 2px，总和不变。
     三个断点的原始 padding 已抽成 --login-inp-py（12 / 11 / 9px），
     calc 会跟随断点自动换算；玩家一输入，:placeholder-shown 立即失效，
     padding 自动回到该断点的原值。 */
.login-card input::placeholder { font-size: 0.6875rem; }
.login-card input:placeholder-shown {
  padding-top: calc(var(--login-inp-py) - 2px);
  padding-bottom: calc(var(--login-inp-py) + 2px);
}

/* ─────────────── e419 好友：列表 + 聊天（全屏页，深色主题） ───────────────
   旧版是一整段内联样式的浅色「微信风」弹窗，和全站深色金调割裂，
   且拒绝按钮没渲染、列表看不到有没有人找你。这里统一改成与大厅同色系：
   深色底 + 金色点缀，头像按昵称散列取色，列表直接带最后一条消息与未读角标。 */
.fr-ov { position: fixed; inset: 0; z-index: 999999; display: flex; flex-direction: column;
  /* e889：好友页独立浅色模板——局部覆盖全局深色变量，子树内所有 var() 跟随白底黑字；
     通话全屏页与看图灯箱挂在 body 上，不在本作用域，保留深色。 */
  /* #268：对齐微信浅模式中性灰（R=G=B，去掉旧版偏蓝灰调）。
     列表/聊天底 #EDEDED，浅分区 #F7F7F7，卡片白，按压/输入底 #F5F5F5，线 #E5E5E5。 */
  --bg: #ededed;
  --bg2: #f7f7f7;
  --panel: #ffffff;
  --panel2: #f5f5f5;
  --line: #e5e5e5;
  --ink: #1a1a1a;
  --muted: #888888;
  background: var(--bg);
  color: var(--ink); padding-top: env(safe-area-inset-top, 0px); }
.fr-pane { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.fr-pane[hidden] { display: none; }

.fr-head { flex: 0 0 auto; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; padding: 10px 12px;
  border-bottom: 1px solid var(--line); background: rgba(255,255,255,.82);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.fr-head > :first-child { justify-self: start; }
.fr-head > :last-child { justify-self: end; }
.fr-hsp { flex: 1 1 0; min-width: 0; } /* e420：左占位（✕ 已去掉，底部有「首页」） */
.fr-hbtn { flex: 0 0 auto; min-width: 40px; height: 36px; padding: 0 10px; border: none; border-radius: 10px;
  background: transparent; color: var(--ink); font-size: 1.0625rem; line-height: 1; cursor: pointer; }
.fr-hbtn svg { width: 23px; height: 23px; display: block; }
.fr-hbtn:active { background: rgba(0,0,0,.06); }
.fr-hbtn-text { font-size: 0.8125rem; color: var(--gold); }
.fr-hmid { flex: 1; min-width: 0; text-align: center; }
.fr-hmid h2 { margin: 0; font-size: 1.0625rem; font-weight: 700; letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-hmid span { display: block; margin-top: 2px; font-size: 0.6875rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.fr-pad { flex: 0 0 auto; padding: 10px 12px 6px; display: flex; flex-direction: column; gap: 8px; }
/* e420：搜索框与添加行合并为一行——一个输入框 + 圆形 ＋ 号按钮 */
.fr-addrow { display: flex; gap: 8px; align-items: center; }
.fr-addrow input { flex: 1; min-width: 0; height: 40px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink); font-size: 1rem;
  outline: none; transition: border-color .15s; }
.fr-addrow input:focus { border-color: rgba(237,190,76,.55); }
.fr-addrow input::placeholder { color: var(--muted); font-size: 0.8125rem; }
.fr-add-btn { flex: 0 0 auto; width: 40px; height: 40px; padding: 0; border: none; border-radius: 50%;
  background: linear-gradient(180deg, #f2ca63, var(--gold-d)); color: #241a02;
  font-size: 1.25rem; font-weight: 700; line-height: 1; cursor: pointer; }
.fr-add-btn:disabled { opacity: .5; }

/* 输入ID后的名片预览：点头像/名字即发申请 */
.fr-lookup { flex: 0 0 auto; }
.fr-lookup[hidden] { display: none; }
.fr-lookup-card { display: flex; align-items: center; gap: 10px; padding: 10px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.fr-lookup-card.clickable { cursor: pointer; border-color: rgba(237,190,76,.35); }
.fr-lookup-card.clickable:active { background: var(--panel2); }
.fr-lookup-add { flex: 0 0 auto; width: 30px; height: 30px; border-radius: 50%;
  border: 1px solid rgba(237,190,76,.5); background: rgba(237,190,76,.14);
  color: var(--gold); font-size: 1rem; font-weight: 700; line-height: 1;
  display: flex; align-items: center; justify-content: center; }
.fr-tip { margin: 0; padding: 0 2px; font-size: 0.6875rem; color: var(--muted); line-height: 1.45; }

.fr-scroll { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 4px 12px 18px; }
.fr-sec { margin-top: 10px; }
.fr-sec[hidden] { display: none; }
.fr-sec h3 { margin: 0 0 6px; padding: 0 4px; font-size: 0.75rem; font-weight: 600;
  color: var(--muted); letter-spacing: .04em; }
.fr-sec h3 em { font-style: normal; color: var(--gold); margin-left: 2px; }

.fr-row { display: flex; align-items: center; gap: 10px; padding: 10px; margin-bottom: 8px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.fr-row[hidden] { display: none; }
.fr-row[data-act="open"] { cursor: pointer; transition: background .12s, transform .12s; }
.fr-row[data-act="open"]:active { background: var(--panel2); transform: scale(.995); }
.fr-row-pend { border-color: rgba(237,190,76,.28); }

.fr-ava { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.125rem; font-weight: 700; color: #fff;
  background: linear-gradient(160deg, hsl(var(--h, 150) 58% 48%), hsl(var(--h, 150) 62% 30%));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18); }
.fr-main { flex: 1; min-width: 0; }
.fr-name { font-size: 0.9375rem; font-weight: 600; color: var(--ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-sub { margin-top: 3px; font-size: 0.75rem; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-side { flex: 0 0 auto; display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.fr-time { font-size: 0.6875rem; color: var(--muted); }
.fr-badge { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red);
  color: #fff; font-size: 0.6875rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center; }

.fr-pend-btns { flex: 0 0 auto; display: flex; gap: 6px; }
.fr-btn { height: 32px; padding: 0 12px; border-radius: 10px; font-size: 0.8125rem;
  font-weight: 600; cursor: pointer; border: 1px solid transparent; }
.fr-btn-gold { background: linear-gradient(180deg, #f2ca63, var(--gold-d)); color: #241a02; }
.fr-btn-ghost { background: transparent; border-color: var(--line); color: var(--muted); }
.fr-btn:disabled { opacity: .45; }

.fr-empty { padding: 62px 24px; text-align: center; color: var(--muted); }
.fr-empty-ic { font-size: 2.5rem; opacity: .5; }
.fr-empty-t { margin: 10px 0 6px; font-size: 0.9375rem; color: var(--ink); font-weight: 600; }
.fr-empty-s { margin: 0; font-size: 0.8125rem; line-height: 1.7; }
.fr-search-empty { padding: 30px 0; text-align: center; font-size: 0.8125rem; color: var(--muted); }
.fr-search-empty[hidden] { display: none; }

/* 聊天 */
.fr-chatpane { position: relative; }
.fr-msgs { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 12px 6px; display: flex; flex-direction: column; gap: 10px; }
.fr-stamp { align-self: center; margin: 4px 0 0; padding: 2px 8px; border-radius: 8px;
  background: rgba(0,0,0,.05); font-size: 0.6875rem; color: var(--muted); }
.fr-msg { display: flex; align-items: flex-start; gap: 8px; }
.fr-msg.mine { justify-content: flex-end; }
.fr-msg .fr-ava { width: 36px; height: 36px; border-radius: 11px; font-size: 0.9375rem; }
.fr-bubble { max-width: 70%; padding: 9px 12px; border-radius: 4px 14px 14px 14px;
  background: var(--panel2); border: 1px solid var(--line); color: var(--ink);
  font-size: 0.9375rem; line-height: 1.5; word-break: break-word; white-space: pre-wrap; }
.fr-msg.mine .fr-bubble { border-radius: 14px 4px 14px 14px; color: #2a1d02; font-weight: 500;
  background: linear-gradient(180deg, #f3ce6b, #dfae38); border-color: rgba(0,0,0,.06); }
.fr-chat-empty { margin: auto; text-align: center; color: var(--muted); font-size: 0.875rem; line-height: 1.8; }
.fr-chat-empty span { font-size: 0.75rem; opacity: .8; }
.fr-newmsg { position: absolute; left: 50%; transform: translateX(-50%); bottom: 72px; z-index: 6;
  padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px;
  background: var(--panel); color: var(--gold-d); font-size: 0.75rem; cursor: pointer;
  box-shadow: 0 6px 18px rgba(0,0,0,.15); }

.fr-inbar { flex: 0 0 auto; display: flex; align-items: center; gap: 8px;
  padding: 8px 12px; /* e420：底部安全区交给 .fr-foot 处理 */
  border-top: 1px solid var(--line); background: var(--panel); }
.fr-inbtn { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
  display: flex; align-items: center; justify-content: center; padding: 0;
  font-size: 1.125rem; line-height: 1; cursor: pointer; }
.fr-inbar input { flex: 1; min-width: 0; height: 38px; padding: 0 12px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel2); color: var(--ink);
  font-size: 1rem; outline: none; transition: border-color .15s; }
.fr-inbar input:focus { border-color: rgba(237,190,76,.5); }
.fr-send { flex: 0 0 auto; height: 38px; padding: 0 16px; border: none; border-radius: 12px;
  background: linear-gradient(180deg, #f2ca63, var(--gold-d)); color: #241a02;
  font-weight: 700; font-size: 0.875rem; cursor: pointer; }

.fr-emoji { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 2px; padding: 8px;
  background: var(--panel); border-top: 1px solid var(--line);
  max-height: 34vh; overflow-y: auto; }
.fr-emoji[hidden] { display: none; }
.fr-emoji button { background: none; border: none; font-size: 1.25rem; padding: 5px 2px;
  border-radius: 6px; cursor: pointer; line-height: 1; }
.fr-emoji button:active { background: rgba(0,0,0,.08); }

/* 底部操作单（长按/更多） */
.fr-sheet-mask { position: absolute; inset: 0; z-index: 20; display: flex; align-items: flex-end;
  background: rgba(0,0,0,0); transition: background .18s; }
.fr-sheet-mask.show { background: rgba(0,0,0,.55); }

/* #267：三点菜单统一居中白底卡片（参照群成员面板） */
.fr-card-mask { position: absolute; inset: 0; z-index: 30; }
.fr-card-mask.show { background: rgba(0,0,0,.55); }
.fr-card { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(88vw, 360px); max-height: 76vh; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 16px 14px; border-radius: 16px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.fr-card h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); text-align: center; }
.fr-card-list { flex: 1 1 auto; min-height: 40px; max-height: 44vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; }
.fr-card-item { display: flex; flex-direction: column; gap: 3px; align-items: flex-start; padding: 12px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel2); color: var(--ink);
  font-size: 0.9375rem; font-weight: 600; cursor: pointer; text-align: left; }
.fr-card-item:active { background: var(--panel); }
.fr-card-item em { font-style: normal; font-size: 0.75rem; font-weight: 400; color: var(--muted); }
.fr-card-item.danger { color: var(--red); border-color: rgba(240,84,95,.35); }
.fr-card > .fr-btn { flex: 0 0 auto; }
.fr-member-kick { margin-left: auto; flex: 0 0 auto; height: 28px; padding: 0 10px; border: 1px solid rgba(240,84,95,.35);
  border-radius: 9px; background: transparent; color: var(--red); font-size: 0.72rem; cursor: pointer; }

/* e420：好友页底部导航——只有「首页」，圆圈样式，是这页唯一的退出路 */
.fr-foot { flex: 0 0 auto; height: calc(52px + env(safe-area-inset-bottom, 0px));
  padding-bottom: env(safe-area-inset-bottom, 0px);
  display: flex; align-items: center; justify-content: center;
  border-top: 1px solid var(--line); background: var(--panel); }
.fr-home { min-width: 96px; height: 36px; padding: 0 24px; border-radius: 999px;
  border: 1px solid rgba(237,190,76,.5); background: rgba(237,190,76,.12);
  color: var(--gold); font-size: 0.875rem; font-weight: 600; letter-spacing: .06em;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: transform .12s, background .12s; }
.fr-home:active { transform: scale(.96); background: rgba(237,190,76,.2); }

/* 好友页底部导航：复刻主站五项（在浮层内静态排布，不再 fixed 到视口） */
.fr-tabbar { position: static; width: 100%; height: 100%; padding-bottom: 0;
  border-top: none; background: transparent; }
.fr-foot[hidden] { display: none; }

/* 赠送记录：分段筛选 + 凭证卡片 */
.go-tabs { flex: 0 0 auto; display: flex; flex-direction: row; flex-wrap: nowrap; gap: 8px; padding: 4px 12px 8px; }
.go-tab { flex: 1 1 0; min-width: 0; height: 36px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel2); color: var(--muted); font-size: 0.875rem; font-weight: 600; cursor: pointer; }
.go-tab.active { color: var(--gold); border-color: rgba(237,190,76,.5); background: rgba(237,190,76,.12); }
.go-sum { margin: 2px 2px 10px; font-size: 0.75rem; color: var(--muted); }
.go-card { padding: 10px; margin-bottom: 10px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; }
.go-card-top { display: flex; align-items: center; gap: 10px; }
.go-amt { flex: 0 0 auto; font-size: 1.0625rem; font-weight: 700; }
.go-amt.pos { color: var(--green); }
.go-amt.neg { color: var(--red); }
.go-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 10px;
  padding-top: 10px; border-top: 1px solid var(--line); font-size: 0.75rem; }
.go-card-meta .muted { display: inline-block; margin-right: 6px; color: var(--muted); }
.go-card-meta code { font-family: monospace; font-size: 0.6875rem; }
.go-card-meta .go-ord-no { cursor: pointer; color: #b98c1f; text-decoration: underline dotted; }
.go-card-meta .go-ord-no:active { opacity: .7; }
.go-card-meta b.pos { color: var(--green); }
.go-card-meta b.neg { color: var(--red); }
.go-card-meta b.muted { color: var(--muted); }
.go-del { color: var(--red); font-size: 0.75rem; }
.go-clear { flex: 0 0 auto; height: 36px; padding: 0 12px; border: 1px solid rgba(220,76,76,.4); border-radius: 12px; background: transparent; color: var(--red); font-size: 0.75rem; cursor: pointer; white-space: nowrap; }
.go-clear:disabled { opacity: .4; cursor: not-allowed; }
.go-card-foot { margin-top: 10px; display: flex; justify-content: flex-end; }
.go-rm { height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; background: transparent; color: var(--red); font-size: 0.75rem; cursor: pointer; }
.go-rm:active { background: rgba(220,76,76,.1); }

/* e422：底部导航「好友」红点——有好友请求或未读私聊时亮起 */
.tb-item { position: relative; }
.tb-dot { position: absolute; top: 3px; left: calc(50% + 5px); width: 8px; height: 8px;
  border-radius: 50%; background: var(--red);
  box-shadow: 0 0 0 2px rgba(10, 14, 21, .9);
  animation: tbDotPulse 1.6s ease-in-out infinite; }
.tb-dot[hidden] { display: none; }
/* e889：好友页浅色底上，红点外圈描边由深色改为白色，避免一圈深色描边 */
.fr-ov .tb-dot { box-shadow: 0 0 0 2px #fff; }
@keyframes tbDotPulse { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }

/* ─────────────── e423 聊天：每条消息带时间 + 语音消息 + 录音条 ─────────────── */
.fr-msgcol { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 70%; }
.fr-msg.mine .fr-msgcol { align-items: flex-end; }
.fr-msgcol .fr-bubble { max-width: 100%; }
.fr-mtime { font-size: 0.625rem; color: var(--muted); padding: 0 4px; }

.fr-voice { display: inline-flex; align-items: center; gap: 8px; min-width: 74px; cursor: pointer; }
.fr-voice b { font-size: 0.8125rem; font-weight: 600; }
.fr-voice-ic { font-size: 0.9375rem; line-height: 1; }
.fr-voice.playing { border-color: rgba(237,190,76,.55); animation: frVoicePulse 1s ease-in-out infinite; }
.fr-msg.mine .fr-voice.playing { border-color: rgba(0,0,0,.35); }
@keyframes frVoicePulse { 0%, 100% { opacity: 1; } 50% { opacity: .6; } }

.fr-recbar { flex: 0 0 auto; display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-top: 1px solid rgba(240,84,95,.3); background: rgba(240,84,95,.08); }
.fr-recbar[hidden] { display: none; }
.fr-rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--red);
  animation: tbDotPulse 1s ease-in-out infinite; }
.fr-recbar span#chatRecTime, .fr-recbar span#gRecTime { font-size: 0.875rem; font-weight: 700; color: var(--red); min-width: 28px; }
.fr-rec-hint { flex: 1; font-size: 0.75rem; color: var(--muted); }

.fr-micbtn.recording { background: rgba(240,84,95,.18); border-color: var(--red); color: var(--red); }
/* e431：好友聊天麦克风——单圈声波 ↔ 键盘切换。e889：与表情/加号统一为 38px 灰外圆，
   图标在圆内等比居中，外圆由 .fr-inbtn 基底承担；切键盘时仍是同一外圆。 */
.fr-micbtn { touch-action: none;
  -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.fr-micbtn svg { width: 26px; height: 26px; display: block; pointer-events: none; }
.fr-micbtn.kbd svg { width: 24px; height: 24px; }
/* e431：「按住 说话」胶囊——占输入框同一位置，外观同房间胶囊；按住变红 */
.fr-holdtalk { flex: 1 1 auto; min-width: 0; height: 38px; border-radius: 12px;
  font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.125rem; color: var(--ink);
  background: var(--panel2); border: 1px solid var(--line);
  touch-action: none; -webkit-user-select: none; user-select: none; -webkit-touch-callout: none;
  transition: background .18s ease, border-color .18s ease, color .18s ease; }
.fr-holdtalk.live { background: rgba(255,70,70,.5); color: #fff; border-color: rgba(255,95,95,.7); }
.fr-inbar input[hidden], .fr-holdtalk[hidden] { display: none; }

/* e425：真实头像（个人中心上传的）覆盖散列色块 */
.fr-ava-img { overflow: hidden; }
.fr-ava-img img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* e426：备注输入小弹窗（frPrompt），盖在操作单之上 */
.fr-prompt { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(88vw, 360px); padding: 18px 16px 14px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line);
  box-shadow: 0 18px 50px rgba(0,0,0,.55); display: flex; flex-direction: column; gap: 12px; }
.fr-prompt h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); text-align: center; }
.fr-prompt input { height: 42px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--ink); font-size: 1rem; outline: none; transition: border-color .15s; }
.fr-prompt input:focus { border-color: rgba(237,190,76,.55); }
.fr-prompt-btns { display: flex; gap: 10px; }
.fr-prompt-btns .fr-btn { flex: 1; height: 40px; }

/* ─────────────── e427 输入栏「+」面板 + 图片气泡 + 语音通话浮层 ─────────────── */
.fr-send[hidden] { display: none; }
.fr-inbtn svg { width: 26px; height: 26px; display: block; }
/* 表情 emoji 与 SVG 图标同一视觉档位：字号 25px，字形在 38px 圆内与 26px SVG 齐平 */
#chatEmojiBtn, #gEmojiBtn { font-size: 25px; }
.fr-plus { flex: 0 0 auto; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px;
  padding: 16px 12px calc(16px + env(safe-area-inset-bottom, 0px));
  background: var(--panel); border-top: 1px solid var(--line); }
.fr-plus[hidden] { display: none; }
.fr-plus button { display: flex; flex-direction: column; align-items: center; gap: 7px;
  background: none; border: none; color: var(--ink); font-size: 0.6875rem; cursor: pointer; }
.fr-plus-ic { width: 54px; height: 54px; border-radius: 16px; background: var(--panel2);
  border: 1px solid var(--line); display: flex; align-items: center; justify-content: center;
  color: var(--ink); transition: opacity .15s, transform .12s; }
.fr-plus button:active .fr-plus-ic { transform: scale(.94); }
.fr-plus-ic svg { width: 26px; height: 26px; }
.fr-plus button.offline .fr-plus-ic { opacity: .38; }
.fr-plus button.offline span:last-child { color: var(--muted); }

.fr-img { padding: 4px; cursor: zoom-in; }
.fr-img img { display: block; max-width: 168px; max-height: 220px; border-radius: 8px; }

.fr-gift { min-width: 168px; display: flex; align-items: center; gap: 10px;
  border-color: rgba(237,190,76,.45); background: rgba(237,190,76,.12);
  color: var(--ink); }
.fr-gift.mine { background: rgba(237,190,76,.2); }
.fr-gift-ic { font-size: 1.5rem; line-height: 1; }
.fr-gift span { display: flex; flex-direction: column; gap: 2px; }
.fr-gift b { font-size: 0.9375rem; }
.fr-gift small { font-size: 0.6875rem; color: var(--muted); }
.fr-plus button[disabled] { cursor: not-allowed; }
.fr-plus button[disabled] .fr-plus-ic { opacity: .38; }
.fr-plus button[disabled] span:last-child { color: var(--muted); }

/* e445：房间邀请卡片——聊天里把「房号 + 密码 + 说明 + 链接」这条文本
   换成一张可点卡片，房号是主标题，副标题写明「点击就可以直接进房间」。
   自己发的消息气泡默认是金色底深字，这里用更高优先级统一成深色邀请卡。 */
/* e446：卡片紧凑化。之前气泡继承 .fr-bubble 的 white-space: pre-wrap，模板里
   各 div 之间的换行缩进被当成空白行渲染，把卡片硬撑成近 3 倍高；这里覆盖成 normal，
   并把模板压成单行双保险。说明与「进入房间」并到同一行，少一整行 + 一条大留白。 */
.fr-msgcol .fr-bubble.fr-invite, .fr-msg.mine .fr-bubble.fr-invite {
  min-width: 172px; max-width: 220px; padding: 9px 11px; cursor: pointer;
  border: 1px solid rgba(237,190,76,.55); border-radius: 10px;
  background: rgba(237,190,76,.12);
  color: var(--ink); font-weight: 400; text-align: left;
  white-space: normal; line-height: 1.35;
  box-shadow: 0 4px 12px rgba(0,0,0,.12); transition: transform .12s; }
.fr-bubble.fr-invite:active { transform: scale(.98); }
.fr-invite-tag { font-size: 0.6875rem; color: var(--gold-d);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-invite-name { margin-top: 3px; font-size: 0.875rem; font-weight: 700; color: var(--ink);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fr-invite-foot { margin-top: 6px; padding-top: 5px; border-top: 1px solid rgba(0,0,0,.08);
  display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.fr-invite-hint { font-size: 0.625rem; color: var(--muted); white-space: nowrap;
  flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.fr-invite-go { font-size: 0.6875rem; font-weight: 600; color: var(--gold-d);
  flex: 0 0 auto; white-space: nowrap; text-align: right; }
.fr-lightbox { position: fixed; inset: 0; z-index: 1000002; background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center; cursor: zoom-out; }
.fr-lightbox img { max-width: 94vw; max-height: 92vh; object-fit: contain; }

/* ── e447：自定义分组 + 建群 + 群聊 ── */
.fr-folder-h { display: flex; align-items: center; gap: 4px; cursor: pointer; }
.fr-fold-ic { display: inline-block; width: 12px; color: var(--gold); font-size: .75rem; }
.fr-sec-btn { margin-left: auto; padding: 2px 8px; border: 1px solid rgba(237,190,76,.35);
  border-radius: 999px; background: rgba(237,190,76,.10); color: var(--gold);
  font-size: .6875rem; font-weight: 600; line-height: 1.7; cursor: pointer; }
.fr-sec-btn:active { background: rgba(237,190,76,.22); }
.fr-folder-empty { padding: 10px 12px; margin-bottom: 8px; border: 1px dashed var(--line);
  border-radius: 12px; color: var(--muted); font-size: .75rem; text-align: center; }
.fr-row-more { flex: 0 0 auto; width: 26px; height: 30px; padding: 0; border: 0;
  background: transparent; color: var(--muted); font-size: 1.125rem; line-height: 1;
  cursor: pointer; }
.fr-row-more:active { color: var(--gold); }
.fr-gava { background: linear-gradient(160deg, rgba(237,190,76,.22), rgba(237,190,76,.06));
  border: 1px solid rgba(237,190,76,.3); font-size: 1.25rem; }
.fr-gcount { margin-left: 6px; font-size: .625rem; font-weight: 500; color: var(--muted); }
.fr-gfrom { font-size: .625rem; color: var(--muted); padding: 0 4px; }

.fr-create, .fr-members { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(88vw, 360px); max-height: 76vh; display: flex; flex-direction: column; gap: 10px;
  padding: 18px 16px 14px; border-radius: 16px; background: var(--panel);
  border: 1px solid var(--line); box-shadow: 0 18px 50px rgba(0,0,0,.55); }
.fr-create h3, .fr-members h3 { margin: 0; font-size: 1rem; font-weight: 700; color: var(--ink); text-align: center; }
.fr-create input { height: 40px; padding: 0 12px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--panel2); color: var(--ink); font-size: .9375rem; outline: none; }
.fr-create input:focus { border-color: rgba(237,190,76,.55); }
.fr-create-tip { font-size: .75rem; color: var(--muted); }
.fr-create-list, .fr-members-list { flex: 1 1 auto; min-height: 80px; max-height: 44vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px; }
.fr-pick, .fr-member { display: flex; align-items: center; gap: 10px; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel2);
  color: var(--ink); font-size: .875rem; cursor: pointer; }
.fr-pick input { width: 18px; height: 18px; accent-color: var(--gold); flex: 0 0 auto; }
.fr-pick .fr-ava, .fr-member .fr-ava { width: 32px; height: 32px; border-radius: 10px; font-size: .875rem; }
.fr-pick .fr-ava img, .fr-member .fr-ava img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.fr-member em { margin-left: auto; font-style: normal; font-size: .6875rem; color: var(--gold); }
.fr-members > .fr-btn { flex: 0 0 auto; }

.fr-call-wrap { position: fixed; inset: 0; z-index: 1000001; }
.fr-call { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 14px;
  background: radial-gradient(circle at 50% -10%, #1a2434 0%, #0b0f16 60%); color: var(--ink); }
.fr-call-body { width: 92px; height: 92px; }
.fr-call-body .fr-ava { width: 92px; height: 92px; border-radius: 26px; font-size: 2.25rem; }
.fr-call-body .fr-ava img { width: 100%; height: 100%; object-fit: cover; }
.fr-call h2 { margin: 4px 0 0; font-size: 1.25rem; font-weight: 700;
  max-width: 80vw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fr-call-status { margin: 0; font-size: 0.875rem; color: var(--muted); }
.fr-call-btns { display: flex; gap: 30px; margin-top: 30px; }
.fr-call-btn { width: 64px; height: 64px; border-radius: 50%; border: none; cursor: pointer;
  display: flex; align-items: center; justify-content: center; color: #fff;
  box-shadow: 0 8px 24px rgba(0,0,0,.4); transition: transform .12s; }
.fr-call-btn:active { transform: scale(.93); }
.fr-call-btn svg { width: 28px; height: 28px; }
.fr-call-end, .fr-call-rej { background: linear-gradient(180deg, #ff6b74, var(--red)); }
.fr-call-go { background: linear-gradient(180deg, #4ad98a, #1f9e57); }

/* ═══════════════════════════════════════════════════════════════
   e450 中国象棋：大厅入口 / 棋房列表 / 木质棋盘 / 对局 HUD
   棋盘配色照「全民象棋」那类小程序的暖木色走，但整套页面仍是本平台的
   深色 + 金色框架，避免切进象棋像换了一个 App。
   ═══════════════════════════════════════════════════════════════ */

/* 大厅里的独立游戏入口 */
.xq-entry { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 16px;
  padding: 12px 14px; border: 1px solid rgba(214, 160, 82, .38); border-radius: 14px;
  background: linear-gradient(110deg, #3a2617 0%, #241a14 55%, #1a202b 100%);
  color: var(--ink); text-align: left; cursor: pointer; transition: transform .14s, border-color .14s; }
.xq-entry:hover { transform: translateY(-2px); border-color: rgba(237, 190, 76, .75); }
.xq-entry:active { transform: scale(.99); }
.xq-entry-piece { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center; font-family: "KaiTi", "STKaiti", "Songti SC", serif;
  font-size: 24px; font-weight: 800; color: #b42318;
  background: radial-gradient(circle at 34% 28%, #fff7e2, #f0dcb0 60%, #d3b27d);
  border: 2px solid #9b2b1e; box-shadow: inset 0 0 0 3px #c65a3d, 0 3px 10px rgba(0,0,0,.45); }
.xq-entry-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1; }
.xq-entry-txt b { font-size: 1rem; letter-spacing: .04em; color: #f4d79a; }
.xq-entry-txt i { font-style: normal; font-size: .72rem; color: var(--muted); }
.xq-entry-go { flex: 0 0 auto; font-size: .8rem; color: var(--gold); font-weight: 700; }

/* 斗地主入口：沿用大厅入口卡结构，用原版大小王做标识 */
.ddz-entry { background: linear-gradient(110deg, #3d1d1b 0%, #241713 52%, #16251d 100%);
  border-color: rgba(214, 160, 82, .42); }
.ddz-entry:hover { border-color: rgba(245, 193, 90, .8); }
.ddz-entry-icon { flex: 0 0 auto; width: 44px; height: 44px; position: relative; }
.ddz-entry-icon img { position: absolute; width: 32px; height: 45px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.55); box-shadow: 0 3px 9px rgba(0,0,0,.5); background: #fff; }
.ddz-entry-icon img:first-child { left: 0; top: 0; transform: rotate(-9deg); }
.ddz-entry-icon img:last-child { right: 0; top: 2px; transform: rotate(8deg); }
.ddz-entry-stats { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; flex: 0 0 auto; }
.ddz-entry-stats span { font-size: .64rem; color: #f0c778; border: 1px solid rgba(245,193,90,.24);
  border-radius: 999px; padding: 2px 7px; background: rgba(245,193,90,.07); white-space: nowrap; }
.ddz-entry-go { flex: 0 0 auto; font-size: .8rem; color: var(--gold); font-weight: 700; }
.sss-entry { background: linear-gradient(110deg, #103326 0%, #0b241a 52%, #181c12 100%);
  border-color: rgba(214, 160, 82, .42); }
.sss-entry:hover { border-color: rgba(245, 193, 90, .8); }
.sss-entry-icon { flex: 0 0 auto; width: 44px; height: 44px; position: relative; }
.sss-entry-icon img { position: absolute; width: 32px; height: 45px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.55); box-shadow: 0 3px 9px rgba(0,0,0,.5); background: #fff; }
.sss-entry-icon img:first-child { left: 0; top: 0; transform: rotate(-9deg); }
.sss-entry-icon img:last-child { right: 0; top: 2px; transform: rotate(8deg); }

/* 视图骨架 */
.chess-topbar { gap: 10px; position: relative; }
.xq-head { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.xq-head b { font-size: 1rem; color: var(--ink); letter-spacing: .06em; }
.xq-head span { font-size: .66rem; color: var(--muted); }
.xq-main { flex: 1; min-height: 0; display: flex; flex-direction: column;
  overflow: hidden; padding: 8px 12px 10px; }
.xq-lobby-inner, .xq-table { max-width: 560px; margin: 0 auto; }

/* 棋厅 */
.xq-banner { position: relative; display: flex; align-items: center; gap: 16px; min-height: 96px;
  padding: 16px 18px; margin-bottom: 14px; border-radius: 16px; overflow: hidden;
  border: 1px solid rgba(214, 160, 82, .3);
  background: radial-gradient(ellipse at 20% 0%, rgba(224, 172, 92, .22), transparent 62%),
    linear-gradient(120deg, #34251a, #1b202b 72%); }
.xq-banner-txt { flex: 1; min-width: 0; }
.xq-banner h2 { margin: 0 0 6px; font-size: 1.3rem; letter-spacing: .12em; color: #f4d79a; }
.xq-banner p { margin: 0; font-size: .75rem; color: var(--muted); }
.xq-banner-piece { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
  font-family: "KaiTi", "STKaiti", "Songti SC", serif; font-size: 27px; font-weight: 800;
  background: radial-gradient(circle at 34% 28%, #fff7e2, #f0dcb0 60%, #d3b27d);
  box-shadow: inset 0 0 0 3px currentColor, 0 4px 12px rgba(0,0,0,.5); flex: 0 0 auto; }
.xq-banner-piece.red { color: #b42318; border: 2px solid #9b2b1e; }
.xq-banner-piece.black { color: #33291c; border: 2px solid #463520; margin-left: -28px; transform: translateY(10px); }
.xq-mine { display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 14px; margin-bottom: 12px; border: 1px solid rgba(237,190,76,.5); border-radius: 12px;
  background: rgba(237,190,76,.08); }
.xq-mine > span { display: flex; flex-direction: column; gap: 3px; }
.xq-mine b { color: var(--gold); font-size: .9rem; }
.xq-mine i { font-style: normal; font-size: .72rem; color: var(--muted); }
.xq-rule { padding: 12px 14px; margin-top: 16px; border-radius: 12px;
  background: var(--panel); border: 1px solid var(--line); }
.xq-rule b { font-size: .82rem; color: var(--gold); }
.xq-rule p { margin: 6px 0 0; font-size: .74rem; line-height: 1.65; color: var(--muted); }
.xq-rule em { font-style: normal; color: var(--ink); }
.xq-list-head { display: flex; align-items: baseline; justify-content: flex-start; gap: 10px; margin-bottom: 8px; }
.xq-list-head h3 { margin: 0; font-size: .95rem; }
.xq-list-head span { font-size: .72rem; color: var(--muted); }
.xq-list-stats { display: inline-flex; align-items: center; gap: 4px; }
.xq-list-stats b { color: var(--ink); font-variant-numeric: tabular-nums; }
.xq-list-stats .live-dot { margin: 0 2px 0 4px; }
.xq-list { display: flex; flex-direction: column; gap: 10px; }
.xq-card { position: relative; display: flex; flex-direction: column; gap: 6px; width: 100%;
  padding: 12px 78px 12px 14px; border-radius: 12px; cursor: pointer; text-align: left;
  color: var(--ink); border: 1px solid var(--line);
  background: linear-gradient(180deg, var(--panel2), var(--panel)); transition: border-color .14s, transform .14s; }
.xq-card:hover { border-color: rgba(237,190,76,.55); transform: translateY(-2px); }
.xq-card-top { display: flex; align-items: baseline; gap: 8px; }
.xq-card-top b { font-size: .92rem; }
.xq-card-top em { font-style: normal; font-size: .68rem; color: var(--muted); }
.xq-card-mid { display: flex; gap: 14px; font-size: .74rem; }
.xq-card-mid i { font-style: normal; }
.xq-card-mid .red { color: #ef7b6f; }
.xq-card-mid .black { color: #b9c4d6; }
.xq-card-bot { font-size: .7rem; color: var(--muted); }
.xq-card-bot b { color: var(--gold); }
.xq-card-go { position: absolute; right: 12px; top: 50%; transform: translateY(-50%);
  font-size: .78rem; color: var(--gold); font-weight: 700; }
.xq-card.off { cursor: not-allowed; opacity: .5; }
.xq-card.off:hover { border-color: var(--line); transform: none; }
.xq-card.off .xq-card-go { color: var(--muted); }
.xq-chatbar-ro { margin-top: 4px; padding: 10px 12px; border-radius: 10px;
  border: 1px dashed var(--line); color: var(--muted); font-size: .76rem; text-align: center; }
.xq-empty { padding: 26px 16px; text-align: center; font-size: .78rem; color: var(--muted);
  border: 1px dashed var(--line); border-radius: 12px; line-height: 1.7; }
.xq-foot { margin-top: 16px; text-align: center; font-size: .7rem; color: var(--muted); }
.xq-foot b { color: var(--gold); }

/* 开房弹窗里的选择片 */
.xq-picks { display: flex; flex-wrap: wrap; gap: 8px; }
.xq-picks button { padding: 7px 12px; min-height: 34px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.04); color: var(--muted); font-size: .78rem; }
.xq-picks button.on { border-color: var(--gold); color: #1a1206; background: linear-gradient(180deg, #f4d184, var(--gold)); font-weight: 700; }
.xq-hint { text-align: left; line-height: 1.6; }
.xq-hint b { color: var(--gold); }

/* 对局 HUD */
#xqLobby { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#xqTable { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }
#xqLobby[hidden], #xqTable[hidden] { display: none; }
.xq-table { position: relative; flex: 1; min-height: 0; width: 100%; display: flex; flex-direction: column; }
/* 上半：双方玩家卡 + 棋盘，空间不足时内部滚动 */
.xq-scroll { flex: 1 1 auto; min-height: 0; width: 100%; display: flex; flex-direction: column;
  overflow-y: auto; -webkit-overflow-scrolling: touch; }
/* 下半：状态 / 操作 / 快捷语 / 棋谱条 / 聊天栏，贴底部导航栏上方固定，不随棋盘滚走 */
.xq-dock { flex: 0 0 auto; width: 100%; }
/* 局内小浮窗确认：贴操作区一带的底部小卡片，无整页遮罩、不挡整屏；水平居中、纯淡入不侧滑 */
.xq-pop { position: fixed; left: 0; right: 0; bottom: calc(var(--tb-h, 54px) + 12px); z-index: 60; }
.xq-pop-card { width: 300px; max-width: 86%; margin: 0 auto; background: var(--panel);
  border: 1px solid var(--line); border-radius: 16px; padding: 16px;
  box-shadow: 0 18px 44px rgba(0,0,0,.55); animation: xqPopFade .18s ease; }
@keyframes xqPopFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes xqFadeOut { to { opacity: 0; } }
.xq-pop-msg { font-size: .86rem; color: var(--ink); margin-bottom: 14px; line-height: 1.5; }
.xq-pop-acts { display: flex; gap: 10px; }
.xq-pop-acts .btn { flex: 1; }
.xq-player { display: flex; align-items: center; gap: 10px; min-height: 48px;
  padding: 6px 12px; margin: 2px 0; border-radius: 12px;
  border: 1px solid var(--line); background: linear-gradient(180deg, var(--panel2), var(--panel));
  transition: border-color .18s, box-shadow .18s; }
.xq-player.on { border-color: rgba(237,190,76,.75); box-shadow: 0 0 0 1px rgba(237,190,76,.18), 0 0 18px rgba(237,190,76,.12); }
.xq-avatar { flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center; font-weight: 800; font-size: 1rem; }
.xq-avatar.red { background: linear-gradient(160deg, #a83425, #6e1a12); color: #ffe9c9; }
.xq-avatar.black { background: linear-gradient(160deg, #3b3c46, #1b1d24); color: #e8e2d5; }
.xq-ava-img { overflow: hidden; padding: 0; }
.xq-ava-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.xq-pinfo { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.xq-pinfo b { font-size: .86rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.xq-pinfo b i { font-style: normal; font-size: .62rem; margin-left: 5px; padding: 1px 5px;
  border-radius: 4px; color: var(--gold); border: 1px solid rgba(237,190,76,.45); }
.xq-pinfo em { font-style: normal; font-size: .68rem; color: var(--muted); }
.xq-rank-badge { display: inline-block; font-style: normal; font-weight: 700; font-size: .6rem;
  line-height: 1.2; padding: 1px 5px; margin-left: 5px; border-radius: 5px; vertical-align: middle;
  color: #f5d074; border: 1px solid rgba(237,190,76,.4); background: rgba(237,190,76,.12);
  font-variant-numeric: tabular-nums; }
.xq-clock { margin-left: auto; display: inline-flex; align-items: center; height: 22px;
  font-variant-numeric: tabular-nums; font-size: 1.02rem; line-height: 1;
  font-weight: 800; color: var(--gold); letter-spacing: .03em; }
.xq-clock.low { color: var(--red); animation: xqBlink 1s infinite; }
@keyframes xqBlink { 50% { opacity: .45; } }
.xq-chip { display: inline-flex; align-items: center; justify-content: center; margin-left: 8px;
  height: 22px; padding: 0 10px; border-radius: 11px; font-size: .68rem; font-weight: 700;
  line-height: 1; white-space: nowrap; border: 1px solid transparent; }
.xq-chip.urge { color: #1d1405; background: linear-gradient(135deg, #f2c455, #e3a93a);
  border-color: rgba(237,190,76,.6); box-shadow: 0 2px 8px rgba(227,169,58,.35); cursor: pointer; }
.xq-chip.idle { color: var(--muted); background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); }
.xq-chip.ack { color: #1d1405; background: linear-gradient(135deg, #5fd08a, #3aa86b);
  border-color: rgba(95,208,138,.5); }

/* 木质棋盘：厚木框 + 内嵌浅色棋盘，带 3D 倒角与暖光 */
.xq-board-area { position: relative; flex: 1 1 auto; min-height: 0; display: flex;
  align-items: center; justify-content: center; }
.xq-board-wrap { width: 100%; height: 100%; padding: 8px; box-sizing: border-box; display: flex;
  border-radius: 18px;
  background: linear-gradient(160deg, #6b4222, #3d2618 60%, #2a1a12);
  box-shadow: 0 12px 30px rgba(0,0,0,.55), inset 0 1px 0 rgba(255,220,170,.22); }
.xq-board { position: relative; height: 100%; width: auto; max-width: 100%; margin: 0 auto; aspect-ratio: 9 / 10; border-radius: 10px;
  background: radial-gradient(ellipse at 50% 22%, rgba(255,232,184,.22), transparent 62%),
    repeating-linear-gradient(92deg, rgba(112,66,28,.055) 0 2px, transparent 2px 11px),
    linear-gradient(180deg, #dcae72 0%, #cf9c5f 45%, #c79054 55%, #d9a96c 100%);
  box-shadow: inset 0 0 0 2px rgba(90,52,24,.65), inset 0 0 26px rgba(90,52,24,.35);
  overflow: hidden; }
.xq-svg { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 1; }
.xq-ln { stroke: #6d4423; stroke-width: 2.2; fill: none; opacity: .88; }
.xq-ln.outer { stroke-width: 3.4; }
.xq-star { stroke: #6d4423; stroke-width: 2.4; fill: none; opacity: .85; }
.xq-frame { fill: none; stroke: rgba(105,63,28,.75); stroke-width: 4; }
.xq-river { font-family: "KaiTi", "STKaiti", "Songti SC", serif; font-size: 46px;
  font-weight: 700; letter-spacing: 6px; fill: #7b4d24; opacity: .82; }
.xq-piece, .xq-dot, .xq-mark { position: absolute; transform: translate(-50%, -50%); }
/* e473：棋子文字与外圈尺寸全部用「棋子直径 --xq-piece-d」换算，不用 vw/px 固定值。
   vw 跟视口走、棋子却跟棋盘高度走（棋盘是 aspect-ratio 9/10 + height:100%），
   两者不同步就是安卓上「字贴外圈、偏大」的根因。--xq-piece-d 由 xqFitPieces() 按棋盘实际宽度写入。 */
.xq-piece { z-index: 4; width: 10.2%; aspect-ratio: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; pointer-events: none;
  font-family: "KaiTi", "STKaiti", "Kaiti SC", "Songti SC", serif; font-weight: 900;
  font-size: calc(var(--xq-piece-d, 40px) * .50); line-height: 1; user-select: none;
  -webkit-text-stroke: calc(var(--xq-piece-d, 40px) * .011) currentColor;
  padding: 0; box-sizing: border-box; letter-spacing: 0;
  background: radial-gradient(circle at 34% 26%, #fff9e9 0%, #f4e2bb 52%, #d8ba86 100%);
  border: calc(var(--xq-piece-d, 40px) * .057) solid #8b5a2b;
  box-shadow: inset 0 0 0 calc(var(--xq-piece-d, 40px) * .045) rgba(150,96,45,.5),
    inset 0 calc(var(--xq-piece-d, 40px) * -.07) calc(var(--xq-piece-d, 40px) * .14) rgba(120,80,40,.25),
    0 3px 7px rgba(0,0,0,.5); }
.xq-piece.red { color: #b42318; border-color: #9b2b1e;
  box-shadow: inset 0 0 0 calc(var(--xq-piece-d, 40px) * .045) rgba(196,72,52,.85),
    inset 0 calc(var(--xq-piece-d, 40px) * -.07) calc(var(--xq-piece-d, 40px) * .14) rgba(120,40,20,.22),
    0 3px 7px rgba(0,0,0,.5); }
.xq-piece.black { color: #2b2318; border-color: #43331f;
  box-shadow: inset 0 0 0 calc(var(--xq-piece-d, 40px) * .045) rgba(74,58,38,.8),
    inset 0 calc(var(--xq-piece-d, 40px) * -.07) calc(var(--xq-piece-d, 40px) * .14) rgba(60,45,25,.22),
    0 3px 7px rgba(0,0,0,.5); }
.xq-piece.sel { box-shadow: 0 0 0 4px rgba(255,214,90,.95), 0 0 22px rgba(255,196,60,.8), 0 4px 9px rgba(0,0,0,.5); }
.xq-piece.check { animation: xqCheck 1s infinite; }
@keyframes xqCheck { 50% { box-shadow: 0 0 0 5px rgba(240,60,50,.9), 0 0 24px rgba(240,60,50,.85); } }
.xq-mark { z-index: 2; width: 10.2%; aspect-ratio: 1; border-radius: 50%;
  border: 2px solid rgba(196,44,32,.78); pointer-events: none; }
.xq-dot { z-index: 3; width: 3.6%; aspect-ratio: 1; border-radius: 50%;
  background: rgba(28,84,52,.5); pointer-events: none; }
.xq-dot.cap { width: 10.8%; background: transparent; border: 3px solid rgba(200,48,36,.72); }
.xq-cell { position: absolute; z-index: 6; width: 11.1111%; height: 10%;
  padding: 0; border: 0; background: transparent; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.xq-cell:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }

/* 结算 / 快捷语 / 状态 / 操作 / 棋谱 */
/* 快捷语横幅：落棋盘楚河汉界横带居中，与聊天气泡同一位置；不贴棋盘顶/底 */
.xq-say { position: absolute; z-index: 9; left: 50%; top: 50%; transform: translate(-50%,-50%);
  padding: 6px 14px; border-radius: 999px; font-size: .78rem; white-space: nowrap;
  background: rgba(20,26,36,.92); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 6px 18px rgba(0,0,0,.45); pointer-events: none;
  animation: xqPopFade .22s ease-out both; }
.xq-say.urge { border-color: rgba(237,190,76,.45); color: var(--gold); }
.xq-say.ack { border-color: rgba(120,200,140,.4); color: #9fd8b0; }
/* 催促方横幅文案较长：允许换行并限宽，避免 narrow 屏被裁切 */
.xq-say.wide { white-space: normal; max-width: 88%; text-align: center; line-height: 1.45; }
.xq-result { position: absolute; z-index: 10; inset: 0; display: grid; place-items: center;
  border-radius: 10px; background: rgba(9,12,18,.68); backdrop-filter: blur(3px); }
.xq-result-card { width: min(84%, 320px); padding: 20px 18px; text-align: center;
  border-radius: 16px; border: 1px solid rgba(237,190,76,.55);
  background: linear-gradient(180deg, #222b3a, #131a25); box-shadow: 0 16px 42px rgba(0,0,0,.6); }
.xq-seal { width: 58px; height: 58px; margin: 0 auto 8px; border-radius: 50%;
  display: grid; place-items: center; font-family: "KaiTi", "STKaiti", serif;
  font-size: 30px; font-weight: 800; border: 3px solid currentColor; }
.xq-seal.win { color: var(--gold); background: rgba(237,190,76,.12); }
.xq-seal.lose { color: var(--muted); background: rgba(255,255,255,.05); }
.xq-seal.draw { color: #7fc9a0; background: rgba(60,180,120,.1); }
.xq-result-card h2 { margin: 4px 0 6px; font-size: 1.3rem; letter-spacing: .2em; color: var(--ink); }
.xq-result-delta { margin: 0 0 4px; font-size: 1.15rem; font-weight: 800; color: var(--muted); }
.xq-result-delta.plus { color: var(--gold); } .xq-result-delta.minus { color: var(--red); }
.xq-result-sub { margin: 0 0 16px; font-size: .72rem; color: var(--muted); }
.xq-result-btns { display: flex; gap: 8px; flex-wrap: wrap; }
/* e483：房卡语义说明——再来一局不另扣房卡，只重新托管底分（跨整行小字，不挤按钮） */
.xq-result-note { flex: 1 0 100%; margin: 0 0 2px; font-size: .7rem; line-height: 1.35; color: rgba(255,255,255,.56); text-align: center; }
.xq-result-btns .btn { flex: 1; }
.xq-status { display: flex; align-items: center; gap: 8px; padding: 6px 10px; margin: 2px 0;
  font-size: .82rem; color: var(--muted); border-radius: 10px; background: rgba(255,255,255,.035); }
.xq-status.mine { color: var(--gold); }
.xq-status i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: 0 0 auto; }
.xq-status em { margin-left: auto; font-style: normal; font-size: .68rem; color: var(--muted); }
.xq-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 2px 0; }
.xq-acts .btn { flex: 1 1 auto; min-width: 68px; }
.xq-acts-ask { padding: 8px 10px; border-radius: 10px; background: rgba(237,190,76,.1);
  border: 1px solid rgba(237,190,76,.4); font-size: .82rem; color: var(--gold); }
.xq-acts-ask span { flex: 1 1 100%; }
/* 对方求和/悔棋提议：贴在操作区整条盖住「状态行 + 操作行」（对齐第 2 张图的排布：
   上面一行标题、下面并排两颗等宽按钮）。绝对定位 → 不占文档流，弹窗出现/消失时
   dock 高度不变，棋盘与棋子尺寸一点都不会被挤压。 */
.xq-dock-head { position: relative; }
.xq-acts-wrap { position: relative; }
/* e480：确认条贴在「棋盘下沿 ↔ 悔棋/求和/认输/退出」之间那一条上，且不占布局高度。
   锚在操作行的上边（bottom:100%），向上长 76px，正好盖住状态行 + 我方信息卡下沿；
   操作行本身仍在下面露出来，点不到也不会被遮。 */
.xq-ask-row { position: absolute; left: -2px; right: -2px; bottom: calc(100% + 4px); height: 76px; z-index: 30;
  display: flex; flex-direction: column; justify-content: center; gap: 5px;
  padding: 5px 10px; border-radius: 10px; background: #2b3038;
  border: 1px solid rgba(255,255,255,.16); box-shadow: 0 10px 26px rgba(0,0,0,.45);
  animation: xqPopFade .15s ease; }
.xq-ask-title { display: block; font-size: .76rem; line-height: 1.2; color: #efe3c4; letter-spacing: .02em; }
.xq-ask-acts { display: flex; gap: 8px; }
.xq-ask-acts .btn { flex: 1 1 0; min-width: 0; height: 28px; padding: 0; font-size: .84rem;
  border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.xq-tip { margin: 2px 0 6px; font-size: .7rem; color: var(--muted); }
.xq-quick { display: flex; gap: 6px; flex-wrap: wrap; margin: 2px 0; }
.xq-quick button { flex: 1 1 0; min-width: 62px; padding: 7px 6px; border-radius: 10px;
  font-size: .72rem; font-weight: 600; letter-spacing: .02em; cursor: pointer;
  color: var(--muted); background: rgba(255,255,255,.05); border: 1px solid var(--line);
  transition: background .15s, color .15s, border-color .15s; }
.xq-quick button:hover { color: var(--ink); background: rgba(255,255,255,.09); }
.xq-quick button:active { color: var(--gold); border-color: rgba(237,190,76,.55); background: rgba(237,190,76,.1); }
/* 棋室聊天消息区：左右分列气泡，带头像 */
/* 聊天消息层：叠加棋盘楚河汉界横带中央；JS 按棋盘中心设 left/top，CSS 用 transform 居中；不占常驻布局 */
.xq-pop-layer { position: fixed; left: 0; top: 0; transform: translate(-50%,-50%);
  z-index: 22; display: flex; flex-direction: column; align-items: center; gap: 6px;
  width: max-content; max-width: 92%; pointer-events: none; }
.xq-chat-pop { max-width: 100%; padding: 8px 11px; border-radius: 12px;
  background: rgba(18,26,38,.94); border: 1px solid rgba(120,180,255,.28);
  box-shadow: 0 8px 24px rgba(0,0,0,.45); color: var(--ink);
  font-size: .7813rem; line-height: 1.5; word-break: break-word;
  animation: xqPopFade .22s ease-out both; pointer-events: auto; }
.xq-chat-pop.mine { border-color: rgba(237,190,76,.42); background: rgba(38,31,18,.94); }
.xq-chat-pop b { color: #9fb2cc; font-weight: 600; margin-right: 5px; font-size: .7188rem; }
.xq-chat-pop.mine b { color: var(--gold); }
.xq-chat-pop.out, .xq-say.out { animation: xqFadeOut .35s ease-in both; }
.xq-chat-pop .xq-chat-img { max-height: 100px; }
.xq-chat-msg { display: flex; gap: 7px; align-items: flex-start; max-width: 86%; }
.xq-chat-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.xq-chat-ava { width: 26px; height: 26px; flex: 0 0 auto; border-radius: 50%; overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: .72rem; font-weight: 600;
  background: rgba(255,255,255,.1); color: var(--ink); }
.xq-chat-ava img { width: 100%; height: 100%; object-fit: cover; }
.xq-chat-bub b { display: block; font-size: .66rem; color: #cddcf0; font-weight: 600; margin: 0 0 2px; }
.xq-chat-msg.mine .xq-chat-bub b { color: var(--gold); }
.xq-chat-body { display: inline-block; padding: 7px 10px; border-radius: 12px; font-size: .8rem; line-height: 1.5;
  color: var(--ink); background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  word-break: break-word; }
.xq-chat-msg.mine .xq-chat-body { background: rgba(237,190,76,.12); border-color: rgba(237,190,76,.32); }
.xq-chat-img { display: block; max-width: 150px; max-height: 120px; border-radius: 8px; cursor: pointer; }
/* 棋室底部整套聊天栏（麦克风 / 输入 / 表情 / 发送 / 加号），面板相对本栏定位 */
.xq-chatbar-wrap { position: relative; margin-top: 4px; }
.xq-chatbar { margin-top: 4px; }
/* 棋谱单行入口条：只占一行，点击弹出可滑动的完整棋谱浮窗 */
.xq-record { display: flex; align-items: center; gap: 8px; padding: 7px 10px; margin: 2px 0;
  border-radius: 10px; border: 1px solid var(--line); background: var(--panel);
  font-size: .72rem; cursor: pointer; }
.xq-record:active { border-color: rgba(237,190,76,.5); }
.xq-record-txt { flex: 1 1 auto; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--muted); }
.xq-record-txt.red { color: #ef8b7e; } .xq-record-txt.black { color: #b9c4d6; }
.xq-record-go { flex: 0 0 auto; color: var(--gold); font-size: .7rem; }
.xq-none { color: var(--muted); }
/* 弹窗内完整棋谱：纵向可滑动 */
.xq-record-modal { display: flex; flex-direction: column; gap: 6px; max-height: 50vh; overflow-y: auto;
  padding: 2px 2px; font-size: .8rem; }
.xq-record-modal span { padding: 6px 10px; border-radius: 8px; background: rgba(255,255,255,.05); }
.xq-record-modal .red { color: #ef8b7e; } .xq-record-modal .black { color: #b9c4d6; }
/* 棋谱局内小浮窗：贴底部导航上方的小卡片，无整页遮罩 */
.xq-rec-card { padding: 14px; max-height: 52vh; display: flex; flex-direction: column; }
.xq-rec-head { display: flex; align-items: center; gap: 6px; font-size: .9rem; color: var(--ink); margin-bottom: 10px; cursor: move; touch-action: none; }
.xq-rec-head .muted { font-size: .72rem; color: var(--muted); font-weight: 400; }
.xq-rec-close { margin-left: auto; width: 26px; height: 26px; border: none; background: rgba(255,255,255,.06);
  color: var(--muted); border-radius: 8px; font-size: 1rem; line-height: 1; cursor: pointer; }
.xq-rec-pop .xq-record-modal { max-height: 38vh; }

@media (max-width: 430px) {
  .xq-main { padding: 8px 10px 10px; }
  .xq-board-wrap { padding: 6px; }
  .xq-banner { min-height: 84px; padding: 12px; }
  /* e473：删掉按 vw 缩小棋子的写法——棋子字号现在由 xqFitPieces() 按棋盘实际尺寸换算 */
  .xq-player { min-height: 48px; padding: 5px 9px; }
  .xq-avatar { width: 32px; height: 32px; }
  .xq-river { font-size: 42px; }
}

/* e452：后台停用象棋项目时棋厅顶部显示的维护公告 */
.xq-notice { padding: 10px 13px; margin-bottom: 12px; border-radius: 10px;
  background: rgba(233, 69, 96, .10); border: 1px solid rgba(233, 69, 96, .35);
  color: #f3b6bf; font-size: .76rem; line-height: 1.6; text-align: center; }

/* ═══════════════════════════════════════════════════════════════
   e454 大厅双游戏入口卡 + 真五门独立房间页
   截图批注：点入口卡进独立页面（同中国象棋），不在大厅就地展开；
   真五门在上、中国象棋在下，两张卡都显示房间数 / 在线人数；
   开房按钮、公开/私密房间列表、玩法说明都在 #viewZm 里。
   ═══════════════════════════════════════════════════════════════ */
.entry-card { flex: 0 0 auto; display: flex; align-items: center; flex-wrap: wrap;
  gap: 12px; width: 100%; min-height: 76px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 16px; border: 1px solid rgba(237, 190, 76, .34);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .26);
  color: var(--ink); font-family: inherit; text-align: left; cursor: pointer;
  transition: transform .14s, border-color .14s; }
.entry-card:hover { transform: translateY(-2px); border-color: rgba(237, 190, 76, .75); }
.entry-card:active { transform: scale(.99); }
/* 游戏停用态：置灰、不可悬停上浮，角标显示维护中；卡片仍可点击以弹出维护提示 */
.entry-card.disabled { opacity: .55; filter: grayscale(.45); cursor: not-allowed; border-color: rgba(255,255,255,.12); }
.entry-card.disabled:hover { transform: none; border-color: rgba(255,255,255,.12); }
.entry-card.disabled .ec-go, .entry-card.disabled .xq-entry-go { color: var(--muted); }
.entry-card .ec-notice { flex: 0 0 100%; order: 4; font-size: .72rem; color: #e8a0a0; margin-top: 2px; }
.zm-card { background: linear-gradient(112deg, rgba(237, 190, 76, .13) 0%, rgba(22, 29, 41, .94) 44%, rgba(16, 22, 32, .96) 100%); }
/* 象棋卡沿用 e450 的暖木渐变，这里只统一尺寸/圆角/间距 */
.entry-card.xq-entry { border-color: rgba(214, 160, 82, .38); }

.entry-card > .ec-icon, .entry-card > .xq-entry-piece {
  flex: 0 0 44px; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; }
.ec-icon { background: radial-gradient(circle at 34% 26%, #ffedc0, #e8b449 58%, #a87616);
  border: 2px solid rgba(255, 228, 160, .8);
  box-shadow: inset 0 0 0 3px rgba(120, 74, 8, .26), 0 4px 12px rgba(0, 0, 0, .42); }
.ec-icon svg { width: 24px; height: 24px; fill: #5c3a06; }

.entry-card .ec-txt, .entry-card .xq-entry-txt {
  display: flex; flex-direction: column; gap: 3px; min-width: 0; flex: 1 1 auto; }
/* 标题行：游戏标题 + 统计徽章同一行，徽章与标题垂直居中对齐；描述在下一行 */
.ec-head { display: flex; align-items: center; gap: 8px; min-width: 0; flex-wrap: nowrap; }
.ec-head b { flex: 0 1 auto; min-width: 0; }
.entry-card .ec-txt b, .entry-card .xq-entry-txt b {
  font-size: 1.0625rem; font-weight: 800; letter-spacing: .04em; color: #f4d79a;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.entry-card .ec-txt i, .entry-card .xq-entry-txt i {
  font-style: normal; font-size: .72rem; color: var(--muted); min-width: 0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 四张入口卡共用的统计徽章：内嵌在标题行右侧，与标题垂直居中；窄屏徽章缩字缩距防溢出 */
.ec-stats { flex: 0 1 auto; min-width: 0; padding-left: 0;
  display: flex; align-items: center; justify-content: flex-start; flex-wrap: nowrap; gap: 6px; }
.ec-chip { display: inline-flex; align-items: baseline; gap: 4px; white-space: nowrap;
  padding: 3px 9px; border-radius: 999px; font-size: .6563rem; color: var(--muted);
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .07); }
.ec-chip b { font-size: .7813rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.ec-chip i { font-style: normal; }
.ec-chip.online { align-items: center; color: #7ed6a3;
  background: rgba(47, 191, 113, .12); border-color: rgba(47, 191, 113, .3); }
.ec-chip.online b { color: #8ff0ba; }
.entry-card .ec-go, .entry-card .xq-entry-go {
  order: 2; flex: 0 0 auto; margin-left: auto; white-space: nowrap;
  font-size: .8rem; font-weight: 700; color: var(--gold); }

/* 真五门独立页：与棋厅同款顶栏 + 可滚动内容区 */
.zm-topbar { position: relative; gap: 10px; }
.zm-page-head { position: absolute; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; line-height: 1.25; }
.zm-page-head b { font-size: 1rem; color: var(--ink); letter-spacing: .06em; }
.zm-page-head span { font-size: .66rem; color: var(--muted); }
.zm-head-tools { display: flex; align-items: center; justify-content: flex-end; gap: 6px; min-width: 96px; }
.zm-main { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  width: 100%; max-width: 760px; margin: 0 auto; padding: 14px 16px 24px; }
.zm-acts { display: flex; align-items: center; justify-content: space-between;
  flex-wrap: nowrap; gap: 10px; padding: 12px 14px; margin-bottom: 14px;
  border-radius: 14px; border: 1px solid rgba(237, 190, 76, .26);
  background: rgba(237, 190, 76, .06); }
.zm-search { position: relative; display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px; padding: 4px 6px 4px 12px;
  background: rgba(255,255,255,.045); border: 1px solid var(--line); border-radius: 12px;
  transition: border-color .18s, background .18s; }
.zm-search:focus-within { border-color: rgba(237,190,76,.55); background: rgba(237,190,76,.06); }
.zm-search .ls-ico { font-size: .8125rem; opacity: .75; flex: 0 0 auto; }
.zm-search input { flex: 1 1 auto; min-width: 0; padding: 9px 0;
  background: transparent; border: 0; outline: none; text-overflow: ellipsis;
  color: var(--ink); font-size: .8438rem; }
.zm-search input::placeholder { color: var(--muted); opacity: 1; font-size: .72rem; }
.zm-search .btn { flex: 0 0 auto; }
.zm-acts-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.zm-acts-ico { width: 38px; height: 38px; flex: 0 0 auto; display: grid; place-items: center;
  border-radius: 10px; background: rgba(237,190,76,.12); border: 1px solid rgba(237,190,76,.3); }
.zm-acts-ico svg { width: 20px; height: 20px; fill: var(--gold); }
.zm-acts-hint { font-size: .75rem; color: var(--muted); }
.zm-acts .lh-create { padding: 7px 14px 7px 12px; border-radius: 12px; }
.zm-main .empty { padding: 12px 0 2px; }
.zm-main .room-group:last-of-type { margin-bottom: 0; }
/* 玩法说明在本页里正常跟随列表，不再靠 margin-top:auto 钉底 */
.zm-main .rules { margin-top: 18px; }

@media (max-width: 430px) {
  .entry-card { gap: 9px; padding: 11px 12px; margin-bottom: 12px; border-radius: 14px; }
  .entry-card > .ec-icon, .entry-card > .xq-entry-piece { flex-basis: 40px; width: 40px; height: 40px; }
  .entry-card .ec-txt b, .entry-card .xq-entry-txt b { font-size: 1rem; }
  /* 窄屏统计仍与标题同行：徽章缩字缩距，避免横向溢出 */
  .ec-stats { gap: 4px; }
  .ec-chip { padding: 2px 6px; font-size: .58rem; }
  .ec-chip b { font-size: .68rem; }
  .entry-card .ec-go, .entry-card .xq-entry-go { font-size: .72rem; }
  .zm-head-tools .ec-chip:first-child { display: none; }
  .zm-main { padding: 12px 12px 20px; }
  .zm-acts-hint { font-size: .72rem; }
}


/* ══════════ e487 残局 / e488 赛事：棋厅分页与卡片 ══════════ */
.xq-tabs { display: flex; gap: 8px; padding: 2px 0 12px; }
.xq-tab { flex: 1 1 0; height: 36px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--muted);
  font-size: .82rem; font-weight: 700; }
.xq-tab.on { color: #1a1206; border-color: rgba(237,190,76,.8);
  background: linear-gradient(180deg, #f4d184, var(--gold)); }
.xq-pz-stats { display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  padding: 8px 12px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 12px;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); font-size: .76rem; color: var(--muted); }
.xq-pz-stats b { color: var(--gold); font-size: .9rem; }
.xq-pz-daily { margin-left: auto; color: var(--ink); }
.xq-pz-main { border: 1px solid var(--line); border-radius: 14px; padding: 10px;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); margin-bottom: 12px; }
.xq-pz-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.xq-pz-head b { font-size: .92rem; }
.xq-pz-head em { font-style: normal; font-size: .7rem; color: var(--gold); }
.xq-pz-board { width: 100%; }
.xq-pz-res { margin: 8px 0; padding: 7px 10px; border-radius: 9px; font-size: .74rem;
  color: var(--muted); background: rgba(255,255,255,.05); text-align: center; }
.xq-pz-res.ok { color: #8fe3ad; background: rgba(58,168,107,.16); border: 1px solid rgba(95,208,138,.4); }
.xq-pz-res.bad { color: #ffb0a6; background: rgba(168,52,37,.18); border: 1px solid rgba(200,80,60,.4); }
.xq-pz-acts { display: flex; gap: 8px; margin-top: 8px; }
.xq-pz-acts .btn { flex: 1 1 0; }
.xq-pz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-bottom: 14px; }
.xq-pz-item { position: relative; border-radius: 10px; cursor: pointer; text-align: left; padding: 7px 9px 6px;
  border: 1px solid var(--line); background: rgba(255,255,255,.05); color: var(--ink);
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px; }
.xq-pz-item .no { font-size: .6rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.xq-pz-item .nm { font-size: .78rem; line-height: 1.25; font-weight: 700; }
.xq-pz-item i { font-style: normal; font-size: .55rem; color: var(--gold); letter-spacing: -1px; }
.xq-pz-item em { position: absolute; right: 5px; top: 3px; font-style: normal; font-size: .62rem; color: #6fd79a; }
.xq-pz-item.ok { border-color: rgba(95,208,138,.55); background: rgba(58,168,107,.14); }
.xq-pz-item.cur { border-color: rgba(237,190,76,.85); box-shadow: 0 0 0 1px rgba(237,190,76,.25); }
.xq-pz-rank { list-style: none; margin: 0 0 14px; padding: 0; }
.xq-pz-rank li { display: flex; align-items: center; gap: 10px; padding: 7px 10px;
  border-bottom: 1px dashed var(--line); font-size: .78rem; }
.xq-pz-rank li span { width: 20px; color: var(--gold); font-weight: 800; }
.xq-pz-rank li b { flex: 1 1 auto; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.xq-pz-rank li em { font-style: normal; color: var(--muted); font-size: .7rem; }
.xq-ar-card { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; margin-bottom: 10px;
  background: linear-gradient(180deg, var(--panel2), var(--panel)); }
.xq-ar-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.xq-ar-top b { font-size: .9rem; }
.xq-ar-top em { font-style: normal; font-size: .68rem; color: var(--gold); }
.xq-ar-mid { display: flex; flex-wrap: wrap; gap: 12px; font-size: .72rem; color: var(--muted); margin-bottom: 8px; }
.xq-ar-cd { color: var(--gold); font-weight: 600; letter-spacing: .02em; font-variant-numeric: tabular-nums; align-self: center; margin-right: auto; font-size: .72rem; }
.xq-ar-cd.is-urgent { color: #ff7b72; }
.xq-ar-bot { display: flex; gap: 8px; justify-content: flex-end; }
/* e505：历史赛事折叠区；已结束赛事不占赛事栏，但冠军/亚军/我的名次可查 */
.xq-ar-history { margin: 4px 0 14px; border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel); overflow: hidden; }
.xq-ar-history summary { cursor: pointer; padding: 10px 12px; list-style: none; display: flex;
  align-items: center; justify-content: space-between; gap: 8px; font-size: .8rem; }
.xq-ar-history summary::-webkit-details-marker { display: none; }
.xq-ar-history summary b { color: var(--gold); }
.xq-ar-history summary span { color: var(--muted); font-size: .68rem; font-weight: 400; }
.xq-ar-history summary::after { content: '展开'; color: var(--muted); font-size: .68rem; }
.xq-ar-history[open] summary::after { content: '收起'; }
.xq-ar-history-list { border-top: 1px solid var(--line); padding: 2px 12px 8px; }
.xq-ar-history-row { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px;
  padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .72rem; }
.xq-ar-history-row b { flex: 1 1 120px; font-size: .78rem; }
.xq-ar-history-row span { color: var(--muted); }
.xq-ar-history-row em { font-style: normal; color: var(--gold); }
.xq-ar-history-row:last-child { border-bottom: 0; }
.xq-ar-bracket { margin: 10px 0 14px; }
.xq-ar-round { margin-bottom: 10px; }
.xq-ar-round h4 { font-size: .8rem; margin: 0 0 6px; color: var(--gold); }
.xq-ar-match { display: flex; align-items: center; gap: 6px; font-size: .74rem; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 9px; margin-bottom: 6px; }
.xq-ar-match .w { color: #6fd79a; font-weight: 700; }
.xq-ar-match .l { color: var(--muted); text-decoration: line-through; }
.xq-ar-match .vs { color: var(--muted); font-size: .66rem; }
/* e487 修正：残局棋盘没有固定高度的房间容器，必须靠宽高比自己撑开，
   否则 .xq-board 的 height:100% 会塌成 0，格子按钮看不见也点不到 */
.xq-pz-board .xq-board-wrap { height: auto; }
.xq-pz-board .xq-board { height: auto; width: 100%; aspect-ratio: 9 / 10; }
/* e490：残局闯关 + 机器应着 */
.xq-pz-ai { margin: 6px 0 0; font-size: .82rem; color: #cfd9e2; opacity: .9; }
.xq-pz-item.lock { opacity: .42; filter: grayscale(.35); cursor: not-allowed; }
.xq-pz-item.lock b { font-size: .9rem; }
.xq-pz-item.cur { outline: 2px solid var(--gold); outline-offset: 1px; }

/* ══════════════════════════════════════════════════════════════════════
   e535 ① 四门卡片严格等宽等高（用户 2026-11-14 00:26 截图批注①）
   ──────────────────────────────────────────────────────────────────────
   ★真因★ 手机 2×2 网格只写了 grid-template-rows: repeat(2, minmax(0,1fr))，
   而 .suit-grid 在 @media(max-width:720px) 里被设成 flex:0 0 auto —— 网格
   自身没有确定高度。iOS WebKit 在这种「无限高」容器里会把两个 fr 行按各自
   内容分别定高；更关键的是 <button> 作为 grid item 在 WebKit 不默认 stretch
   （按钮有 UA 内部盒），于是「没下注、内容少」的上排两卡明显比下排矮一截。
   Chromium 会把两行都取 max-content 最大值，所以桌面调试一直看着是齐的，
   只有苹果真机不齐 —— 这就是反复没修到点上的原因。
   修法两步，任何内核都成立：
     1) 给网格一个确定高度，两行 1fr 严格等分（224 - 6gap = 218 → 每行 109px，
        比原来 99.5px 各高 9.5px，即批注「均匀情况下可以再添加一点点」）；
     2) 四张门卡显式 align/justify-self:stretch + width/height:100%，
        把网格单元填满；宽度由两列 minmax(0,1fr) 保证严格相等。
   只作用于手机竖屏；桌面四列 / 横屏矮屏保持原样。
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) and (orientation: portrait) {
  #viewRoom .suit-grid {
    height: 224px;
    grid-template-rows: repeat(2, minmax(0, 1fr));
  }
  #viewRoom .suit-card:not(.joker) {
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    height: 100%;
    min-height: 0;
  }
}
/* 矮屏（≤700px 高，如 iPhone SE 667）：不额外加高，但仍严格等高 */
@media (max-width: 720px) and (orientation: portrait) and (max-height: 700px) {
  #viewRoom .suit-grid { height: 206px; }
}

/* ══════════════════════════════════════════════════════════════════════
   e536 ①② 苹果端房间页「四卡再加高 + 下注分气泡留缝 + 下两栏下沉」
   （用户 2026-11-14 01:02 截图批注：安卓还好、苹果显示不协调）
   ──────────────────────────────────────────────────────────────────────
   ① 四卡在 e535 已严格等宽等高（109px/行），但真机上看仍偏矮：卡片内
      「我 X 下注分胶囊 / 本门总下注」离卡片下边框太近，四张都像贴在一起，
      而原来那版是有明显缝隙的。网格 224 → 252px（每行 123px，再高 14px），
      并给卡片补上下 padding 兜底 —— 即使 iOS WebKit 对 <button> 的 flex
      auto margin 处理与 Chromium 不同，气泡与边框也至少有 12px 实缝。
   ② 下两栏（座位人数 / 最近开奖·点击对单）由 .table-wrap 第二行撑开，
      .felt 增高后自然整体往下沉；配合 ③ 消掉底部 34px 黑块多出来的 34px
      高度，净效果是「下移约 36px、可用高度不缩水」，座位列表不会被挤没。
   ③ 四卡与「普通/抢注/多门 + 余额筹码气泡」之间原有 8px 缝，视觉上仍贴；
      给 .bet-mode-row 补 8px 上边距（共 16px），气泡不再与卡片连成一块。
   只作用于 iOS 手机竖屏：安卓显示协调，保持 e535 数值不动；桌面/横屏不动。
   矮屏（≤700px 高）保持 206px 不加高，避免把本就紧张的座位栏挤没。
   ══════════════════════════════════════════════════════════════════════ */
@media (max-width: 720px) and (orientation: portrait) {
  html[data-dev="ios"] #viewRoom .suit-grid { height: 252px; }
  html[data-dev="ios"] #viewRoom .suit-card:not(.joker) {
    padding-top: 12px;
    padding-bottom: 12px;
  }
  html[data-dev="ios"] #viewRoom .bet-mode-row { margin-top: 8px; margin-bottom: 0; }
}
/* 矮屏：位置更紧张，保持 e535 的 206px；气泡 padding 与下注行缝隙仍生效 */
@media (max-width: 720px) and (orientation: portrait) and (max-height: 700px) {
  html[data-dev="ios"] #viewRoom .suit-grid { height: 206px; }
}

/* ═══════════════════ e566：设计令牌补全 · 可访问性 · 矮横屏弹层 ═══════════════════
   这一节统一放在样式表末尾做「增量覆盖」，不动上面任何既有规则，
   便于真机回归出问题时单独回滚，也避免分散在 4600 行里到处找。 */
:root {
  /* .chip-custom 等处引用了 var(--text) 但从未定义，之前是继承色；补齐为正文色 */
  --text: #e9eef7;
  --radius-sm: 10px;
  --radius-lg: 18px;
  --sp-1: 4px; --sp-2: 8px; --sp-3: 12px; --sp-4: 16px; --sp-5: 24px;
  --fs-xs: 0.6875rem; --fs-sm: 0.75rem; --fs-md: 0.875rem; --fs-lg: 1rem; --fs-xl: 1.25rem;
  --shadow-1: 0 4px 12px rgba(0, 0, 0, .32);
  --shadow-2: 0 16px 44px rgba(0, 0, 0, .6);
  --shadow-3: 0 30px 70px rgba(0, 0, 0, .6);
  --dur-fast: .16s; --dur: .24s; --dur-slow: .4s;
  --z-float: 40; --z-modal: 50; --z-panel: 60; --z-toast: 9997;
}
/* 键盘焦点：全站统一金色描边。原先大量 outline:none 让键盘 / 遥控器用户
   完全看不出焦点落在哪，输入框也只剩极淡的边框变化。 */
:where(button, a, input, select, textarea, [role="button"], [tabindex]):focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-radius: 6px;
}
/* 尊重系统「减少动态效果」：关闭装饰动画，功能类状态切换不受影响。
   全文件没有 animationend / transitionend 的 JS 依赖，可以安全地全局降级。 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
/* 568×320 这类矮横屏：弹层不再被 overflow:hidden 裁掉，聊天区不再独占整屏 */
.modal-box {
  max-height: calc(100dvh - 24px);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.chat-log { height: min(320px, 42dvh); min-height: 120px; }
/* 最小字号收敛到约 11.7px（根字号 17px × 0.6875），小角标不再糊成一团 */
@media (max-height: 460px) and (orientation: landscape) {
  .tb-item { font-size: 0.6875rem; }
}
.home-acc-label, .home-vip, .ad-pin, .rc-badge, .chat-sender { font-size: 0.6875rem; }
/* 次要文字对比度抬一档，深色面板上更好读 */
.muted { color: #9aa9bf; }

/* ═══════════════════════════════════════════════════════════════════════
   e929 · 用户批注（2026-11-23 设置交易密码截图）：「两个输入框要搞明细一点，
   下方那个都没圆圈别人都不容易看到要输入 2 次密码确认；要搞显眼一点」。
   根因：确认框非激活时 .np-dots.off 被压到 opacity:.4，圆点又是 #e5e5e5 浅灰
   空心圈落白底上，几乎看不见；两组输入框无边框、无序号、标签浅灰小字。
   这里只改 .tp-pwd（交易密码设置/修改弹窗）：卡片式输入槽 + ① ②步骤圆标 +
   状态徽标 + 加深圆点；取消 40% 压暗，第二组始终清晰。赠送确认 / 凭证删除
   的密码框不带 .tp-pwd，保持原样不受影响。
   ═══════════════════════════════════════════════════════════════════════ */
.tp-pwd .tp-hint b { color: var(--gold); font-weight: 500; }
.tp-pwd .tp-field {
  border: 1px solid var(--line);
  background: var(--panel2);
  border-radius: 10px;
  padding: 9px 11px 7px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
}
.tp-pwd .tp-field.is-active { border: 1.5px solid var(--gold); background: rgba(231, 198, 107, .07); }
.tp-pwd .tp-field.is-done:not(.is-active) { border-color: var(--gold); }
.tp-pwd .tp-field.is-done .tp-state { color: #6fcf97; }
.tp-pwd .tp-field-label-row { display: flex; align-items: center; gap: 7px; margin-bottom: 7px; min-width: 0; }
.tp-pwd .tp-step {
  display: inline-flex; align-items: center; justify-content: center;
  flex: 0 0 auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--line); color: var(--ink); font-size: 11px; font-weight: 500;
}
.tp-pwd .tp-field.is-active .tp-step { background: var(--gold); color: #1a1a1a; }
.tp-pwd .tp-field-label-row label { margin: 0; font-size: .75rem; font-weight: 500; color: var(--ink); }
.tp-pwd .tp-state { margin-left: auto; font-size: 11px; font-weight: 400; color: var(--muted); }
.tp-pwd .tp-field.is-active .tp-state { color: var(--gold); }
.tp-pwd .tp-field-tip { margin: 6px 0 0; font-size: 11px; color: var(--gold); }
/* 圆点加深且取消非激活组压暗：空心 #b0b0b0 2px、实心 var(--ink)，6 位始终可见 */
.tp-pwd .np-dots.off { opacity: 1; }
.tp-pwd .np-dot { width: 15px; height: 15px; border: 2px solid #b0b0b0; background: var(--panel); }
.tp-pwd .np-dot.on { background: var(--ink); border-color: var(--ink); }
/* 浅色弹窗（好友/赠送链路）：白底下圆点边框保持可见，序号高亮用金棕 */
.modal-box.is-fr-light .tp-pwd .tp-hint b,
.modal-box.is-fr-light .tp-pwd .tp-field-tip,
.modal-box.is-fr-light .tp-pwd .tp-field.is-active .tp-state { color: #b98c1f; }
.modal-box.is-fr-light .tp-pwd .tp-field { border-color: #d8d8d8; background: #fafafa; }
.modal-box.is-fr-light .tp-pwd .tp-field.is-active { border-color: #d4a72c; background: #fffdf5; }
.modal-box.is-fr-light .tp-pwd .tp-field.is-done:not(.is-active) { border-color: #d4a72c; }
.modal-box.is-fr-light .tp-pwd .tp-field.is-done .tp-state { color: #0f8a55; }
.modal-box.is-fr-light .tp-pwd .tp-step { background: #c9c9c9; color: #fff; }
.modal-box.is-fr-light .tp-pwd .tp-field.is-active .tp-step { background: #d4a72c; color: #fff; }
.modal-box.is-fr-light .tp-pwd .tp-field-label-row label { color: #1a1a1a; }
.modal-box.is-fr-light .tp-pwd .tp-state { color: #888; }
.modal-box.is-fr-light .tp-pwd .np-dot { border-color: #b0b0b0; background: #fff; }
.modal-box.is-fr-light .tp-pwd .np-dot.on { background: #1a1a1a; border-color: #1a1a1a; }
