/* ============================================================================
 * style.css —— 3A 级实体桌游俱乐部视觉系统（参考《Balatro》《炉石传说》与蒙特卡洛台呢）
 *
 * 【公开免费设计资源库整合 & 离线双保险架构】
 *   1) Phosphor Icons Duotone CDN + 本地内联 Duotone 双色 SVG 精灵无缝降级
 *   2) Transparent Textures CC0 无缝纹理 (felt.png / dark-leather.png) + SVG feTurbulence 噪点双保险
 *   3) 牌桌中央多层同心几何罗盘 SVG 图腾（四色宝石指示点 + 流光双箭头方向环）+ 四角 Art Deco 雕花包边
 *   4) DiceBear Avatars v9 奇幻桌游矢量头像 API + 金属圆形头像框 + 皇冠等级角标 + 离线零裂图降级
 *   5) Google Fonts 顶级展示字体 Fredoka (600/700) + Titan One / Bungee + Noto Sans SC (500/700/900)
 * ========================================================================== */

@property --ring-color {
  syntax: '<color>';
  inherits: true;
  initial-value: #d4af37;
}

*, *::before, *::after {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  outline: none;
}

:root {
  /* 三层商业级字体排版体系：奢华衬线 (Cinzel Decorative) + 粗衬线中文大标题 (Noto Serif SC) + 圆润街机数字 (Fredoka) + 清晰正文 (Noto Sans SC) */
  --font-royal: 'Cinzel Decorative', 'Noto Serif SC', serif;
  --font-serif-cn: 'Noto Serif SC', 'Cinzel Decorative', serif;
  --font-display: 'Fredoka', 'Cinzel Decorative', 'Noto Serif SC', sans-serif;
  --font-num: 'Fredoka', 'Noto Sans SC', sans-serif;
  --font-body: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;

  /* 文本与哑光香槟金/暗铜五金色彩 */
  --ink: #f6f0e4;
  --ink-dim: #c4b9a2;
  --gold-bright: #fff4c8;
  --gold-light: #efd279;
  --gold: #d4af37;
  --gold-dark: #8a671d;
  --bronze: #47330e;

  /* 标准四色（克制高雅的宝石级低饱和油墨色值） */
  --red: #c43a33;
  --yellow: #d49e2a;
  --green: #2a8c4a;
  --blue: #2a5eb5;

  /* 牌面尺寸：同时受视口高度与宽度约束，保证 85%+ 空间留给牌桌且一屏不溢出 */
  --pile-h: clamp(86px, min(25dvh, 30vw), 272px);
  --pile-w: calc(var(--pile-h) * 2 / 3);
  --hand-h: clamp(78px, 19.5dvh, 168px);
  --hand-w: min(calc(var(--hand-h) * 2 / 3), calc((100vw - 64px) / 7));

  --radius: 10px;
  --ease-out-soft: cubic-bezier(.22, .9, .26, 1);
  --ease-pop: cubic-bezier(.2, 1.3, .42, 1);
  --ease-spring: cubic-bezier(.2, 1.5, .4, 1);
}

/* 四套高定俱乐部台呢毛毡主题（压低背景明度与饱和度，凸显卡牌插画与香槟金五金） */
body[data-theme="emerald"] {
  --felt-spot: #17493b;
  --felt-mid: #0c2b23;
  --felt-edge: #04100d;
  --panel-top: #142a24;
  --panel-bot: #091613;
  --glow: #d4af37;
}
body[data-theme="royal"] {
  --felt-spot: #1b2f52;
  --felt-mid: #0d192e;
  --felt-edge: #040811;
  --panel-top: #152238;
  --panel-bot: #09101c;
  --glow: #e2c15a;
}
body[data-theme="neon"] {
  --felt-spot: #382415;
  --felt-mid: #1d120a;
  --felt-edge: #0a0503;
  --panel-top: #281a10;
  --panel-bot: #120b06;
  --glow: #f0c85a;
}
body[data-theme="crimson"] {
  --felt-spot: #4c1722;
  --felt-mid: #270b11;
  --felt-edge: #0c0305;
  --panel-top: #311118;
  --panel-bot: #150609;
  --glow: #ebb85e;
}

html, body {
  height: 100%;
  margin: 0;
  overflow: hidden;
  touch-action: none;
  overscroll-behavior: none;
  -webkit-touch-callout: none;
  user-select: none;
  -webkit-user-select: none;
}

body {
  font-family: var(--font-body);
  font-weight: 500;
  letter-spacing: .02em;
  color: var(--ink);
  background:
    radial-gradient(46% 36% at 50% 42%, rgba(212, 175, 55, .11) 0%, transparent 72%),
    radial-gradient(85% 65% at 50% 44%, var(--felt-spot) 0%, var(--felt-mid) 54%, var(--felt-edge) 100%);
  -webkit-font-smoothing: antialiased;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
  touch-action: none;
  transition: background .8s ease;
}

/* SVG 毛毡织物纤维噪点层（离线兜底） */
.felt-grain {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: .82;
  mix-blend-mode: overlay;
}

/* Transparent Textures CC0 无缝羊毛毡纹理 (felt.png) + 本地高清暗调牌桌底图 + 梭织经纬暗纹 */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background-image:
    url('../assets/bg/bg_table_2.jpg?v=2026111923'),
    url('https://www.transparenttextures.com/patterns/felt.png'),
    radial-gradient(rgba(255, 245, 215, .035) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, .24) 1px, transparent 1px);
  background-repeat: no-repeat, repeat, repeat, repeat;
  background-size: cover, 220px 220px, 12px 12px, 12px 12px;
  background-position: center, 0 0, 0 0, 6px 6px;
  opacity: .28;
  mix-blend-mode: luminosity;
  z-index: 0;
}
body[data-bg="bg1"]::before {
  background-image:
    url('../assets/bg/bg_table_1.jpg?v=2026111923'),
    url('https://www.transparenttextures.com/patterns/felt.png'),
    radial-gradient(rgba(255, 245, 215, .035) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, .24) 1px, transparent 1px);
}
body[data-bg="bg2"]::before {
  background-image:
    url('../assets/bg/bg_table_2.jpg?v=2026111923'),
    url('https://www.transparenttextures.com/patterns/felt.png'),
    radial-gradient(rgba(255, 245, 215, .035) 1px, transparent 1px),
    radial-gradient(rgba(0, 0, 0, .24) 1px, transparent 1px);
  opacity: .26;
  mix-blend-mode: normal;
}
body[data-bg="none"]::before {
  background-image: none;
  opacity: 0;
}

/* 顶部暖金聚光灯 + 四周深邃暗角（Vignette）+ 牌桌边缘木质包边压暗 */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(60% 30% at 50% 102%, var(--ring-color, #d4af37) 0%, transparent 72%),
    radial-gradient(92% 86% at 50% 46%, transparent 46%, rgba(0, 0, 0, .78) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(212, 175, 55, .18), inset 0 0 54px rgba(0, 0, 0, .85);
  opacity: .66;
  transition: --ring-color .7s ease;
  z-index: 0;
}

/* ---------------------------------------------------------------------------
 * 0. 桌角金属包边（Corner Filigree：Art Deco 复古香槟金四角雕花）
 * ------------------------------------------------------------------------- */
.table-corners {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 2;
}
.corner-filigree {
  position: absolute;
  width: clamp(36px, 7.5vmin, 56px);
  height: clamp(36px, 7.5vmin, 56px);
  color: var(--gold);
  opacity: .46;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .85));
}
.corner-filigree.tl {
  top: calc(4px + env(safe-area-inset-top, 0px));
  left: calc(4px + env(safe-area-inset-left, 0px));
}
.corner-filigree.tr {
  top: calc(4px + env(safe-area-inset-top, 0px));
  right: calc(4px + env(safe-area-inset-right, 0px));
  transform: scaleX(-1);
}
.corner-filigree.bl {
  bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  left: calc(4px + env(safe-area-inset-left, 0px));
  transform: scaleY(-1);
}
.corner-filigree.br {
  bottom: calc(4px + env(safe-area-inset-bottom, 0px));
  right: calc(4px + env(safe-area-inset-right, 0px));
  transform: scale(-1, -1);
}

#app {
  position: relative;
  z-index: 1;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  will-change: transform;
}

#app.screen-shake {
  animation: screenShake .2s cubic-bezier(.36, .07, .19, .97) both;
}

/* ---------------------------------------------------------------------------
 * 0.1 Phosphor Icons Duotone CDN + 内联 Duotone SVG 双保险切换机制
 * ------------------------------------------------------------------------- */
.ic {
  width: 1em;
  height: 1em;
  display: inline-block;
  vertical-align: -.14em;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}

.ph-duotone {
  display: inline-block;
  font-size: 1.18em;
  line-height: 1;
  vertical-align: -.14em;
  color: var(--gold-light);
  flex: 0 0 auto;
}

/* 本地化 Phosphor Icons 已就绪，仅保留静音按钮状态切换 */
.icon-btn.has-ph > .ph-duotone.off { display: none; }
.icon-btn.has-ph.muted > .ph-duotone.on { display: none; }
.icon-btn.has-ph.muted > .ph-duotone.off { display: inline-flex; }

/* 俱乐部深色胡桃木皮革纹理 (dark-leather.png) 与香槟金毛玻璃面板材质 */
.glass {
  background-image:
    url('https://www.transparenttextures.com/patterns/dark-leather.png'),
    linear-gradient(180deg, rgba(22, 36, 31, .86), rgba(10, 18, 16, .94));
  background-blend-mode: overlay, normal;
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
  border: 1px solid rgba(212, 175, 55, .28);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .18),
    0 8px 24px rgba(0, 0, 0, .58);
}

/* ---------------------------------------------------------------------------
 * 1. 顶部俱乐部铭牌栏 HUD（紧凑低干扰）
 * ------------------------------------------------------------------------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding:
    calc(6px + env(safe-area-inset-top, 0px))
    calc(12px + env(safe-area-inset-right, 0px))
    7px
    calc(12px + env(safe-area-inset-left, 0px));
  background-image:
    url('https://www.transparenttextures.com/patterns/dark-leather.png'),
    linear-gradient(180deg, rgba(16, 12, 8, .94) 0%, rgba(10, 18, 15, .88) 100%);
  background-blend-mode: overlay, normal;
  border-bottom: 1.5px solid rgba(212, 175, 55, .36);
  box-shadow:
    inset 0 -1px 0 rgba(0, 0, 0, .75),
    0 4px 16px rgba(0, 0, 0, .58);
  border-radius: 0;
}

.brand {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 2px;
  background: linear-gradient(180deg, #fff5c8 0%, #e8be4a 55%, #9c6f16 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 0 #000);
  padding-right: 4px;
}

/* 筹码铭牌胶囊（高对比度浅香槟色字体 + 2px 深色硬投影） */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(34, 28, 20, .9), rgba(18, 14, 10, .96));
  border: 1px solid rgba(212, 175, 55, .34);
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, .16), 0 2px 4px rgba(0, 0, 0, .5);
  white-space: nowrap;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}

.chip.rtt { font-variant-numeric: tabular-nums; transition: color .3s, border-color .3s; }
.chip.rtt.warn { color: #ffd980; border-color: rgba(242, 184, 26, .55); }
.chip.rtt.bad { color: #ff9c94; border-color: rgba(229, 52, 43, .6); }
.chip[hidden] { display: none; }

.color-ind {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 10px 3px 6px;
  border-radius: 6px;
  background: linear-gradient(180deg, rgba(34, 28, 20, .92), rgba(18, 14, 10, .96));
  border: 1px solid rgba(212, 175, 55, .4);
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, .18), 0 2px 5px rgba(0, 0, 0, .52);
  white-space: nowrap;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}

.swatch {
  width: 15px;
  height: 15px;
  border-radius: 4px;
  transform: rotate(45deg);
  background: #2a241b;
  border: 1.5px solid var(--gold-light);
  box-shadow: 0 0 8px currentColor;
  transition: background .3s ease, color .3s ease, box-shadow .3s ease;
}

/* 顶部实体黄铜小按键（带物理厚度与按压下沉） */
.icon-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 700;
  font-family: inherit;
  padding: 4px 10px;
  border-radius: 7px;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #35291a 0%, #1f170d 100%);
  border: 1px solid rgba(212, 175, 55, .44);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 190, .24),
    0 3px 0 #100b05,
    0 4px 8px rgba(0, 0, 0, .52);
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
  white-space: nowrap;
}
.icon-btn .ic { color: var(--gold-light); }
.icon-btn:hover { filter: brightness(1.14); }
.icon-btn:active {
  transform: translate3d(0, 2px, 0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .5),
    0 1px 0 #100b05,
    0 2px 4px rgba(0, 0, 0, .4);
}
.icon-btn .off { display: none; }
.icon-btn.muted { opacity: .55; }
.icon-btn.muted .on { display: none; }
.icon-btn.muted .off { display: inline-block; }

.top-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
  flex: 0 0 auto;
}

/* ---------------------------------------------------------------------------
 * 2. 牌桌布局（紧凑对手铭牌徽章 + DiceBear 奇幻桌游头像 + 85% 核心毛毡视野）
 * ------------------------------------------------------------------------- */
.table { flex: 1 1 auto; min-height: 0; display: flex; flex-direction: column; }

.opp-bar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 7px 12px 2px;
  min-height: 0;
}

/* 对手黄铜皮革铭牌底座 */
.opp-plaque {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 4px 13px 4px 5px;
  border-radius: 999px 10px 10px 999px;
  background-image:
    url('https://www.transparenttextures.com/patterns/dark-leather.png'),
    linear-gradient(180deg, rgba(28, 22, 15, .9), rgba(14, 10, 7, .96));
  background-blend-mode: overlay, normal;
  border: 1.2px solid rgba(212, 175, 55, .42);
  box-shadow:
    inset 0 1px 0 rgba(255, 240, 190, .2),
    0 4px 12px rgba(0, 0, 0, .58);
}

/* 头像 + 15 秒顺时针倒计时光环 + 仅剩 1 张 UNO 动态火焰 + 等级皇冠角标 */
.ava-wrap {
  position: relative;
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
}
.ava-ring {
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, var(--gold-light) 90deg, transparent 190deg);
  opacity: 0;
  transition: opacity .35s;
  animation: spin 2.6s linear infinite;
  -webkit-mask: radial-gradient(circle, transparent 62%, #000 64%);
  mask: radial-gradient(circle, transparent 62%, #000 64%);
  pointer-events: none;
}
.ava-wrap.active .ava-ring { opacity: .78; }

.turn-ring-svg {
  position: absolute;
  inset: -4px;
  width: calc(100% + 8px);
  height: calc(100% + 8px);
  transform: rotate(-90deg);
  pointer-events: none;
  opacity: 0;
  transition: opacity .25s ease;
  z-index: 2;
}
.ava-wrap.active .turn-ring-svg { opacity: 1; }
.turn-ring-bg {
  fill: none;
  stroke: rgba(212, 175, 55, .18);
  stroke-width: 2.4;
}
.turn-ring-fg {
  fill: none;
  stroke: var(--gold-light);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-dasharray: 100.53;
  stroke-dashoffset: 0;
  filter: drop-shadow(0 0 4px var(--gold));
  transition: stroke .25s ease, stroke-dashoffset .12s linear;
}
.ava-wrap.urgent .turn-ring-fg {
  stroke: #ff3b30;
  filter: drop-shadow(0 0 8px #ff3b30);
}
.ava-wrap.urgent .ava {
  border-color: #ff5e5e;
  box-shadow: 0 0 12px rgba(255, 68, 68, .75), inset 0 1px 0 rgba(255, 255, 255, .25);
  animation: avaHeartbeat .55s ease-in-out infinite;
}

.uno-flame {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 25%, rgba(255, 230, 110, .88), transparent 55%),
    conic-gradient(from 0deg, #ff3b1f, #ffae19, #ff2a00, #ffe066, #ff3b1f);
  filter: blur(3.5px);
  transition: opacity .28s ease;
}
.ava-wrap.uno-fire .uno-flame {
  opacity: .94;
  animation: unoFlameBurn .9s ease-in-out infinite alternate;
}
.ava-wrap.uno-fire .ava {
  border-color: #ffbe3b;
  box-shadow: 0 0 14px rgba(255, 160, 30, .8);
}

/* 带多层金属浮雕描边与深邃内阴影的圆形头像框 */
.ava {
  position: relative;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  overflow: hidden;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  background: radial-gradient(circle at 35% 30%, #44331d, #171109);
  border: 2px solid var(--gold-light);
  box-shadow:
    inset 0 0 8px rgba(0, 0, 0, .85),
    inset 0 1px 0 rgba(255, 243, 196, .5),
    0 0 0 1.5px #2e1d06,
    0 3px 8px rgba(0, 0, 0, .72);
}
.ava::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  box-shadow: inset 0 0 8px rgba(0, 0, 0, .82);
  pointer-events: none;
  z-index: 2;
}
.ava .ic { width: 16px; height: 16px; transition: opacity .25s ease; }
.ava .ava-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.ava .ava-img.is-local,
.ava.has-img .ava-img { opacity: 1; }
.ava.has-img .ava-fallback { opacity: 0; }

/* 头像右下角精致金属皇冠角标徽章 */
.ava-crown {
  position: absolute;
  right: -2px;
  bottom: -2px;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #211202;
  background: linear-gradient(160deg, #fff5c8 0%, #e5b942 58%, #9e6e12 100%);
  border: 1px solid #2b1903;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .75);
  pointer-events: none;
}
.ava-crown .ic { width: 8.5px; height: 8.5px; stroke-width: 2.5; }

.ava-wrap.sm { width: 30px; height: 30px; }
.ava-wrap.sm .ava { width: 26px; height: 26px; }
.ava-wrap.sm .ava .ic { width: 13.5px; height: 13.5px; }
.ava-wrap.sm .ava-crown { width: 12px; height: 12px; right: -2px; bottom: -2px; }
.ava-wrap.sm .ava-crown .ic { width: 7.5px; height: 7.5px; }

.opp-info { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.opp-name {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
}
.opp-count {
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-light);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
}

.opp-cards {
  display: flex;
  align-items: center;
  margin-left: auto;
  min-width: 0;
  overflow: hidden;
  padding: 2px 4px;
}
.opp-extra {
  margin-left: 6px;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(20, 14, 8, .88);
  border: 1px solid rgba(212, 175, 55, .38);
}

.board {
  flex: 1 1 auto;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 186px;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 6px 10px;
  padding: 2px 12px 6px;
  transition: --ring-color .7s ease;
}

/* 中央回合铭牌横幅（高对比度浅香槟色字体 + 2px 深色硬投影） */
.banner {
  grid-column: 1 / -1;
  justify-self: center;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 26px;
  padding: 3px 16px;
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--gold-bright);
  background: linear-gradient(90deg, transparent, rgba(20, 15, 9, .82) 18%, rgba(20, 15, 9, .82) 82%, transparent);
  border-top: 1px solid rgba(212, 175, 55, .34);
  border-bottom: 1px solid rgba(212, 175, 55, .34);
  text-shadow: 0 2px 0 #000, 0 3px 6px rgba(0, 0, 0, .85);
}
.banner .ic { color: var(--gold-light); width: 14px; height: 14px; }
.banner.wait { color: #ffe299; }

.dots { display: inline-flex; gap: 3px; align-items: flex-end; }
.dots i {
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--gold-light);
  animation: dot 1.1s infinite ease-in-out;
}
.dots i:nth-child(2) { animation-delay: .16s; }
.dots i:nth-child(3) { animation-delay: .32s; }

/* ---------------------------------------------------------------------------
 * 2.1 牌堆区 + 桌面中央几何星盘图腾（四色宝石指示点 + 双箭头流光环）+ 15 层 3D 牌叠
 * ------------------------------------------------------------------------- */
.piles {
  grid-column: 1;
  grid-row: 2;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 52px);
  min-height: 0;
  isolation: isolate;
}

.ambience {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* 毛毡台面半透明烫金罗盘水印图腾 (Environmental Storytelling) */
.table-compass-svg {
  position: absolute;
  width: min(70vmin, 490px);
  height: min(70vmin, 490px);
  color: var(--gold);
  opacity: .44;
  mix-blend-mode: screen;
  pointer-events: none;
}
.compass-dual-arrows {
  transform-origin: 210px 210px;
  animation: ringSpin 28s linear infinite;
}

.ring {
  position: absolute;
  width: min(72vmin, 520px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 56%, var(--ring-color) 78%, transparent 96%);
  -webkit-mask: radial-gradient(circle, transparent 61%, #000 62.5%, #000 72%, transparent 74.5%);
  mask: radial-gradient(circle, transparent 61%, #000 62.5%, #000 72%, transparent 74.5%);
  opacity: .28;
  filter: blur(1px);
  animation: ringSpin 18s linear infinite;
}
.ring.rev { animation-direction: reverse; }
.ring.braking {
  animation: ringBrake .62s cubic-bezier(.22, 1, .36, 1) both !important;
}
.ring.thin { width: min(54vmin, 390px); opacity: .16; animation-duration: 26s; filter: blur(2px); }

.spotlight {
  position: absolute;
  width: min(56vmin, 430px);
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--ring-color) 0%, transparent 68%);
  opacity: .16;
  filter: blur(16px);
}

.pile-wrap {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.pile-label {
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: 1.2px;
  text-shadow: 0 2px 0 #000;
}
.pile { position: relative; width: var(--pile-w); border-radius: var(--radius); }

#drawPile { position: relative; transition: transform .18s ease; }
#drawPile::before {
  content: '';
  position: absolute;
  inset: -12px;
  z-index: 4;
}

/* 真实 15 张卡牌叠放的 3D 立体纸张边缘阶梯阴影 */
#drawPile:not(.empty) {
  box-shadow:
    1px 1px 0 #e0d6c0,
    2px 2px 0 #2b2318,
    3px 3px 0 #d5cab2,
    4px 4px 0 #241d14,
    5px 5px 0 #cbc0a6,
    6px 6px 0 #1e1810,
    7px 7px 0 #c2b59a,
    8px 8px 0 #18130c,
    9px 9px 0 #b7aa8e,
    10px 10px 0 #120e09,
    11px 11px 0 #ac9e82,
    12px 12px 0 #0e0b07,
    13px 13px 0 #a19377,
    15px 18px 28px rgba(0, 0, 0, .82);
}
#drawPile.active { animation: breathe 1.8s ease-in-out infinite; cursor: pointer; }
#drawPile.must-draw {
  box-shadow:
    1px 1px 0 #e0d6c0,
    3px 3px 0 #d5cab2,
    5px 5px 0 #cbc0a6,
    7px 7px 0 #c2b59a,
    9px 9px 0 #b7aa8e,
    11px 11px 0 #ac9e82,
    0 0 0 3px var(--gold-bright),
    0 0 32px rgba(212, 175, 55, .95),
    15px 18px 28px rgba(0, 0, 0, .84) !important;
}
#drawPile.active:active { transform: translate3d(2px, 3px, 0); }
#drawPile.press { animation: pilePress .26s var(--ease-out-soft); }
#drawPile.empty {
  height: var(--pile-h);
  border: 2px dashed rgba(212, 175, 55, .36);
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .24);
  display: grid;
  place-items: center;
  font-size: 10.5px;
  color: rgba(212, 175, 55, .65);
}

/* 黄铜珐琅牌堆计数角标 */
.pile-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  z-index: 6;
  min-width: 26px;
  height: 22px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 11px;
  font-weight: 900;
  border-radius: 6px;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #5e4414 0%, #2b1d06 100%);
  border: 1.5px solid var(--gold-light);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .45),
    0 3px 8px rgba(0, 0, 0, .7);
}

/* 弃牌堆底座（带烫金内凹槽框线） */
#discard {
  position: relative;
  width: var(--pile-w);
  aspect-ratio: 2 / 3;
  border-radius: var(--radius);
  background: rgba(0, 0, 0, .18);
  border: 1px dashed rgba(212, 175, 55, .28);
  transition: box-shadow .45s ease, transform .2s ease;
}

/* 战报面板 */
.log {
  grid-column: 2;
  grid-row: 2;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(16, 13, 9, .84), rgba(10, 8, 6, .92));
  border: 1px solid rgba(212, 175, 55, .26);
}
.log-head {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.2px;
  color: var(--gold-light);
  text-shadow: 0 2px 0 #000;
  padding: 6px 9px 5px;
  background: rgba(212, 175, 55, .08);
  border-bottom: 1px solid rgba(212, 175, 55, .18);
}
.log-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  font-size: 11px;
  line-height: 1.58;
  padding: 5px 9px 6px;
  color: var(--ink-dim);
  scrollbar-width: thin;
  overscroll-behavior: contain;
}
.log-line { padding: 1px 0; }
.log-line.new { color: var(--gold-bright); font-weight: 700; text-shadow: 0 1px 0 #000; animation: fadeUp .3s ease both; }
.log-empty { opacity: .5; }

.zone-shake { animation: zoneShake .46s cubic-bezier(.36, .07, .19, .97); }

/* ---------------------------------------------------------------------------
 * 3. 手牌头部 / 实体筹码拨动开关 / 街机立体按键区
 * ------------------------------------------------------------------------- */
.hand-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  height: 28px;
  padding: 0 4px;
}
.hand-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  padding: 2px 11px 2px 3px;
  border-radius: 999px;
  background: rgba(16, 12, 8, .78);
  border: 1px solid rgba(212, 175, 55, .32);
}
.hand-count {
  font-family: var(--font-num);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  letter-spacing: .5px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.hand-tools { display: flex; align-items: center; gap: 6px; }

/* 实体筹码拨动开关组 (Toggle Chips) */
.sort-group {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  border-radius: 8px;
  background: rgba(12, 9, 6, .88);
  border: 1px solid rgba(212, 175, 55, .32);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .7);
}

.sort-btn {
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1;
  padding: 5px 10px;
  border-radius: 6px;
  cursor: pointer;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid transparent;
  transition: color .15s, background .15s, transform .08s;
}
.sort-btn:active { transform: translate3d(0, 1px, 0); }
.sort-btn.is-on {
  color: #1f1202;
  background: linear-gradient(180deg, #fff1be 0%, #dfb33e 100%);
  border-color: #8c6514;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .65), 0 1px 3px rgba(0, 0, 0, .5);
}

.controls {
  flex: 0 0 auto;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  align-items: stretch;
  gap: 12px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding:
    6px
    calc(12px + env(safe-area-inset-right, 0px))
    calc(10px + env(safe-area-inset-bottom, 0px))
    calc(12px + env(safe-area-inset-left, 0px));
}
.uno-ctrl-wrap {
  display: flex;
  width: 100%;
}
.uno-ctrl-wrap .btn {
  width: 100%;
}

/* 街机/实体筹码厚重质感按钮（多层内高光倒角 + 4px 物理厚度底唇 + 3px 按压下沉） */
.btn {
  position: relative;
  flex: 1 1 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 11px 14px;
  border-radius: 10px;
  border: 1.5px solid rgba(212, 175, 55, .48);
  font-size: 14px;
  font-weight: 900;
  font-family: inherit;
  letter-spacing: .5px;
  color: var(--gold-bright);
  background: linear-gradient(180deg, #382b1c 0%, #20180f 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .28),
    inset 0 -1px 0 rgba(0, 0, 0, .45),
    0 4px 0 #100b06,
    0 7px 16px rgba(0, 0, 0, .6);
  text-shadow: 0 2px 0 #000;
  cursor: pointer;
  transition: transform .08s ease, box-shadow .08s ease, filter .15s, opacity .18s;
  touch-action: manipulation;
}
#drawBtn::before,
#unoBtn::before {
  content: '';
  position: absolute;
  inset: -12px;
}
.btn:hover:not(:disabled) { filter: brightness(1.08); }
.btn:active:not(:disabled) {
  transform: translate3d(0, 3px, 0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .45),
    0 1px 0 #100b06,
    0 3px 7px rgba(0, 0, 0, .5);
}
.btn:disabled {
  opacity: .42;
  cursor: not-allowed;
  filter: grayscale(.35);
}

/* 主行动键：皇家翡翠金镶边立体按键 */
.btn.primary {
  color: var(--gold-bright);
  background: linear-gradient(180deg, #2d8f56 0%, #195e36 100%);
  border-color: #d4af37;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .38),
    inset 0 0 0 1px rgba(212, 175, 55, .25),
    0 4px 0 #0c331c,
    0 7px 18px rgba(0, 0, 0, .65);
}
.btn.primary:active:not(:disabled) {
  transform: translate3d(0, 3px, 0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .4),
    0 1px 0 #0c331c,
    0 3px 8px rgba(0, 0, 0, .55);
}
.btn.primary.must-draw {
  color: #231400;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  background: linear-gradient(180deg, #fff0b3 0%, #e5b232 55%, #b88111 100%);
  border-color: #fff6d1;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 4px 0 #5e3e04,
    0 0 24px rgba(212, 175, 55, .75);
}

/* UNO! 街机重击大键（Fredoka/Titan One 展示字体 + 硬边立体阴影） */
.btn.uno {
  position: relative;
  overflow: hidden;
  flex: 0 0 132px;
  font-family: var(--font-display);
  font-size: 16px;
  letter-spacing: 1.5px;
  color: #d8cdb8;
  background: linear-gradient(180deg, #3c342b 0%, #231e18 100%);
  border-color: rgba(212, 175, 55, .38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .2),
    0 4px 0 #120e0b,
    0 7px 16px rgba(0, 0, 0, .6);
}
.btn.uno.hot {
  color: #fff5c8;
  background: linear-gradient(180deg, #e03428 0%, #99160d 100%);
  border-color: #f3d87d;
  text-shadow: 0 2px 0 #000;
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, .5),
    0 4px 0 #520904,
    0 0 26px rgba(229, 52, 43, .85);
  animation: pulse 1s infinite;
}
.btn.uno.hot:active:not(:disabled) {
  transform: translate3d(0, 3px, 0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .5),
    0 1px 0 #520904;
}
.uno-fill {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 235, 150, .48), rgba(255, 255, 255, .12));
  pointer-events: none;
  opacity: 0;
  transition: opacity .18s;
}
.btn.uno.hot .uno-fill { opacity: 1; }
.uno-label { position: relative; z-index: 2; font-variant-numeric: tabular-nums; }

.uno-ctrl-wrap {
  position: relative;
  flex: 0 0 132px;
  display: flex;
}
.uno-ctrl-wrap .btn.uno {
  width: 100%;
}

/* 首局动态微引导悬浮指引气泡 (Zero-Friction Onboarding) */
.onboard-tip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 6px);
  transform: translate3d(-50%, 6px, 0) scale(.92);
  z-index: 36;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 7px 13px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 900;
  white-space: nowrap;
  color: #1f1202;
  background: linear-gradient(180deg, #fff5c8 0%, #eab93f 100%);
  border: 1.5px solid #fff8dc;
  box-shadow:
    0 6px 20px rgba(0, 0, 0, .65),
    0 0 18px rgba(212, 175, 55, .6);
  pointer-events: none;
  opacity: 0;
}
.onboard-tip.show {
  display: inline-flex;
  opacity: 1;
  transform: translate3d(-50%, 0, 0) scale(1);
  animation: onboardBob 1.2s ease-in-out infinite;
}
.onboard-tip.uno-tip {
  left: auto;
  right: 0;
  bottom: calc(100% + 10px);
  transform: translate3d(0, 0, 0);
  background: linear-gradient(180deg, #ffe8b8 0%, #f2b81a 100%);
  animation: onboardBobUno 1.1s ease-in-out infinite;
}
.onboard-arrow.down {
  width: 0;
  height: 0;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-top: 7px solid #eab93f;
  position: absolute;
  bottom: -7px;
  left: 50%;
  margin-left: -6px;
}
.onboard-tip.uno-tip .onboard-arrow.down {
  left: auto;
  right: 26px;
  border-top-color: #f2b81a;
}
@keyframes onboardBob {
  0%, 100% { transform: translate3d(-50%, 0, 0); }
  50% { transform: translate3d(-50%, -5px, 0); }
}
@keyframes onboardBobUno {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -5px, 0); }
}

.net-copy-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin: 0 auto 12px;
}
.copy-btn.invite {
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #2d8f56, #195e36);
  border-color: var(--gold-light);
  box-shadow: 0 3px 0 #0c331c, 0 5px 12px rgba(0, 0, 0, .5);
}

.btn.wide { display: flex; width: 100%; margin-top: 12px; }
.btn.ghost {
  background: linear-gradient(180deg, rgba(46, 36, 24, .78), rgba(24, 18, 12, .9));
  border-color: rgba(212, 175, 55, .36);
  font-size: 13px;
  font-weight: 700;
  padding: 10px;
}

/* ---------------------------------------------------------------------------
 * 4. 俱乐部弹窗面板 & 电影感主菜单（Title Screen）
 * ------------------------------------------------------------------------- */
.overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  background: rgba(5, 9, 8, .76);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms ease, visibility 140ms step-end;
}
.overlay.show {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition: opacity 140ms ease, visibility 0ms step-start;
}
#brandOverlay, #rulesOverlay, #setOverlay, #qualityOverlay, #rankOverlay, #avatarOverlay, #posterOverlay, #netOverlay, #resultOverlay {
  z-index: 55;
}
#colorOverlay, #swapOverlay, #pauseOverlay, #resumeOverlay, #confirmRestartOverlay, #hostLostOverlay {
  z-index: 65;
}
#loadingOverlay {
  z-index: 80;
}

/* 香槟金双线镶边 + Transparent Textures 胡桃木皮革内衬面板 */
.panel {
  width: min(436px, 100%);
  max-height: calc(100dvh - 36px);
  overflow-y: auto;
  padding: 22px 20px;
  border-radius: 12px;
  background-image:
    url('https://www.transparenttextures.com/patterns/dark-leather.png'),
    radial-gradient(120% 80% at 50% 0%, rgba(212, 175, 55, .12), transparent 60%),
    linear-gradient(180deg, var(--panel-top, #162923) 0%, var(--panel-bot, #0a1411) 100%);
  background-blend-mode: overlay, normal, normal;
  border: 1.5px solid rgba(212, 175, 55, .5);
  box-shadow:
    inset 0 0 0 3px rgba(0, 0, 0, .44),
    inset 0 0 0 4px rgba(212, 175, 55, .18),
    inset 0 1px 0 rgba(255, 243, 196, .35),
    0 26px 64px rgba(0, 0, 0, .8);
  animation: panelIn .32s var(--ease-pop) both;
  scrollbar-width: thin;
}
.panel.center { text-align: center; }
.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 12px;
  font-family: var(--font-serif-cn);
  font-size: 18px;
  font-weight: 900;
  color: var(--gold-bright);
  letter-spacing: 1px;
  text-shadow: 0 2px 0 #000, 0 3px 6px rgba(0, 0, 0, .75);
}
.panel h2 .ic, .panel h2 .ph-duotone { color: var(--gold); }
.panel .sub { margin: 0 0 12px; font-size: 12.5px; color: var(--ink-dim); line-height: 1.65; }
.panel .hint { margin: 0 0 14px; font-size: 12px; color: var(--ink-dim); line-height: 1.65; }

.panel.pinned { display: flex; flex-direction: column; overflow: hidden; }
.panel.pinned > h2,
.panel.pinned > .btn { flex: 0 0 auto; }
.panel-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overscroll-behavior: contain;
  margin-right: -6px;
  padding-right: 6px;
  scrollbar-width: thin;
}

/* 电影感主菜单：3D 牌桌俯视舞台 + 悬浮立体铭牌 */
#menuOverlay {
  padding: 0;
  align-items: stretch;
  background-image:
    radial-gradient(75% 55% at 50% 36%, var(--felt-spot) 0%, var(--felt-mid) 56%, var(--felt-edge) 100%);
}
.lobby-bg-photo {
  position: absolute;
  inset: 0;
  background-image: url('../assets/bg/bg_table_2.jpg?v=2026111923');
  background-size: cover;
  background-position: center;
  opacity: .28;
  filter: saturate(.92) contrast(1.06);
  pointer-events: none;
  z-index: 0;
}
body[data-bg="bg1"] .lobby-bg-photo {
  background-image: url('../assets/bg/bg_table_1.jpg?v=2026111923');
}
body[data-bg="bg2"] .lobby-bg-photo {
  background-image: url('../assets/bg/bg_table_2.jpg?v=2026111923');
  opacity: .30;
}
body[data-bg="none"] .lobby-bg-photo {
  display: none;
}
#menuOverlay::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(85% 80% at 50% 45%, transparent 32%, rgba(0, 0, 0, .86) 100%);
  box-shadow: inset 0 0 0 1.5px rgba(212, 175, 55, .24);
  z-index: 1;
}

/* 牌桌中央散落原创卡牌剪影（真实物理投影 + 微弱流光） */
.lobby-cards-stage {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  overflow: hidden;
}
.stage-card {
  position: absolute;
  width: clamp(66px, 14vw, 108px);
  aspect-ratio: 2 / 3;
  border-radius: 9px;
  overflow: hidden;
  border: 1.5px solid rgba(212, 175, 55, .45);
  box-shadow:
    0 18px 36px rgba(0, 0, 0, .75),
    0 0 22px rgba(212, 175, 55, .18);
  opacity: .28;
  filter: saturate(.9) brightness(.82);
}
.stage-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.stage-card.sc-1 { left: 6%; top: 22%; transform: rotate(-18deg); }
.stage-card.sc-2 { right: 6%; top: 18%; transform: rotate(16deg); }
.stage-card.sc-3 { left: 50%; bottom: 8%; transform: translateX(-50%) rotate(7deg); opacity: .16; }

/* 大厅背景缓慢旋转的黄铜星盘罗盘 */
.lobby-compass {
  position: absolute;
  left: 50%;
  top: 44%;
  width: min(88vmin, 560px);
  height: min(88vmin, 560px);
  margin: calc(min(88vmin, 560px) / -2) 0 0 calc(min(88vmin, 560px) / -2);
  pointer-events: none;
  z-index: 1;
  animation: ringSpin 64s linear infinite;
}

.lobby-fx { position: absolute; inset: 0; overflow: hidden; pointer-events: none; z-index: 1; }
.lp {
  position: absolute;
  aspect-ratio: 2 / 3;
  border-radius: 6px;
  background: linear-gradient(155deg, rgba(212, 175, 55, .28), rgba(20, 15, 8, .12));
  border: 1px solid rgba(212, 175, 55, .35);
  box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .35), 0 8px 20px rgba(0, 0, 0, .45);
  animation: floaty linear infinite;
  transform: rotate(var(--r, 0deg));
}

.lobby-inner {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 560px;
  margin: auto;
  padding: calc(16px + env(safe-area-inset-top, 0px)) 16px calc(18px + env(safe-area-inset-bottom, 0px));
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: 100dvh;
  overflow-y: auto;
  scrollbar-width: none;
}
.lobby-inner::-webkit-scrollbar { display: none; }

.crest-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: 0;
}
.logo { display: block; width: min(260px, 66vw); margin: 0 auto; }
.logo-sheen {
  filter: drop-shadow(0 10px 24px rgba(0, 0, 0, .72));
  animation: logoFloat 4.8s ease-in-out infinite;
}
@keyframes logoFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-4px); }
}
.lobby-sub {
  display: inline-block;
  margin-top: -2px;
  padding: 3px 14px;
  border-radius: 4px;
  font-family: var(--font-royal);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.4px;
  color: var(--gold-bright);
  background: linear-gradient(90deg, transparent, rgba(24, 16, 8, .88) 16%, rgba(24, 16, 8, .88) 84%, transparent);
  border-top: 1px solid rgba(212, 175, 55, .42);
  border-bottom: 1px solid rgba(212, 175, 55, .42);
  text-shadow: 0 2px 0 #000;
}

/* 战绩悬浮水晶胶囊徽章栏 */
.lobby-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  max-width: 100%;
  box-sizing: border-box;
  margin-bottom: 2px;
}
.stat-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink);
  background: rgba(18, 28, 24, .58);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 243, 196, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), 0 4px 12px rgba(0, 0, 0, .45);
  text-shadow: 0 2px 0 #000;
}
.stat-pill .ic, .stat-pill .ph-duotone { width: 13px; height: 13px; font-size: 14px; color: var(--gold-light); }
.stat-pill b {
  font-family: var(--font-num);
  font-size: 12.5px;
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
  margin-left: 2px;
}

/* 双子牌桌席位卡（打破矩形表单堆叠） */
.twin-seats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  align-items: stretch;
}
@media (max-width: 520px) {
  .twin-seats {
    grid-template-columns: 1fr;
    gap: 10px;
  }
}

.seat-card {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 13px;
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: transform .18s var(--ease-out-soft), border-color .22s, box-shadow .22s;
}
.seat-card:hover {
  transform: translateY(-2px);
}
.seat-card.solo {
  background:
    radial-gradient(120% 80% at 20% 0%, rgba(242, 184, 26, .18), transparent 65%),
    linear-gradient(165deg, rgba(44, 30, 14, .88) 0%, rgba(18, 12, 6, .94) 100%);
  border: 1.5px solid rgba(239, 210, 121, .52);
  box-shadow:
    inset 0 1px 0 rgba(255, 244, 200, .35),
    0 14px 28px rgba(0, 0, 0, .62);
}
.seat-card.online {
  background:
    radial-gradient(120% 80% at 80% 0%, rgba(47, 174, 85, .2), transparent 65%),
    linear-gradient(165deg, rgba(16, 44, 34, .88) 0%, rgba(7, 19, 15, .94) 100%);
  border: 1.5px solid rgba(110, 214, 158, .45);
  box-shadow:
    inset 0 1px 0 rgba(210, 255, 232, .28),
    0 14px 28px rgba(0, 0, 0, .62);
}

.seat-crest {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}
.seat-ava {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--gold-light);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .6);
  flex: 0 0 auto;
}
.seat-badge {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  color: #10281e;
  background: linear-gradient(155deg, #b8f5cf 0%, #3cb865 55%, #167a38 100%);
  border: 1.5px solid #d9ffe8;
  box-shadow: 0 4px 10px rgba(0, 0, 0, .55);
}
.seat-badge .ic,
.seat-badge .ph-duotone { width: 20px; height: 20px; font-size: 21px; color: #0b2419; }
.seat-title { display: flex; flex-direction: column; min-width: 0; }
.seat-title small {
  font-family: var(--font-royal);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 1.6px;
  color: var(--gold-light);
}
.seat-title b {
  font-family: var(--font-serif-cn);
  font-size: 15.5px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}
.seat-desc {
  margin: 0 0 10px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-dim);
}
.seat-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.seat-card.solo .seat-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.seat-card.online .btn.primary {
  padding: 9px 10px;
  font-size: 13px;
}

/* 底部图标上/文字下整齐对齐导航栏（无狭窄截断省略号） */
.lobby-dock {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(12, 16, 14, .68);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border: 1px solid rgba(212, 175, 55, .32);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, .16), 0 8px 20px rgba(0, 0, 0, .55);
}
.dock-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px 4px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: rgba(255, 255, 255, .03);
  color: var(--gold-bright);
  font-family: inherit;
  cursor: pointer;
  transition: transform .1s, background .18s, border-color .18s;
}
.dock-btn:hover {
  background: rgba(212, 175, 55, .14);
  border-color: rgba(212, 175, 55, .42);
}
.dock-btn:active { transform: translateY(2px); }
.dock-btn.merch {
  background: linear-gradient(180deg, rgba(212, 175, 55, .24), rgba(138, 103, 29, .14));
  border-color: rgba(239, 210, 121, .52);
}
.dock-tag {
  position: absolute;
  top: -7px;
  right: 2px;
  padding: 1px 5px;
  border-radius: 99px;
  font-size: 8.5px;
  font-weight: 900;
  color: #1f1202;
  background: linear-gradient(180deg, #fff4c8, #e5b942);
  border: 1px solid #3d2404;
  box-shadow: 0 2px 5px rgba(0, 0, 0, .6);
  white-space: nowrap;
}
.dock-ic {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--gold-light);
}
.dock-ic .ic,
.dock-ic .ph-duotone { font-size: 21px; line-height: 1; }
.dock-lbl {
  font-size: 11px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
}

/* 实体筹码按键（休闲牌桌 / 大师牌桌） */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 900;
  padding: 11px 10px;
  border-radius: 9px;
  cursor: pointer;
  color: #211302;
  background: linear-gradient(180deg, #fff3c4 0%, #e4b73e 55%, #b58216 100%);
  border: 1.5px solid #fff7d6;
  box-shadow:
    inset 0 1px 0 #ffffff,
    0 4px 0 #593b04,
    0 7px 16px rgba(0, 0, 0, .58);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .08s ease, box-shadow .08s ease, filter .15s;
}
.seg-btn .ph-duotone { color: currentColor; }
.seg-btn[data-ai="expert"] {
  color: #fff6db;
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #b82921 0%, #78130d 100%);
  border-color: var(--gold-light);
  box-shadow:
    inset 0 1px 0 rgba(255, 230, 180, .45),
    0 4px 0 #3d0704,
    0 7px 16px rgba(0, 0, 0, .62);
}
.seg-btn:hover { filter: brightness(1.08); }
.seg-btn:active {
  transform: translate3d(0, 3px, 0);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .45),
    0 1px 0 #3d0704,
    0 3px 6px rgba(0, 0, 0, .45);
}
.seg-btn .ic { width: 15px; height: 15px; }

.join-row { display: flex; gap: 8px; }
.room-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 900;
  letter-spacing: .22em;
  text-align: center;
  border-radius: 9px;
  color: var(--gold-bright);
  background: rgba(6, 5, 3, .78);
  border: 1.5px solid rgba(212, 175, 55, .4);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .75);
  outline: none;
  transition: border-color .18s, box-shadow .18s;
}
.room-input:focus {
  border-color: var(--gold-light);
  box-shadow: inset 0 2px 6px rgba(0, 0, 0, .75), 0 0 12px rgba(212, 175, 55, .35);
}
.room-input::placeholder {
  font-family: var(--font-body);
  letter-spacing: .04em;
  font-weight: 500;
  font-size: 12px;
  color: rgba(191, 181, 158, .55);
}

.lobby-mini { display: flex; align-items: center; justify-content: center; gap: 10px; margin-top: 2px; }
.lobby-mini .icon-btn { flex: 1 1 0; justify-content: center; padding: 10px; font-size: 12px; }

.room-code {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 8px 0 10px;
}
.room-code b {
  font-family: var(--font-display);
  font-size: clamp(34px, 9vw, 46px);
  font-weight: 900;
  letter-spacing: .28em;
  padding-left: .28em;
  color: var(--gold-bright);
  text-shadow: 0 3px 0 #000, 0 0 24px rgba(212, 175, 55, .45);
  font-variant-numeric: tabular-nums;
}
.copy-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 14px;
  border-radius: 8px;
  color: #211302;
  background: linear-gradient(180deg, #fff1be, #d4af37);
  border: 1px solid #fff7d6;
  box-shadow: 0 3px 0 #593b04, 0 5px 12px rgba(0, 0, 0, .5);
  cursor: pointer;
  transition: transform .08s, filter .15s;
}
.copy-btn:active { transform: translate3d(0, 2px, 0); box-shadow: 0 1px 0 #593b04; }
.copy-btn.done { background: linear-gradient(180deg, #b8f5cf, #46b876); }

.spinner {
  width: 24px; height: 24px;
  margin: 12px auto 0;
  border-radius: 50%;
  border: 2.5px solid rgba(212, 175, 55, .2);
  border-top-color: var(--gold-light);
  animation: spin .8s linear infinite;
}

.err-text { color: #ff9a9a; font-size: 12.5px; line-height: 1.6; margin: 4px 0 0; }
.menu-sub { text-align: center; margin: 2px 0 14px; font-size: 12px; color: var(--ink-dim); letter-spacing: .5px; }

.load-pct {
  font-family: var(--font-display);
  font-size: 36px;
  font-weight: 900;
  letter-spacing: 2px;
  color: var(--gold-bright);
  text-shadow: 0 3px 0 #000, 0 0 22px rgba(212, 175, 55, .45);
  font-variant-numeric: tabular-nums;
  margin: 4px 0 4px;
}
.load-wrap { margin-top: 10px; text-align: center; }
.load-track {
  height: 8px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(212, 175, 55, .35);
  overflow: hidden;
}
.load-bar {
  height: 100%;
  width: 0%;
  border-radius: 99px;
  background: linear-gradient(90deg, #c99622, #fff1be);
  transition: width .18s ease;
}
.load-text { margin-top: 8px; font-size: 11px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }

/* 摸牌即出快捷浮窗 */
.drawn-prompt {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translate3d(-50%, 8px, 0) scale(.94);
  z-index: 35;
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 11px 15px 9px;
  border-radius: 10px;
  min-width: 248px;
  background: linear-gradient(180deg, rgba(26, 20, 14, .95), rgba(14, 10, 7, .98));
  border: 1.5px solid var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .3),
    0 14px 34px rgba(0, 0, 0, .75),
    0 0 24px rgba(212, 175, 55, .3);
  opacity: 0;
  pointer-events: none;
}
.drawn-prompt.show {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  transform: translate3d(-50%, 0, 0) scale(1);
  animation: dpPop .24s var(--ease-pop) both;
}
.dp-info { font-size: 12px; color: var(--ink); white-space: nowrap; text-shadow: 0 2px 0 #000; }
.dp-info b { color: var(--gold-bright); font-weight: 900; }
.dp-actions { display: flex; gap: 8px; width: 100%; }
.dp-btn {
  flex: 1 1 0;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  border: 1px solid rgba(212, 175, 55, .4);
  transition: transform .08s ease, filter .15s ease;
  white-space: nowrap;
}
.dp-btn:active { transform: translate3d(0, 2px, 0); }
.dp-btn.play {
  color: #1f1202;
  background: linear-gradient(180deg, #fff1be, #d4af37);
  border-color: #fff6d6;
  box-shadow: 0 3px 0 #593b04;
}
.dp-btn.keep {
  color: var(--ink);
  background: linear-gradient(180deg, #35291c, #1c150e);
  box-shadow: 0 3px 0 #0d0905;
}
.dp-bar-wrap {
  width: 100%;
  height: 3px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .12);
  overflow: hidden;
}
.dp-bar {
  width: 100%;
  height: 100%;
  background: linear-gradient(90deg, var(--gold-bright), #e5342b);
  transform-origin: left center;
  transform: scaleX(1);
}

/* 选色器：屏幕中央黄铜镶边大尺寸四色扇形轮盘 */
.color-picker.color-wheel {
  position: relative;
  width: min(240px, 64vw);
  height: min(240px, 64vw);
  margin: 10px auto 4px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 8px;
  padding: 10px;
  border-radius: 50%;
  background: radial-gradient(circle, #241b11 0%, #100c07 100%);
  border: 2px solid var(--gold);
  box-shadow:
    inset 0 0 22px rgba(0, 0, 0, .8),
    0 16px 38px rgba(0, 0, 0, .75);
}
.sw-btn {
  position: relative;
  border: 2px solid rgba(255, 243, 196, .42);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
  font-family: inherit;
  cursor: pointer;
  transition: transform .12s var(--ease-spring), filter .18s;
  display: grid;
  place-items: center;
  text-shadow: 0 2px 0 #000, 0 3px 6px rgba(0, 0, 0, .6);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 5px 14px rgba(0, 0, 0, .45);
  touch-action: manipulation;
}
.color-wheel .sw-red    { border-radius: 100% 12px 12px 12px; }
.color-wheel .sw-yellow { border-radius: 12px 100% 12px 12px; }
.color-wheel .sw-green  { border-radius: 12px 12px 12px 100%; }
.color-wheel .sw-blue   { border-radius: 12px 12px 100% 12px; }
.wheel-hub {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate3d(-50%, -50%, 0);
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 1px;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: radial-gradient(circle at 35% 30%, #3a2b18, #140e07);
  border: 2px solid var(--gold);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, .4), 0 4px 14px rgba(0, 0, 0, .75);
  pointer-events: none;
}
.sw-btn:hover { transform: scale3d(1.04, 1.04, 1); filter: brightness(1.08); }
.sw-btn:active { transform: scale3d(.94, .94, 1); }
.sw-red    { background: linear-gradient(155deg, #d14d46, #8f221c); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .36), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 5px 14px rgba(0, 0, 0, .45); }
.sw-yellow { background: linear-gradient(155deg, #dfb044, #9c6c12); color: #2b1a00; text-shadow: 0 1px 0 rgba(255, 255, 255, .36); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .42), inset 0 -4px 0 rgba(0, 0, 0, .24), 0 5px 14px rgba(0, 0, 0, .45); }
.sw-green  { background: linear-gradient(155deg, #3ba360, #166031); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 5px 14px rgba(0, 0, 0, .45); }
.sw-blue   { background: linear-gradient(155deg, #3e74cc, #183d82); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .34), inset 0 -4px 0 rgba(0, 0, 0, .28), 0 5px 14px rgba(0, 0, 0, .45); }

/* ---------------------------------------------------------------------------
 * 5. 规则图鉴 / 设置
 * ------------------------------------------------------------------------- */
.rules-body { font-size: 12.5px; color: var(--ink); line-height: 1.72; }
.rules-sec { margin-bottom: 16px; }
.rules-sec h3 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 8px;
  font-size: 12px;
  letter-spacing: 1.2px;
  color: var(--gold-light);
  font-weight: 900;
  border-bottom: 1px solid rgba(212, 175, 55, .22);
  padding-bottom: 4px;
}
.rules-sec ul { margin: 0; padding-left: 18px; }
.rules-sec li { margin-bottom: 5px; }
.rules-sec li b { color: var(--gold-bright); }

.gallery { display: flex; flex-direction: column; gap: 9px; }
.gal-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 11px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(212, 175, 55, .22);
}
.gal-txt { min-width: 0; }
.gal-txt b { display: block; font-size: 12.5px; color: var(--gold-bright); margin-bottom: 2px; }
.gal-txt span { font-size: 11.5px; color: var(--ink-dim); line-height: 1.5; }

.set-row { margin-bottom: 16px; }
.set-row > label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 7px;
  color: var(--gold-bright);
}
.set-row > label em { font-family: var(--font-num); font-style: normal; font-weight: 700; color: var(--gold-light); font-variant-numeric: tabular-nums; }

input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 7px;
  border-radius: 99px;
  background: rgba(0, 0, 0, .55);
  border: 1px solid rgba(212, 175, 55, .32);
  outline: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
  border: 2px solid #2b1a03;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .65);
}
input[type="range"]::-moz-range-thumb {
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #e5b942;
  border: 2px solid #2b1a03;
}

.theme-picker { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.theme-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 9px 7px;
  border-radius: 8px;
  cursor: pointer;
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, .28);
  border: 1px solid rgba(212, 175, 55, .22);
  transition: transform .12s, border-color .2s, color .2s;
}
.theme-btn:hover { transform: translateY(-1px); }
.theme-btn.is-on {
  border-color: var(--gold-light);
  color: var(--gold-bright);
  background: rgba(212, 175, 55, .12);
  box-shadow: inset 0 0 0 1px var(--gold);
}
.theme-dot { width: 100%; height: 22px; border-radius: 5px; border: 1px solid rgba(212, 175, 55, .38); }

.seg-mini { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg-mini button {
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 4px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, .3);
  border: 1px solid rgba(212, 175, 55, .24);
  transition: .15s;
}
.seg-mini button.is-on {
  color: #1f1202;
  font-weight: 900;
  background: linear-gradient(180deg, #fff1be, #d4af37);
  border-color: #fff6d6;
}

/* ---------------------------------------------------------------------------
 * 6. 气泡 / 定制双色矢量徽章快捷短语 / 矢量奖章徽标 / Toast
 * ------------------------------------------------------------------------- */
.bubble {
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translate(-50%, 6px) scale(.9);
  max-width: 48vw;
  padding: 5px 11px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 900;
  line-height: 1.3;
  white-space: nowrap;
  color: #1f1202;
  background: linear-gradient(180deg, #fff6d6, #e5c158);
  border: 1.5px solid #4a3208;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s, transform .24s var(--ease-spring);
  z-index: 20;
}
.bubble::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: #e5c158;
}
.bubble.show { opacity: 1; transform: translate(-50%, 0) scale(1); }

.emote-pop {
  position: absolute;
  right: 10px;
  bottom: calc(100% - 4px);
  z-index: 30;
  display: none;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 9px;
  border-radius: 10px;
  background: linear-gradient(180deg, #241b12, #120d08);
  border: 1.5px solid var(--gold);
  box-shadow: 0 16px 40px rgba(0, 0, 0, .75);
  animation: panelIn .18s var(--ease-out-soft) both;
}
.emote-pop.show { display: grid; }
.emote-pop button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  padding: 8px 12px;
  border-radius: 7px;
  cursor: pointer;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: rgba(212, 175, 55, .1);
  border: 1px solid rgba(212, 175, 55, .3);
  white-space: nowrap;
  transition: .14s;
}
.emote-pop button .ic,
.emote-pop button .ph-duotone { color: var(--gold-light); width: 14px; height: 14px; font-size: 14px; }
.emote-pop button:hover { background: rgba(212, 175, 55, .24); transform: translateY(-1px); }

.fx-layer {
  position: fixed;
  inset: 0;
  z-index: 70;
  display: grid;
  place-items: center;
  pointer-events: none;
  overflow: hidden;
}

/* 结算黄铜徽章（纯矢量 Duotone SVG，取代原生 Emoji） */
.result-emoji {
  width: 62px;
  height: 62px;
  margin: 0 auto 10px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--gold-bright);
  background: radial-gradient(circle at 35% 30%, #3d2e1b, #140e07);
  border: 2px solid var(--gold);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .45),
    0 8px 24px rgba(0, 0, 0, .65);
}
.result-emoji.is-win {
  color: #211302;
  background: linear-gradient(160deg, #fff3c4 0%, #e5b942 58%, #9e6e12 100%);
  border-color: #fff8dc;
  box-shadow: 0 0 28px rgba(212, 175, 55, .55), 0 8px 24px rgba(0, 0, 0, .65);
}
.result-emoji .ic { width: 30px; height: 30px; stroke-width: 2.2; }

.result-stats {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  margin: 4px 0 10px;
}
.result-stats:empty { display: none; }
.res-chip {
  font-size: 11px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 6px;
  color: var(--ink-dim);
  text-shadow: 0 2px 0 #000;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(212, 175, 55, .28);
}
.res-chip b {
  font-family: var(--font-num);
  color: var(--gold-bright);
  font-variant-numeric: tabular-nums;
}

#toast {
  position: fixed;
  left: 50%;
  top: 12%;
  z-index: 90;
  transform: translate(-50%, -10px);
  padding: 9px 18px;
  border-radius: 8px;
  font-size: 12.5px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, rgba(28, 21, 14, .96), rgba(14, 10, 6, .98));
  border: 1.5px solid var(--gold);
  box-shadow: 0 10px 28px rgba(0, 0, 0, .75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .24s ease, transform .24s ease;
  max-width: 86vw;
  text-align: center;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

.orient-hint {
  position: fixed;
  left: 50%;
  top: calc(8px + env(safe-area-inset-top, 0px));
  transform: translate3d(-50%, 0, 0);
  z-index: 88;
  display: none;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 8px;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: rgba(18, 13, 8, .95);
  border: 1px solid var(--gold);
  box-shadow: 0 6px 20px rgba(0, 0, 0, .65);
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
 * 7. 关键帧
 * ------------------------------------------------------------------------- */
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes ringSpin { to { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}
@keyframes panelIn {
  from { opacity: 0; transform: translateY(14px) scale(.97); }
  to { opacity: 1; transform: none; }
}
@keyframes pulse {
  0%, 100% { box-shadow: inset 0 1px 0 rgba(255, 230, 180, .5), 0 4px 0 #520904, 0 0 0 0 rgba(229, 52, 43, .75); }
  50% { box-shadow: inset 0 1px 0 rgba(255, 230, 180, .5), 0 4px 0 #520904, 0 0 0 10px rgba(229, 52, 43, 0); }
}
@keyframes breathe {
  0%, 100% {
    filter: brightness(1);
  }
  50% {
    filter: brightness(1.12) drop-shadow(0 0 12px rgba(212, 175, 55, .55));
  }
}
@keyframes dot {
  0%, 80%, 100% { opacity: .25; transform: translateY(0); }
  40% { opacity: 1; transform: translateY(-3px); }
}
@keyframes pilePress { 50% { transform: translate3d(2px, 3px, 0) scale(.96); } }
@keyframes floaty {
  0% { transform: translateY(0) rotate(var(--r, 0deg)); }
  50% { transform: translateY(-26px) rotate(calc(var(--r, 0deg) + 7deg)); }
  100% { transform: translateY(0) rotate(var(--r, 0deg)); }
}
@keyframes zoneShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  18% { transform: translate3d(-7px, 0, 0); }
  36% { transform: translate3d(7px, 0, 0); }
  54% { transform: translate3d(-5px, 0, 0); }
  72% { transform: translate3d(5px, 0, 0); }
  88% { transform: translate3d(-2px, 0, 0); }
}
@keyframes screenShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-5px, 3px, 0); }
  40% { transform: translate3d(5px, -3px, 0); }
  60% { transform: translate3d(-4px, -2px, 0); }
  80% { transform: translate3d(4px, 2px, 0); }
}
@keyframes avaHeartbeat {
  0%, 100% { transform: scale3d(1, 1, 1); }
  35% { transform: scale3d(1.13, 1.13, 1); }
  60% { transform: scale3d(.97, .97, 1); }
}
@keyframes unoFlameBurn {
  0% { transform: scale3d(.94, .94, 1) rotate(-8deg); filter: blur(3px) brightness(1); }
  100% { transform: scale3d(1.14, 1.14, 1) rotate(12deg); filter: blur(4px) brightness(1.28); }
}
@keyframes ringBrake {
  0% { opacity: .28; transform: scale3d(1, 1, 1) rotate(0deg); filter: blur(1px) brightness(1); }
  32% { opacity: .82; transform: scale3d(1.06, 1.06, 1) rotate(16deg); filter: blur(0px) brightness(1.9); }
  100% { opacity: .28; transform: scale3d(1, 1, 1) rotate(-24deg); filter: blur(1px) brightness(1); }
}
@keyframes dpPop {
  0% { opacity: 0; transform: translate3d(-50%, 10px, 0) scale(.9); }
  100% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); }
}

/* ---------------------------------------------------------------------------
 * 8. 移动端专项响应式、中低端 GPU 帧率保护与横竖屏黄金比例布局
 * ------------------------------------------------------------------------- */
@media (max-width: 768px), (hover: none) and (pointer: coarse) {
  .glass,
  .overlay,
  .panel,
  .drawn-prompt {
    backdrop-filter: blur(8px) saturate(1.15);
    -webkit-backdrop-filter: blur(8px) saturate(1.15);
  }
}

@media (max-width: 480px) and (orientation: portrait) {
  :root {
    --pile-h: clamp(102px, 21.5dvh, 174px);
    --hand-h: clamp(86px, 19.5dvh, 146px);
  }
  .topbar { gap: 4px; padding: calc(5px + env(safe-area-inset-top, 0px)) 8px 6px; }
  .brand { font-size: 15px; letter-spacing: 1px; }
  .chip, .color-ind { font-size: 9.5px; padding: 2px 6px; gap: 3px; }
  .swatch { width: 12px; height: 12px; }
  .icon-btn { font-size: 10px; padding: 4px 7px; }
  .icon-btn .lbl { display: none; }
  .opp-bar { padding: 6px 10px 2px; }
  .hand-head { height: 26px; padding: 0 4px; }
  .sort-btn { font-size: 9.5px; padding: 4px 8px; }
  .controls {
    padding: 6px 12px calc(10px + env(safe-area-inset-bottom, 0px));
    gap: 12px;
  }
  .btn { padding: 13px 12px; font-size: 15px; }
  .btn.uno { flex: 0 0 132px; font-size: 15.5px; }
  .lobby-inner { padding: calc(16px + env(safe-area-inset-top, 0px)) 14px calc(20px + env(safe-area-inset-bottom, 0px)); gap: 9px; }
  .lobby-card { padding: 11px 12px; }
  .emote-pop { right: 6px; }
  .corner-filigree { width: 32px; height: 32px; opacity: .35; }
}

@media (max-width: 700px) {
  .board {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(0, 1fr) 50px;
    gap: 4px;
  }
  .log { grid-column: 1; grid-row: 3; }
  .log-head { display: none; }
  .log-body { font-size: 10.5px; line-height: 1.45; padding: 4px 8px; }
  .piles { gap: clamp(18px, 7vw, 38px); }
  .ring { width: min(86vmin, 440px); }
}

@media (max-height: 520px) and (orientation: landscape) {
  :root {
    --pile-h: clamp(74px, 28dvh, 128px);
    --hand-h: clamp(68px, 25dvh, 112px);
  }
  .orient-hint:not(.dismissed) { display: inline-flex; }
  .topbar { padding-top: 3px; padding-bottom: 4px; }
  .opp-bar { padding-top: 2px; }
  .board {
    grid-template-columns: minmax(0, 1fr) 165px;
    grid-template-rows: auto minmax(0, 1fr);
    padding-bottom: 2px;
  }
  .log { grid-column: 2; grid-row: 2; }
  .hand-head { height: 24px; }
  .controls { padding: 3px calc(12px + env(safe-area-inset-right, 0px)) calc(5px + env(safe-area-inset-bottom, 0px)) calc(12px + env(safe-area-inset-left, 0px)); }
  .btn { padding: 7px 10px; font-size: 13px; }
  .lobby-inner { padding-top: 10px; }
  .logo { width: min(180px, 38vw); }
}

/* ===========================================================================
 * 9. 全端自适应品牌开场动画舞台 (Intro Sequence：手机竖屏 100dvh + 电脑宽屏 9:16 剧院舞台)
 * ========================================================================= */
.intro-overlay {
  padding: 0;
  z-index: 95;
  overflow: hidden;
  background-image:
    url('https://www.transparenttextures.com/patterns/felt.png'),
    radial-gradient(60% 50% at 50% 45%, var(--felt-spot) 0%, var(--felt-mid) 58%, #020806 100%);
  background-blend-mode: overlay, normal;
}

.intro-backdrop {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.intro-backdrop::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(85% 80% at 50% 50%, transparent 36%, rgba(0, 0, 0, .86) 100%);
}
.intro-bg-compass {
  position: absolute;
  top: 50%;
  width: min(56vmin, 420px);
  height: min(56vmin, 420px);
  margin-top: calc(min(56vmin, 420px) / -2);
  opacity: .34;
  animation: ringSpin 56s linear infinite;
}
.intro-bg-compass.left { left: 4vw; }
.intro-bg-compass.right { right: 4vw; animation-direction: reverse; }

/* 核心 9:16 视觉舞台：手机竖屏端默认全屏 100dvh，电脑宽屏端居中 9:16 舞台 */
.intro-stage {
  position: relative;
  z-index: 2;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: radial-gradient(circle at 50% 40%, #163b30 0%, #071410 70%, #030907 100%);
  cursor: pointer;
}

/* 电脑宽屏/横屏显示器：9:16 竖屏舞台居中呈现 + 香槟金细边框 + 深邃剧院级投影 */
@media (min-aspect-ratio: 10/13) and (min-width: 520px) {
  .intro-stage {
    width: auto;
    height: min(90dvh, 860px);
    aspect-ratio: 9 / 16;
    border-radius: 16px;
    border: 1.5px solid rgba(212, 175, 55, .62);
    box-shadow:
      inset 0 0 0 1px rgba(255, 243, 196, .25),
      0 0 0 6px rgba(0, 0, 0, .48),
      0 0 0 7px rgba(212, 175, 55, .24),
      0 32px 84px rgba(0, 0, 0, .92);
  }
}

.intro-video,
.intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.intro-canvas { z-index: 1; }
.intro-video { z-index: 2; opacity: 0; transition: opacity .35s ease; }
.intro-stage.video-ready .intro-video { opacity: 1; }

.intro-topbar {
  position: relative;
  z-index: 4;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: calc(14px + env(safe-area-inset-top, 0px)) 16px 10px;
  background: linear-gradient(180deg, rgba(0, 0, 0, .68) 0%, transparent 100%);
}
.intro-studio-badge {
  font-family: var(--font-num);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 2.5px;
  color: var(--gold-bright);
  padding: 4px 10px;
  border-radius: 6px;
  background: rgba(14, 10, 6, .62);
  border: 1px solid rgba(212, 175, 55, .38);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  text-shadow: 0 2px 0 #000;
}

.intro-skip-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 14px;
  border-radius: 999px;
  font-family: inherit;
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: rgba(18, 14, 9, .68);
  border: 1.2px solid rgba(212, 175, 55, .52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, .28), 0 4px 14px rgba(0, 0, 0, .6);
  cursor: pointer;
  transition: transform .1s ease, border-color .2s, box-shadow .2s;
}
.intro-skip-btn small {
  font-family: var(--font-num);
  font-size: 9.5px;
  letter-spacing: 1px;
  opacity: .8;
}
.intro-skip-btn:hover { border-color: var(--gold-bright); transform: translateY(-1px); }
.intro-skip-btn:active { transform: translateY(1px); }
.intro-skip-btn.returning-glow {
  border-color: #fff3c4;
  background: linear-gradient(180deg, rgba(212, 175, 55, .34), rgba(24, 18, 10, .82));
  box-shadow: 0 0 18px rgba(212, 175, 55, .65), inset 0 1px 0 rgba(255, 255, 255, .45);
}

.intro-footer {
  position: relative;
  z-index: 4;
  padding: 18px 18px calc(18px + env(safe-area-inset-bottom, 0px));
  background: linear-gradient(0deg, rgba(0, 0, 0, .82) 0%, rgba(0, 0, 0, .42) 65%, transparent 100%);
}
.intro-speed-hint {
  text-align: center;
  font-size: 11px;
  font-weight: 700;
  color: rgba(255, 244, 200, .78);
  text-shadow: 0 2px 0 #000;
  letter-spacing: .5px;
  margin-bottom: 8px;
  transition: color .2s, transform .2s;
}
.intro-stage.ff-active .intro-speed-hint {
  color: #fff4c8;
  transform: scale(1.05);
}
.intro-load-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 5px;
}
.intro-footer .load-text { margin: 0; font-size: 11px; color: var(--ink-dim); text-shadow: 0 2px 0 #000; }
.intro-footer .load-pct { margin: 0; font-size: 15px; line-height: 1; }

/* ===========================================================================
 * 10. AI 原创多曲目迷你黑胶唱片机控件 (Mini Vinyl Jukebox & Settings Jukebox)
 * ========================================================================= */
.mini-jukebox {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 6px 2px 3px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(28, 22, 15, .92), rgba(14, 11, 7, .96));
  border: 1px solid rgba(212, 175, 55, .4);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, .16), 0 2px 6px rgba(0, 0, 0, .52);
  max-width: 215px;
}
.jb-disc-btn {
  width: 22px;
  height: 22px;
  padding: 2px;
  overflow: hidden;
  border-radius: 50%;
  border: 1px solid var(--gold);
  background: radial-gradient(circle, #2e2213 0%, #0f0b06 70%);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}
.jb-disc-btn .vinyl-disc-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: spin 4.2s linear infinite;
}
.vinyl-disc {
  width: 15px;
  height: 15px;
  animation: spin 4.2s linear infinite;
}
.mini-jukebox.is-muted .vinyl-disc,
.jbc-vinyl-wrap.is-muted .vinyl-disc {
  animation-play-state: paused;
  opacity: .5;
}
.jb-marquee {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  max-width: 126px;
  overflow: hidden;
  cursor: pointer;
}
.jb-scene-tag {
  flex: 0 0 auto;
  font-size: 9.5px;
  font-weight: 900;
  padding: 1px 5px;
  border-radius: 4px;
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
}
.jb-scene-tag.tension {
  color: #fff5c8;
  background: linear-gradient(180deg, #e03428, #99160d);
}
.jb-track-title {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jb-ctrl-btn {
  width: 20px;
  height: 20px;
  padding: 0;
  border-radius: 50%;
  border: 1px solid rgba(212, 175, 55, .32);
  background: rgba(255, 243, 196, .08);
  color: var(--gold-light);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background .15s, transform .08s;
}
.jb-ctrl-btn:hover { background: rgba(212, 175, 55, .24); }
.jb-ctrl-btn:active { transform: translateY(1px); }
.jb-ctrl-btn .ic { width: 10px; height: 10px; }
.jb-ctrl-btn .ph-duotone { font-size: 12px; line-height: 1; color: var(--gold-light); }

/* 设置弹窗内的黑胶唱片机控制台 */
.jukebox-card {
  border-radius: 10px;
  padding: 10px;
  background: rgba(0, 0, 0, .34);
  border: 1px solid rgba(212, 175, 55, .32);
}
.jbc-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, .18);
  margin-bottom: 8px;
}
.jbc-vinyl-wrap {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: radial-gradient(circle, #382916 0%, #120d07 72%);
  border: 1.5px solid var(--gold);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .6);
  color: var(--gold-light);
}
.jbc-vinyl-wrap .vinyl-disc { width: 24px; height: 24px; }
.jbc-meta { flex: 1 1 auto; min-width: 0; }
.jbc-title {
  font-size: 12.5px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbc-sub { font-size: 10.5px; color: var(--ink-dim); margin-top: 2px; }
.jbc-btns { display: flex; gap: 5px; flex: 0 0 auto; }
.jbc-btns .icon-btn { padding: 5px 8px; }
.jbc-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  max-height: 136px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.jbc-track-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  padding: 6px 8px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 10.5px;
  font-weight: 700;
  color: var(--ink-dim);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .18);
  cursor: pointer;
  text-align: left;
  transition: .15s;
}
.jbc-track-btn span {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.jbc-track-btn small {
  flex: 0 0 auto;
  font-size: 9px;
  padding: 1px 4px;
  border-radius: 3px;
  background: rgba(212, 175, 55, .14);
  color: var(--gold-light);
}
.jbc-track-btn:hover { border-color: rgba(212, 175, 55, .45); color: var(--gold-bright); }
.jbc-track-btn.is-on {
  color: #1f1202;
  background: linear-gradient(180deg, #fff1be, #d4af37);
  border-color: #fff6d6;
}
.jbc-track-btn.is-on small {
  background: rgba(31, 18, 2, .18);
  color: #1f1202;
}

/* ===========================================================================
 * 11. 全渠道《品牌与社群中心（Brand & Community Hub）》与三处黄金入口
 * ========================================================================= */

/* 入口 1：主菜单悬浮展柜 */
.brand-showcase-card {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 13px;
  border-radius: 10px;
  background-image:
    url('https://www.transparenttextures.com/patterns/dark-leather.png'),
    linear-gradient(135deg, rgba(44, 32, 16, .94) 0%, rgba(18, 13, 8, .98) 100%);
  background-blend-mode: overlay, normal;
  border: 1.5px solid rgba(212, 175, 55, .58);
  box-shadow:
    inset 0 1px 0 rgba(255, 243, 196, .32),
    0 10px 26px rgba(0, 0, 0, .65),
    0 0 22px rgba(212, 175, 55, .18);
}
.bsc-glow {
  position: absolute;
  inset: -40%;
  background: linear-gradient(115deg, transparent 38%, rgba(255, 243, 196, .16) 50%, transparent 62%);
  animation: bscSweep 5.5s ease-in-out infinite;
  pointer-events: none;
}
@keyframes bscSweep {
  0%, 100% { transform: translate3d(-90%, 0, 0); }
  50% { transform: translate3d(90%, 0, 0); }
}
.bsc-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
  position: relative;
  z-index: 1;
}
.bsc-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: #1f1202;
  background: linear-gradient(160deg, #fff3c4 0%, #d4af37 58%, #8f6816 100%);
  border: 1px solid #fff6d6;
  box-shadow: 0 3px 8px rgba(0, 0, 0, .55);
}
.bsc-icon .ic, .bsc-icon .ph-duotone { color: #1f1202; width: 17px; height: 17px; font-size: 18px; }
.bsc-txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.bsc-txt b {
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bsc-txt span {
  font-size: 10.5px;
  color: var(--ink-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.bsc-actions {
  display: flex;
  gap: 6px;
  flex: 0 0 auto;
  position: relative;
  z-index: 1;
}
.bsc-btn {
  font-family: inherit;
  font-size: 11px;
  font-weight: 900;
  padding: 7px 10px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  transition: transform .08s, filter .15s;
}
.bsc-btn:active { transform: translateY(2px); }
.bsc-btn.shop {
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
  border: 1px solid #fff7d6;
  box-shadow: 0 3px 0 #593b04;
}
.bsc-btn.qq {
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #2d8f56, #195e36);
  border: 1px solid var(--gold);
  box-shadow: 0 3px 0 #0c331c;
}

/* 入口 2：胜利结算面板底部转化横幅 */
.result-brand-banner {
  margin-top: 12px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 9px 12px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11.5px;
  color: var(--ink-dim);
  background: linear-gradient(90deg, rgba(212, 175, 55, .1), rgba(212, 175, 55, .2), rgba(212, 175, 55, .1));
  border: 1px dashed rgba(212, 175, 55, .5);
  cursor: pointer;
  transition: border-color .2s, background .2s, transform .1s;
}
.result-brand-banner .ic { color: var(--gold-light); width: 15px; height: 15px; }
.result-brand-banner b { color: var(--gold-bright); text-shadow: 0 2px 0 #000; }
.result-brand-banner:hover { border-color: var(--gold-bright); background: rgba(212, 175, 55, .24); }
.result-brand-banner:active { transform: translateY(1px); }

/* 入口 3：规则与设置底部低调品牌链接 */
.brand-footer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 9px 11px;
  border-radius: 8px;
  font-size: 11px;
  color: var(--ink-dim);
  background: rgba(212, 175, 55, .08);
  border: 1px solid rgba(212, 175, 55, .26);
  cursor: pointer;
  transition: border-color .2s, background .2s;
}
.brand-footer-link b { color: var(--gold-bright); font-weight: 900; white-space: nowrap; }
.brand-footer-link:hover { border-color: var(--gold-light); background: rgba(212, 175, 55, .16); }

/* 《品牌与社群中心》多标签页弹窗 */
.brand-hub-panel {
  width: min(490px, 100%);
}
.bh-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}
.bh-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding: 4px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .42);
  border: 1px solid rgba(212, 175, 55, .32);
  margin-bottom: 12px;
  flex: 0 0 auto;
}
.bh-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px 6px;
  border-radius: 6px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  color: var(--ink-dim);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: .16s;
  white-space: nowrap;
}
.bh-tab.is-on {
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
  border-color: #fff6d6;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.bh-pane { display: none; }
.bh-pane.is-on { display: block; }
.bh-intro {
  margin: 0 0 10px;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}
.bh-intro b { color: var(--gold-bright); }

/* 双 QQ 群卡片网格 */
.qq-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
@media (max-width: 440px) {
  .qq-grid { grid-template-columns: 1fr; }
}
.qq-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 12px 11px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1.2px solid rgba(212, 175, 55, .36);
  box-shadow: inset 0 1px 0 rgba(255, 243, 196, .14);
}
.qq-tag {
  font-size: 10px;
  font-weight: 900;
  padding: 2px 8px;
  border-radius: 99px;
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
  margin-bottom: 5px;
}
.qq-name {
  font-size: 13px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}
.qq-num-row {
  font-family: var(--font-num);
  font-size: 13px;
  font-weight: 700;
  color: var(--gold-light);
  margin: 3px 0 8px;
  letter-spacing: .5px;
}

/* 二维码展示框（关键：豁免全局 touch-callout: none，允许手机端长按识别二维码！） */
.qr-frame {
  position: relative;
  width: 152px;
  height: 152px;
  padding: 6px;
  border-radius: 10px;
  background: #ffffff;
  border: 2px solid var(--gold);
  box-shadow: 0 6px 18px rgba(0, 0, 0, .55);
  margin-bottom: 6px;
  display: grid;
  place-items: center;
  overflow: hidden;
}
.promo-qr-allow,
.promo-qr-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  border-radius: 6px;
  -webkit-touch-callout: default !important;
  -webkit-user-select: auto !important;
  user-select: auto !important;
  -webkit-user-drag: auto !important;
  pointer-events: auto !important;
}
.qr-fallback-box {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  background: radial-gradient(circle, #241b10 0%, #110c06 100%);
  color: var(--gold-bright);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 8px;
  text-align: center;
}
.qr-fallback-box .ic { width: 32px; height: 32px; color: var(--gold); }
.qr-fallback-box b { font-family: var(--font-num); font-size: 12px; word-break: break-all; }
.qr-fallback-box span { font-size: 9.5px; color: var(--ink-dim); }

.qr-hint {
  font-size: 10px;
  color: var(--ink-dim);
  margin-bottom: 8px;
}
.qq-actions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.qq-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 7px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 900;
  cursor: pointer;
  transition: transform .08s, filter .15s;
}
.qq-btn:active { transform: translateY(2px); }
.qq-btn.copy {
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
  border: 1px solid #fff7d6;
  box-shadow: 0 3px 0 #593b04;
}
.qq-btn.join {
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  background: linear-gradient(180deg, #2d8f56, #195e36);
  border: 1px solid var(--gold);
  box-shadow: 0 3px 0 #0c331c;
}

/* 实体卡牌展柜与抖音展柜 */
.shop-showcase,
.douyin-showcase {
  display: flex;
  flex-direction: column;
  gap: 11px;
}
.shop-hero {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 10px;
  background: rgba(0, 0, 0, .35);
  border: 1px solid rgba(212, 175, 55, .34);
}
.shop-deck-preview {
  width: 78px;
  aspect-ratio: 2 / 3;
  flex: 0 0 auto;
  border-radius: 7px;
  background: radial-gradient(circle, #382816, #140e07);
  border: 1.5px solid var(--gold-light);
  box-shadow:
    2px 2px 0 #d5cab2,
    4px 4px 0 #241d14,
    6px 6px 0 #b7aa8e,
    8px 10px 18px rgba(0, 0, 0, .75);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
  transform: rotate(-4deg);
}
.shop-info { flex: 1 1 auto; min-width: 0; }
.shop-info h3 {
  margin: 0 0 5px;
  font-size: 14px;
  font-weight: 900;
  color: var(--gold-bright);
  text-shadow: 0 2px 0 #000;
}
.shop-info p {
  margin: 0;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-dim);
}
.shop-points {
  margin: 0;
  padding-left: 18px;
  font-size: 11.5px;
  line-height: 1.65;
  color: var(--ink);
}
.shop-points li { margin-bottom: 4px; }
.shop-code-box {
  padding: 9px 11px;
  border-radius: 8px;
  background: rgba(0, 0, 0, .45);
  border: 1px dashed rgba(212, 175, 55, .45);
  font-size: 11px;
  color: var(--gold-light);
  word-break: break-all;
  line-height: 1.5;
}
.shop-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
@media (max-width: 440px) {
  .shop-btn-grid { grid-template-columns: 1fr; }
  .mini-jukebox { max-width: 145px; }
  .jb-marquee { max-width: 68px; }
}

/* ===========================================================================
 * 12. 三层静音按钮 / 战绩海报预览 / 全服排行榜 UI
 * ========================================================================= */
.mute-master-btn {
  position: relative;
}
.mute-master-btn::after {
  content: '';
  position: absolute;
  inset: -6px;
}
.mute-master-btn.muted {
  opacity: .72;
  border-color: rgba(229, 52, 43, .72);
  background: linear-gradient(180deg, rgba(64, 20, 18, .92), rgba(30, 10, 9, .96));
}
.mute-master-btn.muted .ic,
.mute-master-btn.muted .ph-duotone {
  color: #ff6b63;
}
.lobby-mute-fab {
  position: fixed;
  top: calc(12px + env(safe-area-inset-top, 0px));
  right: calc(14px + env(safe-area-inset-right, 0px));
  z-index: 6;
  padding: 6px 11px;
  border-radius: 999px;
}
.stat-pill.rank-pill {
  cursor: pointer;
  border-color: rgba(239, 210, 121, .52);
  background: linear-gradient(180deg, rgba(46, 34, 16, .82), rgba(20, 15, 8, .9));
  transition: transform .1s, border-color .18s;
}
.stat-pill.rank-pill:hover { border-color: var(--gold-bright); transform: translateY(-1px); }

.mute-switch-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.mute-switch-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 9px 11px;
  border-radius: 8px;
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-dim);
  background: rgba(0, 0, 0, .38);
  border: 1px solid rgba(212, 175, 55, .28);
  cursor: pointer;
  transition: .16s;
}
.mute-switch-btn em {
  font-style: normal;
  font-size: 10px;
  font-weight: 900;
  padding: 2px 7px;
  border-radius: 99px;
  background: rgba(255, 255, 255, .1);
  color: var(--ink-dim);
}
.mute-switch-btn.is-on {
  color: var(--gold-bright);
  border-color: var(--gold-light);
  background: rgba(212, 175, 55, .14);
}
.mute-switch-btn.is-on em {
  color: #1f1202;
  background: linear-gradient(180deg, #fff3c4, #d4af37);
}

.poster-gen-btn {
  color: #1f1202;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .45);
  background: linear-gradient(180deg, #fff3c4 0%, #e4b73e 55%, #b58216 100%);
  border-color: #fff7d6;
  box-shadow: inset 0 1px 0 #ffffff, 0 4px 0 #593b04, 0 7px 16px rgba(0, 0, 0, .58);
}
.poster-panel { width: min(410px, 100%); }
.poster-preview-wrap {
  width: min(260px, 66vw);
  margin: 0 auto 4px;
  border-radius: 12px;
  overflow: hidden;
  border: 2px solid var(--gold);
  box-shadow: 0 14px 36px rgba(0, 0, 0, .78);
  background: #0b1c17;
}
.poster-preview-img {
  width: 100%;
  height: auto;
  display: block;
  -webkit-touch-callout: default !important;
  pointer-events: auto !important;
  user-select: auto !important;
  -webkit-user-select: auto !important;
}

.rank-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 9px;
  background: rgba(0, 0, 0, .32);
  border: 1px solid rgba(212, 175, 55, .24);
  margin-bottom: 7px;
}
.rank-num {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 900;
  color: var(--gold-bright);
  background: rgba(212, 175, 55, .14);
  flex: 0 0 auto;
}
.rank-row.top-1 .rank-num { background: linear-gradient(180deg, #fff3c4, #d4af37); color: #1f1202; }
.rank-row.top-2 .rank-num { background: linear-gradient(180deg, #eef2f5, #9aa5b1); color: #111; }
.rank-row.top-3 .rank-num { background: linear-gradient(180deg, #f3c69f, #b86f38); color: #1f1202; }
.rank-ava {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold);
  flex: 0 0 auto;
}
.rank-info { flex: 1 1 auto; min-width: 0; }
.rank-info b {
  display: block;
  font-size: 12.5px;
  color: var(--gold-bright);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rank-info span { font-size: 10.5px; color: var(--ink-dim); }
.rank-score {
  text-align: right;
  flex: 0 0 auto;
  font-family: var(--font-num);
}
.rank-score b { display: block; font-size: 13px; color: var(--gold-light); }
.rank-score small { font-size: 10px; color: var(--ink-dim); }

.stat-pill.ava-pick-pill {
  cursor: pointer;
  padding: 3px 10px 3px 4px;
  border-color: rgba(239, 210, 121, .56);
}
.pill-ava-img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1.5px solid var(--gold-light);
  box-shadow: inset 0 0 6px rgba(0, 0, 0, .8);
}

.avatar-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 10px;
  margin: 8px 0 4px;
}
@media (max-width: 420px) {
  .avatar-grid { grid-template-columns: repeat(4, 1fr); }
}
.avatar-pick-item {
  position: relative;
  aspect-ratio: 1;
  padding: 2px;
  border-radius: 50%;
  background: linear-gradient(160deg, #5e4414, #1e1508);
  border: 2px solid rgba(212, 175, 55, .42);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .6);
  cursor: pointer;
  transition: transform .12s, border-color .18s, box-shadow .18s;
}
.avatar-pick-item img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
}
.avatar-pick-item.is-on {
  border-color: #fff4c8;
  transform: scale(1.08);
  box-shadow: 0 0 0 2px var(--gold), 0 0 18px rgba(212, 175, 55, .8);
}

/* ============================================================================
 * 2~10 人多席位自适应环绕布局 + 抓 UNO + 开局自由出牌 + 罚牌池角标
 * ========================================================================== */
.opponents-ring {
  flex: 0 0 auto;
  width: 100%;
  z-index: 6;
}
.opponents-ring.mode-duel .opp-multi-grid { display: none; }
.opponents-ring:not(.mode-duel) .opp-bar { display: none; }

.opp-multi-grid {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 6px 12px 2px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.opp-multi-grid::-webkit-scrollbar { display: none; }

/* 3~4 人局：中等精致席位卡 */
.opp-seat-card {
  position: relative;
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 10px 5px 6px;
  border-radius: 999px 12px 12px 999px;
  background: linear-gradient(180deg, rgba(28, 22, 15, .92), rgba(14, 10, 7, .96));
  border: 1.2px solid rgba(212, 175, 55, .36);
  box-shadow: inset 0 1px 0 rgba(255, 240, 190, .18), 0 4px 10px rgba(0, 0, 0, .55);
  transition: border-color .22s, box-shadow .22s, transform .22s;
}
.opp-seat-card.is-turn {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 2px rgba(242, 184, 26, .28), 0 0 14px rgba(212, 175, 55, .48);
  transform: translateY(-1px);
}
.opp-seat-card.is-uno {
  border-color: #ff453a;
  box-shadow: 0 0 12px rgba(255, 69, 58, .55);
}

/* 5~10 人局：顶部弧形紧凑徽章矩阵（严格控制高度 <= 62px，为中央牌桌留足 75%+ 空间） */
.opponents-ring.mode-compact .opp-multi-grid {
  justify-content: flex-start;
  gap: 6px;
  padding: 4px 10px 2px;
  min-height: 54px;
  max-height: 62px;
}
@media (min-width: 720px) {
  .opponents-ring.mode-compact .opp-multi-grid {
    justify-content: center;
  }
}
.opponents-ring.mode-compact .opp-seat-card {
  flex-direction: column;
  gap: 2px;
  padding: 4px 7px;
  border-radius: 12px;
  min-width: 56px;
  max-width: 68px;
  height: 56px;
  justify-content: center;
}
.opponents-ring.mode-compact .opp-seat-card .ava-wrap {
  width: 30px;
  height: 30px;
}
.opponents-ring.mode-compact .opp-seat-card .opp-seat-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  line-height: 1;
}
.opponents-ring.mode-compact .opp-seat-card .opp-seat-name {
  font-size: 9.5px;
  max-width: 54px;
  text-align: center;
}
.opponents-ring.mode-compact .opp-seat-card .opp-seat-count-text {
  display: none;
}

.opp-seat-ava-box { position: relative; flex: 0 0 auto; }
.opp-count-badge {
  position: absolute;
  right: -5px;
  bottom: -3px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: linear-gradient(180deg, #2a241b, #14100b);
  border: 1.2px solid rgba(212, 175, 55, .7);
  color: #fff3c4;
  font-family: var(--font-num);
  font-size: 10px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  z-index: 4;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .7);
}
.opp-seat-card.is-uno .opp-count-badge {
  background: linear-gradient(180deg, #ff3b30, #b31217);
  border-color: #ffd5c2;
  color: #fff;
  animation: unoPulse 0.85s ease-in-out infinite;
}

.opp-seat-meta { min-width: 0; }
.opp-seat-name {
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ivory);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 72px;
}
.opp-seat-count-text {
  font-size: 10.5px;
  color: rgba(242, 224, 176, .75);
  font-family: var(--font-num);
}
.opp-uno-safe-tag {
  position: absolute;
  top: -5px;
  left: -4px;
  padding: 1px 5px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f5c94c, #b8860b);
  color: #1c1205;
  font-family: var(--font-num);
  font-size: 8.5px;
  font-weight: 900;
  letter-spacing: .04em;
  z-index: 5;
  box-shadow: 0 2px 6px rgba(0, 0, 0, .6);
}

/* 抓 UNO 警示举报按钮 */
.catch-uno-btn {
  position: relative;
  flex: 0 0 auto;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1.2px solid #ffd5c2;
  background: linear-gradient(180deg, #ff453a, #b31217);
  color: #fff;
  font-family: var(--font-serif-cn);
  font-size: 10.5px;
  font-weight: 900;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 0 12px rgba(255, 69, 58, .75);
  animation: unoPulse .75s ease-in-out infinite;
}
.opponents-ring.mode-compact .catch-uno-btn {
  position: absolute;
  top: -6px;
  right: -6px;
  padding: 2px 5px;
  font-size: 9px;
}

/* 开局无底牌：首家自由出牌光环 */
.discard-open-hint {
  position: absolute;
  inset: 4px;
  border-radius: 10px;
  border: 1.5px dashed rgba(245, 201, 76, .68);
  background: radial-gradient(circle, rgba(212, 175, 55, .18), rgba(10, 26, 20, .55));
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #fff3c4;
  font-family: var(--font-serif-cn);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: .04em;
  pointer-events: none;
  box-shadow: inset 0 0 14px rgba(212, 175, 55, .25);
  transition: opacity .25s ease;
}
.discard-open-hint.is-hidden { opacity: 0; }

/* 累计罚牌池醒目角标 */
.penalty-pool-badge {
  position: absolute;
  top: -8px;
  right: -10px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(180deg, #ff3b30, #9b0f14);
  border: 1.5px solid #ffe0d6;
  color: #fff;
  font-family: var(--font-num);
  font-size: 12px;
  font-weight: 700;
  z-index: 12;
  box-shadow: 0 0 14px rgba(255, 59, 48, .85);
  animation: unoPulse .8s ease-in-out infinite;
}

/* 单人桌台 2~10 人步进器 */
.solo-count-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 4px 6px;
  margin-bottom: 8px;
  border-radius: 10px;
  background: rgba(8, 18, 14, .65);
  border: 1px solid rgba(212, 175, 55, .28);
}
.sc-step {
  width: 28px;
  height: 24px;
  border-radius: 7px;
  border: 1px solid rgba(212, 175, 55, .45);
  background: linear-gradient(180deg, rgba(60, 48, 26, .9), rgba(28, 22, 12, .95));
  color: #fff3c4;
  font-family: var(--font-num);
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}
.sc-step:active { transform: translateY(1px); }
.sc-val {
  font-family: var(--font-serif-cn);
  font-size: 12.5px;
  font-weight: 700;
  color: #fff3c4;
  letter-spacing: .04em;
}

/* 多人联机等待室席位列表 */
.room-roster {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 10px 0;
  max-height: 185px;
  overflow-y: auto;
  text-align: left;
}
.room-roster-item {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px;
  border-radius: 9px;
  background: rgba(16, 28, 22, .8);
  border: 1px solid rgba(212, 175, 55, .25);
  font-size: 12px;
  color: var(--ivory);
}
.room-roster-item img {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid rgba(212, 175, 55, .6);
}
.room-roster-item .rr-tag {
  margin-left: auto;
  font-size: 10px;
  color: var(--gold-light);
}

/* ============================================================================
 * 手机端零卡顿 GPU 减负 & 暖金聚光灯呼吸光晕 & Shimmer 流光 & 自主代号面板
 * ========================================================================== */
.ambient-breathing-glow {
  position: fixed;
  inset: -12%;
  pointer-events: none;
  z-index: 0;
  background: radial-gradient(circle at 50% 42%, rgba(239, 210, 121, .16) 0%, rgba(212, 175, 55, .06) 38%, transparent 72%);
  transform: scale3d(1, 1, 1);
  opacity: .72;
  animation: ambientBreath 6.5s ease-in-out infinite alternate;
  will-change: transform, opacity;
}
@keyframes ambientBreath {
  0%   { opacity: .55; transform: scale3d(.96, .96, 1); }
  100% { opacity: .92; transform: scale3d(1.06, 1.06, 1); }
}

/* 主按钮与席位卡周期性微弱流光扫过（Shimmer）+ 拉丝暗金边框 */
.btn.primary, .seat-card {
  position: relative;
  overflow: hidden;
}
.btn.primary::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg, transparent 35%, rgba(255, 248, 214, .28) 50%, transparent 65%);
  transform: translate3d(-120%, 0, 0);
  animation: btnShimmer 4.8s ease-in-out infinite;
  pointer-events: none;
}
@keyframes btnShimmer {
  0%, 72% { transform: translate3d(-120%, 0, 0); }
  100%    { transform: translate3d(120%, 0, 0); }
}

/* 高清 3D 道具/徽章贴图样式 */
.vinyl-disc-img {
  width: 34px;
  height: 34px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .65));
}
.jbc-vinyl-wrap.is-spinning .vinyl-disc-img {
  animation: spin 3.2s linear infinite;
}
.result-item-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, .6));
}

/* 玩家自主代号输入面板 */
.profile-nick-box {
  margin: 4px 0 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(8, 18, 14, .72);
  border: 1px solid rgba(212, 175, 55, .32);
  text-align: left;
}
.profile-nick-box label {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--gold-light);
  margin-bottom: 6px;
}
.profile-nick-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.profile-nick-input {
  flex: 1 1 auto;
  min-width: 0;
  text-align: left !important;
  padding: 8px 12px !important;
  font-size: 14px !important;
  letter-spacing: .04em !important;
}
.profile-rand-btn {
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 12px;
}
.profile-nick-hint {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-dim);
}
.profile-nick-hint.is-err { color: #ff6b6b; font-weight: 700; }
.profile-nick-hint.is-ok  { color: #6ee7b7; }

/* 手机滚动容器保持原生平滑光栅化（移除全局 translateZ(0) 避免 Android QQ X5 内核大容器纹理分块闪黑） */
.lobby-inner,
.panel,
.panel-scroll,
.hand {
  -webkit-overflow-scrolling: touch;
}

/* 三档自适应画质体系：smooth (省电流畅) | balanced (均衡质感) | ultra (极致全特效) */
body[data-quality="smooth"] .overlay,
body[data-quality="smooth"] .topbar.glass,
body[data-quality="smooth"] .log.glass,
body[data-quality="smooth"] .drawn-prompt.glass,
body[data-quality="balanced"] .overlay {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-quality="smooth"] .overlay,
body[data-quality="balanced"] .overlay {
  background: rgba(5, 11, 9, 0.94);
  transform: none !important;
  transition: opacity 140ms ease, visibility 140ms step-end;
}
body[data-quality="smooth"] .overlay.show,
body[data-quality="balanced"] .overlay.show {
  transform: none !important;
  transition: opacity 140ms ease, visibility 0ms step-start;
}
body[data-quality="smooth"] .ambient-breathing-glow,
body[data-quality="smooth"] .btn.primary::after,
body[data-quality="smooth"] .lobby-compass,
body[data-quality="smooth"] .intro-bg-compass {
  animation: none !important;
}
body[data-quality="smooth"] .ambient-breathing-glow,
body[data-quality="smooth"] .btn.primary::after {
  display: none !important;
}
body[data-quality="balanced"] .ambient-breathing-glow {
  opacity: .55;
  animation-duration: 12s;
}
body[data-quality="balanced"] .lobby-compass,
body[data-quality="balanced"] .intro-bg-compass {
  animation-duration: 90s;
}

/* ============================================================================
 * 显眼读秒胶囊 + 电脑端放大卡牌 + 多排平铺手牌 + 自定义房规面板 + 7-0 换牌
 * ========================================================================== */
.turn-timer-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  height: 26px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(14, 24, 20, .88);
  border: 1.5px solid rgba(212, 175, 55, .6);
  color: var(--gold-bright);
  font-family: var(--font-num);
  font-size: 13.5px;
  font-weight: 700;
  letter-spacing: .04em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .5);
}
.turn-timer-pill.urgent {
  border-color: #ff453a;
  background: linear-gradient(180deg, #b31217, #6e0a0e);
  color: #fff;
  box-shadow: 0 0 12px rgba(255, 69, 58, .8);
  animation: unoPulse .6s ease-in-out infinite;
}
.turn-timer-pill.paused {
  border-color: #60a5fa;
  color: #bfdbfe;
}

/* 电脑宽屏：显著放大中央牌堆与手牌尺寸，清晰呈现原创插画细节 */
@media (min-width: 768px) {
  :root {
    --pile-h: clamp(148px, 28dvh, 276px);
  }
  .hand .card {
    width: clamp(82px, 10vw, 114px);
  }
}

/* 手牌多排平铺模式（一排一排整齐排列，牌多时不遮挡功能牌） */
.hand.grid-rows {
  display: flex !important;
  flex-wrap: wrap !important;
  align-items: flex-start !important;
  justify-content: center !important;
  gap: 8px 6px !important;
  max-height: 36dvh;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  padding: 10px 10px 14px !important;
}
.hand.grid-rows .card {
  margin-left: 0 !important;
  transform: none !important;
}
.hand.grid-rows .card.playable:hover,
.hand.grid-rows .card.playable:active {
  transform: translateY(-6px) scale(1.04) !important;
  z-index: 20 !important;
}

/* 自定义房规折叠面板 */
.house-rules-wrap {
  width: 100%;
  margin: 2px 0 8px;
}
.house-rules-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, .36);
  background: rgba(10, 20, 16, .78);
  color: var(--gold-bright);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.house-rules-toggle small {
  margin-left: auto;
  font-size: 11px;
  color: var(--ink-dim);
  font-weight: 500;
}
.house-rules-drawer {
  display: none;
  margin-top: 6px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(8, 16, 13, .92);
  border: 1px solid rgba(212, 175, 55, .28);
  text-align: left;
  max-height: 210px;
  overflow-y: auto;
}
.house-rules-drawer.open { display: block; }
.hr-item {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink);
  cursor: pointer;
}
.hr-item input[type="checkbox"] {
  margin-top: 2px;
  accent-color: var(--gold);
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}
.hr-item.is-warn span { color: #fcd34d; }

/* 7-0 指定换牌目标列表 */
.swap-target-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.swap-target-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(212, 175, 55, .42);
  background: rgba(14, 28, 22, .85);
  color: var(--ivory);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 700;
  cursor: pointer;
}
.swap-target-btn img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.swap-target-btn small {
  margin-left: auto;
  color: var(--gold-light);
  font-family: var(--font-num);
}

/* 公开资料库彩色立体 3D 游戏图片图标 */
.game-icon-3d {
  width: 24px;
  height: 24px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 5px rgba(0, 0, 0, .65));
}
.pill-icon-3d {
  width: 15px;
  height: 15px;
  object-fit: contain;
  display: block;
  flex: 0 0 auto;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6));
}

/* 消除官方QQ群/实体典藏卡牌/抖音官方号子标签切换瞬间黑块闪烁（常驻纹理层，永不卸载重建） */
.bh-body {
  position: relative;
  min-height: 300px;
  background: #0d1613;
  border-radius: 10px;
  padding: 6px 4px;
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateZ(0);
}
.bh-pane {
  position: absolute;
  left: 4px;
  right: 4px;
  top: 6px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 0;
  height: 0;
  overflow: hidden;
}
.bh-pane.is-on {
  position: relative;
  left: auto;
  right: auto;
  top: auto;
  opacity: 1;
  z-index: 1;
  height: auto;
  overflow: visible;
}
.overlay.show .bh-pane.is-on {
  visibility: visible;
  pointer-events: auto;
}
/* 仅控制隐藏态 .overlay 自身容器（严禁使用 .overlay:not(.show) * 通配重算 600+ 后代） */
.overlay:not(.show) {
  pointer-events: none !important;
  visibility: hidden !important;
}
.overlay:not(.show) .promo-qr-allow,
.overlay:not(.show) .promo-qr-img {
  pointer-events: none !important;
}

/* 多人模式三人合影宽横幅头像，保证 3 个角色全部露出不裁切 */
.seat-ava-trio {
  width: 78px !important;
  height: 44px !important;
  border-radius: 10px !important;
  object-fit: cover !important;
  object-position: center !important;
}

/* 自定义房规预设切换按钮组 */
.hr-presets {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 5px;
  margin-bottom: 8px;
  padding-bottom: 8px;
  border-bottom: 1px solid rgba(212, 175, 55, .2);
}
.hr-preset-btn {
  padding: 5px 4px;
  border-radius: 7px;
  border: 1px solid rgba(212, 175, 55, .32);
  background: rgba(20, 32, 26, .85);
  color: var(--ink-dim);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}
.hr-preset-btn.is-on {
  border-color: var(--gold-light);
  background: linear-gradient(180deg, rgba(212, 175, 55, .32), rgba(138, 103, 29, .22));
  color: #fff3c4;
}

/* ============================================================================
 * 13. 商业级牌桌视觉升级：紧凑顶栏、双堆舞台光影、扇形手牌、悬浮战报、高压罚牌与微材质
 * ========================================================================== */

/* 1. 紧凑顶栏 <= 44px & 系统菜单抽屉 */
.topbar {
  min-height: 40px;
  max-height: 44px;
  flex-wrap: nowrap;
  padding:
    calc(4px + env(safe-area-inset-top, 0px))
    calc(10px + env(safe-area-inset-right, 0px))
    4px
    calc(10px + env(safe-area-inset-left, 0px));
  position: relative;
  z-index: 60;
}
.topbar-right {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: auto;
}
.sys-menu-drawer {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(260px, 84vw);
  padding: 10px;
  border-radius: 12px;
  background: rgba(12, 22, 18, .96);
  border: 1px solid rgba(212, 175, 55, .28);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 14px 36px rgba(0, 0, 0, .65);
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 120;
  backdrop-filter: blur(12px);
}
.sys-menu-drawer[hidden] { display: none !important; }
.sys-menu-drawer .mini-jukebox {
  width: 100%;
  justify-content: space-between;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(212, 175, 55, .18);
}
.sys-menu-actions {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.sys-menu-actions .icon-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}

/* 2. 中央双堆舞台径向光影底座 + 牌桌边缘呼吸光 */
#app {
  box-shadow: inset 0 0 56px color-mix(in srgb, var(--ring-color, #d4af37) 26%, transparent);
  transition: box-shadow .5s ease;
}
.radial-glow-stage {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(440px, 92vw);
  height: min(230px, 34dvh);
  transform: translate3d(-50%, -50%, 0);
  border-radius: 50%;
  background: radial-gradient(ellipse at center, color-mix(in srgb, var(--ring-color, #d4af37) 34%, transparent) 0%, rgba(0, 0, 0, 0) 72%);
  filter: blur(14px);
  pointer-events: none;
  z-index: 0;
  animation: stageBreath 3.4s ease-in-out infinite;
}
@keyframes stageBreath {
  0%, 100% { opacity: .65; transform: translate3d(-50%, -50%, 0) scale(0.98); }
  50% { opacity: .95; transform: translate3d(-50%, -50%, 0) scale(1.04); }
}

/* 3. 动态扇形手牌（<= 8张） + 两段式触摸抬升 & 落牌感应区 */
.hand:not(.grid-rows) .card {
  transform: translateY(var(--fan-y, 0px)) rotate(var(--fan-rot, 0deg));
  transform-origin: 50% 110%;
  transition: transform .18s var(--ease-out-soft), filter .18s;
}
.hand .card.touch-lift {
  transform: translateY(-28px) scale(1.15) !important;
  z-index: 45 !important;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .68), 0 0 0 2px rgba(244, 210, 122, .72);
}
#discard.drop-zone-active {
  outline: 2px dashed rgba(255, 224, 130, .82);
  outline-offset: 8px;
  box-shadow: 0 0 28px rgba(212, 175, 55, .45);
}

/* 4. 轻量悬浮气泡战报（去掉固定深色框，最多2条，3秒后自动向上淡出） */
.log.floating-toast-log {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  pointer-events: none;
  max-height: none;
  padding: 2px 8px;
  transition: opacity .5s ease, transform .5s ease;
}
.log.floating-toast-log .log-head { display: none; }
.log.floating-toast-log .log-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  overflow: visible;
}
.log.floating-toast-log .log-line {
  background: rgba(10, 16, 14, .68);
  border: 1px solid rgba(212, 175, 55, .24);
  border-radius: 999px;
  padding: 3px 12px;
  font-size: 11.5px;
  color: #f4ebd0;
  text-shadow: 0 1px 2px rgba(0, 0, 0, .8);
  white-space: nowrap;
  max-width: min(86vw, 380px);
  overflow: hidden;
  text-overflow: ellipsis;
}
.log.floating-toast-log.is-fading {
  opacity: 0;
  transform: translateY(-10px);
}

/* 5. 高压罚牌警示徽章（>= 4张叠加） & 震屏 */
.penalty-pool-badge.is-high-pressure {
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 900;
  color: #fff8e1;
  background: linear-gradient(135deg, #b83227, #d96b1f);
  border: 1.5px solid #ffd56b;
  box-shadow: 0 0 18px rgba(255, 110, 48, .75), inset 0 1px 0 rgba(255, 255, 255, .45);
  animation: penaltyPulse .65s ease-in-out infinite alternate;
}
@keyframes penaltyPulse {
  from { transform: scale(1); }
  to { transform: scale(1.09); }
}
.board.shake-board {
  animation: boardShake .34s cubic-bezier(.36, .07, .19, .97);
}
@keyframes boardShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-4px, 2px, 0); }
  45% { transform: translate3d(4px, -2px, 0); }
  70% { transform: translate3d(-3px, 1px, 0); }
}

/* 6. 统一卡片容器微材质 + 按钮物理回弹 + 非当前回合头像微暗对比 */
.panel,
.mode-card,
.bh-box,
.qq-card {
  border: 1px solid rgba(212, 175, 55, .22);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .45);
}
button,
.btn,
.icon-btn,
.qq-btn,
.shop-thumb {
  transition: transform .1s ease, filter .15s ease;
}
button:active,
.btn:active,
.icon-btn:active,
.qq-btn:active,
.shop-thumb:active {
  transform: scale(0.95) translateY(1px);
}
.opp-seat-card:not(.is-turn) .ava,
.ava-wrap:not(.active) .ava {
  filter: brightness(0.75);
  transition: filter .25s ease;
}
.opp-seat-card.is-turn .ava,
.ava-wrap.active .ava {
  filter: brightness(1.06);
}

/* 7. 实体周边商品实物图集展示 */
.shop-deck-preview.has-photo {
  padding: 0;
  overflow: hidden;
  width: 92px;
  height: 92px;
  border-radius: 10px;
  border: 1.5px solid rgba(212, 175, 55, .55);
  background: #0d1613;
  flex: 0 0 auto;
}
.shop-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.shop-gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 10px 0 12px;
}
@media (max-width: 520px) {
  .shop-gallery { grid-template-columns: repeat(2, 1fr); }
}
.shop-thumb {
  padding: 4px;
  border-radius: 9px;
  border: 1px solid rgba(212, 175, 55, .24);
  background: rgba(14, 22, 19, .85);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  cursor: pointer;
}
.shop-thumb.is-active {
  border-color: #f3d27a;
  box-shadow: 0 0 12px rgba(212, 175, 55, .36);
}
.shop-thumb img {
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
  border-radius: 6px;
  display: block;
}
.shop-thumb-cap {
  font-size: 11px;
  color: var(--ink-dim);
  line-height: 1.2;
}

/* 8. 不可跳过加载锁定态 & 三档画质细化 & 手机QQ/X5内核防黑块与滚动闪烁加固 */
.intro-skip-btn.is-locked {
  pointer-events: none;
  cursor: default;
  opacity: .86;
}

body[data-quality="smooth"] .sys-menu-drawer,
body[data-quality="smooth"] .floating-toast-log .log-line,
body[data-quality="balanced"] .sys-menu-drawer {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-quality="smooth"] .radial-glow-stage,
body[data-quality="smooth"] .table-compass-svg,
body[data-quality="smooth"] .ring {
  animation: none !important;
  filter: none !important;
}
body[data-quality="smooth"] .radial-glow-stage {
  display: none !important;
}
body[data-quality="smooth"] .panel,
body[data-quality="smooth"] .mode-card,
body[data-quality="smooth"] .bh-box,
body[data-quality="smooth"] .qq-card,
body[data-quality="smooth"] .card {
  box-shadow: 0 4px 12px rgba(0, 0, 0, .4) !important;
}
body[data-quality="balanced"] .radial-glow-stage {
  filter: none !important;
  opacity: .55;
  animation: none !important;
}

/* 手机真机（QQ内置/微信/TBS X5内核）全面禁用易引发 Tile 撕裂黑块的 blend-mode / backdrop-filter / translateZ */
@media (pointer: coarse), (max-width: 768px) {
  .topbar,
  .panel,
  .mode-card,
  .bh-box,
  .bh-body,
  .sys-menu-drawer,
  .overlay,
  .drawn-prompt {
    background-blend-mode: normal !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
  }
  .panel,
  .bh-body,
  .sys-menu-drawer {
    background-image: linear-gradient(180deg, #13241e 0%, #0b1612 100%) !important;
    background-color: #0d1613 !important;
    transform: none !important;
  }
  .bh-body {
    overflow-y: auto;
    min-height: 280px;
    background: #0d1613 !important;
  }
  .bh-pane {
    position: static !important;
    height: auto !important;
    opacity: 1 !important;
    visibility: visible !important;
    display: none !important;
    background: #0d1613;
  }
  .overlay.show .bh-pane.is-on {
    display: block !important;
  }
}

/* 9. 桌面数字强制等宽（消除读秒抖动）+ 变色色盲角标 + 听牌/抓人警铃 + 摊牌亮牌 + 虚位以待席位 */
.turn-timer-pill,
.pile-badge,
.hand-count,
.opp-count,
.opp-count-badge,
.chip,
.stat-val,
.load-pct,
.room-code,
.res-chip b,
.penalty-pool-badge,
#bgmVal,
#sfxVal {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum" 1;
}

/* 弃牌堆右上角：色盲友好花色角标 + 中央桌面轮转指针随花色同步变色 */
.pile-wrap {
  position: relative;
}
.wild-color-badge {
  position: absolute;
  top: -10px;
  right: -10px;
  z-index: 12;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, .72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, .55);
  pointer-events: none;
}
.wild-color-badge[hidden] { display: none !important; }
.wild-color-badge.c-red    { background: linear-gradient(135deg, #c43a33, #871c17); }
.wild-color-badge.c-yellow { background: linear-gradient(135deg, #d49e2a, #96680f); color: #261600; border-color: rgba(255, 245, 200, .85); }
.wild-color-badge.c-green  { background: linear-gradient(135deg, #2a8c4a, #155c2d); }
.wild-color-badge.c-blue   { background: linear-gradient(135deg, #2a5eb5, #163a7a); }
.wild-color-badge.is-wild-call {
  animation: wildCallGlow 1.3s ease-in-out infinite alternate;
}
@keyframes wildCallGlow {
  from { transform: scale(1); }
  to { transform: scale(1.08); box-shadow: 0 0 14px rgba(255, 240, 180, .75); }
}
.table-compass-svg .compass-dual-arrows path {
  stroke: var(--ring-color, #d4af37);
  transition: stroke .4s ease;
}
.table-compass-svg .compass-dual-arrows polygon {
  fill: var(--ring-color, #fff3c4);
  transition: fill .4s ease;
}

/* 剩 1 张牌：已喊 FNO 暗金警戒流光 vs 未喊 FNO 红色波纹抓人警铃 */
.ava-wrap.uno-safe .ava {
  border-color: #f4c84a !important;
  box-shadow: 0 0 16px rgba(244, 200, 74, .85), 0 0 28px rgba(212, 175, 55, .5) !important;
  animation: unoGoldBurn 1.2s ease-in-out infinite alternate;
}
@keyframes unoGoldBurn {
  from { box-shadow: 0 0 12px rgba(244, 200, 74, .75), 0 0 22px rgba(212, 175, 55, .4); }
  to { box-shadow: 0 0 22px rgba(255, 224, 118, .98), 0 0 36px rgba(240, 170, 40, .75); }
}
.catch-uno-btn.is-bell-alert {
  position: relative;
  display: inline-flex !important;
  align-items: center;
  gap: 3px;
  padding: 4px 9px;
  border-radius: 999px;
  background: linear-gradient(135deg, #d9382e, #9c1710);
  color: #fff;
  font-weight: 900;
  border: 1.5px solid #ffd2cc;
  box-shadow: 0 0 12px rgba(235, 58, 48, .85);
  animation: bellRipple 1s ease-out infinite;
}
@keyframes bellRipple {
  0% { box-shadow: 0 0 0 0 rgba(235, 58, 48, .75); transform: scale(1); }
  70% { box-shadow: 0 0 0 10px rgba(235, 58, 48, 0); transform: scale(1.06); }
  100% { box-shadow: 0 0 0 0 rgba(235, 58, 48, 0); transform: scale(1); }
}

/* 结算前 1.2s 全员摊牌亮牌 */
.opp-showdown-cards {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-top: 4px;
  flex-wrap: nowrap;
}
.opp-showdown-cards .card {
  width: 24px !important;
  height: 36px !important;
  min-width: 24px !important;
  border-radius: 4px !important;
  pointer-events: none;
}
.opp-showdown-more {
  font-size: 10px;
  color: var(--gold-light);
  font-weight: 700;
  margin-left: 2px;
}
.card.showdown-reveal {
  animation: showdownFlip .35s cubic-bezier(.2, 1.3, .4, 1) both;
}
@keyframes showdownFlip {
  from { transform: scaleX(0.2) scaleY(1.05); opacity: .5; }
  to { transform: scaleX(1) scaleY(1); opacity: 1; }
}

/* 联机等待房：虚位以待空牌位 + 好友拍桌入座缩放回弹 */
.room-roster.seat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}
.lobby-seat-slot.is-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  min-height: 54px;
  padding: 6px 8px;
  border-radius: 10px;
  border: 1.5px dashed rgba(212, 175, 55, .42);
  background: rgba(16, 28, 24, .55);
  color: var(--gold-light);
  cursor: pointer;
}
.lobby-seat-slot.is-empty .seat-plus {
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  animation: plusBreath 1.8s ease-in-out infinite;
}
.lobby-seat-slot.is-empty .seat-empty-tip {
  font-size: 10.5px;
  color: var(--ink-dim);
}
@keyframes plusBreath {
  0%, 100% { opacity: .45; transform: scale(0.95); }
  50% { opacity: 1; transform: scale(1.12); }
}
.lobby-seat-slot.seat-slam-in {
  animation: seatSlam .36s cubic-bezier(.2, 1.45, .36, 1) both;
}
@keyframes seatSlam {
  0% { transform: scale(1.2); opacity: .4; }
  70% { transform: scale(0.97); opacity: 1; }
  100% { transform: scale(1); opacity: 1; }
}

/* 10. P1 黑闪与 CLS 治理：黑曜胡桃木底色对齐 + 省电(eco)档位 + 标题防回流 min-height */
html, body {
  background-color: #0b0b0f;
}
.brand,
.panel h2,
.lobby-hero-title {
  min-height: 1.35em;
}
body[data-quality="eco"] .overlay,
body[data-quality="eco"] .topbar.glass,
body[data-quality="eco"] .sys-menu-drawer,
body[data-quality="eco"] .floating-toast-log .log-line {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-quality="eco"] .radial-glow-stage,
body[data-quality="eco"] .ambient-breathing-glow,
body[data-quality="eco"] .btn.primary::after,
body[data-quality="eco"] .table-compass-svg,
body[data-quality="eco"] .ring {
  animation: none !important;
  display: none !important;
}
body[data-quality="eco"] .panel,
body[data-quality="eco"] .mode-card,
body[data-quality="eco"] .bh-box,
body[data-quality="eco"] .qq-card,
body[data-quality="eco"] .card {
  box-shadow: none !important;
}
.hand .card {
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

/* 11. 手机端按钮防溢出适配 + 独立画质按钮与网格菜单修复 */
.lobby-top-fabs {
  position: fixed;
  top: calc(10px + env(safe-area-inset-top, 0px));
  right: calc(10px + env(safe-area-inset-right, 0px));
  max-width: calc(100vw - 20px);
  display: flex;
  align-items: center;
  gap: 6px;
  z-index: 30;
}
.lobby-top-fabs .lobby-mute-fab {
  position: static !important;
}
.lobby-quality-fab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(12, 20, 17, .88);
  border: 1px solid rgba(212, 175, 55, .42);
  color: var(--gold-bright);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}
.sys-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
}
.sys-menu-grid .icon-btn {
  width: 100%;
  justify-content: flex-start;
  gap: 6px;
  padding: 7px 10px;
  font-size: 12px;
  border-radius: 8px;
}
.sys-menu-drawer {
  right: 4px;
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}
.quality-seg {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
@media (max-width: 560px) {
  .topbar {
    gap: 4px;
    padding:
      calc(4px + env(safe-area-inset-top, 0px))
      calc(8px + env(safe-area-inset-right, 0px))
      4px
      calc(8px + env(safe-area-inset-left, 0px));
    max-width: 100vw;
    box-sizing: border-box;
  }
  .topbar #modeChip,
  .topbar #deckChip,
  .topbar #rttChip {
    display: none !important;
  }
  .topbar-right {
    flex-shrink: 0;
    gap: 4px;
  }
  .topbar .icon-btn {
    padding: 5px 6px;
    min-width: 30px;
  }
  .lobby-dock {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    gap: 4px;
    padding: 5px 4px;
  }
  .dock-btn {
    min-width: 0;
    padding: 6px 2px;
  }
  .dock-lbl {
    font-size: 11px;
    white-space: nowrap;
  }
  .quality-seg {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* 12. 手机流畅/省电档全局剥离高开销 blur/shadow/filter + 显眼画质胶囊 + 全按钮零超屏 */
body[data-quality="smooth"] *,
body[data-quality="eco"] * {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}
body[data-quality="smooth"] .panel,
body[data-quality="smooth"] .mode-card,
body[data-quality="smooth"] .bh-box,
body[data-quality="smooth"] .qq-card,
body[data-quality="smooth"] .card,
body[data-quality="eco"] .panel,
body[data-quality="eco"] .mode-card,
body[data-quality="eco"] .bh-box,
body[data-quality="eco"] .qq-card,
body[data-quality="eco"] .card {
  box-shadow: 0 2px 8px rgba(0, 0, 0, .35) !important;
  filter: none !important;
}
body[data-quality="smooth"] .overlay,
body[data-quality="balanced"] .overlay,
body[data-quality="eco"] .overlay {
  background: rgba(5, 9, 8, .76) !important;
}
.jukebox-card,
.jbc-list {
  max-width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}
.stat-pill.quality-pill {
  cursor: pointer;
  border: 1px solid rgba(244, 200, 74, .55);
  background: linear-gradient(180deg, rgba(46, 36, 14, .88), rgba(20, 16, 8, .92));
  color: #ffe8a3;
  font-weight: 700;
}
@media (max-width: 560px) {
  .lobby-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: 5px;
    max-width: 100%;
  }
  .hand-head {
    flex-wrap: wrap;
    gap: 4px;
    padding: 4px 8px;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .controls {
    max-width: 100vw;
    padding: 4px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    box-sizing: border-box;
    gap: 6px;
  }
  .controls .btn {
    min-width: 0;
    flex: 1 1 0;
    padding: 9px 6px;
    font-size: 13px;
  }
  .sort-group {
    flex-wrap: wrap;
    gap: 3px;
  }
  .sort-btn {
    padding: 3px 6px;
    font-size: 11px;
  }
}

/* 13. 线上手机端实测 UI 缺陷修复：显式展示按钮文字、胶囊防竖排、唱片曲目单列防超屏 */
.lobby-top-fabs {
  gap: 8px;
}
.lobby-quality-fab .lbl,
.lobby-mute-fab .lbl,
.sys-menu-grid .icon-btn .lbl {
  display: inline !important;
  white-space: nowrap;
}
.lobby-stats .stat-pill {
  white-space: nowrap;
  flex: 0 0 auto;
}
@media (max-width: 560px) {
  .jbc-list {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 6px !important;
    overflow-x: hidden !important;
  }
  .jbc-track-btn {
    width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
  }
}

/* 14. 超显眼牌桌中央倒计时 + 放大对手动物头像 + 放大核心交互按钮热区 */
.board-timer-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 14px;
  border-radius: 999px;
  font-family: var(--font-num);
  font-variant-numeric: tabular-nums;
  font-size: 14px;
  font-weight: 900;
  color: #fff3c4;
  background: rgba(12, 22, 18, .86);
  border: 1.5px solid rgba(212, 175, 55, .6);
  box-shadow: 0 4px 14px rgba(0, 0, 0, .5);
  z-index: 15;
}
.board-timer-badge[hidden] { display: none !important; }
.board-timer-badge.is-mine {
  background: linear-gradient(135deg, rgba(42, 34, 12, .94), rgba(20, 16, 6, .94));
  border-color: #f4d06b;
  color: #fff8dc;
}
.board-timer-badge.urgent {
  background: linear-gradient(135deg, #c43a33, #8a1812);
  border-color: #ffd0c9;
  color: #ffffff;
  font-size: 16px;
  box-shadow: 0 0 18px rgba(235, 58, 48, .75);
  animation: timerUrgentPulse .55s ease-in-out infinite alternate;
}
@keyframes timerUrgentPulse {
  from { transform: scale(1); }
  to { transform: scale(1.08); }
}
.turn-timer-pill {
  min-width: 52px !important;
  padding: 4px 10px !important;
  font-size: 14px !important;
  font-weight: 900 !important;
  border-width: 1.5px !important;
}

/* 放大对手动物头像（3~4人 52px / 5~10人 42px / 2人 64px） */
.ava-wrap.sm {
  width: 52px !important;
  height: 52px !important;
}
.ava-wrap.sm .ava {
  width: 46px !important;
  height: 46px !important;
}
.opponents-ring.mode-compact .opp-seat-card .ava-wrap {
  width: 42px !important;
  height: 42px !important;
}
.opponents-ring.mode-compact .opp-seat-card .ava-wrap .ava {
  width: 36px !important;
  height: 36px !important;
}
.mode-duel .opp-plaque .ava-wrap {
  width: 64px !important;
  height: 64px !important;
}
.mode-duel .opp-plaque .ava-wrap .ava {
  width: 58px !important;
  height: 58px !important;
}
.opp-seat-name {
  font-size: 12.5px !important;
}
.opp-seat-count-text {
  font-size: 11.5px !important;
}

/* 放大过小的交互按钮热区与字号 */
.topbar .icon-btn {
  min-width: 36px;
  min-height: 34px;
  padding: 5px 8px;
  font-size: 16px;
}
.sort-btn,
.hand-layout-btn,
.chat-btn {
  min-height: 30px;
  padding: 5px 10px !important;
  font-size: 12.5px !important;
}
.controls .btn {
  min-height: 46px;
  font-size: 15.5px;
  padding: 10px 16px;
}
.sys-menu-grid .icon-btn {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 13px;
}

/* 15. 彻底修复按钮遮挡与大厅胶囊/中央倒计时美化 */
.lobby-top-fabs .lobby-mute-fab,
.lobby-top-fabs .lobby-quality-fab {
  position: relative !important;
  top: auto !important;
  right: auto !important;
  left: auto !important;
  bottom: auto !important;
  flex: 0 0 auto !important;
}
.hand-head {
  position: relative;
  z-index: 40;
  border-top: 1px solid rgba(212, 175, 55, .16);
  background: linear-gradient(180deg, rgba(10, 18, 15, .52), transparent);
}
.hand .card.touch-lift {
  transform: translateY(-20px) scale(1.10) !important;
  z-index: 35 !important;
}
.board-timer-badge {
  width: fit-content;
  max-width: 240px;
  margin: 4px auto 2px;
  justify-self: center;
  align-self: center;
}

/* 16. 手牌左右翻页箭头 + hand-head 防头像溢出 + 牌桌四周雕花与筹码装饰 */
.hand-head {
  height: auto !important;
  min-height: 56px !important;
  padding: 4px 10px !important;
  align-items: center !important;
}
.hand-stage {
  position: relative;
  width: 100%;
}
.hand-nav-btn {
  position: absolute;
  top: 54%;
  transform: translateY(-50%);
  z-index: 38;
  width: 28px;
  height: 52px;
  border-radius: 999px;
  border: 1px solid rgba(212, 175, 55, .45);
  background: rgba(10, 18, 15, .76);
  color: #f4d984;
  display: grid;
  place-items: center;
  font-size: 16px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
  opacity: .82;
}
.hand-nav-btn:hover { opacity: 1; border-color: #ffe8a3; }
.hand-nav-btn.prev { left: 4px; }
.hand-nav-btn.next { right: 4px; }

.table-decor-corner {
  position: absolute;
  width: 72px;
  height: 72px;
  pointer-events: none;
  opacity: .42;
  z-index: 1;
}
.table-decor-corner.tl { top: 46px; left: 4px; }
.table-decor-corner.tr { top: 46px; right: 4px; transform: scaleX(-1); }
.table-decor-chips {
  position: absolute;
  left: 12px;
  bottom: 180px;
  width: 68px;
  height: 68px;
  pointer-events: none;
  opacity: .5;
  z-index: 1;
}
@media (max-width: 560px) {
  .table-decor-corner { width: 44px; height: 44px; opacity: .32; }
  .table-decor-chips { width: 42px; height: 42px; left: 4px; bottom: 168px; opacity: .36; }
}
body[data-quality="eco"] .table-decor-corner,
body[data-quality="eco"] .table-decor-chips {
  display: none !important;
}

/* 17. 修复中央 .board 网格对齐、悬浮战报气泡截断与桌面端正中对称 */
.board {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
  justify-items: center;
  align-items: center;
}
.banner,
.board-timer-badge,
.piles,
.log.floating-toast-log {
  grid-column: 1 / -1 !important;
  grid-row: auto !important;
}
.log.floating-toast-log {
  overflow: visible !important;
  height: auto !important;
  min-height: 0 !important;
  padding: 4px 8px !important;
  margin-top: 2px;
  z-index: 22;
}
.log.floating-toast-log .log-body {
  overflow: visible !important;
  height: auto !important;
  padding: 2px 4px !important;
  gap: 6px !important;
}
.log.floating-toast-log .log-line {
  line-height: 1.5 !important;
  padding: 5px 14px !important;
  max-width: min(92vw, 440px) !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .45);
}

/* 18. 6~10 人紧凑席位自动双排居中不裁半张脸 */
.opponents-ring.mode-compact .opp-multi-grid {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: center !important;
  max-height: none !important;
  overflow: visible !important;
  gap: 5px !important;
  padding: 4px 6px !important;
}

/* 19. 结算徽章（胜利皇冠金杯 / 失败银蓝盾牌）入场动画与光环 */
.result-emoji {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 108px;
  height: 108px;
  margin: 0 auto 8px;
}
.result-badge-img {
  width: 96px;
  height: 96px;
  object-fit: contain;
  display: block;
}
.result-badge-img.is-win {
  filter: drop-shadow(0 6px 18px rgba(244, 200, 74, .65));
  animation: resultBadgeWin .65s cubic-bezier(.2, 1.45, .36, 1) both, badgeFloat 2.6s ease-in-out .65s infinite alternate;
}
.result-badge-img.is-lose {
  filter: drop-shadow(0 6px 16px rgba(120, 170, 230, .5));
  animation: resultBadgeLose .55s cubic-bezier(.22, 1, .36, 1) both, badgeFloat 3.2s ease-in-out .55s infinite alternate;
}
@keyframes resultBadgeWin {
  0% { transform: scale(0.3) rotate(-18deg); opacity: 0; }
  65% { transform: scale(1.12) rotate(4deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes resultBadgeLose {
  0% { transform: scale(0.5) translateY(-16px); opacity: 0; }
  100% { transform: scale(1) translateY(0); opacity: 1; }
}
@keyframes badgeFloat {
  from { transform: translateY(0); }
  to { transform: translateY(-5px); }
}

/* 20. 胜负双态结算过场动画（Settlement Cinematics） */
.cine-overlay {
  position: fixed;
  inset: 0;
  z-index: 95;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  cursor: pointer;
}
.cine-overlay.is-win {
  background: radial-gradient(circle at 50% 45%, rgba(28, 86, 66, .75), rgba(4, 10, 8, .92));
}
.cine-overlay.is-lose {
  background: radial-gradient(circle at 50% 45%, rgba(56, 20, 28, .78), rgba(6, 6, 10, .94));
  animation: cineMicroShake .42s ease-out;
}
@keyframes cineMicroShake {
  0%, 100% { transform: translate3d(0, 0, 0); }
  20% { transform: translate3d(-4px, 2px, 0); }
  45% { transform: translate3d(4px, -3px, 0); }
  70% { transform: translate3d(-3px, 1px, 0); }
}
.cine-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.cine-shockwave {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 160px;
  height: 160px;
  margin: -80px 0 0 -80px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
}
.cine-overlay.is-win .cine-shockwave {
  border: 4px solid rgba(253, 230, 138, .85);
  box-shadow: 0 0 40px rgba(253, 230, 138, .65);
  animation: cineWave 1s cubic-bezier(.16, 1, .3, 1) forwards;
}
@keyframes cineWave {
  0% { transform: scale(0.3); opacity: 0.95; }
  100% { transform: scale(5.2); opacity: 0; }
}
.cine-center {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 16px;
}
.cine-halo {
  position: absolute;
  width: 220px;
  height: 220px;
  top: -24px;
  border-radius: 50%;
  pointer-events: none;
}
.cine-overlay.is-win .cine-halo {
  background: conic-gradient(from 0deg, rgba(253,230,138,.28), transparent 22%, rgba(253,230,138,.24) 48%, transparent 72%, rgba(253,230,138,.28));
  animation: haloSpin 8s linear infinite;
}
@keyframes haloSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}
.cine-badge-wrap {
  position: relative;
  width: 128px;
  height: 128px;
  display: grid;
  place-items: center;
  animation: cineBadgePop .6s cubic-bezier(.2, 1.45, .36, 1) both;
}
@keyframes cineBadgePop {
  from { transform: scale(0.35); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.cine-main-img {
  width: 108px;
  height: 108px;
  object-fit: contain;
}
.cine-crown-img {
  position: absolute;
  top: -18px;
  width: 46px;
  height: 46px;
  object-fit: contain;
}
.cine-title {
  margin-top: 12px;
  font-family: var(--font-serif-cn);
  font-size: clamp(24px, 6vw, 38px);
  font-weight: 900;
  letter-spacing: 2px;
  text-shadow: 0 4px 14px rgba(0, 0, 0, .8);
}
.cine-overlay.is-win .cine-title {
  color: #fde68a;
}
.cine-overlay.is-lose .cine-title {
  color: #cbd5e1;
}
.cine-sub {
  margin-top: 6px;
  font-size: 13.5px;
  color: #e2e8f0;
  max-width: 82vw;
}
.cine-skip-tip {
  margin-top: 22px;
  font-size: 11px;
  color: rgba(255, 255, 255, .52);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
