/* 牌桌游戏(21 点、Pontoon、三张扑克)画面 —— 照老板 11-08 定的整页设计稿(output/牌桌荷官概念-1108/pages/bj.png、pt.png)。
   底图 = 设计稿去掉荷官和界面的空白底板,上半画面区放荷官(男女 x 三个姿势);其余界面全部 CSS,照设计稿像素位置摆:
   --u = 一个设计像素(设计稿 1520 宽),位置都写成 calc(var(--u) * 设计像素)。
   每个游戏自己的世界:21 点 = 1950 年代泳池夜店(薄荷绿 + 粉红霓虹 + 金边、圆体数字);
   Pontoon = 婆罗洲雨林树屋(深色硬木 + 祖母绿 + 金箔、衬线金字)。
   太小的东西(按钮、字)有最小尺寸:手机 360–520 宽都按得到、看得清。 */
.ct {
  --w: min(100vw, var(--app-max-width, 520px));
  --u: calc(var(--w) / 1520);
  --ct-ink: #fff; --ct-dim: #d9d3e6; --ct-gold: #f3cf73; --ct-gold-2: #c9952f; --ct-red: #e2384d; --ct-card: #fdfcf8;
  position: fixed; inset: 0; z-index: 40; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  /* Telegram 全屏时上面那截是它自己的返回 / ⋯ 键(--safe-t):整张牌桌从那下面开始,顶栏才不会压到荷官的头;那一截涂成画面顶端的颜色 */
  padding-top: var(--safe-t, 0px);
  background: linear-gradient(180deg, var(--ct-sky, #0b0b10) 0, var(--ct-sky, #0b0b10) var(--safe-t, 0px), var(--ct-outside, #0b0b10) var(--safe-t, 0px)); color: var(--ct-ink);
  font: 14px/1.3 var(--ct-font, system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.ct[hidden] { display: none; }
.ct :where(p, h1, h3, ul) { margin: 0; }
:where(.ct) :where(button) { appearance: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit; background: none; cursor: pointer; }
.ct button:focus-visible { outline: 2px solid var(--ct-gold); outline-offset: 2px; }
.ct button > *, .ct button * { pointer-events: none; }
.ct img { -webkit-user-drag: none; pointer-events: none; }

/* ---------- 每个游戏的世界 ---------- */
.ct-blackjack {
  --ct-outside: #120d1c;
  --ct-sky: #1e2536;
  --ct-floor: #6e4a4c;
  --ct-font: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --ct-num: ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", "Nunito", system-ui, sans-serif;
  --ct-accent: #ff6fb0; --ct-accent-2: #3fd3a6;
  --ct-panel: linear-gradient(180deg, rgba(14, 44, 47, .9), rgba(8, 28, 32, .92));
  --ct-panel-edge: #e9c46a;
  --ct-pill: rgba(16, 14, 36, .82);
  --ct-pill-edge: #ff7ac0;
  --ct-pill-glow: 0 0 calc(var(--u) * 18) rgba(255, 95, 162, .75), inset 0 0 calc(var(--u) * 10) rgba(255, 95, 162, .35);
  --ct-me-glow: 0 0 0 2px #ff8fc8, 0 0 calc(var(--u) * 40) rgba(255, 95, 162, .85);
  --ct-turn-glow: 0 0 0 2px #ffe08a, 0 0 calc(var(--u) * 34) rgba(255, 216, 102, .8);
  --ct-back-bg: radial-gradient(circle at 35% 30%, #69e6c1, #17a07a 70%);
  --ct-btn-text: #fff;
  --ct-cardback: repeating-linear-gradient(45deg, #f7a8c6 0 3px, #ef8ab3 3px 6px), #f39bbf;
  --ct-cardback-edge: #fff;
  --dtag-y: 1168; --status-y: 2178; --dock-y: 2318;
}
.ct-pontoon {
  --ct-outside: #0b0703;
  --ct-sky: #56370a;
  --ct-floor: #2a1806;
  --ct-font: system-ui, -apple-system, "PingFang SC", "Noto Sans SC", sans-serif;
  --ct-num: "Cinzel", "Trajan Pro", Georgia, "Times New Roman", serif;
  --ct-accent: #f3cf73; --ct-accent-2: #2aa36b;
  --ct-panel: linear-gradient(180deg, rgba(52, 31, 16, .94), rgba(26, 15, 7, .95));
  --ct-panel-edge: #d9ad55;
  --ct-pill: linear-gradient(180deg, #164a33, #0b2c1e);
  --ct-pill-edge: #e2b85e;
  --ct-pill-glow: 0 calc(var(--u) * 6) calc(var(--u) * 18) rgba(0, 0, 0, .55), inset 0 0 0 calc(var(--u) * 5) rgba(10, 40, 26, .9), inset 0 0 0 calc(var(--u) * 7) rgba(226, 184, 94, .5);
  --ct-me-glow: 0 0 0 2px #ffd977, 0 0 calc(var(--u) * 40) rgba(255, 196, 70, .85);
  --ct-turn-glow: 0 0 0 2px #ffd977, 0 0 calc(var(--u) * 34) rgba(255, 196, 70, .75);
  --ct-back-bg: radial-gradient(circle at 35% 30%, #2f6e4c, #0d2f1f 75%);
  --ct-btn-text: #fff7e0;
  --ct-cardback: radial-gradient(circle at 50% 50%, rgba(226, 184, 94, .55) 0 18%, transparent 19%), repeating-linear-gradient(45deg, #13583b 0 4px, #0e4a31 4px 8px), #0f4d33;
  --ct-cardback-edge: #e2b85e;
  --dtag-y: 1290; --status-y: 2310; --dock-y: 2450;
}

/* ---------- 舞台:设计稿那一页 ---------- */
.ct-stage {
  position: relative; width: var(--w); margin: 0 auto;
  min-height: max(100%, calc(var(--u) * 2688));
  background: var(--ct-floor) no-repeat top center / 100% auto;
}
.ct-blackjack .ct-stage { background-image: url('/img/blackjack/plate.webp?v=1'); }
.ct-pontoon .ct-stage { background-image: url('/img/pontoon/plate.webp?v=1'); }
.ct-stage::after {
  content: ''; position: absolute; left: 0; right: 0; top: calc(var(--u) * 2388); height: calc(var(--u) * 300); pointer-events: none;
  background: linear-gradient(180deg, transparent, var(--ct-floor));
}
.ct-hero { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1 / 1; pointer-events: none; }
.ct-pose { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .32s ease-out; }
.ct-pose.is-on { opacity: 1; }
/* 荷官影片:只盖荷官 + 桌边(21 点到 1080 座标 y 940、Pontoon 到 1000),最后一截渐隐接回静态图 / 底板 ——
   渐隐要在手套下面(手离开桌边时底下静态图的手套才不会透出来);载好才淡入,动作播完淡出接回待机 */
.ct-blackjack { --vid-h: 940; --vid-fade: 95.2%; }
.ct-pontoon { --vid-h: 1000; --vid-fade: 96%; }
.ct-vid {
  position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1080 / var(--vid-h, 940); opacity: 0; transition: opacity .3s; pointer-events: none;
  -webkit-mask-image: linear-gradient(#000 var(--vid-fade, 95%), transparent); mask-image: linear-gradient(#000 var(--vid-fade, 95%), transparent);
}
.ct-vid.is-live { opacity: 1; }
.ct-vid video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: fill; display: block; }
.ct-vid video.is-act { opacity: 0; transition: opacity .22s ease-out; }
.ct-vid video.is-act.is-on { opacity: 1; }
@media (prefers-reduced-motion: reduce) { .ct-pose { transition: none; } }

/* ---------- 顶栏 ---------- */
.ct-top {
  position: absolute; z-index: 5; left: calc(var(--u) * 30); right: calc(var(--u) * 30); top: calc(var(--u) * 28);
  display: flex; align-items: center; gap: max(6px, calc(var(--u) * 22));
}
.ct-back {
  flex: none; width: max(40px, calc(var(--u) * 120)); height: max(40px, calc(var(--u) * 120)); border-radius: 50%;
  display: grid; place-items: center; background: var(--ct-back-bg); border: 2px solid var(--ct-gold);
  box-shadow: 0 3px 8px rgba(0, 0, 0, .45), inset 0 2px 0 rgba(255, 255, 255, .35);
  font-size: 26px; font-weight: 900; line-height: 1; color: #fff;
}
.ct-back span { transform: translate(-1px, -2px); }
/* 音符按钮(有配乐才出现) */
.ct-music {
  flex: none; width: max(34px, calc(var(--u) * 100)); height: max(34px, calc(var(--u) * 100)); border-radius: 50%; display: grid; place-items: center;
  background: var(--ct-pill); border: 2px solid var(--ct-gold); color: #fff; box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.ct-pontoon .ct-music { color: var(--ct-gold); }
.ct-music svg { width: 55%; height: 55%; }
.ct-music[aria-pressed="false"] { opacity: .6; }
.ct-title {
  flex: 1; min-width: 0; height: max(38px, calc(var(--u) * 110)); display: grid; place-items: center; padding: 0 10px;
  border-radius: 999px; background: var(--ct-pill); border: 2px solid var(--ct-pill-edge); box-shadow: var(--ct-pill-glow);
  font-family: var(--ct-num); font-size: max(18px, calc(var(--u) * 70)); font-weight: 900; letter-spacing: .04em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ct-pontoon .ct-title {
  background-color: #0b2c1e; color: var(--ct-gold);
  background-image: linear-gradient(180deg, #164a33, #0b2c1e);
  text-shadow: 0 1px 0 #6b4a12, 0 2px 4px rgba(0, 0, 0, .6);
}
.ct-chip-btn {
  flex: none; min-height: max(34px, calc(var(--u) * 100)); padding: 0 max(10px, calc(var(--u) * 30)); border-radius: 999px;
  background: linear-gradient(180deg, #2fbf92, #127a5c); border: 2px solid var(--ct-gold); color: #fff;
  font-size: max(13px, calc(var(--u) * 46)); font-weight: 800; box-shadow: 0 2px 6px rgba(0, 0, 0, .4), inset 0 1px 0 rgba(255, 255, 255, .3);
}
.ct-pontoon .ct-chip-btn { background: linear-gradient(180deg, #1a5a3d, #0b2c1e); color: var(--ct-gold); }
.ct-chip-btn:disabled { opacity: .45; }
.ct-chip-btn.ct-small { min-height: 30px; padding: 0 12px; font-size: 12px; }
.ct-balpill {
  flex: none; max-width: 34%; display: inline-flex; align-items: center; gap: 5px; min-height: max(34px, calc(var(--u) * 100));
  padding: 0 max(10px, calc(var(--u) * 26)) 0 max(6px, calc(var(--u) * 14)); border-radius: 999px;
  background: rgba(10, 10, 20, .78); border: 2px solid var(--ct-gold); box-shadow: 0 2px 6px rgba(0, 0, 0, .45);
}
.ct-pontoon .ct-balpill { background: rgba(8, 30, 20, .88); }
.ct-balpill b { font-family: var(--ct-num); font-size: max(13px, calc(var(--u) * 44)); font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }

/* 顶栏下面一行:离开 / 回大厅、这一桌每注多少、荷官交班 */
.ct-sub {
  position: absolute; z-index: 5; left: calc(var(--u) * 30); right: calc(var(--u) * 30); top: calc(var(--u) * 28 + max(46px, calc(var(--u) * 140)));
  display: flex; align-items: center; gap: 6px; flex-wrap: wrap;
}
.ct-limit { padding: 3px 9px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: 11px; font-family: var(--ct-num); color: var(--ct-gold); }
.ct-roomtag { padding: 3px 10px; border-radius: 999px; background: rgba(0, 0, 0, .55); border: 1px solid var(--ct-room-edge, var(--ct-gold)); font-size: 11px; font-weight: 800; white-space: nowrap; }
.ct-roomtag.is-vip { border-color: #f3cf73; color: #f3cf73; }
.ct-shift { padding: 3px 10px; border-radius: 999px; background: var(--ct-gold); color: #3b2600; font-size: 11px; font-weight: 900; animation: ct-pop .5s ease-out both; }

/* ---------- 庄家的牌 ---------- */
.ct-dealer {
  position: absolute; z-index: 2; left: 50%; top: calc(var(--u) * var(--dtag-y)); transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: calc(var(--u) * 14);
  --cw: calc(var(--u) * 150); --ch: calc(var(--u) * 210); --aw: calc(var(--u) * 620);
}
.ct-dealer-tag {
  display: inline-flex; align-items: center; gap: 4px; min-height: max(24px, calc(var(--u) * 64)); padding: 0 max(12px, calc(var(--u) * 34));
  border-radius: 999px; background: rgba(12, 22, 30, .82); border: 2px solid var(--ct-gold); box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
  font-size: max(12px, calc(var(--u) * 44)); font-weight: 800; white-space: nowrap;
}
.ct-pontoon .ct-dealer-tag { background: linear-gradient(180deg, #164a33, #0b2c1e); color: var(--ct-gold); }
.ct-dealer-tag b { font-family: var(--ct-num); font-size: 1.12em; }
.ct-dealer-tag.is-bust { border-color: #ff7a7a; color: #ffd0d0; }
.ct-dealer-tag.is-bj { background: linear-gradient(180deg, #ffe08a, #e0a412); color: #3b2600; }
.ct-dealer-cards { min-height: var(--ch); }

/* ---------- 牌 ---------- */
.ct-cards { position: relative; display: flex; justify-content: center; align-items: flex-start; max-width: var(--aw, 100%); }
.ct-card {
  flex: none; width: var(--cw, 42px); height: var(--ch, 60px); border-radius: calc(var(--cw, 42px) * .12);
  position: relative; background: var(--ct-card); color: #151515; display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start;
  padding: calc(var(--cw, 42px) * .07) 0 0 calc(var(--cw, 42px) * .08);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .45); border: 1px solid rgba(0, 0, 0, .14); font-family: Georgia, "Times New Roman", serif;
}
/* 张数多了自动叠紧:--n 张、能用的宽 --aw;放得下就留 2px 空,放不下就叠(最多叠到只露 40%,左上角点数一定看得到) */
.ct-cards > .ct-card + .ct-card { margin-left: clamp(calc(var(--cw, 42px) * -.6), calc((var(--aw, 100px) - var(--n, 2) * var(--cw, 42px)) / max(1, var(--n, 2) - 1)), 2px); }
.ct-card b { font-size: calc(var(--cw, 42px) * .36); line-height: 1; font-weight: 700; letter-spacing: -.04em; }
.ct-card i { font-style: normal; font-size: calc(var(--cw, 42px) * .3); line-height: 1.05; }
.ct-card em { position: absolute; right: calc(var(--cw, 42px) * .1); bottom: calc(var(--cw, 42px) * .06); font-style: normal; font-size: calc(var(--cw, 42px) * .62); line-height: 1; }
.ct-card.is-back em { display: none; }
.ct-card.is-red { color: #cf2a33; }
.ct-card.is-back { background: var(--ct-cardback); border: 2px solid var(--ct-cardback-edge); }
.ct-card.is-new { animation: ct-in .3s ease-out both; }
@keyframes ct-in { from { transform: translate(0, calc(var(--u) * -90)) rotate(-8deg) scale(.9); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes ct-pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
/* 发牌:从荷官手上飞到座位(起点 --fx / --fy 由 flyNewCards 量好;--fd = 排第几张的延迟) */
.ct-card.is-fly { animation: ct-fly .46s cubic-bezier(.2, .75, .25, 1) both; animation-delay: var(--fd, 0ms); }
@keyframes ct-fly {
  0% { transform: translate(var(--fx, 0), var(--fy, 0)) rotate(-28deg) scale(.5); opacity: 0; }
  12% { opacity: 1; }
  100% { transform: none; opacity: 1; }
}
/* 庄家底牌翻开:先看到牌背,转到一半换成牌面 */
.ct-dealer-cards { perspective: 600px; }
.ct-card.is-flip { animation: ct-flip .52s ease-in-out both; }
.ct-card.is-flip::before {
  content: ''; position: absolute; inset: -2px; z-index: 2; border-radius: inherit;
  background: var(--ct-cardback); border: 2px solid var(--ct-cardback-edge); animation: ct-flip-back .52s steps(1, end) both;
}
@keyframes ct-flip { 0% { transform: rotateY(0); } 50% { transform: rotateY(90deg) scale(1.06); } 100% { transform: rotateY(0); } }
@keyframes ct-flip-back { 0% { opacity: 1; } 50% { opacity: 0; } 100% { opacity: 0; } }
/* 爆了:整手牌一震 */
.ct-hand.is-shake .ct-cards { animation: ct-shake .42s ease-in-out both; }
@keyframes ct-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-4px) rotate(-2deg); } 40% { transform: translateX(4px) rotate(2deg); } 60% { transform: translateX(-3px); } 80% { transform: translateX(2px); } }
/* 结算:筹码飞来飞去(flyChips 用 Web Animations 推) */
.ct-collect { z-index: 6; pointer-events: none; }
.ct-flychip {
  --c: #e0a412; position: absolute; z-index: 6; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle, var(--c) 0 50%, #fff 51% 58%, var(--c) 59%), repeating-conic-gradient(#fff 0 14deg, var(--c) 14deg 45deg);
  box-shadow: 0 2px 4px rgba(0, 0, 0, .5);
}
.ct-blackjack .ct-flychip.is-lose { --c: #ff4f98; }
.ct-pontoon .ct-flychip.is-lose { --c: #1e8a57; }
/* 自己赢了:座位金光闪两下;结果条后面一圈慢慢转的光芒 */
.ct-seat.is-won .ct-pod { animation: ct-won 1.1s ease-out 2; }
@keyframes ct-won { 0%, 100% { box-shadow: var(--ct-me-glow); } 40% { box-shadow: 0 0 0 3px #ffe08a, 0 0 calc(var(--u) * 120) rgba(255, 216, 102, .95); } }
.ct-result.is-win { position: relative; }
.ct-result.is-win::before {
  content: ''; position: absolute; z-index: -1; left: 50%; top: 50%; width: 170%; aspect-ratio: 1; pointer-events: none;
  background: repeating-conic-gradient(rgba(255, 216, 102, .38) 0 7deg, transparent 7deg 20deg);
  -webkit-mask: radial-gradient(circle, #000 18%, transparent 60%); mask: radial-gradient(circle, #000 18%, transparent 60%);
  transform: translate(-50%, -50%); animation: ct-rays 6s linear infinite;
}
@keyframes ct-rays { to { transform: translate(-50%, -50%) rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  /* 手机开了「减少动态效果」:只关装饰(光芒、金光、牌子弹出);发牌 / 翻牌 / 收牌 / 筹码是玩法的一部分,照放 */
  .ct-seat.is-won .ct-pod, .ct-result.is-win::before, .ct-shift { animation: none; }
}

/* ---------- 座位(7 格,位置照设计稿) ---------- */
.ct-seats { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.ct-seat {
  position: absolute; pointer-events: auto;
  left: calc(var(--u) * (var(--x) - var(--sw) / 2)); top: calc(var(--u) * var(--y)); width: calc(var(--u) * var(--sw));
  display: flex; flex-direction: column; align-items: center;
  --av: calc(var(--u) * 124); --cw: calc(var(--u) * 92); --ch: calc(var(--u) * 128); --aw: calc(var(--u) * (var(--sw) - 22));
}
.ct-seat.is-me { z-index: 2; --av: calc(var(--u) * 156); --cw: calc(var(--u) * 110); --ch: calc(var(--u) * 152); }
.ct-seat[data-hands="2"] { --cw: calc(var(--u) * 78); --ch: calc(var(--u) * 108); }
.ct-seat[data-hands="3"], .ct-seat[data-hands="4"] { --cw: calc(var(--u) * 66); --ch: calc(var(--u) * 92); }
/* 自己分成几手:几手并排成一行(往下长会盖到状态条和按钮),座位加宽、盖过左右邻座(分到三四手很少见,轮完就收回) */
.ct-seat.is-me[data-hands="2"], .ct-seat.is-me[data-hands="3"], .ct-seat.is-me[data-hands="4"] {
  z-index: 3; width: calc(var(--u) * 560); left: calc(var(--u) * (var(--x) - 280)); --cw: calc(var(--u) * 76); --ch: calc(var(--u) * 104); --aw: calc(var(--u) * 250); --av: calc(var(--u) * 132);
}
.ct-seat.is-me[data-hands="2"] .ct-seat-body, .ct-seat.is-me[data-hands="3"] .ct-seat-body, .ct-seat.is-me[data-hands="4"] .ct-seat-body {
  flex-direction: row; flex-wrap: nowrap; justify-content: center; align-items: flex-start; gap: calc(var(--u) * 10);
}
/* 三手 / 四手:排成一行(两行会往下压到状态条),座位再加宽 */
.ct-seat.is-me[data-hands="3"] { width: calc(var(--u) * 820); left: calc(var(--u) * (var(--x) - 410)); }
.ct-seat.is-me[data-hands="4"] { width: calc(var(--u) * 1084); left: calc(var(--u) * (var(--x) - 542)); }
.ct-seat.is-me[data-hands="2"] .ct-hand, .ct-seat.is-me[data-hands="3"] .ct-hand, .ct-seat.is-me[data-hands="4"] .ct-hand { width: calc(var(--u) * 256); }
/* 21 点 / Pontoon:自己的牌再大一号(老板 11-09「自己的牌能不能稍微大点」),一手 110×152 → 140×194、分牌几手 76×104 → 88×121;
   三张扑克有自己那套(#threecard)不跟。座位变高压到状态条时,fitDock 会把状态条 + 按钮往下推(底下还有空才推) */
.ct-blackjack .ct-seat.is-me, .ct-pontoon .ct-seat.is-me { --cw: calc(var(--u) * 140); --ch: calc(var(--u) * 194); }
/* 一手拿到五张以上:放大的牌排不进座位框,缩回差不多原本大小(五张 21 才会到) */
.ct-blackjack .ct-seat.is-me[data-hands="1"] .ct-cards.is-long, .ct-pontoon .ct-seat.is-me[data-hands="1"] .ct-cards.is-long { --cw: calc(var(--u) * 104); --ch: calc(var(--u) * 144); }
.ct-blackjack .ct-seat.is-me:is([data-hands="2"], [data-hands="3"], [data-hands="4"]),
.ct-pontoon .ct-seat.is-me:is([data-hands="2"], [data-hands="3"], [data-hands="4"]) { --cw: calc(var(--u) * 88); --ch: calc(var(--u) * 121); }
.ct-av {
  position: relative; z-index: 1; flex: none; width: var(--av); height: var(--av); min-width: 28px; min-height: 28px; border-radius: 50%;
  border: 2px solid var(--ct-panel-edge); background: #1b1b24; box-shadow: 0 2px 6px rgba(0, 0, 0, .5); margin-bottom: calc(var(--av) * -.32);
}
.ct-av img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; }
.ct-av-initial { display: grid; place-items: center; width: 100%; height: 100%; border-radius: 50%; font-weight: 900; font-size: max(12px, calc(var(--av) * .42)); color: var(--ct-gold); }
.ct-pod {
  position: relative; width: 100%; min-height: calc(var(--u) * 250); display: flex; flex-direction: column; align-items: center; gap: max(2px, calc(var(--u) * 8));
  padding: calc(var(--av) * .36) 2px max(4px, calc(var(--u) * 14)); border-radius: calc(var(--u) * 48);
  background: var(--ct-panel); border: 2px solid var(--ct-panel-edge); box-shadow: 0 4px 10px rgba(0, 0, 0, .45), inset 0 1px 0 rgba(255, 255, 255, .12);
}
.ct-seat.is-me .ct-pod { box-shadow: var(--ct-me-glow); border-color: #ffd2e6; }
.ct-pontoon .ct-seat.is-me .ct-pod { border-color: #ffe7a6; }
.ct-seat.is-turn:not(.is-me) .ct-pod { box-shadow: var(--ct-turn-glow); }
.ct-seat.is-away { opacity: .55; }
.ct-seat.is-empty { --av: calc(var(--u) * 100); opacity: .7; }
.ct-seat.is-empty .ct-pod { background: rgba(0, 0, 0, .2); border-style: dashed; border-color: rgba(255, 255, 255, .22); box-shadow: none; min-height: calc(var(--u) * 150); justify-content: center; }
.ct-seat.is-empty .ct-av { border-style: dashed; border-color: rgba(255, 255, 255, .3); background: rgba(0, 0, 0, .35); }
.ct-seat.is-empty .ct-av-initial { color: rgba(255, 255, 255, .5); }
.ct-seat.is-empty[data-ct] { cursor: pointer; }
.ct-seat.is-empty[data-ct] .ct-pod { border-color: var(--ct-gold); }
.ct-sit-here { font-size: max(10px, calc(var(--u) * 34)); font-weight: 800; color: var(--ct-gold); text-align: center; }
.ct-name { max-width: 100%; padding: 0 3px; font-size: max(9px, calc(var(--u) * 32)); line-height: 1.2; color: var(--ct-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ct-name.is-me { padding: 1px max(8px, calc(var(--u) * 26)); border-radius: 999px; background: rgba(0, 0, 0, .45); color: #fff; font-size: max(12px, calc(var(--u) * 44)); font-weight: 900; }
.ct-leaving { font-size: 9px; color: #ffb3ad; }
.ct-seat-body { display: flex; flex-direction: column; align-items: center; gap: max(3px, calc(var(--u) * 10)); min-width: 0; width: 100%; }
.ct-seat-foot { display: flex; flex-wrap: wrap; justify-content: center; gap: 3px; max-width: 100%; font-size: max(9px, calc(var(--u) * 32)); }
.ct-wait { font-size: max(9px, calc(var(--u) * 30)); color: rgba(255, 255, 255, .55); text-align: center; padding: 6px 2px; }
.ct-stake, .ct-bet-chip { display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; font-family: var(--ct-num); font-weight: 800; font-size: max(10px, calc(var(--u) * 34)); }
.ct-bet-chip { padding: 2px 6px; border-radius: 999px; background: rgba(0, 0, 0, .45); color: var(--ct-gold); margin-top: 4px; }
.ct-seat.is-me .ct-stake { padding: 1px 8px; border-radius: 999px; background: rgba(0, 0, 0, .45); font-size: max(11px, calc(var(--u) * 40)); }
.ct-ins { color: var(--ct-gold); }
.ct-net { font-family: var(--ct-num); font-weight: 900; white-space: nowrap; }
.is-win, .ct-net.is-win { color: #8dffbf; }
.is-lose, .ct-net.is-lose { color: #ff9fa6; }

/* 一手牌 */
.ct-hand { position: relative; display: flex; flex-direction: column; align-items: center; gap: max(2px, calc(var(--u) * 6)); border-radius: 8px; padding: 1px; }
.ct-hand.is-active { box-shadow: 0 0 0 2px var(--ct-gold); background: rgba(255, 216, 102, .12); }
.ct-total {
  min-width: max(26px, calc(var(--u) * 90)); padding: 0 max(6px, calc(var(--u) * 16)); border-radius: 999px; text-align: center;
  background: rgba(0, 0, 0, .55); border: 1px solid var(--ct-panel-edge); color: #fff;
  font-family: var(--ct-num); font-size: max(11px, calc(var(--u) * 44)); font-weight: 800; line-height: 1.45;
}
.ct-seat.is-me .ct-total { font-size: max(13px, calc(var(--u) * 52)); }
.ct-total small { opacity: .7; font-size: .78em; }
.ct-total.is-bust { color: #ffb0b0; border-color: #ff7a7a; }
/* 盖在牌上的章:爆了是红色圆章(照设计稿),赢 / 输 / 和局 / Blackjack… 是小牌子 */
.ct-res {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 1; white-space: nowrap;
  padding: 1px 6px; border-radius: 999px; font-size: max(10px, calc(var(--u) * 34)); font-weight: 900; color: #fff;
  background: rgba(40, 40, 50, .88); border: 1px solid rgba(255, 255, 255, .5); box-shadow: 0 2px 5px rgba(0, 0, 0, .45);
  animation: ct-pop .25s ease-out both;
}
.ct-res.is-bust {
  display: grid; place-items: center; padding: 0; width: max(22px, calc(var(--u) * 78)); height: max(22px, calc(var(--u) * 78));
  border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ff5b6a, #c4142a 75%); border: 2px solid #fff; font-size: max(11px, calc(var(--u) * 40));
}
.ct-res.is-win, .ct-res.is-blackjack, .ct-res.is-pontoon, .ct-res.is-regular21, .ct-res.is-cards5, .ct-res.is-cards6, .ct-res.is-cards7, .ct-res.is-super, .ct-res.is-double21,
.ct-res[class*="is-678"], .ct-res[class*="is-777"] { background: linear-gradient(180deg, #ffe08a, #e0a412); color: #3b2600; border-color: #fff4c8; }
.ct-res.is-lose, .ct-res.is-dealer_pontoon, .ct-res.is-surrender_lose { background: rgba(30, 30, 36, .9); color: #c9c9d1; }
.ct-res.is-push, .ct-res.is-rescued, .ct-res.is-surrender, .ct-res.is-surrendered { background: rgba(240, 240, 248, .92); color: #2b2b36; }
.ct-flag {
  padding: 0 max(6px, calc(var(--u) * 18)); border-radius: 999px; background: linear-gradient(180deg, #ffe08a, #e0a412); color: #3b2600;
  border: 1px solid #fff4c8; font-size: max(9px, calc(var(--u) * 32)); font-weight: 900; line-height: 1.5; animation: ct-pop .3s ease-out both;
}

/* 轮到谁:头像外一圈倒数 + 上面的秒数泡泡 */
.ct-ring { position: absolute; inset: -4px; pointer-events: none; }
.ct-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ct-ring circle { fill: none; stroke: var(--ct-accent); stroke-width: 3.2; stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear; filter: drop-shadow(0 0 3px var(--ct-accent)); }
.ct-pontoon .ct-ring circle { stroke: #ffd977; filter: drop-shadow(0 0 3px #ffb52e); }
.ct-ring b {
  position: absolute; left: 50%; top: 0; transform: translate(-50%, -78%); min-width: max(22px, calc(var(--u) * 76)); height: max(22px, calc(var(--u) * 76));
  display: grid; place-items: center; border-radius: 50%; background: rgba(16, 14, 36, .9); border: 2px solid var(--ct-accent);
  font-family: var(--ct-num); font-size: max(12px, calc(var(--u) * 44)); font-weight: 900; color: #fff; box-shadow: 0 0 8px var(--ct-accent);
}
.ct-pontoon .ct-ring b { background: #0b2c1e; border-color: #ffd977; color: var(--ct-gold); box-shadow: 0 0 8px #ffb52e; }

/* ---------- 下注倒数圈(桌子中间,庄家牌的位置) ---------- */
.ct-count {
  position: relative; width: max(58px, calc(var(--u) * 250)); height: max(58px, calc(var(--u) * 250)); margin-top: calc(var(--u) * -10);
  display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(12, 10, 30, .88) 58%, rgba(12, 10, 30, .55) 72%, transparent 74%);
  animation: ct-pop .35s ease-out both;
}
.ct-count svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); overflow: visible; }
.ct-count circle { fill: none; stroke-width: 3.4; }
.ct-count .ct-count-track { stroke: rgba(255, 255, 255, .16); }
.ct-count [data-ct-count-ring] { stroke: var(--ct-accent); stroke-linecap: round; stroke-dasharray: 100; stroke-dashoffset: 0; transition: stroke-dashoffset .25s linear, stroke .2s; filter: drop-shadow(0 0 4px var(--ct-accent)); }
.ct-count b { font-family: var(--ct-num); font-size: max(24px, calc(var(--u) * 104)); font-weight: 900; line-height: 1; color: #fff; text-shadow: 0 0 10px var(--ct-accent); }
.ct-pontoon .ct-count { background: radial-gradient(circle, rgba(8, 36, 24, .9) 58%, rgba(8, 36, 24, .55) 72%, transparent 74%); }
.ct-pontoon .ct-count [data-ct-count-ring] { stroke: #ffd977; filter: drop-shadow(0 0 4px #ffb52e); }
.ct-pontoon .ct-count b { color: var(--ct-gold); text-shadow: 0 0 10px #ffb52e; }
.ct-count.is-urgent [data-ct-count-ring] { stroke: #ff4d5e; filter: drop-shadow(0 0 5px #ff4d5e); }
.ct-count.is-urgent b { color: #ffd0d4; text-shadow: 0 0 12px #ff4d5e; animation: ct-count-beat 1s ease-in-out infinite; }
@keyframes ct-count-beat { 0%, 100% { transform: scale(1); } 15% { transform: scale(1.22); } 40% { transform: scale(1); } }

/* ---------- 状态条 ---------- */
.ct-status {
  position: absolute; z-index: 4; left: 50%; top: calc(var(--u) * (var(--status-y) + 50) - var(--lift, 0px)); transform: translate(-50%, -50%); /* 以中线定位:字长折行时上下各长一点,不压到按钮;--lift 见 cardtable.js fitDock */
  transition: top .2s ease-out;
  min-width: calc(var(--u) * 600); max-width: calc(var(--u) * 1300); min-height: max(36px, calc(var(--u) * 100)); padding: 0 max(18px, calc(var(--u) * 60));
  display: grid; place-items: center; border-radius: 999px; background: var(--ct-pill); border: 2px solid var(--ct-pill-edge); box-shadow: var(--ct-pill-glow);
  font-size: max(14px, calc(var(--u) * 52)); font-weight: 900; letter-spacing: .04em; white-space: nowrap;
}
.ct-pontoon .ct-status { color: var(--ct-gold); border-radius: calc(var(--u) * 30); }
.ct-status { white-space: normal; text-align: center; line-height: 1.2; padding-block: 4px; max-width: calc(var(--u) * 1420); text-wrap: balance; }
html:not([lang^="zh"]) .ct-status { font-size: max(13px, calc(var(--u) * 46)); letter-spacing: 0; }

/* ---------- 下面的动作区 ---------- */
.ct-dock { position: absolute; z-index: 4; left: calc(var(--u) * 40); right: calc(var(--u) * 40); top: calc(var(--u) * var(--dock-y) - var(--lift, 0px)); padding-bottom: max(12px, env(safe-area-inset-bottom)); transition: top .2s ease-out; }
.ct-panel { display: flex; flex-direction: column; gap: max(8px, calc(var(--u) * 26)); }
.ct-actions { display: flex; gap: max(8px, calc(var(--u) * 28)); justify-content: center; align-items: stretch; }
.ct-btn {
  flex: 1 1 0; min-width: 0; max-width: calc(var(--u) * 460); min-height: max(48px, calc(var(--u) * 170)); padding: 0 6px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.1;
  border-radius: max(14px, calc(var(--u) * 44)); border: 3px solid #f2d48a; color: var(--ct-btn-text);
  font-size: max(16px, calc(var(--u) * 64)); font-weight: 900; letter-spacing: .06em; text-shadow: 0 2px 2px rgba(0, 0, 0, .35);
  background: linear-gradient(180deg, #6a6a78, #3c3c48);
  box-shadow: 0 calc(var(--u) * 10) calc(var(--u) * 18) rgba(0, 0, 0, .5), inset 0 3px 0 rgba(255, 255, 255, .35), inset 0 -4px 0 rgba(0, 0, 0, .18);
}
.ct-btn small { font-size: max(10px, calc(var(--u) * 34)); font-weight: 700; letter-spacing: 0; opacity: .9; font-family: var(--ct-num); }
html:not([lang^="zh"]) .ct-btn { font-size: max(13px, calc(var(--u) * 50)); letter-spacing: 0; overflow-wrap: anywhere; text-align: center; }
.ct-actions.is-many { flex-wrap: wrap; }
.ct-actions.is-many .ct-btn { flex: 1 1 calc(33.3% - 12px); max-width: none; min-height: max(44px, calc(var(--u) * 140)); }
.ct-btn:active:not(:disabled) { transform: translateY(1px) scale(.98); }
.ct-btn:disabled { opacity: .42; filter: grayscale(.4); cursor: default; }
/* 11 点以内的停牌键:照样占位置、整颗压暗去色,一看就知道按不了(老板 11-09) */
.ct-btn.is-locked:disabled { opacity: .6; filter: grayscale(1) brightness(.5); }
.ct-btn.ct-wide { flex-grow: 2; }
/* 21 点:要牌薄荷、停牌粉红、加倍金、分牌淡紫(设计稿);投降珊瑚 */
.ct-blackjack .ct-a-hit { background: linear-gradient(180deg, #4fe0b3, #12936d); }
.ct-blackjack .ct-a-stand { background: linear-gradient(180deg, #ff78b6, #d22f7c); }
.ct-blackjack .ct-a-double { background: linear-gradient(180deg, #ffdc5e, #e1a312); color: #3b2600; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.ct-blackjack .ct-a-split { background: linear-gradient(180deg, #b69bf0, #7657c2); }
.ct-blackjack .ct-a-surrender { background: linear-gradient(180deg, #ff9c8a, #d6544a); }
/* Pontoon:要牌祖母绿、停牌夕阳橘、加倍金(设计稿);分牌硬木、撤回加倍琥珀、投降赭红 */
.ct-pontoon .ct-a-hit { background: linear-gradient(180deg, #2fae72, #0d5a38); }
.ct-pontoon .ct-a-stand { background: linear-gradient(180deg, #f78d47, #c4421a); }
.ct-pontoon .ct-a-double { background: linear-gradient(180deg, #f6cf58, #c68d14); color: #3b2600; text-shadow: 0 1px 0 rgba(255, 255, 255, .4); }
.ct-pontoon .ct-a-split { background: linear-gradient(180deg, #a87745, #5c3a1a); }
.ct-pontoon .ct-a-rescue { background: linear-gradient(180deg, #e9b048, #9a5e14); }
.ct-pontoon .ct-a-surrender { background: linear-gradient(180deg, #d0614a, #7d2a1d); }
.ct-a-ghost { background: rgba(10, 10, 20, .65) !important; border-color: rgba(255, 255, 255, .45) !important; color: #fff !important; }
.ct-pontoon .ct-a-ghost { background: rgba(26, 15, 7, .8) !important; border-color: #b98a45 !important; }

/* 三张扑克(2026-11-08):对子奖边注、下注要留多少、结算明细;庄家够格 / 不够格的牌子 */
.ct-side { padding:0 5px; border-radius:6px; background:#7b5cff33; color:#d9ccff; font-size:10px; white-space:nowrap; }
.ct-side b { color:#fff; }
.ct-side-row { display:flex; flex-direction:column; align-items:center; gap:4px; padding-top:6px; border-top:1px dashed #ffffff22; }
.ct-side-label { font-size:12px; font-weight:700; color:#d9ccff; letter-spacing:.04em; }
.ct-side-row .ct-chip { min-width:46px; min-height:36px; }
.ct-side-row .ct-chip.is-on { background:#b9a6ff; border-color:#2a1d55; color:#1d1340; }
.ct-need { font-size:12px; }
.ct-detail { margin:0; padding:0; list-style:none; display:grid; gap:2px; text-align:center; font-size:12px; color:var(--ct-dim); }
.ct-total.is-ok { background:#2e9c5a; }
.ct-res.is-nq { background:#2e9c5a; color:#fff; }
.ct-res.is-fold { background:#5a6a62; color:#fff; }
.ct-res.is-play { background:#e6c25c; color:#2a1d00; }
/* 三张牌放进 1/4 宽的座位:叠多一点才不超出座位框;点数花色挪到左上角(像真牌),叠着也看得到每一张 */
#threecard .ct-seat.is-me .ct-card + .ct-card { margin-left:-20px; }
#threecard .ct-card.is-small + .ct-card.is-small { margin-left:-13px; }
#threecard .ct-seat .ct-card:not(.is-back) { justify-content:flex-start; align-items:flex-start; padding:3px 0 0 3px; }
#threecard .ct-seat .ct-card.is-small:not(.is-back) { padding:2px 0 0 2px; }
#threecard .ct-side { white-space:normal; text-align:center; line-height:1.25; max-width:100%; }

/* 下注:筹码一排(CSS 画的赌场筹码)+ 金额 + 下注键 */
.ct-chips { display: flex; justify-content: center; gap: max(6px, calc(var(--u) * 20)); flex-wrap: wrap; }
.ct-chip {
  --c: #ff4f98; position: relative; width: max(46px, calc(var(--u) * 168)); height: max(46px, calc(var(--u) * 168)); border-radius: 50%;
  display: grid; place-items: center; color: #fff; font-family: var(--ct-num); font-weight: 900; font-size: max(10px, calc(var(--u) * 36));
  background: radial-gradient(circle, var(--c) 0 54%, #fff 55% 60%, var(--c) 61%), repeating-conic-gradient(#fff 0 12deg, var(--c) 12deg 45deg);
  box-shadow: 0 4px 0 rgba(0, 0, 0, .35), 0 6px 10px rgba(0, 0, 0, .45); text-shadow: 0 1px 2px rgba(0, 0, 0, .6);
  transition: transform .12s ease-out, box-shadow .12s ease-out;
}
.ct-chip span { max-width: 70%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ct-chip.is-on { transform: translateY(-6px); box-shadow: 0 0 0 3px var(--ct-gold), 0 0 16px var(--ct-gold), 0 8px 10px rgba(0, 0, 0, .45); }
.ct-blackjack .ct-chip-0 { --c: #18a87f; } .ct-blackjack .ct-chip-1 { --c: #ff4f98; } .ct-blackjack .ct-chip-2 { --c: #1bb6d1; }
.ct-blackjack .ct-chip-3 { --c: #d89a10; } .ct-blackjack .ct-chip-4 { --c: #8a63d2; } .ct-blackjack .ct-chip-5 { --c: #e8574a; }
.ct-pontoon .ct-chip-0 { --c: #1e8a57; } .ct-pontoon .ct-chip-1 { --c: #d2601f; } .ct-pontoon .ct-chip-2 { --c: #17707a; }
.ct-pontoon .ct-chip-3 { --c: #c08b17; } .ct-pontoon .ct-chip-4 { --c: #6b4322; } .ct-pontoon .ct-chip-5 { --c: #a8322a; }
.ct-bet-row { align-items: center; }
.ct-round-btn {
  flex: none; width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-weight: 900; font-size: 14px;
  background: var(--ct-pill); border: 2px solid var(--ct-gold); box-shadow: 0 2px 6px rgba(0, 0, 0, .4);
}
.ct-pontoon .ct-round-btn { color: var(--ct-gold); }
.ct-round-btn:disabled { opacity: .45; }
.ct-amount {
  min-width: max(120px, calc(var(--u) * 420)); padding: 4px 18px; border-radius: 999px; text-align: center;
  background: rgba(0, 0, 0, .6); border: 2px solid var(--ct-gold); font-family: var(--ct-num); font-size: max(20px, calc(var(--u) * 70)); font-weight: 900; color: var(--ct-gold);
}
.ct-hint {
  align-self: center; max-width: 100%; padding: 8px 16px; border-radius: 999px; text-align: center; color: #fff;
  background: rgba(0, 0, 0, .5); font-size: max(13px, calc(var(--u) * 46)); font-weight: 700;
}
/* 轮到自己时游戏给的一句提醒(Pontoon 加倍时 A 只算 1):比一般提示小、金字,不抢按钮 */
.ct-turn-note { padding: 4px 14px; font-size: max(12px, calc(var(--u) * 40)); color: var(--ct-gold); }
.ct-result {
  align-self: center; padding: max(8px, calc(var(--u) * 24)) max(22px, calc(var(--u) * 70)); border-radius: 999px; text-align: center;
  background: rgba(0, 0, 0, .65); border: 2px solid var(--ct-gold); font-size: max(16px, calc(var(--u) * 56)); font-weight: 900;
  animation: ct-pop .35s ease-out both;
}
.ct-result.is-win { background: linear-gradient(180deg, rgba(255, 224, 138, .25), rgba(0, 0, 0, .7)); box-shadow: 0 0 22px rgba(255, 216, 102, .65); }
.ct-result b { font-family: var(--ct-num); font-size: 1.3em; margin-left: 6px; }
.ct-foot { position: absolute; right: 8px; bottom: max(4px, env(safe-area-inset-bottom)); font-size: 10px; opacity: .45; }

/* ---------- 大厅(选档位) ---------- */
.ct-stage.is-lobby .ct-lobby {
  position: absolute; z-index: 4; left: calc(var(--u) * 60); right: calc(var(--u) * 60); top: calc(var(--u) * 1420);
  display: flex; flex-direction: column; gap: 10px; padding-bottom: max(16px, env(safe-area-inset-bottom));
}
.ct-lobby-lead { align-self: center; padding: 6px 14px; border-radius: 999px; background: rgba(0, 0, 0, .55); font-size: 13px; text-align: center; }
.ct-tiers { display: grid; gap: 10px; }
.ct-tier {
  display: grid; grid-template-columns: 1fr auto; grid-template-areas: "range go" "seated go"; gap: 2px 12px; align-items: center; text-align: left;
  padding: 12px 16px; border-radius: 18px; background: var(--ct-panel); border: 2px solid var(--ct-panel-edge); box-shadow: 0 4px 12px rgba(0, 0, 0, .5);
}
.ct-tier-range { grid-area: range; font-family: var(--ct-num); font-size: 19px; font-weight: 900; color: var(--ct-gold); }
.ct-tier-sub { display: none; }
.ct-tier-seated { grid-area: seated; color: var(--ct-dim); font-size: 12px; }
.ct-tier-go { grid-area: go; min-width: 76px; min-height: 42px; display: grid; place-items: center; border-radius: 14px; border: 2px solid #f2d48a; font-weight: 900; color: #fff; }
.ct-blackjack .ct-tier-go { background: linear-gradient(180deg, #ff78b6, #d22f7c); }
.ct-pontoon .ct-tier-go { background: linear-gradient(180deg, #2fae72, #0d5a38); }
.ct-link { align-self: center; padding: 8px 14px; border-radius: 999px; background: rgba(0, 0, 0, .5); color: var(--ct-gold); font-size: 13px; text-decoration: underline; }
.ct-warn { padding: 8px 12px; border-radius: 12px; background: rgba(226, 56, 77, .35); color: #ffe1e4; }
.ct-empty { padding: 24px 0; text-align: center; color: var(--ct-dim); }
.ct-stage.is-lobby > .ct-empty { position: absolute; left: 0; right: 0; top: calc(var(--u) * 1500); }

/* ---------- 选房(老板 11-08「每个房间不同荷官」,照 output/21点选房-1108 概念图):一房一横条 ---------- */
.ct-blackjack { --ct-room-bg: rgba(12, 12, 34, .88); --ct-room-edge: #ff6fb0; --ct-room-glow: 0 0 14px rgba(255, 95, 162, .55), inset 0 0 10px rgba(255, 95, 162, .18); --ct-room-felt: #1c8a6c; --ct-room-go: linear-gradient(180deg, #4fdcb0, #12896a); }
.ct-pontoon { --ct-room-bg: linear-gradient(180deg, rgba(22, 74, 51, .95), rgba(11, 44, 30, .95)); --ct-room-edge: #c9952f; --ct-room-glow: 0 4px 14px rgba(0, 0, 0, .55), inset 0 0 0 1px rgba(255, 217, 119, .25); --ct-room-felt: #0f5a3a; --ct-room-go: linear-gradient(180deg, #2fae72, #0d5a38); }
.ct-stage.is-rooms .ct-lobby { top: calc(var(--u) * 260); left: calc(var(--u) * 44); right: calc(var(--u) * 44); }
.ct-rooms { display: grid; gap: 12px; }
.ct-room {
  position: relative; display: grid; grid-template-columns: 42% 1fr; min-height: 170px; padding: 0; overflow: hidden; text-align: left;
  border-radius: 18px; background: var(--ct-room-bg); border: 2px solid var(--ct-room-edge); box-shadow: var(--ct-room-glow); color: #fff;
}
.ct-room.is-vip { --ct-room-edge: #f3cf73; box-shadow: 0 0 16px rgba(243, 207, 115, .6), inset 0 0 12px rgba(243, 207, 115, .2); }
/* 关着的房(21 点 / Pontoon 的 VIP 11-12 先关;三张扑克在 threecard.css 自己那套):整张灰掉、按不进去,右下角「暂时不开放」虚线框代替坐下键 */
.ct-room.is-closed { filter: grayscale(1); opacity: .5; cursor: not-allowed; box-shadow: none; }
.ct-room.is-closed:active { transform: none; }
.ct-room-soon { align-self: flex-end; margin-top: auto; min-height: 40px; display: grid; place-items: center; padding: 0 16px; border-radius: 14px;
  border: 2px dashed rgba(255, 255, 255, .55); color: #fff; font-size: 15px; font-weight: 800; letter-spacing: .08em; white-space: nowrap; }
.ct-pontoon .ct-room.is-vip { --ct-room-edge: #ffd977; border-width: 3px; }
.ct-room-cam { position: relative; overflow: hidden; background: #0a0a14; border-right: 2px solid var(--ct-room-edge); }
/* 1:1 待机图放大到格子 1.35 倍、置中:荷官上半身 + 手放在桌边那一段 */
.ct-room-cam img, .ct-room-cam video { position: absolute; left: 50%; top: -3%; width: 135%; max-width: none; height: auto; transform: translateX(-50%); }
.ct-room-cam video { opacity: 0; transition: opacity .3s; }
.ct-room.is-live .ct-room-cam video { opacity: 1; }
.ct-room-info { display: flex; flex-direction: column; gap: 7px; min-width: 0; padding: 10px 12px 12px; }
.ct-room-head { display: flex; align-items: center; justify-content: space-between; gap: 6px; min-height: 30px; }
.ct-room-name { font-size: 17px; font-weight: 900; line-height: 1.15; letter-spacing: .02em; }
.ct-pontoon .ct-room-name { color: var(--ct-gold); }
.ct-room-state { flex: none; display: flex; }
.ct-room-clock {
  width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; border: 2px solid var(--ct-room-edge); background: rgba(0, 0, 0, .35);
  font-family: var(--ct-num); font-size: 14px; font-weight: 900; box-shadow: 0 0 6px var(--ct-room-edge);
}
.ct-room-clock.is-off { visibility: hidden; }
.ct-room-clock.is-urgent { border-color: #ff4d5e; color: #ffd0d4; box-shadow: 0 0 8px #ff4d5e; }
.ct-room-live { padding: 3px 10px; border-radius: 999px; border: 1.5px solid var(--ct-room-edge); background: rgba(0, 0, 0, .35); font-size: 12px; font-weight: 800; white-space: nowrap; }
.ct-room-meta { display: flex; flex-wrap: wrap; gap: 6px; }
.ct-room-range, .ct-room-online {
  display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .14);
  font-family: var(--ct-num); font-size: 12.5px; font-weight: 800; color: var(--ct-gold); white-space: nowrap;
}
.ct-room-online svg { width: 13px; height: 13px; }
.ct-room-table { display: flex; align-items: center; gap: 8px; }
.ct-room-table b { font-family: var(--ct-num); font-size: 13px; color: var(--ct-dim); }
.ct-room-table [data-room-arc] { flex: 1; min-width: 0; max-width: 170px; display: block; }
.ct-room-arc { display: block; width: 100%; height: auto; overflow: visible; }
.ct-room-felt { fill: var(--ct-room-felt); stroke: var(--ct-room-edge); stroke-width: 2.4; }
.ct-room-arc circle { fill: rgba(0, 0, 0, .3); stroke: rgba(255, 255, 255, .65); stroke-width: 1.6; stroke-dasharray: 3 2.4; }
.ct-room-arc circle.is-on { fill: var(--ct-room-edge); stroke: #fff; stroke-dasharray: none; filter: drop-shadow(0 0 3px var(--ct-room-edge)); }
.ct-room-go {
  align-self: flex-end; margin-top: auto; min-width: 92px; min-height: 40px; display: grid; place-items: center; padding: 0 16px;
  border-radius: 14px; border: 2px solid #f2d48a; background: var(--ct-room-go); font-size: 16px; font-weight: 900; color: #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .4);
}
.ct-room:active { transform: scale(.985); }

/* 规则 / 记录(在共用的 sheet 里,不在牌桌上:用回一般尺寸) */
.ct-rules { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.ct-mine-row { padding: 10px 0; border-bottom: 1px solid #ffffff14; display: grid; gap: 4px; }
.ct-mine-top { display: flex; gap: 8px; justify-content: space-between; }
.ct-mine-body { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.ct-mine-hand, .ct-mine-dealer { display: inline-flex; align-items: center; gap: 4px; --cw: 26px; --ch: 37px; }
.ct-mine-hand .ct-card + .ct-card, .ct-mine-dealer .ct-card + .ct-card { margin-left: -10px; }
.ct-mine-hand .ct-card, .ct-mine-dealer .ct-card { width: 26px; height: 37px; background: #fdfcf8; color: #151515; border-radius: 4px; }
.ct-mine-hand .ct-card.is-red, .ct-mine-dealer .ct-card.is-red { color: #cf2a33; }
.ct-mine-hand .ct-card b, .ct-mine-dealer .ct-card b { font-size: 12px; }
.ct-mine-hand .ct-card i, .ct-mine-dealer .ct-card i { font-size: 11px; }
.ct-mine-hand > em { font-style: normal; font-size: 12px; opacity: .8; }
.ct-mine-hand .ct-card em, .ct-mine-dealer .ct-card em { display: none; }
/* 提示条(toast)原本在第 20 层,牌桌整页在第 40 层:牌桌里的提示(连续几局没下注让位、离开太久让位、下注失败…)全被盖住看不到 → 牌桌开着时抬上来(点照样穿过去) */
body:has(section.ct:not([hidden])) .toast { z-index: 45; width: max-content; }

/* ---------- 分级赢钱特效(老板 11-09「照这版做」;cardtable.js bigWinFx / CT_BIGFX,概念图 output/21点输赢特效-1109)----------
   盖在牌桌上面一层、点照样穿过去;招牌 / 牌子是空白底板图,字由程序叠;粒子大小用 --u、位置 Web Animations 推 */
.ct-bigfx { position: absolute; left: 0; top: 0; width: 100%; height: calc(var(--u) * 2688); z-index: 30; pointer-events: none; overflow: hidden; }
.ct-bigfx.is-out { animation: ct-fx-out .45s ease-in forwards; }
@keyframes ct-fx-out { to { opacity: 0; } }
.ct-bigfx-dim { position: absolute; inset: 0; background: radial-gradient(ellipse at 50% 32%, rgba(0, 0, 0, 0) 20%, rgba(0, 0, 0, .5) 75%); animation: ct-fx-in .3s ease-out both; }
.ct-bigfx.is-t1 .ct-bigfx-dim { opacity: .5; }
@keyframes ct-fx-in { from { opacity: 0; } }
.ct-bigfx-flash { position: absolute; inset: 0; background: #fff; opacity: 0; animation: ct-fx-flash .7s ease-out .15s both; }
.ct-bigfx.is-pt .ct-bigfx-flash { background: #ffe49a; }
@keyframes ct-fx-flash { 0% { opacity: 0; } 15% { opacity: .85; } 100% { opacity: 0; } }
.ct-bigfx-rays {
  position: absolute; left: 50%; top: calc(var(--u) * (var(--sy) + 300)); width: calc(var(--u) * 2300); aspect-ratio: 1; margin: calc(var(--u) * -1150) 0 0 calc(var(--u) * -1150);
  background: repeating-conic-gradient(rgba(255, 214, 102, .42) 0 6deg, transparent 6deg 18deg);
  -webkit-mask: radial-gradient(circle, #000 12%, transparent 62%); mask: radial-gradient(circle, #000 12%, transparent 62%);
  animation: ct-fx-in .4s ease-out .2s both, ct-rays 9s linear infinite;
}
.ct-bigfx.is-bj .ct-bigfx-rays { background: repeating-conic-gradient(rgba(255, 79, 152, .4) 0 6deg, transparent 6deg 12deg, rgba(255, 214, 102, .4) 12deg 18deg, transparent 18deg 24deg); }
/* 21 点 Blackjack:两道霓虹光束从下面扫天 */
.ct-bigfx-beam { position: absolute; bottom: 50%; width: calc(var(--u) * 340); height: calc(var(--u) * 1500); margin-left: calc(var(--u) * -170); transform-origin: 50% 100%; clip-path: polygon(46% 100%, 54% 100%, 100% 0, 0 0); filter: blur(calc(var(--u) * 5)); opacity: .8; background: linear-gradient(to top, rgba(255, 79, 152, .8), rgba(255, 140, 200, .3) 60%, transparent); animation: ct-fx-in .4s ease-out .3s both, ct-fx-sweep 1.6s ease-in-out .3s infinite alternate; }
.ct-bigfx-beam.is-l { left: 14%; --a0: -38deg; --a1: 12deg; }
.ct-bigfx-beam.is-r { left: 86%; --a0: 38deg; --a1: -12deg; background: linear-gradient(to top, rgba(126, 240, 208, .7), rgba(126, 240, 208, .3) 55%, transparent); }
@keyframes ct-fx-sweep { from { transform: rotate(var(--a0)); } to { transform: rotate(var(--a1)); } }
/* Pontoon 第二级以上:灯笼一起亮起来(上面两角暖光一闪一闪) */
.ct-bigfx-lantern { position: absolute; inset: 0; background: radial-gradient(circle at 6% 14%, rgba(255, 196, 92, .55), transparent 22%), radial-gradient(circle at 94% 14%, rgba(255, 196, 92, .55), transparent 22%), radial-gradient(ellipse at 50% 30%, rgba(255, 190, 80, .22), transparent 60%); animation: ct-fx-glow 1.1s ease-in-out .2s 3 alternate both; }
@keyframes ct-fx-glow { from { opacity: .3; } to { opacity: 1; } }
/* 招牌:砸下来 */
.ct-bigfx-sign { position: absolute; left: calc(50% - var(--u) * var(--sw) / 2); top: calc(var(--u) * var(--sy)); width: calc(var(--u) * var(--sw)); animation: ct-fx-slam .5s cubic-bezier(.3, .1, .3, 1) .15s both; }
.ct-bigfx-sign img { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
@keyframes ct-fx-slam { 0% { transform: scale(2.4); opacity: 0; } 62% { transform: scale(.93); opacity: 1; } 100% { transform: scale(1); opacity: 1; } }
.ct-bigfx-title { position: absolute; display: flex; align-items: center; justify-content: center; white-space: nowrap; }
.ct-bigfx-title span {
  font-family: var(--ct-num), 'PingFang SC', 'Hiragino Sans GB', sans-serif; font-weight: 900; line-height: 1; letter-spacing: .04em;
  background: linear-gradient(180deg, #fffbe0 0%, #ffe07a 42%, #f2a91b 70%, #c97a06 100%); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 calc(var(--u) * 4) 0 rgba(80, 30, 0, .55)) drop-shadow(0 0 calc(var(--u) * 14) rgba(255, 210, 90, .65));
}
.ct-bigfx.is-bj .ct-bigfx-title span { font-size: calc(var(--u) * 150); filter: drop-shadow(0 calc(var(--u) * 4) 0 rgba(120, 0, 60, .6)) drop-shadow(0 0 calc(var(--u) * 18) rgba(255, 79, 152, .9)); }
.ct-bigfx.is-bj.is-t3 .ct-bigfx-title span { font-size: calc(var(--u) * 80); background: none; color: #fff; filter: drop-shadow(0 0 calc(var(--u) * 10) #ff4f98) drop-shadow(0 0 calc(var(--u) * 4) #ff4f98); }
.ct-bigfx.is-pt .ct-bigfx-title span { font-size: calc(var(--u) * 120); }
.ct-bigfx.is-pt.is-t3 .ct-bigfx-title span { font-size: calc(var(--u) * 116); }
/* 金额:招牌下面,往上跳;后面垫一块深色底(压在荷官 / 桌子上才读得清) */
.ct-bigfx-amt { position: absolute; left: 0; right: 0; top: calc(var(--u) * var(--ay)); display: flex; justify-content: center; animation: ct-pop .35s cubic-bezier(.3, 1.5, .5, 1) .35s both; font-size: calc(var(--u) * 130); }
.ct-bigfx-amt span {
  display: block; padding: calc(var(--u) * 6) calc(var(--u) * 44); border-radius: 999px; white-space: nowrap;
  font-family: var(--ct-num), sans-serif; font-weight: 900; font-size: inherit; line-height: 1.15; font-variant-numeric: tabular-nums;
  color: #ffe07a; text-shadow: 0 calc(var(--u) * 4) 0 rgba(60, 20, 0, .7), 0 0 calc(var(--u) * 22) rgba(255, 200, 80, .8);
  background: radial-gradient(ellipse at center, rgba(10, 8, 20, .78), rgba(10, 8, 20, .55) 70%, rgba(10, 8, 20, 0));
}
.ct-bigfx.is-t1 .ct-bigfx-amt { font-size: calc(var(--u) * 110); }
.ct-bigfx.is-bj .ct-bigfx-amt span { color: #fff1a8; text-shadow: 0 calc(var(--u) * 4) 0 rgba(120, 0, 60, .7), 0 0 calc(var(--u) * 22) rgba(255, 79, 152, .85); }
.ct-bigfx.is-t3 .ct-bigfx-amt { font-size: calc(var(--u) * 175); }
/* Pontoon 第二级:犀鸟从左飞到右 */
.ct-bigfx-bird { position: absolute; left: 0; top: calc(var(--u) * 110); width: calc(var(--u) * 430); animation: ct-fx-bird 1.8s cubic-bezier(.35, .1, .5, 1) 1.3s both; } /* 等荷官报完牌型才飞过(叫声 1.4 秒),3.1 秒飞完 */
@keyframes ct-fx-bird { 0% { transform: translate(calc(var(--u) * -460), calc(var(--u) * 120)); opacity: 0; } 10% { opacity: 1; } 90% { opacity: 1; } 100% { transform: translate(calc(var(--u) * 1620), calc(var(--u) * -60)); opacity: 0; } }
/* 粒子 */
.ct-fxp { position: absolute; display: block; pointer-events: none; will-change: transform, opacity; }
.ct-fxp.is-confetti { width: calc(var(--u) * 16); height: calc(var(--u) * 30); margin: calc(var(--u) * -15) 0 0 calc(var(--u) * -8); background: var(--c); border-radius: calc(var(--u) * 3); box-shadow: 0 0 calc(var(--u) * 6) rgba(255, 255, 255, .3); }
.ct-fxp.is-spray { width: calc(var(--u) * 14); height: calc(var(--u) * 14); margin: calc(var(--u) * -7) 0 0 calc(var(--u) * -7); border-radius: 50%; background: radial-gradient(circle, #fff 0 30%, #ffe39a 55%, rgba(255, 227, 154, 0) 72%); box-shadow: 0 0 calc(var(--u) * 10) rgba(255, 240, 200, .8); }
.ct-fxp.is-bubble { --d: calc(var(--u) * 44 * var(--s, 1)); width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%; border: calc(var(--u) * 3) solid rgba(255, 255, 255, .75); background: radial-gradient(circle at 32% 30%, rgba(255, 255, 255, .7) 0 14%, rgba(255, 156, 205, .18) 40%, transparent 70%); }
.ct-fxp.is-firefly { width: calc(var(--u) * 24); height: calc(var(--u) * 24); margin: calc(var(--u) * -12) 0 0 calc(var(--u) * -12); border-radius: 50%; background: radial-gradient(circle, #fffbd2 0 25%, #ffd84a 45%, rgba(255, 216, 74, 0) 72%); box-shadow: 0 0 calc(var(--u) * 20) calc(var(--u) * 6) rgba(255, 214, 90, .55); }
.ct-fxp.is-leaf { width: calc(var(--u) * 46); height: calc(var(--u) * 22); margin: calc(var(--u) * -11) 0 0 calc(var(--u) * -23); border-radius: 0 100% 0 100%; background: linear-gradient(135deg, #fbe08a, #d79a1c 55%, #4f8a2c); box-shadow: 0 0 calc(var(--u) * 8) rgba(255, 210, 90, .5); }
.ct-fxp.is-petal { width: calc(var(--u) * 32); height: calc(var(--u) * 22); margin: calc(var(--u) * -11) 0 0 calc(var(--u) * -16); border-radius: 50% 50% 50% 0; background: radial-gradient(circle at 30% 30%, #ff9a9a, #e0243f 70%); }
.ct-fxp.is-coin { --d: calc(var(--u) * 56 * var(--s, 1)); width: var(--d); height: var(--d); margin: calc(var(--d) / -2) 0 0 calc(var(--d) / -2); border-radius: 50%; background: radial-gradient(circle at 36% 30%, #fff7c6 0 10%, #ffd84d 30%, #e4a317 60%, #a86a08 62% 68%, #f4c444 70%); box-shadow: inset 0 0 0 calc(var(--u) * 4) #ffe28a, 0 calc(var(--u) * 4) calc(var(--u) * 8) rgba(0, 0, 0, .35); }
@media (prefers-reduced-motion: reduce) {
  /* 减少动态效果:只留招牌和金额,光芒 / 光束 / 闪光 / 犀鸟不放(粒子程序那边就不生) */
  .ct-bigfx-rays, .ct-bigfx-beam, .ct-bigfx-flash, .ct-bigfx-bird, .ct-bigfx-lantern { display: none; }
}
