/* 牛牛俱乐部 Mini App — 深夜赌场 gold-on-near-black.
   单一强调色=金；红仅用于红包/直播；绿/红=输赢。无 AI 紫光、无默认玻璃风。 */

:root {
  --bg: #0b0910;            /* near-black, faint warm */
  --bg-2: #120e18;
  --surface: #181320;
  --surface-2: #201829;
  --line: #2c2436;
  --line-soft: #241d30;

  /* 成熟收敛：金往香槟/黄铜方向压饱和，少一分卡通金 */
  --gold: #d6b25e;
  --gold-hi: #ecd794;
  --gold-lo: #a8813a;
  --gold-ink: #251d0d;     /* text on gold buttons */

  --red: #c23a37;
  --red-hi: #de5b55;
  --red-deep: #6d1b19;

  --win: #57c98a;
  --lose: #e0605c;

  --text: #efe8f2;
  --muted: #9a8fab;
  --faint: #6c6379;

  /* 圆角收紧：少一分泡泡感 */
  --r-sm: 6px;
  --r: 10px;
  --r-lg: 14px;
  --pill: 999px;

  /* 品牌/标题衬线栈（无网络字体，逐级降级；CJK 落宋体系） */
  --font-display: "Palatino", "Palatino Linotype", "Songti SC", "Noto Serif SC", "SimSun", serif;

  --shadow: 0 14px 40px rgba(0,0,0,.45);
  --shadow-soft: 0 6px 18px rgba(0,0,0,.32);
  --gold-grad: linear-gradient(135deg, var(--gold-hi), var(--gold-lo));
  --red-grad: linear-gradient(135deg, var(--red-hi), var(--red-deep));

  --tabbar-h: 62px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; height: 100%; }
body {
  background:
    radial-gradient(120% 55% at 50% -12%, rgba(232,194,87,.10) 0%, transparent 52%),
    radial-gradient(90% 50% at 100% 0%, rgba(122,31,29,.30) 0%, transparent 50%),
    var(--bg);
  color: var(--text);
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior: none;
}

/* phone frame on desktop; edge-to-edge on mobile */
#app {
  max-width: 460px;
  margin: 0 auto;
  /* 锁死为正好一屏高（不是 min-height）：内容多时由各 tab 页内部滚动，
     否则长内容（如钱包流水）会把整个页面撑长，底部 tab 被顶出屏幕外 */
  height: 100dvh;
  /* 全屏模式下让出手机状态栏 + Telegram 悬浮按钮的高度；非全屏时这些变量为 0，无影响 */
  padding-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-left: 1px solid var(--line-soft);
  border-right: 1px solid var(--line-soft);
  overflow: hidden;
}
/* 终审 D1：任何写了 display 的类都会压过 UA 默认的 [hidden]（.btn / .field /
   .rc-order .row / .bk-tile 全是 display:flex）。实机后果：充值第 2 步的
   「转账备注」行在房主没配备注时露出一行空值 + 一颗复制到空串的按钮；
   提现抽屉在选银行之前先露一个空黑方块。agent.html / shareholder.html /
   staff.html 早就各自内联补过这一句，玩家端反而漏了 —— 收回到公共样式里。
   放在最前面：它是**兜底**，后面那些逐个选择器的 [hidden] 规则原样保留不动。 */
[hidden] { display: none !important; }

#main { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#main[hidden] { display: none; }
/* ID 选择器(1,0,1)确保隐藏胜过 .onboard.wz(0,2,0) 的 display:flex，
   否则入场/向导屏在进牌局后不会消失(盖住 #main)。 */
#onboard[hidden], .onboard[hidden] { display: none !important; }

/* ---------- brand / logo ---------- */
.brandmark {
  font-family: var(--font-display);
  font-weight: 700;
  letter-spacing: 2px;
  background: var(--gold-grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 0 rgba(0,0,0,.25);
}

/* ---------- top bar ---------- */
.topbar {
  height: 52px;
  display: flex; align-items: center; gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(11,9,16,.7);
  position: sticky; top: 0; z-index: 30;
}
.topbar .title { font-weight: 800; font-size: 17px; letter-spacing: .5px; }
.topbar .spacer { flex: 1; }
.balance-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 12px; border-radius: var(--pill);
  background: var(--surface-2);
  border: 1px solid var(--line);
  font-variant-numeric: tabular-nums;
  font-weight: 700; font-size: 13px;
}
.balance-chip .coin { color: var(--gold); }

/* ---------- view container ---------- */
.view {
  flex: 1;
  min-height: 0;      /* flex 子项默认不肯缩到内容以下，不加这个内部滚动不生效 */
  overflow-y: auto;
  padding: 16px 16px calc(var(--tabbar-h) + 20px);
  -webkit-overflow-scrolling: touch;
}
.view.no-pad { padding: 0; }
.view[hidden] { display: none; }

/* ---------- bottom tab bar ---------- */
.tabbar {
  position: sticky; bottom: 0; z-index: 30;
  /* 全屏/无边框手机：给 home 条让位（普通模式两个值都是 0，高度不变） */
  height: calc(var(--tabbar-h) + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)));
  padding-bottom: max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px));
  display: grid; grid-template-columns: repeat(5, 1fr);
  background: rgba(14,10,20,.94);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.tabbar button {
  background: none; border: 0; color: var(--faint);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; font-size: 11px; cursor: pointer;
  transition: color .18s ease;
}
.tabbar button .ic { line-height: 1; display: flex; }
.tabbar button .ic svg { width: 21px; height: 21px; }
.tabbar button.active { color: var(--gold); }
.tabbar button:active { transform: translateY(1px); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px; padding: 0 20px; border: 0; border-radius: var(--r);
  font-size: 15px; font-weight: 700; letter-spacing: 1px; cursor: pointer; width: 100%;
  transition: transform .12s ease, filter .12s ease;
  font-family: inherit;
}
.btn:active { transform: translateY(1px) scale(.995); }
.btn-gold { background: var(--gold-grad); color: var(--gold-ink); box-shadow: var(--shadow-soft); }
.btn-gold:disabled { filter: grayscale(.6) brightness(.7); cursor: not-allowed; }
.btn-ghost { background: var(--surface-2); color: var(--text); border: 1px solid var(--line); }
.btn-red { background: var(--red-grad); color: #fff; }
.btn-sm { height: 38px; font-size: 13px; padding: 0 14px; width: auto; }

/* ---------- inputs ---------- */
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 16px; }
.field label { font-size: 12.5px; color: var(--muted); font-weight: 700; letter-spacing: .3px; }
.field .hint { font-size: 12px; color: var(--faint); }
.input {
  height: 48px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--text); padding: 0 14px;
  font-size: 15px; font-family: inherit; width: 100%;
}
.input:focus { outline: none; border-color: var(--gold-lo); box-shadow: 0 0 0 3px rgba(232,194,87,.14); }
.input::placeholder { color: var(--faint); }

/* ---------- card ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); padding: 16px;
}
.card + .card { margin-top: 12px; }

/* ---------- onboarding ---------- */
.onboard {
  padding: 34px 22px calc(var(--tabbar-h) + 20px);
  flex: 1; min-height: 0; overflow-y: auto;   /* #app 锁高后，向导屏超长时自己滚 */
}
.onboard .hero-logo {
  font-size: 54px; font-weight: 900; text-align: center; letter-spacing: 1px; margin: 8px 0 2px;
}
.onboard .hero-sub { text-align: center; color: var(--muted); margin-bottom: 6px; font-size: 13.5px; }
.onboard .plate {
  margin: 22px 0 26px; height: 150px; border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(80% 120% at 20% 0%, rgba(232,194,87,.16), transparent 60%),
    linear-gradient(135deg, #241528, #140d1c);
  display: flex; align-items: center; justify-content: center;
  position: relative; overflow: hidden;
}
.onboard .plate .bull-mark {
  font-family: var(--font-display); font-size: 76px; font-weight: 700; line-height: 1;
  background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 6px 14px rgba(0,0,0,.5));
}
.onboard .plate .ring {
  position: absolute; inset: -40% -10% auto auto; width: 220px; height: 220px;
  border-radius: 50%; background: radial-gradient(circle, rgba(216,67,63,.25), transparent 62%);
}
.stepdots { display: flex; gap: 7px; justify-content: center; margin: 4px 0 18px; }
.stepdots i { width: 7px; height: 7px; border-radius: 50%; background: var(--line); }
.stepdots i.on { background: var(--gold); width: 20px; border-radius: 4px; }

/* ---------- registration wizard ---------- */
.onboard.wz { padding: 26px 22px calc(var(--tabbar-h) + 20px); display: flex; flex-direction: column; }
.wz-brand { text-align: center; font-size: 22px; margin-bottom: 18px; }
.wz-brand .brandmark { font-size: 22px; }

.wz-rail { display: flex; align-items: center; gap: 4px; margin: 0 auto 26px; max-width: 340px; }
/* display:flex 会压掉 HTML hidden 属性——没有这条,四步进度条对已注册玩家也常显 */
.wz-rail[hidden] { display: none; }
.wz-step { display: flex; flex-direction: column; align-items: center; gap: 5px; flex: 0 0 auto; }
.wz-step .dot {
  width: 30px; height: 30px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: var(--surface-2); border: 1px solid var(--line); color: var(--faint); font-weight: 800; font-size: 13px;
}
.wz-step .lb { font-size: 11px; color: var(--faint); font-weight: 700; }
.wz-step.done .dot { background: var(--surface); border-color: var(--gold-lo); color: var(--gold); }
.wz-step.done .dot::after { content: "✓"; }
.wz-step.done .dot { font-size: 0; }
.wz-step.done .dot::after { font-size: 14px; }
.wz-step.active .dot { background: var(--gold-grad); border-color: transparent; color: var(--gold-ink); }
.wz-step.active .lb { color: var(--gold); }
.wz-rail::before { content: none; }
.wz-step + .wz-step { position: relative; }
.wz-step + .wz-step::before {
  content: ""; position: absolute; top: 15px; right: 100%; width: 100%; height: 2px;
  background: var(--line); z-index: -1;
}

.wz-screen { animation: wzin .22s ease; }
.wz-screen[hidden] { display: none; }
@keyframes wzin { from { opacity: 0; transform: translateY(8px); } }
.wz-icon { font-size: 46px; text-align: center; margin: 8px 0 14px; }
.wz-h { font-size: 24px; font-weight: 900; text-align: center; }
.wz-sub { color: var(--muted); text-align: center; font-size: 13.5px; margin: 6px 0 22px; line-height: 1.55; }
.wz-tip {
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
  padding: 11px 14px; color: var(--muted); font-size: 12.5px; margin-bottom: 16px; text-align: center;
}

/* device card */
.dev-card {
  display: flex; align-items: center; gap: 14px; padding: 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); margin-bottom: 20px;
}
.dev-card .dev-ic {
  width: 44px; height: 44px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--line);
  display: flex; align-items: center; justify-content: center; font-size: 20px; flex: 0 0 auto;
}
.dev-card .dev-t { font-size: 12px; color: var(--muted); font-weight: 700; }
.dev-card .dev-id { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; color: var(--gold); word-break: break-all; }

/* pin pad */
.pin-dots { display: flex; gap: 14px; justify-content: center; margin: 6px 0 26px; }
.pin-dots i { width: 14px; height: 14px; border-radius: 50%; background: var(--surface-2); border: 1px solid var(--line); transition: all .12s ease; }
.pin-dots i.on { background: var(--gold); border-color: transparent; box-shadow: 0 0 0 4px rgba(232,194,87,.14); }
.pinpad { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 320px; margin: 0 auto; }
.pinpad button {
  height: 58px; border-radius: var(--r); border: 1px solid var(--line); background: var(--surface);
  color: var(--text); font-size: 22px; font-weight: 800; cursor: pointer; font-family: inherit;
  transition: transform .1s ease, filter .1s ease;
}
.pinpad button:active { transform: translateY(1px) scale(.97); filter: brightness(1.2); }
.pinpad button.pk-ghost { font-size: 14px; font-weight: 700; color: var(--muted); background: var(--surface-2); }

/* ---------- lobby ---------- */
.notice {
  border-radius: var(--r-lg); padding: 16px; margin-bottom: 16px;
  background: linear-gradient(120deg, #3a1220, #221024);
  border: 1px solid var(--red-deep);
  position: relative; overflow: hidden;
}
.notice .kicker { color: var(--gold-hi); font-weight: 700; font-size: 11px; letter-spacing: 3px; }
.notice .big { font-size: 26px; font-weight: 900; margin: 4px 0; }
.notice .big b { color: var(--gold); }
.notice .row { color: var(--muted); font-size: 12.5px; display: flex; gap: 14px; flex-wrap: wrap; margin-top: 6px; }

.gamecard {
  border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden;
  background: linear-gradient(160deg, #221630, #130d1b);
}
.gamecard .top {
  height: 128px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(90% 120% at 30% 0%, rgba(232,194,87,.18), transparent 60%);
  position: relative;
}
.gamecard .top .logo { font-size: 40px; font-weight: 900; }
.gamecard .top .live {
  position: absolute; top: 10px; right: 10px; font-size: 11px; font-weight: 800;
  padding: 3px 9px; border-radius: var(--pill); background: var(--red); color: #fff;
  display: inline-flex; align-items: center; gap: 5px;
}
.gamecard .top .live.off { background: var(--surface-2); color: var(--muted); }
.gamecard .body { padding: 12px 14px 14px; display: flex; align-items: center; gap: 12px; }
.gamecard .body .name { font-weight: 800; font-size: 16px; flex: 1; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.perk-row { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 6px; margin: 14px 0; }
.perk {
  flex: 0 0 auto; padding: 12px 14px; border-radius: var(--r);
  background: var(--surface); border: 1px solid var(--line-soft); min-width: 128px;
}
.perk .n { color: var(--gold); font-weight: 900; font-size: 18px; }
.perk .t { color: var(--muted); font-size: 12px; margin-top: 2px; }

.section-h { font-size: 12px; color: var(--faint); font-weight: 700; letter-spacing: 2.5px; margin: 18px 2px 10px; }

/* ---------- chat / game room ---------- */
/* 牌桌页做成 flex 列容器，让 chat-wrap 用 flex 填满（height:100% 在
   flex 项父级上无法解析→聊天区塌成内容高、下方留黑）。ID 特异性(1,0,1)
   保证隐藏胜过 #v-table 的 display:flex。 */
#v-table { display: flex; flex-direction: column; min-height: 0; }
#v-table[hidden] { display: none; }
.chat-wrap { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }

/* 牌桌座舱（2026-08-25 方案A）：状态条 + 骰子面板常驻顶部，聊天在下面滚 */
.cockpit { flex: none; border-bottom: 1px solid var(--line-soft); background: var(--bg-2); }
.strip {
  display: flex; align-items: center; gap: 8px; padding: 8px 12px;
  font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden;
}
.strip .state-badge {
  flex: none; font-size: 11px; font-weight: 800; padding: 3px 10px;
  border-radius: var(--pill); background: var(--surface-2);
  border: 1px solid var(--line); color: var(--muted); letter-spacing: .05em;
}
.strip .state-badge.live { background: var(--gold-grad); color: var(--gold-ink); border-color: transparent; }
.strip .s-mid { overflow: hidden; text-overflow: ellipsis; }
.strip .s-mid b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.strip .s-right { margin-left: auto; flex: none; color: var(--faint); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dicepanel {
  padding: 10px 12px 13px; text-align: center;
  background: radial-gradient(ellipse 90% 130% at 50% -30%, rgba(214,178,94,.09), transparent 60%);
}
.dicepanel .dice { display: flex; gap: 12px; justify-content: center; }
.dicepanel .die { width: 46px; height: 46px; filter: drop-shadow(0 3px 8px rgba(0,0,0,.5)); }
.dicepanel .dp-lbl { color: var(--faint); font-size: 11.5px; margin-top: 8px; letter-spacing: .04em; }
.chat-scroll {
  flex: 1; overflow-y: auto; padding: 14px 14px 8px;
  display: flex; flex-direction: column; gap: 10px;
  -webkit-overflow-scrolling: touch;      /* iOS 惯性滚动，消除卡顿 */
  overscroll-behavior: contain;           /* 不把滚动传给外层，防橡皮筋 */
}

.msg { display: flex; gap: 9px; max-width: 88%; }
.msg .av {
  width: 34px; height: 34px; border-radius: 10px; flex: 0 0 auto;
  display: flex; align-items: center; justify-content: center; font-size: 17px;
  background: var(--surface-2); border: 1px solid var(--line);
}
.msg.sys .av { background: var(--gold-grad); color: var(--gold-ink); font-weight: 900; }
.msg .bubble {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: 4px 14px 14px 14px; padding: 9px 12px; font-size: 14px;
  white-space: pre-wrap; word-break: break-word;
}
.msg.sys .bubble { border-color: var(--line); }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg.me .bubble { background: linear-gradient(135deg, #35507a, #223354); border-color: #3d5b86; border-radius: 14px 4px 14px 14px; }
.msg.me .av { background: #2a3d5e; }
.msg.peer .av { background: linear-gradient(135deg, #4a3a6a, #2e2440); color: #e9dfff; }
.msg .who { font-size: 11px; color: var(--faint); margin: 0 0 3px 2px; }

/* red packet card —— 问题清单 #16（房主要的那种聊天红包卡，
   按房主给的参考图做）：横向聊天气泡 —— 橙色卡面，左边一枚小红包图标，右边两行白字，
   底下一条白色细条。纯 CSS：不用图片、不用外链、不用 backdrop-filter / :has()
   （安卓与 iOS 的 Telegram WebView 都要画得出来）。深色模式不换色 —— 红包就是红的。
   结构钩子（.packet / .pk-title / .pk-sub / .pk-more / .pk-coin + dataset）与点击
   行为一个字没动，只换外观。 */
.packet {
  /* 同 .betcard：围观者那张卡副标题有两行，被压扁就只露一行半（实机截图）。 */
  flex: none;
  align-self: center; width: 100%; max-width: 330px; min-height: 120px;
  border-radius: 10px; overflow: hidden; position: relative; cursor: pointer;
  background: linear-gradient(180deg, #fa9e3c 0%, #f89a40 54%, #f7a34b 100%);
  border: 1px solid rgba(150,74,10,.22); color: #fff;
  box-shadow: 0 6px 16px rgba(120,60,10,.30);
  display: flex; flex-direction: column;
}
/* 上半：小红包图标 + 两行字 */
.packet .pk-body {
  flex: 1 1 auto; display: flex; align-items: center; gap: 12px; padding: 14px 14px 12px;
}
/* 左边那枚小红包：红信封（.pk-coin）+ 一道浅色封口弧（::before）+ 金圆「牛」 */
.packet .pk-coin {
  flex: 0 0 auto; position: relative; overflow: hidden;
  width: 56px; height: 70px; border-radius: 6px;
  background: linear-gradient(180deg, #ec4b41 0%, #e8433a 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 2px 6px rgba(120,20,14,.30), 0 1px 0 rgba(255,255,255,.18) inset;
  transition: transform .08s ease;
}
.packet .pk-coin::before {
  content: ""; position: absolute; left: -10%; right: -10%; top: 0; height: 24px;
  background: linear-gradient(180deg, #f4685c, #ef5a4e);
  border-radius: 0 0 50% 50% / 0 0 13px 13px; pointer-events: none;
}
.packet .pk-coin-n {
  position: relative; z-index: 1;
  width: 26px; height: 26px; border-radius: 50%;
  background: linear-gradient(160deg, #f8d66b, #e9bd52); color: #9e2b1e;
  font-family: var(--font-display); font-weight: 700; font-size: 14px;
  line-height: 26px; text-align: center;
  box-shadow: 0 1px 0 rgba(255,255,255,.55) inset;
}
.packet .pk-txt { flex: 1 1 auto; min-width: 0; }
.packet .pk-title {
  font-family: var(--font-display); font-weight: 700; font-size: 16.5px; line-height: 1.35;
  color: #FFF6E4; letter-spacing: .02em; text-shadow: 0 1px 0 rgba(150,70,10,.35);
}
/* 第二行 = 动作字（能抢的卡「领取红包」；另两态是原来那两句长话，要能换行） */
.packet .pk-sub {
  margin-top: 5px; font-size: 12px; line-height: 1.5;
  color: rgba(255,255,255,.93); word-break: break-word;
}
.packet .pk-sub-shut { display: none; }
/* 下半：白色细条，左边店名、右边「看领取榜」（没资格的卡是一颗灰点） */
.packet .pk-foot {
  flex: 0 0 auto; min-height: 34px; background: #fff;
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 0 12px;
}
.packet .pk-brand { font-size: 11.5px; color: #a9a9a9; letter-spacing: .02em; }
.packet .pk-dot {
  width: 13px; height: 13px; border-radius: 50%; background: #e4e4e4; flex: 0 0 auto;
}
/* 「看领取榜」次按钮：卡片主体照旧跳 TNG，这一颗只开榜（app.js 拦了冒泡） */
.packet .pk-more {
  background: none; border: 0; padding: 4px 0; cursor: pointer;
  font-family: inherit; font-size: 11.5px; font-weight: 700; line-height: 1.2;
  color: #c9803a; text-decoration: underline; text-underline-offset: 3px;
  transition: transform .08s ease;
}
/* 三态（判据全用既有那几个 dataset，前端不新造）：
   ① data-nolink = 服务端没给链接（本局未下注 / 代包手窗口内那张等待卡）；
   ② data-locked = lockPacketCards 关窗时写的那一笔（代包手的卡不写）。
   两态都整卡降饱和，锁定的那一态再把第二行换成「已关闭」。 */
.packet[data-nolink="1"], .packet[data-locked="1"] { filter: saturate(.35); }
.packet[data-locked="1"] .pk-sub-t { display: none; }
.packet[data-locked="1"] .pk-sub-shut { display: inline; }
/* 按下去只缩那枚小红包 0.96（transform，不加任何延时/动画挡在跳转前面） */
.packet:active .pk-coin { transform: scale(.96); }
.packet .pk-more:active { transform: scale(.96); }
@media (prefers-reduced-motion: reduce) {
  .packet:active .pk-coin, .packet .pk-more:active { transform: none; }
}

/* dice */
.dice-row { align-self: center; display: flex; gap: 12px; padding: 6px 0; }
.die {
  width: 46px; height: 46px; border-radius: 10px; background: #f4f0e8; color: #1a1a1a;
  display: flex; align-items: center; justify-content: center; font-size: 34px; font-weight: 400;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,.14), 0 6px 14px rgba(0,0,0,.4);
}

/* settlement board */
.board {
  align-self: stretch; background: var(--surface); border: 1px solid var(--gold-lo);
  border-radius: var(--r); padding: 14px; font-size: 13px; white-space: pre-wrap;
  font-variant-numeric: tabular-nums;
}
.board .bd-h {
  color: var(--gold); font-weight: 700; letter-spacing: 3px;
  font-family: var(--font-display);
  margin-bottom: 8px; padding-bottom: 6px;
  border-bottom: 1px solid rgba(214,178,94,.35);
}

/* composer */
.composer {
  border-top: 1px solid var(--line); padding: 10px 12px calc(10px + env(safe-area-inset-bottom));
  display: flex; gap: 8px; align-items: center; background: rgba(11,9,16,.9);
}
.composer .input { height: 44px; }
.composer .send { flex: 0 0 auto; width: 44px; height: 44px; border-radius: 12px; padding: 0; }
.composer .hint-bar {
  position: absolute; bottom: 100%; left: 0; right: 0; padding: 6px 14px;
  background: var(--surface-2); border-top: 1px solid var(--line-soft);
  font-size: 12px; color: var(--muted);
}
/* 快捷键栏：正常排在聊天与输入框之间(不再绝对定位盖住聊天)；无按钮时收起 */
.quick {
  display: flex; gap: 7px; overflow-x: auto; flex: 0 0 auto;
  padding: 8px 12px; background: var(--surface-2); border-top: 1px solid var(--line-soft);
}
.quick:empty { display: none; }
.quick button {
  flex: 0 0 auto; height: 32px; padding: 0 12px; border-radius: var(--pill);
  background: var(--surface-2); border: 1px solid var(--line); color: var(--text);
  font-size: 12.5px; font-weight: 700; cursor: pointer; font-family: inherit;
}
.quick .q-note {
  flex: 0 0 auto; display: flex; align-items: center; height: 32px;
  color: var(--muted); font-size: 12.5px; font-weight: 600;
}

/* ---------- wallet ---------- */
.wallet-hero {
  border-radius: var(--r-lg); padding: 22px; text-align: center;
  background: linear-gradient(150deg, #241528, #130d1b); border: 1px solid var(--gold-lo);
  margin-bottom: 16px;
}
.wallet-hero .lbl { color: var(--muted); font-size: 12.5px; }
.wallet-hero .amt { font-family: var(--font-display); font-size: 40px; font-weight: 700; color: var(--gold); font-variant-numeric: tabular-nums; margin: 4px 0; }
.wallet-hero .frozen { color: var(--faint); font-size: 12.5px; }
.ledger-row {
  display: flex; align-items: center; gap: 12px; padding: 13px 4px; border-bottom: 1px solid var(--line-soft);
}
.ledger-row .lt { flex: 1; }
.ledger-row .lt .k { font-weight: 700; font-size: 14px; }
.ledger-row .lt .ts { color: var(--faint); font-size: 11.5px; }
.ledger-row .delta { font-weight: 800; font-variant-numeric: tabular-nums; }
.ledger-row .delta.pos { color: var(--win); }
.ledger-row .delta.neg { color: var(--lose); }

/* 钱包：每局明细展开面板（点流水行展开）+ 返水明细共用 */
.round-det {
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); padding: 8px 12px; margin: 4px 0 8px;
  font-size: 13px;
}
.round-det .rd-row {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 4px 0; color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.round-det .rd-row .pos { color: var(--win); font-weight: 700; }

/* 钱包：充值/下分动作 + 申请状态 */
.wallet-setpin {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 10px 12px; margin-bottom: 10px; border-radius: var(--r);
  background: var(--surface-2); border: 1px solid var(--gold-lo);
  color: var(--gold); font-size: 12.5px; font-weight: 700;
}
.wallet-setpin[hidden] { display: none; }
.wallet-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 8px; }
.wallet-note { color: var(--faint); font-size: 11.5px; text-align: center; margin-bottom: 6px; }
.req-row {
  display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line-soft);
}
.req-row .rq-l { flex: 1; }
.req-row .rq-l .k { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; }
.req-row .rq-l .ts { color: var(--faint); font-size: 11.5px; }
.req-row .rq-s { font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: var(--pill); }
.req-row .rq-s.pending { color: var(--gold); background: var(--gold-lo); }
.req-row .rq-s.approved { color: var(--win); background: rgba(45,180,120,.14); }
.req-row .rq-s.rejected { color: var(--lose); background: rgba(220,80,90,.14); }

/* 弹窗（充值/下分申请）*/
.modal {
  position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,.6); padding: 24px;
}
.modal[hidden] { display: none; }
.modal-card {
  width: 100%; max-width: 360px; border-radius: var(--r-lg); padding: 20px;
  background: var(--surface); border: 1px solid var(--gold-lo); box-shadow: var(--shadow);
}
.modal-title { font-family: var(--font-display); font-weight: 700; font-size: 17px; letter-spacing: 2px; margin-bottom: 14px; color: var(--gold); }
.modal-card .grid2, .pv-body .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }

/* ---------- profile ---------- */
/* ---------- 个人主页（v38）：身份区 + 账号安全 + 功能宫格 ---------- */
.prof {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 18px 16px; margin: -4px -4px 16px; border-radius: var(--r-lg);
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 130% at 88% -20%, rgba(214,178,94,.16) 0%, transparent 58%),
    var(--surface);
  overflow: hidden;
}
.prof::after {            /* 右上角一枚极淡的牌花，替代吉祥物做视觉重心 */
  content: "牛"; position: absolute; right: -6px; top: -18px;
  font-family: var(--font-display); font-size: 96px; font-weight: 700;
  color: var(--gold); opacity: .05; pointer-events: none;
}
.prof-plate {
  position: relative; flex: none; width: 62px; height: 62px; border-radius: 50%;
  border: 1px solid var(--gold-lo); background: var(--surface-2);
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.prof-plate .pav {
  font-family: var(--font-display); font-size: 26px; font-weight: 700; color: var(--gold);
}
.prof-plate .pav-img { width: 100%; height: 100%; object-fit: cover; }
.prof-id { flex: 1; min-width: 0; }
.prof-id .pn { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.prof-id .pm { color: var(--muted); font-size: 12px; margin-top: 2px; font-variant-numeric: tabular-nums; }
.prof-id .pm .copy-hint { color: var(--gold-lo); margin-left: 8px; cursor: pointer; }
.prof-id .pr { color: var(--faint); font-size: 11.5px; margin-top: 3px; letter-spacing: .04em; }
.prof-meta { flex: none; text-align: right; color: var(--muted); font-size: 11.5px; line-height: 1.8; }
.prof-meta b { color: var(--gold); font-variant-numeric: tabular-nums; }

.sec-h {
  display: flex; align-items: center; font-family: var(--font-display);
  font-size: 14px; font-weight: 700; margin: 18px 0 10px;
}
.sec-h::after { content: ""; flex: 1; height: 1px; margin-left: 10px; background: var(--line); }
.sec-h .sec-score { order: 3; margin-left: 10px; font-size: 12px; color: var(--gold); }

.sec-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.sec-card {
  position: relative; text-align: center; padding: 14px 6px 11px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
}
.sec-card .sc-ic { display: block; color: var(--muted); }
.sec-card .sc-ic svg { width: 24px; height: 24px; }
.sec-card .sc-t { font-size: 12.5px; font-weight: 700; margin-top: 7px; }
.sec-card .sc-s { font-size: 11px; color: var(--faint); margin-top: 2px; }
.sec-card.ok { border-color: var(--gold-lo); }
.sec-card.ok .sc-ic { color: var(--gold); }
.sec-card.ok .sc-s { color: var(--gold-lo); }
.sec-card.ok::before {
  content: "✓"; position: absolute; top: 8px; right: 9px;
  font-size: 11px; font-weight: 800; color: var(--gold);
}

.fn-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.fn {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 16px 4px; font-size: 12.5px; font-weight: 600; color: var(--text);
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r); cursor: pointer; font-family: inherit;
}
.fn:active { transform: translateY(1px); }
.fn .fn-ic { color: var(--gold); }
.fn .fn-ic svg { width: 25px; height: 25px; display: block; }
/* 「我的报表」只对股东显示：.fn 的 display:flex 会压过 UA 的 [hidden]，必须显式收掉 */
.fn[hidden] { display: none; }

/* 弹窗内的小列表（推广 / 对局记录 / 玩法说明 共用） */
.sh-row { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13.5px; }
.sh-row:last-child { border-bottom: none; }
.sh-row .k { color: var(--muted); }
.sh-row .v { font-weight: 700; font-variant-numeric: tabular-nums; }
.sh-code {
  text-align: center; font-family: var(--font-display); font-size: 30px; font-weight: 700;
  color: var(--gold); letter-spacing: .16em; padding: 10px 0 4px;
}
.sh-note { color: var(--faint); font-size: 11.5px; line-height: 1.7; margin-top: 10px; }
.list-item {
  display: flex; align-items: center; gap: 12px; padding: 15px 14px;
  background: var(--surface); border: 1px solid var(--line-soft); border-radius: var(--r);
  margin-bottom: 10px; font-size: 14.5px; font-weight: 600;
}
.list-item .ic { font-size: 18px; }
.list-item .val { margin-left: auto; color: var(--muted); font-weight: 700; }

/* ---------- empty / toast ---------- */
.empty { text-align: center; color: var(--faint); padding: 46px 20px; }
.empty .e-ic { font-size: 40px; opacity: .5; }
.empty .e-mark { font-size: 15px; letter-spacing: 10px; color: var(--gold-lo); opacity: .55; margin-bottom: 8px; }
.toast-host { position: fixed; left: 0; right: 0; bottom: calc(var(--tabbar-h) + 14px); display: flex; justify-content: center; z-index: 60; pointer-events: none; }
.toast {
  background: #2a2233; color: var(--text); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: var(--pill); font-size: 13.5px; box-shadow: var(--shadow);
  animation: toastin .2s ease; max-width: 90%;
}
@keyframes toastin { from { opacity: 0; transform: translateY(8px); } }

/* dim overlay */
.overlay {
  position: absolute; inset: 0; z-index: 50; background: rgba(6,4,10,.82);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.overlay[hidden] { display: none; }

/* 红包领取榜（按抢包先后） */
/* 拍板 49：领取榜顶上那一行小字（实时榜是读包机快照，账以结算为准） */
.pg-note { font-size: 11.5px; color: var(--faint); margin: -4px 0 8px; }
.pg-list { max-height: 55dvh; overflow-y: auto; margin-bottom: 12px; }
.pg-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid rgba(255,255,255,.07);
  font-size: 14px;
}
.pg-row:last-child { border-bottom: none; }
.pg-n { width: 22px; text-align: center; color: var(--faint); font-variant-numeric: tabular-nums; }
/* 实机 D-X2：整条 .pg-name 原来是一个省略号盒子，名字和「你 / 代 / 窗口外（不计牌面）」
   全挤在里面 —— 被砍掉的永远是排在最后的那一个，也就是「窗口外（不计牌面）」。
   那句话是代包规则的关键（看不到它，玩家以为自己那包算牌面，开牌对不上就来吵）。
   改成：名字自己一个可截断的盒子(.pg-nm)，标签是不可截断的兄弟(.pg-tag)。
   要截就截名字 —— 名字截了无所谓，这句话一个字都不能少。
   min-width:0 不能省：没有它 flex 子项不肯缩，被挤出去的还是标签。 */
/* 修补轮1 M1：上一版只保证「不会被**省略号**吃掉」，没保证「不会被切」——
   `.pg-tag{flex:none}` 让标签不缩，三个标签一起出现时（me + proxy + late 是三个独立判断）
   合计约 170px，而 390px 下盒宽 196px：有余量但不宽裕，**320px 的机子会溢出**，
   再被 `.pg-name` 自己的 `overflow:hidden` 无声硬切（连省略号都没有，更难察觉）。
   改成挤不下就**换行**：行变高一点，字一个不少。`overflow:hidden` 一并去掉 ——
   `.pg-nm` 自己有一份，留在这里只会在极端情况下偷偷切字。 */
.pg-name { flex: 1; min-width: 0; display: flex; align-items: center;
  flex-wrap: wrap; gap: 4px; row-gap: 2px;
  font-weight: 700; letter-spacing: .3px; }
.pg-nm { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pg-tag { flex: none; white-space: nowrap; font-size: 11px; font-weight: 600; }
.pg-tag.mine, .pg-tag.proxy { color: var(--gold); }
.pg-tag.late { color: var(--faint); }
.pg-amt { color: var(--gold); font-weight: 900; font-variant-numeric: tabular-nums; }

/* 本局下注榜（座舱数据驱动的活卡片，每局一张留在聊天流里当记录） */
.betcard {
  /* 实机：聊天超过一屏时这张卡被 flex 压成 2 像素（撑开是 146px）——
     它是聊天流(flex column)的直接子元素，默认 flex-shrink:1 会一路被压扁，
     而自己 overflow:hidden，压没了连滚动条都没有。flex:none = 不许被压。 */
  flex: none;
  align-self: flex-start; margin-left: 38px; min-width: 232px; max-width: 84%;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-radius: var(--r-lg); overflow: hidden;
}
.betcard .bh {
  display: flex; justify-content: space-between; gap: 12px; padding: 9px 13px 7px;
  font-size: 11.5px; color: var(--faint); border-bottom: 1px solid var(--line-soft);
  letter-spacing: .04em; font-variant-numeric: tabular-nums;
}
.betcard .brow { display: flex; align-items: center; gap: 8px; padding: 7px 13px; font-size: 13px; }
.betcard .brow + .brow { border-top: 1px solid rgba(36,29,48,.6); }
.betcard .bav {
  flex: none; width: 22px; height: 22px; border-radius: 50%; background: var(--surface-2);
  color: var(--muted); font-size: 11px; display: flex; align-items: center; justify-content: center;
}
.betcard .amt { margin-left: auto; color: var(--gold); font-variant-numeric: tabular-nums; }
.betcard .tag-sh {
  font-size: 10px; color: var(--gold-ink); background: var(--gold-grad);
  border-radius: 3px; padding: 1px 5px; font-weight: 700;
}
.betcard.done { opacity: .55; }

/* 右侧浮动快捷键（领取榜 / 只看牌局）——放右侧中部（用户定），偏下够不着 */
.floaters {
  position: absolute; right: 10px; top: 45%; transform: translateY(-50%);
  z-index: 6; display: flex; flex-direction: column; gap: 10px;
}
.fl {
  width: 52px; padding: 8px 0 7px; border-radius: 12px;
  background: rgba(24,19,32,.92); border: 1px solid rgba(214,178,94,.4);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--gold); font-size: 10.5px; cursor: pointer; font-family: inherit;
  box-shadow: var(--shadow-soft); -webkit-tap-highlight-color: transparent;
}
.fl svg { width: 19px; height: 19px; }
.fl.on { background: var(--gold-grad); color: var(--gold-ink); border-color: transparent; }

/* 气泡小时间 + 只看牌局过滤 */
.bubble .bt { margin-left: 8px; color: var(--faint); font-size: 10px; font-variant-numeric: tabular-nums; }
.msg.me .bubble .bt { color: rgba(255,255,255,.5); }
.chat-scroll.only-game .msg.peer, .chat-scroll.only-game .msg.me { display: none; }

/* 余额隐藏眼睛（顶栏 + 钱包页共用；点一下把余额换成圆点，防旁人瞄） */
.eye-toggle { background: none; border: 0; padding: 0 2px; margin: 0; cursor: pointer;
  color: var(--faint); display: inline-flex; align-items: center; position: relative;
  vertical-align: middle; -webkit-tap-highlight-color: transparent; }
.eye-toggle svg { width: 15px; height: 15px; display: block; }
.eye-toggle.off { color: var(--gold); }
.eye-toggle.off::after { content: ""; position: absolute; left: 1px; right: 1px; top: 50%;
  height: 1.6px; background: currentColor; border-radius: 2px; transform: rotate(-22deg); }
.wallet-hero .lbl .eye-toggle { margin-left: 4px; }

/* 邀请二维码（推广页）：QR 必须暗码亮底才扫得动，故图片坐白底 */
.qr-wrap { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 16px 0 6px; }
.qr-img { width: 180px; height: 180px; background: #fff; padding: 10px; border-radius: var(--r);
          box-shadow: var(--shadow-soft); image-rendering: pixelated; }
.qr-cap { color: var(--faint); font-size: 11.5px; text-align: center; max-width: 240px; line-height: 1.6; }
.qr-acts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 4px 0 12px; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ===== 体验一批（v23）：编辑资料 / 预置头像 / 设置区 / 新手引导 ===== */
.prof-edit {
  position: absolute; right: 12px; bottom: 10px; z-index: 2;
  background: none; border: 1px solid var(--gold-lo); color: var(--gold-lo);
  border-radius: 999px; padding: 3px 12px; font-size: 11px; cursor: pointer;
  font-family: inherit; -webkit-tap-highlight-color: transparent;
}
.prof-plate .pav-svg { width: 30px; height: 30px; color: var(--gold); display: flex; }
.prof-plate .pav-svg svg { width: 100%; height: 100%; }

/* 气泡里的预置头像图案 / 主题头像图 */
.msg .av svg { width: 17px; height: 17px; }
.msg .av { overflow: hidden; }
.msg .av img.avp { width: 100%; height: 100%; object-fit: cover; display: block; }

/* 设置区 */
.set-list { border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.set-row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; padding: 13px 14px; background: var(--surface);
  border: 0; border-bottom: 1px solid var(--line); color: var(--text);
  font-size: 13.5px; font-family: inherit; text-align: left;
}
.set-row:last-child { border-bottom: 0; }
.set-row .set-v { color: var(--muted); font-size: 12.5px; }
.set-row .set-soon { font-style: normal; color: var(--faint); font-size: 11px; margin-left: 8px; }
.set-row .set-sub { display: block; font-style: normal; color: var(--faint); font-size: 11px; margin-top: 2px; }
.set-link { cursor: pointer; -webkit-tap-highlight-color: transparent; }
.sw {
  flex: none; width: 42px; height: 24px; border-radius: 999px; position: relative;
  background: var(--surface-2); border: 1px solid var(--line); cursor: pointer;
  transition: background .15s, border-color .15s; -webkit-tap-highlight-color: transparent;
}
.sw .knob {
  position: absolute; top: 2.5px; left: 3px; width: 17px; height: 17px;
  border-radius: 50%; background: var(--muted); transition: left .15s, background .15s;
}
.sw.on { background: var(--gold-grad); border-color: transparent; }
.sw.on .knob { left: 21px; background: var(--gold-ink); }

/* 编辑资料：头像九宫格 */
.av-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 9px; }
.ed-av {
  position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden;
  border: 1.5px solid var(--line); background: var(--surface-2); color: var(--gold);
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  padding: 0; -webkit-tap-highlight-color: transparent;
}
.ed-av svg { width: 55%; height: 55%; }
.ed-av img { width: 100%; height: 100%; object-fit: cover; }
.ed-av .ed-ch { font-family: var(--font-display); font-size: 20px; font-weight: 700; }
.ed-av i {
  position: absolute; right: 0; bottom: 0; left: 0; font-style: normal;
  font-size: 9px; color: var(--gold-ink); background: rgba(214,178,94,.85);
  text-align: center; line-height: 1.4;
}
.ed-av.sel { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(214,178,94,.35); }

/* 新手引导 */
.g-card { text-align: center; }
.g-t { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--gold); margin: 6px 0 10px; }
.g-b { color: var(--muted); font-size: 13.5px; line-height: 1.8; min-height: 88px; text-align: left; }
.g-dots { display: flex; justify-content: center; gap: 7px; margin: 12px 0 16px; }
.g-dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--line); }
.g-dots i.on { background: var(--gold); }

/* 语言切换（设置弹窗内） */
.lang-pick { display: flex; gap: 8px; }
.lang-pick button {
  background: var(--surface-2); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 4px 14px; font-size: 12.5px; font-family: inherit;
  cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.lang-pick button.on { background: var(--gold-grad); color: var(--gold-ink); border-color: transparent; font-weight: 700; }

/* ===== 语言批（v25）：开屏选语言 ===== */
.lp-modal { z-index: 60; }               /* 压过新手引导等其余弹层 */
.lp-card { text-align: center; }
.lp-logo {
  width: 52px; height: 52px; margin: 4px auto 12px; border-radius: 16px;
  background: var(--gold-grad); color: var(--gold-ink);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-size: 26px; font-weight: 900;
}
.lp-t { font-family: var(--font-display); font-size: 18px; font-weight: 700; margin-bottom: 16px; }
.lp-wrap { display: flex; flex-direction: column; gap: 10px; }
.lp-wrap.en-first { flex-direction: column-reverse; }   /* 英文机把 English 排上面 */
.lp-btn {
  padding: 14px; border-radius: var(--r-lg); font-size: 16px; font-weight: 700;
  font-family: inherit; cursor: pointer; -webkit-tap-highlight-color: transparent;
  background: var(--surface-2); border: 1.5px solid var(--line); color: var(--text);
}
.lp-btn:active { transform: scale(.98); }
.lp-hint { color: var(--faint); font-size: 11px; margin-top: 14px; }

/* ===== v49（学 68）：阶段条秒表 + 行动按钮 + 抢包禁言 ===== */
.strip .s-timer {
  flex: none; font-variant-numeric: tabular-nums; font-size: 12px;
  color: var(--text);
}
.strip .s-timer b {
  font-family: var(--font-display); font-size: 15px; font-weight: 800;
  color: var(--gold);
}
.strip .s-timer.urgent b { color: var(--lose); }
.strip .s-timer.urgent { animation: ckpulse 1s steps(2, jump-none) infinite; }
@keyframes ckpulse { 50% { opacity: .55; } }
.strip .s-act {
  flex: none; margin-left: 6px; padding: 4px 13px; border-radius: var(--pill);
  background: var(--gold-grad); color: var(--gold-ink); border: 0;
  font-size: 12px; font-weight: 800; font-family: inherit; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.strip .s-act:active { transform: scale(.96); }
.composer .input:disabled {
  opacity: .55; background: var(--surface-2); color: var(--faint);
}
.composer .send:disabled { opacity: .35; pointer-events: none; }

/* ---------- 充值收款台（68 式三步，v52）---------- */
.rc-card { max-width: 400px; max-height: 88vh; overflow-y: auto; position: relative; }
.rc-x {
  position: absolute; top: 10px; right: 12px; width: 32px; height: 32px;
  border: 0; border-radius: 50%; background: var(--surface-2);
  color: var(--muted); font-size: 18px; line-height: 1; cursor: pointer;
}
.rc-head { display: flex; align-items: center; justify-content: space-between; margin: 0 34px 12px 0; }
.rc-hist-btn {
  border: 0; background: none; color: var(--gold); font-size: 13px;
  font-weight: 700; font-family: inherit; cursor: pointer; padding: 4px 6px;
}
.rc-steps { display: flex; align-items: center; gap: 6px; margin-bottom: 16px; }
.rc-step { display: flex; flex-direction: column; align-items: center; gap: 4px; flex: none; }
.rc-step i {
  width: 26px; height: 26px; border-radius: 50%; font-style: normal;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800;
  background: var(--surface-2); color: var(--faint); border: 1px solid var(--line);
}
.rc-step span { font-size: 10.5px; color: var(--faint); white-space: nowrap; }
.rc-step.on i { background: var(--gold-grad); color: var(--gold-ink); border: 0; }
.rc-step.on span { color: var(--gold); }
.rc-bar { flex: 1; height: 1px; background: var(--line); margin-bottom: 16px; }
.rc-lbl { font-size: 12.5px; color: var(--gold); font-weight: 800; letter-spacing: 1px; margin: 12px 0 8px; }
.rc-methods { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.rc-m {
  position: relative; border-radius: var(--r); padding: 12px 8px 10px;
  background: var(--surface-2); border: 1px solid var(--line);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  text-align: center;
}
.rc-m b { font-size: 12.5px; }
.rc-m span { font-size: 10.5px; color: var(--faint); }
.rc-m.off { opacity: .45; }
.rc-m.sel { border-color: var(--gold); background: var(--surface); }
.rc-m .ck {
  position: absolute; top: -7px; right: -7px; width: 18px; height: 18px;
  border-radius: 50%; background: var(--gold-grad); color: var(--gold-ink);
  font-size: 11px; font-style: normal; font-weight: 900;
  display: flex; align-items: center; justify-content: center;
}
.rc-amt {
  width: 100%; height: 58px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface); color: var(--gold-hi); padding: 0 14px;
  font-size: 30px; font-weight: 900; font-family: inherit; text-align: center;
}
.rc-amt:focus { outline: none; border-color: var(--gold-lo); }
.rc-amt::placeholder { color: var(--faint); }
.rc-chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 10px; }
.rc-chips button {
  height: 40px; border-radius: var(--pill); border: 1px solid var(--line);
  background: var(--surface-2); color: var(--text); font-size: 14px;
  font-weight: 700; font-family: inherit; cursor: pointer;
}
.rc-chips button:active { border-color: var(--gold); color: var(--gold); }
.rc-note { font-size: 12px; color: var(--faint); line-height: 1.6; margin-top: 12px; }
.rc-next { width: 100%; margin-top: 14px; }
.rc-order {
  border-radius: var(--r); border: 1px solid var(--line-soft);
  background: var(--surface-2); padding: 4px 12px; margin-top: 4px;
}
.rc-order .row {
  display: flex; align-items: center; gap: 8px; padding: 10px 0;
  border-bottom: 1px solid var(--line-soft); font-size: 13.5px;
}
.rc-order .row:last-child { border-bottom: 0; }
.rc-order .row span { color: var(--muted); flex: none; min-width: 62px; }
.rc-order .row b { flex: 1; text-align: right; word-break: break-all; color: var(--gold-hi); }
.rc-copy {
  flex: none; border: 1px solid var(--gold-lo); background: none;
  color: var(--gold); border-radius: var(--pill); padding: 3px 10px;
  font-size: 11.5px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.rc-copy:active { transform: scale(.95); }
.rc-count { text-align: center; color: var(--gold); font-weight: 800; font-size: 13.5px; margin-top: 12px; }
.rc-up {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  min-height: 130px; border-radius: var(--r); border: 1.5px dashed var(--line);
  background: var(--surface-2); cursor: pointer; padding: 10px; gap: 8px;
}
.rc-up img { max-width: 100%; max-height: 180px; border-radius: 8px; }
.rc-up span { color: var(--faint); font-size: 13px; }
.rc-pane .field { margin-top: 12px; }
.rc-ok {
  width: 64px; height: 64px; border-radius: 50%; margin: 18px auto 12px;
  background: var(--gold-grad); color: var(--gold-ink);
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 900;
}
.rc-ok-t { text-align: center; font-size: 16px; font-weight: 800; color: var(--gold); }
.rc-fine { text-align: center; font-size: 10.5px; color: var(--faint); margin-top: 12px; }
.rc-h-row {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 2px; border-bottom: 1px solid var(--line-soft); font-size: 13px;
}
.rc-h-row .lt { display: flex; flex-direction: column; gap: 2px; }
.rc-h-row .lt span { color: var(--faint); font-size: 11.5px; }
.rc-h-row .rt { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.rc-h-row .st { color: var(--gold); font-weight: 700; font-size: 12px; }
.rc-h-row .ts { color: var(--faint); font-size: 10.5px; }
.wd-bal { display: flex; align-items: center; gap: 8px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.wd-bal b { color: var(--gold-hi); }
.wd-fee { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 12px; color: var(--faint); }
.wd-fee b { color: var(--muted); font-weight: 700; }
.wd-fee .sep { flex: none; width: 1px; height: 10px; background: var(--line); margin: 0 6px; }
.wd-bankcard {
  position: relative; overflow: hidden; margin-top: 4px;
  border-radius: 14px; padding: 18px 18px 14px;
  background: linear-gradient(135deg, #322645, #1c1526 55%, #2b1f12);
  border: 1px solid var(--gold-lo); box-shadow: var(--shadow-soft);
}
.wd-bankcard::after {
  content: ""; position: absolute; top: -50%; right: -12%;
  width: 170px; height: 170px; border-radius: 50%;
  background: radial-gradient(circle, rgba(236,215,148,.16), transparent 68%);
}
.wd-bankcard .bk-bank { font-size: 15px; font-weight: 900; letter-spacing: 1.5px; color: var(--gold-hi); }
.wd-bankcard .bk-num { font-size: 20px; letter-spacing: 3px; color: var(--text); margin: 16px 0 10px; font-variant-numeric: tabular-nums; }
.wd-bankcard .bk-holder { font-size: 12px; color: var(--muted); letter-spacing: 1px; text-transform: uppercase; }
.wd-bankcard .bk-chip {
  position: absolute; top: 16px; right: 18px; width: 34px; height: 24px;
  border-radius: 5px; background: var(--gold-grad); opacity: .85;
}
.wd-warn { font-size: 12px; color: #d6a05e; line-height: 1.6; margin-top: 4px; }

/* ---------- 提现 68 式三层抽屉（2026-08-27 v2）---------- */
/* 底部抽屉：键盘弹出时贴底不跑位（修输入框卡死）；dvh 跟随可视视口 */
.modal.sheet { align-items: flex-end; padding: 0; }
.modal.sheet .modal-card {
  max-width: 480px; width: 100%;
  border-radius: 20px 20px 0 0; border-bottom: 0;
  max-height: 82vh; max-height: 84dvh; overflow-y: auto;
  padding: 14px 20px calc(20px + env(safe-area-inset-bottom, 0px));
  animation: sheetUp .22s ease-out;
}
@keyframes sheetUp { from { transform: translateY(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.sh-grab { display: block; width: 44px; height: 4px; border-radius: 2px; background: var(--line); margin: 0 auto 12px; }
.modal.sheet .rc-x { top: 14px; }

/* 收款账户行（68 式入口卡） */
.wd-acct-row {
  display: flex; align-items: center; gap: 12px; cursor: pointer;
  padding: 14px; border-radius: var(--r); border: 1px solid var(--line);
  background: var(--surface-2); margin-bottom: 14px;
}
.wd-acct-ico { font-size: 24px; flex: none; }
.wd-acct-mid { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.wd-acct-mid b { font-size: 14.5px; color: var(--text); letter-spacing: .5px; }
.wd-acct-mid small { font-size: 12px; line-height: 1.45; }
.wd-acct-mid small.need { color: var(--gold); }
.wd-acct-mid small.ok { color: var(--muted); }
.wd-acct-go { flex: none; font-size: 13px; color: var(--muted); }

/* 金额区头（标签 + 全部提现） */
.wd-amt-head { display: flex; align-items: center; justify-content: space-between; margin: 14px 0 8px; }
.wd-rules { margin-top: 10px; font-size: 12px; color: var(--faint); line-height: 1.8; }

/* 层2：提示横幅（68 式金底告示） */
.wd-banner {
  margin: 14px 0 2px; padding: 10px 12px; border-radius: 10px;
  background: rgba(232,194,87,.12); border: 1px solid rgba(232,194,87,.28);
  color: var(--gold-hi); font-size: 12.5px; line-height: 1.6;
}
.wd-subnote { font-size: 11.5px; color: var(--faint); margin-top: 5px; line-height: 1.5; }

/* 银行选择行 */
.wd-pick {
  display: flex; align-items: center; gap: 10px; cursor: pointer;
  height: 48px; padding: 0 12px; border-radius: var(--r);
  border: 1px solid var(--line); background: var(--surface);
}
.wd-pick-name { flex: 1; font-size: 14px; color: var(--faint); }
.wd-pick-name.on { color: var(--text); font-weight: 700; }
.wd-pick-arr { flex: none; color: var(--muted); font-size: 15px; }

/* logo 牌：品牌底色 + 缩写字标（本地绘制，不加载外部图片） */
.bk-tile {
  flex: none; width: 34px; height: 34px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10.5px; font-weight: 900; letter-spacing: .2px;
  box-shadow: 0 1px 3px rgba(0,0,0,.35);
}

/* 层3：银行列表 */
.wd-bank-list { margin-top: 4px; }
.wd-bank-item {
  display: flex; align-items: center; gap: 14px; cursor: pointer;
  padding: 12px 6px; border-radius: 12px;
}
.wd-bank-item:active { background: var(--surface-2); }
.wd-bank-item.sel { background: var(--surface-2); }
.wd-bank-name { flex: 1; font-size: 15px; color: var(--text); }
.wd-bank-item.sel .wd-bank-name { color: var(--gold); font-weight: 700; }
.wd-bank-ck {
  flex: none; width: 20px; height: 20px; border-radius: 50%;
  background: var(--gold); color: #1c1526; font-size: 12px; font-weight: 900;
  display: inline-flex; align-items: center; justify-content: center;
}

/* ---------- 68 式全屏子页面（2026-08-27）：充值/提现/转账/「我」页卡片 ---------- */
.page {
  position: fixed; inset: 0; z-index: 45;
  background: var(--bg);
  display: flex; flex-direction: column; align-items: center;
  animation: pageIn .22s ease-out;
}
.page[hidden] { display: none; }
@keyframes pageIn { from { transform: translateX(48px); opacity: .35; } to { transform: none; opacity: 1; } }
.pv-head {
  flex: none; width: 100%; max-width: 520px;
  display: flex; align-items: center; position: relative;
  height: 54px; padding: 0 12px;
  margin-top: calc(var(--tg-safe-area-inset-top, 0px) + var(--tg-content-safe-area-inset-top, 0px));
}
.pv-back {
  flex: none; display: inline-flex; align-items: center; gap: 4px;
  height: 34px; padding: 0 14px 0 10px; border: 0; border-radius: 17px;
  background: var(--surface-2); color: var(--text);
  font-size: 13.5px; font-weight: 700; font-family: inherit; cursor: pointer;
}
.pv-back::before { content: "‹"; font-size: 19px; line-height: 1; margin-top: -2px; }
.pv-title {
  position: absolute; left: 50%; transform: translateX(-50%);
  font-family: var(--font-display); font-weight: 700; font-size: 17px;
  letter-spacing: 2px; color: var(--gold); white-space: nowrap;
}
.pv-side { margin-left: auto; }
.pv-body {
  flex: 1; width: 100%; max-width: 520px; min-height: 0;
  overflow-y: auto; -webkit-overflow-scrolling: touch;
  padding: 6px 20px calc(28px + max(env(safe-area-inset-bottom), var(--tg-safe-area-inset-bottom, 0px)));
}
/* 页内沿用 rc-* 组件样式；rc-head 已并入 pv-head，这里只兜底间距 */
.pv-body .rc-pane { margin-top: 4px; }

/* TG 原生 BackButton 可用（6.1+）时：左上角系统返回顶用，页内胶囊隐藏防双返回 */
.tg-back .pv-back { display: none; }

/* USDT 客服入口：充值方式卡下面一条细行 */
.rc-usdt {
  display: flex; align-items: center; gap: 8px; width: 100%;
  margin-top: 10px; padding: 11px 12px; cursor: pointer;
  border: 1px dashed var(--gold-lo); border-radius: var(--r);
  background: none; color: var(--gold); font-size: 13px; font-family: inherit;
}
.rc-usdt-ic {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #26a17b; color: #fff; font-weight: 900; font-size: 13px;
}
.rc-usdt-arr { margin-left: auto; color: var(--muted); font-size: 15px; }

/* ---------- 站内客服 tab（2026-08-27）---------- */
.tab-dot {
  position: absolute; top: 6px; right: 22%; width: 8px; height: 8px;
  border-radius: 50%; background: #e0483e; box-shadow: 0 0 0 2px var(--bg);
}
.cs-head { padding: 4px 2px 10px; }
.cs-head b { font-size: 15px; color: var(--text); letter-spacing: .5px; }
.cs-sub { margin-left: 8px; font-size: 11.5px; color: var(--faint); }
/* 客服页整体不滚：列表 flex 填满剩余高度，消息不满一屏时不产生滚动 */
#v-cs.view { display: flex; flex-direction: column; overflow: hidden; padding: 14px 14px 10px; }
#v-cs.view[hidden] { display: none; }   /* 别让 flex 压过 hidden（全 tab 漏显 bug） */
.cs-list {
  flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; display: flex; flex-direction: column;
  gap: 10px; padding: 6px 2px;
}
.cs-img { max-width: 200px; border-radius: 12px; display: block; }
.cs-sys { align-self: center; font-size: 11px; color: var(--faint); margin: 6px 0; text-align: center; }
.cs-cam {
  flex: none; width: 44px; border: 1px solid var(--line);
  border-radius: var(--r); background: var(--surface); color: var(--muted);
  font-size: 18px; cursor: pointer;
}
.cs-b { max-width: 78%; display: flex; flex-direction: column; gap: 3px; }
.cs-b .cs-t {
  padding: 9px 12px; border-radius: 14px; font-size: 13.5px; line-height: 1.55;
  word-break: break-word; white-space: pre-wrap;
}
.cs-b i { font-size: 10px; color: var(--faint); font-style: normal; padding: 0 4px; }
.cs-b.kf { align-self: flex-start; }
.cs-b.kf .cs-t { background: var(--surface-2); color: var(--text); border-top-left-radius: 4px; }
.cs-b.me { align-self: flex-end; align-items: flex-end; }
.cs-b.me .cs-t { background: rgba(232,194,87,.18); color: var(--gold-hi);
  border: 1px solid rgba(232,194,87,.25); border-top-right-radius: 4px; }
.cs-inputbar { display: flex; gap: 8px; margin-top: 10px; }
.cs-inputbar .input { flex: 1; }
.cs-inputbar .btn { flex: none; width: auto; padding: 0 18px; }

/* 会话制（2026-08-27 定稿）：空状态 + 历史列表 + 聊天容器 + 历史整页 */
#cs-chat { display: flex; flex-direction: column; flex: 1; min-height: 0; }
#cs-chat[hidden] { display: none; }
#cs-home { flex: 1; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch; }
#cs-home[hidden] { display: none; }
.cs-hero {
  display: flex; flex-direction: column; align-items: center;
  text-align: center; gap: 10px; padding: 46px 18px 32px;
}
.cs-hero-ic { font-size: 40px; }
.cs-hero-t { font-size: 16px; font-weight: 700; color: var(--text); }
.cs-hero-s { font-size: 12.5px; color: var(--faint); }
.cs-hero .btn { margin-top: 10px; width: auto; padding-left: 28px; padding-right: 28px; }
.cs-his-h { font-size: 12px; color: var(--faint); letter-spacing: 1px; margin: 8px 2px 8px; }
.cs-his-row {
  display: flex; justify-content: space-between; align-items: center;
  width: 100%; padding: 14px; margin-bottom: 8px;
  border: 1px solid var(--line); border-radius: var(--r);
  background: var(--surface); color: var(--muted);
  font-size: 13px; cursor: pointer;
}
.cs-his-tag { font-size: 11.5px; color: var(--faint); }
#csh-list { flex: none; overflow-y: visible; }
