/* 全场翻硬币 —— 灰狼的屋顶夜(跟单人版翻硬币同一个世界:黑底、灰狼皮衣、黑白银币;头 = 柠檬、尾 = 银白)
 * 图片 / 影片只有灰狼和硬币(public/img/coin/*.webp、public/video/coin/*.mp4,跟单人版同一套);
 * 拔河条、头 / 尾两大格、最近几局、筹码、按钮、倒数圈、横幅、彩带、下注名单全是 CSS。
 * 版面(竖屏)照色碟:顶栏 / 画面区(最高 4:3,高度 = 页面减掉下面那一块要的)/ 下面一块:倒数圈 + 状态和最近几局并成一行、
 * 拔河条(全场押头 vs 押尾)、头 / 尾两大格、筹码、三颗按钮、在线人数;本局赢家、下注名单在最下面(往下卷看)。
 * 页面的 JS 跟鱼虾蟹、色碟共用(public/bowl-page.js),class 名字照它的写法,前缀 ts-;开局画面是 toss.js 的 stage(data-ts-mode 切换)。
 * 动画只动 transform / opacity;关了动态效果的手机全部换成落定那一格。
 */
.toss {
  position: fixed; inset: 0; z-index: 10; overflow: hidden;
  display: flex; flex-direction: column;
  padding: var(--safe-t, 0px) 0 calc(var(--safe-b, 0px) + 6px);
  --bg: #0a0a0a; --surface: #151515; --surface-2: #1c1c1c; --line: #262626;
  --ink: #fff; --ink-2: #8f8f8f; --ink-3: #5c5c5c; --neon: #e5ff3d; --neon-ink: #0a0a0a; --bad: #ff5a5a;
  --silver: #e9edf2; --silver-2: #aeb6c0; --silver-lo: #5d646d;
  --night: #050608;
  --ts-w: min(100vw, var(--app-max-width, 520px));
  --ts-pad: 16px;
  --ts-cell-h: 96px;
  /* 画面区以下那一块要多高:顶栏 60 + 倒数那行 52 + 拔河条 50 + 两大格 + 筹码 56 + 按钮 52 + 在线人数 32 + 间距 7 × 8 + 上下留白 14。改了下面任何一块的高度,这里要跟着改 */
  --ts-below: calc(372px + var(--ts-cell-h));
  --sans: system-ui, -apple-system, "PingFang SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-family: var(--sans);
  -webkit-user-select: none; user-select: none; -webkit-tap-highlight-color: transparent;
}
.toss[hidden] { display: none; }
.toss :where(p, h2, h3, ul) { margin: 0; }
.toss :where(button) { appearance: none; border: 0; margin: 0; padding: 0; font: inherit; color: inherit; background: none; cursor: pointer; }
.toss button:focus-visible { outline: 2px solid var(--neon); outline-offset: 2px; }
.toss img, .toss video { -webkit-user-drag: none; pointer-events: none; }
/* 按钮里面的字、金额、硬币图一律点不到:别人一押,格子里的总下注就改字(金额还会被 PA 金币那层换掉),按在上面的话松手时那个元素已经没了,浏览器不发 click */
.toss button > *, .toss button * { pointer-events: none; }

/* ---------- 顶栏 ---------- */
.ts-top { flex: none; display: flex; align-items: center; gap: 10px; padding: 8px 16px; }
.ts-back, .ts-help { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 14px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ts-back svg, .ts-help svg { width: 22px; height: 22px; }
.ts-help { color: var(--ink-2); font-weight: 700; border-radius: 50%; }
.ts-title { flex: 1; min-width: 0; text-align: center; font-size: 21px; font-weight: 900; letter-spacing: .06em; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
html:not([lang^="zh"]) .ts-title { font-size: clamp(14px, 4.2vw, 19px); letter-spacing: 0; padding: .32em 0 .12em; margin: -.32em 0 -.12em; }
.ts-bal { flex: none; max-width: 40%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 9px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; font-weight: 800; font-variant-numeric: tabular-nums; }
.ts-dep { flex: none; min-height: 44px; padding: 0 10px; border-radius: 999px; background: var(--neon); color: var(--neon-ink); font-size: 13px; font-weight: 800; white-space: nowrap; }
.ts-dep[hidden] { display: none; }
.ts-top:has(.ts-dep:not([hidden])) .ts-bal { max-width: 32%; padding-inline: 10px; }
.ts-top.ts-has-music { gap: 6px; }
.ts-top.ts-has-music .ts-title { font-size: 18px; }
.ts-top.ts-has-music .ts-bal { padding-inline: 10px; flex-shrink: 1; min-width: 0; }
@media (max-width: 380px) { .ts-top { gap: 6px; padding-inline: 12px; } .ts-title { font-size: 18px; } .ts-bal { padding: 8px 10px; font-size: 13px; } }

/* ---------- 画面区 ----------
 * 图和影片都是 4:3(1112×834):硬币在左(落定那一帧光环那一圈 x 13–48%、y 36–73%)、狼在右。
 * 高度 = 页面高度减掉下面那一块要的(--ts-below),最高 4:3(整张露出来),最矮 150px;矮了整块从上下各裁一点(中间偏下对齐,硬币和狼都在) */
.ts-hero { position: relative; flex: none; width: 100%; height: 36vh; height: clamp(150px, calc(100% - var(--ts-below)), calc(var(--ts-w) * .75)); overflow: hidden; background: var(--night); }
.ts-art { position: absolute; left: 0; right: 0; top: 56%; aspect-ratio: 4 / 3; transform: translateY(-56%); }
.ts-rig { position: absolute; inset: 0; }
.ts-still, .ts-end, .ts-clip { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; }
/* data-ts-mode(toss.js):still 狼拿着硬币 / wait 影片起播前(还是狼那张)/ clip 影片 / css 狼那张 + CSS 转币 / end 落定那一帧 */
.ts-hero[data-ts-mode="still"] .ts-still, .ts-hero[data-ts-mode="wait"] .ts-still, .ts-hero[data-ts-mode="css"] .ts-still, .ts-hero:not([data-ts-mode]) .ts-still { opacity: 1; }
.ts-hero[data-ts-mode="clip"] .ts-clip.is-on { opacity: 1; }
.ts-hero[data-ts-mode="end"] .ts-end { opacity: 1; animation: ts-land .38s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes ts-land { from { transform: scale(1.035); } to { transform: scale(1); } }
.ts-hero.is-missing .ts-art { opacity: .25; }
/* 收注中:狼轻轻呼吸(4 秒一圈) */
.ts-hero.is-betting[data-ts-mode="still"] .ts-still, .ts-hero.is-flip[data-ts-mode="still"] .ts-still { animation: ts-breathe 4s ease-in-out infinite; }
@keyframes ts-breathe { 50% { transform: scale(1.012); } }
/* CSS 转币(影片起不来、中途进来):硬币那一圈的位置上一枚黑白银币一直翻,翻到掀开那一刻换成落定那一帧 */
.ts-spin { position: absolute; left: 22%; top: 30%; width: 17%; aspect-ratio: 1; display: none; perspective: 600px; }
.ts-hero[data-ts-mode="css"] .ts-spin { display: block; }
.ts-spin-coin { position: absolute; inset: 0; transform-style: preserve-3d; animation: ts-spin .42s linear infinite; }
.ts-spin-coin b { position: absolute; inset: 0; border-radius: 50%; background: center / cover no-repeat; backface-visibility: hidden; box-shadow: 0 0 18px rgba(229, 255, 61, .35); }
.ts-spin-coin .is-h { background-image: url("/img/coin/face-heads.webp?v=1"); }
.ts-spin-coin .is-t { background-image: url("/img/coin/face-tails.webp?v=1"); transform: rotateY(180deg); }
@keyframes ts-spin { from { transform: translateY(0) rotateY(0deg); } 50% { transform: translateY(-14%) rotateY(180deg); } to { transform: translateY(0) rotateY(360deg); } }
/* 下边淡进页面的黑。叠的顺序:图 < 这层渐变 < 彩带 < 掀开的「头 / 尾」< 横幅 / 我的结果 */
.ts-hero::after { content: ''; position: absolute; z-index: 1; left: 0; right: 0; bottom: 0; height: 14%; background: linear-gradient(to bottom, rgba(10, 10, 10, 0), var(--bg)); pointer-events: none; }

/* 掀开那一下:画面上方中间亮出开出来的那一面(头柠檬、尾银白),结果画面一直亮着 */
.ts-call {
  position: absolute; z-index: 3; left: 50%; top: 8%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; padding: 6px 18px 6px 6px; border-radius: 999px;
  background: rgba(5, 6, 8, .82); box-shadow: 0 0 0 2px var(--neon), 0 0 24px rgba(229, 255, 61, .45);
  animation: ts-call .36s cubic-bezier(.2, .9, .3, 1.3) both;
}
.ts-call[hidden] { display: none; }
.ts-call b { font-size: clamp(22px, 7vw, 30px); font-weight: 900; letter-spacing: .06em; color: var(--neon); white-space: nowrap; }
.ts-call.is-tails { box-shadow: 0 0 0 2px var(--silver), 0 0 24px rgba(233, 237, 242, .35); }
.ts-call.is-tails b { color: var(--silver); }
.ts-call-coin { width: clamp(34px, 10vw, 44px); height: auto; border-radius: 50%; }
@keyframes ts-call { from { opacity: 0; transform: translateX(-50%) scale(.5); } to { opacity: 1; transform: translateX(-50%) scale(1); } }

/* 「停止下注」:柠檬色刷子横幅,斜着盖在画面中间偏下 */
.ts-stamp { position: absolute; z-index: 4; left: 50%; top: 80%; display: none; transform: translate(-50%, -50%); pointer-events: none; }
.ts-stamp b {
  display: block; padding: 8px 34px 10px; background: var(--neon); color: var(--neon-ink);
  font-size: clamp(22px, 7.4vw, 34px); font-weight: 900; letter-spacing: .06em; white-space: nowrap;
  clip-path: polygon(3% 12%, 18% 0, 46% 8%, 72% 0, 97% 10%, 100% 52%, 96% 92%, 70% 100%, 40% 91%, 14% 100%, 0 84%, 2% 46%);
  transform: rotate(-6deg);
}
.ts-hero.is-stamp .ts-stamp { display: block; animation: ts-stamp .28s cubic-bezier(.2, .8, .3, 1) both; }
@keyframes ts-stamp { from { opacity: 0; transform: translate(-50%, -50%) scale(1.5); } to { opacity: 1; transform: translate(-50%, -50%) scale(1); } }
.ts-flash { display: none; }

/* 结果画面上我的结果:赢了是黑色刷子底 + 柠檬「赢了」+ 白色大字金额;没中只在下方安静地写一行 */
.ts-res {
  position: absolute; z-index: 4; left: 50%; bottom: 9%; transform: translateX(-50%); max-width: calc(100% - 32px);
  display: grid; justify-items: center; gap: 2px; padding: 8px 20px; border-radius: 16px;
  background: rgba(10, 10, 10, .82); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .12); pointer-events: none;
  animation: ts-rise .28s ease-out both;
}
.ts-res[hidden] { display: none; }
.ts-res b { font-size: 22px; line-height: 1.1; font-weight: 900; font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-res .ts-lost, .ts-res .ts-got { font-size: 17px; color: var(--ink); }
.ts-res small { font-size: 15px; font-variant-numeric: tabular-nums; }
.ts-res .ts-loss { font-weight: 800; color: var(--bad); }
.ts-res.is-win {
  bottom: 12%; padding: 10px 34px 12px; border-radius: 0; background: #050505;
  box-shadow: 0 0 0 2px rgba(229, 255, 61, .55), 0 0 28px rgba(229, 255, 61, .25);
  clip-path: polygon(2% 10%, 30% 0, 66% 6%, 98% 0, 100% 46%, 97% 94%, 64% 100%, 30% 93%, 0 100%, 1% 50%);
  animation: ts-win .42s cubic-bezier(.2, .9, .3, 1.2) both;
}
.ts-res .ts-won-l { font-size: clamp(30px, 10vw, 46px); color: var(--neon); letter-spacing: .08em; }
.ts-res .ts-won { font-size: clamp(28px, 9vw, 42px); color: #fff; }
@keyframes ts-rise { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }
@keyframes ts-win { from { opacity: 0; transform: translateX(-50%) scale(.6) rotate(-4deg); } to { opacity: 1; transform: translateX(-50%) scale(1) rotate(0deg); } }
.ts-confetti { position: absolute; z-index: 2; inset: 0; overflow: hidden; pointer-events: none; }
.ts-confetti[hidden] { display: none; }
.ts-confetti i {
  position: absolute; top: -8%; left: calc(4% + var(--i) * 6.7%); width: 7px; height: 14px; border-radius: 2px;
  background: var(--neon); opacity: 0;
  animation: ts-fall 1.6s cubic-bezier(.3, .1, .6, 1) calc(var(--i) * 70ms) both;
}
.ts-confetti i:nth-child(3n) { background: #fff; width: 5px; }
.ts-confetti i:nth-child(4n) { background: var(--silver-2); height: 10px; }
@keyframes ts-fall { 0% { opacity: 0; transform: translateY(0) rotate(0deg); } 10% { opacity: 1; } 100% { opacity: 0; transform: translateY(820%) rotate(540deg); } }
.ts-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- 下面那一块(可以卷) ---------- */
.ts-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; display: flex; flex-direction: column; gap: 8px; padding: 6px var(--ts-pad) 8px; scrollbar-width: none; }
.ts-body::-webkit-scrollbar { display: none; }

/* 倒数圈 + 状态字(左)和最近几局(右)并成一行 */
.ts-strip { flex: none; display: flex; align-items: center; gap: 8px; min-height: 52px; }
.ts-recent {
  flex: 1 1 0; min-width: 0; display: flex; gap: 5px; overflow-x: auto; scrollbar-width: none; padding: 3px;
  -webkit-mask-image: linear-gradient(90deg, #000 84%, transparent); mask-image: linear-gradient(90deg, #000 84%, transparent);
}
.ts-recent::-webkit-scrollbar { display: none; }
.ts-recent:empty { display: none; }
.ts-rc { flex: none; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; }
.ts-rc-coin { display: block; width: 28px; height: 28px; border-radius: 50%; }
.ts-rc.is-new { box-shadow: 0 0 0 2px var(--neon); }
.ts-status { flex: none; max-width: 60%; display: flex; align-items: center; gap: 8px; min-height: 52px; padding: 4px 14px 4px 4px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ts-status.is-void, .ts-status.is-paused, .ts-status.is-wait { flex: 1 1 auto; max-width: none; padding-left: 14px; }
.ts-ring { position: relative; flex: none; width: 44px; height: 44px; display: grid; place-items: center; }
.ts-ring svg { position: absolute; inset: 0; width: 100%; height: 100%; transform: rotate(-90deg); }
.ts-ring circle { fill: none; stroke-width: 3.5; }
.ts-ring-bg { stroke: #2a2a2a; }
.ts-ring-fg { stroke: var(--neon); stroke-linecap: round; }
.ts-ring b { position: relative; font-size: 19px; font-weight: 900; font-variant-numeric: tabular-nums; }
.ts-state { min-width: 0; font-size: 17px; font-weight: 800; letter-spacing: .03em; line-height: 1.15; overflow-wrap: anywhere; }
.ts-status.is-stop .ts-state, .ts-status.is-shake .ts-state, .ts-status.is-open .ts-state { color: var(--neon); }
.ts-status.is-flip .ts-state, .ts-status.is-wait .ts-state, .ts-status.is-void .ts-state, .ts-status.is-paused .ts-state { color: var(--ink-2); font-size: 14px; }
.ts-status.is-void .ts-ring, .ts-status.is-paused .ts-ring, .ts-status.is-wait .ts-ring { display: none; }
html:not([lang^="zh"]) .ts-status { max-width: 66%; }
html:not([lang^="zh"]) .ts-state { font-size: clamp(13px, 3.9vw, 17px); letter-spacing: 0; }

/* 拔河条:左边押头(柠檬)、右边押尾(银白),全场各押了多少、几个人;条子照两边的金额分,中间一颗光点。开出来那一边亮、另一边暗下来 */
.ts-tug { flex: none; display: grid; gap: 6px; min-height: 50px; padding: 7px 12px 8px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); --h: 50%; }
.ts-tug-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.ts-tug-side { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-variant-numeric: tabular-nums; }
.ts-tug-side b { font-size: 15px; font-weight: 900; white-space: nowrap; }
.ts-tug-side small { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.ts-tug-side small svg { width: 12px; height: 12px; }
.ts-tug-side.is-heads b { color: var(--neon); }
.ts-tug-side.is-tails b { color: var(--silver); }
.ts-tug-coin { width: 20px; height: 20px; border-radius: 50%; flex: none; }
.ts-tug-bar { position: relative; height: 8px; border-radius: 999px; background: linear-gradient(90deg, var(--silver-2), var(--silver)); overflow: hidden; }
.ts-tug-h { position: absolute; left: 0; top: 0; bottom: 0; width: var(--h); background: linear-gradient(90deg, #c9e21f, var(--neon)); border-radius: 999px 0 0 999px; transition: width .45s cubic-bezier(.2, .8, .3, 1); }
.ts-tug-spark { position: absolute; top: 50%; left: var(--h); width: 14px; height: 14px; border-radius: 50%; transform: translate(-50%, -50%); background: #fff; box-shadow: 0 0 10px 3px rgba(255, 255, 255, .7); transition: left .45s cubic-bezier(.2, .8, .3, 1); }
.ts-tug.is-won-heads .ts-tug-side.is-tails, .ts-tug.is-won-tails .ts-tug-side.is-heads { opacity: .35; }
.ts-tug.is-won-heads .ts-tug-bar { box-shadow: 0 0 12px rgba(229, 255, 61, .55); }
.ts-tug.is-won-tails .ts-tug-bar { box-shadow: 0 0 12px rgba(233, 237, 242, .45); }

/* 头 / 尾两大格:左头右尾,硬币小图标 + 大字 + 常驻倍数,最下面一行全场押了多少;我押的筹码挂右上角(草稿虚线),
   中了亮框 + 「×1.90」角标、另一格暗下来,封盘后上锁。头的框是柠檬、尾的框是银白 */
.ts-board { flex: none; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: var(--ts-cell-h); gap: 10px; }
.ts-cell {
  position: relative; min-width: 0; min-height: 0;
  display: grid; grid-template-columns: auto auto; align-content: center; justify-content: center; align-items: center; column-gap: 10px; row-gap: 2px; padding: 10px 6px 24px;
  border-radius: 18px; background: radial-gradient(120% 100% at 50% 110%, #202416 0%, var(--surface) 70%); box-shadow: inset 0 0 0 1px var(--line);
  transition: transform .09s ease-out, opacity .2s ease-out;
}
.ts-cell.ts-tails { background: radial-gradient(120% 100% at 50% 110%, #1d2126 0%, var(--surface) 70%); }
.ts-cell-art { grid-row: span 2; display: grid; place-items: center; }
.ts-cell-coin { display: block; width: clamp(40px, 12vw, 52px); height: auto; border-radius: 50%; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .7)); }
.ts-cell-name { min-width: 0; max-width: 100%; font-size: clamp(26px, 8vw, 34px); font-weight: 900; line-height: 1.1; letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: .2em .1em; margin: -.2em -.1em; }
html:not([lang^="zh"]) .ts-cell-name { font-size: clamp(17px, 5vw, 22px); letter-spacing: 0; }
.ts-heads .ts-cell-name { color: var(--neon); }
.ts-tails .ts-cell-name { color: var(--silver); }
.ts-pay { display: block; font-style: normal; font-size: 13px; line-height: 15px; font-weight: 900; color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ts-cell.is-win .ts-pay { visibility: hidden; }
.ts-cell-sum {
  position: absolute; z-index: 1; left: 50%; bottom: 5px; transform: translateX(-50%); width: calc(100% - 16px); padding: 0 6px; border-radius: 999px;
  background: rgba(255, 255, 255, .05); font-size: 12px; line-height: 18px; text-align: center; color: var(--ink); font-weight: 800;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-variant-numeric: tabular-nums;
}
.ts-badge {
  position: absolute; top: -12px; right: -6px; z-index: 2; min-width: 28px; height: 24px; padding: 0 6px; border-radius: 999px;
  display: grid; place-items: center; background: var(--neon); color: var(--neon-ink); font-size: 11px; font-weight: 900; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #0a0a0a, 0 2px 6px rgba(0, 0, 0, .6);
}
.ts-tails .ts-badge { background: var(--silver); }
.ts-badge[hidden] { display: none; }
.ts-cell.is-draft .ts-badge { background: #0a0a0a; color: var(--neon); box-shadow: inset 0 0 0 2px var(--neon); outline: 1.5px dashed rgba(229, 255, 61, .7); outline-offset: 2px; }
.ts-tails.is-draft .ts-badge { color: var(--silver); box-shadow: inset 0 0 0 2px var(--silver); outline-color: rgba(233, 237, 242, .7); }
.ts-cell.is-pend .ts-badge { opacity: .6; animation: ts-pend .7s ease-in-out infinite alternate; }
@keyframes ts-pend { from { opacity: 1; } to { opacity: .45; } }
.ts-cell.is-win .ts-badge { right: auto; left: -6px; }
.ts-cell.is-on { box-shadow: inset 0 0 0 2px var(--neon); }
.ts-tails.is-on { box-shadow: inset 0 0 0 2px var(--silver); }
.ts-cell.is-draft { box-shadow: inset 0 0 0 1.5px rgba(229, 255, 61, .55); }
.ts-tails.is-draft { box-shadow: inset 0 0 0 1.5px rgba(233, 237, 242, .55); }
.ts-hit {
  position: absolute; top: -12px; right: -6px; z-index: 3; min-width: 44px; height: 24px; padding: 0 8px; border-radius: 999px;
  display: grid; place-items: center; background: var(--neon); color: var(--neon-ink); font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums;
  box-shadow: 0 0 0 2px #0a0a0a, 0 0 12px rgba(229, 255, 61, .55);
  animation: ts-pop .3s cubic-bezier(.2, .9, .3, 1.3) both;
}
.ts-tails .ts-hit { background: var(--silver); box-shadow: 0 0 0 2px #0a0a0a, 0 0 12px rgba(233, 237, 242, .5); }
.ts-hit[hidden] { display: none; }
.ts-cell.is-win { box-shadow: inset 0 0 0 2.5px var(--neon), 0 0 18px rgba(229, 255, 61, .35); }
.ts-tails.is-win { box-shadow: inset 0 0 0 2.5px var(--silver), 0 0 18px rgba(233, 237, 242, .3); }
.ts-board.is-result .ts-cell.is-dim { opacity: .35; }
@keyframes ts-pop { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(1); } }
.ts-lock {
  position: absolute; top: -11px; right: -5px; z-index: 2; display: none; width: 22px; height: 22px; padding: 4px; border-radius: 50%;
  background: var(--surface-2); color: var(--ink-2); box-shadow: 0 0 0 2px #0a0a0a, inset 0 0 0 1px var(--line);
}
.ts-lock svg { display: block; width: 100%; height: 100%; }
.ts-cell.is-locked { opacity: .62; }
.ts-cell.is-locked .ts-lock { display: block; }
.ts-cell.is-locked .ts-cell-coin { filter: grayscale(1) brightness(.7); }
.ts-cell.is-locked.is-on .ts-lock { display: none; }
.ts-cell.is-locked.is-on { opacity: 1; }
.ts-cell.is-locked.is-on .ts-cell-coin { filter: none; }
.ts-cell.is-full .ts-cell-art, .ts-cell.is-full .ts-pay { opacity: .4; }
.ts-board.is-open .ts-cell:active { transform: scale(.96); }

/* 筹码:八颗圆筹码(虚线圈),选中的柠檬色;八颗一排放不下就横着卷 */
.ts-chips { flex: none; display: flex; justify-content: space-between; gap: 5px; padding: 4px 8px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow-x: auto; scrollbar-width: none; }
.ts-chips::-webkit-scrollbar { display: none; }
.ts-chip {
  position: relative; flex: 0 0 44px; width: 44px; height: 44px; margin: 2px 0; border-radius: 50%;
  display: grid; place-items: center;
  background: radial-gradient(circle at 50% 36%, #2e2e2e 0%, #191919 74%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, .22), 0 2px 6px rgba(0, 0, 0, .6);
  font-size: 13px; font-weight: 900; font-variant-numeric: tabular-nums;
}
.ts-chip::before {
  content: ''; position: absolute; inset: 2px; border-radius: 50%;
  background: repeating-conic-gradient(from 0deg, #e8e8e8 0 14deg, transparent 14deg 45deg);
  -webkit-mask-image: radial-gradient(circle, transparent 66%, #000 67%);
  mask-image: radial-gradient(circle, transparent 66%, #000 67%);
  opacity: .6;
}
.ts-chip span { position: relative; }
.ts-chip.is-on { background: radial-gradient(circle at 50% 36%, #f2ff8a 0%, var(--neon) 70%); color: var(--neon-ink); box-shadow: 0 0 0 2px #0a0a0a, 0 0 0 4px var(--neon), 0 0 14px rgba(229, 255, 61, .45); }
.ts-chip.is-on::before { background: repeating-conic-gradient(from 0deg, #0a0a0a 0 14deg, transparent 14deg 45deg); opacity: .5; }
.ts-chip.is-dim { opacity: .4; }
.ts-chip:active { transform: translateY(1px) scale(.94); }

/* 三颗按钮:清除 / 重复(深色)+ 柠檬大键「确认下注 RM x」 */
.ts-acts { flex: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 2.1fr); gap: 8px; }
.ts-act, .ts-go { min-height: 52px; border-radius: 16px; font-size: 16px; font-weight: 800; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding: 0 8px; }
.ts-act { background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ts-go { background: var(--neon); color: var(--neon-ink); font-weight: 900; font-variant-numeric: tabular-nums; }
.ts-go span { display: block; overflow: hidden; text-overflow: ellipsis; }
html:not([lang^="zh"]) .ts-acts { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.8fr); }
html:not([lang^="zh"]) .ts-act, html:not([lang^="zh"]) .ts-go { font-size: clamp(12px, 3.6vw, 15px); padding: 0 6px; }
html:not([lang^="zh"]) .ts-go span { white-space: normal; line-height: 1.12; overflow-wrap: anywhere; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; }
.ts-act:disabled, .ts-go:disabled { opacity: .38; }
.ts-go:disabled { background: #383838; color: #9a9a9a; opacity: 1; }
.ts-act:active:not(:disabled), .ts-go:active:not(:disabled) { transform: scale(.97); }
.ts-acts.ts-wait .ts-go { opacity: .6; }

/* 在线人数 + 本局赢家 + 下注名单 */
.ts-foot { flex: none; display: flex; align-items: center; min-height: 32px; }
.ts-online { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); font-size: 13px; font-weight: 700; }
.ts-online[hidden] { display: none; }
.ts-online i { width: 8px; height: 8px; border-radius: 50%; background: var(--neon); box-shadow: 0 0 6px rgba(229, 255, 61, .7); }
.ts-winners, .ts-feed { flex: none; padding: 10px 14px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.ts-winners[hidden], .ts-feed[hidden] { display: none; }
.ts-w-h, .ts-feed-h { font-size: 14px; font-weight: 900; color: var(--neon); text-align: center; }
.ts-feed-h { color: var(--ink-2); }
.ts-w-rows, .ts-feed-rows { list-style: none; padding: 0; margin-top: 4px; display: grid; }
.ts-w-rows li, .ts-feed-rows li { display: flex; align-items: center; gap: 10px; padding: 8px 2px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ts-w-rows li:last-child, .ts-feed-rows li:last-child { border-bottom: 0; }
.ts-w-n, .ts-feed-n { flex: 1; min-width: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-w-rows b, .ts-feed-rows b { font-variant-numeric: tabular-nums; }
.ts-w-rows li:first-child b { color: var(--neon); }
.ts-feed-coin { width: 18px; height: 18px; border-radius: 50%; flex: none; }
.ts-feed-s { flex: none; font-weight: 800; }
.ts-feed-rows .is-heads .ts-feed-s { color: var(--neon); }
.ts-feed-rows .is-tails .ts-feed-s { color: var(--silver); }

@media (max-width: 380px) {
  .toss { --ts-pad: 12px; --ts-cell-h: 88px; }
  /* 360 宽:八颗筹码一排要放得下(38 × 8 + 间距 + 左右留白 ≤ 336) */
  .ts-chips { padding-inline: 4px; gap: 2px; }
  .ts-chip { flex-basis: 38px; width: 38px; height: 38px; font-size: 11px; }
  .ts-act, .ts-go { font-size: 15px; }
}

/* 关了动态效果:不呼吸、不转、不撒彩带;落定那一帧直接出来,横幅和结果照样出 */
@media (prefers-reduced-motion: reduce) {
  .ts-hero .ts-still, .ts-hero[data-ts-mode="end"] .ts-end, .ts-spin-coin, .ts-call, .ts-hero.is-stamp .ts-stamp, .ts-res, .ts-res.is-win, .ts-confetti i, .ts-hit, .ts-cell.is-pend .ts-badge { animation: none; }
  .ts-confetti { display: none; }
  .ts-cell, .ts-tug-h, .ts-tug-spark { transition: none; }
}
