﻿:root {
  --design-w: 1624;
  --design-h: 750;

  /* 龙虎斗参考 · 皇家蓝赌场（略提亮） */
  --bg-void: #121a30;
  --bg-shell-top: #1a2848;
  --bg-shell-bot: #10182c;
  --bg-panel: rgba(30, 55, 105, 0.78);
  --bg-panel-alt: rgba(24, 48, 95, 0.82);
  --panel-border: rgba(212, 175, 55, 0.18);
  --shadow-soft: 0 2px 14px rgba(0, 0, 0, 0.35);
  --shadow-card: 0 8px 32px rgba(0, 0, 0, 0.48);

  /* 皇家蓝赌桌 */
  --felt-center: #3a5fa5;
  --felt-top: #2f4f8a;
  --felt-mid: #243c78;
  --felt-bot: #161e38;
  --felt-glow: rgba(100, 155, 245, 0.28);
  --felt-border: rgba(212, 175, 55, 0.38);

  /* 庄家席 */
  --banker-top: rgba(32, 58, 108, 0.85);
  --banker-bot: rgba(24, 48, 95, 0.88);
  --banker-border: rgba(212, 175, 55, 0.15);

  /* 金色强调 */
  --gold: #d4af37;
  --gold-light: #f0d060;
  --gold-dark: #a88432;
  --cyan: #8ec4ff;

  /* 辅助色 */
  --accent-green: #7ee8a0;
  --accent-green-light: #9ef0b8;
  --accent-green-dark: #4cc878;
  --accent-orange: #f09030;

  /* 下注格（半透明玻璃） */
  --bet-neutral: rgba(255, 255, 255, 0.1);
  --bet-neutral-dark: rgba(255, 255, 255, 0.04);

  /* 毛玻璃面板 */
  --glass-bg: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(255, 255, 255, 0.03) 100%
  );
  --glass-bg-strong: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0.18) 0%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.04) 100%
  );
  --glass-border: rgba(255, 255, 255, 0.2);
  --glass-border-soft: rgba(255, 255, 255, 0.1);
  --glass-blur: blur(16px) saturate(1.35);
  --glass-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.16),
    0 4px 20px rgba(0, 0, 0, 0.16);

  --text: #eef2f8;
  --text-dim: #9cb4d8;
  --text-muted: #7898c0;
  --text-on-felt: #ffffff;
  --pool-color: #7ee8a0;
  --odds-color: #f0d060;

  --radius: 8px;
  --font: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 弹窗尺寸：由 JS 写入实际视口，移动端强制横屏时与屏幕一致 */
  --viewport-h: 100dvh;
  --viewport-w: 100dvw;
  /* 与游戏画布同比例缩放（1624×750 设计稿）；zoom 前布局尺寸需除以 scale */
  --ui-scale: 1;
  --modal-max-h-visual: calc(var(--viewport-h) * 0.88);
  --modal-max-h: calc(var(--modal-max-h-visual) / var(--ui-scale, 1));
  --modal-max-h-rules: calc(var(--modal-max-h) * 0.8);
}

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

body {
  font-family: var(--font);
  background: var(--bg-void);
  color: var(--text);
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.landscape-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

html.force-landscape {
  overflow: hidden;
}
html.force-landscape body {
  width: 100vh;
  height: 100vw;
  overflow: hidden;
}
html.force-landscape .landscape-stage {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vh;
  height: 100vw;
  transform-origin: top left;
  transform: rotate(90deg) translateY(-100vh);
}
html.force-landscape .landscape-stage .viewport-root {
  width: 100%;
  height: 100%;
}

.viewport-root {
  width: 100vw;
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(ellipse 85% 65% at 50% 42%, var(--scene-glow), transparent 68%),
    linear-gradient(180deg, var(--scene-void-top) 0%, var(--scene-void-bot) 100%);
  transition: background 0.45s ease;
}

.game-shell {
  width: 1624px;
  height: 750px;
  flex-shrink: 0;
  padding: 5px 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
  position: relative;
  transform-origin: center center;
  background: linear-gradient(168deg, var(--bg-shell-top) 0%, var(--bg-shell-bot) 100%);
  transition: background 0.45s ease;
  box-shadow:
    0 0 0 1px rgba(212, 175, 55, 0.12),
    var(--shadow-card),
    inset 0 1px 0 rgba(255, 255, 255, 0.05);
}

/* ── 顶栏：工具 + 庄家席 ── */
.top-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  height: 72px;
  padding: 0 2px;
}
.top-bar-left {
  display: flex;
  align-items: center;
  gap: 12px;
  justify-self: start;
  position: relative;
  z-index: 120;
}
.top-tools {
  display: flex;
  gap: 8px;
  align-items: center;
}
.top-icon {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  display: grid; place-items: center;
  cursor: pointer;
  font-size: 19px;
  color: #fff;
  box-shadow: var(--glass-shadow);
  transition: transform 0.12s, background 0.2s, box-shadow 0.2s;
}
.top-icon:hover {
  transform: scale(1.06);
  background: var(--glass-bg-strong);
  box-shadow:
    var(--glass-shadow),
    0 4px 14px rgba(0, 0, 0, 0.18);
}
.top-icon-menu {
  font-size: 0;
}
.top-icon-menu::before {
  content: '';
  display: block;
  width: 18px;
  height: 2px;
  background: #fff;
  border-radius: 1px;
  box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff;
}

/* ── 游戏菜单下拉 ── */
.top-menu-wrap {
  position: relative;
}
.menu-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 168px;
  padding: 6px 0;
  border-radius: 10px;
  background: linear-gradient(180deg, #2a4688 0%, #1a2848 100%);
  border: 1px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
  z-index: 200;
  overflow: hidden;
}
.menu-dropdown.show { display: block; }
.menu-dropdown::before {
  content: '';
  position: absolute;
  top: -6px;
  left: 18px;
  width: 10px;
  height: 10px;
  background: #2a4688;
  border-left: 1px solid rgba(212, 175, 55, 0.35);
  border-top: 1px solid rgba(212, 175, 55, 0.35);
  transform: rotate(45deg);
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 11px 16px;
  border: none;
  background: transparent;
  color: #eef2f8;
  font-size: 14px;
  text-align: left;
  cursor: pointer;
  transition: background 0.12s;
  white-space: nowrap;
}
.menu-item:hover { background: rgba(255, 255, 255, 0.1); }
.menu-item:active { background: rgba(255, 255, 255, 0.14); }
.menu-item-icon {
  width: 22px;
  text-align: center;
  font-size: 14px;
  flex-shrink: 0;
  opacity: 0.9;
}

.modal-info-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.modal-info-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
}
.modal-rules {
  font-size: 13px;
  line-height: 1.75;
  max-height: 52vh;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) rgba(255, 255, 255, 0.06);
}
.modal-rules::-webkit-scrollbar { width: 6px; }
.modal-rules::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.45);
  border-radius: 3px;
}
.modal-rules h4 {
  font-size: 14px;
  margin: 14px 0 6px;
}
.modal-rules h4:first-child { margin-top: 0; }
.modal-rules ul {
  margin: 0 0 8px 18px;
  padding: 0;
}
.modal-rules li { margin-bottom: 4px; }
.settings-list { display: flex; flex-direction: column; gap: 10px; }
.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 14px;
  border-radius: 8px;
  font-size: 14px;
}

/* ── 游戏设置弹窗（参考图：白底 + 浅蓝顶栏）── */
.modal-settings {
  width: 800px;
  max-width: min(calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)), calc(800px / var(--ui-scale, 1)));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
  background: #f8fbff;
  color: #2a3a52;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.modal-settings-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 60px;
  background: linear-gradient(180deg, #b8d4f8 0%, #d8e8fb 55%, #eef4fc 100%);
  border-bottom: 1px solid rgba(120, 160, 220, 0.35);
}
.modal-settings-header h3 {
  margin: 0;
  font-size: 24px;
  font-weight: 700;
  color: #2f5a9a;
  letter-spacing: 0.14em;
}
.settings-suit {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: rgba(47, 90, 154, 0.35);
  line-height: 1;
  pointer-events: none;
}
.settings-suit-left { left: 28px; }
.settings-suit-right { right: 56px; }
.modal-settings .modal-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.modal-settings-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 32px 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
.settings-volume-block {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 16px;
}
.settings-volume-label {
  font-size: 17px;
  font-weight: 600;
  color: #3a4f6a;
}
.settings-volume-slider-wrap {
  position: relative;
  padding-top: 26px;
}
.settings-volume-pct {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  font-size: 14px;
  font-weight: 700;
  color: #3a7fd4;
  white-space: nowrap;
  pointer-events: none;
}
.settings-volume-slider {
  --vol-pct: 0%;
  width: 100%;
  height: 32px;
  margin: 0;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.settings-volume-slider::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    #8ec4ff 0%,
    #6aaef5 var(--vol-pct),
    #d8e4f4 var(--vol-pct),
    #d8e4f4 100%
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.settings-volume-slider::-moz-range-track {
  height: 12px;
  border-radius: 6px;
  background: #d8e4f4;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}
.settings-volume-slider::-moz-range-progress {
  height: 12px;
  border-radius: 6px;
  background: linear-gradient(90deg, #8ec4ff, #6aaef5);
}
.settings-volume-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 30px;
  height: 30px;
  margin-top: -9px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9ed0ff, #4a9ae8 55%, #2f7fd0);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(47, 127, 208, 0.45);
}
.settings-volume-slider::-moz-range-thumb {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #9ed0ff, #4a9ae8 55%, #2f7fd0);
  border: 2px solid rgba(255, 255, 255, 0.95);
  box-shadow: 0 2px 8px rgba(47, 127, 208, 0.45);
}
.settings-table-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding-top: 4px;
}
.settings-section-title {
  font-size: 17px;
  font-weight: 700;
  color: #3a4f6a;
}
.settings-table-options {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.settings-table-option {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.settings-table-thumb {
  width: 100%;
  min-height: 110px;
  aspect-ratio: 1.35;
  border-radius: 14px;
  border: 3px solid transparent;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.settings-table-thumb.theme-green {
  background: linear-gradient(160deg, #5fcf78 0%, #2fa855 45%, #1a7a3c 100%);
}
.settings-table-thumb.theme-navy {
  background: linear-gradient(160deg, #3a6a9a 0%, #244e78 45%, #163558 100%);
}
.settings-table-thumb.theme-magenta {
  background: linear-gradient(160deg, #d060a0 0%, #a83878 45%, #6a2050 100%);
}
.settings-table-option.is-selected .settings-table-thumb {
  border-color: #4caf6a;
  box-shadow: 0 0 0 2px rgba(76, 175, 106, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}
.settings-table-option[data-table-theme="navy"].is-selected .settings-table-thumb {
  border-color: #4a9ae8;
  box-shadow: 0 0 0 2px rgba(74, 154, 232, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}
.settings-table-option[data-table-theme="magenta"].is-selected .settings-table-thumb {
  border-color: #d060a0;
  box-shadow: 0 0 0 2px rgba(208, 96, 160, 0.35), 0 4px 12px rgba(0, 0, 0, 0.15);
}
.settings-table-indicator {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #c5d0e0;
  background: #fff;
  position: relative;
}
.settings-table-option.is-selected .settings-table-indicator {
  border-color: #4a9ae8;
  background: #4a9ae8;
}
.settings-table-option.is-selected .settings-table-indicator::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 4px;
  width: 6px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.settings-table-name {
  font-size: 14px;
  font-weight: 600;
  color: #4a5f78;
}

/* ── 房间信息弹窗 ── */
.modal-room-info {
  width: min(840px, calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fbff;
  color: #2a3a52;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.modal-room-info-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #b8d4f8 0%, #d8e8fb 55%, #eef4fc 100%);
  border-bottom: 1px solid rgba(120, 160, 220, 0.35);
}
.modal-room-info-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #2f5a9a;
  letter-spacing: 0.12em;
}
.modal-room-info .modal-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.modal-room-info-body {
  flex: 1;
  min-height: 0;
  padding: 20px 32px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 160, 220, 0.45) transparent;
}
.room-info-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}
.room-info-game-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 18px;
  border-radius: 8px;
  background: linear-gradient(180deg, #5a9ae8 0%, #3a7fd4 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  box-shadow: 0 2px 6px rgba(58, 127, 212, 0.35);
}
.room-info-entry {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  color: #4a5f78;
}
.room-info-entry-icon {
  color: #5a8ec8;
  flex-shrink: 0;
}
.room-info-entry strong {
  color: #2f5a9a;
  font-weight: 700;
}
.room-info-meta {
  display: flex;
  flex-direction: row;
  gap: 32px;
  margin-bottom: 20px;
  padding: 0 2px;
}
.room-info-meta-row {
  font-size: 15px;
  color: #4a5f78;
}
.room-info-meta-row strong {
  color: #2a3a52;
  font-weight: 700;
}
.room-info-section {
  margin-bottom: 20px;
}
.room-info-section:last-child {
  margin-bottom: 0;
}
.room-info-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #3a7fd4;
  margin-bottom: 12px;
  padding-left: 2px;
}
.room-info-param-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 12px;
}
.room-info-param {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 68px;
  padding: 10px 8px;
  border-radius: 10px;
  background: linear-gradient(180deg, #f0f4fa 0%, #e8eef6 100%);
  border: 1px solid rgba(120, 160, 220, 0.22);
  text-align: center;
}
.room-info-param-label {
  font-size: 13px;
  color: #6a7f98;
  line-height: 1.2;
}
.room-info-param-value {
  font-size: 17px;
  font-weight: 700;
  color: #2a3a52;
  line-height: 1.2;
}
.room-info-odds-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px 14px;
}
.room-info-odds-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(120, 160, 220, 0.18);
  font-size: 13px;
  color: #4a5f78;
}
.room-info-odds-item strong {
  font-size: 14px;
  font-weight: 700;
  color: #2f5a9a;
  flex-shrink: 0;
}

/* ── 游戏规则弹窗（与房间信息 / 游戏设置同风格）── */
.modal-rules-panel {
  width: min(900px, calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1));
  max-height: var(--modal-max-h-rules);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fbff;
  color: #2a3a52;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.modal-rules-panel-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #b8d4f8 0%, #d8e8fb 55%, #eef4fc 100%);
  border-bottom: 1px solid rgba(120, 160, 220, 0.35);
}
.modal-rules-panel-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #2f5a9a;
  letter-spacing: 0.12em;
}
.modal-rules-panel .modal-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.modal-rules-panel-body {
  flex: 1;
  min-height: 0;
  padding: 24px 32px 28px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 160, 220, 0.45) transparent;
}
.rules-section {
  margin-bottom: 20px;
}
.rules-section:last-child {
  margin-bottom: 0;
}
.rules-section-title {
  font-size: 16px;
  font-weight: 700;
  color: #3a7fd4;
  margin-bottom: 10px;
}
.rules-text {
  margin: 0;
  font-size: 15px;
  line-height: 1.75;
  color: #4a5f78;
}
.rules-list {
  margin: 0;
  padding: 0 0 0 20px;
  font-size: 15px;
  line-height: 1.75;
  color: #4a5f78;
}
.rules-list li {
  margin-bottom: 6px;
}
.rules-list li:last-child {
  margin-bottom: 0;
}
.rules-steps {
  margin: 8px 0 0;
  padding: 0 0 0 22px;
  font-size: 15px;
  line-height: 1.75;
  color: #4a5f78;
}
.rules-steps li {
  margin-bottom: 8px;
}
.rules-steps li:last-child {
  margin-bottom: 0;
}
.rules-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(58, 127, 212, 0.08);
  border: 1px solid rgba(58, 127, 212, 0.18);
  font-size: 14px;
  line-height: 1.65;
  color: #3a5878;
}
.rules-subsection {
  margin-top: 16px;
}
.rules-subsection:first-of-type {
  margin-top: 12px;
}
.rules-subtitle {
  font-size: 14px;
  font-weight: 700;
  color: #2f5a9a;
  margin-bottom: 8px;
}
.rules-example {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.65;
  color: #5a7090;
}
.rules-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.5;
  color: #4a5f78;
  background: #fff;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid rgba(58, 127, 212, 0.16);
}
.rules-table th,
.rules-table td {
  padding: 8px 12px;
  text-align: left;
  border-bottom: 1px solid rgba(58, 127, 212, 0.1);
}
.rules-table th {
  background: rgba(58, 127, 212, 0.1);
  font-weight: 700;
  color: #2f5a9a;
  white-space: nowrap;
}
.rules-table tr:last-child td {
  border-bottom: none;
}
.rules-table td:last-child,
.rules-table th:last-child {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rules-table-pairs td:nth-child(2),
.rules-table-pairs td:nth-child(4),
.rules-table-pairs th:nth-child(2),
.rules-table-pairs th:nth-child(4) {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.rules-table-compact td:last-child {
  text-align: center;
  font-weight: 700;
  color: #2f5a9a;
}
.modal-rules-panel-footer {
  flex-shrink: 0;
  padding: 16px 32px 28px;
}
.btn-rules-confirm {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  cursor: pointer;
  background: linear-gradient(180deg, #5a9ae8 0%, #3a7fd4 100%);
  box-shadow: 0 2px 8px rgba(58, 127, 212, 0.35);
  transition: filter 0.2s, box-shadow 0.2s;
}
.btn-rules-confirm:hover {
  filter: brightness(1.06);
  box-shadow: 0 4px 12px rgba(58, 127, 212, 0.45);
}

/* 游戏桌面背景主题（桌面底层 + 牌桌外框 + 最外层底色） */
.viewport-root[data-table-theme="navy"] {
  --scene-void-top: #0e1428;
  --scene-void-bot: #080c18;
  --scene-glow: rgba(58, 98, 168, 0.38);
  --bg-shell-top: #1a2848;
  --bg-shell-bot: #10182c;
  --felt-center: #3a5fa5;
  --felt-top: #2f4f8a;
  --felt-mid: #243c78;
  --felt-bot: #161e38;
  --felt-glow: rgba(100, 155, 245, 0.28);
  --felt-border: rgba(212, 175, 55, 0.38);
}
.viewport-root[data-table-theme="green"] {
  --scene-void-top: #0a1810;
  --scene-void-bot: #060e08;
  --scene-glow: rgba(80, 200, 120, 0.32);
  --bg-shell-top: #1a4a2c;
  --bg-shell-bot: #0f2818;
  --felt-center: #3faa5c;
  --felt-top: #358f4e;
  --felt-mid: #287a42;
  --felt-bot: #184a28;
  --felt-glow: rgba(100, 220, 140, 0.22);
  --felt-border: rgba(180, 220, 140, 0.35);
}
.viewport-root[data-table-theme="magenta"] {
  --scene-void-top: #1a0c14;
  --scene-void-bot: #100810;
  --scene-glow: rgba(200, 90, 150, 0.34);
  --bg-shell-top: #4a1838;
  --bg-shell-bot: #2a1020;
  --felt-center: #a84888;
  --felt-top: #8c3870;
  --felt-mid: #6e2858;
  --felt-bot: #421830;
  --felt-glow: rgba(220, 100, 160, 0.22);
  --felt-border: rgba(220, 160, 200, 0.35);
}

.settings-toggle {
  width: 44px;
  height: 24px;
  border-radius: 12px;
  border: none;
  background: rgba(255, 255, 255, 0.18);
  position: relative;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}
.settings-toggle.on { background: linear-gradient(180deg, var(--gold-light), var(--gold-dark)); }
.settings-toggle::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
  transition: transform 0.2s;
}
.settings-toggle.on::after { transform: translateX(20px); }

/* ── 菜单弹窗（设置 / 房间信息 / 规则）── */
.modal-menu {
  width: 380px;
  max-width: 90vw;
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  background: linear-gradient(180deg, #243c78 0%, #1a2848 52%, #121a30 100%);
  color: #eef2f8;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}
.modal-menu-wide { width: 420px; }
.modal-menu-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  background: linear-gradient(180deg, rgba(90, 140, 220, 0.22) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-menu-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.modal-menu .modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.modal-menu .modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.modal-menu-body {
  padding: 18px 22px 10px;
}
.modal-menu-actions {
  padding: 6px 22px 22px;
}
.modal-menu-actions .btn {
  width: 100%;
  padding: 12px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  border: none;
}
.modal-menu .modal-info-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-menu .modal-info-row span:first-child {
  color: rgba(236, 242, 252, 0.6);
}
.modal-menu .modal-info-row span:last-child {
  color: var(--gold-light);
  font-weight: 700;
}
.modal-menu .settings-row {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #eef2f8;
}
.modal-menu .modal-rules {
  color: rgba(236, 242, 252, 0.78);
}
.modal-menu .modal-rules h4 {
  color: var(--gold-light);
  font-weight: 700;
}
.modal-menu .modal-rules p {
  margin: 0 0 8px;
}

.top-bar-exit {
  flex-shrink: 0;
}
.top-bar-right {
  justify-self: end;
  display: flex;
  justify-content: flex-end;
}
.top-status {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.85);
  line-height: 1.2;
  min-width: 76px;
}
.latency { color: var(--accent-green); font-weight: 700; font-size: 13px; }
#clock { font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }

.top-banker-strip {
  justify-self: center;
  width: fit-content;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  height: 64px;
  padding: 4px 8px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 10px;
  box-shadow: var(--glass-shadow);
}

.banker-seat {
  width: 68px;
  text-align: center;
  cursor: pointer;
  transition: transform 0.15s;
  flex-shrink: 0;
}
.banker-seat.empty { cursor: default; }
.banker-seat:hover:not(.empty) { transform: scale(1.04); }

.seat-ratio {
  font-size: 10px;
  color: var(--gold-light);
  height: 13px;
  font-weight: 600;
  white-space: nowrap;
}
.seat-ratio.hidden { visibility: hidden; }

.seat-avatar-wrap {
  position: relative;
  width: 40px; height: 40px;
  margin: 0 auto;
}
.seat-avatar {
  width: 40px; height: 40px;
  border-radius: 8px;
  display: grid; place-items: center;
  font-size: 20px;
  border: 2px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.banker-seat.occupied .seat-avatar {
  border-color: var(--gold-dark);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.banker-seat.is-me .seat-avatar {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(232, 196, 104, 0.25), 0 4px 12px rgba(0, 0, 0, 0.35);
}
.seat-badge {
  position: absolute;
  bottom: -2px; right: -4px;
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  color: #2a2010;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
}

.seat-empty-icon {
  width: 40px; height: 40px;
  margin: 0 auto;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--glass-border-soft);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.seat-label {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.45);
  margin-top: 2px;
  height: 12px;
  line-height: 12px;
}
.seat-amount {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2px;
  font-size: 9px;
  color: var(--gold-light);
  font-weight: 600;
  height: 12px;
  white-space: nowrap;
}
.seat-amount .coin { font-size: 8px; line-height: 1; }

.apply-banker-btn {
  width: 56px; height: 56px;
  border-radius: 50%;
  border: 2px solid rgba(212, 175, 55, 0.35);
  background: linear-gradient(145deg, #f0d060 0%, var(--gold) 45%, var(--gold-dark) 100%);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(212, 175, 55, 0.4), inset 0 1px 0 rgba(255,255,255,0.35);
  line-height: 1.25;
  transition: transform 0.15s, box-shadow 0.15s;
  margin: 0 4px;
}
.apply-banker-btn:hover {
  transform: scale(1.06);
  box-shadow: 0 6px 20px rgba(196, 154, 40, 0.5);
}

/* ── 主区域 ── */
.main-area {
  flex: 1;
  display: grid;
  grid-template-columns: 108px 1fr 108px;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}

.side-list {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 2px 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 8px;
  transform: translateY(-12px);
}
.side-player {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  width: 100%;
}
.side-player .av {
  width: 63px; height: 63px;
  border-radius: 50%;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  display: grid; place-items: center;
  font-size: 32px;
  flex-shrink: 0;
  margin: 19px 0;
  transform-origin: center center;
  will-change: transform;
}
.side-player .av.av-bet-nudge-left {
  animation: side-av-bet-left 0.34s cubic-bezier(0.22, 0.9, 0.3, 1);
}
.side-player .av.av-bet-nudge-right {
  animation: side-av-bet-right 0.34s cubic-bezier(0.22, 0.9, 0.3, 1);
}
@keyframes side-av-bet-left {
  0% { transform: scale(1) translateX(0); }
  28% { transform: scale(1.08) translateX(7px); }
  55% { transform: scale(1.03) translateX(3px); }
  100% { transform: scale(1) translateX(0); }
}
@keyframes side-av-bet-right {
  0% { transform: scale(1) translateX(0); }
  28% { transform: scale(1.08) translateX(-7px); }
  55% { transform: scale(1.03) translateX(-3px); }
  100% { transform: scale(1) translateX(0); }
}
.side-player .name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.15;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.side-player .bal { color: var(--gold-light); font-size: 11px; font-weight: 600; line-height: 1.15; }

.center-col {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* ── 开奖 + 路单（同一行）── */
.result-road-bar {
  display: flex;
  align-items: stretch;
  gap: 0;
  flex-shrink: 0;
  height: 44px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--glass-shadow);
}
.game-shell:has(.history-draw-wrap.is-open),
.main-area:has(.history-draw-wrap.is-open),
.center-col:has(.history-draw-wrap.is-open),
.result-road-bar:has(.history-draw-wrap.is-open) {
  overflow: visible;
}
.result-road-bar:has(.history-draw-wrap.is-open) {
  position: relative;
  z-index: 200;
}

.result-road-bar .info-dice {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  padding: 0 12px;
  border-right: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.04);
  perspective: 140px;
}
.info-dice .dice-shaker-wrap {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.28);
}
.info-dice .dice-shaker-icon {
  width: 26px;
  height: 26px;
  object-fit: contain;
  display: block;
}
.info-dice .die,
.info-dice .die.die-lg {
  width: 24px;
  height: 24px;
  padding: 2px;
  border-radius: 5px;
}
.info-dice .die.die-lg .pip {
  width: 4px;
  height: 4px;
}
.info-dice .die.is-rolling {
  padding: 0;
  border: none;
  border-radius: 0;
  background-color: transparent;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  box-shadow: none;
  mix-blend-mode: screen;
  filter: none;
  opacity: 1;
  will-change: background-image;
}
.phase-text {
  font-size: 12px;
  color: var(--gold-light);
  font-weight: 600;
  min-width: 52px;
  white-space: nowrap;
}

.result-road-bar .timer-alarm {
  position: relative;
  align-self: center;
  flex-shrink: 0;
  width: 38px;
  height: 40px;
  margin: 0 8px 0 0;
}
.timer-alarm-bells {
  position: absolute;
  top: 0;
  left: 50%;
  width: 34px;
  height: 9px;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.timer-alarm-bell {
  width: 11px;
  height: 9px;
  border-radius: 55% 55% 35% 35%;
  background: linear-gradient(160deg, #f0c860 0%, #c8942a 100%);
  border: 1px solid rgba(255, 220, 120, 0.55);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
}
.timer-alarm-bell.left { transform: rotate(-18deg); transform-origin: right bottom; }
.timer-alarm-bell.right { transform: rotate(18deg); transform-origin: left bottom; }
.timer-alarm-body {
  position: absolute;
  top: 7px;
  left: 50%;
  transform: translateX(-50%);
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid var(--accent-orange);
  background:
    radial-gradient(circle at 35% 28%, rgba(255, 255, 255, 0.12), transparent 42%),
    rgba(8, 16, 32, 0.88);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 10px rgba(240, 144, 48, 0.28);
  display: grid;
  place-items: center;
}
.timer-alarm-num {
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
}
.timer-alarm-feet {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 28px;
  height: 6px;
  transform: translateX(-50%);
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  pointer-events: none;
}
.timer-alarm-foot {
  width: 3px;
  height: 5px;
  border-radius: 2px;
  background: linear-gradient(180deg, #d4af37, #9a7420);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
}
.timer-alarm-foot.left { transform: rotate(-12deg); }
.timer-alarm-foot.right { transform: rotate(12deg); }
.timer-alarm.urgent .timer-alarm-body {
  border-color: #ef4444;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    0 0 12px rgba(239, 68, 68, 0.45);
}
.timer-alarm.urgent .timer-alarm-num {
  color: #ff6b6b;
}
.timer-alarm.urgent .timer-alarm-bell {
  background: linear-gradient(160deg, #ff8a8a 0%, #dc2626 100%);
  border-color: rgba(255, 180, 180, 0.55);
}
.timer-alarm.urgent {
  animation: timer-alarm-shake 0.55s ease-in-out infinite;
}
@keyframes timer-alarm-shake {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-4deg); }
  40% { transform: rotate(4deg); }
  60% { transform: rotate(-3deg); }
  80% { transform: rotate(3deg); }
}

.result-road-bar .roadmap-side {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 10px;
  flex-shrink: 0;
  border-right: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.03);
}
.roadmap-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.1em;
  line-height: 1;
}
.roadmap-legend {
  display: flex;
  gap: 8px;
  font-size: 10px;
  color: var(--text-dim);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: 3px;
}
.legend-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.legend-dot.big { background: var(--accent-orange); }
.legend-dot.small { background: #4a9eff; }
.legend-dot.triple { background: #5fcf78; }

.roadmap-bar-group {
  display: flex;
  align-items: center;
  flex: 1;
  min-width: 0;
  gap: 4px;
  padding: 0 2px 0 0;
}
.roadmap-bar-right {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
  border-left: 1px solid var(--glass-border-soft);
  background: rgba(255, 255, 255, 0.03);
}
.roadmap-track-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  padding: 0 10px;
  position: relative;
}
.roadmap-track-wrap::before,
.roadmap-track-wrap::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0;
  width: 20px;
  z-index: 1;
  pointer-events: none;
}
.roadmap-track-wrap::before {
  left: 0;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0.12), transparent);
}
.roadmap-track-wrap::after {
  right: 0;
  background: linear-gradient(270deg, rgba(255, 255, 255, 0.12), transparent);
}

.roadmap-track {
  display: flex;
  align-items: center;
  gap: 5px;
  overflow: hidden;
  width: 100%;
  padding: 4px 2px;
}

.road-bead {
  width: 24px; height: 24px;
  border-radius: 50%;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
  border: 2px solid rgba(255,255,255,0.2);
  box-shadow: 0 2px 4px rgba(0,0,0,0.3);
  transition: transform 0.15s;
}
.road-bead.big {
  background: linear-gradient(145deg, #ffb050, #e07020);
}
.road-bead.small {
  background: linear-gradient(145deg, #5aa0ff, #2a5a9a);
}
.road-bead.triple {
  background: linear-gradient(145deg, #5fcf78, #2fa855 55%, #1a7a3c);
}
.road-bead.is-triple {
  font-size: 10px;
  letter-spacing: 0.02em;
}
.road-bead.odd {
  background: linear-gradient(145deg, #f0a0c8, #c05888);
}
.road-bead.even {
  background: linear-gradient(145deg, #b8a0ff, #7050c0);
}
.road-bead.is-latest {
  transform: scale(1.12);
  border-color: #fff;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.7), 0 0 12px rgba(255, 255, 255, 0.35);
}

.result-road-bar .roadmap-result {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-end;
  padding: 0 10px;
  flex-shrink: 0;
  min-width: 0;
  border-left: none;
  background: transparent;
}
.history-draw-wrap {
  position: relative;
  z-index: 120;
}
.history-draw-trigger {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
  color: inherit;
  line-height: 1;
}
.history-draw-trigger:hover .history-draw-chevron {
  color: var(--gold-light);
}
.history-draw-chevron {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text-dim);
  transition: transform 0.15s ease, color 0.12s;
}
.history-draw-chevron svg {
  display: block;
  width: 14px;
  height: 10px;
}
.history-draw-wrap.is-open .history-draw-chevron {
  transform: rotate(180deg);
  color: var(--gold-light);
}
.history-draw-trigger .roadmap-result-value {
  gap: 8px;
  font-size: 15px;
}
.history-draw-trigger .last-round-dice {
  gap: 4px;
}
.history-draw-trigger .last-round-dice .die-face,
.history-draw-trigger .last-round-dice .die {
  width: 24px;
  height: 24px;
  padding: 3px;
  border-radius: 5px;
}
.history-draw-trigger .last-round-dice .die-face .pip,
.history-draw-trigger .last-round-dice .die .pip {
  width: 4.5px;
  height: 4.5px;
}
.history-draw-trigger .last-round-tags {
  gap: 5px;
  font-size: 15px;
}
#landscapeStage > .history-draw-dropdown {
  position: absolute;
  z-index: 980;
}
.history-draw-dropdown {
  min-width: 188px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow), 0 8px 22px rgba(0, 0, 0, 0.32);
  z-index: 980;
}
.history-draw-dropdown[hidden] {
  display: none !important;
}
.history-draw-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-draw-row {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding: 4px 6px;
  border-radius: 5px;
}
.history-draw-row:hover {
  background: rgba(255, 255, 255, 0.06);
}
.history-draw-tags {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: auto;
}
.history-draw-tag {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}
.history-draw-tag.tag-small { color: #7eb8ff; }
.history-draw-tag.tag-big { color: #ffb050; }
.history-draw-tag.tag-triple { color: #5fcf78; }
.history-draw-tag.tag-odd { color: #f0a0c8; }
.history-draw-tag.tag-even { color: #b8a0ff; }
.history-draw-dice {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
}
.history-draw-dice .die-face,
.history-draw-dice .die {
  width: 26px;
  height: 26px;
  padding: 3px;
  border-radius: 5px;
  background: linear-gradient(155deg, #fafafa 0%, #ece8e0 48%, #d6d2ca 100%);
  border: 1px solid #b0aca4;
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}
.history-draw-dice .die-face .pip,
.history-draw-dice .die .pip {
  width: 5px;
  height: 5px;
  background: radial-gradient(circle at 35% 35%, #2a2a2a, #0a0a0a);
}
.history-draw-dice .die-face[data-v="1"] .pip,
.history-draw-dice .die[data-v="1"] .pip,
.history-draw-dice .die-face[data-v="4"] .pip,
.history-draw-dice .die[data-v="4"] .pip {
  background: radial-gradient(circle at 35% 35%, #d04040, #a01818);
}
.roadmap-result-label {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1;
}
.roadmap-result-value {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}
.last-round-dice {
  display: inline-flex;
  align-items: center;
  gap: 3px;
}
.last-round-dice .die-face,
.last-round-dice .die {
  width: 18px;
  height: 18px;
  padding: 2px;
  border-radius: 4px;
}
.last-round-dice .die-face .pip,
.last-round-dice .die .pip {
  width: 3px;
  height: 3px;
}
.last-round-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  line-height: 1;
}
.roadmap-result-value .tag-small { color: #7eb8ff; }
.roadmap-result-value .tag-big { color: #ffb050; }
.roadmap-result-value .tag-triple { color: #5fcf78; }
.roadmap-result-value .tag-odd { color: #f0a0c8; }
.roadmap-result-value .tag-even { color: #b8a0ff; }

.roadmap-trend-btn {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  margin: 0;
  padding: 0;
  border-radius: 6px;
  border: 1px solid rgba(212, 175, 55, 0.42);
  background: rgba(0, 0, 0, 0.28);
  color: var(--gold-light);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.12s, border-color 0.12s, transform 0.12s;
}
.roadmap-trend-btn:hover {
  background: rgba(212, 175, 55, 0.18);
  border-color: rgba(212, 175, 55, 0.65);
  transform: scale(1.05);
}
.roadmap-trend-btn:active { transform: scale(0.98); }

/* ── 路单走势图弹窗（与游戏规则 / 房间信息同风格）── */
.modal-roadmap {
  width: min(900px, calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
  background: #f8fbff;
  color: #2a3a52;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
}
.modal-roadmap-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 56px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #b8d4f8 0%, #d8e8fb 55%, #eef4fc 100%);
  border-bottom: 1px solid rgba(120, 160, 220, 0.35);
}
.modal-roadmap-header h3 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  color: #2f5a9a;
  letter-spacing: 0.12em;
}
.modal-roadmap .modal-close {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.92);
  color: #666;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.12);
}
.modal-roadmap .modal-close:hover {
  background: #fff;
  color: #333;
}
.modal-roadmap-tabs {
  display: flex;
  justify-content: center;
  gap: 0;
  padding: 16px 32px 0;
  flex-shrink: 0;
  background: #f8fbff;
}
.roadmap-tab {
  min-width: 88px;
  height: 34px;
  padding: 0 18px;
  border: 1px solid rgba(120, 160, 220, 0.35);
  background: #eef4fc;
  color: #4a5f78;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.08em;
  cursor: pointer;
  transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.roadmap-tab:first-child {
  border-radius: 6px 0 0 6px;
  border-right: none;
}
.roadmap-tab:last-child {
  border-radius: 0 6px 6px 0;
}
.roadmap-tab.is-active {
  background: linear-gradient(180deg, #b8d4f8 0%, #d8e8fb 100%);
  border-color: rgba(120, 160, 220, 0.5);
  color: #2f5a9a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.roadmap-tab-panel[hidden] {
  display: none !important;
}
.roadmap-stats-wrap {
  padding: 8px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.roadmap-stats-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.roadmap-stats-title {
  font-size: 16px;
  font-weight: 700;
  color: #3a7fd4;
  letter-spacing: 0.04em;
}
.roadmap-stats-bar-track {
  display: flex;
  align-items: stretch;
  width: 100%;
  height: 42px;
  border-radius: 999px;
  overflow: hidden;
  border: 2px solid rgba(120, 160, 220, 0.28);
  box-shadow: inset 0 1px 3px rgba(120, 160, 220, 0.12);
}
.roadmap-stats-bar-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  height: 100%;
  font-size: 14px;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
  overflow: hidden;
}
.roadmap-stats-bar-seg.small {
  background: linear-gradient(180deg, #5aa0ff 0%, #2a6eb8 100%);
}
.roadmap-stats-bar-seg.triple {
  background: linear-gradient(180deg, #5fcf78 0%, #2fa855 100%);
}
.roadmap-stats-bar-seg.big {
  background: linear-gradient(180deg, #ffb050 0%, #e07020 100%);
}
.roadmap-stats-bar-seg.odd {
  background: linear-gradient(180deg, #f0a0c8 0%, #c05888 100%);
}
.roadmap-stats-bar-seg.even {
  background: linear-gradient(180deg, #b8a0ff 0%, #7050c0 100%);
}
.roadmap-stats-table {
  display: grid;
  gap: 10px;
  padding-top: 4px;
}
.roadmap-stats-table--size {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.roadmap-stats-table--oe {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.roadmap-stats-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 14px 10px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid rgba(120, 160, 220, 0.18);
}
.roadmap-stats-cell .label {
  font-size: 15px;
  font-weight: 700;
  color: #4a5f78;
}
.roadmap-stats-cell .val {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.roadmap-stats-cell.small .val { color: #2a6eb8; }
.roadmap-stats-cell.triple .val { color: #2fa855; }
.roadmap-stats-cell.big .val { color: #e07020; }
.roadmap-stats-cell.pair .val { color: #c05888; }
.roadmap-stats-cell.odd .val { color: #c05888; }
.roadmap-stats-cell.even .val { color: #7050c0; }
.modal-roadmap-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: #f8fbff;
  scrollbar-width: thin;
  scrollbar-color: rgba(120, 160, 220, 0.45) transparent;
}
.roadmap-panel {
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(120, 160, 220, 0.15);
}
.roadmap-panel:last-child {
  border-bottom: none;
}
.roadmap-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 32px 10px;
  background: #f8fbff;
}
.roadmap-panel-title {
  font-size: 16px;
  font-weight: 700;
  color: #3a7fd4;
  letter-spacing: 0.08em;
  flex-shrink: 0;
}
.roadmap-panel-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}
.roadmap-stat {
  font-size: 13px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(120, 160, 220, 0.22);
}
.roadmap-stat.big { color: #e07020; border-color: rgba(255, 176, 80, 0.45); }
.roadmap-stat.small { color: #2a6eb8; border-color: rgba(90, 160, 255, 0.4); }
.roadmap-stat.leopard { color: #2fa855; border-color: rgba(95, 207, 120, 0.45); }
.roadmap-stat.odd { color: #c05888; border-color: rgba(240, 160, 200, 0.45); }
.roadmap-stat.even { color: #7050c0; border-color: rgba(184, 160, 255, 0.45); }
.modal-roadmap-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  grid-template-rows: repeat(4, 42px);
  gap: 0;
  margin: 0 32px 16px;
  padding: 0;
  overflow: hidden;
  box-sizing: border-box;
  border: 1px solid rgba(120, 160, 220, 0.35);
  border-radius: 8px;
  background: #fff;
}
.roadmap-grid-cell {
  display: grid;
  place-items: center;
  min-height: 42px;
  border-right: 1px solid rgba(120, 160, 220, 0.22);
  border-bottom: 1px solid rgba(120, 160, 220, 0.22);
  background: #fff;
  box-sizing: border-box;
}
.roadmap-grid-cell.is-empty {
  background: #f7f9fc;
}
.roadmap-grid-cell:nth-child(8n + 5),
.roadmap-grid-cell:nth-child(8n + 6),
.roadmap-grid-cell:nth-child(8n + 7),
.roadmap-grid-cell:nth-child(8n + 8) {
  background-color: #f4f7fb;
}
.roadmap-grid-cell.is-empty:nth-child(8n + 5),
.roadmap-grid-cell.is-empty:nth-child(8n + 6),
.roadmap-grid-cell.is-empty:nth-child(8n + 7),
.roadmap-grid-cell.is-empty:nth-child(8n + 8) {
  background-color: #eef2f8;
}
.roadmap-grid-cell:nth-child(12n) {
  border-right: none;
}
.roadmap-grid-cell:nth-child(n + 37) {
  border-bottom: none;
}
.modal-roadmap-grid .road-bead {
  width: 32px;
  height: 32px;
  max-width: 32px;
  font-size: 15px;
  font-weight: 800;
  line-height: 1;
}
.modal-roadmap-grid .road-bead.is-triple {
  font-size: 14px;
  letter-spacing: 0;
}
.modal-roadmap-grid .road-bead.is-latest {
  z-index: 1;
}
.modal-roadmap-footer {
  flex-shrink: 0;
  padding: 14px 32px 16px;
  text-align: center;
  font-size: 12px;
  color: #8899aa;
  background: #f7f9fc;
  border-top: 1px solid rgba(120, 160, 220, 0.2);
}

/* ── 开始下注开场动画 ── */
.bet-start-overlay {
  position: absolute;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.bet-start-overlay.is-active {
  visibility: visible;
  pointer-events: auto;
}
.bet-start-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
}
.bet-start-overlay.is-active .bet-start-backdrop {
  animation: bet-start-backdrop 2s ease-out forwards;
}
.bet-start-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 260px;
  padding: 32px 48px 28px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    var(--glass-shadow),
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 0 40px rgba(212, 175, 55, 0.18);
  opacity: 0;
  transform: scale(0.55);
}
.bet-start-overlay.is-active .bet-start-card {
  animation: bet-start-card 2s cubic-bezier(0.22, 1.12, 0.36, 1) forwards;
}
.bet-start-ring {
  position: absolute;
  inset: -12px;
  border-radius: 24px;
  border: 1px solid rgba(240, 208, 96, 0.45);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.85);
}
.bet-start-overlay.is-active .bet-start-ring {
  animation: bet-start-ring 2s ease-out forwards;
}
.bet-start-dice {
  font-size: 48px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.bet-start-overlay.is-active .bet-start-dice {
  animation: bet-start-dice-bounce 2s ease-in-out forwards;
}
.bet-start-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: var(--gold-light);
  text-shadow:
    0 0 22px rgba(240, 208, 96, 0.65),
    0 2px 8px rgba(0, 0, 0, 0.5);
}
@keyframes bet-start-backdrop {
  0% { opacity: 0; }
  14% { opacity: 1; }
  72% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes bet-start-card {
  0% { opacity: 0; transform: scale(0.55); }
  16% { opacity: 1; transform: scale(1.06); }
  26% { transform: scale(1); }
  72% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.1); }
}
@keyframes bet-start-ring {
  0%, 18% { opacity: 0; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.55; transform: scale(1.12); }
  72% { opacity: 0.35; transform: scale(1.18); }
  100% { opacity: 0; transform: scale(1.28); }
}
@keyframes bet-start-dice-bounce {
  0%, 16% { transform: translateY(8px) rotate(-12deg) scale(0.8); }
  28% { transform: translateY(-6px) rotate(6deg) scale(1.05); }
  38% { transform: translateY(0) rotate(0deg) scale(1); }
  72% { transform: translateY(0) rotate(0deg) scale(1); }
  100% { transform: translateY(-4px) rotate(4deg) scale(0.95); opacity: 0.6; }
}

/* ── 停止下注封盘动画 ── */
.bet-stop-overlay {
  position: absolute;
  inset: 0;
  z-index: 205;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.bet-stop-overlay.is-active {
  visibility: visible;
  pointer-events: auto;
}
.bet-stop-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
}
.bet-stop-overlay.is-active .bet-stop-backdrop {
  animation: bet-stop-backdrop 1.8s ease-out forwards;
}
.bet-stop-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-width: 260px;
  padding: 32px 48px 28px;
  border-radius: 18px;
  border: 1px solid rgba(255, 138, 106, 0.35);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    var(--glass-shadow),
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 0 36px rgba(255, 120, 80, 0.16);
  opacity: 0;
  transform: scale(0.55);
}
.bet-stop-overlay.is-active .bet-stop-card {
  animation: bet-stop-card 1.8s cubic-bezier(0.22, 1.12, 0.36, 1) forwards;
}
.bet-stop-ring {
  position: absolute;
  inset: -12px;
  border-radius: 24px;
  border: 1px solid rgba(255, 138, 106, 0.42);
  background: rgba(255, 255, 255, 0.03);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  opacity: 0;
  transform: scale(0.85);
}
.bet-stop-overlay.is-active .bet-stop-ring {
  animation: bet-stop-ring 1.8s ease-out forwards;
}
.bet-stop-icon {
  font-size: 46px;
  line-height: 1;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.4));
}
.bet-stop-overlay.is-active .bet-stop-icon {
  animation: bet-stop-icon-pulse 1.8s ease-in-out forwards;
}
.bet-stop-title {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-indent: 0.18em;
  color: #ffb08a;
  text-shadow:
    0 0 22px rgba(255, 138, 106, 0.55),
    0 2px 8px rgba(0, 0, 0, 0.5);
}
@keyframes bet-stop-backdrop {
  0% { opacity: 0; }
  14% { opacity: 1; }
  70% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes bet-stop-card {
  0% { opacity: 0; transform: scale(0.55); }
  16% { opacity: 1; transform: scale(1.06); }
  28% { transform: scale(1); }
  70% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes bet-stop-ring {
  0%, 18% { opacity: 0; transform: scale(0.85); }
  30% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.1); }
  70% { opacity: 0.3; transform: scale(1.16); }
  100% { opacity: 0; transform: scale(1.24); }
}
@keyframes bet-stop-icon-pulse {
  0%, 16% { transform: scale(0.82); opacity: 0.7; }
  28% { transform: scale(1.08); opacity: 1; }
  40% { transform: scale(1); }
  55% { transform: scale(1.04); }
  70% { transform: scale(1); opacity: 1; }
  100% { transform: scale(0.96); opacity: 0.65; }
}

/* ── 开奖结果展示动画 ── */
.draw-result-overlay {
  position: absolute;
  inset: 0;
  z-index: 210;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  visibility: hidden;
}
.draw-result-overlay.is-active {
  visibility: visible;
  pointer-events: auto;
}
.draw-result-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  opacity: 0;
}
.draw-result-overlay.is-active .draw-result-backdrop {
  animation: draw-result-backdrop 2.4s ease-out forwards;
}
.draw-result-card {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 300px;
  padding: 28px 40px 32px;
  border-radius: 18px;
  border: 1px solid var(--glass-border);
  background: var(--glass-bg-strong);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow:
    var(--glass-shadow),
    0 20px 48px rgba(0, 0, 0, 0.22),
    0 0 40px rgba(212, 175, 55, 0.18);
  opacity: 0;
  transform: scale(0.6);
}
.draw-result-overlay.is-active .draw-result-card {
  animation: draw-result-card 2.4s cubic-bezier(0.22, 1.1, 0.36, 1) forwards;
}
.draw-result-label {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.28em;
  text-indent: 0.28em;
  color: rgba(240, 208, 96, 0.88);
}
.draw-result-dice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
}
.draw-result-dice .die.die-xl {
  width: 54px;
  height: 54px;
  padding: 5px;
  border-radius: 10px;
  opacity: 0;
  transform: scale(0.35) rotate(-18deg);
}
.draw-result-dice .die.die-xl .pip {
  width: 8px;
  height: 8px;
}
.draw-result-overlay.is-active .draw-result-dice .die:nth-child(1) {
  animation: draw-result-die 2.4s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
  animation-delay: 0.1s;
}
.draw-result-overlay.is-active .draw-result-dice .die:nth-child(2) {
  animation: draw-result-die 2.4s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
  animation-delay: 0.22s;
}
.draw-result-overlay.is-active .draw-result-dice .die:nth-child(3) {
  animation: draw-result-die 2.4s cubic-bezier(0.22, 1.15, 0.36, 1) forwards;
  animation-delay: 0.34s;
}
.draw-result-sum {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 22px;
  font-weight: 700;
  color: #fff;
  opacity: 0;
  transform: translateY(10px);
}
.draw-result-overlay.is-active .draw-result-sum {
  animation: draw-result-sum 2.4s ease-out forwards;
  animation-delay: 0.42s;
}
.draw-result-eq {
  color: rgba(236, 242, 252, 0.55);
  font-weight: 500;
}
.draw-result-sum strong {
  font-size: 30px;
  color: var(--gold-light);
  text-shadow: 0 0 16px rgba(240, 208, 96, 0.45);
}
.draw-result-tag {
  margin-left: 4px;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid currentColor;
}
.draw-result-tag.tag-small {
  color: #7eb8ff;
  background: rgba(126, 184, 255, 0.12);
}
.draw-result-tag.tag-big {
  color: #ffb050;
  background: rgba(255, 176, 80, 0.12);
}
.draw-result-tag.tag-triple {
  color: #5fcf78;
  background: rgba(95, 207, 120, 0.12);
}
@keyframes draw-result-backdrop {
  0% { opacity: 0; }
  12% { opacity: 1; }
  78% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes draw-result-card {
  0% { opacity: 0; transform: scale(0.6); }
  14% { opacity: 1; transform: scale(1.05); }
  24% { transform: scale(1); }
  78% { opacity: 1; transform: scale(1); }
  100% { opacity: 0; transform: scale(1.08); }
}
@keyframes draw-result-die {
  0% { opacity: 0; transform: scale(0.35) rotate(-18deg); }
  18% { opacity: 1; transform: scale(1.12) rotate(8deg); }
  30% { transform: scale(1) rotate(0deg); }
  78% { opacity: 1; transform: scale(1) rotate(0deg); }
  100% { opacity: 0; transform: scale(0.92) rotate(4deg); }
}
@keyframes draw-result-sum {
  0% { opacity: 0; transform: translateY(10px); }
  20% { opacity: 1; transform: translateY(0); }
  78% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-6px); }
}

/* ── 下注盘（重设计）── */
.bet-table-wrap {
  flex: 1;
  min-height: 0;
  position: relative;
  display: flex;
  flex-direction: column;
}
.table-felt {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  border-radius: 10px;
  background:
    radial-gradient(ellipse 85% 70% at 50% 48%, var(--felt-center) 0%, var(--felt-mid) 42%, var(--felt-bot) 100%);
  border: 2px solid var(--felt-border);
  box-shadow:
    inset 0 0 50px rgba(0, 0, 0, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    0 0 0 1px rgba(212, 175, 55, 0.12);
  transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease;
}
.bet-table {
  position: relative;
  z-index: 1;
  flex: 1;
  min-height: 0;
  color: var(--text-on-felt);
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 6px 8px;
  display: grid;
  grid-template-rows: 1.95fr 1.2fr 1.2fr 1.15fr 1fr;
  gap: 4px;
  overflow: hidden;
}

.bet-zone {
  display: flex;
  flex-direction: row;
  align-items: stretch;
  gap: 5px;
  min-height: 0;
  overflow: hidden;
}
.bet-zone-body {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.bet-zone-body > * {
  flex: 1;
  min-height: 0;
}
.bet-zone-label {
  flex-shrink: 0;
  width: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.14em;
  padding: 4px 2px;
  line-height: 1;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: 5px;
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  user-select: none;
}

.bet-cell {
  position: relative;
  border-radius: 6px;
  border: 1px solid var(--glass-border);
  padding: 3px 4px 2px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-width: 0;
  min-height: 0;
  height: 100%;
  overflow: hidden;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  user-select: none;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  box-shadow: var(--glass-shadow);
}
.bet-cell:hover {
  transform: translateY(-1px);
  border-color: rgba(212, 175, 55, 0.45);
  background: var(--glass-bg-strong);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.2),
    0 4px 16px rgba(0, 0, 0, 0.2),
    0 0 0 1px rgba(212, 175, 55, 0.2);
}
.bet-cell.has-bet {
  border-color: var(--accent-green);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(126, 232, 160, 0.45), 0 0 10px rgba(76, 200, 120, 0.2);
}
.bet-cell .chip-marker {
  position: absolute;
  right: 4px;
  bottom: 17px;
  min-width: 30px;
  height: 28px;
  padding: 0 8px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.68);
  border: 1.5px solid rgba(255, 255, 255, 0.32);
  font-size: 13px;
  font-weight: 700;
  color: #fff;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.42);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.65);
  letter-spacing: 0.02em;
  z-index: 2;
}
.bet-cell.has-bet .chip-marker { display: flex; }

@keyframes bet-cell-flash {
  0% {
    border-color: rgba(158, 240, 184, 0.95);
    box-shadow:
      inset 0 0 22px rgba(126, 232, 160, 0.45),
      0 0 0 2px rgba(126, 232, 160, 0.75),
      0 0 18px rgba(76, 200, 120, 0.55);
    filter: brightness(1.18);
  }
  100% {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 1px 4px rgba(0,0,0,0.2);
    filter: brightness(1);
  }
}
.bet-cell.bet-flash {
  animation: bet-cell-flash 0.48s ease-out;
  z-index: 2;
}
.bet-cell.has-bet.bet-flash {
  animation: bet-cell-flash-has 0.48s ease-out;
}

@keyframes bet-cell-win-blink {
  0%, 100% {
    border-color: rgba(255, 210, 90, 0.55);
    box-shadow:
      inset 0 0 10px rgba(255, 210, 90, 0.15),
      0 0 0 2px rgba(255, 210, 90, 0.45);
    filter: brightness(1.05);
  }
  50% {
    border-color: #ffe08a;
    box-shadow:
      inset 0 0 26px rgba(255, 215, 80, 0.5),
      0 0 0 3px rgba(255, 230, 140, 0.95),
      0 0 22px rgba(255, 200, 60, 0.75);
    filter: brightness(1.28);
  }
}
.bet-cell.win-highlight {
  animation: bet-cell-win-blink 0.55s ease-in-out infinite;
  z-index: 3;
  position: relative;
}
.bet-cell.has-bet.win-highlight {
  animation: bet-cell-win-blink 0.55s ease-in-out infinite;
}

@keyframes bet-cell-flash-has {
  0% {
    border-color: #b8ffd0;
    box-shadow:
      inset 0 0 22px rgba(126, 232, 160, 0.5),
      0 0 0 3px rgba(158, 240, 184, 0.85),
      0 0 22px rgba(76, 200, 120, 0.65);
    filter: brightness(1.2);
  }
  100% {
    border-color: var(--accent-green);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.12), 0 0 0 1px rgba(126, 232, 160, 0.45), 0 0 10px rgba(76, 200, 120, 0.2);
    filter: brightness(1);
  }
}

.cell-top {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 3px;
  min-height: 16px;
  flex-shrink: 0;
}
.cell-odds-badge {
  font-size: 13px;
  font-weight: 700;
  color: var(--odds-color);
  background: rgba(0, 0, 0, 0.38);
  padding: 2px 6px;
  border-radius: 5px;
  flex-shrink: 0;
  line-height: 1.2;
  letter-spacing: 0.02em;
}
.cell-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 0;
  min-height: 0;
  overflow: hidden;
}
.cell-label {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  text-align: center;
  text-shadow: 0 1px 2px rgba(0,0,0,0.35);
}
.cell-sub {
  font-size: 9px;
  opacity: 0.85;
  text-align: center;
  line-height: 1.1;
  white-space: nowrap;
}
.cell-pool {
  font-size: 14px;
  color: var(--pool-color);
  text-align: center;
  font-weight: 700;
  min-height: 16px;
  line-height: 16px;
  flex-shrink: 0;
  letter-spacing: 0.02em;
}
.cell-pool:empty { min-height: 16px; }

/* 配色（统一玻璃底） */
.bet-cell.type-small,
.bet-cell.type-odd,
.bet-cell.type-big,
.bet-cell.type-even,
.bet-cell.type-triple,
.bet-cell.type-neutral {
  background: linear-gradient(
    160deg,
    rgba(255, 255, 255, 0.14) 0%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0.03) 100%
  );
}

/* L1 主盘 */
.l1-row {
  display: flex;
  gap: 5px;
  flex: 1;
  min-height: 0;
}
.l1-col-center {
  flex: 1.2;
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.l1-mid-row {
  display: flex;
  gap: 5px;
  flex: 1;
  min-height: 0;
}
.l1-mid-row .bet-cell.type-oe-main {
  flex: 1;
  min-width: 0;
}
.l1-mid-row .bet-cell.type-any-triple {
  flex: 1.15;
  min-width: 0;
}
.bet-cell.type-oe-main .cell-label {
  font-size: 24px;
  letter-spacing: 0.12em;
}
.bet-cell.type-oe-main .cell-odds-badge { font-size: 15px; padding: 2px 7px; }
.bet-cell.type-main { flex: 0.48; min-width: 0; }
.bet-cell.type-main .cell-label { font-size: 26px; letter-spacing: 0.1em; }
.bet-cell.type-main .cell-sub { font-size: 11px; }
.bet-cell.type-main .cell-odds-badge { font-size: 15px; padding: 2px 7px; }

.bet-cell.type-any-triple .cell-label { font-size: 15px; }
.bet-cell.type-any-triple .cell-odds-badge { font-size: 14px; }
.triple-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 5px;
  flex: 1;
  min-height: 0;
}
.triple-cell .cell-label { font-size: 12px; font-family: monospace; }
.triple-cell .cell-odds-badge { font-size: 12px; padding: 1px 5px; }

/* L2~L5 */
.pair-row,
.total-row,
.combo-row,
.single-row {
  display: grid;
  gap: 4px;
  flex: 1;
  min-height: 0;
  height: 100%;
}
.pair-row { grid-template-columns: repeat(6, 1fr); }

/* 骰子（圆角方体 + 点数） */
.die-face,
.die {
  display: inline-grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(3, 1fr);
  background: linear-gradient(155deg, #fafafa 0%, #ece8e0 48%, #d6d2ca 100%);
  border: 1px solid #b0aca4;
  border-radius: 5px;
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(0, 0, 0, 0.07);
  flex-shrink: 0;
  padding: 2px;
  vertical-align: middle;
}
.die-face .pip,
.die .pip {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #2a2a2a, #0a0a0a);
  align-self: center;
  justify-self: center;
}
.die-face[data-v="1"] .pip,
.die[data-v="1"] .pip,
.die-face[data-v="4"] .pip,
.die[data-v="4"] .pip {
  background: radial-gradient(circle at 35% 35%, #d04040, #a01818);
}
.die-face.die-sm,
.die.die-sm { width: 18px; height: 18px; padding: 2px; border-radius: 4px; }
.die-face.die-sm .pip,
.die.die-sm .pip { width: 3px; height: 3px; }
.die-face.die-md,
.die.die-md { width: 28px; height: 28px; padding: 2px; }
.die-face.die-md .pip,
.die.die-md .pip { width: 4.5px; height: 4.5px; }
.die-face.die-lg,
.die.die-lg {
  width: 38px;
  height: 38px;
  padding: 3px;
  border-radius: 6px;
}
.die-face.die-lg .pip,
.die.die-lg .pip { width: 6.5px; height: 6.5px; }

.dice-pair,
.dice-triple {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  gap: 2px;
  align-items: center;
  justify-content: center;
}
.combo-cell.bet-cell {
  padding: 3px 3px 2px;
}
.combo-cell .cell-top {
  min-height: 16px;
}
.combo-cell .cell-odds-badge {
  font-size: 12px;
  padding: 2px 5px;
}
.combo-cell .dice-pair { gap: 2px; }
.combo-cell .die-face.die-sm,
.combo-cell .die.die-sm {
  width: 28px;
  height: 28px;
  padding: 2px;
  border-radius: 5px;
}
.combo-cell .die-face.die-sm .pip,
.combo-cell .die.die-sm .pip { width: 4px; height: 4px; }
.triple-cell .dice-triple { gap: 2px; }
.triple-cell .die-face.die-sm,
.triple-cell .die.die-sm { width: 26px; height: 26px; padding: 2px; border-radius: 4px; }
.triple-cell .die-face.die-sm .pip,
.triple-cell .die.die-sm .pip { width: 4.5px; height: 4.5px; }

.total-row { grid-template-columns: repeat(14, 1fr); }
.total-cell.bet-cell {
  padding: 3px 2px 2px;
}
.total-cell .cell-top {
  min-height: 16px;
}
.total-cell .cell-odds-badge {
  font-size: 13px;
  padding: 2px 4px;
}
.total-cell .cell-label {
  font-size: 28px;
  line-height: 1;
  font-weight: 800;
}

.combo-row { grid-template-columns: repeat(15, 1fr); }
.combo-cell .cell-label { font-size: 0; }

.single-row { grid-template-columns: repeat(6, 1fr); }
.single-cell .cell-label { display: none; }
.single-cell .cell-sub { display: none; }

/* ── 底栏（与中间下注区同宽）── */
.bottom-area {
  display: grid;
  grid-template-columns: 108px 1fr 108px;
  gap: 5px;
  flex-shrink: 0;
}
.bottom-area-spacer { min-width: 0; }
.bottom-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 12px;
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border-radius: var(--radius);
  border: 1px solid var(--glass-border);
  height: 60px;
  box-shadow: var(--glass-shadow);
  min-width: 0;
}
.player-self {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  min-width: 0;
  max-width: 220px;
}
.player-self .av {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3a5070, #2e4260);
  border: 2px solid rgba(212, 175, 55, 0.32);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: grid; place-items: center;
  font-size: 24px;
  flex-shrink: 0;
}
.player-self .player-info {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1px;
}
.player-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.player-bal {
  font-size: 16px;
  color: var(--gold-light);
  font-weight: 700;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}
.banker-streak-badge {
  flex-shrink: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #1e3260 0%, #141e38 100%);
  border: 1px solid rgba(212, 175, 55, 0.38);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}
.banker-streak-badge.hidden { display: none; }

.betting-controls-panel {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.banker-betting-mask {
  display: none;
  position: absolute;
  inset: -2px 0;
  z-index: 6;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.78);
  align-items: center;
  justify-content: center;
  pointer-events: auto;
  cursor: not-allowed;
}
.banker-betting-mask.show {
  display: flex;
}
.banker-betting-mask-text {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.94);
  letter-spacing: 0.1em;
  white-space: nowrap;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.55);
}

.chips {
  display: flex;
  gap: 14px;
  flex: 1;
  justify-content: center;
  align-items: center;
  padding: 0 6px;
}
.chip {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, 0.92);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.15s, box-shadow 0.15s;
  box-shadow:
    0 3px 10px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 4px rgba(0, 0, 0, 0.14);
}
.chip:hover { transform: translateY(-3px); }
.chip.active {
  transform: translateY(-4px) scale(1.08);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.92),
    0 0 16px rgba(255, 255, 255, 0.4),
    0 4px 12px rgba(0, 0, 0, 0.45);
}
.chip.disabled {
  cursor: not-allowed;
  opacity: 0.45;
  pointer-events: none;
  transform: none;
  filter: grayscale(0.35);
}
.chip-100 { background: linear-gradient(145deg, #5aa0ff, #2563eb); }
.chip-500 { background: linear-gradient(145deg, #ffd700, #d4a017); }
.chip-1k { background: linear-gradient(145deg, #d060f0, #9b30b0); }
.chip-5k { background: linear-gradient(145deg, #ff9030, #e06010); }
.chip-1w { background: linear-gradient(145deg, #ff4545, #c02020); }
.chip-5w { background: linear-gradient(145deg, #40e080, #20a050); }

/* 飞筹码动画 */
.fly-chip {
  position: fixed;
  z-index: 950;
  pointer-events: none;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.55);
  border-style: solid;
  border-color: rgba(255, 255, 255, 0.92);
  box-shadow:
    0 4px 14px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.28),
    inset 0 -2px 4px rgba(0, 0, 0, 0.14);
  will-change: transform;
}

.float-delta {
  position: fixed;
  z-index: 960;
  pointer-events: none;
  font-size: 15px;
  font-weight: 800;
  transform: translate(-50%, 0);
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.65);
  white-space: nowrap;
}
.float-delta.win { color: #7ee8a0; }
.float-delta.lose { color: #ff7070; }

.bottom-actions {
  display: flex;
  gap: 8px;
  align-items: center;
}
.btn {
  padding: 6px 12px;
  border-radius: 6px;
  border: none;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.btn-rebet {
  background: linear-gradient(180deg, #ffb84d, #f07820);
  color: #fff;
  border: none;
  border-radius: 20px;
  box-shadow: 0 0 16px rgba(255, 140, 40, 0.45), 0 2px 8px rgba(0,0,0,0.3);
  min-width: 88px;
  padding: 8px 28px;
  font-size: 13px;
  transition: filter 0.15s, background 0.15s, box-shadow 0.15s;
}
.btn-rebet:hover:not(:disabled):not(.disabled) {
  filter: brightness(1.06);
}
.btn-rebet.disabled,
.btn-rebet:disabled {
  background: linear-gradient(180deg, #5c6678, #4a5364);
  color: rgba(255, 255, 255, 0.42);
  box-shadow: none;
  cursor: not-allowed;
  filter: none;
}
.online-widget {
  position: absolute;
  right: 10px;
  bottom: 6px;
  z-index: 20;
  display: flex;
  flex-direction: column;
  align-items: center;
  flex-shrink: 0;
  min-width: 52px;
  user-select: none;
  cursor: pointer;
  transition: transform 0.12s;
}
.online-widget:hover { transform: scale(1.05); }
.online-widget:active { transform: scale(0.97); }
.online-icon {
  position: relative;
  width: 50px;
  height: 28px;
  margin-bottom: -9px;
  z-index: 1;
}
.online-icon svg {
  width: 100%;
  height: 100%;
  display: block;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.25));
}
.online-badge {
  background: var(--glass-bg);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
  border: 1px solid var(--glass-border);
  border-radius: 14px;
  padding: 3px 12px 4px;
  min-width: 46px;
  text-align: center;
  box-shadow: var(--glass-shadow);
}
.online-badge span {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  letter-spacing: 0.02em;
}

/* ── 弹窗 ── */
.overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(6, 10, 16, 0.72);
  backdrop-filter: blur(6px);
  z-index: 1000;
  place-items: center;
}
.overlay.show { display: grid; }

/* 弹窗内容与游戏区同比例缩放：字号、行距、内边距、圆角等一并适配 */
.overlay > * {
  zoom: var(--ui-scale, 1);
}

.modal {
  background: #ffffff;
  border: 1px solid var(--panel-border);
  border-radius: 14px;
  padding: 24px;
  width: 340px;
  max-width: calc(var(--viewport-w, 90vw) * 0.9 / var(--ui-scale, 1));
  box-shadow: var(--shadow-card);
}
.modal h3 {
  color: var(--gold);
  margin-bottom: 16px;
  font-size: 18px;
  text-align: center;
}
.modal p { font-size: 13px; color: var(--text-dim); margin-bottom: 12px; line-height: 1.6; }
.modal .field { margin-bottom: 14px; }
.modal label { font-size: 12px; color: var(--text-dim); display: block; margin-bottom: 6px; }
.modal input, .modal select {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  border: 1px solid rgba(30, 58, 95, 0.12);
  background: #f7f9fc;
  color: var(--text);
  font-size: 14px;
}
.quick-amounts {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 8px;
}
.quick-amt {
  padding: 6px 12px;
  border-radius: 6px;
  background: #f7f9fc;
  border: 1px solid rgba(30, 58, 95, 0.1);
  color: var(--text);
  font-size: 12px;
  cursor: pointer;
}
.quick-amt:hover { border-color: var(--gold); color: var(--gold); }
.modal-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}
.modal-actions .btn { flex: 1; padding: 10px; }
.btn-confirm {
  background: linear-gradient(180deg, var(--gold-light), var(--gold-dark));
  color: #fff;
}
.btn-cancel {
  background: #f7f9fc;
  color: var(--text-dim);
  border: 1px solid var(--panel-border);
}

/* ── 游戏风确认弹窗（退出房间等）── */
.modal-game-confirm {
  width: 380px;
  max-width: calc(var(--viewport-w, 90vw) * 0.9 / var(--ui-scale, 1));
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(180deg, #2a4688 0%, #1e3260 48%, #141e38 100%);
  border: 1px solid rgba(212, 175, 55, 0.38);
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  color: #eef2f8;
}
.modal-game-confirm-header {
  position: relative;
  padding: 22px 24px 16px;
  text-align: center;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: linear-gradient(180deg, rgba(90, 140, 220, 0.22) 0%, transparent 100%);
}
.modal-game-confirm-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.modal-game-confirm-body {
  padding: 22px 28px 6px;
  text-align: center;
}
.modal-game-confirm-body p {
  margin: 0;
  font-size: 15px;
  color: rgba(236, 242, 252, 0.82);
  line-height: 1.65;
}
.modal-game-confirm-actions {
  display: flex;
  gap: 12px;
  padding: 20px 24px 24px;
}
.modal-game-confirm-actions .btn {
  flex: 1;
  padding: 12px 10px;
  border-radius: 10px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
  transition: filter 0.15s, background 0.15s;
}
.btn-confirm-outline {
  background: rgba(255, 255, 255, 0.07);
  color: rgba(255, 255, 255, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.2);
}
.btn-confirm-outline:hover {
  background: rgba(255, 255, 255, 0.12);
}
.btn-confirm-gold {
  border: none;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-dark) 100%);
  color: #fff;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
}
.btn-confirm-gold:hover {
  filter: brightness(1.06);
}

/* ── 申请上庄弹窗（双栏）── */
.modal-apply {
  width: min(620px, calc(var(--viewport-w, 100dvw) * 0.92 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.92 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  background: linear-gradient(180deg, #243c78 0%, #1a2848 52%, #121a30 100%);
  color: #eef2f8;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}
.modal-apply-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  background: linear-gradient(180deg, rgba(90, 140, 220, 0.22) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-apply-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.modal-close {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 28px;
  height: 28px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.85);
  color: #666;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}
.modal-close:hover { background: #fff; color: #333; }
.modal-apply .modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.modal-apply .modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}

.modal-apply-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  flex: 1;
  min-height: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.banker-list-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.banker-list-col + .banker-list-col {
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}
.list-col-header {
  padding: 10px 12px;
  font-size: 14px;
  font-weight: 700;
  text-align: center;
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.18);
  color: var(--gold-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.list-col-header.bankers,
.list-col-header.queue {
  background: rgba(0, 0, 0, 0.18);
  color: var(--gold-light);
}
.list-col-body {
  flex: 1;
  overflow-y: auto;
  background: transparent;
}
.banker-list-col:last-child .list-col-body {
  background: transparent;
}

.banker-list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.banker-list-item:nth-child(even) {
  background: rgba(255, 255, 255, 0.03);
}
.banker-list-item.is-me {
  background: rgba(212, 175, 55, 0.12);
  box-shadow: inset 0 0 0 1px rgba(212, 175, 55, 0.25);
}
.list-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a5070, #2a4060);
  border: 2px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.list-info {
  flex: 1;
  min-width: 0;
}
.list-name {
  font-size: 14px;
  font-weight: 600;
  color: #eef2f8;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.list-amount {
  font-size: 15px;
  font-weight: 700;
  color: var(--gold-light);
}
.list-ratio {
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 2px;
}
.list-queue-pos {
  font-size: 12px;
  color: rgba(236, 242, 252, 0.55);
  margin-right: 4px;
  font-weight: 700;
}
.list-empty {
  padding: 32px 16px;
  text-align: center;
  font-size: 13px;
  color: rgba(236, 242, 252, 0.5);
}

.modal-apply-footer {
  flex-shrink: 0;
  display: grid;
  grid-template-columns: 1fr 1.6fr auto;
  gap: 12px;
  align-items: end;
  padding: 16px 18px 18px;
  background: rgba(0, 0, 0, 0.2);
}
.apply-info {
  font-size: 12px;
  color: rgba(236, 242, 252, 0.65);
  line-height: 1.8;
}
.apply-info strong {
  color: var(--gold-light);
  font-size: 14px;
  font-weight: 700;
}
.apply-slider-wrap {
  position: relative;
  padding-top: 18px;
}
.slider-track {
  position: relative;
  height: 28px;
  display: flex;
  align-items: center;
}
.slider-track::before,
.slider-track-fill {
  display: none;
}
.slider-val {
  position: absolute;
  top: 0;
  left: 0;
  transform: translateX(-50%);
  font-size: 12px;
  font-weight: 700;
  color: var(--gold-light);
  white-space: nowrap;
  pointer-events: none;
  transition: left 0.05s;
}
.banker-slider {
  --slider-pct: 0%;
  --slider-track-h: 8px;
  --slider-track-unfilled: rgba(48, 68, 108, 0.85);
  position: relative;
  z-index: 2;
  width: 100%;
  height: 28px;
  -webkit-appearance: none;
  appearance: none;
  background: transparent;
  outline: none;
  cursor: pointer;
  margin: 0;
}
.banker-slider::-webkit-slider-runnable-track {
  -webkit-appearance: none;
  appearance: none;
  height: var(--slider-track-h);
  border-radius: 4px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: linear-gradient(
    90deg,
    #f0d060 0%,
    #d4af37 var(--slider-pct),
    var(--slider-track-unfilled) var(--slider-pct),
    var(--slider-track-unfilled) 100%
  );
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}
.banker-slider::-moz-range-track {
  height: var(--slider-track-h);
  background: var(--slider-track-unfilled);
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 4px;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
}
.banker-slider::-moz-range-progress {
  height: var(--slider-track-h);
  background: linear-gradient(90deg, #f0d060 0%, #d4af37 55%, #a88432 100%);
  border-radius: 4px 0 0 4px;
  box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
}
.banker-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 28px;
  height: 28px;
  margin-top: calc((var(--slider-track-h) - 28px) / 2);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold-dark));
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  cursor: grab;
}
.banker-slider::-moz-range-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold-dark));
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
  cursor: grab;
}
.banker-slider::-ms-track {
  width: 100%;
  height: var(--slider-track-h);
  background: transparent;
  border-color: transparent;
  color: transparent;
}
.banker-slider::-ms-fill-lower {
  background: linear-gradient(90deg, #f0d060 0%, #d4af37 55%, #a88432 100%);
  border-radius: 4px 0 0 4px;
}
.banker-slider::-ms-fill-upper {
  background: var(--slider-track-unfilled);
  border-radius: 0 4px 4px 0;
}
.banker-slider::-ms-thumb {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, var(--gold-light), var(--gold-dark));
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.4);
}
.slider-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: rgba(236, 242, 252, 0.5);
  margin-top: 4px;
}
.btn-apply-submit {
  padding: 12px 28px;
  border: none;
  border-radius: 24px;
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 45%, var(--gold-dark) 100%);
  color: #fff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(212, 175, 55, 0.4);
  white-space: nowrap;
  font-family: var(--font);
}
.btn-apply-submit:hover {
  filter: brightness(1.06);
}

/* ── 玩家列表弹窗 ── */
.modal-players {
  width: min(520px, calc(var(--viewport-w, 100dvw) * 0.92 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.92 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 14px;
  border: 1px solid rgba(212, 175, 55, 0.38);
  background: linear-gradient(180deg, #243c78 0%, #1a2848 52%, #121a30 100%);
  color: #eef2f8;
  box-shadow:
    0 16px 48px rgba(0, 0, 0, 0.58),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
}
.modal-players-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  background: linear-gradient(180deg, rgba(90, 140, 220, 0.22) 0%, transparent 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.modal-players-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: var(--gold-light);
  letter-spacing: 0.08em;
}
.modal-players .modal-close {
  background: rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.modal-players .modal-close:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
}
.modal-players-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.players-table-head,
.players-table-row {
  display: grid;
  grid-template-columns: 52px 1fr 96px 56px;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
}
.players-table-head {
  height: 38px;
  background: rgba(0, 0, 0, 0.22);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.players-table-head span:nth-child(3),
.players-table-head span:nth-child(4) {
  text-align: center;
}
.players-table-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(212, 175, 55, 0.45) rgba(255, 255, 255, 0.06);
}
.players-table-body::-webkit-scrollbar {
  width: 6px;
}
.players-table-body::-webkit-scrollbar-thumb {
  background: rgba(212, 175, 55, 0.45);
  border-radius: 3px;
}
.players-table-body::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.04);
}
.players-table-row {
  min-height: 58px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 13px;
  transition: background 0.12s;
}
.players-table-row:nth-child(odd) { background: rgba(255, 255, 255, 0.03); }
.players-table-row:nth-child(even) { background: transparent; }
.players-table-row:hover { background: rgba(255, 255, 255, 0.07); }
.col-rank {
  font-size: 17px;
  font-weight: 800;
  text-align: center;
  color: rgba(236, 242, 252, 0.55);
}
.col-rank.rank-1 { color: #f0d060; text-shadow: 0 0 8px rgba(240, 208, 96, 0.35); }
.col-rank.rank-2 { color: #d4af37; }
.col-rank.rank-3 { color: var(--accent-green-light); }
.col-player {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.pl-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: linear-gradient(145deg, #3a5070, #2a4060);
  border: 2px solid rgba(212, 175, 55, 0.35);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
  display: grid;
  place-items: center;
  font-size: 22px;
  flex-shrink: 0;
}
.pl-info {
  min-width: 0;
}
.pl-name {
  font-size: 14px;
  font-weight: 600;
  color: #eef2f8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.pl-uid {
  font-size: 12px;
  color: rgba(236, 242, 252, 0.5);
  margin-top: 2px;
}
.col-bet {
  text-align: center;
  font-weight: 700;
  color: var(--gold-light);
  font-variant-numeric: tabular-nums;
}
.col-wins {
  text-align: center;
  font-weight: 800;
  font-size: 15px;
  color: var(--accent-green-light);
  font-variant-numeric: tabular-nums;
}
.modal-players-footer {
  flex-shrink: 0;
  padding: 12px 16px 14px;
  text-align: center;
  font-size: 12px;
  color: rgba(236, 242, 252, 0.55);
  background: rgba(0, 0, 0, 0.2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

/* ── 牌局记录弹窗 ── */
.modal-records {
  width: min(720px, calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  color: var(--text);
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.modal-records-header {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  height: 48px;
  background: linear-gradient(180deg, #eef4fb 0%, #e4edf8 100%);
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.modal-records-header h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  color: #2a6eb8;
  letter-spacing: 0.08em;
}
.modal-records-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0;
}
.records-table-head,
.records-table-row {
  display: grid;
  grid-template-columns: 1.45fr 0.66fr 0.66fr 0.66fr 1.08fr 56px;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}
.records-table-head {
  height: 36px;
  background: #f7f9fc;
  font-size: 14px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.records-table-head span:nth-child(n+3) {
  text-align: center;
}
.records-table-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.records-table-row {
  min-height: 54px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.06);
  font-size: 13px;
  color: #333;
}
.records-table-row:nth-child(odd) { background: #fafbfd; }
.records-table-row:nth-child(even) { background: #fff; }
.col-time {
  font-size: 12px;
  color: #444;
  white-space: nowrap;
}
.col-room,
.col-amount {
  text-align: center;
  font-weight: 600;
}
.col-result {
  display: flex;
  justify-content: center;
  align-items: center;
}
.record-dice {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.record-dice .die-face.die-xs,
.record-dice .die.die-xs {
  width: 26px;
  height: 26px;
  padding: 2px;
  border-radius: 4px;
}
.record-dice .die-face.die-xs .pip,
.record-dice .die.die-xs .pip {
  width: 4.5px;
  height: 4.5px;
}
.die-face.die-xs,
.die.die-xs {
  width: 16px;
  height: 16px;
  padding: 1px;
  border-radius: 3px;
}
.die-face.die-xs .pip,
.die.die-xs .pip {
  width: 2.5px;
  height: 2.5px;
}
.col-pnl {
  text-align: center;
  font-weight: 700;
  color: #333;
}
.col-pnl.lose { color: #e03030; }
.col-pnl.win { color: #2a9d4e; }
.btn-record-detail {
  width: 44px;
  height: 28px;
  padding: 0;
  border: none;
  border-radius: 6px;
  background: linear-gradient(180deg, #5a9fd8, #3a7fc0);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  justify-self: center;
  box-shadow: 0 2px 6px rgba(58, 127, 192, 0.35);
}
.btn-record-detail:hover { filter: brightness(1.06); }
.modal-records-footer {
  flex-shrink: 0;
  padding: 12px 14px 14px;
  text-align: center;
  font-size: 13px;
  color: #667788;
  background: #f7f9fc;
  border-top: 1px solid rgba(30, 58, 95, 0.06);
}
.modal-records-footer strong {
  color: #333;
  font-weight: 700;
}
.modal-records-footer .footer-lose {
  color: #e03030;
  font-weight: 700;
}
.modal-records-footer .footer-win {
  color: #2a9d4e;
  font-weight: 700;
}

/* ── 牌局详情弹窗 ── */
.modal-record-detail {
  width: min(860px, calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1)));
  max-width: calc(var(--viewport-w, 100dvw) * 0.94 / var(--ui-scale, 1));
  max-height: var(--modal-max-h);
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--panel-border);
  background: #ffffff;
  color: #333;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
}
.record-detail-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px 16px;
  padding: 12px 16px;
  background: #f7f9fc;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
  font-size: 13px;
}
.record-detail-meta-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.record-detail-meta-label {
  font-size: 11px;
  color: #8899aa;
  font-weight: 600;
}
.record-detail-result {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.record-detail-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.record-detail-summary-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: #f7f9fc;
  font-size: 11px;
  color: #667788;
  min-width: 0;
}
.record-detail-summary-item strong {
  font-size: 16px;
  color: #223344;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.record-detail-summary-item strong.win { color: #2a9d4e; }
.record-detail-summary-item strong.lose { color: #e03030; }
.record-detail-table {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 0 0 4px;
  --record-zone-label-w: 52px;
}
.record-detail-head {
  display: flex;
  align-items: stretch;
  height: 36px;
  background: #f7f9fc;
  font-size: 13px;
  font-weight: 700;
  color: #333;
  border-bottom: 1px solid rgba(30, 58, 95, 0.08);
}
.record-detail-head-spacer {
  flex-shrink: 0;
  width: var(--record-zone-label-w);
  border-right: 1px solid rgba(30, 58, 95, 0.1);
  box-shadow: inset 3px 0 0 #5a9fd8;
  background: #f3f7fb;
}
.record-detail-head-cols,
.record-detail-row {
  display: grid;
  grid-template-columns: 1.2fr 0.75fr 1fr 1fr;
  align-items: center;
  gap: 8px;
}
.record-detail-head-cols {
  flex: 1;
  min-width: 0;
  padding: 0 16px 0 14px;
}
.record-detail-head-cols span:first-child,
.record-detail-row .col-area {
  text-align: left;
}
.record-detail-head-cols span:nth-child(n + 2),
.record-detail-row .col-odds,
.record-detail-row .col-pool,
.record-detail-row .col-mine {
  text-align: center;
}
.record-detail-head-cols span:nth-child(2),
.record-detail-row .col-odds {
  font-variant-numeric: tabular-nums;
}
.record-detail-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
}
.record-detail-zone {
  display: flex;
  align-items: stretch;
  border-bottom: 1px solid rgba(30, 58, 95, 0.1);
}
.record-detail-zone:last-child {
  border-bottom: none;
}
.record-detail-zone-label {
  flex-shrink: 0;
  width: var(--record-zone-label-w);
  display: flex;
  align-items: center;
  justify-content: center;
  writing-mode: vertical-rl;
  text-orientation: upright;
  font-size: 13px;
  font-weight: 700;
  color: #3a6a9a;
  letter-spacing: 0.1em;
  padding: 14px 10px;
  line-height: 1.15;
  background: #f3f7fb;
  border-right: 1px solid rgba(30, 58, 95, 0.1);
  box-shadow: inset 3px 0 0 #5a9fd8;
}
.record-detail-zone-rows {
  flex: 1;
  min-width: 0;
}
.record-detail-zone-rows .record-detail-row {
  padding: 0 16px 0 14px;
}
.record-detail-row {
  min-height: 36px;
  border-bottom: 1px solid rgba(30, 58, 95, 0.06);
  font-size: 13px;
}
.record-detail-zone-rows .record-detail-row:last-child {
  border-bottom: none;
}
.record-detail-zone-rows .record-detail-row:nth-child(odd) { background: #fafbfd; }
.record-detail-zone-rows .record-detail-row:nth-child(even) { background: #fff; }
.record-detail-row.has-mine {
  background: #eef6ff !important;
}
.record-detail-row.has-mine .col-mine {
  color: #2a6eb8;
  font-weight: 700;
}
.record-detail-row .col-area {
  font-weight: 600;
  color: #223344;
}
.record-detail-row .col-odds {
  font-size: 12px;
  font-weight: 700;
  color: #5a7a9a;
}
.record-detail-row .col-pool,
.record-detail-row .col-mine {
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.record-detail-footer {
  display: flex;
  justify-content: center;
  padding: 12px 16px 14px;
  background: #f7f9fc;
  border-top: 1px solid rgba(30, 58, 95, 0.06);
}
.btn-record-detail-close {
  min-width: 96px;
  height: 34px;
  border: none;
  border-radius: 8px;
  background: linear-gradient(180deg, #5a9fd8, #3a7fc0);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(58, 127, 192, 0.35);
}
.btn-record-detail-close:hover { filter: brightness(1.06); }

.toast {
  position: fixed;
  bottom: 80px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: rgba(26, 37, 56, 0.95);
  color: var(--text);
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 13px;
  z-index: 2000;
  opacity: 0;
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
  border: 1px solid var(--panel-border);
  box-shadow: var(--shadow-card);
}
.toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.die.hidden {
  background: linear-gradient(145deg, #3a3028, #221a14);
  border-color: #4a3828;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}
.die.hidden .pip { display: none; }

.state-bar {
  text-align: center;
  font-size: 10px;
  color: var(--text-dim);
  flex-shrink: 0;
  height: 0;
  overflow: hidden;
}
.state-bar strong { color: var(--accent-green); }