/* 暗金娱乐 · 静态 H5 设计变量与公共组件 */
:root {
  --bg-top: #2a2418;
  --bg-mid: #0f0e0b;
  --bg-deep: #050504;
  --card-top: rgba(40, 36, 28, 0.92);
  --card-bot: rgba(22, 20, 16, 0.94);
  --line-gold: rgba(201, 160, 80, 0.28);
  --line-gold-strong: rgba(201, 160, 80, 0.45);
  --gold-1: #f8e6b3;
  --gold-2: #c9a050;
  --gold-btn-top: #ffe69b;
  --gold-btn-bot: #e6b03a;
  --text: #e8dcc4;
  --text-dim: #8a806c;
  --text-label: #a69b82;
  --link: #e07a5f;
  --banker: #c83232;
  --player: #2f6fde;
  --tie: #2e8b57;
  --lucky: #e879a8;
  --radius-xl: 16px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --shadow-deep: 0 18px 40px rgba(0, 0, 0, 0.5);
  --font: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", sans-serif;
  /*
   * --bjl-room-topbar-offset：房间顶栏总高度（含 safe-area），由 app.js 写入 html。
   * 路单 top 与 .room-scroll 上留白共用，保证紧贴顶栏底边。
   */
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
}

/* iOS/Android：可编辑控件小于 16px 时，聚焦弹键盘会触发页面自动放大 */
input,
textarea,
select {
  font-size: 16px;
}

body {
  min-height: 100dvh;
  touch-action: manipulation;
  -ms-touch-action: manipulation;
  font-family: var(--font);
  color: var(--text);
  background: radial-gradient(120% 80% at 50% 0%, var(--bg-top) 0%, var(--bg-mid) 55%, var(--bg-deep) 100%);
  background-attachment: fixed;
}

a {
  color: var(--link);
  text-decoration: none;
}

/* 页面容器 */
.page-auth {
  padding: 24px 18px calc(32px + env(safe-area-inset-bottom, 0));
  max-width: 440px;
  margin: 0 auto;
}

.page-room {
  display: flex;
  flex-direction: column;
  /* 锁在视口内，避免整页随路单变长导致只在 body 上滚、.room-scroll 不溢出 */
  height: 100dvh;
  max-height: 100dvh;
  min-height: 100dvh;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

/* 房间页：路单等主区域左右通栏、无圆角 */
.page-room .road-panel {
  border-radius: 0;
  margin-left: 0;
  margin-right: 0;
}

/* 房间顶栏 + 公告：fixed 整块高度写入 --bjl-room-topbar-offset */
.page-room__head {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 30;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.page-room__head .topbar.topbar--room {
  position: static;
  width: 100%;
  padding: 6px 10px;
  padding-top: calc(6px + env(safe-area-inset-top, 0));
  gap: 8px;
}

.page-room > .topbar.topbar--room {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  width: 100%;
  box-sizing: border-box;
  z-index: 30;
  padding: 6px 10px;
  padding-top: calc(6px + env(safe-area-inset-top, 0));
  gap: 8px;
  transform: translateZ(0);
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

.page-room .room-scroll.room-scroll--split {
  padding-top: var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px));
  box-sizing: border-box;
  flex: 1 1 0;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.page-room .balance-pill--room {
  border-radius: 0;
}

/* 底栏不要被 flex 压缩，保证中间 .room-scroll 吃掉剩余高度并出现纵向滚动条 */
.page-room > .bottom-dock {
  flex-shrink: 0;
}

.page-room .side-rail--room .side-btn {
  border-radius: 10px;
  padding: 13px 4px;
  font-size: 12px;
  line-height: 1.3;
  font-weight: 600;
  box-shadow: none;
}

.page-room .bottom-dock--room .dock-field {
  border-radius: 0;
}

.page-room .bottom-dock--room .dock-icon-btn {
  border-radius: 0;
}

.page-room .bottom-dock--room .dock-send {
  border-radius: 0;
}

/* 侧栏 fixed 浮在右侧：聊天块左右 0；上下保留；各条消息单独缩进，投注/余分表全宽 */
.page-room .room-chat-body .chat-block {
  padding: 12px 0 16px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  overflow: visible;
}

/* 品牌头 */
.brand-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin: 24px 0 6px;
}

.logo-mark {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(145deg, #f4d07a, #8a6a2a);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.brand-title {
  font-size: 22px;
  letter-spacing: 0.12em;
  background: linear-gradient(90deg, var(--gold-1), var(--gold-2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.brand-sub {
  text-align: center;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 22px;
}

/* 卡片 */
.card {
  background: linear-gradient(180deg, var(--card-top), var(--card-bot));
  border: 1px solid var(--line-gold);
  border-radius: var(--radius-xl);
  padding: 18px 16px;
  box-shadow: var(--shadow-deep);
}

.card--tight {
  padding: 12px;
}

/* 表单 */
.form-label {
  font-size: 12px;
  color: var(--text-label);
  display: block;
  margin: 12px 0 6px;
}

.form-label:first-of-type {
  margin-top: 0;
}

.input-wrap {
  position: relative;
}

.input-wrap .input-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-style: normal;
  font-size: 14px;
  opacity: 0.45;
  pointer-events: none;
}

.input {
  width: 100%;
  padding: 14px 14px 14px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 6, 0.65);
  color: #f5ecd8;
  font-size: 16px;
  outline: none;
}

.input--plain {
  padding-left: 14px;
}

.input:focus {
  border-color: rgba(244, 208, 122, 0.55);
  box-shadow: 0 0 0 2px rgba(244, 208, 122, 0.12);
}

.btn-gold {
  margin-top: 22px;
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 15px;
  font-size: 16px;
  font-weight: 700;
  color: #5c1a12;
  background: linear-gradient(180deg, var(--gold-btn-top), var(--gold-btn-bot));
  box-shadow: 0 10px 28px rgba(230, 176, 58, 0.35);
  cursor: pointer;
}

.btn-gold:active {
  transform: scale(0.99);
}

.auth-links {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 16px;
  font-size: 13px;
}

.auth-links__action {
  border: 0;
  padding: 0;
  margin: 0;
  background: none;
  font: inherit;
  font-size: 13px;
  line-height: 1.4;
  color: var(--link);
  cursor: pointer;
  text-decoration: none;
}

.auth-links__action:active {
  opacity: 0.85;
}

.auth-links__action:disabled {
  opacity: 0.55;
  cursor: wait;
}

/* 顶栏（大厅/房间） */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
  background: linear-gradient(180deg, rgba(30, 26, 20, 0.96), rgba(14, 12, 10, 0.92));
  border-bottom: 1px solid var(--line-gold);
  position: sticky;
  top: 0;
  z-index: 30;
}

.topbar__left {
  min-width: 0;
}

.topbar__room {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-1);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.topbar__meta {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

.topbar__right {
  text-align: right;
  flex-shrink: 0;
}

.balance-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 13px;
  font-weight: 600;
  color: var(--gold-1);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--line-gold);
}

.countdown-ring {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 3px solid rgba(201, 160, 80, 0.35);
  border-top-color: var(--gold-btn-top);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-1);
  flex-shrink: 0;
}

/* 公告条 */
.notice-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  font-size: 12px;
  color: #3d2918;
  background: linear-gradient(90deg, #fdf6e9, #f0dcc4);
  border-bottom: 1px solid rgba(201, 160, 80, 0.35);
}

.notice-bar__icon {
  flex-shrink: 0;
}

.notice-bar__text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 群公告跑马灯（从右往左） */
.notice-bar--marquee .notice-bar__viewport {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  position: relative;
}

.notice-bar--marquee .notice-bar__track {
  display: inline-block;
  white-space: nowrap;
  will-change: transform;
}

.notice-bar--marquee .notice-bar__track.is-anim {
  animation: bjl-announce-rtl var(--bjl-announce-dur, 14s) linear infinite;
}

@keyframes bjl-announce-rtl {
  0% {
    transform: translateX(calc(100vw - 52px));
  }
  100% {
    transform: translateX(-100%);
  }
}

.notice-bar--room {
  border-bottom: 1px solid rgba(201, 160, 80, 0.25);
}

/* 大厅桌台卡片 */
.lobby-scroll {
  flex: 1;
  overflow-y: auto;
  padding: 12px;
  padding-bottom: calc(24px + env(safe-area-inset-bottom, 0));
}

.table-card {
  margin-bottom: 14px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-gold);
  background: linear-gradient(180deg, rgba(34, 30, 24, 0.95), rgba(18, 16, 12, 0.97));
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.4);
}

.table-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: rgba(0, 0, 0, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.table-card__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-1);
}

.badge {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text-dim);
}

.badge--open {
  border-color: rgba(46, 139, 87, 0.45);
  color: #8fd9b0;
}

.badge--soon {
  border-color: rgba(230, 176, 58, 0.55);
  color: var(--gold-1);
}

.table-card__body {
  padding: 10px 12px 12px;
}

/* 大厅桌卡：内嵌与房间同源 ludan；ludan--lobby 把珠盘/提示从 50vw 改为相对卡片 */
.table-card--road {
  background: #fff;
  border-color: #9e9e9e;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.3);
}

.table-card--road .table-card__head--road {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: linear-gradient(180deg, #3d3d3d, #282828);
  border-bottom: 1px solid #141414;
}

.table-card--road .table-card__name {
  color: #ffcc33;
  letter-spacing: 0.03em;
}

.table-card__status-stop {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
  color: #ff5252;
}

.table-card__sand::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 1px;
  background: linear-gradient(180deg, #cfd8dc, #78909c);
  border-radius: 2px;
  vertical-align: -2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.table-card__body--road {
  padding: 0;
  overflow: hidden;
  background: #fff;
}

.ludan--lobby {
  width: 100%;
}

.ludan--lobby .ludan__bead-mid,
.ludan--lobby .ludan__hint-beside-bead {
  width: 50%;
  max-width: none;
  min-width: 0;
}

.ludan--lobby .road-ju {
  display: none;
}

.ludan--lobby .predict-cell--side img {
  width: 14px;
  height: 14px;
}

.lobby-footnote {
  text-align: center;
  font-size: 11px;
  color: var(--text-dim);
  padding: 8px 0 20px;
  margin: 0;
}

.lobby-footnote a {
  color: var(--link);
}

.mini-road {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 3px;
}

.mini-cell {
  aspect-ratio: 1;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.mini-cell--b {
  background: var(--banker);
}

.mini-cell--p {
  background: var(--player);
}

.mini-cell--t {
  background: var(--tie);
  font-size: 8px;
}

/* 路单区（桌内） */
.road-panel {
  margin: 8px 12px 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-gold);
  background: rgba(8, 8, 6, 0.55);
  overflow: hidden;
}

.road-panel__inner {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-height: 0;
}

.road-main-row {
  display: grid;
  grid-template-columns: 76px 1fr;
  gap: 0;
  min-height: 104px;
}

.bead-grid,
.big-road-grid,
.road-stat__v {
  font-variant-numeric: tabular-nums;
}

.bead-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 3px;
  padding: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.2);
  align-content: start;
}

.bead {
  aspect-ratio: 1;
  border-radius: 50%;
  font-size: 10px;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  border: 1px solid rgba(0, 0, 0, 0.35);
}

.bead--b {
  background: var(--banker);
}

.bead--p {
  background: var(--player);
}

.bead--t {
  background: var(--tie);
  font-size: 9px;
}

.big-road-wrap {
  padding: 6px;
  overflow-x: auto;
}

.big-road-grid {
  display: grid;
  grid-template-columns: repeat(14, 14px);
  grid-auto-rows: 14px;
  gap: 2px;
  min-width: min-content;
}

.br-cell {
  border-radius: 50%;
  border: 2px solid transparent;
}

.br-cell--b {
  border-color: var(--banker);
  background: transparent;
}

.br-cell--p {
  border-color: var(--player);
  background: transparent;
}

.br-cell--slash {
  border: none;
  background: linear-gradient(135deg, transparent 45%, var(--tie) 45%, var(--tie) 55%, transparent 55%);
}

.road-stats {
  padding: 8px 10px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px;
  color: var(--text-dim);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
}

.road-stats b {
  color: var(--gold-1);
  font-weight: 700;
}

/* 下三路：大眼仔 / 小路 / 蟑螂路 */
.road-der-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 4px 6px;
  padding: 6px 6px 4px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.18);
}

.road-der {
  min-width: 0;
}

.road-der__name {
  display: block;
  font-size: 10px;
  font-weight: 700;
  color: rgba(232, 200, 120, 0.85);
  margin-bottom: 4px;
  text-align: center;
  letter-spacing: 0.02em;
}

.der-grid {
  display: grid;
  grid-template-columns: repeat(6, 10px);
  grid-auto-rows: 10px;
  gap: 2px;
  justify-content: center;
}

.der-eye {
  border-radius: 50%;
  box-sizing: border-box;
}

.der-eye--b {
  border: 1.5px solid var(--banker);
  background: transparent;
}

.der-eye--p {
  border: 1.5px solid var(--player);
  background: transparent;
}

.der-eye--slash {
  border: none;
  border-radius: 2px;
  background: linear-gradient(135deg, transparent 45%, var(--tie) 45%, var(--tie) 55%, transparent 55%);
}

.der-dot {
  border-radius: 50%;
}

.der-dot--b {
  background: var(--banker);
}

.der-dot--p {
  background: var(--player);
}

.der-dot--t {
  background: var(--tie);
}

.der-roach {
  border-radius: 2px;
}

.der-roach--b {
  background: linear-gradient(135deg, transparent 44%, var(--banker) 44%, var(--banker) 56%, transparent 56%);
}

.der-roach--p {
  background: linear-gradient(135deg, transparent 44%, var(--player) 44%, var(--player) 56%, transparent 56%);
}

.der-roach--slash {
  background: linear-gradient(135deg, transparent 45%, var(--tie) 45%, var(--tie) 55%, transparent 55%);
}

/* 下局提示 */
.road-next {
  padding: 8px 8px 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.22);
}

.road-next__title {
  font-size: 11px;
  font-weight: 700;
  color: rgba(232, 200, 120, 0.9);
  margin-bottom: 8px;
  letter-spacing: 0.12em;
}

.road-next__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.road-next__col {
  min-width: 0;
}

.road-next__cap {
  display: block;
  font-size: 10px;
  margin-bottom: 6px;
  color: rgba(245, 236, 216, 0.75);
}

.road-next__cap b {
  font-weight: 800;
}

.road-next__cap--b b {
  color: var(--banker);
}

.road-next__cap--p b {
  color: var(--player);
}

.road-next__mini {
  display: grid;
  grid-template-columns: repeat(4, 12px);
  grid-auto-rows: 12px;
  gap: 2px;
}

.nx {
  border-radius: 50%;
  border: 2px solid transparent;
  box-sizing: border-box;
}

.nx--b {
  border-color: var(--banker);
}

.nx--p {
  border-color: var(--player);
}

.nx--slash {
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, transparent 45%, var(--tie) 45%, var(--tie) 55%, transparent 55%);
}

/* 底部统计条：金标签 + 白数字（对齐实盘） */
.road-stats--bar {
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 6px 8px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.road-stats--bar::-webkit-scrollbar {
  display: none;
}

.road-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 38px;
}

.road-stat__k {
  font-size: 10px;
  font-weight: 700;
  color: #e8c878;
  margin-bottom: 2px;
}

.road-stat__v {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
}

/* 路单白底网格（对标实盘：大路在上，珠盘/下三路/下局提示在下） */
.road-panel--sheet {
  background: #fff;
  border-color: rgba(190, 190, 190, 0.95);
}

.road-panel--sheet .road-panel__inner.road-sheet {
  background: #fff;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.road-sheet__big {
  border-bottom: 1px solid #d5d5d5;
}

.big-road-wrap--sheet {
  padding: 3px;
  background: #cfcfcf;
  overflow-x: auto;
}

.big-road-grid--sheet {
  grid-template-columns: repeat(14, 15px);
  grid-auto-rows: 15px;
  gap: 1px;
  background: #cfcfcf;
}

.big-road-grid--sheet .br-cell {
  background: #fff;
  border-radius: 50%;
}

.big-road-grid--sheet .br-cell--b {
  border-color: #d9232a;
  background: #fff;
}

.big-road-grid--sheet .br-cell--p {
  border-color: #1565c0;
  background: #fff;
}

.big-road-grid--sheet .br-cell--slash {
  border: none;
  background: linear-gradient(135deg, #fff 45%, #1fa85a 45%, #1fa85a 55%, #fff 55%);
}

.road-sheet__lower {
  display: grid;
  grid-template-columns: minmax(72px, 90px) minmax(0, 1fr) minmax(104px, 38%);
  gap: 4px;
  padding: 4px 4px 6px;
  align-items: start;
  background: #fff;
}

@media (max-width: 360px) {
  .road-sheet__lower {
    grid-template-columns: minmax(64px, 78px) minmax(0, 1fr) minmax(96px, 36%);
  }
}

.bead-grid--sheet {
  background: #fff;
  border: 1px solid #d8d8d8;
  gap: 2px;
  padding: 4px;
}

.bead-grid--sheet .bead--b {
  background: #d9232a;
}

.bead-grid--sheet .bead--p {
  background: #1565c0;
}

.bead-grid--sheet .bead--t {
  background: #1fa85a;
}

.road-sheet__deriv {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.road-der__name--sheet {
  text-align: left;
  font-size: 9px;
  color: #9e9e9e;
  font-weight: 600;
  margin-bottom: 3px;
}

.der-wrap--sheet {
  background: #e0e0e0;
  padding: 2px;
  border-radius: 2px;
}

.der-grid--sheet {
  background: #e0e0e0;
  gap: 1px;
  justify-content: flex-start;
}

.der-grid--sheet .der-eye--b {
  background: #fff;
  border: 1.5px solid #d9232a;
}

.der-grid--sheet .der-eye--p {
  background: #fff;
  border: 1.5px solid #1565c0;
}

.der-grid--sheet .der-eye--slash {
  background: linear-gradient(135deg, #fff 45%, #1fa85a 45%, #1fa85a 55%, #fff 55%);
  border-radius: 2px;
}

.der-grid--sheet .der-dot--b {
  background: #d9232a;
}

.der-grid--sheet .der-dot--p {
  background: #1565c0;
}

.der-grid--sheet .der-dot--t {
  background: #1fa85a;
}

.der-grid--sheet .der-roach--b {
  background: linear-gradient(135deg, #fff 44%, #d9232a 44%, #d9232a 56%, #fff 56%);
}

.der-grid--sheet .der-roach--p {
  background: linear-gradient(135deg, #fff 44%, #1565c0 44%, #1565c0 56%, #fff 56%);
}

.der-grid--sheet .der-roach--slash {
  background: linear-gradient(135deg, #fff 45%, #1fa85a 45%, #1fa85a 55%, #fff 55%);
}

.road-next--sheet {
  background: #fafafa;
  border: 1px solid #e0e0e0;
  border-radius: 3px;
  padding: 6px 5px 7px;
}

.road-next--sheet .road-next__row {
  gap: 6px;
}

.road-next__title--sheet {
  color: #616161;
  letter-spacing: 0.08em;
  font-size: 10px;
  margin-bottom: 6px;
}

.road-next__cap--sheet {
  color: #666;
}

.road-next__mini--sheet {
  background: #e0e0e0;
  padding: 2px;
  gap: 1px;
}

.road-next__mini--sheet .nx {
  background: #fff;
}

.road-next__mini--sheet .nx--b {
  border-color: #d9232a;
}

.road-next__mini--sheet .nx--p {
  border-color: #1565c0;
}

.road-next__mini--sheet .nx--slash {
  background: linear-gradient(135deg, #fff 45%, #1fa85a 45%, #1fa85a 55%, #fff 55%);
}

/* 实盘 ludan：白底表格 + <img>（大路 → 下四路 2×2 → 珠子路 6×14 + 右侧下局提示） */
.ludan {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #fff;
  color: #333;
  font-size: 12px;
  box-sizing: border-box;
}

.ludan .dalu,
.ludan .zzl,
.ludan .dyz,
.ludan .jyl,
.ludan .xl,
.ludan .sxl {
  position: relative;
}

.ludan .bgtext {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  z-index: 0;
  pointer-events: none;
  text-align: center;
  font-size: 11px;
  color: #c8c8c8;
  font-weight: 600;
  opacity: 0.55;
  padding: 0;
}

/* 仅包裹大路表格，水印相对此处定位（避免 .dalu flex 撑高后 bottom 落到表格外空白） */
.ludan .dalu__road {
  position: relative;
  flex: 0 0 auto;
  width: 100%;
  align-self: stretch;
  min-width: 0;
  /* 避免容器查询格高与 overflow 组合时首行圆珠贴顶被裁半 */
  padding-top: 2px;
  box-sizing: border-box;
}

/* 大路水印：叠在表格格子之上，右下角 */
.ludan .dalu .bgtext {
  top: auto;
  bottom: 2px;
  left: auto;
  right: 4px;
  transform: none;
  text-align: right;
  z-index: 3;
  text-shadow: 0 0 1px rgba(255, 255, 255, 0.9);
}

/* 不占满 ludan 剩余高度，避免大路区域底部出现大块空白、把 .road-ju 顶到屏底 */
.ludan .dalu {
  flex: 0 0 auto;
  min-height: 72px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  overflow-x: hidden;
  /* 勿对纵向 hidden：大路 6 行在 max-height 面板内易被裁掉顶行圆珠 */
  overflow-y: visible;
  border-bottom: none;
}

.ludan .dalu .ludan-table {
  flex: 0 0 auto;
  width: 100%;
  align-self: stretch;
  /* 勿设 min-height:0：flex 会压扁表格，首行圆珠看起来像被切掉一半 */
}

/* 下四路 2×2：上行 大眼仔|曱甴，下行 小路|三星路（各 20×3）；紧挨大路表格下方 */
.ludan__bigeye {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  box-sizing: border-box;
  min-height: 0;
}

.ludan__bigeye-row {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  width: 100%;
  min-height: 0;
}

.ludan__bigeye-row + .ludan__bigeye-row {
  border-top: 1px solid #e8e8e8;
}

.ludan__bigeye-slot {
  flex: 0 0 50%;
  max-width: 50%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  container-type: inline-size;
  container-name: ludan-bigeye;
}

/* 左右两槽相邻竖线只保留一道（左表最后一列的右边线） */
.ludan .ludan__bigeye .ludan__bigeye-slot + .ludan__bigeye-slot table.ludan-table--bigeye td:first-child {
  border-left: none;
}

.ludan .ludan__bigeye .dyz,
.ludan .ludan__bigeye .jyl,
.ludan .ludan__bigeye .xl,
.ludan .ludan__bigeye .sxl {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  overflow: hidden;
}

.ludan .ludan__bigeye .dyz .ludan-table,
.ludan .ludan__bigeye .jyl .ludan-table,
.ludan .ludan__bigeye .xl .ludan-table,
.ludan .ludan__bigeye .sxl .ludan-table {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
}

/* 珠子路：在下四路之下、与小路左对齐；表总宽 50vw，6 行×14 列正方格；右侧「下局提示」与珠子路等宽、同高 */
.ludan__bead-below-roads {
  flex: 0 0 auto;
  width: 100%;
  border-top: 1px solid #e8e8e8;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  flex-wrap: nowrap;
}

.ludan__bead-mid {
  flex: 0 0 auto;
  width: min(50vw, 100%);
  max-width: 100%;
  box-sizing: border-box;
  position: relative;
  container-type: inline-size;
  container-name: ludan-bead;
}

.ludan__hint-beside-bead {
  flex: 0 0 auto;
  width: min(50vw, 100%);
  max-width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  align-self: stretch;
}

.ludan__hint-beside-bead__inner {
  flex: 1 1 auto;
  width: 100%;
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

.ludan .dalu .ludan__hint-beside-bead .ludan__hint {
  flex: 1 1 auto;
  width: 100%;
  height: 100%;
  min-height: 0;
}

.ludan .dalu .ludan__hint-beside-bead .ludan__hint .xjts {
  flex: 1;
  min-height: 0;
  height: 100%;
  margin-bottom: 0;
}

.ludan .dalu .ludan__bead-below-roads .zzl {
  display: flex;
  flex-direction: column;
  margin: 0;
  min-height: 0;
}

.ludan .dalu .ludan__bead-below-roads .zzl .ludan-table {
  flex: 0 0 auto;
  width: 100%;
  min-height: 0;
}

.ludan__hint {
  flex: 1 1 0;
  min-width: 0;
  width: 100%;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}

.ludan__hint .xjts {
  flex: 1;
  min-height: 0;
  height: auto;
  margin: 0;
  border: none;
}

.ludan table.ludan-table {
  position: relative;
  z-index: 1;
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  background: #fff;
}

.ludan table.ludan-table td {
  position: relative;
  border: 1px solid #f0f0f0;
  padding: 0;
  vertical-align: middle;
  box-sizing: border-box;
  height: 18px;
  min-height: 18px;
}

/* 大路：40 列铺满容器宽度；格高=格宽（6 行随格自动撑开）；无横向滚动 */
.ludan table.ludan-table[data-road="dalu"] {
  line-height: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

/* 无容器查询：列宽 100%/40，aspect-ratio 保持正方形行高 */
.ludan table.ludan-table[data-road="dalu"] td {
  width: 2.5%;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
  aspect-ratio: 1;
  border: none;
  border-right: 1px solid #c4c4c4;
  border-bottom: 1px solid #c4c4c4;
  vertical-align: middle;
  line-height: 0;
  text-align: center;
  position: relative;
}

.ludan table.ludan-table--bigeye[data-road="sxl"] td {
  position: relative;
}

@supports (container-type: inline-size) {
  .ludan .dalu {
    container-type: inline-size;
    container-name: dalu-road;
  }

  .ludan table.ludan-table[data-road="dalu"] td {
    width: calc(100cqw / 40);
    height: calc(100cqw / 40);
    aspect-ratio: unset;
  }
}

.ludan table.ludan-table[data-road="dalu"] tr:first-child td {
  border-top: 1px solid #c4c4c4;
  overflow: visible;
}

.ludan table.ludan-table[data-road="dalu"] td:first-child { border-left: 1px solid #c4c4c4; }

/* 大眼仔（20 列×3 行）：单线格，与大路同色；格宽=slot 宽/20 */
.ludan table.ludan-table--bigeye {
  line-height: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.ludan table.ludan-table--bigeye td {
  width: 5%;
  min-width: 0;
  box-sizing: border-box;
  height: auto;
  aspect-ratio: 1;
  border: none;
  border-right: 1px solid #c4c4c4;
  border-bottom: 1px solid #c4c4c4;
  vertical-align: middle;
  line-height: 0;
  text-align: center;
}

.ludan table.ludan-table--bigeye tr:first-child td {
  border-top: 1px solid #c4c4c4;
}

/* 贴住大路最后一行：不再叠一道顶边 */
.ludan .dalu .ludan-table--bigeye tr:first-child td {
  border-top: none;
}

.ludan table.ludan-table--bigeye td:first-child {
  border-left: 1px solid #c4c4c4;
}

@supports (container-type: inline-size) {
  .ludan table.ludan-table--bigeye td {
    width: calc(100cqw / 20);
    height: calc(100cqw / 20);
    aspect-ratio: unset;
  }
}

.ludan table.ludan-table--small td {
  height: 16px;
  min-height: 16px;
}

.ludan table.ludan-table--bead td {
  height: 1.6em;
  min-height: 22px;
}

/* 珠子路 6×14（单线格，与大路同色；格宽 = 表容器/14，表宽 50vw） */
.ludan table.ludan-table--bead14 {
  line-height: 0;
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
}

.ludan table.ludan-table--bead14 td {
  width: calc(100% / 14);
  min-width: 0;
  min-height: 0;
  box-sizing: border-box;
  height: auto;
  aspect-ratio: 1;
  border: none;
  border-right: 1px solid #c4c4c4;
  border-bottom: 1px solid #c4c4c4;
  vertical-align: middle;
  line-height: 0;
  text-align: center;
  padding: 0;
}

.ludan table.ludan-table--bead14 tr:first-child td {
  border-top: 1px solid #c4c4c4;
}

.ludan .dalu .ludan__bead-below-roads .ludan-table--bead14 tr:first-child td {
  border-top: none;
}

.ludan table.ludan-table--bead14 td:first-child {
  border-left: 1px solid #c4c4c4;
}

@supports (container-type: inline-size) {
  .ludan table.ludan-table--bead14 td {
    width: calc(100cqw / 14);
    height: calc(100cqw / 14);
    aspect-ratio: unset;
  }
}

.ludan table.ludan-table--bead14 td > img[width="100%"] {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

/* 珠子路：底珠尺寸与单独一张结果图一致；红点/蓝点绝对叠在上方，不参与占位 */
.ludan table.ludan-table--bead14 td .ludan-bead-stack {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  line-height: 0;
}

.ludan table.ludan-table--bead14 .ludan-bead-base {
  position: relative;
  z-index: 0;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.ludan table.ludan-table--bead14 .ludan-bead-dot {
  position: absolute;
  z-index: 1;
  width: 42%;
  height: auto;
  max-width: 48%;
  object-fit: contain;
  pointer-events: none;
}

.ludan table.ludan-table--bead14 .ludan-bead-dot--tl {
  top: 0;
  left: 0;
}

.ludan table.ludan-table--bead14 .ludan-bead-dot--br {
  bottom: 0;
  right: 0;
}

.ludan table.ludan-table td img {
  display: block;
}

.ludan table.ludan-table td > img[width="100%"] {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* 大路格子内的圆必须参与表格布局；若沿用上面的 absolute，在 collapse/矮行高时会全部叠到表头顶 */
.ludan table.ludan-table[data-road="dalu"] td > img[width="100%"] {
  position: static;
  top: auto;
  left: auto;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

/* 大路 / 三星路：底圈尺寸不变；对子角标叠上；大路和局斜杠最上层盖住 */
.ludan table.ludan-table[data-road="dalu"] td .ludan-dalu-stack,
.ludan table.ludan-table--bigeye[data-road="sxl"] td .ludan-dalu-stack {
  position: relative;
  display: block;
  width: 100%;
  line-height: 0;
}

.ludan table.ludan-table[data-road="dalu"] .ludan-dalu-base,
.ludan table.ludan-table--bigeye[data-road="sxl"] .ludan-dalu-base {
  position: relative;
  z-index: 0;
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  margin: 0 auto;
  object-fit: contain;
}

.ludan table.ludan-table[data-road="dalu"] .ludan-dalu-dot,
.ludan table.ludan-table--bigeye[data-road="sxl"] .ludan-dalu-dot {
  position: absolute;
  z-index: 1;
  width: 42%;
  height: auto;
  max-width: 48%;
  object-fit: contain;
  pointer-events: none;
}

.ludan table.ludan-table[data-road="dalu"] .ludan-dalu-dot--tl,
.ludan table.ludan-table--bigeye[data-road="sxl"] .ludan-dalu-dot--tl {
  top: 0;
  left: 0;
}

.ludan table.ludan-table[data-road="dalu"] .ludan-dalu-dot--br,
.ludan table.ludan-table--bigeye[data-road="sxl"] .ludan-dalu-dot--br {
  bottom: 0;
  right: 0;
}

.num.ludan-tie-over.ludan-tie-over--dalu {
  z-index: 2;
}

.ludan-qcell {
  overflow: hidden;
}

.ludan-q {
  position: absolute;
  object-fit: contain;
}

.ludan-q--tl {
  top: 0;
  left: 0;
}

.ludan-q--tr {
  top: 0;
  right: 0;
  left: auto;
}

.ludan-q--bl {
  bottom: 0;
  left: 0;
  top: auto;
}

.ludan-q--br {
  bottom: 0;
  right: 0;
  top: auto;
  left: auto;
}

.num.ludan-tie-over {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}

.num.ludan-tie-over img {
  position: relative !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: contain;
}

/* 下局提示（对照实盘结构） */
.xjts {
  position: relative;
  display: flex;
  width: 100%;
  min-height: 88px;
  background: #fff;
  border: 1px solid #e0e0e0;
  box-sizing: border-box;
  margin-bottom: 4px;
}

.xjts__rail {
  width: 10%;
  flex-shrink: 0;
  border-right: 1px solid #ccc;
  display: flex;
  align-items: center;
  justify-content: center;
}

.xjts__tips {
  color: #4390d3;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  line-height: 1.35;
  writing-mode: vertical-lr;
}

.xjts__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.predict_container {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}

.predict-row {
  display: flex;
  flex: 1;
  align-items: stretch;
  min-height: 0;
}

.predict-b {
  border-bottom: 1px solid #ccc;
}

.predict-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}

.predict-cell--side {
  width: 25%;
  flex-shrink: 0;
  border-right: 1px solid #ccc;
}

.predict_be {
  width: 24%;
  border-right: 1px solid #ccc;
}

.predict_sr {
  width: 24%;
  border-right: 1px solid #ccc;
}

.predict_cr {
  width: 27%;
  padding: 4px 6px;
}

.predict_container .predict-cell--side img {
  width: 18px;
  height: 18px;
  object-fit: contain;
  display: block;
}

.predict_container .red0,
.predict_container .blue0 {
  width: 16.6px;
  height: 16.6px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.predict_container .red0 {
  background-image: url(/static/baccarat-h5/img/ludan/red0.f09f47a.png);
}

.predict_container .blue0 {
  background-image: url(/static/baccarat-h5/img/ludan/blue0.b9a3832.png);
}

.predict_container .red3,
.predict_container .blue3 {
  width: 16.6px;
  height: 16.6px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.predict_container .red3 {
  background-image: url(/static/baccarat-h5/img/ludan/red2.8935d23.png);
}

.predict_container .blue3 {
  background-image: url(/static/baccarat-h5/img/ludan/blue2.a09cdc9.png);
}

.predict_container .redg,
.predict_container .blueg {
  width: 9.09px;
  height: 12.75px;
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
}

.predict_container .redg {
  background-image: url(/static/baccarat-h5/img/ludan/redg.688448e.png);
}

.predict_container .blueg {
  background-image: url(/static/baccarat-h5/img/ludan/blueg.901a467.png);
}

.predict_container .predict-empty {
  width: 16.6px;
  height: 16.6px;
  background: none;
}

.road-ju {
  flex: 0 0 auto;
  width: 100%;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: space-around;
  gap: 4px 2px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 10px 8px;
  background: #3c3f41;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: 1px solid #2f3133;
  font-size: 12px;
  box-sizing: border-box;
}

.road-ju::-webkit-scrollbar {
  display: none;
}

.road-ju .d {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 1 1 0;
  min-width: 0;
  box-sizing: border-box;
  white-space: nowrap;
}

.road-ju .t {
  font-size: 12px;
  font-weight: 700;
  color: #e8c547;
  letter-spacing: 0.02em;
  line-height: 1.2;
}

.road-ju .j {
  font-size: 13px;
  font-weight: 800;
  color: #fff;
  line-height: 1.2;
}

.topbar--room {
  background: #252525;
  border-bottom: 1px solid #3a3a3a;
}

.topbar--room .topbar__room {
  font-size: 14px;
  line-height: 1.2;
  color: #ffcc33;
  letter-spacing: 0.02em;
}

.topbar--room .topbar__meta {
  color: #fff;
  font-size: 11px;
  line-height: 1.2;
  margin-top: 1px;
}

.balance-pill--room {
  margin-top: 0;
  padding: 2px 8px;
  font-size: 12px;
  border-color: rgba(255, 204, 51, 0.45);
  color: #ffcc33;
  background: rgba(0, 0, 0, 0.35);
}

.balance-pill__coin {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: linear-gradient(145deg, #ffe08a, #c9a050);
  display: inline-block;
  vertical-align: -2px;
}

.room-scroll--split {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 聊天区容器：与 .room-scroll 同宽（通栏 100%，无 max-width 收窄） */
.room-chat-layer {
  position: relative;
  isolation: isolate;
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: visible;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

/* 投注表 / 余分表：Tab + 表格（class 对齐 Vue odds_table） */
.odds-board-wrap {
  flex: 0 0 auto;
  width: 100%;
  max-width: 100%;
  align-self: stretch;
  max-height: min(40vh, 300px);
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #ebebeb;
  border-top: 1px solid #d0d0d0;
  border-bottom: 1px solid #d0d0d0;
  box-sizing: border-box;
  overflow: hidden;
}

/* 临时隐藏：内嵌 Tab 表格与实盘展示不一致，恢复展示时从 room.php 去掉 odds-board-wrap--hidden */
.page-room .odds-board-wrap.odds-board-wrap--hidden {
  display: none;
}

.odds-board-tabs {
  flex: 0 0 auto;
  display: flex;
  gap: 0;
  border-bottom: 1px solid #c8c8c8;
  background: #e3e3e3;
}

.odds-board-tabs .odds-tab {
  flex: 1;
  margin: 0;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 700;
  border: none;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: rgba(44, 44, 44, 0.55);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.odds-board-tabs .odds-tab.is-active {
  color: #1565c0;
  background: rgba(255, 255, 255, 0.75);
  border-bottom-color: #1565c0;
}

.odds-panel {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.odds-panel.is-active {
  display: block;
}

.odds_table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  color: #333;
  background: #f5f5f5;
}

.odds_table tr.odds_title th {
  padding: 11px 8px;
  text-align: center;
  font-weight: 700;
  font-size: 13px;
  color: #2c2c2c;
  background: linear-gradient(180deg, #f2f2f2, #e2e2e2);
  border-bottom: 1px solid #c8c8c8;
}

.odds_table .odds_head td {
  padding: 9px 5px;
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: #333;
  background: #dedede;
  border: 1px solid #c8c8c8;
}

/* 投注表表头：与列数据同色（覆盖 .odds_head td 的 #333） */
.odds_table--bet .odds_head .odds_nickname {
  color: #1a1a1a;
}

.odds_table--bet .odds_head .odds_x,
.odds_table--bet .odds_head .odds_xd {
  color: #00f;
}

.odds_table--bet .odds_head .odds_z,
.odds_table--bet .odds_head .odds_zd {
  color: #c62828;
}

.odds_table--bet .odds_head .odds_h {
  color: #2e7d32;
}

.odds_table--bet .odds_head .odds_xy {
  color: #6a1b9a;
}

.odds_table tr:not(.odds_title):not(.odds_head):not(.zj) {
  background: #fafafa;
}

.odds_table tr:not(.odds_title):not(.odds_head):not(.zj):nth-child(even) {
  background: #f0f0f0;
}

.odds_table td {
  padding: 9px 5px;
  text-align: center;
  border: 1px solid #d5d5d5;
  word-break: break-all;
  line-height: 1.35;
}

.odds_table .odds_nickname {
  text-align: center;
  font-weight: 600;
  color: #2c2c2c;
}

.odds_table .odds_x {
  color: #00f;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.odds_table .odds_z {
  color: #c62828;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.odds_table .odds_xd {
  color: #00f;
  font-variant-numeric: tabular-nums;
}

.odds_table .odds_zd {
  color: #c62828;
  font-variant-numeric: tabular-nums;
}

.odds_table .odds_h {
  color: #2e7d32;
  font-variant-numeric: tabular-nums;
}

.odds_table .odds_xy {
  color: #6a1b9a;
  font-variant-numeric: tabular-nums;
}

/* 投注表「总计」行：蓝底白字（与列色规则区分） */
.odds_table tr.odds_summary td {
  background: #5b9bd5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 7px 5px;
  line-height: 1.25;
  border-color: rgba(255, 255, 255, 0.28);
  vertical-align: middle;
}

.odds_table tr.odds_summary td .bjl-round-gain--pos,
.odds_table tr.odds_summary td .bjl-round-gain--neg {
  color: #fff;
}

.odds_table tr.zj td {
  font-weight: 800;
  background: #e0e0e0 !important;
  border-top: 2px solid #b0b0b0;
  color: #1a1a1a;
}

.odds_table tr.zj .odds_x {
  color: #0d47a1;
}

.odds_table tr.zj .odds_z {
  color: #b71c1c;
}

/* 余分表（开奖结算后）：本局得分 odds_x / odds_xx，剩余分与初始分 odds_k */
.odds_table--score .odds_head .odds_xx,
.odds_table--score .odds_head .odds_k {
  color: #333;
  font-weight: 700;
}

.odds_table--score .odds_x {
  color: #c62828;
}

.odds_table--score .odds_xx {
  color: #1565c0;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* 余分表·本局得分：正 #00f，负 #c95466（数值由 h5-live.js htmlScoreRoundGain 包 span） */
.odds_table--score td.odds_xx .bjl-round-gain--pos,
.chat-embed--score .chat-embed-table td.num .bjl-round-gain--pos {
  color: #00f;
}

.odds_table--score td.odds_xx .bjl-round-gain--neg,
.chat-embed--score .chat-embed-table td.num .bjl-round-gain--neg {
  color: #c95466;
}

/* 余分表「总计」行：本局得分 span 须白字（压过上一段更高特异性的蓝/红） */
.odds_table--score tr.odds_summary td.odds_xx .bjl-round-gain--pos,
.odds_table--score tr.odds_summary td.odds_xx .bjl-round-gain--neg,
.chat-embed--score .chat-embed-table__total td.num .bjl-round-gain--pos,
.chat-embed--score .chat-embed-table__total td.num .bjl-round-gain--neg {
  color: #fff;
}

.odds_table--score .odds_k {
  color: #1a1a1a;
  font-variant-numeric: tabular-nums;
}

.odds_table--score .odds_k--init {
  color: #424242;
}

.odds_table--score tr.winn {
  background: #fff8e6 !important;
}

.odds_table--score tr.winn .odds_nickname {
  font-weight: 700;
}

.odds_table--score .odds-crown {
  vertical-align: -2px;
  width: 14px;
  height: 14px;
  margin-right: 4px;
  object-fit: contain;
}

.odds_table--score .odds-crown--hide {
  display: none;
}

.odds_table--score tr.zj .odds_xx {
  color: #1565c0;
}

.odds_table--score tr.zj .odds_k {
  color: #1a1a1a;
}

/* 房间页：投注表 / 余分表（固定 Tab + 时间轴嵌入）横向 100% */
.page-room .room-chat-layer > .odds-board-wrap .odds_table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}

/* 时间轴：普通消息左 10px + 右 56（侧栏）；投注/余分表块仅安全区内边距 = 与设备可视宽度一致 */
.page-room .chat-block .bjl-feed > .chat-item {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(56px, env(safe-area-inset-right, 0px));
}

/* 自己发的消息：右侧留白与左侧「头像+消息」一致（10px + 安全区），不再用 56px 侧栏留白 */
.page-room .chat-block .bjl-feed > .chat-item--self {
  padding-right: max(10px, env(safe-area-inset-right, 0px));
}

.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-bet,
.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-score {
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}

.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-bet .chat-item__body,
.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-score .chat-item__body {
  max-width: 100%;
  width: 100%;
}

.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-bet .chat-item__bubble--embed,
.page-room .chat-block .bjl-feed > .chat-item--system.chat-item--embed-score .chat-item__bubble--embed {
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  padding: 8px 0 0;
}

.page-room .chat-embed--bet .chat-embed__scroll,
.page-room .chat-embed--score .chat-embed__scroll {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.page-room .chat-embed--bet .chat-embed-table,
.page-room .chat-embed--score .chat-embed-table {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* 开奖结果：286×123 底图 + 叠字；默认隐藏，.is-visible 时与余分表同批展示 */
.room-draw-result {
  display: none;
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 18;
  width: 286px;
  height: 123px;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  line-height: 0;
  text-align: center;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.2));
}

.room-draw-result.is-visible {
  display: block;
}

.room-draw-result__bg {
  width: 286px;
  height: 123px;
  display: block;
  object-fit: fill;
}

.phase-draw-mock {
  position: relative;
  width: 286px;
  height: 123px;
  margin: 0 auto;
  line-height: 0;
  text-align: center;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.2));
}

.phase-draw-mock .room-draw-result__bg {
  width: 286px;
  height: 123px;
  display: block;
  object-fit: fill;
}

.room-draw-result .curJuInfo,
.phase-draw-mock .curJuInfo {
  position: absolute;
  left: 50%;
  top: 18.3%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  line-height: 1.25;
  pointer-events: none;
}

.room-draw-result .resultInfo,
.phase-draw-mock .resultInfo {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.85em;
  box-sizing: border-box;
  line-height: 1.2;
  pointer-events: none;
}

.room-draw-result .resultInfo__main,
.room-draw-result .resultInfo__sub,
.phase-draw-mock .resultInfo__main,
.phase-draw-mock .resultInfo__sub {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.room-draw-result .resultInfo__main,
.phase-draw-mock .resultInfo__main {
  color: #ff0000;
}

.room-draw-result .resultInfo__main--player,
.phase-draw-mock .resultInfo__main--player {
  color: #0066ff;
}

.room-draw-result .resultInfo__sub,
.phase-draw-mock .resultInfo__sub {
  color: #e6c780;
}

.room-draw-result .resetclass {
  display: none;
}

/* 停止下注 / 开始游戏 / 倒计时30秒：286×79 纯图，叠在聊天区同槽；.is-visible 时显示 */
.room-end-bet,
.room-begin-bet,
.room-countdown30 {
  display: none;
  position: absolute;
  left: 50%;
  top: 6px;
  z-index: 18;
  width: 286px;
  height: 79px;
  margin: 0;
  padding: 0;
  transform: translateX(-50%);
  line-height: 0;
  pointer-events: none;
  filter: drop-shadow(0 3px 10px rgba(0, 0, 0, 0.2));
}

.room-end-bet.is-visible,
.room-begin-bet.is-visible,
.room-countdown30.is-visible {
  display: block;
}

.room-end-bet__img,
.room-begin-bet__img,
.room-countdown30__img {
  width: 286px;
  height: 79px;
  display: block;
  object-fit: fill;
}

/* 余分表标题：实盘为红字居中 */
.odds_table--score tr.odds_title th {
  color: #e53935;
}

/* 主聊天区：与设备同宽；横向留白改到每条消息上，避免 overflow 裁掉全宽表 */
.room-chat-body {
  position: relative;
  flex: 1;
  min-height: 0;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: row;
  align-items: stretch;
  border-top: 1px solid #d0d0d0;
  background: #e5e5e5;
  overflow: visible;
}

/* 有开奖/停止下注悬浮条时，聊天内容上推，避免与图重叠 */
.room-chat-body:has(.room-draw-result.is-visible) .chat-block,
.room-chat-body:has(.room-end-bet.is-visible) .chat-block,
.room-chat-body:has(.room-begin-bet.is-visible) .chat-block,
.room-chat-body:has(.room-countdown30.is-visible) .chat-block {
  padding-top: 94px;
}

/* 房间内「局流程」纵向示意：随主滚动区上下滑动查看 */
.room-phase-guide {
  flex: 0 0 auto;
  background: linear-gradient(180deg, #cfcfcf 0%, #e4e4e4 38%, #dedede 100%);
  border-top: 1px solid #a8a8a8;
  padding: 14px 12px 24px;
  box-sizing: border-box;
}

.room-phase-guide__intro {
  margin: 0 0 18px;
  text-align: center;
  font-size: 13px;
  font-weight: 700;
  color: #263238;
  padding: 10px 12px;
  line-height: 1.5;
  background: rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  border: 1px solid rgba(0, 0, 0, 0.07);
}

.room-phase-guide__step {
  margin-bottom: 22px;
  padding: 14px 12px 16px;
  background: #fafafa;
  border-radius: 12px;
  border: 1px solid #b5b5b5;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

.room-phase-guide__hd {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 800;
  color: #0d47a1;
  letter-spacing: 0.02em;
}

.room-phase-guide__mock {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 14px 8px;
  background: #e8e8e8;
  border-radius: 10px;
  border: 1px dashed #9e9e9e;
}

.room-phase-guide__mock img {
  display: block;
  width: 286px;
  max-width: 100%;
  height: auto;
}

.room-phase-guide__chat {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #e5e5e5;
  border-radius: 10px;
  border: 1px solid #bdbdbd;
}

.room-phase-guide__bubble {
  padding: 9px 13px;
  background: #fff;
  border-radius: 10px;
  font-size: 13px;
  color: #1a1a1a;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
}

.room-phase-guide__note {
  margin: 12px 0 0;
  font-size: 11px;
  line-height: 1.55;
  color: #424242;
}

.room-phase-guide__note code {
  font-size: 10px;
  background: #eceff1;
  padding: 1px 5px;
  border-radius: 4px;
  word-break: break-all;
}

.room-phase-guide__tablewrap {
  margin-top: 12px;
}

.room-phase-guide__subhd {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 700;
  color: #333;
}

.room-phase-guide__footer {
  margin: 4px 0 0;
  text-align: center;
  font-size: 12px;
  color: #616161;
  font-weight: 600;
}

.odds_table--compact {
  font-size: 11px;
}

.odds_table--compact tr.odds_title th {
  font-size: 12px;
  padding: 8px 4px;
}

.odds_table--compact .odds_head td {
  padding: 7px 4px;
}

.odds_table--compact td {
  padding: 7px 4px;
}

.room-chat-body .chat-block {
  border-top: none;
  background: transparent;
}

.room-side-wrap {
  flex: 0 0 0;
  width: 0;
  min-width: 0;
  padding: 0;
  overflow: visible;
  pointer-events: none;
}

.room-side-wrap .side-rail {
  pointer-events: auto;
}

/* 路单 / 视频：默认隐藏；展开时为 fixed，顶栏下沿对齐（--bjl-room-topbar-offset），与聊天滚动解耦 */
.room-scroll--split .road-panel,
.room-scroll--split .video-panel {
  display: none;
}

.room-scroll--split .road-panel.is-visible {
  display: flex;
  flex-direction: column;
  /* 与 .page-room > .topbar 底边对齐（--bjl-room-topbar-offset 为整段顶栏高度，已含 safe-area） */
  position: fixed;
  left: env(safe-area-inset-left, 0);
  right: env(safe-area-inset-right, 0);
  top: var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px));
  z-index: 24;
  width: auto;
  max-width: 100%;
  min-height: 0;
  max-height: min(
    640px,
    calc(
      100dvh - var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px)) - env(safe-area-inset-bottom, 0px) - 80px
    )
  );
  margin: 0;
  border: none;
  border-radius: 0;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.room-scroll--split .road-panel.is-visible .road-ju {
  flex-shrink: 0;
}

.room-scroll--split .road-panel.is-visible .road-panel__inner {
  flex: 0 0 auto;
  min-height: 0;
  overflow: visible;
}

/* #bjl-road-live：简要路单条（road_tail，由 h5-live.js 渲染） */
.bjl-road-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
  justify-content: flex-start;
}

.bjl-road-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 28px;
  padding: 0 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 800;
  border: 1px solid rgba(0, 0, 0, 0.12);
  box-sizing: border-box;
}

.bjl-road-cell--b {
  background: #b71c1c;
  color: #fff;
}

.bjl-road-cell--p {
  background: #0d47a1;
  color: #fff;
}

.bjl-road-cell--t {
  background: #1b5e20;
  color: #fff;
}

.bjl-road-cell--u {
  background: #eceff1;
  color: #546e7a;
}

.room-scroll--split .video-panel.is-visible {
  display: flex;
  flex-direction: column;
  /* 与路单层一致：fixed + 顶栏偏移；高度随画面比例收缩，避免上下大块黑边 */
  position: fixed;
  left: env(safe-area-inset-left, 0);
  right: env(safe-area-inset-right, 0);
  top: var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px));
  z-index: 24;
  width: auto;
  max-width: 100%;
  min-height: 0;
  height: auto;
  max-height: min(
    720px,
    calc(
      100dvh - var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px)) - env(safe-area-inset-bottom, 0px) - 72px
    )
  );
  margin: 0;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid rgba(201, 160, 80, 0.35);
  overflow: hidden;
  background: #000;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
}

.room-scroll--split .video-panel.is-visible .video-panel__inner {
  flex: 0 0 auto;
  min-height: 0;
  height: auto;
  display: block;
  padding: 0;
  position: relative;
  overflow: hidden;
  background: #000;
}

/* 直播：不放大 iframe（无 scale），原比例铺满裁剪框，避免左右被切 */
.room-scroll--split .video-panel.is-visible .video-panel__crop {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: min(56vh, 480px);
  position: relative;
  overflow: hidden;
  background: #000;
}

.room-scroll--split .video-panel.is-visible .video-panel__frame {
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  transform: none;
  background: #000;
  pointer-events: auto;
}

.video-panel__placeholder {
  color: rgba(201, 160, 80, 0.42);
  font-size: 13px;
  font-weight: 600;
}

/* 全页下注读秒：fixed，叠在路单/视频之上；位于大路网格上沿居中（对齐实盘习惯位） */
.bjl-round-cd-float {
  position: fixed;
  top: calc(var(--bjl-room-topbar-offset, calc(env(safe-area-inset-top, 0px) + 44px)) + 10px);
  left: 85%;
  transform: translateX(-50%);
  right: auto;
  z-index: 29;
  pointer-events: none;
}

.bjl-round-cd-float .road-panel__cd {
  width: 56px;
  height: 56px;
  border-width: 3px;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.55),
    0 6px 16px rgba(0, 0, 0, 0.45);
  pointer-events: none;
}

.bjl-round-cd-float .road-panel__cd span {
  font-size: 21px;
}

/* 路单内旧版读秒位已迁至 #bjl-round-cd-root，此处样式保留给静态 room.html 兼容时可复用 */
.road-panel__timer-float {
  position: absolute;
  top: 10px;
  right: 12px;
  z-index: 12;
  pointer-events: none;
}

.road-panel__timer-float .road-panel__cd {
  pointer-events: none;
}

.road-panel__table-tag,
.video-panel__table-tag {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: #f0c85a;
  padding: 5px 14px;
  border: 1px solid rgba(232, 200, 120, 0.65);
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.55);
}

.video-panel__overlay-head {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 8px 10px 6px;
  flex-shrink: 0;
  background: #000;
}

.road-panel__cd {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 2px solid rgba(232, 200, 120, 0.85);
  background: radial-gradient(circle at 30% 25%, #1a1a1a, #000);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.6),
    0 4px 12px rgba(0, 0, 0, 0.4);
}

.road-panel__cd span {
  font-size: 17px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #ffcc33;
}

/* 桌内视频占位（与路单区视觉一致） */
.video-panel {
  margin: 8px 12px 0;
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-gold);
  background: rgba(8, 8, 6, 0.55);
  overflow: hidden;
}

.video-panel__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 168px;
  padding: 20px 16px;
  background: rgba(0, 0, 0, 0.22);
}

.video-panel__placeholder {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  text-align: center;
  line-height: 1.5;
}

/* 房间页小键盘：视口底部 fixed 层，盖住聊天与侧栏，不随滚动；底栏保持在上层可点发送 */
.page-room .keypad-inline {
  display: none;
  background: #141210;
  border-top: 1px solid var(--line-gold-strong);
  box-shadow: 0 -4px 14px rgba(0, 0, 0, 0.35);
}

.page-room .keypad-inline.is-open {
  display: block;
  position: fixed;
  left: 0;
  right: 0;
  bottom: calc(60px + env(safe-area-inset-bottom, 0px));
  z-index: 40;
  max-height: min(58dvh, calc(100dvh - 96px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)));
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.keypad--inline {
  width: 100%;
  max-width: none;
  background: linear-gradient(180deg, #2a2620, #141210) !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 10px 8px 10px !important;
  box-shadow: none !important;
}

/* 聊天：浅底 + 左头像 + 白气泡小尾巴 */
.chat-block {
  margin: 0;
  flex: 1;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  -webkit-overflow-scrolling: touch;
  background: #e5e5e5;
  padding: 12px 10px 16px;
  border-top: 1px solid #d0d0d0;
}

.bjl-feed {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 4px;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.chat-item--system {
  justify-content: center;
  margin-bottom: 12px;
}

.chat-item--system .chat-item__avatar {
  display: none;
}

.chat-item--system .chat-item__body {
  flex: 0 1 auto;
  max-width: 96%;
  text-align: center;
}

/* 投注/余分时间轴嵌入：整行占满（不依赖 :has，兼容旧 WebView） */
.chat-item--system.chat-item--embed-bet .chat-item__body,
.chat-item--system.chat-item--embed-score .chat-item__body {
  flex: 1 1 auto;
  max-width: 100%;
  width: 100%;
  min-width: 0;
}

.chat-item--system .chat-item__head {
  justify-content: center;
}

.chat-item--system .chat-item__nick {
  color: #7a6a52;
  font-weight: 700;
}

.chat-item--system .chat-item__bubble {
  background: linear-gradient(180deg, #faf6ec, #ede4d4);
  border: 1px solid rgba(201, 160, 80, 0.45);
  color: #3d2918;
  text-align: left;
  max-width: 100%;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.chat-item--system .chat-item__bubble--plain {
  text-align: center;
  font-size: 13px;
}

.chat-item--system .chat-item__bubble--embed {
  /* 勿用 inline-flex：子块 .chat-embed 会缩成内容宽，标题与「暂无数据」无法占满一行 */
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  text-align: left;
  /* 底边距为 0：表格外不再露出气泡底色条（「总计」下空白） */
  padding: 8px 10px 0;
  overflow: hidden;
}

.chat-item--system .chat-item__bubble--embed > .chat-embed {
  width: 100%;
  min-width: 0;
}

.chat-item--system .chat-item__bubble--phase {
  /* 开始游戏 / 倒计时 / 停注 / 开奖：仅展示素材图，不要外层「气泡」底 */
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  text-align: center;
}

.chat-item--system .chat-item__bubble--embed.chat-item__bubble--phase {
  padding: 0;
}

.chat-item--system .chat-item__bubble--phase::before {
  content: none;
  display: none;
}

/* 控盘阶段图（含开奖）：左侧管理员头像 + 昵称与时间 + 下方素材 */
.chat-item--phase-admin .chat-item__bubble--phase {
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
  border-radius: 0;
  display: block;
}

.chat-item--phase-admin .chat-item__bubble--embed.chat-item__bubble--phase {
  padding: 0;
}

.chat-item--phase-admin .chat-item__bubble--phase::before {
  content: none;
  display: none;
}

/* 管理员私信/回复：正文多行（昵称 + 换行 + 内容），勿用 inline-flex */
.chat-item--phase-admin .chat-item__bubble--plain,
.chat-item--phase-admin .chat-item__bubble--multiline {
  display: block;
  white-space: normal;
}

.chat-item__private-nick {
  display: block;
  font-weight: 600;
  color: #333;
  line-height: 1.4;
}

.chat-item__avatar-img {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  object-fit: cover;
  border: 1px solid rgba(0, 0, 0, 0.08);
  display: block;
  background: #f0f0f0;
}

.chat-item__nick--admin {
  color: #8e44ad;
  font-weight: 700;
  font-size: 13px;
  line-height: 1.35;
  flex: 1;
  min-width: 0;
  word-break: break-word;
}

.chat-item__head--phase-admin {
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
}

.chat-item__head--phase-admin .chat-item__nick--admin {
  flex: none;
  width: 100%;
}

.chat-item--phase-admin .chat-item__time {
  color: #8e44ad;
  opacity: 0.75;
  flex-shrink: 0;
}

.chat-item--phase-admin .chat-phase-imgwrap {
  margin: 0;
  text-align: left;
}

.chat-item--phase-admin .chat-phase-img {
  margin: 0;
}

.chat-item--phase-admin .chat-phase-result {
  margin: 0 auto 0 0;
  text-align: left;
}

.chat-phase-imgwrap {
  margin: 0 auto;
  line-height: 0;
  text-align: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.chat-phase-img {
  width: 286px;
  max-width: 100%;
  height: auto;
  aspect-ratio: 286 / 79;
  display: block;
  object-fit: fill;
  margin: 0 auto;
}

.chat-phase-result {
  position: relative;
  width: 286px;
  max-width: 100%;
  margin: 0 auto;
  line-height: 0;
  text-align: center;
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.chat-phase-result__bg {
  width: 100%;
  height: auto;
  aspect-ratio: 286 / 123;
  display: block;
  object-fit: fill;
}

.chat-phase-result__ju {
  position: absolute;
  left: 50%;
  top: 18.3%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  white-space: nowrap;
  line-height: 1.25;
  pointer-events: none;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.chat-phase-result__row {
  position: absolute;
  left: 50%;
  top: 66%;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 0.45em;
  pointer-events: none;
  box-sizing: border-box;
  line-height: 1.2;
  max-width: 96%;
  white-space: nowrap;
}

.chat-phase-result__main {
  font-size: clamp(24px, 5.4vw, 32px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #ff0000;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-phase-result__main--player {
  color: #0066ff;
}

.chat-phase-result__main--tie {
  color: var(--tie);
}

.chat-phase-result__sub {
  font-size: clamp(18px, 4.4vw, 24px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #e6c780;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-phase-result__lucky6 {
  font-size: clamp(18px, 4.4vw, 24px);
  font-weight: 700;
  letter-spacing: 0.02em;
  color: #d64b7a;
  white-space: nowrap;
  flex-shrink: 0;
}

.chat-phase-result__resettle {
  position: absolute;
  left: 50%;
  top: 88%;
  transform: translate(-50%, -50%);
  line-height: 1.25;
  font-size: clamp(13px, 3.4vw, 16px);
  font-weight: 700;
  color: #e53935;
  letter-spacing: 0.04em;
  white-space: nowrap;
  pointer-events: none;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.35);
}

.chat-item--bet .chat-item__bubble {
  background: linear-gradient(180deg, #fff9e6, #f5ecd8);
  border-color: rgba(201, 160, 80, 0.55);
}

/* 当前用户消息：头像在右、昵称时间在气泡上方靠右（与微信式会话一致） */
.chat-item--self {
  flex-direction: row-reverse;
}

.chat-item--self .chat-item__body {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.chat-item--self .chat-item__head {
  justify-content: flex-end;
}

.chat-item__avatar--self {
  background: linear-gradient(135deg, #5dce73, #2e9e4f);
  border-color: rgba(30, 120, 60, 0.35);
}

.chat-embed {
  font-size: 11px;
  color: #2c2c2c;
}

.chat-embed__title {
  font-weight: 700;
  margin: 0 0 6px;
  text-align: center;
  font-size: 12px;
  color: #1565c0;
}

.chat-embed--score .chat-embed__title {
  color: #c62828;
}

.chat-embed__empty {
  margin: 0;
  text-align: center;
  color: rgba(60, 60, 60, 0.7);
  font-size: 12px;
}

/* 无数据块：标题与「暂无…」居中（不依赖 :has，兼容旧 WebView） */
.chat-embed.chat-embed--empty {
  text-align: center;
}

.chat-embed__scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
  display: block;
  margin-bottom: 0;
  padding-bottom: 0;
}

.chat-embed-table {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  table-layout: fixed;
  font-size: 12px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(0, 0, 0, 0.1);
}

.chat-embed-table th,
.chat-embed-table td {
  border: 1px solid rgba(0, 0, 0, 0.12);
  padding: 7px 4px;
  word-break: break-all;
  text-align: center;
  line-height: 1.35;
}

.chat-embed-table th {
  background: #ececec;
  font-size: 11px;
  font-weight: 700;
}

.chat-embed-table .num {
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* 投注表（时间轴嵌入）：列色与 Tab 投注表一致 */
.chat-embed--bet .chat-embed-table th.bjl-bet-col--nick,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--nick {
  color: #1a1a1a;
}

.chat-embed--bet .chat-embed-table th.bjl-bet-col--x,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--x,
.chat-embed--bet .chat-embed-table th.bjl-bet-col--xd,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--xd {
  color: #00f;
}

.chat-embed--bet .chat-embed-table th.bjl-bet-col--z,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--z,
.chat-embed--bet .chat-embed-table th.bjl-bet-col--zd,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--zd {
  color: #c62828;
}

.chat-embed--bet .chat-embed-table th.bjl-bet-col--h,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--h {
  color: #2e7d32;
}

.chat-embed--bet .chat-embed-table th.bjl-bet-col--xy,
.chat-embed--bet .chat-embed-table td.bjl-bet-col--xy {
  color: #6a1b9a;
}

/* 「总计」行：蓝底白字、略大字号（嵌入表列色需单独压过） */
.chat-embed-table__total td {
  background: #5b9bd5;
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  padding: 6px 4px;
  line-height: 1.25;
  border-color: rgba(255, 255, 255, 0.28);
  vertical-align: middle;
}

.chat-embed--bet .chat-embed-table__total td.bjl-bet-col--nick,
.chat-embed--bet .chat-embed-table__total td.num {
  background: #5b9bd5;
  color: #fff;
  border-color: rgba(255, 255, 255, 0.28);
}

.chat-embed-table__total td .bjl-round-gain--pos,
.chat-embed-table__total td .bjl-round-gain--neg {
  color: #fff;
}

.chat-item--system .chat-item__gear {
  display: none;
}

.chat-item {
  display: flex;
  gap: 9px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.chat-item__avatar {
  flex-shrink: 0;
  width: 38px;
  height: 38px;
  border-radius: 6px;
  background: linear-gradient(135deg, #b8c0cc, #8a929e);
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.chat-item__avatar--2 {
  background: linear-gradient(135deg, #e8b4b4, #c87878);
}

.chat-item__avatar--3 {
  background: linear-gradient(135deg, #c4b5e8, #8b7ec4);
}

.chat-item__body {
  flex: 1;
  min-width: 0;
}

.chat-item__head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.chat-item__nick {
  font-size: 13px;
  font-weight: 600;
}

.chat-item__nick--1 {
  color: #2e9e4f;
}

.chat-item__nick--2 {
  color: #e67e22;
}

.chat-item__nick--3 {
  color: #8e44ad;
}

.chat-item__time {
  font-size: 11px;
  color: #999;
}

.chat-item__bubble {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 100%;
  padding:9px 11px;
  background: #fff;
  border-radius: 10px;
  font-size: 14px;
  color: #222;
  line-height: 1.35;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  position: relative;
  border: 1px solid rgba(0, 0, 0, 0.05);
  word-break: break-word;
}

.chat-item__bubble::before {
  display: none;
}

.chat-item__gear {
  flex-shrink: 0;
  border: none;
  background: transparent;
  color: #888;
  font-size: 12px;
  cursor: default;
  padding: 0;
  line-height: 1;
  opacity: 0.85;
}

.chat-tip {
  margin: 0;
  padding: 6px 2px 0;
  font-size: 13px;
  line-height: 1.55;
  color: #7b4bbd;
}

.page-room .chat-block .chat-tip {
  padding-left: max(10px, env(safe-area-inset-left, 0px));
  padding-right: max(56px, env(safe-area-inset-right, 0px));
  padding-top: 6px;
  padding-bottom: 0;
}

/* 旧版纯文字消息（其它页若仍用） */
.msg {
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.45;
}

.msg__who {
  color: var(--gold-2);
  font-weight: 600;
  margin-right: 6px;
}

.msg__time {
  font-size: 11px;
  color: var(--text-dim);
}

.msg--sys {
  color: #8fd9b0;
  font-size: 12px;
}

.msg--banner {
  text-align: center;
  padding: 10px;
  margin: 8px 0;
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(224, 120, 60, 0.9), rgba(160, 70, 30, 0.95));
  color: #fff8e8;
  font-weight: 700;
  font-size: 13px;
  border: 1px solid rgba(255, 200, 120, 0.35);
}
.side-rail {
  position: fixed;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 25;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.side-rail .side-btn {
  width: 44px;
  padding: 8px 4px;
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  color: #ffcc33;
  background: #3a3a3a;
  border: 1px solid #555;
  border-radius: 8px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
}

.side-btn--link {
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.side-btn:active {
  transform: scale(0.97);
}

.side-btn__dot {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--banker);
  color: #fff;
  font-size: 9px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-btn-wrap {
  position: relative;
}

/* 桌台右侧功能条：固定在视口右下、底栏上方（对齐常见 H5，不靠屏幕垂直居中） */
.side-rail--room {
  position: fixed;
  right: max(6px, env(safe-area-inset-right, 0px));
  top: auto;
  bottom: calc(70px + env(safe-area-inset-bottom, 0px));
  transform: none;
  z-index: 27;
  gap: 10px;
  max-height: calc(100dvh - 120px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* 底栏 */
.bottom-dock {
  position: sticky;
  bottom: 0;
  padding: 8px 10px calc(10px + env(safe-area-inset-bottom, 0));
  background: linear-gradient(180deg, rgba(20, 18, 14, 0.88), rgba(8, 7, 6, 0.96));
  border-top: 1px solid var(--line-gold);
  z-index: 28;
}

.dock-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.dock-icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--line-gold);
  background: rgba(0, 0, 0, 0.35);
  color: var(--gold-1);
  font-size: 18px;
  cursor: pointer;
  flex-shrink: 0;
}

.dock-input {
  flex: 1;
  min-width: 0;
  padding: 11px 12px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(8, 8, 6, 0.75);
  color: var(--text);
  font-size: 16px;
  outline: none;
}

.dock-send {
  flex-shrink: 0;
  padding: 11px 18px;
  border-radius: var(--radius-pill);
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: #5c1a12;
  background: linear-gradient(180deg, var(--gold-btn-top), var(--gold-btn-bot));
  cursor: pointer;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}

.bottom-dock--room {
  background: #2c2c2c;
  border-top: 1px solid #444;
}

.dock-field {
  flex: 1;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 12px 0 10px;
  border-radius: 999px;
  background: #3d3d3d;
  border: 1px solid #555;
}

.dock-field__icon {
  flex-shrink: 0;
  font-size: 14px;
  margin-right: 6px;
  opacity: 0.85;
}

.bottom-dock--room .dock-input {
  flex: 1;
  min-width: 0;
  width: 100%;
  border: none;
  background: transparent;
  padding: 12px 0;
  color: #fff;
  font-size: 16px;
  border-radius: 0;
}

.bottom-dock--room .dock-input::placeholder {
  color: #b0b0b0;
}

.dock-icon-btn--ghost {
  background: #3a3a3a;
  border-color: #555;
  color: #ffcc33;
  text-decoration: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 22px;
  line-height: 1;
}

/* 小键盘：布局样式见 .keypad-inline / .keypad--inline；不再使用全屏 .keypad-mask */
.keypad {
  width: 100%;
  max-width: 480px;
  background: linear-gradient(180deg, #2a2620, #141210);
  border-top: 1px solid var(--line-gold-strong);
  border-radius: 18px 18px 0 0;
  padding: 10px 8px calc(14px + env(safe-area-inset-bottom, 0));
}

/* 对齐 Vue keyBoard1：三行七列 */
.kb-board {
  min-height: 160px;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.kb-line {
  display: flex;
  gap: 4px;
  margin-bottom: 6px;
  align-items: stretch;
}

.kb-line:last-child {
  margin-bottom: 0;
}

.kb-item {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  margin: 0;
  padding: 6px 3px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.38);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform 0.08s ease, background 0.08s ease, border-color 0.08s ease;
}

.kb-item:active,
.kb-item.is-pressed {
  transform: scale(0.96);
  background: rgba(255, 204, 51, 0.16);
  border-color: rgba(255, 204, 51, 0.32);
}

.kb-line--bottom .kb-item--narrow {
  flex: 0 0 14.28%;
  max-width: 14.28%;
}

.kb-line--bottom .kb-item:not(.kb-item--narrow) {
  flex: 1;
}

.kb-txt {
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  pointer-events: none;
}

.kb-txt--banker {
  color: #e9052e;
}

.kb-txt--tie {
  color: #01c75b;
}

.kb-txt--player {
  color: #039af8;
}

.kb-txt--lucky {
  color: #d507ec;
  font-size: 14px;
}

.kb-txt--sanbao {
  color: #ff7744;
}

.kb-txt--num {
  color: #f5ecd8;
  font-weight: 600;
}

.kb-txt--action {
  color: #c4b9a4;
  font-size: 13px;
  font-weight: 600;
}

/* 弹层 */
.modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 50;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 0, 0, 0.55);
}

.modal.is-open {
  display: flex;
}

.modal__box {
  width: 100%;
  max-width: 360px;
  background: linear-gradient(180deg, #fdf6e9, #e8dcc8);
  border-radius: var(--radius-xl);
  border: 1px solid var(--line-gold-strong);
  box-shadow: var(--shadow-deep);
  overflow: hidden;
  color: #3d2918;
}

.modal__title {
  text-align: center;
  padding: 14px;
  font-size: 16px;
  font-weight: 700;
  border-bottom: 1px solid rgba(61, 41, 24, 0.12);
}

.modal__body {
  padding: 12px;
  max-height: 52vh;
  overflow-y: auto;
}

.modal__foot {
  padding: 12px;
  border-top: 1px solid rgba(61, 41, 24, 0.12);
}

.modal--kefu {
  padding: 0;
  background: transparent;
  z-index: 120;
  pointer-events: none;
}

.modal--kefu.is-open {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
}

.bjl-kefu-dismiss {
  flex: 0 0 clamp(72px, 18vh, 132px);
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  pointer-events: auto;
  cursor: pointer;
}

.bjl-kefu-shell {
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  background: #fff;
  pointer-events: auto;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.bjl-kefu-frame {
  flex: 1 1 auto;
  width: 100%;
  min-height: 0;
  border: 0;
  display: block;
  background: #fff;
  pointer-events: auto;
}

body.bjl-kefu-open {
  overflow: hidden;
}

.btn-wide {
  width: 100%;
  border: none;
  border-radius: var(--radius-pill);
  padding: 12px;
  font-size: 15px;
  font-weight: 700;
  color: #5c1a12;
  background: linear-gradient(180deg, #efe0c8, #cbb896);
  cursor: pointer;
}

.pick-table {
  border: 1px solid rgba(61, 41, 24, 0.15);
  border-radius: var(--radius-lg);
  padding: 10px;
  margin-bottom: 10px;
  background: rgba(255, 255, 255, 0.55);
}

.pick-table__row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}

.pick-table__name {
  font-weight: 700;
}

.pick-here {
  font-size: 11px;
  color: #b8860b;
  font-weight: 700;
}

/* 换桌弹窗：选择桌台（深色桌卡 + 路单预览 / 当前桌「您在这里」） */
.modal.modal--pick-table {
  padding: 16px 14px 24px;
  align-items: flex-end;
}

.modal__box--pick-table {
  max-width: 400px;
  width: 100%;
  background: #f5f0e6;
  border-radius: 16px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.modal__title--pick-table {
  background: transparent;
  border-bottom: none;
  padding-bottom: 6px;
  color: #1a1a1a;
  font-size: 17px;
}

.modal__body--pick-table {
  max-height: min(68vh, 520px);
  padding: 8px 10px 12px;
  background: #f5f0e6;
}

.modal__foot--pick-table {
  border-top: none;
  padding-top: 0;
}

.btn-wide--pick-table {
  background: linear-gradient(180deg, #e8dcc8, #cbb896);
}

.bjl-pick-table-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.bjl-pick-card {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.35);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
  background: #2e2e32;
}

.bjl-pick-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: linear-gradient(180deg, #3d3d3d, #282828);
  border-bottom: 1px solid #141414;
}

.bjl-pick-card__name {
  font-size: 16px;
  font-weight: 800;
  color: #ffcc33;
  letter-spacing: 0.04em;
}

.bjl-pick-card__status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  font-weight: 700;
}

.bjl-pick-card__sand::before {
  content: "";
  display: inline-block;
  width: 13px;
  height: 13px;
  margin-right: 1px;
  background: linear-gradient(180deg, #cfd8dc, #78909c);
  border-radius: 2px;
  vertical-align: -2px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.45);
}

.bjl-pick-card__status--stop {
  color: #ff5252;
}

.bjl-pick-card__status--bet {
  color: #ff8a80;
}

.bjl-pick-card__status--soon {
  color: #c8e6a0;
}

.bjl-pick-card__body {
  background: #fff;
  padding: 0;
}

.bjl-pick-card--current .bjl-pick-card__body {
  background: #2a2a2e;
}

.bjl-pick-card__ludan {
  position: relative;
  max-height: 220px;
  overflow: hidden;
}

.bjl-pick-card__ludan .ludan {
  margin: 0;
}

.bjl-pick-card__here {
  position: absolute;
  inset: 0;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.42);
  color: #ffdc66;
  font-size: clamp(16px, 4.5vw, 20px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.6);
  pointer-events: none;
}

.bjl-pick-card--clickable {
  cursor: pointer;
}

.bjl-pick-card--clickable:active {
  transform: scale(0.99);
  opacity: 0.96;
}

.bjl-pick-loading {
  text-align: center;
  padding: 16px 8px;
}

/* 记录 Tab */
.tabs {
  display: flex;
  border-bottom: 1px solid rgba(61, 41, 24, 0.12);
}

.tab {
  flex: 1;
  text-align: center;
  padding: 10px 4px;
  font-size: 13px;
  cursor: pointer;
  color: rgba(61, 41, 24, 0.55);
  border-bottom: 2px solid transparent;
}

.tab.is-active {
  color: #1e3a5f;
  font-weight: 700;
  border-bottom-color: #1e3a5f;
}

.tab-panel {
  display: none;
  padding-top: 12px;
  font-size: 12px;
}

.tab-panel.is-active {
  display: block;
}

.table-mini {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
}

.table-mini th,
.table-mini td {
  border: 1px solid rgba(61, 41, 24, 0.12);
  padding: 6px 4px;
  text-align: center;
}

.empty-hint {
  text-align: center;
  padding: 28px 12px;
  color: rgba(61, 41, 24, 0.45);
}

/* 记录弹窗：圆角 Tab、略加高、紧凑空数据区，返回键与房间底栏语感一致 */
.modal--record .modal__body {
  padding: 10px 12px 12px;
  max-height: min(68dvh, calc(100dvh - 180px));
}

.modal--record .tabs {
  gap: 8px;
  padding: 0 0 10px;
  margin: 0;
  border-bottom: none;
}

.modal--record .tab {
  flex: 1;
  min-width: 0;
  padding: 15px 6px;
  font-size: 12px;
  line-height: 1.25;
  border-radius: 10px;
  border: 1px solid rgba(61, 41, 24, 0.2);
  background: rgba(255, 255, 255, 0.45);
  color: rgba(61, 41, 24, 0.58);
  border-bottom: none;
  margin-bottom: 0;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.modal--record .tab.is-active {
  color: #1565c0;
  font-weight: 700;
  border-color: #1565c0;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 0 0 1px rgba(21, 101, 192, 0.18);
}

.modal--record .tab-panel {
  padding-top: 6px;
}

.modal--record .bjl-rec-pane {
  height: 52vh;
  min-height: 52vh;
  max-height: 52vh;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-sizing: border-box;
}

.modal--record .table-mini {
  font-size: 11px;
}

.modal--record .table-mini thead {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.55);
}

.modal--record .table-mini th,
.modal--record .table-mini td {
  padding: 7px 4px;
}

.modal--record .empty-hint {
  padding: 14px 10px;
}

.bjl-rec-load-more {
  padding: 10px 4px 4px;
  text-align: center;
  font-size: 11px;
  color: #888;
  line-height: 1.4;
}

.bjl-rec-load-more--action {
  color: #1565c0;
  cursor: pointer;
  user-select: none;
}

.bjl-rec-bets-list {
  max-height: none;
  overflow: visible;
}

.bjl-rec-bet-item {
  padding: 10px 4px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  font-size: 12px;
  line-height: 1.55;
  color: #333;
}

.bjl-rec-bet-item:last-child {
  border-bottom: none;
}

.bjl-rec-bet-head {
  font-weight: 600;
  margin-bottom: 2px;
}

.bjl-rec-bet-line {
  color: #444;
}

.bjl-rec-bet-win {
  margin-top: 2px;
  font-weight: 600;
}

.bjl-rec-bet-win--pos {
  color: #1565c0;
}

.bjl-rec-bet-win--lose {
  color: #c95466;
}

.bjl-rec-bet-win--muted {
  color: #888;
  font-weight: 500;
}

.bjl-rec-wallet-list {
  max-height: none;
  overflow: visible;
}

.bjl-rec-wallet-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 2px 12px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.bjl-rec-wallet-item:last-child {
  border-bottom: none;
}

.bjl-rec-wallet-main {
  flex: 1 1 auto;
  min-width: 0;
}

.bjl-rec-wallet-title {
  font-size: 12px;
  line-height: 1.45;
  color: #222;
  word-break: break-all;
}

.bjl-rec-wallet-time {
  margin-top: 3px;
  font-size: 11px;
  color: #999;
}

.bjl-rec-wallet-side {
  flex: 0 0 auto;
  text-align: right;
  min-width: 88px;
}

.bjl-rec-wallet-amt {
  font-size: 13px;
  font-weight: 600;
  line-height: 1.35;
}

.bjl-rec-wallet-amt--in {
  color: #d48806;
}

.bjl-rec-wallet-amt--out {
  color: #c95466;
}

.bjl-rec-wallet-amt--muted {
  color: #888;
  font-weight: 500;
}

.bjl-rec-wallet-bal {
  margin-top: 3px;
  font-size: 11px;
  color: #999;
}

.modal--record .modal__foot {
  padding: 10px 12px 14px;
}

.modal--record .btn-wide {
  padding: 17px 14px;
  border-radius: 12px;
  background: linear-gradient(180deg, #4a4a4a, #353535);
  color: #ffcc33;
  border: 1px solid #555;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.modal--record .btn-wide:active {
  filter: brightness(1.05);
}

.room-scroll {
  flex: 1 1 0;
  overflow-x: hidden;
  overflow-y: auto;
  min-height: 0;
  -webkit-overflow-scrolling: touch;
}
