/* ============================================================
   抓娃娃机 — 全部样式合并: 主界面 + 5 档奖励弹窗
   保留 clawMain.css 全部 + rewardPopup.css 全部.
   ============================================================ */

:root {
  --neon-pink: #ff3dd1;
  --neon-magenta: #ff2d8a;
  --neon-yellow: #ffd84d;
  /* 心动圈主调 — 主界面 UI 统一用这套, 老的 --neon-* 保留给奖励弹窗 + launch 黄光 */
  --cm-heart-light: #ffd6e2; /* why: TIERS[0].glow, 主界面浅粉高光基础 */
  --cm-heart-mid:   #ff7aa9; /* why: TIERS[1].color, 默认中粉 */
  --cm-heart-deep:  #c70a59; /* why: TIERS[5].color, 警戒 / 深玫 */
  --cm-heart-dark:  #2a0a18; /* why: 酒红黑底, 替换原紫 (15,6,30) */

  /* ── iOS 液态玻璃材质规范(全息换肤) — 真折射(#liquidGlass 位移滤镜) + 极透 + 渐变受光描边. 引用处一处调、全局变 ── */
  --cm-glass-fill: rgba(255, 255, 255, .03);              /* 极淡填充 = 更透 */
  --cm-glass-specular: linear-gradient(150deg, rgba(255,255,255,.5) 0%, rgba(255,255,255,.07) 11%, transparent 30%); /* 顶部迎光斜反光(烤进 background) */
  --cm-glass-backdrop: blur(6px) saturate(1.9) brightness(1.05);   /* 磨砂玻璃(去折射): 清透略糊 + 高饱和, 各端一致 */
  --cm-glass-backdrop-fb: blur(6px) saturate(1.9) brightness(1.05);
  --cm-glass-shadow: inset 0 1px 0 rgba(255,255,255,.5), 0 1px 2px rgba(0,0,0,.22), 0 18px 44px rgba(0,0,0,.34); /* 顶高光 + 贴身接触影 + 环境柔影 */
  --cm-glass-edge: linear-gradient(135deg, rgba(255,255,255,.95), rgba(255,255,255,.22) 32%, rgba(255,255,255,.04) 60%, rgba(255,255,255,.34)); /* 渐变受光描边(左上亮右下暗) */
  /* 弹窗(文字多)的玻璃底垫色 — 比纯装饰卡深, 压住亮视频背景, 配文字描边保证白字可读 */
  --cm-glass-popup-tint: rgba(10, 14, 26, .42);
  /* 弹窗文字黑描边 — 亮背景下白字可读的主力(玻璃底提供均值对比, 描边补足最亮处) */
  --cm-glass-text-outline: 0 1px 2px rgba(0,0,0,.92), 0 0 3px rgba(0,0,0,.72), 0 0 1px rgba(0,0,0,.9);
  /* 圆角梯度(统一, 防"东一个圆角西一个") */
  --cm-glass-r-pop: 20px;   /* 弹窗 */
  --cm-glass-r-card: 16px;  /* 卡片 */
  --cm-glass-r-btn: 14px;   /* 按钮 */
  --cm-glass-r-pill: 999px; /* 胶囊 */
  --ui-top-control-scale: calc(min(100vw, 56.25dvh) / 607.5px); /* why: 1920×1080 中 9:16 游戏画框宽 607.5px；顶部阶段条以该尺寸为 1 倍，并按实际受宽度或高度限制后的画框同比缩放。 */
  /* ★调色板白名单(审美一致的颜色集; QA 扫任何越界杂色) —
     结构 = 白 #fff / 玻璃白膜 rgba(255,255,255,.03~.14) / 黑描边;
     强调 = 暖金 #ffe1a0;  语义 = 粉(超级大奖) / 红(警告);
     镭射彩(仅镭射环 & 少量按钮 inset) = 粉 #ff469f / 蓝 #5abef7 / 金 #ffe36e / 紫 #966eff;
     ❌ 禁用: 青荧光(#67e8ff / rgb 103,232,255 / 126,230,255…) / 蓝荧光 / CCTV 绿(#b8f5cc) */
}

/* iOS玻璃: 弹窗内文字统一黑描边(text-shadow 继承) — 亮视频背景下白字可读的主力; 有自己 text-shadow 的子元素(清青荧光时)一并改 */
.cm-mult-popup, .cm-ad-popup.cm-holo,
.cm-rate-popup, .cm-temp-prompt, .tq-announce {
  text-shadow: var(--cm-glass-text-outline);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; user-select: none; }
html, body, #root { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
body {
  background: #000;
  font-family: "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", ui-sans-serif, system-ui, -apple-system, sans-serif;
  color: #fff;
}

/* ── 9:16 frame ───────────────────────────────────────────── */
.cm-stage-wrap {
  position: fixed; inset: 0;
  display: grid; place-items: center;
  touch-action: manipulation;
}
.cm-frame {
  position: relative;
  aspect-ratio: 9 / 16;
  height: 100vh; /* why: 老内核 (微信 X5 / iOS 14-) 不认 dvh, 没这行高度塌 0 全黑屏; 认 dvh 的浏览器被下一行覆盖 */
  height: 100dvh;
  max-width: 100vw;
  width: auto;
  overflow: hidden;
  background: transparent;
  cursor: pointer;
}

/* ── 抖音真机安全区临时标线（仅 safe-area-debug=1） ────────── */
.cm-douyin-safe-debug {
  position: absolute;
  inset: 0; /* why: 标线坐标系必须与整个 9:16 游戏画框完全重合，才能换算抖音屏幕坐标 */
  z-index: 9999; /* why: 临时验收标线必须盖住所有游戏 HUD 和弹窗，避免误判遮挡关系 */
  pointer-events: none; /* why: 死区标记只做测量，不能抢走任何游戏点击或滑动 */
}
.cm-douyin-notch-zone {
  position: absolute;
  top: 0; /* why: safeArea.top 表示从屏幕顶边开始应避开的高度 */
  left: 0; /* why: 刘海/状态栏型号不可穷举，按官方 safeArea 保守圈整条顶部带 */
  width: 100%; /* why: 整条顶部都不放关键按钮，避免仅绕开某款居中刘海后在其他机型出错 */
  min-height: 0; /* why: 无刘海设备允许 API 返回零高，不能人为制造死区 */
  border: 2px dashed rgba(255, 77, 109, .98); /* why: 高饱和红色虚线只用于调试，能从任何视频背景中辨认 */
  background: rgba(255, 45, 85, .18); /* why: 低透明红色显示禁放范围，同时保留下面 UI 可见以检查冲突 */
  box-shadow: inset 0 0 18px rgba(255, 45, 85, .45); /* why: 内辉光强调这是整块区域而不只是一条边线 */
  display: grid;
  place-items: center;
  color: #fff; /* why: 标注在红色调试带和复杂视频上都需要保持可读 */
  font-size: clamp(10px, 2.8cqw, 14px); /* why: 窄手机仍可读，桌面预览不会放大成正式 UI */
  font-weight: 900; /* why: 调试标签必须在半透明视频背景上快速识别 */
  letter-spacing: .04em; /* why: 粗体中文字稍微拉开，避免小字号糊成一块 */
  text-shadow: 0 1px 5px rgba(78, 0, 18, .95); /* why: 深红阴影增强浅色画面上的标签边界 */
}
.cm-douyin-capsule-zone {
  position: absolute;
  border: 1px solid rgba(255, 255, 255, .82); /* why: 内层还原官方 mock 的浅色胶囊边界，避免长文字把尺寸感知撑大 */
  outline: 2px dashed rgba(55, 229, 255, .98); /* why: 青色虚线独立圈出 API 返回的胶囊矩形，不改变元素实际宽高 */
  outline-offset: 2px; /* why: 标线与胶囊本体略微分开，用户能同时看清平台形状和死区边界 */
  border-radius: 999px; /* why: 胶囊矩形在任何真机宽高下都保持完整圆角轮廓 */
  background: rgba(248, 248, 250, .82); /* why: 官方适配图使用浅色半透明胶囊，本地预览应先还原本体而不是填成整块青色 */
  box-shadow: 0 0 12px rgba(55, 229, 255, .66); /* why: 单层青色辉光只强调调试边界，不再夸大胶囊内部体积 */
  color: rgba(20, 20, 24, .94); /* why: 浅色平台胶囊上的菜单与关闭符号使用高对比深色 */
}
.cm-douyin-capsule-symbols {
  width: 100%; /* why: 两个系统按钮各占胶囊一半，直观看出这不是普通游戏按钮 */
  height: 100%; /* why: 符号垂直触控范围与 API 返回的胶囊高度一致 */
  display: flex;
  align-items: center;
  justify-content: stretch;
  font-size: clamp(15px, 4cqw, 20px); /* why: 菜单点与关闭符号按画框宽度缩放，保持官方 mock 的视觉权重 */
  font-weight: 700; /* why: 系统符号需要清晰但不能粗到改变胶囊大小感 */
  line-height: 1; /* why: 去除字体默认行高，符号才能严格居中于测量矩形 */
}
.cm-douyin-capsule-symbols > i {
  flex: 1 1 50%; /* why: 菜单与关闭各占一半，复现平台双按钮胶囊结构 */
  height: 68%; /* why: 分隔线不顶到圆角边缘，接近官方胶囊的内部分区 */
  display: grid;
  place-items: center;
  font-style: normal;
}
.cm-douyin-capsule-symbols > i + i {
  border-left: 1px solid rgba(20, 20, 24, .22); /* why: 轻分隔线表达两个系统按钮，不制造额外死区 */
}
.cm-douyin-capsule-label {
  position: absolute;
  top: calc(100% + 7px); /* why: 说明移到胶囊下方，绝不再占用或扭曲本体尺寸 */
  right: calc(100% + 8px); /* why: 设置按钮已放在胶囊正下方，尺寸标签移到左下侧才能避免遮住真实布局验收目标。 */
  padding: 4px 7px; /* why: 紧凑底板只承载调试尺寸，不伪装成正式 UI */
  border-radius: 6px; /* why: 小圆角说明牌与平台胶囊轮廓明显区分 */
  background: rgba(0, 60, 75, .88); /* why: 深青底呼应调试虚线，并在视频上保持稳定可读 */
  color: #fff; /* why: 尺寸数字需要在深青底上保持最高对比 */
  font-size: 10px; /* why: 调试尺寸是辅助信息，不能比平台符号更醒目 */
  font-weight: 800; /* why: 小字号数字在高密度屏上仍需清楚 */
  line-height: 1; /* why: 单行尺寸说明保持紧凑，不影响胶囊位置判断 */
  white-space: nowrap;
}
.cm-douyin-safe-source {
  position: absolute;
  top: 88px; /* why: 桌面模拟时放在两块死区下方，避免标签互相覆盖 */
  left: 8px; /* why: 靠左留出胶囊所在的右上区域，并保留轻微屏幕边距 */
  padding: 5px 8px; /* why: 紧凑底板足以说明坐标来源，不抢占布局检查视野 */
  border-radius: 7px; /* why: 小圆角与两块虚线轮廓区分，表明它只是来源说明 */
  background: rgba(0, 0, 0, .72); /* why: 深色半透明底保证来源说明在所有视频上可读 */
  color: rgba(255, 255, 255, .96); /* why: 来源说明保持高对比但略低于死区主标签 */
  font-size: 10px; /* why: 只承担调试说明，不应被误认为正式游戏文字 */
  font-weight: 800; /* why: 小字在高密度手机屏上仍要清晰 */
  letter-spacing: .02em; /* why: 极小字号轻微扩字改善可读性 */
  white-space: nowrap;
}
@media (max-aspect-ratio: 9/16) {
  .cm-frame { height: auto; width: 100vw; }
}

/* swipe-stage: 包当前 + next loop video, 上下滑切娃娃机时整体 translateY */
.cm-swipe-stage {
  position: absolute; inset: 0;
  z-index: 0;
  pointer-events: none;
  will-change: transform;
}

/* 背景视频垫底 — 两个 video 元素叠在一起, 用 opacity 切换 */
.cm-bg-video {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  transition: opacity .3s ease;
}
.cm-bg-video.hidden { opacity: 0; }
.cm-bg-video-launch {
  opacity: 0;
  z-index: 1; /* 启动时比 loop 高一层, 跟 fx canvas (z:8) 同样在 UI 下 */
}
.cm-bg-video-launch.active { opacity: 1; }
/* why: swipe 期间预渲染的下一台机视频; top 由 JSX inline style 给 (100% / -100%) */
.cm-bg-video-next {
  /* inset 被 .cm-bg-video 设了, 这里把 top/bottom/right reset, 只留 left + width + height */
  top: auto;
  bottom: auto;
  right: auto;
  left: 0;
  height: 100%;
}

/* 粒子 canvas — why(用户钦定"动效高于所有 PNG"): 从 z:8(原在 UI 之下, 粒子被 HUD 框 PNG 挡住)提到 z:16,
   盖过所有 HUD 框 PNG(最高 tabbar z:15), 仍在弹窗/遮罩(220+)之下 — 抓奖飞币/爱心等粒子动效落在 HUD 之上可见 */
.cm-fx-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  /* why(用户改稿"动效永远在最上面"): 粒子层置于所有 HUD 之上(礼包/限时 z35, 导航 z15, 顶栏 z10~11 等都在其下),
     只低于模态弹窗层(220+, 开弹窗时不该被游戏粒子糊住). */
  z-index: 200;
}

/* ── 触碰区位置视频 ────────────────────────────────────────── */
/* 位置占位"视频" — 满圈命中后切到这层, 盖住 loop; pointer-events:none 让点击穿透继续充能 */
.cm-touch-video {
  position: absolute; inset: 0;
  z-index: 2; /* why: 盖住 loop(0), 但在 fx(8)/UI(10) 之下 — 金币体力等 HUD 仍可见 */
  display: flex; align-items: center; justify-content: center;
  pointer-events: none;
  animation: cmTouchVideoIn .2s ease; /* why: 0.2s 淡入, 让切入不生硬 */
}
/* 真互动视频 — 裁切跟 .cm-bg-video 一致; 黑底盖住解码前的瞬间.
   why: width/height 100% 必须显式写 — <video> 是替换元素, 光靠继承来的 inset:0 不会拉伸,
        会按原生像素 (1084x1912) 渲染, 溢出画框看着像"放大了 3 倍" (上线翻车实例) */
video.cm-touch-video-real { width: 100%; height: 100%; object-fit: cover; background: #000; }
/* why: 某部位/通用没配真视频时的占位底 — 灰蓝中性色, 配大字"缺：xx视频"提示设计师还缺哪段素材 */
.cm-touch-placeholder { background: #4a5360; }
.cm-touch-video-label {
  color: #fff;
  font-size: clamp(40px, 12vw, 96px); /* why: 随画面宽缩放, 小屏不溢出、大屏够醒目 */
  font-weight: 800;
  letter-spacing: .08em;
  text-shadow: 0 4px 18px rgba(0,0,0,.35);
}
@keyframes cmTouchVideoIn { from { opacity: 0; } to { opacity: 1; } }

/* ── 方案4：视频双层溶解 ──────────────────────────────────────
   why(用户在预览台确认): 260ms 交叉溶解 + 260ms 柔光退净，黑幕峰值 18%，blur 2px，scale 0.4%，ease-in-out。
   复制层 z3 压住 loop/launch/touch(z0/1/2)，柔光幕 z4；二者都低于 HUD 与游戏特效，不会把操作界面一起闪掉。 */
.cm-video-dissolve-layer,
.cm-video-dissolve-veil {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0;
}
.cm-video-dissolve-layer {
  z-index: 3;
  object-fit: cover;
  transform: scale(1);
  filter: blur(0);
  will-change: opacity, transform, filter;
}
.cm-video-dissolve-layer.is-visible { opacity: 1; }
.cm-video-dissolve-layer.is-outgoing {
  opacity: 0;
  transform: scale(1.004);
  filter: blur(2px);
  transition: opacity 260ms ease-in-out, transform 260ms ease-in-out, filter 260ms ease-in-out;
}
.cm-video-dissolve-veil {
  z-index: 4;
  background: #000;
  will-change: opacity;
}
.cm-video-dissolve-veil.is-active { animation: cmVideoDissolveVeil 520ms ease-in-out both; }
.cm-video-dissolve-in { animation: cmVideoDissolveIn 260ms ease-in-out both !important; }
@keyframes cmVideoDissolveIn {
  from { opacity: 0; transform: scale(1.004); filter: blur(2px); }
  to { opacity: 1; transform: scale(1); filter: blur(0); }
}
@keyframes cmVideoDissolveVeil {
  0% { opacity: 0; }
  50% { opacity: .18; }
  100% { opacity: 0; }
}

/* why: 上下滑动切机期间, 和机台强绑定的 UI + 全局 HUD 跟着滑动进度"渐隐"(而不是一帧消失) —
   它们在 swipe-stage 外固定不动, 拖到一半会浮在原位 (用户钦定的 glitch). 透明度由
   --cm-swipe-fade 驱动: pointermove 每帧按 |dy| 实时改 (绕过 React, 跟 stage transform 同套路),
   所以缓缓下滑越来越淡、不松手反向上滑又越来越实, 透明度严格绑定手指位移. 默认 1 = 不滑时全显.
   ⚠ opacity 必须加在"要淡的元素自己"上, 绝不能加在容器上 — 祖先 opacity<1 会让后代的 backdrop-filter
   (毛玻璃) 整块失效 (CSS 规范: opacity<1 形成隔离组, blur 没背景可采样), 表现为毛玻璃一帧消失/出现.
   故 topbar 也"不淡容器改淡叶子": ×N 方块 .cm-mult-chip 嵌在 .cm-tl-group 里且自带 blur,
   淡 .cm-tl-group 容器会一帧掐断它 (老 bug 复发) → 改淡 .cm-coin-pill (直接子, 自带 blur, 自身 opacity)
   + .cm-tl-group > * (.cm-stam-wrap 无 blur / .cm-mult-chip 自带 blur, 各自扛 opacity, blur 不断);
   充能舱不淡容器、改淡叶子 — 充能条 .cm-bar-neon (blur 在自身) / 爪子磨砂球 .cm-claw-btn::before
   (blur 在伪元素 → 只淡伪元素自己 + 爪子前景 svg/缝线, 不能淡 .cm-claw-btn 本体否则又杀球 blur) / 启动字. */
/* why(#6): 左侧 UI 按钮(体力/倍率/金币/礼包/限时)滑动切机时不再淡出 — 从渐隐组移除 .cm-coin-pill / .cm-tl-group>* / .cm-gift-btn (限时 .cm-trigger-box 的渐隐规则也一并去掉);
   仍随手指淡出的只剩机台强绑定的中心/顶部件(充能条/心动圈/爪子前景/粒子/临时角标等). */
.cm-temp-badge,
.cm-bar-neon,
.cm-claw-btn::before,
.cm-claw-btn > svg,
.cm-claw-deco,
.cm-claw-label,
.cm-ring-stage,
.tq-card,
.cm-fx-canvas { opacity: var(--cm-swipe-fade, 1); }
/* why: is-swiping (swipeNext 非空, 拖过 12px 起到落定动画清空) 期间掐掉这组的命中 —
   渐隐后元素还在 DOM, 不屏蔽的话半透明的锁按钮等仍可点, 保住"滑动穿透不误触"的老行为. */
.cm-frame.is-swiping .cm-topbar,
.cm-frame.is-swiping .cm-temp-badge,
.cm-frame.is-swiping .cm-machine-lock,
.cm-frame.is-swiping .cm-charge-overlay,
.cm-frame.is-swiping .cm-ring-stage,
.cm-frame.is-swiping .tq-card,
.cm-frame.is-swiping .cm-gift-btn,
.cm-frame.is-swiping .cm-trigger-box,
.cm-frame.is-swiping .cm-fx-canvas { pointer-events: none; }
/* why: 仅松手后的 commit/cancel 回落阶段给 opacity 上过渡 (落定平滑); 拖拽中绝不能有过渡,
   否则透明度滞后手指. is-swipe-settling 由松手时临时挂上, 落定后摘掉. 280ms 对齐 stage 回落. */
.cm-frame.is-swipe-settling .cm-coin-pill,
.cm-frame.is-swipe-settling .cm-tl-group > *,
.cm-frame.is-swipe-settling .cm-temp-badge,
.cm-frame.is-swipe-settling .cm-bar-neon,
.cm-frame.is-swipe-settling .cm-claw-btn::before,
.cm-frame.is-swipe-settling .cm-claw-btn > svg,
.cm-frame.is-swipe-settling .cm-claw-deco,
.cm-frame.is-swipe-settling .cm-claw-label,
.cm-frame.is-swipe-settling .cm-ring-stage,
.cm-frame.is-swipe-settling .tq-card,
.cm-frame.is-swipe-settling .cm-gift-btn,
.cm-frame.is-swipe-settling .cm-trigger-box,
.cm-frame.is-swipe-settling .cm-fx-canvas { transition: opacity 280ms cubic-bezier(.2,.7,.2,1); }

/* why(#6): 限时框 .cm-trigger-box 滑动时不再淡出(属左侧按钮, 保持显示) — 原随手指淡出规则已移除 */

/* ── 顶部 — 左体力, 右金币 ────────────────────────────────── */
.cm-topbar {
  /* why: top 14→8 (上移 6) / left 22→14 (左移 8) — 用户钦定整组再往左上贴一点 */
  position: absolute; top: 8px; left: 14px; right: 14px;
  z-index: 10;
  /* why: 左上角 [×N 精力环] 一组靠左, 金币框靠右 → space-between; align-items center 让左组与右金币竖直居中对齐 */
  display: flex; align-items: center; justify-content: space-between;
  pointer-events: none;
}
.cm-topbar > * { pointer-events: auto; }
/* why: 总览相关视图下藏 topbar (不卸载, refs / state 保留) */
.cm-topbar.is-hidden { display: none; }

/* ── 弹窗独占: 任一弹窗打开 → 只隐藏"浮动额外入口"(新手礼包 / 触发框), 弹窗消失后淡回 (用户钦定) ──
   why: 用户钦定 — 基本 HUD(体力环 / 倍率 / 启动键 / 金币)是常驻核心, 弹窗时也必须保留不隐藏;
        只让礼包、触发框这类非常驻浮动入口在弹窗期间让位, 避免误触. opacity+pointer-events 留淡出过渡. */
.cm-frame.is-popup-solo .cm-gift-btn,
.cm-frame.is-popup-solo .cm-trigger-box {
  /* why: 主隐藏手段用 visibility — 礼包 opacity 被 `.cm-gift-btn{opacity:var(--cm-swipe-fade)}` + 自带 transition 纠缠,
     实测连 inline opacity:0!important 都被 transition 锁在起点值 1、压不住; visibility:hidden 不受其影响, 稳定隐藏.
     animation:none 顺手停掉弹跳(cm-gift-bounce); opacity:0 作冗余兜底. */
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
  animation: none !important;
}

/* why: 左上角一行 — [×N 方块] [精力环], ×N 在环正左; align-items center → ×N 与环中心线对齐 (用户钦定) */
.cm-tl-group {
  display: flex; align-items: center; gap: 8px;
}
/* (已清理: .cm-tl-col / .cm-tl-row-coin / .cm-tl-slot-stam — 金币挪到右上角后 2×2 网格作废, JSX 已无引用) */
/* (已清理: .cm-home-btn 三条规则 — 家园入口早改走底部 tab, JSX 无引用, 死样式留着误导改样式的人) */

/* why: 家园 iframe 模态 — 撑满整个 frame, tab 栏 (z:12) 盖底部 38px */
.cm-home-modal {
  position: absolute; inset: 0;
  z-index: 11; /* why: 在 dock(10)/fx(8) 上, 在 tabbar(12) 下 → tab 栏盖在 home modal 底部 */
  background: #fff9fb;
  pointer-events: auto;
  animation: cmHomeIn .25s ease-out;
}
/* why(用户"相机互动整个页面层级应高于常态, 任务提示特效也要隐藏"): 家园特写视频播放中 → 把家园模态 z 从 20 拉到 200,
   盖过父窗一切常态 HUD/任务提示层 (z50~180), 低于弹窗层(220) — 相机互动期本就不会开弹窗, 故安全; 视频独占全屏.
   视频结束移除 heart-video 后自动回落 z11. */
.cm-home-modal.heart-video { z-index: 200; }
@keyframes cmHomeIn {
  from { opacity: 0; transform: scale(.98); }
  to   { opacity: 1; transform: scale(1); }
}
.cm-home-iframe {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  border: 0;
  display: block;
}
/* (已清理: .cm-home-close 三条规则 — 家园关闭走 iframe 内 × + postMessage, JSX 无引用) */

/* why: stamina ring wrapper 包一层让 ring 整体可点击 (ring 本身 pointer-events:none) */
.cm-stam-wrap {
  position: relative;
  cursor: pointer;
  pointer-events: auto;
}

/* 精力详情弹窗 */
/* why: 旧粉色精力详情弹窗已改全息投影款(见 .cm-stam-holo, 复用 .cm-ad-popup.cm-holo 皮肤),
   原 .cm-stam-popup-mask / .cm-stam-popup 整套粉色样式已删除. 仅保留遮罩淡入关键帧(下方 .cm-rate-mask 仍在用). */
@keyframes cmStamPopupMaskIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── 爆率详情弹窗 — 全息板风格 (仿 .cm-upg), 从火力全开圈位置放大/缩回 ── */
.cm-rate-mask {
  position: absolute; inset: 0;
  /* why: 全息投影 — 底色透明度大幅降低, 几乎只透出场景, 不再磨砂 (用户钦定"底色透明度减低很多") */
  background: rgba(6, 16, 34, 0.14);
  z-index: 220;
  animation: cmStamPopupMaskIn .18s ease-out;
}
.cm-rate-popup {
  position: absolute;
  /* why: 全息投影 — 顶部锚定(进度条下方), transform-origin 顶部, 向下 scaleY 展开 "徐徐投射" */
  transform: translateX(-50%);
  transform-origin: top center;
  width: min(82%, 300px);
  padding: 14px 16px 13px;
  border: none;
  border-radius: 20px;
  /* iOS玻璃: 玻璃底(顶部迎光反光 + 淡深垫底保证白字可读) */
  background: var(--cm-glass-specular), var(--cm-glass-popup-tint);
  color: rgba(255, 255, 255, .96);
  box-shadow: var(--cm-glass-shadow);
  overflow: hidden;
  font-family: -apple-system, "PingFang SC", sans-serif;
  /* why: 量不到启动键时的兜底位移 — 默认从正上方一点飞入 */
  --fly-dx: 0px;
  --fly-dy: -36px;
  /* why: .42s 保留从启动键飞到落点的空间联系，同时去掉后半段乱码切片、横抖和亮度跳帧 */
  animation: cmRateFlyIn .42s cubic-bezier(.32, .82, .3, 1) both;
  z-index: 221;
}
.cm-rate-popup > * { position: relative; z-index: 1; }
/* iOS玻璃: 渐变受光描边 */
.cm-rate-popup::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px;
  background: var(--cm-glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
/* why: 原"发射线"(光从进度条投下来)随下拉动画一并去掉 — 不再有投射方向 */
.cm-rate-popup.is-closing {
  /* why: .28s 平滑缩回启动键，比入场略快但仍可看清去向；forwards 保持透明直到 React 卸载 */
  animation: cmRateFlyOut .28s cubic-bezier(.55, .06, .68, .19) forwards;
}
/* why: 只保留位置、缩放和透明度的连续插值；起点 .55 倍/.15 透明度沿用原飞入观感，但完全移除故障切片和闪烁属性 */
@keyframes cmRateFlyIn {
  0%   { opacity: .15; transform: translate(calc(-50% + var(--fly-dx)), var(--fly-dy)) scale(.55); }
  100% { opacity: 1;   transform: translateX(-50%) scale(1); }
}
/* why: 退场严格回到同一启动键几何原点；与入场共用 --fly-dx/--fly-dy，避免关闭时横向抽动或碎裂闪帧 */
@keyframes cmRateFlyOut {
  0%   { opacity: 1; transform: translateX(-50%) scale(1); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--fly-dx)), var(--fly-dy)) scale(.55); }
}
.cm-rate-title {
  margin: 0 0 12px;
  font-size: 16px; font-weight: 800; letter-spacing: .5px;
  text-align: center;
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-rate-boostlv { font-size: 12px; color: #ffd84d; font-weight: 700; }
.cm-rate-list {
  list-style: none; padding: 0; margin: 0 0 12px;
  display: grid; gap: 6px;
}
.cm-rate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 12px;
  border-radius: 8px;
  /* iOS玻璃: 行底去蓝膜/青描边改中性淡白玻璃感 */
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .14);
  border-left: 2px solid rgba(255, 255, 255, .40);
  font-size: 13px; font-weight: 600;
  letter-spacing: .3px;
}
.cm-rate-row .lbl { color: #ffffff; text-align: left; }
.cm-rate-row .lbl em { font-style: normal; font-size: 11px; color: rgba(255, 255, 255, .62); margin-left: 2px; }
.cm-rate-row .num {
  font-variant-numeric: tabular-nums;
  font-size: 15px; font-weight: 800; color: #ffffff;
  /* 去青光晕, 继承容器黑描边(--cm-glass-text-outline)保证亮背景可读 */
  margin-left: 8px; flex-shrink: 0;
}
/* 超级大奖行数字保留粉高亮(语义, 一眼锁定最高奖) + 黑描边保可读 */
.cm-rate-row.is-jackpot .num { color: #ff9fce; text-shadow: var(--cm-glass-text-outline); }
.cm-rate-boost-btn {
  width: 100%;
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  padding: 10px;
  border: 1px solid rgba(255, 255, 255, .60); /* why(iOS玻璃): 去青边→中性白, 保留原 .60 alpha */
  border-radius: 12px;
  background-color: transparent;
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .20), rgba(255, 255, 255, .06)); /* why(iOS玻璃): 蓝青玻璃底→中性白, 保留各层 alpha 维持透明层次 */
  color: #fff; cursor: pointer; font-family: inherit;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .50); /* why(iOS玻璃): 去掉外圈青光发光层, 只留顶部白高光结构 */
  transition: transform .12s ease, filter .2s ease;
}
.cm-rate-boost-btn:active { transform: scale(.96); filter: brightness(.95); }
.cm-rate-boost-btn .bi { font-size: 20px; line-height: 1; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
.cm-rate-boost-btn .bt {
  font-size: 14px; font-weight: 800; letter-spacing: .5px;
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 去青字辉光(深蓝描影+青光晕)→ 统一黑描边 token, 亮玻璃底仍可读 */
}
.cm-rate-boost-btn .bd { font-size: 10.5px; color: rgba(255, 255, 255, .82); text-shadow: var(--cm-glass-text-outline); } /* why(iOS玻璃): 副标去青→白(留 .82 弱化保持主次), 描影→黑 token */

/* why: 增益生效提示 — 概率弹窗里告知"已 ×2", 暖金调区别于蓝白概率行 */
.cm-rate-buff-note {
  margin-top: 8px; padding: 7px 10px; border-radius: 10px;
  background: rgba(255, 210, 120, .14);
  border: 1px solid rgba(255, 210, 120, .45);
  color: #ffe2a6; font-size: 12px; font-weight: 700; text-align: center;
  text-shadow: 0 1px 2px rgba(70, 45, 0, .5);
}
/* why: 看广告主按钮禁用态 (广告播放中) — 压暗不可点 */
.cm-rate-boost-btn:disabled { opacity: .5; cursor: default; filter: grayscale(.3); }

/* ── 体力低于 20% 的"看广告回满"+号 (精力环右上角) ── */
.cm-stam-refill {
  position: absolute;
  /* why: 贴精力环右上角, 略外溢露出整圆; 环 56×56 */
  top: -2px; right: -4px;
  width: 22px; height: 22px;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, .9);
  /* why: 暖粉醒目, 跟体力低红脉冲呼应, 提示"该补了" */
  background: linear-gradient(180deg, #ff7aa9, #ff3d77);
  color: #fff; font-size: 16px; font-weight: 900; line-height: 1;
  display: grid; place-items: center;
  padding: 0; cursor: pointer; font-family: inherit;
  box-shadow: 0 2px 8px rgba(199, 10, 89, .5), inset 0 1px 0 rgba(255, 255, 255, .5);
  /* why: 轻脉动吸引注意 */
  animation: cmStamRefillPulse 1.2s ease-in-out infinite;
  z-index: 2;
  /* why(perf 改造): +号从 .cm-stam-wrap 子级移进 .cm-stamina-ring(pointer-events:none) 内, 自己显式收事件才点得动 */
  pointer-events: auto;
  /* why(用户改稿"加号上下左右居中"): 文字"+"字形受字体基线影响会略偏上 → 隐藏文字, 改用两条伪元素画正十字, 绝对居中 */
  font-size: 0;
}
/* why(用户改稿): CSS 画的加号 — 横竖两条居中十字, translate(-50%,-50%) 保证上下左右都居中 */
.cm-stam-refill::before,
.cm-stam-refill::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  background: #fff;
  border-radius: 999px;
}
.cm-stam-refill::before { width: 52%; height: 15%; transform: translate(-50%, -50%); } /* 横 */
.cm-stam-refill::after  { width: 15%; height: 52%; transform: translate(-50%, -50%); } /* 竖 */
.cm-stam-refill:active { transform: scale(.9); }
@keyframes cmStamRefillPulse {
  0%, 100% { box-shadow: 0 2px 8px rgba(199, 10, 89, .5), inset 0 1px 0 rgba(255, 255, 255, .5); }
  50%      { box-shadow: 0 2px 14px rgba(255, 90, 140, .9), inset 0 1px 0 rgba(255, 255, 255, .5); }
}

/* ── 奖励倍率方块 (体力环右侧, 圆角正方形显 ×N) ── */
.cm-mult-chip {
  /* why: 比体力环(56)小一圈, 用户钦定再缩小到 30 */
  width: 30px; height: 30px;
  /* why: 移到精力环正左后, 由 .cm-tl-group 的 align-items:center 做中心线对齐, 不再需要 position 上移; flex 不收缩防被环挤 */
  flex: 0 0 auto;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, .55); /* why(iOS玻璃): 去青边→中性白, 留 .55 alpha */
  /* why(iOS玻璃): 蓝青浅玻璃→中性白玻璃, 保留 alpha 层次 */
  background: linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .08));
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  color: #ffffff; font-size: 13px; font-weight: 900; letter-spacing: .3px; /* why(iOS玻璃): 基础档(t0)去青→中性白, 加成档 t1/t2/t3 各自暖色覆盖 */
  display: grid; place-items: center;
  padding: 0; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 12px rgba(6, 18, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .4); /* why(iOS玻璃): 去青光外发光层, 留接触暗影+顶白高光结构 */
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 去青字辉光→黑描边 token */
  transition: transform .12s ease;
}
.cm-mult-chip:active { transform: scale(.92); }

/* ── ×N 方块按档色温递进 (越高越火热越有能量感) ──
   why: t0 冷蓝(平静·无动画, 走基础样式) → t1 紫粉(轻呼吸) → t2 橙金(中呼吸) → t3 赤红(烈焰强呼吸).
   呼吸 = transform scale + box-shadow 光晕大幅摆动 (之前只摆 9→16px 太弱, 用户反馈"看不到"→加缩放+大光晕).
   ⚠ 动画 transform 会盖过 :active 的 scale(.92), 即按下瞬间没缩一下 — 取舍: 用户要的是明显的持续呼吸能量感,
   按压反馈次要; 故有动画的档放弃 :active 缩放. 不用 filter:brightness (会跟自带 backdrop-filter 叠加变糊). */

/* t1 ×2 — 紫粉, 轻呼吸 */
.cm-mult-chip.cm-mult-t1 {
  border-color: rgba(225, 170, 255, .65); /* why: 蓝→紫, 第一档升温 */
  background: linear-gradient(180deg, rgba(240, 205, 255, .26), rgba(200, 150, 255, .12));
  color: #f7ecff;
  text-shadow: 0 1px 2px rgba(70, 20, 95, .70), 0 0 6px rgba(225, 170, 255, .50);
  animation: cmChipBreath1 2.0s ease-in-out infinite; /* why: 2.0s 最慢, 温度梯度最低档 */
}
@keyframes cmChipBreath1 {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 12px rgba(28, 6, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .42), 0 0 7px rgba(205, 140, 255, .45); }
  50%      { transform: scale(1.06); box-shadow: 0 4px 12px rgba(28, 6, 40, .35), inset 0 1px 0 rgba(255, 255, 255, .55), 0 0 17px 1px rgba(212, 150, 255, .85); } /* why: 缩 6% + 光晕 7→17px → 轻呼吸 */
}

/* t2 ×4 — 橙金, 中呼吸 */
.cm-mult-chip.cm-mult-t2 {
  border-color: rgba(255, 200, 120, .80); /* why: 紫→橙金, 第二档转暖色 */
  background: linear-gradient(180deg, rgba(255, 226, 170, .30), rgba(255, 165, 70, .16));
  color: #fff4e2;
  text-shadow: 0 1px 2px rgba(110, 50, 5, .70), 0 0 6px rgba(255, 200, 110, .55);
  animation: cmChipBreath2 1.4s ease-in-out infinite; /* why: 1.4s 中速, 比 t1 快比 t3 慢 */
}
@keyframes cmChipBreath2 {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 12px rgba(40, 18, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 8px rgba(255, 170, 60, .50); }
  50%      { transform: scale(1.10); box-shadow: 0 4px 14px rgba(40, 18, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .60), 0 0 24px 3px rgba(255, 185, 80, .95); } /* why: 缩 10% + 光晕 8→24px+扩散 → 明显呼吸 */
}

/* t3 ×8 — 赤红烈焰, 强呼吸 */
.cm-mult-chip.cm-mult-t3 {
  border-color: rgba(255, 140, 85, .95); /* why: 橙→赤红, 顶档最烈 */
  background: linear-gradient(180deg, rgba(255, 180, 110, .34), rgba(255, 70, 35, .22));
  color: #fff0e8;
  text-shadow: 0 1px 2px rgba(120, 20, 0, .80), 0 0 8px rgba(255, 120, 60, .70);
  animation: cmChipBreath3 .85s ease-in-out infinite; /* why: 0.85s 最快, 最有能量感 */
}
@keyframes cmChipBreath3 {
  0%, 100% { transform: scale(1);    box-shadow: 0 4px 12px rgba(50, 8, 0, .40), inset 0 1px 0 rgba(255, 255, 255, .45), 0 0 10px rgba(255, 80, 40, .60); }
  50%      { transform: scale(1.14); box-shadow: 0 4px 16px rgba(50, 8, 0, .40), inset 0 1px 0 rgba(255, 255, 255, .65), 0 0 30px 6px rgba(255, 110, 50, 1), 0 0 14px rgba(255, 210, 100, .75); } /* why: 缩 14% + 光晕 10→30px+6扩散+暖白内核 → 烈焰跳动 */
}

/* (已清理: .cm-flame / .cm-flame-t1/t2/t3 + cmFlameFlicker S/M/L keyframes — 用户钦定去掉倍率火苗) */

/* ── 奖励倍率弹窗 (忠实复刻「全息玻璃按钮」demo 的全息控制台风) ──
   why: 用户「好好看 html 重新做」— 不再做减法, 按 demo 真实观感 1:1 还原:
   暗青全息底板(压暗机台背景使全息字可读) + 扫描线滚动(.hscan) + 青描边发光(.holo) +
   breathe 呼吸 + holoGlitch 整块故障抽搐; 标题 titleGlitch RGB 色散+辉光;
   三档按钮 = demo .hbtn 玻璃按钮(青膜渐变 + 扫描细纹 ::before + 竖向扫光 ::after + 发光).
   设计 token 全抄 demo: --cyan #67e8ff / --cyan-bright #c8f7ff / --glow. 全部 scope 在 .cm-mult-popup. */
.cm-mult-popup,
.cm-ad-popup.cm-holo { /* why(iOS玻璃换肤): 弹窗共用皮肤从"全息投影"改"清透厚玻璃" — 去扫描线/glitch/青紫荧光/深色悬空底, 保留镭射环(::after) */
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); /* 静止/入场态居中 */
  width: min(82%, 320px); box-sizing: border-box;
  z-index: 221;
  padding: 20px 18px 18px;
  overflow: hidden;
  /* why(iOS玻璃): 荧光色 var 从青紫改中性白 → 子元素(标题/高亮/描述)引用它自动去青 */
  --cyan: #eef3ff;
  --cyan-bright: #ffffff;
  --glow: rgba(255, 255, 255, .5);
  border: none;
  border-radius: 22px;
  /* 玻璃底: 顶部迎光斜反光 + 极淡中性深垫底(弹窗文字多, 比纯装饰卡多留一点底色保证白字可读) */
  background: var(--cm-glass-specular), var(--cm-glass-popup-tint);
  color: rgba(255, 255, 255, .96);
  /* 真折射(Chromium) / 磨砂(Safari 回退) — 用全局玻璃 token */
  -webkit-backdrop-filter: var(--cm-glass-backdrop-fb);
  backdrop-filter: var(--cm-glass-backdrop);
  box-shadow: var(--cm-glass-shadow);
  /* 去掉 cmMultGlitch 故障抽搐; 保留入场弹跳 + 轻微呼吸 */
  /* why: 保留 .4s 入场弹跳；浅亮玻璃不再挂 5s 常驻强呼吸。 */
  animation: cmPopBounceIn .4s cubic-bezier(.2, .8, .3, 1);
}
/* iOS玻璃: 原全息扫描线 ::before 改成渐变【受光描边】(左上亮右下暗, 1px, mask 抠边) */
.cm-mult-popup::before,
.cm-ad-popup.cm-holo::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px;
  background: var(--cm-glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
/* why: 内容压在扫描线之上, 保证文字清晰 */
.cm-mult-popup > *,
.cm-ad-popup.cm-holo > * { position: relative; z-index: 1; }
/* why(#3): 色散边 — 玻璃折射把边缘 RGB 分离(粉红偏一角/蓝偏对角) + 蓝紫内环, 制造色散(chromatic aberration)玻璃感.
   inset 阴影(不被 overflow:hidden 裁), screen 混合叠在扫描线之上.
   why(用户改稿"大小不对"): 原 inset:4% + 写死 radius 12px 让环缩在弹窗里像个小框 —
   改 inset 默认 0 + radius:inherit 贴着弹窗自己的圆角走; 内缩/浓度/色相 var 化 → ui-editor「弹窗玻璃」可调 */
.cm-mult-popup::after,
.cm-ad-popup.cm-holo::after {
  content: ""; position: absolute; inset: var(--ui-holo-disp-inset, 0px); z-index: 0; pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity: var(--ui-holo-disp-op, 1);
  filter: hue-rotate(var(--ui-holo-hue, 0deg)); /* why(用户改稿): 内侧渐隐改由画框渐变 mask 做(见下 conic 规则), 不再对环 blur(会被 mask 裁回硬边) */
  /* why(用户改稿"要镭射"): 原 RGB 分离 box-shadow 弃用 — mask 环形化后阴影只剩环带内一截(死代码),
     色散完全交给下方 conic 镭射环 (颜色更丰富 + 流光) */
}
/* why(用户改稿二次纠正"描边线本身外侧清晰、另一侧向内模糊"): 上一版"清晰环+独立内发光"仍是两边清晰的线+一团糊光, 不对.
   改法在下方 conic 环 ::after 上直接加 blur → 环被模糊成软边; 弹窗 overflow:hidden 把溢出到弹窗外的那半截裁掉 = 外侧变清晰实边,
   留在框内的那半截保持模糊、向框内渐隐. 一条线同时"外清晰内模糊向内". blur 量 --ui-holo-disp-blur 进编辑器. 原独立 inset 内发光已移除. */
/* why(用户改稿"要镭射的那种"): 色散环升级 — conic 彩虹渐变抠成环形(mask content-box XOR), 慢旋出"镭射流光".
   @property 注册角度型变量才能平滑插值; 不支持的浏览器 fallback 0deg = 静止彩虹环, 优雅降级.
   环粗/流速 var 化 → ui-editor「弹窗玻璃」可调 */
@property --cm-laser-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes cmLaserSpin { to { --cm-laser-angle: 360deg; } }
.cm-mult-popup::after,
.cm-ad-popup.cm-holo::after,
.cm-rate-popup::after,
.cm-temp-prompt::after,
.tq-announce::after,
.cm-upg-popup::after,
.cm-upg-holo, /* why(用户"升级三按钮换玻璃彩色描边"): 真子元素叠镭射环(细描边版, 见下 .cm-upg-holo 专属规则) */
.rw-glass-panel::after { /* why(用户"接一下奖励弹窗豪华皮肤"): 五档奖励弹窗 PNG 画框也吃同款镭射环, 定位/z 差异见 .rw-glass-panel::after 专属规则 */
  /* why(用户改稿二次纠正"外侧清晰、内侧向内模糊, 不是硬边细带"): 描边总深 = 外沿实边(disp-w) + 内侧渐隐(disp-blur) */
  --rw-frame: calc(var(--ui-holo-disp-w, 2px) + var(--ui-holo-disp-blur, 12px));
  background: conic-gradient(from calc(var(--cm-laser-angle, 0deg) + 210deg),
    rgba(255, 70, 160, .75), rgba(255, 150, 80, .6), rgba(255, 235, 110, .62),
    rgba(110, 255, 180, .6), rgba(90, 190, 247, .75), rgba(150, 110, 255, .72),
    rgba(255, 70, 160, .75)); /* why(iOS玻璃/镭射): 蓝停点 255→247 = 规范镭射蓝 #5abef7, 清掉荧光值 90,190,255 但镭射环外观不变 */
  /* why: 四边渐变拼成画框 mask — 每边外沿 0~disp-w 全遮罩(满色=清晰实边), 再向框内 disp-blur 距离柔和淡出到透明.
     取代原 content-box XOR(只是硬边细带, 对它 blur 会被 mask 裁回硬边, 内侧永远生硬). mask-composite:add 四边取并集. */
  -webkit-mask:
    linear-gradient(to right,  #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) left / var(--rw-frame) 100% no-repeat,
    linear-gradient(to left,   #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) right / var(--rw-frame) 100% no-repeat,
    linear-gradient(to bottom, #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) top / 100% var(--rw-frame) no-repeat,
    linear-gradient(to top,    #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) bottom / 100% var(--rw-frame) no-repeat;
  -webkit-mask-composite: source-over;
  mask:
    linear-gradient(to right,  #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) left / var(--rw-frame) 100% no-repeat,
    linear-gradient(to left,   #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) right / var(--rw-frame) 100% no-repeat,
    linear-gradient(to bottom, #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) top / 100% var(--rw-frame) no-repeat,
    linear-gradient(to top,    #000 0, #000 var(--ui-holo-disp-w, 2px), transparent var(--rw-frame)) bottom / 100% var(--rw-frame) no-repeat;
  mask-composite: add;
  animation: cmLaserSpin var(--ui-holo-laser-speed, 7s) linear infinite;
}
/* why(用户改稿"玻璃没盖住所有弹窗"): 三个漏网弹窗补同款玻璃 —
   爆率详情(.cm-rate-popup, 原钦定"无磨砂"被本次改稿覆盖) / 临时接入(.cm-temp-prompt) / 保底·限时横幅(.tq-announce).
   磨砂+色散复用同一组 --ui-holo-* var → ui-editor「弹窗玻璃」一处调全部;
   RewardPopup 五档奖励弹窗有独立豪华皮肤, 特意不动. */
.cm-rate-popup,
.cm-temp-prompt,
.tq-announce {
  /* iOS玻璃: 三者共用玻璃 backdrop(磨砂, 去折射) */
  -webkit-backdrop-filter: var(--cm-glass-backdrop-fb);
  backdrop-filter: var(--cm-glass-backdrop);
  overflow: hidden;
}
/* why: 色散环走三者各自空闲的 ::after; z:-1 = 压自身背景之上、一切内容之下 (三者都有 transform 稳定成层,
   不用像 holo 那样给每个子元素补 z:1); radius:inherit 贴各自圆角 → 环尺寸永远跟弹窗一致 */
.cm-rate-popup::after,
.cm-temp-prompt::after,
.tq-announce::after,
.cm-upg-popup::after { /* why(用户改稿): 升级 toast 同吃镭射环 (transform 在, z:-1 稳定垫内容下) */
  content: ""; position: absolute; inset: var(--ui-holo-disp-inset, 0px); z-index: -1; pointer-events: none;
  border-radius: inherit;
  mix-blend-mode: screen;
  opacity: var(--ui-holo-disp-op, 1);
  filter: hue-rotate(var(--ui-holo-hue, 0deg)); /* why(用户改稿): 同组1, 内侧渐隐由画框渐变 mask 做, 不 blur */
  /* why: 色散交给共享的 conic 镭射环规则 (见上), 此处只差异化 z:-1 (压自身背景上/内容下) */
}
/* why: 抄 demo .pane breathe — 整块亮度/饱和度呼吸(纯 filter, 不占 transform) */
@keyframes cmMultBreathe {
  0%, 100% { filter: brightness(1)    saturate(1);    }
  50%      { filter: brightness(1.09) saturate(1.08); }
}
/* why: 抄 demo .hscan hscanRoll — 横纹背景沿 Y 缓慢滚动制造扫描感 */
@keyframes cmMultScanRoll {
  0%   { background-position-y: 0; }
  100% { background-position-y: 3px; }
}
/* why: 故障抽搐 — 抄自 demo holoGlitch. 整块每 5s 来 3 段:
   beat1 切片水平跳(±4px)+掉帧(.72); beat2 斜切错动(skewX±6); beat3 快速双闪(.6/.7).
   居中靠 calc 把 -50% 写进每帧 — 因 transform 被动画占用, 无法再单独 translate(-50%,-50%). */
@keyframes cmMultGlitch {
  0%, 17%  { transform: translate(-50%, -50%) skewX(0); opacity: 1; }
  18%      { transform: translate(calc(-50% - 4px), -50%) skewX(0); opacity: .72; }
  18.8%    { transform: translate(calc(-50% + 4px), -50%); opacity: 1; }
  19.6%    { transform: translate(-50%, -50%); }
  46%      { transform: translate(-50%, -50%) skewX(0); opacity: 1; }
  47%      { transform: translate(calc(-50% + 2px), calc(-50% - 1px)) skewX(6deg); opacity: .85; }
  47.7%    { transform: translate(calc(-50% - 2px), calc(-50% + 1px)) skewX(-5deg); opacity: 1; }
  48.4%    { transform: translate(-50%, -50%) skewX(0); }
  73%      { transform: translate(-50%, -50%); opacity: 1; }
  73.6%    { transform: translate(calc(-50% + 3px), -50%); opacity: .6; }
  74%      { transform: translate(-50%, -50%); opacity: 1; }
  74.6%    { transform: translate(calc(-50% - 2px), -50%); opacity: .7; }
  75%      { transform: translate(-50%, -50%); opacity: 1; }
  100%     { transform: translate(-50%, -50%) skewX(0); opacity: 1; }
}
/* why: 标题 — 抄 demo .title: 高亮青 + 宽字距 + 辉光; titleGlitch 时叠 RGB 色散 */
.cm-mult-popup .cm-rate-title,
.cm-ad-popup.cm-holo .cm-rate-title {
  margin: 0 0 8px;
  font-size: 17px; font-weight: 800;
  letter-spacing: .12em;
  text-align: center;
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
}
/* why: 色散错位 — 抄 demo titleGlitch 原版(保留 22px 辉光底, 故障帧叠青/品红横向错位) */
@keyframes cmMultTitleGlitch {
  0%, 17.5%, 20%, 46.5%, 49%, 73%, 75.5%, 100% { text-shadow: 0 0 22px var(--glow), 0 0 4px rgba(255, 255, 255, .6); }
  18.4% { text-shadow: -3px 0 rgba(255,60,180,.9),  3px 0 rgba(60,225,255,.9),  0 0 22px var(--glow); }
  47.4% { text-shadow:  2px -1px rgba(255,60,180,.8), -2px 1px rgba(60,225,255,.8), 0 0 22px var(--glow); }
  73.8% { text-shadow: -2px 0 rgba(255,60,180,.75),  2px 0 rgba(60,225,255,.75),  0 0 22px var(--glow); }
}
/* why: "建设中"弹窗副标题 — 复用全息青字风格, 与整体设计一致(不引入新色系) */
.cm-build-tip {
  font-size: 13px; color: rgba(255, 255, 255, .9); text-align: center;
  margin: 0 0 14px; letter-spacing: .08em;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-mult-stat {
  font-size: 13px; color: rgba(255, 255, 255, .9); text-align: center;
  margin: 2px 0; letter-spacing: .04em;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-mult-stat b { color: #ffe1a0; font-size: 15px; font-weight: 800; }
.cm-mult-btns {
  display: grid; gap: 9px; margin-top: 14px;
}
/* why: 倍率档按钮 = demo .hbtn 玻璃按钮 — 青膜渐变 + 青描边 + 外/内发光 */
.cm-mult-btn {
  position: relative; overflow: hidden;
  width: 100%; text-align: left;
  display: flex; flex-direction: column; gap: 2px;
  padding: 10px 13px;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: var(--cm-glass-r-btn);
  /* iOS玻璃: 去青玻璃改中性 */
  background: var(--cm-glass-specular), rgba(255, 255, 255, .06);
  box-shadow: var(--cm-glass-shadow);
  color: #ffffff; cursor: pointer; font-family: inherit;
  text-shadow: var(--cm-glass-text-outline);
  transition: transform .18s cubic-bezier(.2, .9, .25, 1), box-shadow .25s, background .25s, border-color .25s, opacity .3s, filter .3s;
}
/* iOS玻璃: 扫描线 ::before 改渐变受光描边 */
.cm-mult-btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: var(--cm-glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
/* 竖向扫光(去青改中性白) */
.cm-mult-btn::after {
  content: ""; position: absolute; left: 0; right: 0; top: -42%; height: 42%;
  z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(255, 255, 255, .30), transparent);
  animation: cmMultSweep 3s linear infinite;
}
/* why: 按钮文字压在扫描纹/扫光之上 */
.cm-mult-btn .bt, .cm-mult-btn .bd { position: relative; z-index: 2; }
/* why: 抄 demo scan — 竖向扫光从上(-42%)扫到下(104%) */
@keyframes cmMultSweep {
  0%   { top: -42%; }
  100% { top: 104%; }
}
/* why: 悬停态 — 抄 demo .hbtn:hover: 上浮 + 玻璃提亮 + 辉光增强 */
.cm-mult-btn:hover {
  transform: translateY(-2px);
  background: var(--cm-glass-specular), rgba(255, 255, 255, .12);
  box-shadow: var(--cm-glass-shadow), 0 0 22px rgba(255, 255, 255, .25);
}
.cm-mult-btn:active { transform: translateY(0) scale(.97); }
.cm-mult-btn .bt {
  font-size: 14px; font-weight: 800; letter-spacing: .04em;
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-mult-btn .bd { font-size: 10.5px; color: rgba(255, 255, 255, .82); }
/* why: 当前选中档 — 抄 demo .hbtn.chosen: 更亮玻璃 + 更亮描边 + 更强辉光 */
.cm-mult-btn.is-active {
  border-color: rgba(255, 225, 160, .8);
  background: var(--cm-glass-specular), rgba(255, 225, 160, .14);
  box-shadow: var(--cm-glass-shadow), 0 0 22px rgba(255, 210, 130, .42);
}
.cm-mult-btn.is-active .bt { color: #ffe9a8; }
/* why: 未解锁档 — 轻微去色压暗即可(用户钦定别太透看不清解锁条件); 从 .5/灰.4/亮.7 提到 .9/灰.15/亮.9 */
.cm-mult-btn.is-locked { opacity: .9; filter: grayscale(.15) brightness(.9); }
/* why: 从点击位置弹跳放大入场 (cm-ad-popup / cm-mult-popup / 全息款共用).
   起点: 缩到 .25 且平移到点击处(--pop-dx/dy = 点击点相对游戏框中心的位移, 由 JS 注入);
   过程: 飞回中心(-50%,-50%)同时放大, 55% 处过冲到 1.08 再回弹到 1, 制造"弹跳"感.
   var fallback 0px: 万一没注入则退化为原地中心缩放. */
@keyframes cmPopBounceIn {
  0%   { opacity: 0; transform: translate(calc(-50% + var(--pop-dx, 0px)), calc(-50% + var(--pop-dy, 0px))) scale(.25); }
  55%  { opacity: 1; transform: translate(-50%, -50%) scale(1.08); }
  78%  { opacity: 1; transform: translate(-50%, -50%) scale(.97); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* why: 退场 = 入场的逆动作, 弹回"开弹窗按键"位置.
   先在中心微微鼓一下(18% 过冲到 1.06)蓄力, 再缩到 .2 并平移回点击处(--pop-dx/dy)淡出.
   .is-closing 时 JS 已把弹窗 div 标记为唯一退场动画, 容器自身 animationend 触发真正卸载. */
@keyframes cmPopBounceOut {
  0%   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  18%  { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  100% { opacity: 0; transform: translate(calc(-50% + var(--pop-dx, 0px)), calc(-50% + var(--pop-dy, 0px))) scale(.2); }
}
/* why: 关闭时覆盖入场+呼吸/glitch 那串 animation, 只跑一次退场弹回; .34s 比入场略快, 收得利落 */
.cm-mult-popup.is-closing,
.cm-ad-popup.cm-holo.is-closing,
.cm-ad-popup.is-closing,
.cm-temp-prompt.is-closing {
  animation: cmPopBounceOut .34s cubic-bezier(.5, 0, .75, .4) forwards;
}

/* ── 精力详情弹窗(全息款)特有子元素 — 两行折叠(上限/恢复速度), 行首向下小三角点开下拉明细 ──
   why: 容器/扫描线/glitch/标题已复用 .cm-ad-popup.cm-holo(见上). 这里只补两行手风琴行的玻璃皮肤. */
.cm-stam-holo .cm-stam-rows {
  list-style: none; padding: 0; margin: 4px 0 2px;
  display: grid; gap: 9px;
}
/* why: 单行 = demo .hbtn 同款青玻璃, 含折叠明细; overflow hidden 让明细 max-height 折叠不溢出圆角 */
.cm-stam-row {
  border: 1px solid rgba(255, 255, 255, .16);
  border-radius: var(--cm-glass-r-btn); overflow: hidden;
  background: linear-gradient(160deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
  box-shadow: inset 0 0 14px rgba(255,255,255,.05);
}
/* why: 行首 — 三角 + 名称 + 数值; 整行可点切换折叠 */
.cm-stam-rowhead {
  width: 100%; display: flex; align-items: center; gap: 10px;
  padding: 11px 13px;
  background: transparent; border: none; cursor: pointer;
  font-family: inherit; color: #ffffff;
}
.cm-stam-rowhead .tri {
  font-size: 14px; line-height: 1; color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
  transition: transform .22s ease;
  flex-shrink: 0;
}
.cm-stam-row.is-open .cm-stam-rowhead .tri { transform: rotate(90deg); }
.cm-stam-rowhead .lbl {
  flex: 1; text-align: left;
  font-size: 14px; font-weight: 800; letter-spacing: .04em;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-stam-rowhead .num {
  font-size: 15px; font-weight: 800; color: #ffffff;
  text-shadow: var(--cm-glass-text-outline); flex-shrink: 0;
}
/* why: 折叠明细 — 默认 max-height:0 收起, is-open 时下拉.
   高度瞬开(不过渡 max-height): 游戏 RAF 持续占主线程, max-height 过渡会被饿死卡顿(实测延迟 1s+ 才跳),
   故高度即时切换; 仅保留 opacity 轻量淡入(合成器跑, 不卡). */
.cm-stam-detail {
  max-height: 0; opacity: 0; overflow: hidden;
  padding: 0 13px;
  display: grid; gap: 5px;
  border-top: 1px solid rgba(255, 255, 255, 0);
  transition: opacity .2s ease;
}
.cm-stam-row.is-open .cm-stam-detail {
  max-height: 120px; opacity: 1; /* why: 120px 足够装两行明细 */
  padding: 8px 13px 11px;
  border-top-color: rgba(255, 255, 255, .16);
}
.cm-stam-detail .dl {
  display: flex; justify-content: space-between;
  font-size: 12px; color: rgba(255, 255, 255, .85);
}
.cm-stam-detail .dl span:last-child { color: #ffffff; font-weight: 700; }

/* ── .cm-holo 广告/礼包弹窗特有子元素的全息皮肤 ──
   why: 容器/扫描线/glitch/标题已与倍率弹窗共用(见上). 这里只补这四个弹窗里
   倍率弹窗没有的元素: 描述文字 cm-ad-desc / 礼包列表 cm-gift-list / 看广告主按钮 cm-rate-boost-btn.
   全部 scope 在 .cm-ad-popup.cm-holo, 不影响"尚未解锁"弹窗(未加 .cm-holo). */
/* why: 描述文字改青色 + 淡辉光(抄 demo .sub); 强调词 b 由暖金改高亮青 */
.cm-ad-popup.cm-holo .cm-ad-desc {
  color: rgba(255, 255, 255, .92);
  text-shadow: var(--cm-glass-text-outline);
}
.cm-ad-popup.cm-holo .cm-ad-desc b { color: #ffe1a0; } /* 强调词改暖金(去青) */
/* iOS玻璃: 礼包列表条目去青玻璃改中性淡白玻璃 */
.cm-ad-popup.cm-holo .cm-gift-list li {
  background: linear-gradient(160deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  border-color: rgba(255,255,255,.16);
  border-left-color: rgba(255,255,255,.50);
  box-shadow: inset 0 0 12px rgba(255,255,255,.05);
}
.cm-ad-popup.cm-holo .cm-gift-list .tx {
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
}
/* why: 看广告主按钮 = demo .hbtn 玻璃按钮(同倍率弹窗 cm-mult-btn): 青膜渐变 + 扫描细纹 + 竖向扫光 + 发光.
   保留 boost-btn 原本的居中纵向布局(icon/标题/副标), 只换青玻璃皮肤 */
.cm-ad-popup.cm-holo .cm-rate-boost-btn {
  position: relative; overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 14px;
  /* iOS玻璃: 去青玻璃改中性 — 顶部迎光反光 + 淡白膜 */
  background: var(--cm-glass-specular), rgba(255, 255, 255, .07);
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
  transition: transform .18s cubic-bezier(.2, .9, .25, 1), box-shadow .25s, background .25s, border-color .25s, filter .25s, opacity .3s;
}
/* iOS玻璃: 扫描线 ::before 改渐变受光描边 */
.cm-ad-popup.cm-holo .cm-rate-boost-btn::before {
  content: ""; position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: inherit; padding: 1px;
  background: var(--cm-glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}
.cm-ad-popup.cm-holo .cm-rate-boost-btn::after {
  content: ""; position: absolute; left: 0; right: 0; top: -42%; height: 42%;
  z-index: 1; pointer-events: none;
  background: linear-gradient(transparent, rgba(255, 255, 255, .32), transparent); /* 扫光去青改中性白 */
  animation: cmMultSweep 3s linear infinite;
}
/* why: 按钮内 icon/标题/副标压在扫描纹/扫光之上 */
.cm-ad-popup.cm-holo .cm-rate-boost-btn > * { position: relative; z-index: 2; }
/* why(用户改稿"镭射色散包括按钮"): 全息按钮 ::before/::after 被扫描纹/扫光占用 —
   元素级重述原青辉光 + 叠四角四色 inset(粉/蓝/金/紫), 隔着半透明扫描纹透出镭射边 */
.cm-mult-popup .cm-rate-boost-btn,
.cm-ad-popup.cm-holo .cm-rate-boost-btn {
  box-shadow:
    var(--cm-glass-shadow),
    inset 8px 5px 12px -6px rgba(255, 70, 160, .5),
    inset -8px -5px 12px -6px rgba(90, 190, 247, .55), /* why(iOS玻璃/镭射): 四色镭射 inset 蓝角 255→247 = 规范镭射蓝 #5abef7, 清荧光值保镭射 */
    inset -8px 5px 12px -8px rgba(255, 235, 110, .42),
    inset 8px -5px 12px -8px rgba(150, 110, 255, .5);
}
.cm-ad-popup.cm-holo .cm-rate-boost-btn:hover {
  transform: translateY(-2px);
  background: var(--cm-glass-specular), rgba(255, 255, 255, .12);
  box-shadow: var(--cm-glass-shadow), 0 0 24px rgba(255, 255, 255, .30);
}
.cm-ad-popup.cm-holo .cm-rate-boost-btn:active { transform: translateY(0) scale(.97); filter: brightness(1); }
.cm-ad-popup.cm-holo .cm-rate-boost-btn .bt {
  color: #ffffff;
  text-shadow: var(--cm-glass-text-outline);
}
.cm-ad-popup.cm-holo .cm-rate-boost-btn .bd { color: rgba(255, 255, 255, .85); text-shadow: var(--cm-glass-text-outline); }
.cm-ad-popup.cm-holo .cm-rate-boost-btn .bi { filter: drop-shadow(0 2px 4px rgba(0, 0, 0, .5)); }
/* why: 禁用态(广告播放中/已看过) — 去色压暗 */
.cm-ad-popup.cm-holo .cm-rate-boost-btn:disabled { opacity: .45; filter: grayscale(.4) brightness(.7); }
/* why: 升级直升弹窗现在可能同时出现"广告/升级券"两个入口, 10px 能分清两按钮但不拉高弹窗过多 */
.cm-ad-popup.cm-holo > .cm-rate-boost-btn + .cm-rate-boost-btn { margin-top: 10px; }

/* ── 上下滑动换机引导 (第 2 台到手一次性) — 纯手势动画, 不拦点击 ── */
.cm-swipe-guide {
  position: absolute; left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 60; /* why: 压在机台上, 但低于弹窗(220+); 仅提示不交互 */
  pointer-events: none; /* why: 不挡玩家任何操作, 滑动手势穿透到机台 */
  display: flex; flex-direction: column; align-items: center; gap: 14px;
  animation: cmSwipeGuideIn .3s ease-out;
}
.cm-swipe-guide-hand {
  position: relative;
  width: 46px; height: 92px;
  display: flex; flex-direction: column; align-items: center; justify-content: space-between;
  /* why: 整体上下漂移, 模拟手指来回滑 */
  animation: cmSwipeGuideFloat 1.6s ease-in-out infinite;
}
.cm-swipe-guide-dot {
  width: 16px; height: 16px; border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  box-shadow: 0 0 14px rgba(255, 255, 255, .9), 0 2px 6px rgba(0, 0, 0, .4); /* why(iOS玻璃): 引导圆点青光晕→中性白光晕, 留黑投影结构 */
}
.cm-swipe-guide-arrow {
  font-size: 26px; line-height: 1; color: rgba(255, 255, 255, .95);
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 引导箭头青光晕→黑描边 token, 机台背景上仍清晰 */
}
/* why: 上下箭头交替闪 — 强调"两个方向都能滑" */
.cm-swipe-guide-arrow.up   { animation: cmSwipeGuideBlink 1.6s ease-in-out infinite; }
.cm-swipe-guide-arrow.down { animation: cmSwipeGuideBlink 1.6s ease-in-out infinite .8s; }
.cm-swipe-guide-text {
  font-size: 13px; font-weight: 700; letter-spacing: .5px;
  color: #fff;
  padding: 5px 12px; border-radius: 999px;
  background: rgba(10, 22, 44, .55);
  text-shadow: 0 1px 3px rgba(0, 0, 0, .6);
}
@keyframes cmSwipeGuideIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes cmSwipeGuideFloat {
  0%, 100% { transform: translateY(-10px); }
  50%      { transform: translateY(10px); }
}
@keyframes cmSwipeGuideBlink {
  0%, 100% { opacity: .35; }
  50%      { opacity: 1; }
}

/* ── 看广告弹窗 (悬浮球点开) — 不显概率, 单按钮 ── */
.cm-ad-popup {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(80%, 320px); box-sizing: border-box;
  z-index: 221;
  padding: 18px 18px 16px;
  border-radius: 18px;
  /* why: 用户钦定 — 去边框 + 去半透明底色 + 阴影移到框中心(同全息款):
     居中放射状暗影衬文字, 边缘透明, 无框无底色无 backdrop 模糊 */
  border: none;
  background:
    radial-gradient(52% 40% at 50% 64%, rgba(255, 255, 255, .12), transparent 72%), /* why(iOS玻璃): 蓝青衬光→中性白, 保留 .12 alpha */
    radial-gradient(64% 60% at 50% 48%, rgba(4, 16, 30, .58) 0%, rgba(4, 16, 30, .38) 42%, rgba(4, 16, 30, .14) 66%, transparent 80%);
  /* why: 从点击位置弹跳放大入场 */
  animation: cmPopBounceIn .4s cubic-bezier(.2, .8, .3, 1);
}
.cm-ad-desc {
  margin: 8px 0 14px; text-align: center;
  font-size: 13px; line-height: 1.6; color: #ffffff; /* why(iOS玻璃): 蓝青描述字→白 */
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 深蓝描影→黑描边 token */
}
.cm-ad-desc b { color: #ffe2a6; }

/* why: 回满体力弹窗的两个入口 (看广告 / 体力券) — 纵向排列留间距 */
.cm-refill-btns { display: grid; gap: 10px; }

/* ── 新手礼包入口按钮 (充能舱左下方; 有限时任务卡片时下移到其下方) ── */
.cm-gift-btn {
  position: absolute;
  /* why: 贴充能舱(top70 + bar 底≈120)左下方, 无限时任务时占限时卡片同位; 左缘对齐充能舱 left:14 */
  top: 124px; left: 14px;
  /* why: 35 > 限时任务卡片(tq-card z30) — 礼包弹跳跳进卡片下沿区域时压在卡片上面不被盖住 */
  z-index: 35;
  /* why: 只显图标 (用户钦定"很小只显图标") → 按钮纯透明, 礼盒 PNG 本身即图标; 48px 保证可点 (>44 触控线) */
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  padding: 0;
  border: none; background: none;
  cursor: pointer; font-family: inherit;
  /* why: 挤压拉伸弹跳吸引点击 — 从底边蹲跳, 故 origin 落底; 节奏 = 停顿后蹲→跳→落→回弹 */
  transform-origin: bottom center;
  animation: cm-gift-bounce 2s ease-in-out infinite;
}
/* why: 限时任务卡片在屏(top124 高66) → 礼包下移到卡片下方 4px 不重合 */
.cm-gift-btn.below-quest { top: 194px; }
/* why: 弹跳用了 transform, :active 改用 brightness 反馈避免和动画抢 transform */
.cm-gift-btn:active { filter: brightness(.92); }
/* why: image2.0 礼盒图标 (透明底 PNG); drop-shadow 给点立体浮起感 */
.cm-gift-img {
  width: 46px; height: 46px;
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(140, 70, 0, .45));
}
/* why: 弹跳 — 前 45% 停顿(避免一直晃眼), 后半段 蓄力蹲(挤扁)→弹起(拉长)→落地(压扁)→小回弹→复位 */
@keyframes cm-gift-bounce {
  0%, 45%   { transform: translateY(0) scale(1, 1); }
  52%       { transform: translateY(2px) scale(1.14, .88); }   /* 蓄力下蹲挤扁 */
  64%       { transform: translateY(-13px) scale(.9, 1.14); }  /* 跳起拉长 */
  76%       { transform: translateY(0) scale(1.12, .9); }      /* 落地压扁 */
  85%       { transform: translateY(-5px) scale(.98, 1.04); }  /* 小回弹 */
  93%, 100% { transform: translateY(0) scale(1, 1); }          /* 复位静止 */
}

/* why(用户"侧边礼包等出现效果突兀, 改成和任务一样的出现动效"): 卡片挂载(变可用)时从下方淡入到位,
   与任务条 cmTaskEnter 同款(translate 55%→0 + 淡入). 用 translate/opacity 独立属性, 不占 transform 故能与礼包弹跳共存. */
@keyframes cmCardEnter {
  0%   { opacity: 0; translate: 0 55%; }
  100% { opacity: 1; translate: 0 0; }
}
.tq-card { animation: cmCardEnter .4s cubic-bezier(.2, .7, .2, 1) both; } /* 限时任务卡出现: 从底淡入. (礼包/限时框在各自 v2 规则里合并 cmCardEnter, 见下方) */

/* why(用户"消失动效和任务一样"): 侧边卡退场 = 上移 55% + 淡出, 镜像 cmCardEnter, 与任务条 cmTaskExit 同款.
   React 侧 useDismissTransition 在卡卸载时保留元素并挂 .is-exiting, 播完 .4s(须与 CARD_EXIT_MS 一致)才真卸载.
   forwards 停终态防被卸载前回弹; !important 压过各卡自己的 cmCardEnter/浮动动画; 退场期不接收点击. */
@keyframes cmCardExit {
  0%   { opacity: 1; translate: 0 0; }
  100% { opacity: 0; translate: 0 -55%; }
}
.cm-gift-btn.is-exiting,
.cm-trigger-box.is-exiting,
.tq-card.is-exiting {
  animation: cmCardExit .4s cubic-bezier(.4, 0, .6, 1) forwards !important;
  pointer-events: none;
}

/* ── 新手礼包弹窗内容列表 ── */
.cm-gift-list {
  list-style: none; padding: 0; margin: 4px 0 14px;
  display: grid; gap: 8px;
}
.cm-gift-list li {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px; border-radius: 10px;
  background: rgba(255, 255, 255, .14); /* why(iOS玻璃): 蓝青玻璃底→中性白, 留 .14 alpha (对齐 holo 版) */
  border: 1px solid rgba(255, 255, 255, .24); /* why(iOS玻璃): 去青边→白 */
  /* why: 左侧暖金描边呼应礼包按钮 */
  border-left: 2px solid rgba(255, 210, 120, .6);
}
.cm-gift-list .ic { font-size: 18px; line-height: 1; flex-shrink: 0; }
.cm-gift-list .tx { font-size: 13px; font-weight: 600; color: #ffffff; letter-spacing: .3px; } /* why(iOS玻璃): 蓝青字→白 */

/* ── 假广告播放遮罩 ── */
.cm-ad-playing {
  position: absolute; inset: 0; z-index: 240;
  display: flex; align-items: center; justify-content: center;
  background: rgba(4, 10, 22, .82);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
.cm-ad-playing-box { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.cm-ad-playing-spin {
  width: 42px; height: 42px; border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .25); /* why(iOS玻璃): 去青转圈环底→白 */
  border-top-color: #ffffff; /* why(iOS玻璃): 转圈头去青→白 */
  animation: cmAdSpin .8s linear infinite;
}
@keyframes cmAdSpin { to { transform: rotate(360deg); } }
.cm-ad-playing-txt { color: #eaf6ff; font-size: 14px; font-weight: 700; letter-spacing: .5px; }

/* ── 触发框 — 圆角方框, 落充能舱右下方; 三类触发(爆率/暴力/临时)共用此壳, 颜色按 type 变 ── */
/* why: 充能舱 .cm-charge-overlay 在 top:70px 高约 50px(到 120px), 框落 top:128px 即在其正下方, 不重合;
   right:14px 跟顶栏/充能舱右缘对齐 */
.cm-trigger-box {
  position: absolute;
  right: 14px; top: 128px;
  /* why: 版式(用户钦定) — 左图标 + 右两行文字横排, 居中对齐求均衡 */
  display: flex; flex-direction: row; align-items: center; gap: 10px;
  padding: 7px 13px 7px 11px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, .60); /* why(iOS玻璃): 去青边→白 */
  background-color: transparent;
  /* 全息玻璃 — 去青改中性白磨砂, 视觉成系列 */
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .22), rgba(255, 255, 255, .06)); /* why(iOS玻璃): 蓝青玻璃底→中性白, 留 alpha */
  backdrop-filter: blur(9px) saturate(130%);
  -webkit-backdrop-filter: blur(9px) saturate(130%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .50),
    0 8px 18px rgba(10, 30, 60, .40); /* why(iOS玻璃): 去青光外发光层, 留顶白高光+落地暗影结构 */
  color: #ffffff;
  cursor: pointer;
  z-index: 180; /* why: 浮在主 UI 之上, 低于弹窗(221)/遮罩(220) — 开弹窗时被盖住 */
  -webkit-tap-highlight-color: transparent;
  /* why: .32s overshoot 弹入 — 框出现时从右侧滑入带回弹, 提示"新触发出现" */
  animation: cmBoxIn .32s cubic-bezier(.34, 1.56, .64, 1);
}
.cm-trigger-box:active { transform: scale(.96); }
@keyframes cmBoxIn {
  0% { transform: translateX(16px) scale(.9); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
/* why: 图标圆裁切, 跟旧悬浮球同款 cover 防方角露出 */
.cm-trigger-box-icon {
  width: 26px; height: 26px; border-radius: 50%;
  object-fit: cover; pointer-events: none; user-select: none;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
/* why: 右侧文字列 — 两行纵排, 左对齐; 行距收紧让上下两行成一组 */
.cm-trigger-box-text { display: flex; flex-direction: column; align-items: flex-start; gap: 1px; line-height: 1.15; }
/* why: 上行 CTA "xxs内点击" — 13px; 秒数 <strong> 单独提亮(粉)+等宽数字防跳动, 突出紧迫感 */
.cm-trigger-box-cta { font-size: 13px; font-weight: 700; letter-spacing: .2px; white-space: nowrap; }
.cm-trigger-box-cta strong { color: #ff8fc0; font-weight: 800; font-variant-numeric: tabular-nums; margin-right: 1px; }
/* why: 下行"获取xxbuff" — 比上行小一号(11px)且半透明弱化, 上主下辅整体均衡 (用户钦定下面字放小) */
.cm-trigger-box-label { font-size: 11px; font-weight: 700; letter-spacing: .2px; opacity: .82; white-space: nowrap; }

/* why: 三类按语义换描边/光晕色 — 蓝(爆率)/青紫(暴力点击)/暖金(临时接入), 跟各自弹窗成系列 */
.cm-trigger-rate { border-color: rgba(255, 255, 255, .62); } /* why(iOS玻璃): 去青边→白 */
.cm-trigger-auto {
  border-color: rgba(255, 255, 255, .62); /* why(iOS玻璃): 去青紫边→白 */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .50), 0 8px 18px rgba(20, 15, 60, .42); /* why(iOS玻璃): 去青紫外发光层, 留顶白高光+落地暗影结构 */
}
.cm-trigger-temp {
  border-color: rgba(255, 210, 130, .62);
  box-shadow: 0 0 12px rgba(255, 190, 90, .45), inset 0 1px 0 rgba(255, 255, 255, .50), 0 8px 18px rgba(60, 40, 0, .42);
}

/* why: 临时接入透明遮罩 — 全屏接管点击, 点弹窗外即关; 无灰底(用户钦定保持浮在画面上) */
.cm-temp-mask {
  position: absolute; inset: 0;
  z-index: 221; /* why: 同弹窗层, 低于假广告遮罩(240) */
  background: transparent;
}

/* ── 临时接入弹窗 — 复用总览按钮/字体, 去灰底直接浮在画面上, 紧凑尺寸, 顶上带 CCTV 台标 ── */
.cm-temp-prompt {
  position: absolute;
  left: 50%; top: 46%; transform: translate(-50%, -50%); /* why: 略偏上居中, 按钮组落画面中段不被底部 tab 压住 */
  z-index: 221; /* why: 压主 UI(同弹窗层), 低于假广告遮罩(240) — 看广告时被盖住 */
  display: flex; flex-direction: column; align-items: center; gap: 9px; /* why: 比总览 14px 收紧 — 缩小尺寸 */
  text-align: center;
  font-family: -apple-system, "PingFang SC", sans-serif;
  /* why: 中央阴影背景 — 中心深色暗影衬住文字 + 一层极淡绿辉光(呼应 CCTV 台标), 边缘透明无硬框, 像悬空信号面板 (抄 cm-holo 中心放射暗影思路, 换信号绿调) */
  padding: 18px 22px;
  border-radius: 20px;
  overflow: hidden;
  /* iOS玻璃: 玻璃底(去 CCTV 绿暗影 + 顶部迎光反光 + 淡深垫底保证白字可读) */
  background: var(--cm-glass-specular), var(--cm-glass-popup-tint);
  color: rgba(255, 255, 255, .96);
  box-shadow: var(--cm-glass-shadow);
  /* 保留弹跳入场; 去 cmMultGlitch 故障抽搐 */
  animation: cmPopBounceIn .4s cubic-bezier(.2, .8, .3, 1);
}
/* iOS玻璃: 原 CRT 扫描线 ::before 改渐变受光描边 */
.cm-temp-prompt::before {
  content: ""; position: absolute; inset: 0; z-index: 2; border-radius: inherit; padding: 1px;
  background: var(--cm-glass-edge);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  pointer-events: none;
}
/* why: 内容压在扫描线之上保证清晰 */
.cm-temp-prompt > * { position: relative; z-index: 1; }
/* why: 台标 — 跟总览 CctvOsd 同款等宽荧光绿台标 (CH号+机位) */
.cm-temp-osd {
  font-family: "Menlo", "Monaco", "Courier New", monospace;
  font-size: 13px; font-weight: 700; letter-spacing: 1px;
  color: rgba(255, 255, 255, .88); /* 去 CCTV 荧光绿改中性白 */
  text-shadow: var(--cm-glass-text-outline);
  opacity: .9;
}
/* 标题前红三角 — 保留语义警告红(调色板允许) + 黑描边去红光晕 */
.cm-temp-tri { color: #ff6b6b; text-shadow: var(--cm-glass-text-outline); }
/* why: 缩小尺寸 — 标题/按钮按比例收小, 颜色字体不动(仍照搬总览) */
/* why: 标题叠 RGB 色散故障 — 红(#ff5a5a 呼应前缀三角)/绿(CCTV 台标)横向错位, 跟整块 glitch 同 5s 节奏 */
.cm-temp-prompt .ov-prompt-title { font-size: 21px; letter-spacing: 2px; }
@keyframes cmTempTitleGlitch {
  0%, 17%, 19%, 46%, 48%, 100% { text-shadow: 0 0 9px rgba(120,210,255,.55), 0 1px 2px rgba(0,0,0,.95); }
  18% { text-shadow: -3px 0 rgba(255,90,90,.9),  3px 0 rgba(120,255,168,.9), 0 0 9px rgba(120,210,255,.5); }
  47% { text-shadow:  3px 0 rgba(255,90,90,.9), -3px 0 rgba(120,255,168,.9), 0 0 9px rgba(120,210,255,.5); }
}
.cm-temp-prompt .ov-prompt-btns.col { gap: 8px; margin-top: 4px; }
.cm-temp-prompt .ov-prompt-btn { min-width: 92px; padding: 7px 16px; font-size: 15px; letter-spacing: 1px; }
.ov-prompt-title {
  font-size: 27px; font-weight: 700; letter-spacing: 3px; color: #ffffff;
  text-shadow: var(--cm-glass-text-outline); /* iOS玻璃: 去青荧光→黑描边 */
}
.ov-prompt-btns { display: flex; gap: 16px; margin-top: 8px; }
.ov-prompt-btns.col { flex-direction: column; gap: 11px; }
/* why: 终端选项风 — 直角描边 + 荧光字, 不是 App 圆角按钮 */
.ov-prompt-btn {
  min-width: 110px; padding: 10px 22px; border-radius: 2px; cursor: pointer;
  font-size: 19px; font-weight: 700; letter-spacing: 2px;
  color: #b8f5cc; background: rgba(110,255,168,.07);
  border: 1px solid rgba(110,255,168,.45);
  text-shadow: 0 0 6px rgba(110,255,168,.5);
}
.ov-prompt-btn.primary {
  color: #fff0b0; background: rgba(255,200,80,.1);
  border-color: rgba(255,200,80,.55); text-shadow: 0 0 8px rgba(255,200,80,.6);
}
.ov-prompt-btn.ghost { background: transparent; color: #9fb0c0; border-color: rgba(255,255,255,.2); text-shadow: none; }
.ov-prompt-btn.is-disabled { color: #ff9a9a; background: rgba(255,90,110,.08); border-color: rgba(255,90,110,.3); text-shadow: none; cursor: not-allowed; }
.ov-prompt-btn:active { filter: brightness(1.45); }

/* 体力 UI — 复刻 体力.html 完整动效 */
.cm-stamina-ring {
  position: relative;
  /* why: 68→56 收回, 跟家园 .hud-ring (min(13vw,56px)) 大小一致 (用户钦定"大小跟家园一致") */
  width: 56px; height: 56px;
  pointer-events: none;
}
.cm-stamina-ring .aura {
  position: absolute; inset: -8px;
  border-radius: 50%;
  /* why: 默认态 aura 改蓝, 跟 SVG cmStamGrad 蓝渐变协调 */
  background: radial-gradient(circle, rgba(100, 170, 255, 0.22) 0%, transparent 60%);
  opacity: 0;
  pointer-events: none;
}
.cm-stamina-ring.consuming .aura {
  opacity: 1;
  animation: cmStamAuraBurst .5s ease-out;
}
@keyframes cmStamAuraBurst {
  0%   { transform: scale(.85); opacity: 0; }
  40%  { transform: scale(1.15); opacity: .9; }
  100% { transform: scale(1.3); opacity: 0; }
}
.cm-stamina-ring svg {
  width: 100%; height: 100%;
  transform: rotate(-90deg);
  /* why: 默认态 drop-shadow 跟蓝渐变同色调 */
  filter: drop-shadow(0 0 8px rgba(100, 170, 255, 0.45));
  transition: filter 0.4s ease;
}
.cm-stamina-ring .track {
  fill: none;
  stroke: rgba(255, 255, 255, 0.10);
  stroke-width: 8;
}
.cm-stamina-ring .fill {
  fill: none;
  stroke: url(#cmStamGrad);
  stroke-width: 6;
  stroke-linecap: round;
  transition: stroke-dashoffset .35s cubic-bezier(.2, .9, .25, 1.1), stroke .4s ease;
}
.cm-stamina-ring .content {
  position: absolute; inset: 0;
  /* why: grid 让闪电图与数字同占一格叠放 (横竖中心一致), 不再上下排 */
  display: grid; place-items: center;
  pointer-events: none;
}
.cm-stamina-ring .bolt {
  /* why: 闪电位图 stamina.webp 当数字底纹 — 跟数字同格叠放, 居中重合 */
  grid-area: 1 / 1;
  /* why: 闪电在数字图层下 (用户钦定 z 低于 .num) */
  z-index: 1;
  /* why: 闪电高=精力圈半径×1.5 (用户钦定). 环 56px → SVG 圆半径 40/100×56≈22.4px, ×1.5≈34px = 环框×0.6 */
  width: calc(56px * 0.6); height: calc(56px * 0.6);
  background: url("assets/icon/stamina.webp") center/contain no-repeat;
  /* why: 默认蓝调辉光 — is-low/is-full 各自 override filter (color 对位图无效, 仅靠 filter 调色温) */
  filter: drop-shadow(0 0 4px #5fa8ff);
  transition: filter .3s ease;
}
.cm-stamina-ring .num {
  /* why: 数字跟闪电同格叠放, 盖在闪电上层 (z 高于 .bolt) */
  grid-area: 1 / 1;
  z-index: 2;
  /* why: 精力环中心数字 18→16 略减小 (用户钦定) */
  font-size: 16px; font-weight: 900;
  color: #fff;
  /* why: 默认态数字光晕改蓝, is-low/is-full 自己 override */
  text-shadow: 0 0 10px rgba(140, 200, 255, 0.7), 0 0 4px rgba(255,255,255,.5);
  font-variant-numeric: tabular-nums;
  line-height: 1;
  letter-spacing: -.5px;
  transition: color .3s ease, text-shadow .3s ease;
}
.cm-stamina-ring .num.pop-down { animation: cmStamPopDown .35s cubic-bezier(.3, 1.5, .5, 1); }
.cm-stamina-ring .num.pop-up { animation: cmStamPopUp .4s cubic-bezier(.3, 1.5, .5, 1); }
@keyframes cmStamPopDown {
  0%   { transform: scale(1); }
  40%  { transform: scale(0.78); color: #ff6b9d; }
  100% { transform: scale(1); }
}
@keyframes cmStamPopUp {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.18); color: #b6ffb0; }
  100% { transform: scale(1); }
}
.cm-stamina-ring.is-full svg {
  filter: drop-shadow(0 0 14px rgba(255, 215, 100, 0.8));
  animation: cmStamFullGlow 2.2s ease-in-out infinite;
}
/* why: 满格态加金光呼吸晕, 跟 cmStamFullGlow 同 2.2s 节奏对齐, 柔化"已满"感 */
.cm-stamina-ring.is-full .aura {
  opacity: 1;
  background: radial-gradient(circle, rgba(255, 215, 100, 0.32) 0%, transparent 60%);
  animation: cmStamFullAura 2.2s ease-in-out infinite;
}
@keyframes cmStamFullAura {
  0%, 100% { opacity: .35; transform: scale(.96); }
  50%      { opacity: .85; transform: scale(1.10); }
}
.cm-stamina-ring.is-full .num {
  /* why: 用户要"精力数字改为白色", 满格状态原 #ffe28a 金色 → 白; 金光晕保留在 text-shadow */
  color: #fff;
  text-shadow: 0 0 14px rgba(255, 200, 80, 0.9);
}
.cm-stamina-ring.is-full .bolt {
  color: #ffd96b;
  filter: drop-shadow(0 0 5px #ffb73d);
}
@keyframes cmStamFullGlow {
  0%, 100% { filter: drop-shadow(0 0 11px rgba(255, 215, 100, 0.6)); }
  50%      { filter: drop-shadow(0 0 18px rgba(255, 215, 100, 1)); }
}
.cm-stamina-ring.is-low svg {
  filter: drop-shadow(0 0 12px rgba(255, 70, 100, 0.7));
  animation: cmStamLowPulse .8s ease-in-out infinite;
}
.cm-stamina-ring.is-low .num {
  /* why: 数字始终白色; 低电警告由 text-shadow 红光晕保留语义 */
  color: #fff;
  text-shadow: 0 0 11px rgba(255, 70, 110, 0.9);
}
.cm-stamina-ring.is-low .bolt {
  color: #ff7a9a;
  filter: drop-shadow(0 0 4px #ff3060);
}
@keyframes cmStamLowPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.04); }
}
/* why(用户需求3c "体力框颤动必须短促, 回应每一次点击"): is-empty 原来的一次性 CSS 抖动改为命令式 —
   StaminaRing.apiRef.shake() 每次无效点击用 WAAPI 重播短颤(见 app.jsx StaminaRing), 才能"每次点都颤";
   这里不再绑定 animation, 免与 WAAPI 的 transform 打架. keyframes cmStamShake 保留备用. */
.cm-stamina-ring.is-empty { /* shake 已改命令式, 见上 */ }
@keyframes cmStamShake {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}
.cm-stam-fly {
  position: absolute; pointer-events: none;
  font-size: 16px; font-weight: 700;
  z-index: 50;
  text-shadow: 0 0 8px currentColor;
  animation: cmStamFly .9s cubic-bezier(.2, .8, .3, 1) forwards;
}
.cm-stam-fly.minus { color: #ff6b9d; }
.cm-stam-fly.plus  { color: #8affb0; }
@keyframes cmStamFly {
  0%   { transform: translateY(0) scale(.6); opacity: 0; }
  20%  { transform: translateY(-6px) scale(1.15); opacity: 1; }
  100% { transform: translateY(-44px) scale(.95); opacity: 0; }
}
.cm-stam-toast {
  position: absolute; pointer-events: none;
  color: #ff5070;
  font-weight: 900; font-size: 12px;
  letter-spacing: 1px;
  z-index: 60;
  text-shadow: 0 0 8px rgba(255, 80, 110, 0.7);
  animation: cmStamNoEnergy .7s ease-out forwards;
}
@keyframes cmStamNoEnergy {
  0%   { transform: translateY(0) scale(.5); opacity: 0; }
  25%  { transform: translateY(-10px) scale(1.2); opacity: 1; }
  100% { transform: translateY(-32px) scale(.9); opacity: 0; }
}

/* 金币小 pill */
.cm-coin-pill {
  display: inline-flex; align-items: center; gap: 8px;
  /* why: 金币挪到顶栏右上角; 用户钦定累计往上 16px、往左 16px (两轮各 8px) — 用 position 偏移 (布局后位移, 精确;
     margin-top 负值会被 flex align-items:center 折半, 故不用 margin) */
  position: relative; top: -16px; left: -16px;
  padding: 6px 14px 6px 6px;
  /* why: 用户要"浅灰色半透明" — 中性深灰(80,80,90,.72) → 浅灰(215,218,228,.38), 跟主背景视频粉色调温和共存 */
  background: rgba(215, 218, 228, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  box-shadow:
    0 4px 12px rgba(0, 0, 0, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.28);
}
.cm-coin-pill .icn {
  /* why: 金币图标改用 AI 生成的位图 (用户钦定"生个美观的图"); 18px, contain 居中, drop-shadow 给金光晕 */
  position: relative;
  width: 18px; height: 18px;
  background: url("assets/icon/coin.webp") center/contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 200, 80, 0.55));
}
.cm-coin-pill .num {
  /* why: 数字 13→14 略增大 (用户钦定), line-height 1 压紧 */
  font-weight: 800; font-size: 14px; line-height: 1;
  color: #ffe9c2;
  text-shadow: 0 0 8px rgba(255, 200, 80, 0.45);
  font-variant-numeric: tabular-nums;
}
.cm-coin-pill .mult {
  margin-left: 4px;
  font-weight: 800; font-size: 12px;
  padding: 2px 8px; border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 80, 140, 0.4), rgba(255, 140, 200, 0.3));
  border: 1px solid rgba(255, 180, 210, 0.5);
  color: #fff;
}
.cm-coin-pill .mult.pulse { animation: cmMultPulse .5s ease-out; }
@keyframes cmMultPulse {
  0%   { transform: scale(1); }
  50%  { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ── 充能舱 (进度条 + 爪子 视觉合一) ─────────────────────── */
.cm-charge-overlay {
  /* why: top 78→70, 充能舱再上移 8px (累计 20px) */
  position: absolute; top: 70px; left: 14px; right: 14px; z-index: 9;
  pointer-events: none;
}
.cm-charge-panel {
  /* why: 去外框只作纯定位容器 — 用户反馈"地下那个遮罩框没必要" */
  position: relative;
  pointer-events: none;
}
.cm-charge-row {
  position: relative;
  height: 50px;
}
.cm-bar-host {
  position: absolute;
  /* why: 球右移 8 后, 充能仓也跟着右扩 8 (right 56→48), 保持重叠不变 */
  top: auto; bottom: 0; left: 0; right: 48px;
  /* why: 旧版用 scaleY(0.5) 压扁 50px → 25px, 会把 border-radius/阴影纵向拉成
     不对称椭圆角 (用户反馈"被压扁/圆角奇怪"). 改为直接给 26px 真实高度并锚定底部,
     圆角/阴影渲染不再变形. 爪子是独立元素 (.cm-claw-host top:50%), 不受影响 */
  height: 26px;
  pointer-events: none;
}
.cm-claw-host {
  position: absolute;
  /* why: right=10 让圈更靠右; host 高度=cm-claw-btn 高度 (label 脱离布局),
     translateY(-50%) 让圆中心严格对齐充能仓中线, 不被下方"启动!"小字带偏 */
  right: 2px;
  top: 50%;
  /* why: 圆中心严格对齐充能仓中线 */
  transform: translateY(-50%);
  width: 64px;
  /* why: 启动球做概率弹窗入口 — 收点击 (上层 charge-overlay 整体 none, 这里单独开),
     data-notap 让它不计入抓取充能; 点击区=爪子圈+"启动!"小字 */
  pointer-events: auto;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 5;
}

/* 霓虹 LED 进度条 */
/* why: 无色高透明玻璃槽 — 底色用 @property 驱动 alpha 呼吸 (不再有粉色, 只在透明度上明暗起伏) */
@property --cm-bar-c1 {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(255, 255, 255, 0.08);
}
@property --cm-bar-c2 {
  syntax: '<color>';
  inherits: false;
  initial-value: rgba(255, 255, 255, 0.03);
}

.cm-bar-neon {
  position: absolute; inset: 0;
  background: linear-gradient(180deg, var(--cm-bar-c1) 0%, var(--cm-bar-c2) 100%);
  /* why: 无色磨砂玻璃 — 透出背景视频, 营造高透明感 (Safari 需 -webkit- 前缀) */
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  animation: cmBarTint 10s ease-in-out infinite;
  /* why: 高度恢复正常后圆角不再被压扁, 8px 圆润而克制 */
  border-radius: 8px;
  padding: 5px;
  /* why: 纯中性玻璃阴影 — 上缘细白高光 + 下缘淡暗 + 1px 白描边 + 外柔影, 去掉所有粉色光晕 */
  box-shadow:
    inset 0 1px 1px rgba(255, 255, 255, .38),
    inset 0 -1px 2px rgba(0, 0, 0, .16),
    inset 0 0 0 1px rgba(255, 255, 255, .22),
    0 2px 10px rgba(0, 0, 0, .22);
  overflow: hidden;
}
@keyframes cmBarTint {
  /* why: 颜色恒为白, 仅 alpha 在 0.05↔0.13 间呼吸, 保留原"舱体明暗起伏"动效但完全无色 */
  0%, 100% {
    --cm-bar-c1: rgba(255, 255, 255, 0.08);
    --cm-bar-c2: rgba(255, 255, 255, 0.03);
  }
  50% {
    --cm-bar-c1: rgba(255, 255, 255, 0.14);
    --cm-bar-c2: rgba(255, 255, 255, 0.06);
  }
}
/* why: z:2 必须高于 v2 PNG 底框 ::after(z:1) — 否则同层且伪元素绘制序在后, 点击填充格/游标会被 top_progress_track PNG 盖住(用户反馈"进度条动效被埋 png 底下") */
/* ══════ 纯条填充 (用户"去掉格子的概念, 变成纯条, 但保留进度末尾的光效") ══════
   why(为什么拆格子): 原来是 total 个 .cell 平铺, 每次点击 React 都要把整排格子重新 reconcile
   (每格重算 on/lap-on/popping 三个 class + 调色板 inline style) —— 这是连点卡顿的大头.
   现在整条只有一个填充 div, 点击只改它的 width, 每击的 DOM 工作量从 O(格数) 降到 O(1).
   格子的"叠色圈"语义(抓取期每满一圈欠一抽, 见 grabLap)靠两层保住:
     .cm-bar-basefull = committed 时锁死的满格冰蓝底; .cm-bar-fill = 覆在其上、按本圈 lap 色填到当前进度. */
.cm-bar-neon .cm-bar-fill,
.cm-bar-neon .cm-bar-basefull,
.cm-bar-neon .cm-bar-waves,
.cm-bar-neon .lead-spark { position: absolute; z-index: 2; }
/* why: z:2 必须高于 v2 PNG 底框 ::after(z:1) — 否则同层且伪元素绘制序在后, 填充/游标会被 top_progress_track PNG 盖住 */
/* why(用户"抓取时刻整个进度条的镭射特效也要有圆角的"): 根因 —— .cm-bar-neon 自己的 border-radius 是 0
   (条的视觉圆角其实来自底框 PNG top_progress_track_base.png), 而 .cm-bar-laser 写的是 border-radius:inherit
   → 继承到 0 = 直角矩形硬压在圆角轨道上. 这里定义一个共享圆角, 让填充/底/镭射三层都吃它.
   999px: 条实测 279×12, 半高=6 → 999 会被夹到 6 = 正胶囊, 且条高以后改了也不用跟着改这个数. */
.cm-bar-neon { --cm-bar-r: 999px; }
/* why(用户"填充区域上下左右都要留一点点距离" → 再"周围再留多一点"): 1.5 → 2.5 → 3.5px.
   条实测 279×12 → 上下各让 3.5 后填充剩 5px 高(占条高 42%), 明显是"轨道里装着一根芯"而不是"填充就是轨道本身".
   ⚠ 这已经接近下限: 再往上加, 芯会细过末端那颗 lead-spark(14px 宽), 变成"一颗球拖着一根线".
   why(用 px 不用 %): inset 的百分比左右按容器【宽】算 —— 写 3% 会变成左右各 8.4px、上下各 0.36px, 完全不是"四周都留". */
.cm-bar-neon .cm-bar-basefull { inset: 3.5px; z-index: 1; border-radius: var(--cm-bar-r); pointer-events: none; }
.cm-bar-neon .cm-bar-fill {
  inset: 3.5px;                /* 同上: 比大框略小 (见 .cm-bar-basefull 的 why) */
  border-radius: var(--cm-bar-r);
  pointer-events: none;
  /* why(用户"填充颜色本身是亮蓝色渐变到粉色, 是整体渐变色"): 横向(90deg)铺满整条的蓝→粉.
     配合 JSX 里的 clip-path(本元素永远满宽, 靠裁剪露出进度) → 这条渐变始终是"整条的渐变", 不随进度压缩. */
  background: linear-gradient(90deg,
    #4fc3ff 0%, #7fd8ff 20%, #a9b6ff 46%, #e08ce0 74%, #ff6fb8 100%);
  /* ★why(用 drop-shadow 而不是原来的 box-shadow): 本元素被 clip-path 裁着 ——
     box-shadow 画在元素【盒子】上, 会被 clip-path 一起裁掉, 辉光直接消失(与家园 .heart-fill 被 overflow 裁光是同一类坑);
     drop-shadow 是滤镜, 作用在【裁完之后的图形】上 → 辉光自动贴着填充前沿走, 正是要的. 代价: 滤镜画不了 inset, 内高光改由下面 ::before 承担. */
  animation: cmBarFillBreath 2.4s ease-in-out infinite;
  /* why(120ms linear): 点击推进要跟手 —— 太长会"追不上"手速, 缓动曲线会让连点看着黏; 线性短过渡最贴手 */
  transition: clip-path .12s linear;
}
/* why: 呼吸 —— 沿用原 .cell.on 那套 2.4s 节奏, 但两层光的色相跟着新渐变走(近处蓝、远处粉), 才像这条蓝粉渐变自己在发光 */
@keyframes cmBarFillBreath {
  0%, 100% { filter: drop-shadow(0 0 5px rgba(110, 210, 255, .55)) drop-shadow(0 0 12px rgba(255, 120, 200, .22)); }
  50%      { filter: drop-shadow(0 0 11px rgba(150, 232, 255, .95)) drop-shadow(0 0 26px rgba(255, 120, 200, .5)); }
}
.cm-bar-neon .cm-bar-fill::before {
  content: ''; position: absolute; top: 1.5px; left: 3px; right: 3px; height: 36%;
  border-radius: 999px; pointer-events: none;
  /* why: 顶部反光 — 同原 .cell.on::before, 维持玻璃透感. 它在元素内部, 会跟着 clip-path 一起被裁 = 正确(只在填充部分才有反光) */
  background: linear-gradient(180deg, rgba(255, 255, 255, .42), transparent);
}
/* why: committed(抓取叠色圈)时底锁满格冰蓝, 填充层换成本圈暖色覆盖上去 — 与原来"整条底满格蓝 + 前 N 格暖色"逐帧等义 */
.cm-bar-neon.committed .cm-bar-basefull {
  background: linear-gradient(180deg, rgba(165, 230, 255, .40) 0%, rgba(70, 175, 255, .24) 100%);
}
.cm-bar-neon.committed .cm-bar-fill {
  background: linear-gradient(90deg, var(--lap, #ffd54a) 0%, var(--lap2, #ff9e2c) 100%);
}

/* ══════ 点击打击波 (用户"每次点击时, 进度末尾向进度条开头发出一条彩虹镭射光效波") ══════ */
.cm-bar-neon .cm-bar-waves {
  inset: 0; z-index: 3; pointer-events: none;
  /* why: 裁在条内 — 波要滑到条首之外去, 不裁的话会甩出条体飘在娃娃机画面上 */
  overflow: hidden; border-radius: inherit;
}
.cm-bar-neon .cm-bar-wave {
  position: absolute; top: 0; bottom: 0; left: 0;
  width: var(--from, 100%); /* = 发波时的进度末尾: 于是 translateX(-100%) 正好把亮带从末尾送到条首(0) */
  pointer-events: none;
  /* why(plus-lighter 而不是 screen): 用户"连续点击的话光波直接会相互影响" —— plus-lighter 是真加法,
     两道波交叠处亮度直接相加, 叠得越多越白; screen 会趋近饱和, 叠到第三道就看不出区别了. */
  mix-blend-mode: plus-lighter;
  /* 彩虹镭射亮带压在元素【右端】= 进度末尾; 左侧拖一条衰减尾.
     why(用户"点击冲击效果更明亮一点点"): 整条 alpha 上抬约一档(.22/.48/.92/.85/.9 → .34/.68/1/1/1),
     并给亮带补一层 drop-shadow 让它自己发光 —— plus-lighter 下 alpha 就是"加多少光", 抬 alpha 即变亮.
     色标位置不动: 亮带仍紧贴右端(= 打击点), 只是更亮, 不是更宽 —— 更宽会糊成一片而不是"一道冲击". */
  background: linear-gradient(90deg,
    rgba(95, 217, 255, 0) 0%,
    rgba(180, 110, 255, .34) 58%,
    rgba(255, 61, 209, .68) 74%,
    rgba(255, 216, 77, 1) 88%,
    rgba(140, 255, 235, 1) 96%,
    rgba(255, 255, 255, 1) 100%);
  filter: drop-shadow(0 0 4px rgba(255, 200, 120, .55)); /* why: 亮带自带一圈溢光, 打击感更"炸"; 只此一层, 6 道波同屏时不至于烧合成 */
  /* why(只动 transform/opacity): 这两样走合成层, 不触发重排重绘 —— 用户要"优化卡顿", 而狂点时同屏有 6 道波在跑.
     若改成动 background-position 或 left, 每帧都要重绘整条, 正是要避开的. */
  animation: cmBarWave .62s cubic-bezier(.16, .72, .3, 1) forwards;
  will-change: transform, opacity;
}
/* why(用户"端点不要只是一根线截断, 做成形状毛茸茸的光点"): 光波本体继续负责彩虹拖尾，
   只用伪元素盖住右端直截面；单元素随父层一起合成移动，不给狂点路径增加 DOM 或 JS 粒子。 */
.cm-bar-neon .cm-bar-wave::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  width: 22px; /* why: 约为 12px 轨道高度的 1.8 倍，能露出绒边但不会像独立按钮。 */
  height: 20px; /* why: 略扁于宽度，让光核顺着光条方向延展而不是规则圆珠。 */
  transform: translate(46%, -50%); /* why: 核心压住原本的右端截线，同时让外层绒光自然溢到推进点前方。 */
  border-radius: 48% 58% 46% 62% / 57% 45% 61% 49%; /* why: 非对称轮廓消除几何圆点感。 */
  background:
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 1) 0 16%, rgba(226, 249, 255, .96) 24%, rgba(166, 226, 255, .52) 43%, transparent 69%),
    radial-gradient(ellipse at 24% 35%, rgba(255, 135, 225, .78) 0 12%, rgba(255, 135, 225, .24) 29%, transparent 56%),
    radial-gradient(ellipse at 78% 30%, rgba(132, 247, 255, .88) 0 10%, rgba(132, 247, 255, .28) 31%, transparent 59%),
    radial-gradient(ellipse at 67% 79%, rgba(190, 126, 255, .68) 0 9%, rgba(190, 126, 255, .2) 27%, transparent 55%),
    radial-gradient(ellipse at 29% 76%, rgba(255, 236, 153, .62) 0 8%, rgba(255, 236, 153, .16) 25%, transparent 52%);
  filter:
    blur(.35px) /* why: 只软化最外侧像素，不糊掉中心白热光核。 */
    drop-shadow(0 0 3px rgba(234, 250, 255, .95))
    drop-shadow(0 0 7px rgba(111, 220, 255, .72))
    drop-shadow(0 0 11px rgba(255, 100, 214, .38));
  mix-blend-mode: screen;
  pointer-events: none;
}
@keyframes cmBarWave {
  0%   { transform: translateX(0); opacity: .95; }
  100% { transform: translateX(-100%); opacity: 0; }
}

.cm-bar-neon .cell {
  flex: 1; height: 100%; border-radius: 5px;
  /* why: 无色玻璃凹槽 — 去粉色, 极淡中性透明白, 只靠内阴影勾出槽位轮廓 */
  background: rgba(255, 255, 255, .04);
  box-shadow:
    inset 0 1px 2px rgba(0, 0, 0, .16),
    inset 0 -1px 0 rgba(255, 255, 255, .14),
    inset 0 0 0 1px rgba(255, 255, 255, .10);
  transform-origin: 50% 100%;
  position: relative;
}
.cm-bar-neon .cell::before {
  content: ''; position: absolute; inset: 1.5px; border-radius: 3.5px;
  /* why: 无色 — 底部极淡白晕代替原粉晕 */
  background: radial-gradient(ellipse at 50% 100%, rgba(255, 255, 255, .07), transparent 70%);
  pointer-events: none;
}
.cm-bar-neon .cell.on {
  /* why: 冰蓝"有色玻璃"亮态 — 用户要"有颜色但高透明": 低 alpha 蓝让背景透出 (像染了蓝的玻璃),
     色彩存在感靠冷辉光而非实心填充. 忽略调色板 --c/--c2, 点亮/pop 动画逻辑不变 */
  background: linear-gradient(180deg, rgba(165, 230, 255, .40) 0%, rgba(70, 175, 255, .24) 100%); /* why: 上浅下深半透蓝, alpha 压到 .24-.40 保高透明, 背景仍透得过 */
  box-shadow:
    0 0 11px rgba(120, 215, 255, .92),     /* why: 近距冰蓝辉光 (基线已调强, 呼吸会在此上下脉动) */
    0 0 26px rgba(85, 190, 255, .60),      /* why: 远距冷光晕, 多格连亮连成能量带 */
    0 0 0 rgba(75, 175, 255, 0),           /* why: 大光晕占位层 — 呼吸峰值才亮, 此处 alpha 0 (保 6 层一致可插值) */
    inset 0 0 10px rgba(165, 232, 255, .50), /* why: 内发光 — 格子像被能量从内部点亮, "充能"感关键 */
    inset 0 1px 0 rgba(255, 255, 255, .50),  /* why: 顶部细玻璃高光 (压淡, 别糊住透明感) */
    inset 0 -2px 5px rgba(0, 60, 120, .18);  /* why: 底部淡蓝暗收口, 轻体积 */
  /* why: 呼吸辉光 — 点亮格子常驻脉动, 2.4s 一周期像缓慢的能量心跳 (只动发光, 不碰填充透明度) */
  animation: cmCellBreath 2.4s ease-in-out infinite;
}
/* why: 刚点亮那格同时跑 pop(弹跳, 动 transform/filter) + 呼吸(动 box-shadow), 两者属性不冲突, 可叠加 */
.cm-bar-neon .cell.on.popping { animation: cmCellPop var(--bounce-ms, 520ms) cubic-bezier(.34, 1.65, .55, 1), cmCellBreath 2.4s ease-in-out infinite; }
.cm-bar-neon .cell.on::before {
  content: ''; position: absolute; top: 3px; left: 3px; right: 3px; height: 38%;
  border-radius: 3px;
  /* why: 顶部反光压淡 (.65→.38), 维持玻璃透感不发白 */
  background: linear-gradient(180deg, rgba(255, 255, 255, .38), transparent);
}
.cm-bar-neon .cell.on::after {
  content: ''; position: absolute; bottom: 5px; left: 50%; transform: translateX(-50%);
  width: 5px; height: 5px; border-radius: 50%;
  /* why: 冰蓝核心亮点 — 白热芯 + 双层冰蓝外晕, 像能量结晶, 加亮强化充能感 */
  background: rgba(246, 252, 255, .98);
  box-shadow: 0 0 4px #ffffff, 0 0 11px #9fe0ff;
}
@keyframes cmCellPop {
  0%   { transform: scaleY(.3) scaleX(.65); filter: brightness(2.5) saturate(1.7); }
  35%  { transform: scaleY(1.22) scaleX(1.1); filter: brightness(1.7); }
  60%  { transform: scaleY(.94) scaleX(.97); filter: brightness(1.1); }
  100% { transform: scaleY(1) scaleX(1); filter: brightness(1); }
}
/* why: 呼吸辉光 — 6 层强弱脉动 (近/远/大光晕 + 内发光 + 顶高光; 底暗恒定), 充能感靠峰值大幅拉强; 填充透明度全程不变, 维持"透明 + 发光 + 呼吸"并存 */
@keyframes cmCellBreath {
  0%, 100% {
    box-shadow:
      0 0 8px rgba(110, 210, 255, .65),    /* why: 呼气 — 近距辉光收弱 */
      0 0 18px rgba(80, 180, 255, .35),
      0 0 28px rgba(75, 175, 255, 0),      /* why: 大光晕呼气时熄灭 */
      inset 0 0 7px rgba(155, 228, 255, .32),  /* why: 内发光收弱 */
      inset 0 1px 0 rgba(255, 255, 255, .45),
      inset 0 -2px 5px rgba(0, 60, 120, .18);
  }
  50% {
    box-shadow:
      0 0 18px rgba(150, 232, 255, 1),     /* why: 吸气 — 近距辉光满, 近白蓝 */
      0 0 42px rgba(95, 195, 255, .90),    /* why: 远距冷光晕涨满 */
      0 0 70px rgba(75, 175, 255, .50),    /* why: 大光晕爆开 — "能量灌满"的扩散感 */
      inset 0 0 16px rgba(190, 244, 255, .80), /* why: 内发光爆亮, 整格像通了电 */
      inset 0 1px 0 rgba(255, 255, 255, .68),
      inset 0 -2px 5px rgba(0, 60, 120, .18);
  }
}
.cm-bar-neon .lead-spark {
  position: absolute; top: -6px; bottom: -6px; width: 14px;
  pointer-events: none;
  /* why: 领头火花染冰蓝 — 跟点亮格子同色系, 充能推进的"光头"有冷能量感 */
  background: radial-gradient(ellipse at center, rgba(216, 246, 255, .98), rgba(120, 205, 255, 0) 65%);
  mix-blend-mode: screen;
  opacity: 0;
  transition: left .35s cubic-bezier(.34, 1.7, .55, 1), opacity .25s;
  transform: translateX(-50%);
}
.cm-bar-neon.has-progress .lead-spark { opacity: 1; }

/* ── 爪子按钮 + 启动炫光 + 状态动画 ────────────────────── */
.cm-claw-btn {
  position: relative;
  /* why: 从 84x92 缩到 64x70 (~76%), 跟圆形底等比例缩 */
  width: 64px; height: 70px;
  pointer-events: none;
  transform-origin: 50% 30%;
  z-index: 5;
}
/* why: 爪子下圆 - 无色磨砂玻璃球 (与进度条统一风格): 顶部椭圆白柔光 + 极淡中性透明体 + blur 透出背景 */
.cm-claw-btn::before {
  content: '';
  position: absolute;
  /* why(用户): 圆按钮(磨砂球)竖直居中到问号图标中心(问号背景在 btn 顶部 top center/40% 52% → 中心在 26%); 球 z:1 已在问号 z:2 之下 */
  top: 26%; left: 50%;
  transform: translate(-50%, -50%);
  width: 70px; height: 70px;
  border-radius: 50%;
  background:
    /* 顶部玻璃柔光 (椭圆白光) */
    radial-gradient(ellipse 42% 22% at 50% 16%, rgba(255,255,255,0.9) 0%, rgba(255,255,255,0) 80%),
    /* 球体 - 无色高透明白 (中心略亮→边缘更淡) */
    radial-gradient(circle at 50% 60%, rgba(255,255,255,0.12) 0%, rgba(255,255,255,0.05) 55%, rgba(255,255,255,0.02) 100%);
  /* why: 磨砂玻璃 — 透出背景视频 (Safari 需 -webkit- 前缀) */
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  box-shadow:
    /* 顶部内高光 - 玻璃质感 */
    inset 0 2px 3px rgba(255, 255, 255, 0.85),
    /* 底部内暗影 - 碗状 (中性) */
    inset 0 -3px 5px rgba(0, 0, 0, 0.18),
    /* 1px 白描边 - 玻璃边缘 */
    inset 0 0 0 1px rgba(255, 255, 255, 0.22),
    /* 外阴影 - 浮起 (中性) */
    0 6px 16px rgba(0, 0, 0, 0.28),
    0 2px 5px rgba(0, 0, 0, 0.18);
  z-index: 1;
  pointer-events: none;
}

/* why: 缝线圆环装饰层 - 圆内侧贴边一圈 dashed; z 在球底之上, 夹子之下 */
.cm-claw-deco {
  position: absolute;
  top: 50%; left: 50%;
  width: 70px; height: 70px;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 1;
}
.cm-claw-deco svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cm-claw-btn > svg { width: 100%; height: 100%; display: block; overflow: visible; position: relative; z-index: 2; }

/* (已清理: .cm-claw-launch-burst — 用户钦定"启动之后不要发光"后它一直 display:none,
   对应 app.jsx 死 DOM 一并删除; 决策见 decisions.md 2026-06 优化条目) */

.claw-base    { transform-origin: 50% 12%; }
.claw-cable   { transform-origin: 50% 0%; }
.claw-body    { transform-origin: 50% 30%; }
.claw-prong-l { transform-origin: 50% 30%; }
.claw-prong-r { transform-origin: 50% 30%; }

/* why: 用户要求爪子平时"很普通地呆着", 去掉 idle 抖动 / full 疯狂震 / pulse 点击闪
   只保留 .launching 的核心抓取动画 (body/cable/prong slam), 见下方 */
.cm-claw-btn .claw-body    { transform-origin: 50% 36%; }
.cm-claw-btn .claw-prong-l { transform-origin: 50% 30%; }
.cm-claw-btn .claw-prong-r { transform-origin: 50% 30%; }
.cm-claw-btn .claw-led     { transform-box: fill-box; transform-origin: center; }
.cm-claw-btn .claw-gem     { transform-box: fill-box; transform-origin: center; }

/* why: 点击旋转抖动 - 只动 cable + body + prongs (claw-pendant), 黄色 base 不动; 围绕 pendant 顶端 (cable 顶) 旋转 */
.cm-claw-btn.tap-flash .claw-pendant {
  animation: cmClawTapShake 220ms ease-out;
  transform-box: fill-box;
  transform-origin: 50% 0%;
}
@keyframes cmClawTapShake {
  0%   { transform: rotate(0deg); }
  20%  { transform: rotate(-2.5deg); }
  40%  { transform: rotate(2.5deg); }
  60%  { transform: rotate(-1.8deg); }
  80%  { transform: rotate(1.8deg); }
  100% { transform: rotate(0deg); }
}
/* why: 点击淡白光 - ::after 圈外光晕从中心向外扩散 + 渐隐 */
.cm-claw-btn::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 70px; height: 70px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.55) 0%, rgba(255,255,255,0.25) 40%, rgba(255,255,255,0) 75%);
  transform: translate(-50%, -50%) scale(0.6);
  opacity: 0;
  pointer-events: none;
  z-index: 3;
}
.cm-claw-btn.tap-flash::after { animation: cmClawTapHalo 380ms ease-out; }
@keyframes cmClawTapHalo {
  0%   { opacity: 0;    transform: translate(-50%, -50%) scale(0.6); }
  35%  { opacity: 0.75; transform: translate(-50%, -50%) scale(1.05); }
  100% { opacity: 0;    transform: translate(-50%, -50%) scale(1.6); }
}

.cm-claw-btn.launching .claw-body  { animation: cmBodyDrop 1400ms cubic-bezier(.34, 1.5, .55, 1); }
.cm-claw-btn.launching .claw-cable { animation: cmCableStretch 1400ms cubic-bezier(.34, 1.5, .55, 1); }
.cm-claw-btn.launching .claw-prong-l { animation: cmProngSlamL 1400ms cubic-bezier(.34, 1.5, .55, 1); }
.cm-claw-btn.launching .claw-prong-r { animation: cmProngSlamR 1400ms cubic-bezier(.34, 1.5, .55, 1); }
@keyframes cmBodyDrop {
  0%   { transform: translateY(0); }
  14%  { transform: translateY(32px); }
  30%  { transform: translateY(36px); }
  50%  { transform: translateY(-22px); }
  70%  { transform: translateY(8px); }
  100% { transform: translateY(0); }
}
@keyframes cmCableStretch {
  0%   { transform: scaleY(1); }
  14%  { transform: scaleY(2.6); }
  30%  { transform: scaleY(2.8); }
  50%  { transform: scaleY(.65); }
  70%  { transform: scaleY(1.15); }
  100% { transform: scaleY(1); }
}
@keyframes cmProngSlamL {
  0%   { transform: rotate(-22deg); }
  20%  { transform: rotate(-28deg); }
  34%  { transform: rotate(6deg); }
  50%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}
@keyframes cmProngSlamR {
  0%   { transform: rotate(22deg); }
  20%  { transform: rotate(28deg); }
  34%  { transform: rotate(-6deg); }
  50%  { transform: rotate(0deg); }
  100% { transform: rotate(0deg); }
}

.cm-claw-label {
  /* why: absolute 脱离布局 + nowrap 强制单行, "启动!"在圈正下方 */
  position: absolute;
  top: 100%; left: 50%; transform: translateX(-50%);
  margin-top: 4px;
  white-space: nowrap;
  font-family: 'ZCOOL KuaiLe', sans-serif;
  font-size: 13px; letter-spacing: 4px; line-height: 1;
  color: var(--cm-heart-light);
  text-shadow:
    0 0 8px var(--cm-heart-light),
    0 0 14px var(--cm-heart-deep),
    2px 2px 0 #5a1133;
  font-weight: 800;
  /* why: 删 cmLabelIdleShake — 它的 transform 会覆盖居中用的 translateX(-50%),
     导致 label 不居中; 跟爪子保持一致, 静止呆着 */
  pointer-events: none;
}
.cm-claw-label .bang { color: var(--cm-heart-mid); text-shadow: 0 0 8px var(--cm-heart-mid), 2px 2px 0 #4b0a55; }
/* ── 启动大特效层 ────────────────────────────────────────── */
.cm-flash-overlay {
  position: absolute; inset: 0;
  background: #fff;
  opacity: 0;
  pointer-events: none;
  z-index: 70;
  animation: cmFxFlash .7s ease-out forwards;
}
@keyframes cmFxFlash {
  0%   { opacity: 0; }
  12%  { opacity: .85; }
  25%  { opacity: .35; }
  100% { opacity: 0; }
}
.cm-go-text {
  /* why(用户 0709 "两字中线与屏幕中线水平对齐"): top 42%→50%, 偏移(-32/+32)清零 — 元素中心即屏幕正中 (入场动画各帧本就是无偏移 translate(-50%,-50%)) */
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  /* why(用户 0709 "不要换行"): 单行硬锁 */
  white-space: nowrap;
  /* why(用户): 原 ZCOOL KuaiLe 走 loli.net CDN 大陆加载不稳 → 换自托管的阿里巴巴普惠体 Heavy(见 @font-face 'PHFT Heavy', 已含"启动"二字); 字号保持 96px 不变 */
  font-family: 'PHFT Heavy', sans-serif;
  font-size: 96px;
  /* why: 字距 8px 撑开字间节奏; 末字后也带 8px 字距把盒子撑宽 → 补 8px 左 padding 让两字视觉中心回到盒中心, 居中才真准 */
  letter-spacing: 8px; line-height: 1.15; text-align: center; padding-left: 8px;
  font-weight: 900;
  /* why(用户): 启动字用镭射彩虹流动填充 + 白色外发光; 去掉描边 */
  background: linear-gradient(90deg, #ff3d8b, #ff9a3d, #ffe23d, #6fff9e, #4ac8ff, #b46cff, #ff3d8b);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
  filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 16px rgba(255, 255, 255, .85));
  z-index: 1200; /* why(用户 0709 "放在最上面"): 高于弹窗层(1040)/飞币(1045)/粒子(200·1042), 全局最顶 */
  pointer-events: none;
  animation: cmGoPunch 1.5s cubic-bezier(.34, 1.65, .55, 1) forwards, cmGoLaser 1.3s linear infinite; /* 冲击弹入 + 镭射彩虹流动 */
}
@keyframes cmGoLaser { to { background-position: -300% 0; } }
@keyframes cmGoPunch {
  0%   { transform: translate(-50%, -50%) scale(.18) rotate(-14deg); opacity: 0; }
  22%  { transform: translate(-50%, -50%) scale(1.35) rotate(6deg);  opacity: 1; }
  55%  { transform: translate(-50%, -50%) scale(1.0)  rotate(-2deg); opacity: 1; }
  80%  { transform: translate(-50%, -50%) scale(1.1)  rotate(1deg);  opacity: 1; }
  100% { transform: translate(-50%, -50%) scale(1.8)  rotate(10deg); opacity: 0; }
}
.cm-frame.shake { animation: cmFrameShake .45s cubic-bezier(.36, 0, .66, -.56); }

/* why: 切到非 claw tab (overview/upgrade/home) 时, 娃娃机的瞬态 UI 不该冒出来挡视野 — display:none 不影响 RAF 后台逻辑, 点击仍透到 frame */
.cm-frame.is-tab-muted .cm-gain-fly,
.cm-frame.is-tab-muted .cm-stam-fly,
.cm-frame.is-tab-muted .cm-stam-toast,
/* why: .cm-upg-popup(升级信息跳字)不进 muted 隐藏 — 它只在升级 tab(非 claw → frame 带 is-tab-muted)买升级时弹, 一起隐藏=点升级看不到反馈(用户反馈"升级跳字没了"); 切 overview/home 时 upgPopup 已被清空, 不会漏到别页签 */
.cm-frame.is-tab-muted .cm-ring-pulse-overlay,
.cm-frame.is-tab-muted .cm-fail-flash,
/* why: 心动消退 "心动消退了…" 提示 z:11 高于总览 iframe(z:9), 后台衰减触发会糊到别的页签上 — 必须一起藏 */
.cm-frame.is-tab-muted .cm-fail-toast-ring,
.cm-frame.is-tab-muted .cm-mult-hearts,
/* why: 启动特效 (闪光 + "启动!" 大字) 在其他 tab 下也不该冒出 — launching 状态可能跨 tab 持续 */
.cm-frame.is-tab-muted .cm-flash-overlay,
.cm-frame.is-tab-muted .cm-go-text {
  display: none !important;
}
/* why: launching 时 frame 自带 shake 动画, 切到其他 tab 时停掉防止 iframe 后面父容器晃动 */
.cm-frame.is-tab-muted.shake {
  animation: none;
}

/* why(#1): 玻璃框类 HUD 只在娃娃机场景显示 — 非娃娃机场景(总览/家园/升级over非claw, 由 isClawSceneVisible 判定)隐藏所有直接子级,
   白名单保留: 导航栏 + 总览iframe + 家园模态 + 任务条(guide-bar, 改常驻) + 引导高亮(guide-ripple) + 升级over总览的监控室按钮/tap-catch。
   这同时修了"在总览/家园点升级(activeTab→upgrade)时被隐藏的玻璃框重新冒出来"的 bug: 旧规则只在 overview/home 生效, 现按 isClawSceneVisible 判定, 升级over非claw 也隐藏。 */
.cm-frame.is-scene-hidden > *:not(.cm-tabbar):not(.cm-overview-iframe):not(.cm-home-modal):not(.guide-bar):not(.guide-ripple):not(.cm-monitor-upgrade):not(.cm-monitor-tap-catch):not(.cm-monitor-celebration):not(.cm-monitor-success-layer) {
  display: none !important;
}
/* why(#1): 点升级弹出升级抽屉(activeTab=upgrade)时, 单独隐藏任务条(+其引导高亮); 其它页签任务条常驻 */
.cm-frame.is-upg .guide-bar,
.cm-frame.is-upg .guide-ripple {
  display: none !important;
}
@keyframes cmFrameShake {
  0%, 100% { transform: translate(0, 0); }
  20% { transform: translate(-6px,  3px) rotate(-.2deg); }
  40% { transform: translate( 5px, -4px) rotate( .25deg); }
  60% { transform: translate(-3px,  2px) rotate(-.1deg); }
  80% { transform: translate( 2px,  1px) rotate( .05deg); }
}

/* ── 火力全开圈 (心动 ring) — 默认隐藏 + 平滑淡入 ─────── */
.cm-ring-stage {
  position: absolute; left: 50%;
  top: 66.666%; /* why: 点击圈中心对齐屏幕下 1/3 分界线, 即画面高度 2/3 处 */
  /* why(任务5): 心动圈纳入 UI editor — 位置(dx/dy)/缩放(scale)由编辑器变量驱动, 叠加在原居中 translate 上; stage 的 transform 无动画, 叠加安全 */
  transform: translate(calc(-50% + var(--ui-ring-dx, 0px)), calc(-50% + var(--ui-ring-dy, 0px))) scale(var(--ui-ring-scale, 1));
  z-index: 3;
  width: 80%; max-width: 360px;
  display: grid; place-items: center;
  pointer-events: none;
}
/* why: tier-up 弹跳时把 ring-stage 提到 fx-canvas (z:8) 上方, 倍数字盖过粒子 */
.cm-ring-stage:has(.mult-display.popping) {
  z-index: 9;
}
.cm-ring-wrap {
  position: relative;
  width: clamp(180px, 52.2%, 270px); /* why: 保持中心在下 1/3 分界线, 只把点击圈半径缩到上一版 0.9 */
  aspect-ratio: 1;
  will-change: transform, opacity;
  opacity: 0;
  transform: scale(0.72);
  transition: opacity .35s ease, transform .55s cubic-bezier(.34, 1.56, .64, 1);
}
.cm-ring-wrap.show {
  opacity: 1;
  transform: scale(1);
}
.cm-ring-wrap.bounce { animation: cmBounce 480ms cubic-bezier(.34, 1.56, .64, 1); }
@keyframes cmBounce {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.18); }
  65%  { transform: scale(0.94); }
  100% { transform: scale(1); }
}
.cm-ring-pulse-overlay {
  position: absolute;
  /* why: 对齐点击圈外沿；跟 .cm-rim 同用 4%, 让慢扩散圈从粉色描边外圈开始扩散 */
  inset: 4%;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  /* why: 900ms ease-out 让"缓缓向外延伸"; scale 从 1 (= ring 自身) → 1.5 向外膨胀 */
  animation: cmRingPulseKick 900ms cubic-bezier(.16, .84, .44, 1) both;
}
@keyframes cmRingPulseKick {
  0% {
    opacity: 0;
    /* why: 用户要"涟漪开始跟点击圈一样大" — 起点 scale 1 = ring 自身大小, 向外扩到 1.25 形成涟漪渐扩感 */
    transform: scale(1);
    box-shadow:
      0 0 0 2px var(--ring-color, #ff7aa9),
      0 0 14px 2px var(--ring-color, #ff7aa9);
  }
  10% {
    opacity: 0.76; /* why: 用户要外扩圈透明度改为现在的 80%, 原峰值 0.95 * 0.8 = 0.76 */
    transform: scale(1);
    box-shadow:
      0 0 0 2px var(--ring-color, #ff7aa9),
      0 0 18px 3px var(--ring-color, #ff7aa9);
  }
  100% {
    opacity: 0;
    transform: scale(1.5); /* why: 用户要外扩范围翻倍, 原来 1→1.25 的 +0.25 改为 1→1.5 的 +0.5 */
    box-shadow:
      0 0 0 0 transparent,
      0 0 30px 0 transparent;
  }
}
.cm-rim {
  position: absolute;
  inset: 4%; /* why: 对齐点击圈外沿；RING_R=85 加 14px 描边半径的一半=92, (100-92)/200=4% */
  border-radius: 50%;
  pointer-events: none;
  transition: opacity .4s, box-shadow .4s, filter .4s; /* why: filter 过渡让"体力耗尽变灰/回粉"平滑 (见 .cm-ring-wrap.is-depleted) */
}
/* why(用户需求2c "体力耗尽→圆框变灰, 中间显示体力耗尽, 持续点击才变回粉色"): depleted 由 App staminaDepleted 经 HeartRing 加 is-depleted class;
   rim 光晕/进度环/轨道统一去色转灰, 标题文案/配色由 HeartRing inline 切"体力耗尽"灰字; 解除(下一次成功点击)后靠上面几条 transition 平滑回粉 */
/* why(用户需求2 改稿): 体力耗尽→回粉改为【按灰度 depleted(0~1) 渐进】, 颜色插值改由 HeartRing inline 承担(见 mixHex);
   这里【不能】再用 !important 写死灰色, 否则会盖过 inline 渐变色 → 一直全灰回不了粉. 仅留轨道淡化(无 inline 冲突).
   rim/bar/--ring-color 的 灰↔粉 平滑过渡靠它们各自已有的 CSS transition(box-shadow/stroke/color). */
.cm-ring-wrap.is-depleted .cm-ring-track { stroke: rgba(255, 255, 255, .12); }
.cm-ring-svg { width: 100%; height: 100%; display: block; overflow: visible; }
.cm-ring-track { fill: none; stroke: rgba(255, 255, 255, .18); stroke-width: 14; }
.cm-ring-bar {
  fill: none; stroke-width: 14; stroke-linecap: round;
  transform: rotate(-90deg); transform-origin: 50% 50%;
  transition: stroke 350ms ease, filter .3s;
}
.cm-ring-center {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 8px; text-align: center; pointer-events: none;
}
.cm-ring-center .title {
  font-size: var(--ui-ring-title-font); /* why(任务5): 编辑器基准字号; 实际由 HeartRing fit 逻辑按容器宽在此基准上再缩(见 app.jsx) */
  transform: translate(var(--ui-ring-title-dx), var(--ui-ring-title-dy)); /* why(任务5): 编辑器位置微调 */
  font-weight: 900; letter-spacing: .04em; line-height: 1.1;
  /* why(用户需求2a "不要换行挤着"): 强制单行, 过长交给 HeartRing useLayoutEffect 测容器宽后缩字号自适应 */
  white-space: nowrap;
  /* why: text-shadow 交给 HeartRing inline 全权控制(常态粉辉光/tierN 主题辉光/体力耗尽灰光 三态切换, 见需求2b/2c), 此处不再写 */
  transition: color .35s, text-shadow .35s, font-size .2s;
}
/* why: 倍数行 — 弃用 -webkit-text-stroke (它沿字边居中画, 一半向内吃白字, 用户看着粉色"卡"在字里)
   全改 text-shadow 模拟描边: text-shadow 渲染在 fill 下面, 字内部被白色 fill 盖住看不见
   → 粉色只出现在字外侧. 同时 8 方向 1px 白 (字体视觉加粗) + 8 方向 2px 粉 (描边在白外 1px 处, 视觉 1px 细) */
.cm-ring-center .mult-display {
  font-size: var(--ui-ring-mult-font); /* why(任务5): 心动圈倍数字号纳入编辑器 */
  transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy)); /* why(任务5): 编辑器位置微调; tier-up popping 动画会临时覆盖 transform */
  font-weight: 900;
  letter-spacing: -0.02em; /* why(用户"圆环中心倍率字间距近一点"): 0.04em→-0.02em, ×N.NN 各字符收紧, 不再松散 */
  line-height: 1;
  color: #fff;
  text-shadow:
    /* 4 cardinal 1px 白色 = "字体加粗" (轻微补刀, 上一版 8 方向太粗了, 减半成 4 方向) */
    1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff,
    /* 8 方向 2px 柔粉 = "描边" (pink ring 在外 1-2px 处) */
    2px 0 0 #ff8fb6, -2px 0 0 #ff8fb6, 0 2px 0 #ff8fb6, 0 -2px 0 #ff8fb6,
    2px 2px 0 #ff8fb6, -2px 2px 0 #ff8fb6, 2px -2px 0 #ff8fb6, -2px -2px 0 #ff8fb6,
    /* 原有发光 halo */
    0 0 10px rgba(255, 255, 255, 0.95),
    0 0 20px rgba(255, 220, 240, 0.75),
    0 0 32px rgba(255, 200, 230, 0.55);
  transform-origin: 50% 50%;
}
.cm-ring-center .mult-display.popping {
  animation: cmTitlePop .75s cubic-bezier(.34, 1.6, .55, 1), cmTitleFlash .75s ease-out;
}

/* why: tier-up 期间 5 颗小爱心从倍率中心飘出, z 在倍率上方 */
.cm-mult-hearts {
  position: absolute; inset: 0;
  pointer-events: none;
  z-index: 5;
}
.cm-mult-hearts .heart {
  position: absolute;
  /* why: 5 颗心起始 x/y 都散布 (零星), 飘出方向上偏 + 微随机旋转 + 错相位 */
  left: var(--start-x);
  top: var(--start-y);
  width: 22px; height: 22px;
  animation: cmMultHeartFly .85s ease-out forwards;
}
.cm-mult-hearts .heart svg {
  width: 100%; height: 100%; display: block;
  filter: drop-shadow(0 0 4px rgba(255, 255, 255, 0.85));
}
.cm-mult-hearts .heart-0 { --start-x: 12%; --start-y: 32%; --tx: -8px; --ty: -55px; --rot: -10deg; }
.cm-mult-hearts .heart-1 { --start-x: 32%; --start-y: 68%; --tx:  6px; --ty: -82px; --rot:   8deg; animation-delay: 0.05s; }
.cm-mult-hearts .heart-2 { --start-x: 50%; --start-y: 20%; --tx: -4px; --ty: -45px; --rot:   0deg; animation-delay: 0.10s; }
.cm-mult-hearts .heart-3 { --start-x: 70%; --start-y: 72%; --tx: 10px; --ty: -88px; --rot:  12deg; animation-delay: 0.06s; }
.cm-mult-hearts .heart-4 { --start-x: 88%; --start-y: 40%; --tx: -6px; --ty: -58px; --rot:  -8deg; animation-delay: 0.13s; }
@keyframes cmMultHeartFly {
  0%   { transform: translate(-50%, -50%) scale(0)   rotate(0deg); opacity: 0; }
  25%  { transform: translate(-50%, -50%) scale(1.15) rotate(0deg); opacity: 1; }
  100% { transform: translate(calc(-50% + var(--tx)), calc(-50% + var(--ty))) scale(0.55) rotate(var(--rot)); opacity: 0; }
}
@keyframes cmTitlePop {
  0%   { transform: scale(1); }
  40%  { transform: scale(9); }
  70%  { transform: scale(0.9); }
  100% { transform: scale(1); }
}
@keyframes cmTitleFlash {
  0%   { color: inherit; }
  40%  { color: #fff5fa; filter: drop-shadow(0 0 16px #ff3dd1) drop-shadow(0 0 8px #ffe89a); }
  100% { color: inherit; filter: none; }
}
.cm-ring-center .sub {
  font-size: 10px; color: rgba(255, 255, 255, .7);
  letter-spacing: .18em; text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
}

/* ── +N 浮字 ──────────────────────────────────────────────── */
.cm-gain-fly {
  position: absolute; z-index: 7; pointer-events: none;
  display: flex; align-items: center; gap: 5px;
  transform: translate(-50%, 0);
  animation: cmGainFly 800ms ease-out forwards;
}
.cm-gain-fly .gc {
  /* why: 浮字金币改用 AI 位图; 20px, contain 居中, drop-shadow 给金光晕 */
  position: relative;
  width: 20px; height: 20px;
  background: url("assets/icon/coin.webp") center/contain no-repeat;
  filter: drop-shadow(0 0 8px rgba(255, 200, 80, .8));
}
.cm-gain-fly .gv {
  font-weight: 900; font-size: 16px;
  color: #ffe9c2;
  text-shadow: 0 2px 8px rgba(255, 180, 60, .85), 0 0 4px rgba(0, 0, 0, .6);
  font-variant-numeric: tabular-nums;
}
@keyframes cmGainFly {
  0%   { transform: translate(-50%, 0) scale(.6); opacity: 0; }
  20%  { transform: translate(-50%, -10px) scale(1.1); opacity: 1; }
  100% { transform: translate(-50%, -60px) scale(.9); opacity: 0; }
}

/* ── 气泡台词 ────────────────────────────────────────────── */
/* ── 心动消退 fail-flash + toast ──────────────────────── */
.cm-fail-flash {
  position: absolute; inset: 0;
  z-index: 9; pointer-events: none;
  background: radial-gradient(circle at center, rgba(255, 40, 80, .42), transparent 60%);
  animation: cmFailFlash .8s ease-out forwards;
}
@keyframes cmFailFlash {
  0%   { opacity: 0; }
  20%  { opacity: 1; }
  100% { opacity: 0; }
}
.cm-fail-toast-ring {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  z-index: 11; pointer-events: none;
  padding: 12px 22px; border-radius: 14px;
  background: rgba(80, 10, 30, .85);
  border: 1px solid rgba(255, 120, 160, .6);
  color: #ffd6e0;
  font-weight: 900; font-size: 14px; letter-spacing: .1em;
  box-shadow: 0 0 40px rgba(255, 80, 140, .5);
  white-space: nowrap;
  animation: cmFailToast 1.4s ease-out forwards;
}
@keyframes cmFailToast {
  0%   { opacity: 0; transform: translate(-50%, -40%) scale(.8); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  75%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -60%) scale(.95); }
}


/* ── 升级提示弹窗 ────────────────────────────────────────── */
.cm-upg-popup {
  position: absolute;
  left: 50%; top: 38%;
  /* why(需求-修): 去掉缩放"弹出/收回"观感 — 只用 opacity 平淡淡入淡出, 不再 scale/位移弹动.
     常驻可见态 opacity1; 入场快速淡入(动画), 退场切 .is-out 走 transition 淡出; 连点复用同一节点不重挂 */
  transform: translate(-50%, -50%);
  opacity: 1;
  pointer-events: none;
  z-index: 75;
  padding: 14px 22px;
  border-radius: 22px;
  background: rgba(20, 22, 30, .72);
  border: 1px solid rgba(255, 255, 255, .18);
  /* why(用户改稿"所有弹窗包括升级"): 磨砂统一走 --ui-holo-* (编辑器「弹窗玻璃」一处调全部), 原 30px/180% 独立值弃用 */
  backdrop-filter: blur(var(--ui-holo-blur, 2px)) saturate(var(--ui-holo-sat, 0.92));
  -webkit-backdrop-filter: blur(var(--ui-holo-blur, 2px)) saturate(var(--ui-holo-sat, 0.92));
  color: #fff;
  font-weight: 700;
  letter-spacing: .4px;
  text-align: center;
  max-width: 80%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .04) inset;
  overflow: hidden; /* why(用户改稿): 裁掉描边环 blur 溢出弹窗外的那半, 外侧成清晰边 */
  /* 只淡入(opacity), backwards 起手停 0 不闪; 无 forwards → 播完回常驻 opacity1, 让退场 transition 生效 */
  animation: cmUpgPopIn .18s ease backwards;
  transition: opacity .24s ease;
  will-change: opacity;
}
/* 退场: 切 .is-out 走 transition 纯淡出 (无缩放/位移), 淡完(onTransitionEnd)再卸载 */
.cm-upg-popup.is-out {
  opacity: 0;
}
.cm-upg-popup .main {
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px; /* why: 彩色图标与白字拆开后保留原弹窗紧凑节奏，7px 不会在窄屏形成断裂。 */
  color: #fff;
  -webkit-text-fill-color: #fff;
  filter: drop-shadow(0 0 14px rgba(255, 255, 255, .15));
}
.cm-upg-popup .main .icon {
  color: initial;
  -webkit-text-fill-color: initial;
  filter: none; /* why: 图标必须保留 emoji 原生彩色，不继承文字渐变裁切或玻璃弹窗的染色。 */
}
.cm-upg-popup .main .text {
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .78), 0 0 9px rgba(255, 255, 255, .42); /* why: 恢复升级提示原来的白字，并在明亮视频上维持可读性。 */
}
.cm-upg-popup .sub {
  margin-top: 4px;
  font-size: 12.5px;
  font-weight: 500;
  color: rgba(255, 255, 255, .86); /* why: 升级弹窗的说明同样恢复白字，仅用透明度与主标题区分层级，不能再呈黑灰。 */
}
@keyframes cmUpgPopIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── 升级 dock (复刻 升级.html 玻璃风) ──────────────────── */
.cm-dock {
  position: absolute; left: calc(14px * var(--ui-top-control-scale)); right: calc(14px * var(--ui-top-control-scale));
  --cm-dock-nav-gap: max(calc(12px * var(--ui-top-control-scale)), env(safe-area-inset-bottom, 0px) + calc(8px * var(--ui-top-control-scale))); /* why: 1920×1080 基准留 12px，再随画框缩放；扣除导航发光外框误差后仍保留可见间距。 */
  /* why: 新导航用 --ui-nav-y 按画面比例定位，不再假定旧版 42px 高度；从导航顶部反推 dock 底边，避免动作按钮被导航盖住。 */
  bottom: calc((100% - var(--ui-nav-y)) + var(--cm-dock-nav-gap));
  z-index: 10;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(10px * var(--ui-top-control-scale));
}

/* why(改版): 升级卡专属投射式入场 — 保留旧版两段式故障表现，不再与已改为平滑运动的爆率弹窗绑定:
   ① 0→36% 飞入段(平滑 cubic): 从"升级 tab"位置(--fly-dx/--fly-dy, 由 app.jsx 实测每个钮各自的位移)缩着飞向落点;
   ② 36→100% 乱码浮现段(steps 硬跳): 到位后原地 clip-path 切片 + 水平抖动 + 亮度跳帧, 稳定成完整全息板.
   终态 clip-path: inset(-40px) 反向扩, 不裁掉外发光 box-shadow. */
/* why: 全程只动 translate/scale/clip-path/filter 独立属性, 不碰 transform — 保住 .cm-upg 静止态
   perspective+rotateX 内扣倾斜不被入场动画 both 填充冲掉 (跟 家园 全息按钮同款处理).
   --fly-dx/--fly-dy 兜底: 量不到 tab 时从正下方一点飞起 (0, 40px) */
@keyframes cm-upg-project-in {
  /* 飞入段 — 从升级 tab 平滑缩着飞来 */
  0%   { opacity: .12; translate: var(--fly-dx, 0px) var(--fly-dy, 40px); scale: .45; clip-path: inset(34% 18% 34% 18%); filter: brightness(1.8); animation-timing-function: cubic-bezier(.32, .82, .3, 1); }
  36%  { opacity: 1;   translate: 0 0; scale: 1; clip-path: inset(44% 0 44% 0); filter: brightness(1.6); animation-timing-function: steps(1, end); }
  /* 乱码浮现段 — 到位后原地切片硬跳 */
  46%  { opacity: 1;   translate: 6px 0;  clip-path: inset(0 0 62% 0);   filter: brightness(1.4); animation-timing-function: steps(1, end); }
  56%  { opacity: .55; translate: -5px 0; clip-path: inset(54% 0 0 0);   filter: brightness(1);   animation-timing-function: steps(1, end); }
  66%  { opacity: 1;   translate: 4px 0;  clip-path: inset(20% 0 32% 0); filter: brightness(1.2); animation-timing-function: steps(1, end); }
  76%  { opacity: .7;  translate: -2px 0; clip-path: inset(0 0 16% 0);   animation-timing-function: steps(1, end); }
  85%  { opacity: 1;   translate: 2px 0;  clip-path: inset(8% 0 5% 0);   animation-timing-function: steps(1, end); }
  93%  { opacity: .85; translate: -1px 0; clip-path: inset(0 0 3% 0);    animation-timing-function: steps(1, end); }
  100% { opacity: 1;   translate: 0 0; scale: 1; clip-path: inset(-40px); filter: brightness(1); }
}
/* why: dock 内 3 个钮 stagger 0/150/300ms 拉大错开, 让"一个一个从升级 tab 飞出来"读得清 (单钮约 560ms, 错开 150ms 仍能看出先后) */
.cm-dock > * {
  /* why: 兜底 fly 变量 — JS 写入前/量不到时从正下方一点飞起 */
  --fly-dx: 0px; --fly-dy: 40px;
  animation: cm-upg-project-in 560ms both;
}
.cm-dock > *:nth-child(1) { animation-delay: 0ms; }
.cm-dock > *:nth-child(2) { animation-delay: 150ms; }
.cm-dock > *:nth-child(3) { animation-delay: 300ms; }
/* why(用户"广告按钮放进框里、和金币升级竖排等大"): 框内底部两条等大动作按钮(金币/券升级 + 广告直升) */
.cm-upg-actions { margin-top: auto; width: 100%; display: flex; flex-direction: column; gap: calc(5px * var(--ui-top-control-scale)); }
.cm-upg-act {
  width: 100%; box-sizing: border-box;
  display: flex; align-items: center; justify-content: center; gap: calc(4px * var(--ui-top-control-scale));
  min-height: calc(30px * var(--ui-top-control-scale)); padding: calc(4px * var(--ui-top-control-scale)) calc(6px * var(--ui-top-control-scale));
  border-radius: calc(10px * var(--ui-top-control-scale)); cursor: pointer; font-weight: 800;
}
.cm-upg-act:active { transform: scale(.97); filter: brightness(.92); }
.cm-upg-buy { border: 1px solid rgba(255, 255, 255, .6); background: linear-gradient(180deg, rgba(20, 60, 88, .5), rgba(12, 40, 62, .6)); color: #ffffff; } /* 金币/券 升级钮 — 去青荧光边(140,232,255)→白+字→白; 暗玻璃底 20,60,88/12,40,62 非荧光值, 保留深底与暖橙广告钮 .cm-upg-adbuy 成深底冷暖对照 */
.cm-upg-buy.disabled { opacity: .55; }
.cm-upg-adbuy { border: 1px solid rgba(255, 199, 78, .55); background: linear-gradient(180deg, rgba(58, 40, 12, .5), rgba(38, 26, 6, .62)); color: #ffe6b0; } /* 广告直升钮 — 暖橙 */
.cm-upg-ad-ico { font-size: calc(14px * var(--ui-top-control-scale)); line-height: 1; }
.cm-upg-ad-txt { font-size: calc(11px * var(--ui-top-control-scale)); font-weight: 800; white-space: nowrap; }
.cm-upg-buy .cost { margin: 0; }
.cm-upg-buy .cost.cost-voucher { color: #ffd24d; font-weight: 900; }
.cm-upg-voucher-ico { font-size: calc(13px * var(--ui-top-control-scale)); line-height: 1; }
.cm-upg.has-voucher { border-color: rgba(255, 210, 77, .8); } /* 有券高亮金描边 */

/* why: 升级卡专属收回退场 — 乱码碎裂收拢 + 抖动淡出，clip-path 切片收拢 */
@keyframes cm-upg-project-out {
  0%   { opacity: 1;   translate: 0 0;    clip-path: inset(-40px); }
  30%  { opacity: .7;  translate: 6px 0;  clip-path: inset(0 0 45% 0); }
  60%  { opacity: .35; translate: -6px 0; clip-path: inset(40% 0 0 0); }
  100% { opacity: 0;   translate: 3px 0;  clip-path: inset(48% 0 48% 0); }
}
/* why: is-closing 选择器特异性高于 .cm-dock > *, 覆盖入场动画改播乱码碎裂回收 */
.cm-dock.is-closing > * {
  animation: cm-upg-project-out 260ms steps(1, end) both;
}
/* why: 退场 stagger 反向 — 最右 (child3) 先收, 逐个往左卷回, 跟入场的左→右逐块浮现镜像 */
.cm-dock.is-closing > *:nth-child(3) { animation-delay: 0ms; }
.cm-dock.is-closing > *:nth-child(2) { animation-delay: 40ms; }
.cm-dock.is-closing > *:nth-child(1) { animation-delay: 80ms; }


/* why: tap-catch — iframe 内点击无法穿透到主 app, 罩一层透明 div 收点击让升级抽屉自动收回 */
.cm-monitor-tap-catch {
  position: absolute;
  inset: 0 0 38px 0; /* 覆盖整个 iframe 区域 (上边到顶, 下留 38px 给 tab 栏) */
  z-index: 10; /* 高于 cm-overview-iframe (z:9), 低于 cm-monitor-upgrade (z:11) */
  background: transparent;
  cursor: pointer;
}

/* why: 装修监控室面板 - 总览 tab 下点升级时显示, 单按钮居中, 透明背景让总览 iframe 透出来 */
.cm-monitor-upgrade {
  position: absolute; left: calc(14px * var(--ui-top-control-scale)); right: calc(14px * var(--ui-top-control-scale));
  --cm-monitor-nav-visual-gap: max(calc(40px * var(--ui-top-control-scale)), env(safe-area-inset-bottom, 0px) + calc(20px * var(--ui-top-control-scale))); /* why: 40px 同时容纳按钮 22% 外扩和 16px 模糊辉光；同比缩放后，最小页面的完整光晕仍不会压住底部工具栏。 */
  bottom: calc((100% - var(--ui-nav-y)) + var(--cm-monitor-nav-visual-gap));
  z-index: 11; /* why: 高于 cm-overview-iframe (z:9), 浮在它上面 */
  display: flex; justify-content: center;
}
/* why: 总览升级按钮统一成娃娃机 .cm-upg 同款无色全息板 — 透明蓝白 + 4px 扫描线 + 蓝光描边 + 内扣倾斜 */
/* ── 旋转彩虹镭射晕染 (炫彩系列可复用): conic 六色环 + 从内向外 radial 淡出 + blur 晕染 + @property 角度补间旋转 ── */
@property --cm-laser-a { syntax: "<angle>"; initial-value: 0deg; inherits: false; } /* why: 只有注册过的自定义属性才能对 conic 的 from 角度做补间, 否则动画会跳变不流动 */
@keyframes cmLaserSpin { to { --cm-laser-a: 360deg; } }
.cm-monitor-btn {
  position: relative;
  padding: calc(14px * var(--ui-top-control-scale)) calc(28px * var(--ui-top-control-scale)) calc(12px * var(--ui-top-control-scale));
  border-radius: calc(var(--cm-glass-r-btn) * var(--ui-top-control-scale));
  border: 1px solid rgba(255, 255, 255, .22);
  font-family: inherit;
  cursor: pointer;
  color: #fff;
  text-shadow: var(--cm-glass-text-outline);
  /* iOS玻璃: 去青全息改中性玻璃 */
  background: var(--cm-glass-specular), rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: var(--cm-glass-backdrop-fb);
  backdrop-filter: var(--cm-glass-backdrop);
  box-shadow: var(--cm-glass-shadow);
  overflow: visible; /* why(炫彩): 旋转彩虹晕染要柔和溢出按钮边缘, 不能裁 */
  isolation: isolate;
  /* why(改版): 去掉 perspective+rotateX 内扣倾斜, 按钮摆平 (跟 .cm-upg 一致); hover/active 走 translate/scale 独立属性 */
  transition:
    translate .18s cubic-bezier(.34, 1.56, .64, 1),
    scale .18s cubic-bezier(.34, 1.56, .64, 1),
    filter .2s ease;
  display: flex; flex-direction: column; align-items: center; gap: calc(4px * var(--ui-top-control-scale));
  min-width: calc(180px * var(--ui-top-control-scale)); /* why: 恢复 1920×1080 设计稿的 180px 正常尺寸，并与页面同比缩放，不再把按钮本身永久缩成小胶囊。 */
  max-width: calc(100% - 28px * var(--ui-top-control-scale)); /* why: 极窄屏仍限制在画框内，不因长副标题越界。 */
  /* why: 360ms 无延迟让按钮立即、果断地弹出；1.06 峰值保留可读弹性，又进一步收敛彩色辉光膨胀 */
  --fly-dx: 0px; --fly-dy: 40px;
  /* why: 360ms no-delay entry feels decisive; 1.06 keeps the elastic cue while further containing glow expansion. */
  animation: cm-monitor-upgrade-in 360ms cubic-bezier(.22, .85, .25, 1) both;
}
/* why: 起点沿用原总览按钮从下方 40px、.55 倍出现的空间关系；移除 clip-path/filter 后全程保持连续画面 */
@keyframes cm-monitor-upgrade-in {
  /* why: .55 maintains the bottom-entry spatial link; 65% reaches the restrained 1.06 overshoot, leaving 35% for a softer return. */
  0%   { opacity: .12; translate: var(--fly-dx, 0px) var(--fly-dy, 40px); scale: .55; }
  /* why: .22/.62 starts the 1.06 return more gently; final y=1 brings the scale velocity to zero at rest. */
  65%  { opacity: 1;   translate: 0 0; scale: 1.06; animation-timing-function: cubic-bezier(.22, .62, .32, 1); }
  100% { opacity: 1;   translate: 0 0; scale: 1; }
}
/* why: 顶部全息高光描边, 跟 .cm-upg::before 同款冷白蓝 */
.cm-monitor-btn::before {
  content: ''; position: absolute;
  inset: calc(1px * var(--ui-top-control-scale)) calc(1px * var(--ui-top-control-scale)) auto calc(1px * var(--ui-top-control-scale));
  height: 42%;
  border-radius: calc(13px * var(--ui-top-control-scale)) calc(13px * var(--ui-top-control-scale)) 40% 40% / calc(13px * var(--ui-top-control-scale)) calc(13px * var(--ui-top-control-scale)) 60% 60%;
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0)); /* why(iOS玻璃): 顶部蓝青高光→中性白, 留 .12 alpha */
  z-index: -1;
  pointer-events: none;
}
/* 炫彩镭射晕染层 — 从按钮中心向外旋转的模糊彩虹光晕, screen 叠在玻璃上提亮保质感 */
.cm-monitor-btn::after {
  content: ''; position: absolute; inset: -22%;
  z-index: 0; border-radius: 50%;
  background: conic-gradient(from var(--cm-laser-a),
    #ff3d8b, #ff9a3d, #ffe23d, #6fff9e, #4ac8ff, #b46cff, #ff3d8b); /* why: 六色镭射彩虹, 首尾同色接环无缝 */
  -webkit-mask: radial-gradient(closest-side, #000 22%, rgba(0,0,0,.4) 52%, transparent 78%);
          mask: radial-gradient(closest-side, #000 22%, rgba(0,0,0,.4) 52%, transparent 78%); /* why: 从内(实)向外(透)慢慢晕染 */
  filter: blur(calc(16px * var(--ui-top-control-scale))); /* why: 恢复设计稿 16px 柔光，同时让模糊半径随页面缩放，最小视口不会反向膨胀。 */
  opacity: .72;
  mix-blend-mode: screen; /* why: 只提亮不压暗, 玻璃质感透出来 + 彩虹发光 */
  animation: cmLaserSpin 8s linear infinite;
  pointer-events: none;
}
/* why: 260ms 延续原收回速度，并反向回到同一几何起点；连续缓动取代 steps 碎裂硬跳 */
.cm-monitor-upgrade.is-closing .cm-monitor-btn {
  animation: cm-monitor-upgrade-out 260ms cubic-bezier(.55, .06, .68, .19) both;
}
@keyframes cm-monitor-upgrade-out {
  0%   { opacity: 1; translate: 0 0; scale: 1; }
  100% { opacity: 0; translate: var(--fly-dx, 0px) var(--fly-dy, 40px); scale: .45; }
}
.cm-monitor-btn-label {
  position: relative; z-index: 1;
  font-size: calc(16px * var(--ui-top-control-scale));
  font-weight: 700;
  letter-spacing: 0.06em;
  /* 用户: 字本身白色, 周围彩虹炫光靠按钮::after的旋转晕染托在字周围 */
  color: #fff;
  text-shadow: var(--cm-glass-text-outline);
  filter: drop-shadow(0 1px 1px rgba(0,0,0,.55)); /* why: 彩虹字在亮玻璃上加黑投影托底保证可读 */
}
.cm-monitor-btn-sub {
  font-size: calc(11px * var(--ui-top-control-scale));
  font-weight: 500;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, .85); /* why(iOS玻璃): 蓝青副标→白, 留 .85 弱化 */
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 深蓝描影→黑描边 token */
}
/* why: hover/active 走 translate/scale 独立属性 (跟 .cm-upg 一致) */
.cm-monitor-btn.is-available:hover {
  translate: 0 -2px;
  filter: brightness(1.10);
  border-color: rgba(255, 255, 255, .85); /* why(iOS玻璃): hover 描边去蓝青→白 */
}
.cm-monitor-btn.is-available:active {
  scale: .96;
  filter: brightness(.93);
}
.cm-monitor-btn.is-locked {
  cursor: default;
  opacity: 0.55;
  filter: grayscale(0.4);
}

/* why: 220ms 让点击反馈比抽屉关闭更果断；中心缩至 .08 后完全隐去，不再向下飞走。 */
.cm-monitor-btn.is-upgrading {
  pointer-events: none;
  animation: cm-monitor-upgrade-commit 220ms cubic-bezier(.55, .06, .68, .19) both;
}
@keyframes cm-monitor-upgrade-commit {
  0% { opacity: 1; translate: 0 0; scale: 1; }
  55% { opacity: .75; translate: 0 0; scale: .48; }
  100% { opacity: 0; translate: 0 0; scale: .08; }
}

/* why: 与原按钮占用同一底部锚点；84px 高度容纳上跳文字与完成粒子，不覆盖 42px 页签。 */
.cm-monitor-working {
  position: relative;
  width: min(320px, 88vw);
  height: 84px;
  display: grid;
  place-items: center;
  color: #fff;
}
.cm-monitor-working-text {
  display: flex;
  justify-content: center;
  white-space: nowrap;
}
/* why: 1.5s、130ms 错峰与“抓取奖品中”完全一致，17px 字号在底栏上方保持清晰但不抢画面。 */
.cm-monitor-working-char {
  display: inline-block;
  font-size: 17px;
  font-weight: 700;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .8), 0 0 8px rgba(255, 255, 255, .55);
  animation: cm-monitor-working-char 1.5s ease-in-out infinite;
  animation-delay: calc(var(--char-index) * 130ms);
}
@keyframes cm-monitor-working-char {
  0% { transform: translateY(0) scale(1); color: #fff; }
  10% { transform: translateY(-8px) scale(1.22); color: #ffd54a; }
  20% { transform: translateY(0) scale(1); }
  35% { color: #ff5fa8; }
  55% { color: #5fd9ff; }
  75% { color: #b6ff5a; }
  100% { transform: translateY(0) scale(1); color: #fff; }
}

/* why: 430ms 足够读出“炸开”方向又不会拖慢成功弹窗；十二颗星每 30deg 均匀覆盖一圈。 */
.cm-monitor-working.is-bursting {
  animation: cm-monitor-working-burst 430ms ease-out both;
}
.cm-monitor-working.is-bursting .cm-monitor-working-char {
  animation: cm-monitor-working-text-away 220ms ease-out both;
}
.cm-monitor-star-burst {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
/* why: 7px 星体与 72px 放射半径在手机监控室画面上可辨认，同时不覆盖中央主要内容。 */
.cm-monitor-burst-star {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  background: #fff;
  clip-path: polygon(50% 0, 62% 38%, 100% 50%, 62% 62%, 50% 100%, 38% 62%, 0 50%, 38% 38%);
  filter: drop-shadow(0 0 5px #fff);
  animation: cm-monitor-star-out 430ms ease-out both;
  animation-delay: calc(var(--star-index) * 12ms);
}
@keyframes cm-monitor-working-burst {
  /* why: 容器只承担 430ms 阶段时钟，不能淡出，否则它会把内部白色星星的亮度一起乘没。 */
  0%, 100% { opacity: 1; }
}
@keyframes cm-monitor-working-text-away {
  to { opacity: 0; transform: scale(.72); }
}
@keyframes cm-monitor-star-out {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(calc(var(--star-index) * 30deg)) translateY(0) scale(.2); }
  28% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(calc(var(--star-index) * 30deg)) translateY(-72px) scale(1.15); }
}

/* why: 升级完成反馈必须覆盖监控画面中央，而不是继续困在底部装修按钮的 84px 区域。 */
.cm-monitor-celebration {
  position: fixed;
  inset: 0 0 42px; /* why: 全屏覆盖但保留底部页签，让爆发明确属于当前升级页面。 */
  z-index: 15; /* why: 高于监控 iframe、装修面板和后续成功卡片的常规层级，确保爆发不被遮挡。 */
  display: grid;
  place-items: center;
  overflow: hidden;
  pointer-events: none;
  animation: cm-monitor-celebration-clock 1350ms linear both; /* why: 1.35 秒给四字爆开、粒子扩散和短暂停留留足时间，用户不会一眨眼错过。 */
}
.cm-monitor-burst-flash {
  position: absolute;
  width: 260px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.92) 0%, rgba(255,220,116,.34) 30%, rgba(116,202,255,.12) 55%, transparent 72%);
  mix-blend-mode: screen;
  animation: cm-monitor-burst-flash 760ms ease-out both; /* why: 260px 闪光以 760ms 衰减，先托亮成功大字再退出，不长时间洗白画面。 */
}
.cm-monitor-burst-ring {
  position: absolute;
  width: 96px;
  aspect-ratio: 1;
  border: 3px solid rgba(255, 239, 168, .9);
  border-radius: 50%;
  box-shadow: 0 0 18px #fff, inset 0 0 18px rgba(103, 216, 255, .8);
  animation: cm-monitor-burst-ring 980ms cubic-bezier(.12, .7, .2, 1) both; /* why: 光环以近一秒扩至大范围，强化“成功能量爆开”的中心感。 */
}
.cm-monitor-burst-title {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  font-size: clamp(38px, 10vw, 58px); /* why: 38–58px 让“升级成功”在窄屏和桌面模拟框中都成为绝对视觉主体。 */
  font-weight: 900;
  letter-spacing: .08em;
  color: #fff;
  text-shadow: 0 3px 5px rgba(0,0,0,.85), 0 0 10px #fff, 0 0 24px #ffd45e, 0 0 42px #67d8ff;
}
.cm-monitor-burst-title span {
  display: inline-block;
  animation: cm-monitor-burst-char 1120ms cubic-bezier(.18, .8, .2, 1) both; /* why: 四字至少保持约半秒清晰可读，随后炸散，阶段时钟再留余量衔接卡片。 */
  animation-delay: calc(var(--burst-char-index) * 38ms); /* why: 38ms 逐字错峰保留整体词组可读性，同时避免四字机械同步。 */
}
.cm-monitor-celebration-particles {
  position: absolute;
  inset: 0;
}
.cm-monitor-celebration-particle {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: hsl(var(--particle-angle) 100% 72%);
  box-shadow: 0 0 8px currentColor, 0 0 16px rgba(255,255,255,.85);
  animation: cm-monitor-celebration-particle 1050ms cubic-bezier(.12, .68, .22, 1) both; /* why: 10px 粒子以 1.05 秒放射，在手机视口中足够清楚且先于总阶段收尾。 */
  animation-delay: 0ms;
}
.cm-monitor-celebration-particle:nth-child(3n + 2) { animation-delay: 26ms; }
.cm-monitor-celebration-particle:nth-child(3n) { animation-delay: 52ms; } /* why: 三组按 0/26/52ms 错峰形成两层爆发深度，不拖长总阶段。 */
.cm-monitor-celebration-particle:nth-child(3n) {
  width: 6px;
  height: 18px;
  border-radius: 3px; /* why: 每三颗加入 6×18px 光屑，打破全圆点的烟花规则感。 */
}
@keyframes cm-monitor-celebration-clock {
  from, to { opacity: 1; } /* why: 容器动画只提供可靠的 1.35 秒阶段结束事件，不削弱内部亮度。 */
}
@keyframes cm-monitor-burst-flash {
  0% { opacity: 0; transform: scale(.18); }
  18% { opacity: 1; transform: scale(.75); }
  100% { opacity: 0; transform: scale(1.8); } /* why: 闪光快速出现再扩散消失，避免遮住后半段文字。 */
}
@keyframes cm-monitor-burst-ring {
  0% { opacity: 0; transform: scale(.2); }
  24% { opacity: 1; }
  100% { opacity: 0; transform: scale(4.2); } /* why: 4.2 倍扩散能越过标题边界，形成清楚的冲击波。 */
}
@keyframes cm-monitor-burst-char {
  0% { opacity: 0; transform: translate(0, 18px) scale(.2) rotate(-8deg); }
  18% { opacity: 1; transform: translate(0, 0) scale(1.38) rotate(3deg); }
  66% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
  100% { opacity: 0; transform: translate(var(--burst-char-x), -22px) scale(1.12) rotate(var(--burst-char-rotate)); } /* why: 末段四字向外散开并上冲，明确表达“字体爆炸”。 */
}
@keyframes cm-monitor-celebration-particle {
  0% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--particle-angle)) translateY(-20px) scale(.25); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) rotate(var(--particle-angle)) translateY(-190px) scale(1.15); } /* why: 24 方向各 15deg 均分整圆，190px 半径在窄屏内形成大范围爆发。 */
}

/* why: 覆盖升级页内容但止于底部 42px 页签；z-index 14 高于装修按钮 11，低于既有全局奖励弹窗层。 */
.cm-monitor-success-layer {
  position: fixed;
  inset: 0 0 42px;
  z-index: 14;
  display: grid;
  place-items: center;
  pointer-events: none;
  animation: cm-monitor-success-layer-in 380ms ease-out both;
}
/* why: 310px/82vw 兼顾桌面模拟框与窄屏；1.07 峰值只给轻弹性，不让彩虹辉光膨胀过量。 */
.cm-monitor-success-card {
  position: relative;
  min-width: min(310px, 82vw);
  padding: 22px 24px 20px;
  border: 2px solid transparent;
  border-radius: 22px;
  background:
    linear-gradient(rgba(20, 24, 38, .78), rgba(32, 22, 48, .72)) padding-box,
    linear-gradient(110deg, #ff5ca8, #ffd65c, #70ffad, #67d8ff, #bd7cff, #ff5ca8) border-box;
  box-shadow:
    inset 0 0 18px rgba(255, 255, 255, .24),
    0 0 18px rgba(255, 255, 255, .6),
    0 0 38px rgba(169, 104, 255, .45);
  color: #fff;
  text-align: center;
  animation: cm-monitor-success-card-in 420ms cubic-bezier(.22, .85, .25, 1) both;
}
.cm-monitor-success-copy {
  margin-top: 0;
  font-size: 15px;
  font-weight: 600;
  text-shadow: 0 2px 4px rgba(0, 0, 0, .82), 0 0 7px rgba(255, 255, 255, .7);
}
.cm-monitor-success-copy span { padding: 0 7px; }
.cm-monitor-success-copy b { font-size: 19px; }
.cm-monitor-success-layer.is-leaving {
  animation: cm-monitor-success-layer-out 280ms ease-in both;
}
@keyframes cm-monitor-success-layer-in {
  from { opacity: 0; }
  to { opacity: 1; }
}
@keyframes cm-monitor-success-card-in {
  0% { opacity: 0; transform: scale(.56); }
  68% { opacity: 1; transform: scale(1.07); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes cm-monitor-success-layer-out {
  to { opacity: 0; transform: scale(.9); }
}

/* why: 底部 tab 栏 - 黑底白字 */
.cm-tabbar {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 38px;
  z-index: 12;
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: #0a0a12;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 -3px 12px rgba(0, 0, 0, 0.4);
}
.cm-tab {
  position: relative;
  border: 0;
  background: transparent;
  color: rgba(255, 255, 255, 0.78);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  cursor: pointer;
  padding: 0;
  transition: font-weight 0.15s ease, color 0.15s ease;
}
.cm-tab.active {
  font-weight: 800;
  color: #ffffff;
  text-shadow: 0 0 8px rgba(255, 150, 195, 0.55);
}
/* why: 选中态加底部小指示条 */
.cm-tab.active::after {
  content: '';
  position: absolute;
  left: 50%; bottom: 4px;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: #ffffff;
  box-shadow: 0 0 6px rgba(255, 255, 255, 0.7);
}
.cm-tab:active { opacity: 0.7; }

/* why: 总览 iframe - 盖住游戏画面, 留底部 tab 栏 (38px) 可见
   inset 0 0 38px 0 = 上/左/右贴边, 底留 38px 给 tab 栏 */
.cm-overview-iframe {
  position: absolute;
  /* why: 撑满整个 9:16 viewport (含 tab bar 后面), tab bar 浮在视频上, 视频不再为底栏让位 */
  inset: 0;
  z-index: 9;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000; /* why: 跟 overview.html 的 .ov-body 黑底一致, 防 letterbox 露白 */
}
.cm-upg {
  position: relative;
  /* why: 用户要求降低高度, padding 上下从 14/12 缩到 10/8 (-8px) */
  padding: calc(10px * var(--ui-top-control-scale)) calc(10px * var(--ui-top-control-scale)) calc(8px * var(--ui-top-control-scale));
  border-radius: calc(14px * var(--ui-top-control-scale));
  /* why: 投影描边 — 青蓝细光, 不要厚玻璃 (跟爆率/倍率全息弹窗 .cm-rate-popup 同款) */
  border: 1px solid rgba(255, 255, 255, .5); /* why(iOS玻璃): 去青荧光边(140,232,255)→白 */
  background-color: transparent;
  /* why(改版): 大幅降底色透明度 + 去掉 backdrop 磨砂 — 几乎只透出场景, 像投在空气里的全息光,
     不再是实体磨砂卡片 (用户钦定"提高透明/去磨砂", 数值对齐 .cm-rate-popup) */
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, .08), rgba(255, 255, 255, .03)); /* why(iOS玻璃): 蓝青全息底(扫描线+渐变)→中性白, 留各层 alpha */
  color: #fff;
  cursor: pointer;
  overflow: hidden;
  isolation: isolate;
  font-family: inherit;
  /* why(用户"广告按钮放进框里、和金币升级竖排等大"): 卡片改 flex 竖排 — 信息在上, 底部两条等大动作按钮(cm-upg-actions)贴底; 三卡同结构故等高 */
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: calc(3px * var(--ui-top-control-scale));
  min-height: calc(150px * var(--ui-top-control-scale)); /* why: 1920×1080 基准为 150px，框体和内部按钮随游戏画框同比缩放。 */
  box-sizing: border-box;
  /* why(改版): 去掉 perspective+rotateX 内扣倾斜 — 用户钦定按钮摆平, 不要透视立板.
     hover/active 仍走 translate/scale 独立属性 (入场动画也只动 translate/scale/clip-path, 不占 transform) */
  transition:
    translate .18s cubic-bezier(.34, 1.56, .64, 1),
    scale .18s cubic-bezier(.34, 1.56, .64, 1),
    filter .2s ease,
    box-shadow .25s cubic-bezier(.32, .72, 0, 1),
    background .25s cubic-bezier(.32, .72, 0, 1),
    border-color .25s cubic-bezier(.32, .72, 0, 1);
  /* why(改版): 青蓝外发光 + 内 glow + 顶部高光描边, 再加一层框外下方落地阴影
     (0 10px 18px -2px, 负 spread 收在按钮正下方) — 用户钦定"框外下面加阴影", 让按钮浮在场景上有立体感 */
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, .30),
    0 10px 18px -2px rgba(6, 24, 48, .45); /* why(iOS玻璃): 去青外发光+青内发光层, 顶高光去蓝→白, 留框外落地暗影结构 */
}
.cm-upg::before {
  content: ''; position: absolute;
  inset: calc(1px * var(--ui-top-control-scale)) calc(1px * var(--ui-top-control-scale)) auto calc(1px * var(--ui-top-control-scale));
  height: 40%;
  border-radius: calc(13px * var(--ui-top-control-scale)) calc(13px * var(--ui-top-control-scale)) 40% 40% / calc(13px * var(--ui-top-control-scale)) calc(13px * var(--ui-top-control-scale)) 60% 60%;
  /* why(改版): 顶部全息高光收淡 (.22→.12), 配合通体提高的透明度, 不让高光显得像实体反光 */
  background: linear-gradient(180deg, rgba(255, 255, 255, .12), rgba(255, 255, 255, 0)); /* why(iOS玻璃): 顶部蓝青高光→中性白, 留 .12 alpha */
  z-index: -1;
  pointer-events: none;
}
.cm-upg::after {
  content: ''; position: absolute;
  left: -20%; right: -20%; bottom: -60%;
  height: 120%;
  border-radius: 50%;
  filter: blur(24px);
  opacity: .45;
  z-index: -2;
  transition: opacity .25s cubic-bezier(.32, .72, 0, 1);
  background: var(--glow, transparent);
}
/* why: hover 抬起 + 提亮 + 描边发光, 全走 translate/filter 独立属性 */
.cm-upg:hover { translate: 0 -2px; filter: brightness(1.10); border-color: rgba(255, 255, 255, .85); } /* why(iOS玻璃): hover 描边去蓝青→白 */
.cm-upg:active { scale: .96; filter: brightness(.93); }
.cm-upg:active::after { opacity: .8; }
/* why(用户"升级三按钮换玻璃彩色描边"): 镭射环叠按钮边缘 — 按钮俩伪元素已被 顶部高光/底部辉光 占用, 故用真子元素 span.
   按钮小 → disp-w/blur 局部改细(全局值是给大弹窗的); screen 混合只把边缘染上流动虹彩, 不糊内容. */
.cm-upg-holo {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  border-radius: calc(14px * var(--ui-top-control-scale)); /* why: 跟随 1920×1080 基准缩放，并与 .cm-upg 外框保持同一圆角。 */
  --ui-holo-disp-w: 1.5px;  /* why: 小按钮描边要细, 压过全局(给大弹窗的 8px) */
  --ui-holo-disp-blur: 7px; /* why: 内渐隐收窄, 否则环占满小按钮 */
  mix-blend-mode: screen;
  opacity: var(--ui-holo-disp-op, 1);
  filter: hue-rotate(var(--ui-holo-hue, 0deg));
}
/* why: 三种发光统一无色全息蓝白系, 只在明暗上略作区分, 不引入暖色相 */
/* why(iOS玻璃): 三种卡光晕去蓝青→中性白软光晕(留 .55 alpha); 档位区分改由图标/文案承担, 不再用色相 */
.cm-upg[data-kind="luck"]  { --glow: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 60%); }
.cm-upg[data-kind="speed"] { --glow: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 60%); }
.cm-upg[data-kind="auto"]  { --glow: radial-gradient(circle, rgba(255, 255, 255, .55), transparent 60%); }
.cm-upg .cm-upg-icon-row {
  min-height: calc(26px * var(--ui-top-control-scale));
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.cm-upg .cm-upg-side-actions {
  /* why: 视频入口挂在图标左侧, 用绝对定位脱离排版, 保证主升级图标不被挤动 */
  position: absolute;
  right: calc(100% + 4px * var(--ui-top-control-scale));
  top: 50%;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  gap: calc(3px * var(--ui-top-control-scale));
  white-space: nowrap;
}
.cm-upg .cm-upg-ad-icon {
  line-height: 1;
  padding: calc(2px * var(--ui-top-control-scale)) calc(4px * var(--ui-top-control-scale));
  border-radius: 999px;
  cursor: pointer;
}
.cm-upg .cm-upg-ad-icon {
  font-size: calc(12px * var(--ui-top-control-scale));
  background: rgba(255, 214, 92, .18);
  border: 1px solid rgba(255, 224, 110, .52);
  color: #fff6b8;
  filter: drop-shadow(0 0 8px rgba(255, 210, 70, .45));
}
.cm-upg .emoji {
  width: calc(44px * var(--ui-top-control-scale)); /* why: 1920×1080 基准 44px，跟升级框统一同比缩放。 */
  height: calc(44px * var(--ui-top-control-scale)); /* why: 三个图标保持统一方盒并随画框缩放，不造成 dock 高度抖动。 */
  display: grid;
  place-items: center;
  line-height: 1;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35));
}
.cm-upg .emoji img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  pointer-events: none;
}
.cm-upg .title {
  margin-top: 0;
  font-size: calc(14px * var(--ui-top-control-scale));
  font-weight: 600;
  letter-spacing: .3px;
  color: #fff;
  /* why: 透明全息底上文字要靠 text-shadow 才读得清 — 深蓝描影 + 冷光晕 (跟 家园 全息文字同款) */
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 去青字辉光(深蓝描影+青光晕)→ 统一黑描边 token, 亮玻璃底仍可读 */
}
.cm-upg .desc {
  margin-top: 0;
  font-size: calc(11px * var(--ui-top-control-scale));
  /* why: 透明底上原 .6 太淡, 提到 .78 + 轻描影保持可读 */
  color: rgba(255, 255, 255, .78); /* why(iOS玻璃): 蓝青描述→白, 留 .78 弱化 */
  text-shadow: var(--cm-glass-text-outline); /* why(iOS玻璃): 深蓝描影→黑描边 token */
  line-height: 1.3;
  /* why: 三个升级卡必须等高对齐; 描述行固定一行高度, 文案过长时省略, 不能把价格行往下顶 */
  height: calc(16px * var(--ui-top-control-scale));
  max-width: 100%;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.cm-upg .level {
  position: absolute;
  top: calc(8px * var(--ui-top-control-scale)); right: calc(10px * var(--ui-top-control-scale));
  font-size: calc(10px * var(--ui-top-control-scale));
  padding: calc(2px * var(--ui-top-control-scale)) calc(7px * var(--ui-top-control-scale));
  border-radius: 999px;
  /* why(iOS玻璃): 暗药丸底(25,55,90 非荧光值)保留为深底, 描边去蓝青→中性白 */
  background: rgba(25, 55, 90, .34);
  border: 1px solid rgba(255, 255, 255, .32);
  letter-spacing: .5px;
  color: #fff;
}
.cm-upg .cost {
  margin-top: 0;
  display: inline-flex;
  align-items: center;
  gap: calc(4px * var(--ui-top-control-scale));
  font-size: calc(12px * var(--ui-top-control-scale));
  /* why(用户"金币框内外两个框, 删小的"): 去掉这层内胶囊框(padding/圆角/底/描边),
     🪙340 直接落在 .cm-upg-buy 按钮框里 = 只剩一个框. 颜色态(disabled红/is-max青/券金)保留在下方各自规则里. */
  padding: 0;
  background: none;
  border: none;
  font-variant-numeric: tabular-nums;
  color: #fff;
}
.cm-upg .cost .dot {
  width: calc(10px * var(--ui-top-control-scale)); height: calc(10px * var(--ui-top-control-scale)); border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #fff3a1, #f5b400 60%, #b97c00);
}
/* why: 金币不足不再是不可操作, 会打开广告直升弹窗; 保留弱化视觉但鼠标仍提示可点击 */
.cm-upg.disabled { opacity: .68; cursor: pointer; }
.cm-upg.disabled .cost { color: #ff6a6a; }
/* why: 20 级封顶后按钮仍留在网格里展示完成态, 但不能像可购买项一样 hover 抬起或显示红价 */
.cm-upg.is-max { opacity: .82; cursor: default; filter: saturate(.78) brightness(.92); }
.cm-upg.is-max:hover { translate: 0 0; filter: saturate(.78) brightness(.92); border-color: rgba(255, 255, 255, .5); } /* why(iOS玻璃): 满级 hover 描边去青→白 */
.cm-upg.is-max:active { scale: 1; filter: saturate(.78) brightness(.92); }
.cm-upg.is-max .cost { color: #ffe1a0; } /* why(iOS玻璃): 满级价去青→暖金(完成态金色更贴合) */
.cm-upg.is-max .cost .dot { background: radial-gradient(circle at 30% 30%, #fff3a1, #f5b400 60%, #b97c00); } /* why(iOS玻璃): 满级金币点去青→金(同普通金币点), 呼应满级金字 */
/* why(修bug): 金币不足摇头改由 app.jsx 用 WAAPI 动 transform 实现 — 不再用 CSS animation 属性,
   否则它会覆盖 dock 入场 cm-upg-project-in, 摇完一移除 → 入场被重启("收回又弹出" bug). 故此处删 .cm-upg.shake */
/* 成功 buy 涟漪 — 从按钮中心冷光扩散, 配合 cm-upg 的 overflow:hidden 自然裁切 */
.cm-upg .ripple {
  position: absolute;
  left: 50%; top: 50%;
  width: 8px; height: 8px;
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, -50%) scale(0);
  /* why: 配合无色全息底, 涟漪从粉光改蓝白光 */
  background: radial-gradient(circle, rgba(255, 255, 255, .85) 0%, rgba(255, 255, 255, .35) 50%, transparent 75%); /* why(iOS玻璃): 买成功涟漪去青→中性白, 留 alpha 层次 */
  z-index: 0;
}
.cm-upg.rippling .ripple {
  animation: cmUpgRipple .55s cubic-bezier(.2, .9, .3, 1);
}
@keyframes cmUpgRipple {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(0); }
  25%  { opacity: 1; transform: translate(-50%, -50%) scale(18); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(40); }
}
/* ── 升级成功 全息"充能"特效 (需求2 重做) — 一道亮青扫描带自上而下扫过 + 内缘青光骤亮, 像全息板刷新充能 ──
   why: 覆盖整块按钮(border-radius:inherit + 按钮 overflow:hidden 自然裁成圆角), 走 background-position 扫 + box-shadow 闪,
        全冷青色, 契合全息扫描线底; 只在 .rippling(成功 560ms)时播一次 */
.cm-upg .cm-upg-burst {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  z-index: 1; /* why: 压在内容(emoji/文字)之上扫过, 但 isolation:isolate 下不溢出按钮 */
  background: linear-gradient(180deg, transparent 0%, rgba(255, 255, 255, .55) 48%, rgba(255, 255, 255, .85) 52%, transparent 100%); /* why(iOS玻璃): 充能扫描带去青→中性白, 留 alpha */
  background-size: 100% 280%;
  background-position: 0 -90%;
  mix-blend-mode: screen; /* why: 叠加发光, 不挡底下全息纹理 */
}
.cm-upg.rippling .cm-upg-burst {
  animation: cmUpgCharge .52s cubic-bezier(.36, 0, .2, 1);
}
@keyframes cmUpgCharge {
  0%   { opacity: 0; background-position: 0 -90%; box-shadow: inset 0 0 0 rgba(255, 255, 255, 0); }
  22%  { opacity: 1; box-shadow: inset 0 0 24px rgba(255, 255, 255, .6); } /* why(iOS玻璃): 充能内发光去青→中性白 */
  100% { opacity: 0; background-position: 0 190%; box-shadow: inset 0 0 0 rgba(255, 255, 255, 0); }
}
/* 升级到账: 等级药丸弹一下 + 青光高亮 ("Lv 升上去了"的全息反馈) */
.cm-upg.rippling .level {
  animation: cmUpgLevelPop .5s cubic-bezier(.34, 1.56, .64, 1);
}
@keyframes cmUpgLevelPop {
  0%   { transform: scale(1); }
  35%  { transform: scale(1.32); background: rgba(255, 255, 255, .55); border-color: rgba(255, 255, 255, .95); box-shadow: 0 0 12px rgba(255, 255, 255, .85); color: #ffffff; } /* why(iOS玻璃): 升级到账等级药丸闪光全去青→中性白 */
  100% { transform: scale(1); }
}

/* ============================================================
   5 档奖励弹窗 (复刻自 娃娃机奖励弹窗.html)
   ============================================================ */

.rw-popup-layer {
  position: fixed; inset: 0; z-index: 1040; pointer-events: none;
  display: grid; place-items: center;
}
.rw-fx-canvas {
  position: fixed; inset: 0; width: 100%; height: 100%;
  /* why(用户 0709 "弹窗粒子全部压在弹窗背景上面"): 1035→1042 抬到弹窗层(1040)之上、金币层(1045)之下;
     游戏自身点击环 .cm-fx-canvas 仍是 z200, 保持在弹窗背景下面 (用户钦定的对比关系) */
  pointer-events: none; z-index: 1042;
}
.rw-coin-layer { position: fixed; inset: 0; pointer-events: none; z-index: 1045; }
.rw-edge-flash {
  position: fixed; inset: 0; pointer-events: none; z-index: 1025;
  background: radial-gradient(ellipse at 50% 50%, transparent 30%, transparent 50%, rgba(255, 216, 77, .4) 85%, rgba(255, 90, 31, .6) 100%);
  opacity: 0;
  mix-blend-mode: screen;
}
.rw-edge-flash.lv-3.fire { animation: rwEdgeFlash3 .9s ease-out; }
.rw-edge-flash.lv-4.fire { animation: rwEdgeFlash4 1.4s ease-out; }
@keyframes rwEdgeFlash3 { 0% { opacity: 0; } 15% { opacity: .7; } 100% { opacity: 0; } }
@keyframes rwEdgeFlash4 { 0% { opacity: 0; } 10% { opacity: 1; } 40% { opacity: .7; } 100% { opacity: 0; } }

.rw-stage-shake { animation: rwStageShake .55s cubic-bezier(.36, 0, .66, -.56); }
@keyframes rwStageShake {
  0%, 100% { transform: translate(0, 0); }
  10%  { transform: translate(-8px, 4px) rotate(-.25deg); }
  25%  { transform: translate(10px, -5px) rotate(.3deg); }
  40%  { transform: translate(-6px, -3px) rotate(-.18deg); }
  55%  { transform: translate(5px, 6px) rotate(.12deg); }
  75%  { transform: translate(-3px, -2px) rotate(-.05deg); }
}

.rw-popup {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  transform: scale(0); opacity: 0;
  will-change: transform, opacity;
}
.rw-popup.enter { animation: rwPopupEnter .42s cubic-bezier(.2, 1.45, .5, 1) forwards; }
.rw-popup.exit  { animation: rwPopupExit  .32s cubic-bezier(.5, 0, .7, .3) forwards; }
@keyframes rwPopupEnter {
  0%   { transform: scale(.2) rotate(-8deg); opacity: 0; }
  60%  { transform: scale(1.15) rotate(2deg); opacity: 1; }
  80%  { transform: scale(.96) rotate(-1deg); }
  100% { transform: scale(1) rotate(0); opacity: 1; }
}
@keyframes rwPopupExit {
  0%   { transform: scale(1) translateY(0); opacity: 1; }
  30%  { transform: scale(1.1) translateY(-10px); opacity: 1; }
  100% { transform: scale(.6) translateY(40px); opacity: 0; }
}

.rw-card {
  position: relative;
  padding: 24px 36px 26px;
  min-width: 220px;
  border-radius: 24px;
  text-align: center;
  z-index: 5;
}
.rw-card .level {
  font-size: 22px; letter-spacing: 6px; line-height: 1;
  margin-bottom: 10px;
  position: relative; display: inline-block;
}
.rw-card .prize {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  margin-top: 4px;
}
.rw-card .prize .ico {
  /* why: 奖励弹窗金币改用 AI 位图; 48px, contain 居中, drop-shadow 给金光晕 */
  position: relative;
  width: 48px; height: 48px;
  background: url("assets/icon/coin.webp") center/contain no-repeat;
  filter: drop-shadow(0 0 14px #ffb13a);
}
.rw-card .prize .amount {
  font-size: 48px; line-height: 1; font-weight: 800;
  color: #fff5b0;
  text-shadow: 0 0 10px #ffb13a, 0 0 22px rgba(255, 177, 58, .6), 3px 4px 0 #5a2010, 5px 6px 0 rgba(0, 0, 0, .4);
  letter-spacing: .5px;
}
.rw-card .unit {
  font-size: 14px; letter-spacing: 4px;
  color: #fff5b0;
  margin-top: 6px; text-shadow: 0 0 6px #ffb13a;
}
/* ── 中奖弹窗倍数动画 (验收: 放慢 + 做炫酷): base 数 + ×倍金徽章蓄力 → 猛冲进数字 → 数字砸大闪光爆冲击波 ── */
/* why: 徽章绝对定位(贴 .prize 右缘), 飞走/卸载不挤占布局, 数字不位移; .amount 设 relative 让冲击波居中于数字 */
.rw-card .prize { position: relative; }
.rw-card .prize .amount { position: relative; }
.rw-card .prize .rw-mult-badge {
  position: absolute; left: 100%; top: 50%; margin-left: 10px;
  transform: translateY(-50%); transform-origin: left center;
  font-size: 44px; font-weight: 900; line-height: 1; white-space: nowrap;
  background: linear-gradient(180deg, #fff7c2 0%, #ffd84d 45%, #ff9b2e 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px #ffb13a) drop-shadow(2px 3px 0 rgba(90, 32, 16, .5));
  /* 弹现 + 蓄力脉冲(让人看清 ×倍) */
  animation: rwMultBadgeIn .26s cubic-bezier(.2, 1.5, .4, 1) backwards, rwMultPulse 1s ease-in-out .26s infinite;
  will-change: transform, opacity;
}
/* 蓄力后向左猛冲进数字 + 缩小淡出 */
.rw-card .prize .rw-mult-badge.is-merging {
  animation: rwMultMerge .42s cubic-bezier(.55, -0.35, .5, 1) forwards;
}
@keyframes rwMultBadgeIn {
  from { opacity: 0; transform: translateY(-50%) scale(.4) rotate(-12deg); }
  to   { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); }
}
@keyframes rwMultPulse {
  0%, 100% { filter: drop-shadow(0 0 12px #ffb13a) drop-shadow(2px 3px 0 rgba(90, 32, 16, .5)); }
  50%      { filter: drop-shadow(0 0 24px #ffd84d) drop-shadow(2px 3px 0 rgba(90, 32, 16, .5));
             transform: translateY(-50%) scale(1.14); }
}
@keyframes rwMultMerge {
  0%   { opacity: 1; transform: translateY(-50%) translateX(16px) scale(1.18); }  /* 先后撤蓄力 */
  100% { opacity: 0; transform: translateY(-50%) translateX(-120px) scale(.2) rotate(10deg); }
}
/* 数字被倍数"砸中" → 大幅放大 + 白闪金光, 再回落定格 (cubic 带强回弹) */
.rw-card .prize .amount.is-pop {
  animation: rwAmountSlam .62s cubic-bezier(.2, 1.7, .35, 1);
}
@keyframes rwAmountSlam {
  0%   { transform: scale(.9); }
  22%  { transform: scale(1.58); color: #fff;
         text-shadow: 0 0 26px #fff, 0 0 48px #ffd84d, 0 0 72px #ffb13a, 3px 5px 0 #5a2010; }
  55%  { transform: scale(.97); }
  100% { transform: scale(1); }
}
/* 砸中瞬间从数字中心爆开一圈金光冲击波 */
.rw-card .prize .amount.is-pop::after {
  content: ""; position: absolute; left: 50%; top: 50%;
  width: 36px; height: 36px; border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 180, .95) 0%, rgba(255, 177, 58, .55) 38%, transparent 70%);
  pointer-events: none;
  animation: rwSlamBurst .62s ease-out forwards;
}
@keyframes rwSlamBurst {
  0%   { opacity: .9; transform: translate(-50%, -50%) scale(.3); }
  100% { opacity: 0;  transform: translate(-50%, -50%) scale(6.5); }
}

.rw-popup.lv-0 .rw-card {
  background: linear-gradient(180deg, #5a5a66 0%, #3a3a44 100%);
  border: 2px solid rgba(255, 255, 255, .1);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 24px rgba(0, 0, 0, .5);
}
.rw-popup.lv-0 .level { color: #a0a0aa; text-shadow: 0 1px 0 rgba(0, 0, 0, .4); }
.rw-popup.lv-0 .prize { display: none; }
.rw-popup.lv-0 .miss-msg {
  margin-top: 4px; font-size: 30px; letter-spacing: 4px;
  color: #c0c0cc; text-shadow: 0 2px 0 rgba(0, 0, 0, .4);
}
.rw-popup.lv-1 .rw-card {
  background: linear-gradient(180deg, #fff6c8 0%, #ffd84d 100%);
  border: 3px solid #b8821a;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .7), inset 0 -3px 0 rgba(184, 130, 26, .5), 0 8px 22px rgba(255, 216, 77, .4), 0 0 30px rgba(255, 216, 77, .5);
}
.rw-popup.lv-1 .level { color: #7a3a08; text-shadow: 0 1px 0 #ffe89a, 2px 3px 0 rgba(255, 255, 255, .4); }
.rw-popup.lv-1 .amount { font-size: 38px; }
.rw-popup.lv-2 .rw-card {
  background: linear-gradient(180deg, #ffe17a 0%, #ff8030 100%);
  border: 3px solid #fff5b0;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .6), inset 0 -4px 0 rgba(184, 80, 30, .4), 0 0 0 3px #b8821a, 0 10px 26px rgba(255, 128, 48, .5), 0 0 50px rgba(255, 128, 48, .55);
}
.rw-popup.lv-2 .level { font-size: 26px; color: #fff; text-shadow: 0 0 8px #ffd84d, 0 2px 0 #b85020, 3px 4px 0 rgba(0, 0, 0, .35); }
.rw-popup.lv-2 .amount { font-size: 44px; }
.rw-popup.lv-3 .rw-card {
  padding: 28px 44px 30px;
  background: linear-gradient(180deg, #ff8030 0%, #ff3d5e 50%, #b81e3a 100%);
  border: 4px solid #ffd84d;
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), inset 0 -4px 0 rgba(0, 0, 0, .3), 0 0 0 4px #5b22b8, 0 0 0 6px #ffd84d, 0 12px 30px rgba(255, 40, 80, .6), 0 0 60px rgba(255, 128, 48, .6), 0 0 100px rgba(255, 61, 209, .4);
}
.rw-popup.lv-3 .level { font-size: 30px; letter-spacing: 8px; color: #ffd84d; text-shadow: 0 0 12px #ffd84d, 0 0 24px #ff2d8a, 3px 4px 0 #5a1133, 5px 7px 0 rgba(0, 0, 0, .4); }
.rw-popup.lv-3 .amount { font-size: 56px; }
.rw-popup.lv-4 .rw-card {
  padding: 32px 52px 34px;
  background: linear-gradient(135deg, #ff3dd1 0%, #ff8030 25%, #ffd84d 50%, #6fffe4 75%, #5fd9ff 100%);
  background-size: 300% 300%;
  animation: rwRainbowShift 3s linear infinite;
  border: 5px solid #fff;
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, .7), inset 0 -5px 0 rgba(0, 0, 0, .25), 0 0 0 5px #ffd84d, 0 0 0 9px #5b22b8, 0 0 0 12px #ffd84d, 0 14px 40px rgba(255, 61, 209, .7), 0 0 80px rgba(255, 216, 77, .65), 0 0 140px rgba(95, 217, 255, .5);
}
@keyframes rwRainbowShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
.rw-popup.lv-4 .level {
  font-size: 36px; letter-spacing: 10px; color: #fff;
  text-shadow: 0 0 14px #fff, 0 0 28px #ffd84d, 0 0 48px #ff2d8a, 4px 5px 0 #ff2d8a, 7px 9px 0 #5a0a30, 10px 14px 0 rgba(0, 0, 0, .4);
  -webkit-text-stroke: 1.5px #5b22b8;
}
.rw-popup.lv-4 .amount { font-size: 72px; }
.rw-popup.lv-4 .crown {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  font-size: 48px; line-height: 1;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .5));
  animation: rwCrownBob 1.6s ease-in-out infinite;
  z-index: 6;
}
@keyframes rwCrownBob {
  0%, 100% { transform: translateX(-50%) translateY(0) rotate(-3deg); }
  50%      { transform: translateX(-50%) translateY(-6px) rotate(3deg); }
}

.rw-rays { position: absolute; inset: -160px; pointer-events: none; z-index: 3; }
.rw-rays svg { width: 100%; height: 100%; overflow: visible; }
.rw-popup.lv-1 .rw-rays,
.rw-popup.lv-2 .rw-rays,
.rw-popup.lv-3 .rw-rays,
.rw-popup.lv-4 .rw-rays { animation: rwRaysSpin var(--rays-dur, 8s) linear infinite; }
.rw-popup.lv-0 .rw-rays { display: none; }
@keyframes rwRaysSpin { to { transform: rotate(360deg); } }

.rw-shockwaves {
  position: absolute; inset: 0; pointer-events: none;
  z-index: 4; display: grid; place-items: center;
}
.rw-shockwave {
  position: absolute; width: 200px; height: 200px; border-radius: 50%;
  border: 2px solid var(--c, #ffd84d);
  box-shadow: 0 0 18px var(--c, #ffd84d);
  opacity: 0;
  animation: rwShockwave var(--dur, 1.5s) ease-out forwards;
  animation-delay: var(--delay, 0s);
}
@keyframes rwShockwave {
  0%   { transform: scale(.4); opacity: 0; }
  10%  { opacity: .85; }
  100% { transform: scale(3.6); opacity: 0; }
}

.rw-coin-fly {
  /* why: 奖励飞币改用 AI 位图; 30px, contain 居中, drop-shadow 给金光晕 */
  position: absolute; width: 30px; height: 30px;
  background: url("assets/icon/coin.webp") center/contain no-repeat;
  filter: drop-shadow(0 0 10px #ffb13a);
  transform: translate(-50%, -50%);
  will-change: transform, left, top;
}

/* ── 金币图标统一面貌 — AI 生成位图 (用户钦定"生个美观的图"), 全局一致 ── */
/* why: 行内文本里的金币图标 — 尺寸跟随字号(1em)自适应, 价格/费用前点一枚小金币替代 ¥ */
.coin-ico {
  display: inline-block; position: relative;
  width: 1em; height: 1em; vertical-align: -0.14em; margin: 0 1px;
  background: url("assets/icon/coin.webp") center/contain no-repeat;
}

/* ═══════════ 娃娃机页锁定遮罩 (机台未解锁) ═══════════ */
/* why: 锁定时玩法 UI (充能舱/火力全开圈) 全藏, 由遮罩接管 */
.cm-frame.is-machine-locked .cm-charge-overlay,
.cm-frame.is-machine-locked .cm-ring-stage { display: none; }

/* why(任务6): 通关机台(抽出超级大奖)锁死 — 隐藏连点奖励舱(含进度条+启动/爆率键)、心动圈、触发框; 只留切机提示 */
.cm-frame.is-cleared .cm-charge-overlay,
.cm-frame.is-cleared .cm-ring-stage,
.cm-frame.is-cleared .cm-trigger-box { display: none !important; }

/* why: 永远在的隔离父 — display:contents 不生成盒子 (不影响 .cm-machine-lock 仍按 .cm-frame 定位/inset),
   只为给"换 key 重挂"的遮罩一个独立 reconcile 容器, 根治狂滑时遮罩 DOM 节点泄漏叠加 (越翻越黑/重影/卡死) */
.cm-lock-host { display: contents; }

/* 遮罩: 盖在视频上, 低于 topbar(10,留金币可见) 和 tabbar(12,可切页) */
.cm-machine-lock {
  position: absolute; inset: 0; z-index: 9;
  display: flex; align-items: center; justify-content: center;
  /* why: 半透明灰色遮罩 + 极轻扫描线 — 娃娃机背景视频透出来看得见 (不再是全黑), 仅压一层灰让锁定文字读得清;
     灰用中性 (28,28,34) 不带蓝黑; 中心 .42 更透/边缘 .6 略压 = 轻晕影聚焦文字又不糊住画面 (试过 .55 统一偏闷, .35 文字发飘) */
  background:
    repeating-linear-gradient(to bottom, rgba(0,0,0,.10) 0px, rgba(0,0,0,.10) 1px, transparent 1px, transparent 3px),
    radial-gradient(ellipse at center, rgba(28,28,34,.42), rgba(18,18,24,.6));
  pointer-events: auto; /* 接事件后冒泡到 frame → 非按钮区滑动照样切机 */
  transition: opacity .2s ease; /* why: 落定后淡入 (see is-swiping/settling 规则) */
}
/* why: 切机滑动/落定全程把锁定遮罩整张隐藏 — 不跟手淡、不固定浮在屏中央, 只让背景视频滑动;
   落定 (is-swipe-settling 摘除) 后才淡入新机台遮罩. 根治"两台锁定机滑动时两张遮罩卡在屏中央叠成重影"
   (遮罩在 swipe-stage 外不跟着位移, 旧卡延后 290ms 换新卡那一帧会与新卡叠画). */
.cm-frame.is-swiping .cm-machine-lock,
.cm-frame.is-swipe-settling .cm-machine-lock { opacity: 0; }
/* why: 参考稿是全屏电影式信息层，不要终端卡片边框；仅限制文字宽度保证竖屏可读。 */
.cm-machine-lock-card {
  width: 410px; /* why: 410px 是 1920×1080 游戏画框中的锁定信息层基准宽；整卡统一缩放，避免容器宽度和内部字体各缩一次。 */
  flex: 0 0 410px; /* why: 锁定信息层必须先保持桌面基准宽再统一 transform；禁止 flex 在窄屏先压一次宽度造成双重缩小。 */
  padding: 0 18px 22px; /* why: 底部 22px 给双按钮辉光留边，不被容器视觉截断。 */
  text-align: center;
  font-family: "PHFT Heavy", "PingFang SC", sans-serif; /* why: 用户指定阿里巴巴普惠体粗黑字作为锁定界面主字体。 */
  transform: scale(var(--ui-top-control-scale));
  transform-origin: center; /* why: 未解锁名称、标题、条件和按钮以 1920×1080 为一整套同比缩放，并始终保持在玩法画面中央。 */
}
.cm-lock-name {
  margin-bottom: 18px; /* why: 名称与大标题分层，18px 在参考图比例下既明确又不松散。 */
  color: #fff; /* why: 白字在深色视频遮罩上保持最高识别度。 */
  font-size: 30px; /* why: 父级锁定信息层统一负责响应式缩放；30px 保留 1920×1080 基准中的次级名称比例，避免子级再次按视口缩小。 */
  font-weight: 900;
  letter-spacing: 1px; /* why: 普惠体重字只做轻微字距，避免中文被拉散。 */
  text-shadow: 0 3px 8px rgba(0, 0, 0, .9), 0 0 10px rgba(255, 255, 255, .22); /* why: 黑外阴影托住视频细节，微白辉光补高奢质感。 */
}
.cm-lock-head {
  margin-bottom: 20px; /* why: 大标题下方留出稳定呼吸区再进入条件文案。 */
  color: #fff; /* why: “尚未解锁”是画面第一视觉，使用纯白而非旧版故障红。 */
  font-size: 66px; /* why: 66px 是 1920×1080 基准主标题字号，手机和平板交给父级整卡同比缩放。 */
  font-weight: 900;
  line-height: .98; /* why: 黑体大字稍收行高，维持紧凑爆发力。 */
  letter-spacing: -2px; /* why: 仅收 2px 抵消重黑字天然的横向膨胀。 */
  white-space: nowrap; /* why: “尚未解锁”必须始终作为完整四字标题单行显示，不能在窄屏拆成两行。 */
  text-shadow: 0 5px 10px rgba(0, 0, 0, .96), 0 0 15px rgba(255, 255, 255, .28); /* why: 同时实现字体外阴影与柔和辉光。 */
}
.cm-lock-cond {
  margin-bottom: 30px; /* why: 条件与行动按钮之间留 30px，避免按钮辉光污染正文。 */
  color: rgba(255, 255, 255, .92); /* why: 次级文案略降亮度，层级低于白色大标题。 */
  font-family: "PHFT Heavy", "PingFang SC", sans-serif;
  font-size: 19px; /* why: 19px 保留 1920×1080 基准条件字号，父级整卡缩放确保窄屏不会与标题产生双重缩放。 */
  font-weight: 800;
  letter-spacing: .25px; /* why: 中文条件行只做极轻字距。 */
  line-height: 1.5; /* why: 组合条件可能换行，1.5 行高防拥挤。 */
  text-shadow: 0 2px 5px rgba(0, 0, 0, .95); /* why: 条件必须能压住变化的视频背景。 */
}
.cm-lock-cond em {
  color: #ffd86b; /* why: 暖金色只标识关键前置目标/费用，与豪宅金色材质语言一致。 */
  font-style: normal;
  text-shadow: 0 0 8px rgba(255, 192, 64, .46), 0 2px 5px rgba(0, 0, 0, .95); /* why: 金色关键词增加局部辉光但仍保留黑色托底。 */
}
.cm-lock-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px; /* why: 双按钮时广告在上、条件在下，并用 20px 明确分离两条路径。 */
}
/* why: “去解锁”只保留家园确认键的玻璃、字体辉光、黑色外阴影与炫彩外晕，不再使用红色行动底。 */
.cm-lock-btn {
  position: relative;
  isolation: isolate;
  width: min(100%, 270px); /* why: 接近参考图按钮占正文宽度的比例，270px 兼顾中文长标签。 */
  min-height: 56px; /* why: 56px 达到移动端舒适点击面积并托起玻璃高光。 */
  padding: 12px 20px; /* why: 双行长文案也不会贴边。 */
  border: 1px solid rgba(255, 255, 255, .6); /* why: 半透明白边模拟玻璃受光边缘。 */
  border-radius: 13px; /* why: 与家园确认按钮同类的现代玻璃圆角，不用旧终端直角。 */
  color: #fff; /* why: 白字在变化的虹彩玻璃上始终保持最高对比。 */
  background-color: rgba(31, 28, 48, .58); /* why: 中性烟晶底托住白字和透明折射，不形成红色按钮观感。 */
  background-image: linear-gradient(112deg, rgba(65, 205, 255, .3), rgba(255, 255, 255, .16) 34%, rgba(145, 93, 255, .28) 68%, rgba(255, 211, 105, .24)); /* why: 青光、透明高光、紫晶和香槟金组成豪宅感虹彩玻璃。 */
  backdrop-filter: blur(12px) saturate(1.45); /* why: 12px 模糊保留背景色块而抹掉杂乱细节，1.45 饱和让虹彩折射可见。 */
  -webkit-backdrop-filter: blur(12px) saturate(1.45); /* why: iOS WebView 需要前缀才能显示同样的玻璃折射。 */
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .58), inset 0 -8px 18px rgba(10, 6, 34, .3), 0 8px 18px rgba(0, 0, 0, .5); /* why: 白色高光、烟紫内部暗面和黑色悬浮阴影共同表现玻璃体积。 */
  cursor: pointer;
  font-family: "PHFT Heavy", "PingFang SC", sans-serif;
  font-size: 17px; /* why: 17px 在 56px 高按钮内最接近家园确认键的字面占比。 */
  font-weight: 900;
  letter-spacing: .5px; /* why: 重字只加少量字距防糊。 */
  text-shadow: 0 2px 3px rgba(9, 6, 22, .96), 0 0 9px rgba(255, 255, 255, .78); /* why: 用户要求字体黑外阴影与字体辉光同时存在。 */
  transition: transform 140ms ease, filter 140ms ease; /* why: 140ms 点击反馈利落，不拖慢跳转。 */
}
.cm-lock-btn::before {
  content: "";
  position: absolute;
  inset: -4px; /* why: 外扩 4px 形成可见炫彩边缘而不吞掉按钮红色主体。 */
  z-index: 0;
  border-radius: 16px; /* why: 比按钮多 3px，与外扩距离匹配。 */
  background: conic-gradient(from 0deg, #5ee7ff, #746cff, #ff7bd5, #ffd76a, #5ee7ff); /* why: 青、蓝紫、玫粉、香槟金形成完整虹彩环，避免红色按钮观感。 */
  padding: 3px; /* why: 3px 色环在手机宽度清晰可见，又不压缩红色按钮主体。 */
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0); /* why: 挖空伪元素中心，只保留炫彩外圈，避免整颗按钮被染成蓝紫。 */
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: blur(3px); /* why: 3px 只柔化外圈，不让颜色溢入按钮正文。 */
  opacity: .78; /* why: 保留炫彩存在感但不盖过红色主按钮。 */
  animation: cmLockHaloSpin 2600ms linear infinite; /* why: 2.6 秒完成一次色相流动，保持可感知又不显急躁。 */
  pointer-events: none;
}
.cm-lock-btn > span { position: relative; z-index: 1; }
.cm-lock-btn > span { white-space: normal; } /* why: 锁页按钮明确禁用文字跑马灯，短文案静止显示，长翻译只在按钮内部自然换行。 */
.cm-lock-btn:active {
  transform: translateY(2px) scale(.985); /* why: 2px 下压配合轻缩模拟玻璃实体被按下。 */
  filter: brightness(1.12); /* why: 轻微提亮反馈点击，不制造白闪。 */
}
.cm-lock-btn.is-ad::before { animation-delay: -1300ms; /* why: 双按钮的色环错开半圈，避免看起来完全复制同步。 */ }
/* why: 只旋转色相而不旋转伪元素矩形，避免宽按钮转成竖向时产生贯穿标题的彩色长条。 */
@keyframes cmLockHaloSpin { to { filter: blur(3px) hue-rotate(360deg); } }
.cm-lock-ad {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  font-size: 15px; color: #ffffff; padding: 8px 0; /* why(iOS玻璃): 解锁广告加载字去蓝→白 */
  font-family: -apple-system, "PingFang SC", sans-serif;
}
.cm-lock-ad-spin {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #ffffff; /* why(iOS玻璃): 解锁转圈去蓝→白环+白头 */
  animation: cmLockSpin 800ms linear infinite;
}
@keyframes cmLockSpin { to { transform: rotate(360deg); } }

/* 临时接入倒计时徽标 (顶部中间) */
.cm-temp-badge {
  position: absolute; top: 8px; left: 50%; transform: translateX(-50%);
  z-index: 11; padding: 4px 12px; border-radius: 999px;
  background: rgba(20,14,28,.72); border: 1px solid rgba(255,180,120,.4);
  color: #ffd0a0; font-size: 12px; font-weight: 600; letter-spacing: .5px;
  font-family: "Menlo", "Monaco", monospace;
  display: flex; align-items: center; gap: 6px;
  box-shadow: 0 0 12px rgba(255,150,90,.25);
}
.cm-temp-badge .dot {
  width: 7px; height: 7px; border-radius: 50%; background: #ffae5c;
  box-shadow: 0 0 6px #ffae5c; animation: cmDotBlink 1400ms infinite;
}
@keyframes cmDotBlink { 0%,50% { opacity: 1; } 51%,100% { opacity: .25; } }

/* ===== 娃娃机页"屏内切台"干扰层 (雪花静电 + 横向信号撕裂 band) =====
   why: 跟总览屏同款 — 锁定态/解锁/广告等屏内画面切换瞬间盖一层一次性 CRT 干扰, 像真监视器换了频道.
        z-index 9 跟锁定遮罩同层但 DOM 在后 → 盖住画面; pointer-events:none 不挡点击; ~280ms 后归 0 自动隐去.
        顶栏(z10)/tabbar(z12) 比它高 → 只糊"屏内"画面区, 外壳照旧.
   why: 雪花用内联 SVG feTurbulence 灰阶噪点 (saturate=0), 无需图片资源 */
.cm-glitch {
  position: absolute; inset: 0; z-index: 9; pointer-events: none;
  opacity: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 150px 150px;
  mix-blend-mode: screen; /* why: 噪点叠加发亮, 像雪花打在画面上而非糊死 */
  animation: cmGlitchFlash 280ms linear forwards;
}
.cm-glitch::after {
  content: ""; position: absolute; left: 0; right: 0; height: 12%;
  background: linear-gradient(to bottom, transparent, rgba(255,255,255,.15) 28%, rgba(255,255,255,.85) 50%, rgba(255,255,255,.15) 72%, transparent); /* why(iOS玻璃/去故障): 切台干扰带里的蓝去掉→中性白 CRT 带 */
  mix-blend-mode: screen;
  animation: cmGlitchBand 280ms linear forwards;
}
@keyframes cmGlitchFlash {
  0%   { opacity: 0;   background-position: 0 0; }
  7%   { opacity: 1;   background-position: -46px 20px; }
  22%  { opacity: .92; background-position: 34px -30px; }
  40%  { opacity: 1;   background-position: -26px 40px; }
  60%  { opacity: .78; background-position: 50px -14px; }
  80%  { opacity: .55; background-position: -18px 26px; }
  100% { opacity: 0;   background-position: 22px -8px; }
}
@keyframes cmGlitchBand {
  0%   { transform: translateY(-130%); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: .85; }
  100% { transform: translateY(760%); opacity: 0; }
}

/* ── 保底进度全息弹窗 — 复用限时任务触发横幅 .tq-announce 的全息样式, 仅覆盖定位 ── */
.tq-announce.cm-pity-announce {
  /* why: 限时任务横幅在 top:32% 偏上, 保底弹窗用户钦定屏幕正中 → 50% (配合 translate(-50%,-50%) 真正居中) */
  top: 50%;
}

/* ═══════════ 主界面 UI v2 组件换皮 (透明 PNG 底 + 独立文字/icon 层) ═══════════
   why: 用户给的拆层版 UI 用 942×1675 构图; 这里按同一比例把主界面 HUD 改成左侧竖栏、顶部进度、底部导航.
        业务状态和弹窗入口保持旧逻辑, 只迁移可确认的视觉/动效; 用户红圈标注的奖励猫头和里程碑图标暂不实装. */
.cm-frame {
  --ui-unit: calc(.6456px * var(--ui-top-control-scale)); /* why: 1920×1080 时游戏画框宽 607.5px，对应 941px 原图的每像素为 .6456px；之后随同一画框比例连续缩放。 */
  --ui-editor-unit: calc(1.4128px * var(--ui-top-control-scale)); /* why: 1920×1080 时 607.5px 游戏画框对应 430px 编辑器；移除 1.65px 封顶，让所有数字在更大或更小页面继续同比缩放。 */
  --ui-v2-cyan: #7ee6ff; /* why: 取拆层图主青色发光, 统一文字/icon 冷光 */
  --ui-v2-pink: #ff9fd2; /* why: 取拆层图选中/限时粉色, 用于底部选中和倒计时 */
  --ui-v2-white: rgba(245, 250, 255, .96); /* why: HUD 白字在深背景和透明棋盘底上都可读 */
  --ui-v2-shadow: 0 0 calc(10 * var(--ui-editor-unit)) rgba(96, 216, 255, .55); /* why: 透明 PNG 自带边光, 文字层补同色弱光且随字号缩放 */
  --ui-left-x: 3.1%; /* why: 用户底框图左侧首框 x=22/943, 按原图坐标实装 */
  --ui-left-y: max(calc(env(safe-area-inset-top, 0px) + 8px * var(--ui-top-control-scale)), calc(75px * var(--ui-top-control-scale))); /* why: 真机优先取系统安全区再留 8px；普通浏览器用官方参考图 11% 画框宽换算出的 67px 死区加 8px，确保整列落到刘海/状态栏下方。 */
  --ui-left-w: 16.35%; /* why: 用户底框图左侧框宽 154/943, 按原始 PNG 比例显示 */
  --ui-left-scale: 0.87; /* why: 用户要求直接用这版底框替换, 不再沿用旧编辑器整体缩小值 */
  --ui-progress-x: 22.394%; /* why: 用户通过 UI editor 新布局导出的顶部连点奖励条 x */
  --ui-progress-y: 4.884%; /* why: 用户通过 UI editor 新布局导出的顶部连点奖励条 y */
  --ui-progress-w: 74.6%; /* why: 右侧保留约 2.7% 安全边距, 方便编辑器直接调宽 */
  --ui-progress-scale: 1; /* why: 顶部奖励区整体缩放默认 1 */
  --ui-ring-dx: calc(0 * var(--ui-editor-unit)); /* why(任务5): 心动圈位置微调(编辑器 offset 组件), 按 editor 设计 px 随画框缩放 */
  --ui-ring-dy: calc(-66 * var(--ui-editor-unit)); /* why(用户改稿"改心动框布局", 2026-07-02 二次导出): 心动圈整体上移 66 editor px */
  --ui-ring-scale: 1; /* why(任务5): 心动圈整体缩放, 编辑器可调 */
  --ui-ring-title-dx: calc(0 * var(--ui-editor-unit)); /* why(任务5): 心动圈标题"让ta心动吧"位置/字号微调 */
  --ui-ring-title-dy: calc(0 * var(--ui-editor-unit));
  --ui-ring-title-font: calc(20 * var(--ui-editor-unit));
  --ui-ring-mult-dx: calc(0 * var(--ui-editor-unit)); /* why(任务5): 心动圈倍数"×1.00"位置/字号微调 */
  --ui-ring-mult-dy: calc(0 * var(--ui-editor-unit));
  --ui-ring-mult-font: calc(17 * var(--ui-editor-unit));
  --ui-help-dx: calc(-3 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的问号按钮 x 微调, 按 editor 设计 px 随画框缩放 */
  --ui-help-dy: calc(-2 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的问号按钮 y 微调, 按 editor 设计 px 随画框缩放 */
  --ui-help-scale: 1.003; /* why(用户导出布局): 问号按钮缩放 */
  --ui-help-icon-dx: calc(1 * var(--ui-editor-unit)); /* why: 问号 icon 独立拆层调参, 按 editor 设计 px 随画框缩放 */
  --ui-help-icon-dy: calc(10 * var(--ui-editor-unit)); /* why: 问号 icon 独立拆层调参, 按 editor 设计 px 随画框缩放 */
  --ui-help-icon-scale: 1.66; /* why(用户导出布局): 问号 icon 缩放 */
  --ui-coin-card-dx: calc(0 * var(--ui-editor-unit)); /* why(用户导出布局): 金币框 x 微调 */
  --ui-coin-card-dy: calc(0 * var(--ui-editor-unit)); /* why(用户导出布局): 金币框大幅上移到目标位置 */
  --ui-coin-card-scale: 1; /* why(用户导出布局): 金币框缩放 */
  --ui-gift-x: 3.1%; /* why: 用户底框图礼包框 x=23/943, 保持和新 PNG 外沿对齐 */
  --ui-gift-y: 32.5%; /* why: 用户底框图礼包框 y=611/1678, 按原图坐标实装 */
  --ui-gift-w: 14.4%; /* why: 用户底框图礼包框宽 154/943, 与左栏框同宽 */
  --ui-trigger-x: 2.9%; /* why: 用户说明限时任务框和礼包框一模一样, x 跟礼包框统一 */
  --ui-trigger-y: 45.4%; /* why: 参考 UI 里限时任务框位于礼包框下方, y≈855/1678 */
  --ui-trigger-w: 14.7%; /* why: 限时任务复用礼包框 PNG, 宽度必须与礼包框一致 */
  --ui-nav-x: 0.264%; /* why(用户导出布局): 纯矩形底栏 x */
  --ui-nav-y: 94.5%; /* why(用户导出布局): 纯矩形底栏下移贴底 */
  --ui-nav-w: 95.703%; /* why(用户导出布局): 底栏宽 */
  --ui-nav-scale: 1.05; /* why(用户导出布局): 底部导航整体缩放 */
  /* why(用户 2026-07-02 editor 导出): 弹窗玻璃/镭射参数 — 声明为默认值, 压过各规则里的 var fallback */
  --ui-holo-blur: 2px;
  --ui-holo-sat: 2; /* why(用户 0703 导出): 玻璃背景饱和度拉高, 镭射色更浓 */
  --ui-holo-disp-op: 1;
  --ui-holo-hue: -22deg;
  --ui-holo-disp-w: 8px; /* why(用户 0703 导出): 描边外侧清晰带加宽 1→8px, 彩边更粗更明显 */
  --ui-holo-laser-speed: 2s;
  --ui-holo-disp-blur: 40px; /* why(用户 0703 导出): 描边内渐隐深度 13→40px, 向框内晕开更多 */
  --ui-task-x: -1.3%; /* why: 用户底框图任务条 x=28/943, 按新 PNG 底框位置实装 */
  --ui-task-y: 79.6%; /* why: 用户底框图任务条 y=1354/1678, 贴底栏上方保持原图间距 */
  --ui-task-w: 2%; /* why: 用户底框图任务条宽 354/943, 不再用旧 42% 拉伸 */
  --ui-task-scale: 0.84; /* why(用户导出): 任务条整体缩小, 由响应式画框统一缩放 */
  --ui-glass-alpha: 0; /* why: 参考图玻璃底是深蓝半透, PNG 已带暗底, CSS 只补背景折射不再压黑 */
  --ui-glass-highlight: 0.02; /* why(用户导出布局): 玻璃高光 */
  --ui-glass-blur: calc(1 * var(--ui-editor-unit)); /* why: 参考图玻璃后景仍能辨认, 14px 比旧 23px 更接近轻磨砂 */
  --ui-glass-sat: 84%; /* why: 玻璃底只轻微增强蓝粉霓虹, 避免背景颜色过饱和 */
  --ui-glass-glow: 0.08; /* why: 参考图框线冷光明显, 外光强度略高于旧值但仍由 PNG 细线主导 */
  --ui-glass-radius: calc(14 * var(--ui-editor-unit)); /* why(用户导出布局): 玻璃圆角收小 */
  --ui-task-glass-radius: calc(23 * var(--ui-editor-unit)); /* why: 任务条高 46 设计单位，23 正好是半高；玻璃底形成完整药丸圆角并收进 PNG 端帽，不再从图片圆角外露出一条底色边。 */
  --ui-machine-1-hue: 195deg; /* why: machine 1 keeps the reference cyan UI tint */
  --ui-machine-1-sat: 1.25; /* why: grayscale PNG tint needs extra saturation to recover neon edges */
  --ui-machine-1-bright: 1; /* why: machine 1 is the neutral brightness baseline */
  --ui-machine-2-hue: 315deg; /* why: machine 2 uses a pink tint to make switching visible */
  --ui-machine-2-sat: 1.3; /* why: pink tint needs slightly stronger saturation on dark PNG frames */
  --ui-machine-2-bright: 1.04; /* why: pink frames read darker after hue rotation */
  --ui-machine-3-hue: 145deg; /* why: machine 3 uses a green tint distinct from cyan and pink */
  --ui-machine-3-sat: 1.2; /* why: green tint over dark glass should stay restrained */
  --ui-machine-3-bright: 0.98; /* why: green tint appears hotter than cyan at equal brightness */
  --ui-machine-4-hue: 42deg; /* why: machine 4 uses a warm gold tint */
  --ui-machine-4-sat: 1.15; /* why: gold tint clips highlights quickly on white edges */
  --ui-machine-4-bright: 1.06; /* why: warm frames need a small brightness lift */
  --ui-machine-5-hue: 265deg; /* why: machine 5 uses purple to separate from machine 2 */
  --ui-machine-5-sat: 1.28; /* why: purple tint needs enough saturation to remain visible */
  --ui-machine-5-bright: 1.02; /* why: purple darkens the PNG frame slightly */
  --ui-machine-6-hue: 355deg; /* why: machine 6 uses red for the highest contrast preset */
  --ui-machine-6-sat: 1.35; /* why: red tint needs stronger saturation after grayscale conversion */
  --ui-machine-6-bright: 1.03; /* why: red tint needs a small lift against the dark scene */
  --ui-machine-hue: var(--ui-machine-1-hue); /* why: default frame tint before machine class is applied */
  --ui-machine-sat: var(--ui-machine-1-sat); /* why: default frame saturation before machine class is applied */
  --ui-machine-bright: var(--ui-machine-1-bright); /* why: default frame brightness before machine class is applied */
  --ui-machine-glow-alpha: .32; /* why: tinted PNG frames need a subtle glow without tinting text/icons */
  --ui-machine-mix: 0.55; /* why(用户改稿): 机台染色强度 — 只染这个比例, 保留 (1-mix) 原图色, 让切机色相变化温和且和原图有关系. 编辑器「机台染色强度」可调 */
  /* why(用户改稿"左列垂直自动布局"): 礼包/限时连点/限时任务三卡的流式布局几何. app.jsx 按显隐分配 --stack-{卡}-slot(行)/-col(列),
     CSS 用 calc(top + slot*step) 定位; 消失自动重排, 满列(CAP=3)转右列(+col2-dx). 编辑器「左列自动布局」可调. */
  /* ⚠why(第2项"卡片间距不一样"暂维持原值 — 调值方案被证明不安全, 待重构): 试过 top27%/step10.5% 想让 stack 间距贴近 rail,
     但实测发现 stack 卡的 top 是【百分比相对一个会变的 frame 高度】(同一屏 frame 高时而 693px 时而 828px), 调值后在某些状态直接重叠.
     即"只修最刺眼"的调值也不可靠 —— 根因是定位基准不稳 + 固定 step% 匹配不了 aspect-ratio 卡高. 故回退原值(至少不重叠),
     真正修复需把 stack 定位重构成"按实际卡高 + 固定 gap 累加"(不依赖 frame 高百分比). 用户暂缓该重构. */
  --stack-top: 32%;       /* 第一张卡的 y 起点 */
  --stack-step: 14.5%;    /* 卡间垂直步进(卡高+间距) */
  --stack-left: 3%;       /* 左列 x */
  --stack-col2-dx: 79%;   /* 右列相对左列的 x 偏移(排不下转右侧) */
  --ui-asset-bottom-safe: 0%; /* why: 资产已重生成透明安全边, 渲染时不再压缩高度导致下沿看起来被吞 */
  --ui-text-line-safe: 1.25; /* why: 多语言重字重与拉丁字母下伸部超出 1.12 行盒；1.25 给上下字形和辉光留出完整安全区。 */
  --ui-mult-value-line-safe: 1.06; /* why: x1 数字比普通文字更大, 只需略放行高避免撑坏倍率卡垂直居中 */
  --ui-energy-label-dx: calc(0 * var(--ui-editor-unit)); /* why: 文字层编辑器调参默认值, 作为设计 px 随画框缩放 */
  --ui-energy-label-dy: calc(0 * var(--ui-editor-unit)); /* why: 文字层编辑器调参默认值, 作为设计 px 随画框缩放 */
  --ui-energy-label-font: calc(17 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的体力标题字号, 作为设计 px 随画框缩放 */
  --ui-energy-num-dx: calc(0 * var(--ui-editor-unit)); /* why: 体力数字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-energy-num-dy: calc(8 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的体力数字下移, 作为设计 px 随画框缩放 */
  --ui-energy-num-font: calc(26 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的体力数字字号, 作为设计 px 随画框缩放 */
  --ui-mult-value-dx: calc(0 * var(--ui-editor-unit)); /* why: 倍率数字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-mult-value-dy: calc(0 * var(--ui-editor-unit)); /* why: 倍率数字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-mult-value-font: calc(29 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的倍率数字字号, 作为设计 px 随画框缩放 */
  --ui-mult-label-dx: calc(0 * var(--ui-editor-unit)); /* why: 倍率标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-mult-label-dy: calc(2 * var(--ui-editor-unit)); /* why: 倍率标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-mult-label-font: calc(10 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的倍率标题字号, 作为设计 px 随画框缩放 */
  --ui-coin-num-dx: calc(-4 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的金币数字 x 微调, 作为设计 px 随画框缩放 */
  --ui-coin-num-dy: calc(0 * var(--ui-editor-unit)); /* why: 金币数字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-coin-num-font: calc(17 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的金币数字字号, 作为设计 px 随画框缩放 */
  --ui-reward-title-dx: calc(0 * var(--ui-unit)); /* why: 标题已经与进度条首端共用左边缘，不再叠加横向修正。 */
  --ui-reward-title-dy: calc(0 * var(--ui-unit)); /* why: 标题的基础 top 已明确放在进度条下方，编辑器偏移保持归零避免再次压线。 */
  --ui-reward-title-font: calc(28 * var(--ui-unit)); /* why: 顶部奖励区位置使用原图坐标单位, 字号也跟同一单位缩放, 小屏不会压到进度条 */
  --ui-progress-hint-dx: calc(20 * var(--ui-unit)); /* why(用户导出布局): 阶段提示 x 左移 */
  --ui-progress-hint-dy: calc(-4 * var(--ui-unit)); /* why: editor export places the hint close to the progress track */
  --ui-progress-hint-font: calc(27 * var(--ui-unit)); /* why: 顶部提示跟进度条同坐标单位缩放, 避免小屏用 editor 最小字号后重叠 */
  --ui-gift-title-dx: calc(0 * var(--ui-editor-unit)); /* why: 礼包标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-title-dy: calc(0 * var(--ui-editor-unit)); /* why: 礼包标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-title-font: calc(17 * var(--ui-editor-unit)); /* why: 对齐当前礼包标题字号, 作为设计 px 随画框缩放 */
  --ui-gift-timer-dx: calc(0 * var(--ui-editor-unit)); /* why: 礼包进度文字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-timer-dy: calc(0 * var(--ui-editor-unit)); /* why: 礼包进度文字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-timer-font: calc(11 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的礼包进度字号, 作为设计 px 随画框缩放 */
  --ui-trigger-title-dx: calc(0 * var(--ui-editor-unit)); /* why: 限时连点标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-trigger-title-dy: calc(0 * var(--ui-editor-unit)); /* why: 限时连点标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-trigger-title-font: calc(12 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的限时标题字号, 作为设计 px 随画框缩放 */
  --ui-trigger-timer-dx: calc(-3 * var(--ui-editor-unit)); /* why(#9): 归零 — 让倒计时文字在计时药丸里居中, 不再被顶出药丸 */
  --ui-trigger-timer-dy: calc(0 * var(--ui-editor-unit)); /* why(#9): 归零 — 同上 (原 -15 把文字顶到药丸上方被裁) */
  --ui-trigger-timer-font: calc(11 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的限时倒计时字号, 作为设计 px 随画框缩放 */
  --ui-task-label-dx: calc(-26 * var(--ui-editor-unit)); /* why(用户导出布局): 任务条标题左移 */
  --ui-task-label-dy: calc(0 * var(--ui-editor-unit)); /* why: 任务条标题独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-task-label-font: calc(12 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的任务条标题字号, 作为设计 px 随画框缩放 */
  --ui-task-text-dx: calc(-35 * var(--ui-editor-unit)); /* why(用户导出布局): 任务条正文左移 */
  --ui-task-text-dy: calc(0 * var(--ui-editor-unit)); /* why: 任务条正文独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-task-text-font: calc(12 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的任务条正文字号, 作为设计 px 随画框缩放 */
  --ui-nav-text-dx: calc(0 * var(--ui-editor-unit)); /* why: 底部导航文字独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-text-dy: calc(0 * var(--ui-editor-unit)); /* why(用户导出布局): 底部导航文字上移 */
  --ui-nav-text-font: calc(13 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 导出的底部导航字号, 作为设计 px 随画框缩放 */
  --ui-energy-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: icon 独立拆层调参, 默认不偏移且随画框缩放 */
  --ui-energy-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: icon 独立拆层调参, 默认不偏移且随画框缩放 */
  --ui-energy-icon-scale: 1.17; /* why(用户导出布局): 体力闪电 icon 缩放 */
  --ui-coin-icon-dx: calc(-2 * var(--ui-editor-unit)); /* why: 用户通过 UI editor 新布局导出的金币 icon x 微调, 作为设计 px 随画框缩放 */
  --ui-coin-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 金币 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-coin-icon-scale: 0.927; /* why(用户导出布局): 金币 icon 缩放 */
  --ui-gift-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 礼包 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 礼包 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-icon-scale: 1.28; /* why: 礼包 icon 独立拆层调参 */
  --ui-gift-clock-dx: calc(0 * var(--ui-editor-unit)); /* why: 礼包计时小钟 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-clock-dy: calc(0 * var(--ui-editor-unit)); /* why: 礼包计时小钟 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-gift-clock-scale: 3; /* why(#9): 礼包小钟缩到能被青色药丸框住的大小 */
  --ui-trigger-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 限时连点 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-trigger-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 限时连点 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-trigger-icon-scale: 1.41; /* why: 限时连点 icon 独立拆层调参 */
  --ui-trigger-clock-dx: calc(1 * var(--ui-editor-unit)); /* why(#9): 归零 — 闹钟在药丸里居中 */
  --ui-trigger-clock-dy: calc(1 * var(--ui-editor-unit)); /* why(#9): 闹钟归位到胶囊中线, 好被药丸完整框住 */
  --ui-trigger-clock-scale: 3; /* why(#9): 闹钟缩到能被计时药丸框住的大小(配合 #8 弹跳峰值仍在框内) */
  --ui-nav-claw-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 底部娃娃机 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-claw-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 底部娃娃机 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-claw-icon-scale: 1; /* why: 底部娃娃机 icon 独立拆层调参 */
  --ui-nav-overview-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 底部总览 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-overview-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 底部总览 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-overview-icon-scale: 1; /* why: 底部总览 icon 独立拆层调参 */
  --ui-nav-upgrade-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 底部升级 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-upgrade-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 底部升级 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-upgrade-icon-scale: 1; /* why: 底部升级 icon 独立拆层调参 */
  --ui-nav-home-icon-dx: calc(0 * var(--ui-editor-unit)); /* why: 底部家园 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-home-icon-dy: calc(0 * var(--ui-editor-unit)); /* why: 底部家园 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-nav-home-icon-scale: 1; /* why: 底部家园 icon 独立拆层调参 */
  --ui-task-icon-dx: calc(-29 * var(--ui-editor-unit)); /* why(#5): CSS 剪贴板归位, 不再压到"任务"字 */
  --ui-task-icon-dy: calc(-8 * var(--ui-editor-unit)); /* why(用户 2026-07-02 二次导出): 任务板 icon 微调 */
  --ui-task-icon-scale: 0.76; /* why(用户 2026-07-02 二次导出): 任务板 icon 缩到 1.8 */
  --ui-task-arrow-dx: calc(11 * var(--ui-editor-unit)); /* why: 任务条箭头 icon 独立拆层调参, 作为设计 px 随画框缩放 */
  --ui-task-arrow-dy: calc(-15 * var(--ui-editor-unit)); /* why(用户 2026-07-02 二次导出): 任务条箭头 icon 微调 */
  --ui-task-arrow-scale: 1.8; /* why: 任务条箭头 icon 独立拆层调参 */
}

/* why: 新版左栏宽度沿用素材 154/942≈16.35%, left/top 跟拆层图左边距对齐; 仍保留滑动淡出规则. */
.cm-topbar.cm-left-rail {
  top: var(--ui-left-y);
  left: var(--ui-left-x);
  right: auto;
  width: var(--ui-left-w);
  z-index: 14;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 1.05vh;
  pointer-events: none;
  transform: scale(var(--ui-left-scale));
  transform-origin: top left;
}
.cm-topbar.cm-left-rail > * { pointer-events: auto; }
.cm-left-rail .cm-tl-group {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1.05vh;
}
.cm-status-card {
  position: relative;
  width: 100%;
  height: auto;
  flex: none; /* why: 左栏卡片在 column 里保持素材自身高度, 不被 flex 压缩 */
  overflow: visible; /* why: v2 透明 PNG/文字/icon 常有外发光和下沿投影, 外框不能裁掉子层 */
  border: 0;
  background-color: transparent;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe));
  background-repeat: no-repeat;
  padding: 0;
  color: var(--ui-v2-white);
  font-family: inherit;
  isolation: isolate;
}
.cm-status-card::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(12 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 给透明 PNG 框底下补玻璃底色, 透明度/高光由 editor 调 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow:
    inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .28),
    inset 0 calc(-10 * var(--ui-unit)) calc(18 * var(--ui-unit)) rgba(0, 0, 0, .16),
    0 0 calc(18 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  z-index: -1;
  pointer-events: none;
}
.cm-stam-wrap {
  aspect-ratio: 154 / 297; /* why: 新底框由用户提供的透明框图裁出, 实际导出尺寸为 154x297 */
  background-image: url("assets/ui/main-v2/panel_energy_base.png");
  overflow: visible;
}
.cm-stam-wrap:active,
.cm-mult-chip:active,
.cm-coin-pill:active,
.cm-gift-btn:active,
.cm-trigger-box:active {
  filter: brightness(.92); /* why: 新 PNG 卡片不能抢 transform, 用亮度反馈保留原点击手感 */
}

/* why: 体力卡用同一自持组件渲染, 只把圆环视觉换成图标/文字/短进度条. */
.cm-stam-wrap .cm-stamina-ring {
  width: 100%;
  height: 100%;
  overflow: visible; /* why: 体力文字/闪电 icon 下沿和投影不能被旧圆环容器裁掉 */
}
.cm-stamina-ring .aura {
  inset: 3%;
  border-radius: calc(14 * var(--ui-unit));
  background: radial-gradient(circle at 50% 26%, rgba(126, 230, 255, .22), transparent 56%);
}
.cm-stamina-ring.consuming .aura { animation: cmUiV2CardPulse .5s ease-out; }
.cm-energy-icon {
  position: absolute;
  top: 9.5%;
  left: 50%;
  width: 42%;
  height: 28%;
  transform: translateX(-50%) translate(var(--ui-energy-icon-dx), var(--ui-energy-icon-dy)) scale(var(--ui-energy-icon-scale));
  transform-origin: center;
  background: url("assets/ui/main-v2/icon_energy_lightning.png") center/contain no-repeat;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe));
  filter: drop-shadow(0 0 calc(9 * var(--ui-unit)) rgba(255, 202, 94, .82));
  /* why(#7+用户改稿"幅度太大"): 体力图标持续轻微来回旋转 (rotate 独立属性叠加定位 transform);
     摆幅从 ±7deg 收到默认 ±3deg, 幅度/周期 var 化 → ui-editor「体力动效」组件可调 */
  animation: cmEnergyIconRock var(--ui-energy-rock-period, 3s) ease-in-out infinite;
}
@keyframes cmEnergyIconRock {
  0%, 100% { rotate: calc(var(--ui-energy-rock-deg, 3deg) * -1); }
  50% { rotate: var(--ui-energy-rock-deg, 3deg); }
}
/* why(#7): 图标上下百分比进度 — 当前体力(下部)彩色, 损耗(上部)灰度饱和0. 叠一层灰度 icon, clip-path 只留上部损耗区, 下部透出底层彩色 icon. --energy-ratio 由 StaminaRing 推(横条 .cm-energy-meter 同源) */
.cm-energy-icon::after {
  content: ""; position: absolute; inset: 0; z-index: 1;
  background: url("assets/ui/main-v2/icon_energy_lightning.png") top center / 100% calc(100% - var(--ui-asset-bottom-safe)) no-repeat;
  filter: grayscale(1) brightness(.58) opacity(.92);
  clip-path: inset(0 0 calc(var(--energy-ratio, 1) * 100%) 0);
  transition: clip-path .35s cubic-bezier(.2, .9, .25, 1.1);
  pointer-events: none;
}
.cm-stamina-ring .content {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
}
.cm-energy-label {
  position: absolute;
  top: 44%;
  left: 0;
  right: 0;
  text-align: center;
  font-size: var(--ui-energy-label-font);
  font-weight: 800;
  line-height: var(--ui-text-line-safe);
  color: var(--ui-v2-white);
  text-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(255, 255, 255, .36), var(--ui-v2-shadow);
  transform: translate(var(--ui-energy-label-dx), var(--ui-energy-label-dy));
}
/* why(用户改稿"弹动是指数字不是字"): 弹动/呼吸/闪红全套从「体力」二字移到数字上, 「体力」标签回归静止.
   呼吸帧只动 scale+text-shadow(浅黄绿辉光), 不碰 color — is-low/is-full 的数字变色(静态规则)才不会被无限动画顶掉.
   弹幅/周期 var 化 → ui-editor「体力动效」组件可调 */
@keyframes cmEnergyNum {
  0%, 100% { scale: 1; text-shadow: 0 0 calc(6 * var(--ui-unit)) rgba(170, 255, 150, .45), var(--ui-v2-shadow); }
  50%      { scale: var(--ui-energy-num-bounce, 1.1); text-shadow: 0 0 calc(12 * var(--ui-unit)) rgba(190, 255, 140, .82), var(--ui-v2-shadow); }
}
.cm-stamina-ring .num { animation: cmEnergyNum var(--ui-energy-num-period, 2.4s) ease-in-out infinite; }
/* why(用户改稿"上下跳动的动效删掉"): v1 的数值变化 pop 弹跳(pop-up/pop-down, 回复期每秒跳一下)彻底停用 —
   pop 类还会被 JS 加, 但这里把它们的 animation 钉成与基础态相同 → 只剩 呼吸(回复)+闪红(消耗, 规则在后优先) */
.cm-stamina-ring .num.pop-down,
.cm-stamina-ring .num.pop-up { animation: cmEnergyNum var(--ui-energy-num-period, 2.4s) ease-in-out infinite; }
/* why: 满体力没有"缓慢恢复"在进行, 呼吸停 (数字回静态) */
.cm-stamina-ring.is-full .num { animation: none; }
@keyframes cmEnergyNumRed {
  0%   { scale: 1.3; color: #ff5266; text-shadow: 0 0 calc(13 * var(--ui-unit)) rgba(255, 60, 90, .95); }
  100% { scale: 1; color: #fff; text-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(255, 255, 255, .36); }
}
/* why: 放在 cmEnergyNum 规则之后 — 同特异性下后者赢, 扣体力瞬间闪红压过呼吸 */
.cm-stamina-ring.consuming .num { animation: cmEnergyNumRed .5s ease-out; }
.cm-stamina-ring .num {
  position: absolute;
  top: 56%;
  left: 0;
  right: 0;
  z-index: 2;
  text-align: center;
  font-size: var(--ui-energy-num-font);
  font-weight: 900;
  line-height: var(--ui-text-line-safe);
  letter-spacing: 0;
  color: var(--ui-v2-white);
  text-shadow: 0 0 calc(10 * var(--ui-unit)) rgba(255, 255, 255, .35), 0 0 calc(14 * var(--ui-unit)) rgba(126, 230, 255, .35);
  font-variant-numeric: tabular-nums;
  transform: translate(var(--ui-energy-num-dx), var(--ui-energy-num-dy));
}
.cm-energy-meter {
  position: absolute;
  left: 13%;
  right: 13%;
  bottom: 8.5%;
  height: 5.1%;
  border-radius: 999px;
  overflow: hidden;
}
.cm-energy-meter span {
  display: block;
  width: calc(var(--energy-ratio, 1) * 100%);
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 126, 202, .98), rgba(255, 184, 226, .86));
  box-shadow: 0 0 calc(9 * var(--ui-unit)) rgba(255, 126, 202, .82);
  transition: width .35s cubic-bezier(.2, .9, .25, 1.1);
}
.cm-stamina-ring.is-low .cm-energy-meter span {
  background: linear-gradient(90deg, rgba(255, 80, 116, .98), rgba(255, 160, 190, .9));
  box-shadow: 0 0 calc(12 * var(--ui-unit)) rgba(255, 80, 116, .9);
}
.cm-stam-refill {
  /* why(#7): 低体力红点+号从"框右上角"(right:4%, 看不到)移到体力 png 图标的右上角;
     why(用户改稿"圆形更大一点"): 27→36 放大, 更醒目 */
  top: 4%;
  right: 24%;
  width: calc(36 * var(--ui-unit));
  height: calc(36 * var(--ui-unit));
  z-index: 6;
}

/* why: 倍率卡沿用旧档位 class 的呼吸动画语义, 视觉换成拆层底板 + 独立文字. */
.cm-mult-chip.cm-status-card {
  aspect-ratio: 151 / 129; /* why: 新倍率框按用户底框透明像素裁切后为 151x129, 避免按旧宽高拉伸 */
  height: auto;
  background-image: url("assets/ui/main-v2/panel_multiplier_base.png");
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--ui-unit));
  border-radius: calc(9px * var(--ui-top-control-scale)); /* why: 以 1920×1080 的 9px 圆角为基准同比缩放，盖掉倍率底框底部若隐若现的直角。 */
  overflow: hidden; /* why: 倍率 PNG/玻璃伪元素都裁进同一圆角轮廓，不能让底部矩形透明边露出来。 */
  box-shadow: none;
  text-shadow: none;
  transition: filter .12s ease;
}
.cm-mult-chip.cm-mult-t1,
.cm-mult-chip.cm-mult-t2,
.cm-mult-chip.cm-mult-t3 {
  background-image: url("assets/ui/main-v2/panel_multiplier_base.png");
  color: var(--ui-v2-white);
}
.cm-mult-value {
  font-size: var(--ui-mult-value-font);
  font-weight: 900;
  line-height: var(--ui-mult-value-line-safe);
  letter-spacing: 0;
  color: var(--ui-v2-white);
  text-shadow: 0 0 calc(10 * var(--ui-unit)) rgba(255, 255, 255, .45); /* why(iOS玻璃): 倍率数值去掉青光层, 保留中性白微光(区别于旁边心动圈数字的保留青光) */
  transform: translate(var(--ui-mult-value-dx), var(--ui-mult-value-dy));
}
.cm-status-label {
  font-size: var(--ui-mult-label-font);
  font-weight: 700;
  line-height: var(--ui-text-line-safe);
  color: var(--ui-v2-white);
  text-shadow: var(--ui-v2-shadow);
  transform: translate(var(--ui-mult-label-dx), var(--ui-mult-label-dy));
}

/* why: 金币卡回到左栏第三块, 使用拆层金币图标和数值层; 不再应用旧右上角位移. */
.cm-left-rail .cm-coin-pill {
  position: relative;
  top: auto;
  left: auto;
  width: 100%;
  aspect-ratio: 152 / 94; /* why: 新金币框按用户底框透明像素裁切后为 152x94 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(8 * var(--ui-unit));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: url("assets/ui/main-v2/panel_coin_base.png") center/100% 100% no-repeat;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe));
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transition: filter .12s ease;
  isolation: isolate;
  overflow: visible; /* why: 金币 icon/数字缩放位移时不能被胶囊框裁下沿 */
  transform: translate(var(--ui-coin-card-dx), var(--ui-coin-card-dy)) scale(var(--ui-coin-card-scale));
  transform-origin: center;
}
.cm-left-rail .cm-coin-pill::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(12 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 金币框不是 .cm-status-card, 单独补同款可调玻璃底 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .28), 0 0 calc(18 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  z-index: -1;
  pointer-events: none;
}
.cm-left-rail .cm-coin-pill .icn {
  width: 32%;
  height: 54%;
  background: url("assets/ui/main-v2/icon_coin.png") center/contain no-repeat;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe));
  filter: drop-shadow(0 0 calc(8 * var(--ui-unit)) rgba(255, 199, 78, .62));
  transform: translate(var(--ui-coin-icon-dx), var(--ui-coin-icon-dy)) scale(var(--ui-coin-icon-scale));
  transform-origin: center;
}
.cm-left-rail .cm-coin-pill .num {
  min-width: 42%;
  font-size: var(--ui-coin-num-font);
  font-weight: 900;
  line-height: var(--ui-text-line-safe);
  letter-spacing: 0;
  color: var(--ui-v2-white);
  text-align: left;
  /* why(用户"金币周围疑似一个方框, 若因字体辉光则缩小范围强度"): 白辉光半径 10u→3u、透明度 .36→.3 —
     原 10u 辉光超出 .cm-coin-digit(overflow:hidden) 的 1em 窗口, 被上下裁成矩形亮边 = 用户看到的"方框"; 收进窗口内即消除, 数字仍有微光不发灰 */
  text-shadow: 0 0 calc(3 * var(--ui-unit)) rgba(255, 255, 255, .3);
  transform: translate(var(--ui-coin-num-dx), var(--ui-coin-num-dy));
}
/* why(任务4): 奖励弹窗金币涌入时金币框持续弹动 — RewardPopup 每枚落币派 rw-coin-hit, CoinPill 涌入期挂 .is-influx;
   keyframes 每帧都写全布局 translate/scale 变量, 否则动画会把编辑器摆位顶回原点 */
.cm-left-rail .cm-coin-pill.is-influx {
  animation: cmCoinInflux .3s ease-in-out infinite; /* why: .3s 一圈 ≈ 飞币 22~40ms 间隔的一小串, 抖得出"连续进账"节奏又不晃眼 */
}
@keyframes cmCoinInflux {
  0%, 100% { transform: translate(var(--ui-coin-card-dx), var(--ui-coin-card-dy)) scale(var(--ui-coin-card-scale)); }
  35% { transform: translate(var(--ui-coin-card-dx), calc(var(--ui-coin-card-dy) + 3px)) scale(calc(var(--ui-coin-card-scale) * 1.055)); } /* why: 下压+微涨 3px/5.5% — 像金币砸进框里的受击感 */
  70% { transform: translate(var(--ui-coin-card-dx), calc(var(--ui-coin-card-dy) - 2px)) scale(calc(var(--ui-coin-card-scale) * .985)); } /* why: 回弹过冲一点再落回, 不然只是缩放呼吸没"弹"感 */
}
/* why(任务5): 金币数字增加时缩放弹动 — CoinPill 按增加次数在 a/b 两个同款动画间交替(animation-name 变化强制重播),
   连点每一下都重弹; keyframes 带上数字自身布局 translate, 结束帧=常态值所以停在原位不跳变 */
.cm-left-rail .cm-coin-pill .num.num-pop-a { animation: cmCoinNumPopA .32s cubic-bezier(.22, .9, .32, 1.3); } /* why: .32s + 轻过冲曲线, 跟体力环 pop(350ms)同量级, 连点不拖影 */
.cm-left-rail .cm-coin-pill .num.num-pop-b { animation: cmCoinNumPopB .32s cubic-bezier(.22, .9, .32, 1.3); }
@keyframes cmCoinNumPopA {
  0%, 100% { transform: translate(var(--ui-coin-num-dx), var(--ui-coin-num-dy)) scale(1); }
  38% { transform: translate(var(--ui-coin-num-dx), var(--ui-coin-num-dy)) scale(1.22); } /* why: 1.22 — 数字明显"顶一下"又不撞框内金币 icon */
}
@keyframes cmCoinNumPopB { /* why: 与 A 完全同款 — 存在意义只是给交替重播提供第二个 animation-name */
  0%, 100% { transform: translate(var(--ui-coin-num-dx), var(--ui-coin-num-dy)) scale(1); }
  38% { transform: translate(var(--ui-coin-num-dx), var(--ui-coin-num-dy)) scale(1.22); }
}
/* why(用户改稿"逐位滚动跳字"): 金币数字改逐位 reel — 每位是等高窗口(overflow 裁), 内含 0~9 竖排 reel;
   translateY(-d em) 定位到第 d 个数字, transition 滑动经过中间数字 = 旧数字上滑出、更大数字上滚入;
   transition-delay 按位序(--dpos: 个位0/十位1/...)递增 → 个位先滚、高位延后. 逗号/小数点/单位字母(.cm-coin-sep)静止. */
.cm-coin-odometer {
  display: inline-flex;
  align-items: center;
  line-height: 1;
}
.cm-coin-digit {
  display: inline-block;
  overflow: hidden;
  height: 1em;
  line-height: 1;
  vertical-align: top;
}
.cm-coin-reel {
  display: block;
  transform: translateY(calc(var(--d, 0) * -1em));
  transition: transform .55s cubic-bezier(.3, .85, .25, 1);
  transition-delay: calc(var(--dpos, 0) * .11s);
  will-change: transform;
}
.cm-coin-reel > span {
  /* why(用户"金币数字没对齐"): 每位数字在 1em 窗口内改 flex 几何居中 —
     原 block+line-height:1 靠字体基线定位, 数字墨迹在窗口里偏下, 与逗号/单位字母(.cm-coin-sep 走自然基线)视觉不齐;
     flex 居中让数字墨迹与分隔符中心统一. 窗口仍 1em 高, reel 的 translateY(-d em) 逐位滚动定位不受影响 */
  display: flex;
  align-items: center;
  justify-content: center;
  height: 1em;
  line-height: 1;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.cm-coin-sep { display: inline-block; }

/* why: top streak reward uses the split PNG progress frame; circled reward/node icons stay disabled for now. */
.cm-charge-overlay {
  top: var(--ui-progress-y);
  left: var(--ui-progress-x);
  right: auto;
  width: var(--ui-progress-w);
  z-index: 13;
  pointer-events: none;
  overflow: visible; /* why: 顶部奖励条上移后标题/里程碑可能超出原盒, 外框不裁子层 */
  transform: scale(var(--ui-progress-scale));
  transform-origin: top left;
}
.cm-charge-panel {
  position: relative;
  min-height: calc(118 * var(--ui-unit));
  overflow: visible; /* why: 顶部奖励条文字和发光不按面板盒子硬裁 */
}
.cm-reward-title {
  position: absolute;
  top: calc(116 * var(--ui-unit)); /* why: 原 72 单位加 44 单位下移量，标题与进度条一起下移并继续留在轨道下方。 */
  left: 0; /* why: “抓取进度”恢复为进度条下方首个信息，问号按钮改排在文字之后。 */
  width: 42%; /* why: 静态四字和抓取中的动态标题都保留完整单行空间，同时不延伸到右侧设置按钮区域。 */
  text-align: left; /* why: 进度说明作为进度条下方标签，从轨道首端向右阅读。 */
  color: var(--ui-v2-white);
  font-size: var(--ui-reward-title-font);
  font-weight: 800;
  line-height: var(--ui-text-line-safe);
  letter-spacing: .02em;
  text-shadow: 0 0 calc(9 * var(--ui-unit)) rgba(255, 255, 255, .32), 0 calc(1 * var(--ui-unit)) calc(2 * var(--ui-unit)) rgba(0, 0, 0, .55);
  transform: translate(var(--ui-reward-title-dx), var(--ui-reward-title-dy));
}
.cm-charge-row {
  position: absolute;
  top: calc(78 * var(--ui-unit)); /* why: 原 34 单位加 44 单位下移量，整条抓取进度向下让出刘海下方的阶段框行，问号作为子元素同步移动。 */
  left: 0;
  right: 0;
  height: calc(42 * var(--ui-unit));
}
.cm-bar-host {
  left: 0;
  right: auto;
  width: 70.25%; /* why: 进度容器从画框 22.394% 起、总宽 74.6%；抖音胶囊左边是画框 74.8%，换算到容器内为 70.25%，因此可见进度条右端在所有同比画框中都精确抵住胶囊左端。 */
  top: 0;
  bottom: auto;
  height: calc(28 * var(--ui-unit));
  overflow: visible; /* why: 进度条外框和光晕可溢出, 只裁内部 cell 填充 */
}
.cm-bar-neon {
  position: absolute;
  inset: 0;
  padding: calc(7 * var(--ui-unit)) calc(11 * var(--ui-unit));
  border-radius: 0;
  background: url("assets/ui/main-v2/top_progress_track_base.png") top center/100% calc(100% - var(--ui-asset-bottom-safe)) no-repeat;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  overflow: visible;
  animation: cmUiV2ProgressGlow 2.4s ease-in-out infinite;
}
.cm-bar-neon::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(999 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .04)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 进度条透明框底下补可调玻璃, 避免只剩细线发空 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .22), 0 0 calc(16 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  pointer-events: none;
}
.cm-bar-neon .cells {
  height: 100%;
  gap: calc(2 * var(--ui-unit));
}
.cm-bar-neon .cell {
  border-radius: calc(3 * var(--ui-unit));
  background: rgba(255, 255, 255, .05);
  box-shadow: inset 0 0 0 calc(1 * var(--ui-unit)) rgba(255, 255, 255, .16);
}
.cm-bar-neon .cell.on {
  background: linear-gradient(180deg, rgba(151, 238, 255, .92), rgba(58, 206, 255, .68));
  box-shadow: 0 0 calc(9 * var(--ui-unit)) rgba(114, 226, 255, .82), inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .65);
}
.cm-bar-neon .cell.on:nth-child(n+10) {
  background: linear-gradient(180deg, rgba(255, 184, 222, .94), rgba(255, 117, 188, .70));
  box-shadow: 0 0 calc(9 * var(--ui-unit)) rgba(255, 137, 205, .82), inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .65);
}
.cm-bar-neon .cell::before,
.cm-bar-neon .cell.on::after {
  display: none;
}
.cm-bar-neon .lead-spark {
  top: calc(-7 * var(--ui-unit));
  bottom: calc(-7 * var(--ui-unit));
  width: calc(16 * var(--ui-unit));
  background: radial-gradient(ellipse at center, rgba(255, 255, 255, .8), rgba(126, 230, 255, 0) 66%);
}
.cm-bar-hint {
  position: absolute;
  top: calc(91 * var(--ui-unit));
  left: 12%;
  right: 17%;
  text-align: center;
  font-size: var(--ui-progress-hint-font);
  font-weight: 700;
  line-height: var(--ui-text-line-safe);
  color: rgba(245, 250, 255, .86);
  text-shadow: 0 calc(1 * var(--ui-unit)) calc(2 * var(--ui-unit)) rgba(0, 0, 0, .65), 0 0 calc(8 * var(--ui-unit)) rgba(255, 255, 255, .20);
  transform: translate(var(--ui-progress-hint-dx), var(--ui-progress-hint-dy));
}
.cm-claw-host {
  right: auto; /* why: 问号不再贴进度条右端，改为从左侧信息行起排。 */
  left: calc(142 * var(--ui-unit)); /* why: 四个汉字及字距约占 124 单位，再留 18 单位间隔后放置问号。 */
  top: calc(40 * var(--ui-unit)); /* why: 缩小后的 40 单位玻璃框与抓取进度文字中心对齐。 */
  width: calc(38 * var(--ui-unit)); /* why: 问号玻璃框从 50 单位缩到 38 单位，作为文字后的次级帮助入口。 */
  height: calc(40 * var(--ui-unit)); /* why: 按原框近方形比例同步缩高，避免只压缩一个方向。 */
  overflow: visible; /* why: 问号按钮缩放/外光不被宿主裁掉 */
  transform: translate(var(--ui-help-dx), var(--ui-help-dy)) scale(var(--ui-help-scale));
  transform-origin: center;
}
.cm-claw-btn {
  width: calc(38 * var(--ui-unit)); /* why: 内部玻璃底与缩小后的宿主同宽，热区和视觉框保持一致。 */
  height: calc(40 * var(--ui-unit)); /* why: 内部玻璃底与缩小后的宿主同高，不保留旧尺寸溢出。 */
  pointer-events: none;
  transform-origin: center;
  isolation: isolate;
  overflow: visible; /* why: 问号玻璃底和 icon 发光可溢出透明底板 */
}
.cm-charge-overlay.grabbing .cm-claw-host {
  opacity: 0; /* why: 进入抓取阶段后问号帮助入口不再属于当前流程，直接从画面消失。 */
  visibility: hidden; /* why: 隐藏后不留下可聚焦或误判为可见按钮的玻璃框。 */
  pointer-events: none; /* why: 抓取过程中不能再打开爆率弹窗打断流程。 */
}
.cm-settings-btn {
  position: absolute;
  top: calc(113 * var(--ui-unit)); /* why: 按参考胶囊底边换算后向下留约 10px 间距，设置按钮不再进入平台触控死区。 */
  right: 0; /* why: 设置按钮保留胶囊下方的垂直安全距离，但横向贴近游戏画框右侧，符合用户指定位置。 */
  width: calc(68 * var(--ui-unit)); /* why: 按用户反馈从 34 单位精确放大一倍，让手机端齿轮和黑玻璃材质更清楚。 */
  height: calc(68 * var(--ui-unit)); /* why: 与宽度同步放大一倍，保持生成 PNG 的正方形比例。 */
  padding: 0;
  border: 0;
  border-radius: calc(20 * var(--ui-unit)); /* why: 随按钮尺寸同步放大一倍，热区轮廓继续贴合 PNG 圆角。 */
  background: none;
  filter: drop-shadow(0 0 calc(7 * var(--ui-unit)) hsl(var(--ui-machine-hue) 94% 70% / var(--ui-machine-glow-alpha))); /* why: 设置框与其余主 UI 统一使用第一台娃娃机的青蓝框光，不再读取会产生粉红/红色外光的机台强调色。 */
  opacity: 1; /* why: 按钮容器保持完整点击反馈；透明度只施加在图片层，避免连热区/交互态一起变淡。 */
  pointer-events: auto;
  z-index: 3; /* why: 位于充能面板内容上方可点击，但低于全局弹窗和导航层。 */
  transition: transform 120ms ease, filter 120ms ease; /* why: 120ms 只提供即时按压反馈，不做持续动画干扰抓取。 */
}
.cm-settings-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: transparent url("assets/ui/main-v2/settings_button_black_glass.png") center/contain no-repeat;
  opacity: 1; /* why: 图片层总透明度保持完整，中心与外围差异只由下方径向 mask 控制。 */
  -webkit-mask-image: radial-gradient(circle farthest-side at center, rgba(0, 0, 0, var(--ui-tune-settings-center-alpha, .28)) 0%, rgba(0, 0, 0, var(--ui-tune-settings-edge-alpha, .92)) 100%);
  mask-image: radial-gradient(circle farthest-side at center, rgba(0, 0, 0, var(--ui-tune-settings-center-alpha, .28)) 0%, rgba(0, 0, 0, var(--ui-tune-settings-edge-alpha, .92)) 100%); /* why: 用户用实机调色器定稿中心 28%→外围 92% 的线性透明度；变量仍允许继续微调。 */
  pointer-events: none;
}
.cm-settings-btn:active {
  transform: scale(.92); /* why: 8% 内缩能在手机触摸时明确反馈，同时不产生明显位移。 */
  filter: brightness(1.1) drop-shadow(0 0 calc(10 * var(--ui-unit)) hsl(var(--ui-machine-hue) 94% 70% / .46)); /* why: 按下只增强同一青蓝框光，不再短暂恢复粉红/红色主题光。 */
}
.cm-ad-popup.cm-holo.cm-settings-modal {
  --ui-unit: calc(.6456px * var(--ui-top-control-scale)); /* why: 设置弹窗挂在游戏画框外，需要显式复用画框的 941px 原图缩放单位，控件尺寸才不会因变量缺失归零。 */
  box-sizing: border-box;
  min-width: 0; /* why: 长语言名不能把弹窗内容撑出手机视口。 */
  width: min(calc(430 * var(--ui-unit)), 92%); /* why: 沿用现有设置内容密度，同时在窄屏保留两侧呼吸区。 */
  max-width: calc(100% - calc(28 * var(--ui-unit))); /* why: 窄屏左右各至少保留 14 设计单位。 */
  max-height: calc(100% - calc(32 * var(--ui-unit))); /* why: 上下保留 16 设计单位并允许内容内部滚动。 */
  overflow: visible; /* why: 公共轻玻璃的棱镜描边需要越过容器边缘，外层裁切会生成滚动条。 */
  padding: calc(18 * var(--ui-unit)) calc(20 * var(--ui-unit)); /* why: 与体力和礼包弹窗保持相同的紧凑内容留白。 */
}
.cm-settings-body {
  display: grid;
  gap: calc(10 * var(--ui-unit)); /* why: 10 单位间隔让五项设置形成紧凑但可区分的列表。 */
  padding: calc(8 * var(--ui-unit)) 0 calc(4 * var(--ui-unit)); /* why: 外层公共玻璃已经提供 20 单位留白，这里只补标题与列表间距。 */
  max-height: calc(100dvh - calc(96 * var(--ui-unit))); /* why: 极矮横屏时由内容区承担滚动，外层公共棱镜仍保持完整。 */
  overflow-x: hidden;
  overflow-y: auto;
}
.cm-settings-row,
.cm-settings-volume,
.cm-settings-language {
  min-height: calc(58 * var(--ui-unit)); /* why: 每项至少 58 单位，保证手机触摸和英文换行余量。 */
  border: calc(1 * var(--ui-unit)) solid rgba(255, 255, 255, .16); /* why: 中性白细边与体力、礼包弹窗的内容卡片一致。 */
  border-radius: calc(16 * var(--ui-unit)); /* why: 16 单位圆角与内部小控件比例协调。 */
  background: linear-gradient(160deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .03)); /* why: 浅白透明层复用礼包条目的轻玻璃层级，不再形成独立黑色皮肤。 */
}
.cm-settings-row {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 calc(16 * var(--ui-unit)); /* why: 左右 16 单位为文字和拨动开关留出边距。 */
  font-size: calc(18 * var(--ui-unit)); /* why: 18 单位兼顾中文与较长英文标签。 */
}
.cm-settings-toggle-input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.cm-settings-toggle {
  position: relative;
  width: calc(54 * var(--ui-unit)); /* why: 54×30 单位形成易识别的手机拨动比例。 */
  height: calc(30 * var(--ui-unit)); /* why: 30 单位高度确保圆点清晰又不压行高。 */
  flex: 0 0 auto;
  border: calc(1 * var(--ui-unit)) solid rgba(218, 232, 255, .48); /* why: 关闭状态仍保留银色玻璃轮廓。 */
  border-radius: calc(18 * var(--ui-unit)); /* why: 大于半高，确保胶囊端部稳定为圆形。 */
  background: rgba(46, 55, 70, .78); /* why: 关闭态使用中性深灰，不误传主题色。 */
  transition: background 140ms ease, box-shadow 140ms ease; /* why: 140ms 足够感知切换，不拖慢连续操作。 */
}
.cm-settings-toggle::after {
  content: "";
  position: absolute;
  top: calc(3 * var(--ui-unit)); /* why: 上下各 3 单位让圆点不贴边。 */
  left: calc(3 * var(--ui-unit)); /* why: 关闭态圆点与胶囊左缘保持 3 单位。 */
  width: calc(22 * var(--ui-unit)); /* why: 22 单位圆点在 30 单位轨道内留出清晰边界。 */
  height: calc(22 * var(--ui-unit)); /* why: 宽高一致，确保正圆。 */
  border-radius: 50%; /* why: 拨动圆点必须保持正圆。 */
  background: #dce6f5; /* why: 银白圆点与面板金属描边一致。 */
  box-shadow: 0 0 calc(5 * var(--ui-unit)) rgba(255, 255, 255, .46); /* why: 轻白光保留玻璃按钮质感。 */
  transition: transform 140ms ease, background 140ms ease; /* why: 与轨道同步的 140ms 动画形成一次完整拨动。 */
}
.cm-settings-toggle-input:checked + .cm-settings-toggle {
  background: color-mix(in srgb, var(--cm-settings-accent) 55%, rgba(12, 20, 31, .92)); /* why: 主题色只占 55%，保持黑玻璃底而不是整块纯色。 */
  box-shadow: 0 0 calc(10 * var(--ui-unit)) color-mix(in srgb, var(--cm-settings-accent) 72%, transparent); /* why: 开启态用 10 单位外光明确反馈。 */
}
.cm-settings-toggle-input:checked + .cm-settings-toggle::after {
  transform: translateX(calc(24 * var(--ui-unit))); /* why: 54 宽减去圆点 22 和两侧各 4 单位，位移 24 单位恰好到右端。 */
  background: #ffffff; /* why: 开启态用纯白圆点提升对比。 */
}
.cm-settings-volume,
.cm-settings-language {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: calc(8 * var(--ui-unit)); /* why: 标签、数值和控件之间保留 8 单位。 */
  padding: calc(11 * var(--ui-unit)) calc(16 * var(--ui-unit)); /* why: 纵向 11 单位容纳滑杆，横向与开关行对齐。 */
  font-size: calc(18 * var(--ui-unit)); /* why: 与开关行标签字号一致。 */
}
.cm-settings-volume input {
  grid-column: 1 / -1;
  width: 100%;
  accent-color: var(--cm-settings-accent);
}
.cm-settings-volume output {
  color: #dce9ff; /* why: 百分比使用稍冷的次级文字，不抢主标签。 */
  font-variant-numeric: tabular-nums;
}
.cm-settings-language select {
  max-width: calc(240 * var(--ui-unit)); /* why: 240 单位足以显示最长的印尼语名称，同时给左侧标签留空间。 */
  padding: calc(8 * var(--ui-unit)) calc(10 * var(--ui-unit)); /* why: 8×10 单位让原生选择框在手机上可点。 */
  border: calc(1 * var(--ui-unit)) solid rgba(220, 234, 255, .42); /* why: 银色细边与其它控件统一。 */
  border-radius: calc(10 * var(--ui-unit)); /* why: 10 单位小圆角弱化原生选择框直角。 */
  color: #f4f7ff; /* why: 深色选框使用冷白文字。 */
  background: #111a28; /* why: 使用不透明深蓝保证系统下拉箭头和文字对比。 */
  font-size: calc(15 * var(--ui-unit)); /* why: 15 单位容纳较长语言名且仍可读。 */
}
.cm-settings-notice {
  margin: calc(8 * var(--ui-unit)) 0 0; /* why: 对齐公共容器的内容宽度，避免再次叠加左右缩进。 */
  padding: calc(9 * var(--ui-unit)) calc(12 * var(--ui-unit)); /* why: 提示条紧凑呈现，不另起大型弹窗。 */
  border-radius: calc(12 * var(--ui-unit)); /* why: 小提示使用 12 单位圆角。 */
  color: #fff3c7; /* why: 暖白提示与主题操作色区分，但不使用错误红。 */
  background: rgba(86, 67, 18, .58); /* why: 琥珀深底表达“准备中”而非故障。 */
  text-align: center;
  font-size: calc(14 * var(--ui-unit)); /* why: 14 单位作为弹窗内次级状态信息。 */
}
.cm-claw-btn::before {
  width: calc(38 * var(--ui-unit)); /* why: PNG 玻璃底跟随问号宿主缩小，避免伪元素仍撑回旧尺寸。 */
  height: calc(40 * var(--ui-unit)); /* why: PNG 玻璃底保持与问号按钮新高度一致。 */
  border-radius: 0;
  background: url("assets/ui/main-v2/help_button_base.png") top center/100% calc(100% - var(--ui-asset-bottom-safe)) no-repeat;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  opacity: 1;
}
.cm-claw-btn::after {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(999 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .04)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 问号按钮透明框底下补可调玻璃底 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .28), 0 0 calc(16 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  z-index: -1;
  pointer-events: none;
}
.cm-claw-btn.tap-flash::after { animation: none; }
.cm-claw-btn > .cm-help-mark {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  color: transparent;
  background: url("assets/ui/main-v2/icon_help_question.png") center/40% calc(52% - var(--ui-asset-bottom-safe)) no-repeat;
  filter: drop-shadow(0 0 calc(8 * var(--ui-unit)) rgba(126, 230, 255, .65));
  transform: scale(var(--ui-help-icon-scale)); /* why(爆率入口问号歪斜): 保留既定图标大小，但取消编辑器遗留的右下位移，让图标层中心与圆框中心严格同点。 */
  transform-origin: center;
}
.cm-frame.is-swiping .cm-help-mark {
  opacity: var(--cm-swipe-fade, 1);
}
.cm-frame.is-swipe-settling .cm-help-mark {
  opacity: var(--cm-swipe-fade, 1);
  transition: opacity 280ms cubic-bezier(.2,.7,.2,1); /* why: 对齐原 HUD 滑动回弹时长, 问号层跟底板一起淡回 */
}
/* why: 左侧浮动卡片迁移成拆层竖卡. 礼包计时条暂映射为现有广告进度, 限时框计时条映射旧 20s 生命周期. */
.cm-gift-btn,
.cm-trigger-box {
  left: var(--ui-gift-x);
  right: auto;
  width: var(--ui-gift-w);
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 0;
  border: 0;
  border-radius: 0;
  color: var(--ui-v2-white);
  background-color: transparent;
  background-position: top center;
  background-size: 100% calc(100% - var(--ui-asset-bottom-safe));
  background-repeat: no-repeat;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  transform-origin: bottom center;
  isolation: isolate;
  overflow: visible; /* why: 礼包/限时卡 icon、标题、计时胶囊会单独位移缩放, 外框不能吞下沿 */
}
.cm-gift-btn::before,
.cm-trigger-box::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(14 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 侧边礼包/限时框底下补可调玻璃底 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow:
    inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .30),
    inset 0 calc(-12 * var(--ui-unit)) calc(18 * var(--ui-unit)) rgba(0, 0, 0, .16),
    0 0 calc(20 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  z-index: -1;
  pointer-events: none;
}
/* why(用户改稿"左列垂直自动布局"): 礼包卡的 y/x 改由槽位算 — top = 起点 + 槽位(行)*步进; left = 左列 + 列*右列偏移.
   槽位由 app.jsx 按三卡显隐分配(--stack-gift-slot/-col); top/left 过渡 → 某卡消失时本卡平滑上移填补. */
.cm-gift-btn {
  top: var(--stack-gift-y, calc(var(--stack-top) + var(--stack-gift-slot, 0) * var(--stack-step)));
  left: calc(var(--stack-left) + var(--stack-gift-col, 0) * var(--stack-col2-dx));
  width: var(--ui-gift-w);
  transition: left .38s cubic-bezier(.3, .9, .35, 1.1); /* ★top 过渡去掉: 累加(--stack-y)瞬间到位, 免过渡中被 RO 反复触发导致位置飘/测不准 */
  /* ★why(用户"底框不够长, 倒计时框/描述落到外面了"): 撤掉 aspect-ratio —— 它把框高钉死成 154:216(≈118px),
     可内容(icon+标题+描述+倒计时+进度条)有 143px, 装不下, 倒计时和进度条溢出框底.
     icon 改用自己的 aspect-ratio 撑高度后(见 .cm-gift-card-icon), 框就能【高度随内容自然变长】, 装得下全部内容, 也不裁.
     框与框间距一致由 app.jsx 按各卡实际 offsetHeight 累加(见那段 useEffect); 任务卡内容多自然更长(不用再单独设比例). */
  background-image: url("assets/ui/main-v2/panel_gift_base.png");
  background-size: 100% 100%; /* 框高随内容变 → PNG 铺满框, 跟着长 */
  animation: cmCardEnter .4s cubic-bezier(.2, .7, .2, 1) both, cmUiV2CardFloat 2.4s ease-in-out .4s infinite; /* why(用户"出现和任务一样"): 出现从底淡入(同任务条 cmTaskEnter) + 常驻浮动延后到出现完成再起 */
}
.cm-trigger-box {
  top: var(--stack-trigger-y, calc(var(--stack-top) + var(--stack-trigger-slot, 1) * var(--stack-step)));
  left: calc(var(--stack-left) + var(--stack-trigger-col, 0) * var(--stack-col2-dx));
  width: var(--ui-trigger-w);
  transition: left .38s cubic-bezier(.3, .9, .35, 1.1); /* ★top 过渡去掉: 累加(--stack-y)瞬间到位, 免过渡中被 RO 反复触发导致位置飘/测不准 */
  /* 同礼包框: 撤 aspect-ratio, 框高随内容(容纳 icon+标题+描述+倒计时+进度条, 够长不溢出). icon 自带 aspect 撑高. 见 .cm-gift-btn 的 why */
  background-image: url("assets/ui/main-v2/panel_streak_base.png");
  background-size: 100% 100%;
  z-index: 35;
  cursor: pointer;
  animation: cmCardEnter .4s cubic-bezier(.2, .7, .2, 1); /* why(用户"出现突兀→和任务一样"): 原 cmUiV2BoxIn 是从左弹入, 改成从底淡入(同任务条 cmTaskEnter) */
}
.cm-gift-card-icon,
.cm-trigger-card-icon {
  display: block;
  flex: none;
  box-sizing: border-box;
  padding: 4% 3% 0; /* why: 礼包与限时图标摇摆时顶部像素会贴住自身绘制盒；保留顶部和两侧透明安全区，完整显示蝴蝶结/闹钟铃铛。 */
  background-origin: content-box;
  background-clip: content-box;
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
  pointer-events: none;
}
.cm-gift-card-icon {
  width: 78%;
  aspect-ratio: 15 / 14; /* ★why(打破 icon↔框高 循环): 原 height:52% 是相对框高的, 框高又靠 aspect-ratio → 撤框 aspect 就俩一起塌.
     改用 aspect-ratio 让 icon 高度跟【自己的宽度】走(≈原显示比例 1.07), 从此 icon 有独立高度, 框才能撤 aspect、高度随内容变长. */
  margin-top: 3%;
  background-image: url("assets/ui/main-v2/icon_gift_box.png?v=20260715gift2"); /* why(用户"换 codex 新礼包图"): 换成粉盒+金蝴蝶结新图, 同名覆盖故加 ?v 强制刷新缓存 */
  filter: drop-shadow(0 0 calc(9 * var(--ui-unit)) rgba(255, 203, 84, .45));
  transform: translate(var(--ui-gift-icon-dx), var(--ui-gift-icon-dy)) scale(var(--ui-gift-icon-scale));
  transform-origin: center;
}
/* why(任务5): 礼包 png 摇晃+弹跳+弹动 — transform 已被定位占用, 改用独立 rotate/translate/scale longhand(它们先于 transform 复合, 不冲突); 平时静止, 每 2.6s 抖一阵勾注意力 */
.cm-gift-card-icon { animation: cmGiftJiggle 2.6s ease-in-out infinite; }
@keyframes cmGiftJiggle {
  0%, 58%, 100% { rotate: 0deg; translate: 0 0; scale: 1; }
  63% { rotate: -10deg; translate: 0 -3px; scale: 1.07; }
  69% { rotate: 8deg; translate: 0 1px; scale: .96; }
  75% { rotate: -6deg; translate: 0 -2px; scale: 1.04; }
  81% { rotate: 4deg; scale: 1; }
  88% { rotate: -1.5deg; }
}
.cm-trigger-card-icon {
  width: 80%;
  aspect-ratio: 121 / 110; /* 同 gift icon: 高度跟自己宽度(用 PNG 原始 121×110 比例, 不拉伸), 脱离框高. 见 .cm-gift-card-icon 的 why */
  margin-top: 3%;
  background-image: url("assets/ui/main-v2/icon_streak_badge.png?v=bluealarm"); /* why: 图换成 codex 蓝面金身闹钟(尺寸同旧图 121×110, 无需改框); URL 带版本号强制刷掉缓存的旧紫面闹钟 */
  filter: drop-shadow(0 0 calc(10 * var(--ui-unit)) rgba(255, 189, 92, .50));
  transform: translate(var(--ui-trigger-icon-dx), var(--ui-trigger-icon-dy)) scale(var(--ui-trigger-icon-scale));
  transform-origin: center;
}
.cm-side-card-title {
  display: block;
  width: 100%;
  margin-top: -2%;
  text-align: center;
  font-size: calc(17 * var(--ui-unit));
  font-weight: 800;
  line-height: var(--ui-text-line-safe);
  letter-spacing: .02em;
  text-shadow: 0 0 calc(9 * var(--ui-unit)) rgba(255, 255, 255, .35), var(--ui-v2-shadow);
  pointer-events: none;
}
.cm-gift-btn .cm-side-card-title {
  font-size: var(--ui-gift-title-font);
  transform: translate(var(--ui-gift-title-dx), var(--ui-gift-title-dy));
}
.cm-trigger-box .cm-side-card-title {
  font-size: var(--ui-trigger-title-font);
  transform: translate(var(--ui-trigger-title-dx), var(--ui-trigger-title-dy));
}
/* why(#9): 礼包/限时共用的计时胶囊 — 改成 CSS 玻璃药丸(弃 PNG 底框). 框在内容之下(元素自身背景), 内容(小钟+文字)flex 居中在药丸内;
   overflow:visible + 内容偏移归零 → 不再把文字顶出药丸被裁(之前 timer-dy=-15 顶出+overflow:hidden 裁掉导致"看不到字"). 贴底、居中、宽度合适。 */
.cm-side-timer {
  position: relative;
  /* why(用户改稿"胶囊必须垫在倒计时和icon底下"): z:2 高于卡片 PNG 框 ::after(z:1) — 整组(药丸底+小钟+文字)不被 PNG 压住;
     同时形成 stacking context, 药丸底走 ::before(z:-1) → 永远垫在小钟/文字之下、又不会漏到卡片背后 */
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--ui-unit));
  width: 88%;
  margin: 9% auto 8%; /* why: 底距 6%→8%(按宽算) — 给胶囊下方的剩余时间进度条腾出一条不重叠的缝 */
  padding: calc(4 * var(--ui-unit)) calc(10 * var(--ui-unit));
  align-self: center;
  font-size: calc(15 * var(--ui-unit));
  font-weight: 800;
  line-height: var(--ui-text-line-safe);
  font-variant-numeric: tabular-nums;
  pointer-events: none;
  overflow: visible;
  border-radius: 999px;
}
/* why(用户改稿): 药丸底从元素自身 background 挪到显式垫底层 ::before(z:-1) — 结构上就是"垫在内容底下"的独立一层 */
.cm-side-timer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
}
.cm-gift-progress {
  color: #9cecff; /* 用户: 礼包0/2改回蓝色 */
  text-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(126, 230, 255, .66); /* 用户: 改回青蓝辉光 */
}
.cm-gift-progress::before {
  /* why(iOS玻璃): 暗玻璃药丸底(18,40,55/10,22,32 非荧光值)保留深底(与粉款 .cm-trigger-timer::before 成深底对照); 只去青边/青光 */
  background: linear-gradient(180deg, rgba(18, 40, 55, .52), rgba(10, 22, 32, .64));
  border: 1px solid rgba(255, 255, 255, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2);
}
.cm-trigger-timer {
  color: #ffb6db;
  text-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(255, 126, 202, .62);
}
.cm-trigger-timer::before {
  /* why(#9): 限时胶囊 — 粉色玻璃药丸垫底层 */
  background: linear-gradient(180deg, rgba(60, 22, 42, .52), rgba(30, 12, 22, .64));
  border: 1px solid rgba(255, 150, 200, .42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .2), 0 0 calc(8 * var(--ui-unit)) rgba(255, 126, 202, .3);
}
.cm-mini-clock {
  display: block;
  flex: none; /* why: 小钟是独立 icon 层, 不参与计时文字挤压导致宽高折成 0 */
  width: 21%;
  aspect-ratio: 23 / 22; /* ★why(修"礼包/连点小钟不见了"): 原 height:52% 是相对父级 .cm-side-timer 高度的百分比,
     框改成"内容自适应高"后 .cm-side-timer 也成了 auto 高 → 百分比高度对 auto 父级解析成 0 → 小钟高塌成 0 = 不见.
     同大图标的破法: 用自身宽度的 aspect(png 23×22 近正圆)出高, 脱离父级高度链, 框再怎么随内容变都不塌. */
  /* why(用户"小钟被拉伸了, 要保持圆形"): background-size:contain 按自身比例在框内居中, 只圆不拉伸 */
  background-position: center;
  background-size: contain;
  background-repeat: no-repeat;
}
.cm-mini-clock-cyan { background-image: url("assets/ui/main-v2/icon_gift_timer_clock.png"); }
.cm-mini-clock-pink { background-image: url("assets/ui/main-v2/icon_streak_timer_clock.png"); }
/* why(#8): 限时卡闹钟 png 间歇式抖动旋转 + 大小弹性 — 每 2.8s 静止约 2/3, 后段抖一阵.
   用独立 rotate/scale 属性(不占 transform), 与 .cm-trigger-timer .cm-mini-clock 的 translate/scale 定位叠加不冲突 */
@keyframes cmTriggerClockJiggle {
  0%, 66%, 100% { rotate: 0deg; scale: 1; }
  71% { rotate: -15deg; scale: 1.2; }
  77% { rotate: 12deg; scale: 1.1; }
  83% { rotate: -9deg; scale: 1.14; }
  89% { rotate: 6deg; scale: 1.05; }
  95% { rotate: -2deg; scale: 1.01; }
}
.cm-mini-clock-pink { animation: cmTriggerClockJiggle 2.8s ease-in-out infinite; }
/* ★why(用户"限时连点的图标运动又出问题了 / 底下那个小图标还在动"): 动效要在【上面的大闹钟】上, 不在底下的小时钟 ——
   这条规矩上一轮已在限时任务卡上落实(见 任务/timed-quest.css 的 .tq-card-v2-icon), 但【限时连点触发框】漏了:
   当时我把它当成"故意保留 jiggle"没动, 其实用户要的是两处一致. 现在照任务卡同一套做法补上:
     ① 触发框的大图标 .cm-trigger-card-icon(95×85, icon_streak_badge.png) 接手 sway;
     ② 触发框里的小时钟显式关掉 —— 上面那条全局 .cm-mini-clock-pink 规则给所有粉钟打了 jiggle 底,
        不显式关就会继续抖(这正是"底下那个还在动"的来源).
   why(复用 cmQuestClockSway 而不是另写): 两处是同一个动作、同一个语义, 另写一套迟早走样;
     它定义在 任务/timed-quest.css 里, 而该文件在 index.html 中与 styles.css 一同加载, 全局可见. */
.cm-trigger-card-icon { animation: cmQuestClockSway 1.7s ease-in-out infinite; }
.cm-trigger-box .cm-mini-clock { animation: none; }
.cm-gift-progress-text,
.cm-trigger-timer-text {
  display: block;
  line-height: var(--ui-text-line-safe);
  font-variant-numeric: tabular-nums;
}
.cm-gift-progress-text {
  font-size: var(--ui-gift-timer-font);
  transform: translate(var(--ui-gift-timer-dx), var(--ui-gift-timer-dy));
}
.cm-trigger-timer-text {
  font-size: var(--ui-trigger-timer-font);
  transform: translate(var(--ui-trigger-timer-dx), var(--ui-trigger-timer-dy));
}
.cm-gift-progress .cm-mini-clock {
  transform: translate(var(--ui-gift-clock-dx), var(--ui-gift-clock-dy)) scale(var(--ui-gift-clock-scale));
  transform-origin: center;
  background-size: contain; /* why(用户 2026-07-02 editor 导出): 小钟裁切=适应, 配 clock-scale 3 */
}
.cm-trigger-timer .cm-mini-clock {
  transform: translate(var(--ui-trigger-clock-dx), var(--ui-trigger-clock-dy)) scale(var(--ui-trigger-clock-scale));
  transform-origin: center;
  background-size: contain; /* why(用户 2026-07-02 editor 导出): 同上 */
}
/* why(用户改稿"左列要竖直不重叠"): App 触发框(限时连点/临时接入/爆率)与 限时任务卡(tq-card)
   共用同一锚位 var(--ui-trigger-y, 45.4%) — 双活时整卡重叠(用户截图实锤: 00:12 卡叠在 59:41 卡上).
   触发框在场时把任务卡顺移到其下方; 让位位置 var 化(编辑器「左列排布」), 出现/消失带过渡不瞬移 */
/* why(用户改稿"左列垂直自动布局"): 限时任务卡也走槽位定位(取代旧 :has 让位). 槽位由 app.jsx 按显隐分配(--stack-tq-slot/-col):
   无连点框时 tq 在礼包下一格; 有连点框时再下一格; 连点框消失自动上移填补. 满列转右列. */
.tq-card.cm-trigger-box {
  top: var(--stack-tq-y, calc(var(--stack-top) + var(--stack-tq-slot, 2) * var(--stack-step))); /* 累加定位(app.jsx), 兜底旧步进. 见 .cm-gift-btn 的 why */
  left: calc(var(--stack-left) + var(--stack-tq-col, 0) * var(--stack-col2-dx));
  transition: left .38s cubic-bezier(.3, .9, .35, 1.1); /* ★top 过渡去掉: 累加(--stack-y)瞬间到位, 免过渡中被 RO 反复触发导致位置飘/测不准 */
  /* why(用户"限时任务可比礼包长一点"): 不用固定比例 —— 撤 aspect 后框高随内容, 任务卡内容最多(标题+描述+倒计时+进度条),
     自然就比礼包长, 且长多少刚好等于内容需要. 累加读它的 offsetHeight, 下方卡间距照样对. */
}

.cm-trigger-meter {
  /* why(用户改稿): 之前钦定隐藏, 现在要回来 — "胶囊下面放个进度条代表剩余时间".
     数据管道现成: app.jsx 每秒推 remainPct → span 宽度 (20s 生命周期线性缩短).
     位置钉在胶囊(margin-bottom 6%卡宽≈4.3%卡高)下方的缝里; 几何 var 化 → ui-editor「限时进度条」可调 */
  display: block;
  position: absolute;
  left: var(--ui-timerbar-inset, 18%);
  right: var(--ui-timerbar-inset, 18%);
  bottom: var(--ui-timerbar-bottom, 1.2%);
  height: var(--ui-timerbar-h, 3.2%); /* why: 2.6% 实测≈2px 肉眼难辨, 3.2%≈7设计px 才立得住 */
  z-index: 2; /* why: 同胶囊 — 高于卡片 PNG ::after(z:1), 否则被框图压住 */
  border-radius: calc(999 * var(--ui-unit));
  overflow: hidden;
  pointer-events: none;
  /* why: 轨道给淡粉底, 剩余(彩条)缩短后能看出"总长 vs 剩余" */
  background: rgba(255, 126, 202, .22);
}
.cm-trigger-meter span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255, 126, 202, .98), rgba(255, 189, 228, .92));
  box-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(255, 126, 202, .78);
  transition: width 1s linear;
}

/* why: 底部导航直接套拆层底板; 文字仍由 React 按 tab 输出, icon 用伪元素独立层. */
.cm-tabbar {
  left: var(--ui-nav-x);
  right: auto;
  top: var(--ui-nav-y);
  bottom: auto;
  width: var(--ui-nav-w);
  height: auto;
  aspect-ratio: 894 / 155; /* why: 新底栏由用户底框裁出为 894x155, 保持边缘高光不被纵向拉伸 */
  z-index: 15;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: stretch;
  padding: 0 2.5%;
  border: 0;
  background: url("assets/ui/main-v2/bottom_nav_base.png?v=20260701") top center/100% calc(100% - var(--ui-asset-bottom-safe)) no-repeat;
  box-shadow: none;
  transform: scale(var(--ui-nav-scale));
  transform-origin: bottom left;
  isolation: isolate;
  overflow: visible; /* why: 底部导航 icon/文字发光和选中下划线不能被底框裁掉 */
}
.cm-tabbar::before {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  border-radius: calc(18 * var(--ui-unit));
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha)); /* why: 底部导航 PNG 底下补可调玻璃底 */
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .30), 0 0 calc(20 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
  z-index: -1;
  pointer-events: none;
}
.cm-tab {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--ui-unit));
  padding: 0 0 3%;
  color: rgba(245, 250, 255, .86);
  font-size: var(--ui-nav-text-font);
  font-weight: 500;
  line-height: var(--ui-text-line-safe);
  letter-spacing: 0;
  text-shadow: 0 0 calc(8 * var(--ui-unit)) rgba(255, 255, 255, .22);
  overflow: visible; /* why: tab 文字和 icon 都是独立层, 发光/下沿不应被按钮盒裁掉 */
}
.cm-tab-icon {
  display: block;
  width: 31%;
  aspect-ratio: 1 / 1;
  background-position: top center;
  background-size: contain;
  background-repeat: no-repeat;
  filter: drop-shadow(0 0 calc(7 * var(--ui-unit)) rgba(255, 255, 255, .22));
}
.cm-tab-label {
  display: block;
  line-height: var(--ui-text-line-safe);
  transform: translate(var(--ui-nav-text-dx), var(--ui-nav-text-dy));
}
.cm-tab-claw .cm-tab-icon {
  aspect-ratio: 174 / 188; /* why: 用户替换的新娃娃机导航 icon 原图尺寸为 174x188, 保持比例避免拉伸 */
  background-image: url("assets/ui/main-v2/icon_nav_claw.png");
  transform: translate(var(--ui-nav-claw-icon-dx), var(--ui-nav-claw-icon-dy)) scale(var(--ui-nav-claw-icon-scale));
}
.cm-tab-overview .cm-tab-icon {
  aspect-ratio: 188 / 177; /* why: 用户替换的新总览导航 icon 原图尺寸为 188x177, 保持比例避免拉伸 */
  background-image: url("assets/ui/main-v2/icon_nav_overview.png");
  transform: translate(var(--ui-nav-overview-icon-dx), var(--ui-nav-overview-icon-dy)) scale(var(--ui-nav-overview-icon-scale));
}
.cm-tab-upgrade .cm-tab-icon {
  aspect-ratio: 154 / 197; /* why: 用户替换的新升级导航 icon 原图尺寸为 154x197, 保持比例避免拉伸 */
  background-image: url("assets/ui/main-v2/icon_nav_upgrade.png");
  transform: translate(var(--ui-nav-upgrade-icon-dx), var(--ui-nav-upgrade-icon-dy)) scale(var(--ui-nav-upgrade-icon-scale));
}
.cm-tab-home .cm-tab-icon {
  aspect-ratio: 197 / 188; /* why: 用户替换的新家园导航 icon 原图尺寸为 197x188, 保持比例避免拉伸 */
  background-image: url("assets/ui/main-v2/icon_nav_home.png");
  transform: translate(var(--ui-nav-home-icon-dx), var(--ui-nav-home-icon-dy)) scale(var(--ui-nav-home-icon-scale));
}
/* why(任务1): 底部导航去掉图标, 只保留文字 + 选中条 (用户钦定). icon 层仅隐藏不删 DOM, 便于日后恢复/编辑器引用 */
.cm-tab .cm-tab-icon { display: none; }
/* why(任务1): icon 去掉后, 文字在 tab 内整体垂直居中即可 (原 3% 下内边距是给 icon 上、字下的布局留的) */
.cm-tab { padding-bottom: 0; }
.cm-tab.active {
  color: #ffd8ec;
  font-weight: 800;
  text-shadow: 0 0 calc(10 * var(--ui-unit)) rgba(255, 126, 202, .72);
}
.cm-tab.active .cm-tab-icon {
  filter: drop-shadow(0 0 calc(10 * var(--ui-unit)) rgba(255, 126, 202, .78));
}
/* why(#2): 改用共享一根选中条(.cm-nav-underline)在页签间弹性滑动, 原 per-tab ::after 选中条隐藏 */
.cm-tab.active::after { display: none !important; }
/* 共享选中条 — 位置=选中页签中心(--nav-idx 0..3, 计入底栏 0 2.5% 内边距 → 每格 23.75%, 首格中心 14.375%);
   why(用户改稿"不要简单平移"): 弃 left平移+固定width, 改 left/right 双边定位 — 两条边各走各的过渡曲线,
   领先端先"慢起步→快冲→过冲回收"拉长条身, 尾端延迟一拍再弹跟收短 → 条长度在切换过程中真实变化.
   方向敏感: 向右切(fwd)领先端=right 边, 向左切(back)镜像, 由 app.jsx 的 data-nav-dir 驱动.
   参数(时长/延迟/过冲/条宽)全部 var 化 → ui-editor「导航动画」组件可调. */
/* why: 用 .cm-tabbar .cm-nav-underline (特异性 0,0,2,0) 压过 .cm-tabbar > * { position: relative }(0,0,1,0),
   否则 underline 被当成网格项占一列, 把"家园"挤到第二行 */
.cm-tabbar .cm-nav-underline {
  position: absolute;
  bottom: 6%;
  left: calc(2.5% + (var(--nav-idx, 0) + 0.5) * 23.75% - var(--ui-nav-underline-w, 14%) / 2);
  right: calc(97.5% - (var(--nav-idx, 0) + 0.5) * 23.75% - var(--ui-nav-underline-w, 14%) / 2);
  width: auto;
  height: 8%;
  border-radius: calc(999 * var(--ui-unit));
  background: url("assets/ui/main-v2/underline_nav_claw.png") center/100% 100% no-repeat;
  box-shadow: 0 0 calc(12 * var(--ui-unit)) rgba(255, 126, 202, .72);
  pointer-events: none;
  z-index: 3;
  /* fwd(向右切): right=领先端 x1=.7 慢起步→急加速, y2 过冲到 --ui-nav-overshoot 再收;
     left=尾端 延迟 --ui-nav-trail-delay 后软弹簧跟上 */
  transition:
    right var(--ui-nav-lead-ms, 320ms) cubic-bezier(.7, -0.1, .16, var(--ui-nav-overshoot, 1.6)),
    left var(--ui-nav-trail-ms, 380ms) cubic-bezier(.25, .85, .3, 1.12) var(--ui-nav-trail-delay, 130ms);
}
/* why: 向左切换镜像 — 领先端换成 left 边, 尾端换成 right 边 (曲线/时长同一套 var) */
.cm-tabbar[data-nav-dir="back"] .cm-nav-underline {
  transition:
    left var(--ui-nav-lead-ms, 320ms) cubic-bezier(.7, -0.1, .16, var(--ui-nav-overshoot, 1.6)),
    right var(--ui-nav-trail-ms, 380ms) cubic-bezier(.25, .85, .3, 1.12) var(--ui-nav-trail-delay, 130ms);
}
@keyframes cmTabTextPop {
  0% { scale: 1; }
  38% { scale: 1.32; }
  68% { scale: .96; }
  100% { scale: 1; }
}
/* why(#2): 切到某页签时该页签文字 q 弹放大一下 (scale 独立属性, 与 .cm-tab-label 的 translate 定位叠加不冲突) */
.cm-tab.active .cm-tab-label { animation: cmTabTextPop .46s cubic-bezier(.34, 1.56, .55, 1); }

/* why(用户钦定"无圆角纯长条方块"): 底框 PNG 已换成纯矩形长条, 这里把导航的玻璃底/框层圆角一并清零 */
.cm-tabbar,
.cm-tabbar::before,
.cm-tabbar::after {
  border-radius: 0 !important;
}
/* why(用户导出布局): 底栏固定高度 5.576%(编辑器自由拖高, 覆盖 aspect-ratio) + fit=fill(cover) */
.cm-tabbar { height: 5.576% !important; aspect-ratio: auto !important; }
.cm-tabbar::after { background-size: cover !important; }
/* why(用户导出布局): 金币框 fit=stretch(100% 100%) */
.cm-left-rail .cm-coin-pill::after { background-size: 100% 100% !important; }

@keyframes cmUiV2CardPulse {
  0%   { transform: scale(.98); opacity: 0; }
  45%  { transform: scale(1.05); opacity: .8; }
  100% { transform: scale(1.12); opacity: 0; }
}
@keyframes cmUiV2CardFloat {
  0%, 48%, 100% { transform: translateY(0) scale(1); }
  62%           { transform: translateY(calc(-5 * var(--ui-unit))) scale(1.025); } /* why: 轻量迁移旧礼包弹跳, 新卡片较大所以幅度收小且随屏幕缩放 */
  76%           { transform: translateY(0) scale(.99); }
}
@keyframes cmUiV2BoxIn {
  0%   { transform: translateX(calc(-12 * var(--ui-unit))) scale(.94); opacity: 0; }
  100% { transform: translateX(0) scale(1); opacity: 1; }
}
@keyframes cmUiV2ProgressGlow {
  0%, 100% { filter: drop-shadow(0 0 calc(5 * var(--ui-unit)) rgba(126, 230, 255, .35)); }
  50%      { filter: drop-shadow(0 0 calc(11 * var(--ui-unit)) rgba(126, 230, 255, .62)); }
}

/* ── UI v2 PNG frame layering + per-machine tint ─────────────────────────
   why: 程序玻璃只能铺在 PNG 底框下面; PNG 底框作为 ::after 独立层, text/icon 作为真实子层永远在最上面.
        机台色彩只作用到 PNG 框层, 不污染文字、数字和 icon 的独立拆层. */
.cm-frame.cm-machine-1,
.cm-frame.cm-machine-2,
.cm-frame.cm-machine-3,
.cm-frame.cm-machine-4,
.cm-frame.cm-machine-5,
.cm-frame.cm-machine-6 {
  --ui-machine-hue: var(--ui-machine-1-hue);
  --ui-machine-sat: var(--ui-machine-1-sat);
  --ui-machine-bright: var(--ui-machine-1-bright);
  /* why: 用户取消按娃娃机换 UI 色，六台机统一继承第一台机的青蓝基准；机台 class 仍保留给业务状态和调试定位。 */
}

.cm-stam-wrap { --ui-frame-image: url("assets/ui/main-v2/panel_energy_base.png"); }
.cm-mult-chip.cm-status-card { --ui-frame-image: url("assets/ui/main-v2/panel_multiplier_base.png"); }
.cm-left-rail .cm-coin-pill { --ui-frame-image: url("assets/ui/main-v2/panel_coin_base.png"); }
.cm-bar-neon { --ui-frame-image: url("assets/ui/main-v2/top_progress_track_base.png"); }
.cm-claw-btn { --ui-frame-image: url("assets/ui/main-v2/help_button_base.png"); }
.cm-gift-btn { --ui-frame-image: url("assets/ui/main-v2/panel_gift_base.png"); }
.cm-trigger-box { --ui-frame-image: url("assets/ui/main-v2/panel_streak_base.png"); }
.cm-tabbar { --ui-frame-image: url("assets/ui/main-v2/bottom_nav_base.png?v=20260701"); }

.cm-status-card,
.cm-left-rail .cm-coin-pill,
.cm-bar-neon,
.cm-claw-btn,
.cm-gift-btn,
.cm-trigger-box,
.cm-tabbar {
  background: none !important;
}

.cm-status-card::before,
.cm-left-rail .cm-coin-pill::before,
.cm-bar-neon::before,
.cm-claw-btn::before,
.cm-gift-btn::before,
.cm-trigger-box::before,
.cm-tabbar::before,
.cm-status-card::after,
.cm-left-rail .cm-coin-pill::after,
.cm-bar-neon::after,
.cm-claw-btn::after,
.cm-gift-btn::after,
.cm-trigger-box::after,
.cm-tabbar::after {
  content: "";
  position: absolute;
  inset: 0 0 var(--ui-asset-bottom-safe) 0;
  width: auto;
  height: auto;
  pointer-events: none;
}

.cm-status-card::before,
.cm-left-rail .cm-coin-pill::before,
.cm-bar-neon::before,
.cm-claw-btn::before,
.cm-gift-btn::before,
.cm-trigger-box::before,
.cm-tabbar::before {
  z-index: 0;
  border-radius: var(--ui-glass-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, var(--ui-glass-highlight)), rgba(255, 255, 255, .035)),
    rgba(8, 22, 34, var(--ui-glass-alpha));
  backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  -webkit-backdrop-filter: blur(var(--ui-glass-blur)) saturate(var(--ui-glass-sat));
  box-shadow:
    inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .24),
    0 0 calc(18 * var(--ui-unit)) rgba(126, 230, 255, var(--ui-glass-glow));
}

.cm-status-card::after,
.cm-left-rail .cm-coin-pill::after,
.cm-bar-neon::after,
.cm-claw-btn::after,
.cm-gift-btn::after,
.cm-trigger-box::after,
.cm-tabbar::after {
  z-index: 1;
  background: var(--ui-frame-image) top center/100% calc(100% - var(--ui-asset-bottom-safe)) no-repeat;
  /* why(用户改稿"色相变化太大, 在原图基础上叠一层颜色改色相, 和原图还有关系"):
     原 grayscale(1) sepia(1) 把原图彻底抹成单色再重染 → 6 台机像 6 种完全不相干的颜色, 切机跳变剧烈.
     改成 grayscale/sepia(var(--ui-machine-mix)) 只染 mix 比例(默认 0.55, 保留 ~45% 原图色) →
     tint 成了叠在原图上的一层色相偏移, 原图色始终透出来, 切机色相差被原色锚住, 变化温和且"和原图有关系".
     mix 暴露进 ui-editor「机台染色强度」(0=完全原图/1=旧的全替换). */
  filter:
    grayscale(var(--ui-machine-mix, 0.55))
    sepia(var(--ui-machine-mix, 0.55))
    saturate(var(--ui-machine-sat))
    hue-rotate(var(--ui-machine-hue))
    brightness(var(--ui-machine-bright))
    drop-shadow(0 0 calc(7 * var(--ui-unit)) hsl(var(--ui-machine-hue) 94% 70% / var(--ui-machine-glow-alpha)));
  transition: filter 1000ms cubic-bezier(.2, .7, .2, 1); /* why(#6): 换色过渡加长 620→1000ms, 让机台换色更明显 */
}

/* why(用户"问号圆框位置不对"): 老爪子设计的 1612 ::before / 1686 ::after 写死了 transform: translate(-50%,-50%)
   (::after 还带 scale .6). main-v2 改用 inset:0 重新定位这两个伪元素、覆盖了 top/left/尺寸, 却从没清 transform →
   残留的 translate 把玻璃圆框和圆盘底图一起拽到容器左上角(圆盘还被缩到 60%). 之前改 1612 的 top 被 inset:0 盖掉=白改.
   这里在 main-v2 层清掉 transform → 两伪元素纯靠 inset:0 在 22×22 容器里填满居中 = 与顶部问号图标同心. */
.cm-claw-btn::before,
.cm-claw-btn::after { transform: none; }

.cm-status-card > *,
.cm-left-rail .cm-coin-pill > *,
.cm-bar-neon > *,
.cm-claw-btn > *,
.cm-gift-btn > *,
.cm-trigger-box > *,
.cm-tabbar > * {
  position: relative;
  z-index: 2;
}

.cm-mult-chip.cm-status-card::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .24), rgba(255, 255, 255, .07)),
    rgba(92, 98, 108, .58); /* why: 原改色只染 PNG 描边而玻璃底仍为全透明，用户看不出变化；补一层明确的中性亮灰玻璃底，且保留背景透视。 */
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .48), 0 0 calc(12 * var(--ui-unit)) rgba(224, 232, 240, .34); /* why: 倍率框用冷白轮廓光而非机台彩色光，和灰色玻璃底形成清楚边界。 */
}

.cm-mult-chip.cm-status-card::after {
  filter: grayscale(1) saturate(0) brightness(1.58) contrast(.9) drop-shadow(0 0 calc(8 * var(--ui-unit)) rgba(226, 233, 240, .5));
  transition: none;
  /* why: 倍率框独立于机台青蓝主题，PNG 描边抬高 58% 明度并降低少量对比，确保肉眼可见为亮灰而不是原来的暗青黑。 */
}

.cm-mult-chip.cm-mult-t1,
.cm-mult-chip.cm-mult-t2,
.cm-mult-chip.cm-mult-t3 {
  border-color: rgba(230, 235, 241, .72);
  color: #fff;
  text-shadow: 0 1px 2px rgba(28, 34, 40, .72), 0 0 7px rgba(235, 241, 247, .58);
  animation: cmMultChipNeutralBreath 1.6s ease-in-out infinite;
  /* why: 高倍率继续保留呼吸提示，但三档不再冒紫/橙/红光，统一为亮灰框的中性反馈。 */
}

/* why: 实机确认倍率 PNG 的中央为不透明暗色，原先只调滤镜仍会完全盖住灰底；此处用浅灰底主导最终画面，并把 PNG 降为轮廓纹理。 */
.cm-mult-chip.cm-status-card::before {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, .26), rgba(255, 255, 255, .08)),
    var(--ui-tune-mult-color, rgba(203, 168, 255, .88)); /* why: 用户用实机调色器定稿浅紫倍率底色；缺省即采用导出值。 */
  box-shadow: inset 0 calc(1 * var(--ui-unit)) 0 rgba(255, 255, 255, .5), 0 0 calc(12 * var(--ui-unit)) rgba(180, 162, 210, .36); /* why: 深紫灰主体用低强度淡紫轮廓光保持边缘可读，不做彩色高亮框。 */
}
.cm-mult-chip.cm-status-card::after {
  opacity: var(--ui-tune-mult-texture-opacity, .81); /* why: 用户定稿倍率 PNG 以 81% 呈现，强化纹理但保留浅紫底色。 */
  filter: grayscale(.72) sepia(.16) saturate(var(--ui-tune-mult-texture-sat, .6)) hue-rotate(222deg) brightness(1.18) contrast(.86) drop-shadow(0 0 calc(8 * var(--ui-unit)) rgba(202, 174, 232, .48)); /* why: 用户定稿纹理饱和倍率为 0.6，其余校正参数保持固定。 */
}

@keyframes cmMultChipNeutralBreath {
  0%, 100% { transform: scale(1); box-shadow: 0 4px 12px rgba(16, 22, 28, .34), inset 0 1px 0 rgba(255, 255, 255, .46), 0 0 8px rgba(224, 232, 240, .38); }
  50% { transform: scale(1.07); box-shadow: 0 4px 14px rgba(16, 22, 28, .34), inset 0 1px 0 rgba(255, 255, 255, .58), 0 0 18px 2px rgba(232, 239, 246, .7); }
}

/* why(用户改稿"切机去掉多余的闪一次"): 原 is-machine-flash 亮度脉冲(brightness*1.7)会把倍率等框 PNG 一瞬洗白 →
   看着像"框消失一瞬" + 换色后"再闪一次". 整块删除, 只保留 ::after 的 1000ms 换色 transition(颜色平滑变一次, 不再闪).
   (app.jsx 里 machineFlash state/className 一并移除) */

/* ============================================================
   Figma 奖励弹窗覆盖层
   why: 设计稿"奖励弹窗"是 1080x1920 画布中的中段弹窗; 这里只复用弹窗资产和层次,
        不把示例金额/文案烘进图片, 保留游戏实时结算与飞金币逻辑.
   ============================================================ */
.rw-popup {
  /* why: 88vw 对齐 Figma 中玻璃框约占 1080 画布 87% 的比例, 避免移动端贴边 */
  width: min(88vw, 720px);
  /* why: 430px 给皇冠/礼物层与玻璃底框留出重叠空间, 接近设计稿中段比例 */
  height: 430px;
  overflow: visible;
}
.rw-card.rw-figma-card {
  /* why: 覆盖旧五档纯 CSS 卡片, 让 Figma 图片层成为唯一视觉底 */
  position: relative;
  width: 100%;
  height: 100%;
  min-width: 0;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  animation: none !important;
  text-align: center;
}
/* why(用户改稿二): 弃帧动画, 改静图 + 突然放大 pop. 底边锚定(--rw-gift-bottom)让礼物整体落在弹窗上半,
   往上生长(transform-origin 底部中心)→ 不遮住下方玻璃框里的标题/金额文字. pop 时长/尺寸/位置 var 化进 ui-editor. */
.rw-gift-static {
  position: absolute;
  left: 50%;
  bottom: var(--rw-gift-bottom, 48%);
  z-index: 6;
  width: var(--rw-gift-size, 78%);
  max-height: var(--rw-gift-maxh, 46%);
  object-fit: contain;
  object-position: bottom center;
  transform-origin: 50% 100%;
  animation: rwGiftPop var(--rw-gift-pop-dur, .46s) cubic-bezier(.15, 1.9, .35, 1) both;
  pointer-events: none;
  user-select: none;
  filter: drop-shadow(0 10px 18px rgba(0, 0, 0, .34));
}
/* why(用户改稿二"突然放大"): 从极小极速放大过冲(1.16)再回弹定格 — 干脆的"砰"一下, 配金币爆发 */
@keyframes rwGiftPop {
  0%   { opacity: 0; transform: translateX(-50%) scale(.25); }
  55%  { opacity: 1; transform: translateX(-50%) scale(1.16); }
  75%  { transform: translateX(-50%) scale(.96); }
  100% { opacity: 1; transform: translateX(-50%) scale(1); }
}
/* 分档尺寸/位置; 超级皇冠更大更靠上 */
.rw-popup.lv-0 .rw-gift-static { --rw-gift-size: 54%; --rw-gift-maxh: 38%; }
.rw-popup.lv-1 .rw-gift-static { --rw-gift-size: 70%; --rw-gift-maxh: 42%; }
.rw-popup.lv-2 .rw-gift-static { --rw-gift-size: 74%; --rw-gift-maxh: 44%; }
.rw-popup.lv-3 .rw-gift-static { --rw-gift-size: 82%; --rw-gift-maxh: 46%; }
.rw-popup.lv-4 .rw-gift-static { --rw-gift-size: 116%; --rw-gift-maxh: 52%; --rw-gift-bottom: 44%; }
.rw-glass-panel {
  /* why: 玻璃底框固定贴底, 奖品层从上方叠入 */
  position: absolute;
  left: 50%;
  bottom: 0;
  z-index: 4;
  /* why: 源图玻璃外沿和投影会视觉外扩, 94% 在大屏上接近 Figma 画框占比 */
  width: 94%;
  height: 58%;
  transform: translateX(-50%);
}
.rw-frame-img {
  /* why: 底框资源自带高光/描边, 拉伸到容器可适配不同屏宽 */
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: fill;
  pointer-events: none;
  user-select: none;
  /* why(用户改稿"不同奖项的框颜色不一样"): 玻璃框辉光色 var 化, 按档给不同色光晕 */
  filter: drop-shadow(0 18px 28px rgba(0, 0, 0, .42)) drop-shadow(0 0 22px var(--rw-frame-glow, rgba(235, 220, 195, .32)));
}
/* 分档框辉光: 无奖=银灰 / 小=青蓝 / 中=紫 / 大=金橙 / 超=暖金(更浓) */
.rw-popup.lv-0 .rw-frame-img { --rw-frame-glow: rgba(170, 190, 210, .3); }
.rw-popup.lv-1 .rw-frame-img { --rw-frame-glow: rgba(235, 220, 195, .42); } /* 去青改中性暖白(保留 PNG 画框) */
.rw-popup.lv-2 .rw-frame-img { --rw-frame-glow: rgba(190, 120, 255, .45); }
.rw-popup.lv-3 .rw-frame-img { --rw-frame-glow: rgba(255, 184, 70, .5); }
.rw-popup.lv-4 .rw-frame-img { --rw-frame-glow: rgba(255, 210, 90, .62); }
/* why(用户"接一下奖励弹窗豪华皮肤"): 把共享镭射环叠到 PNG 玻璃画框上 — 颜色/环粗/内渐隐/流速全复用 --ui-holo-*(ui-editor「弹窗玻璃」一处调).
   frame-base.webp 金属描边在源图里上下留白比左右多(object-fit:fill 拉伸后比例不变), 故纵向 inset > 横向, 让虹彩环压在银边上而非飘在外面.
   z:7 = 画框(z auto)之上、文案(z:8)之下; screen 混合只提亮银边, 暗底几乎不受影响. 对齐常数用 var 便于 ui-editor 后续接管. */
.rw-glass-panel::after {
  content: ""; position: absolute;
  inset: var(--rw-holo-inset-y, 15%) var(--rw-holo-inset-x, 4%); /* why: 贴 frame-base.webp 金属边外沿, 纵向留白多故 15% > 横向 4% */
  z-index: 7; /* why: 压画框之上、文案(z:8)之下, 虹彩描在银边不挡字 */
  pointer-events: none;
  border-radius: var(--rw-holo-radius, 30px); /* why: match 画框大圆角, 让环外角跟着圆 */
  mix-blend-mode: screen; /* why: 与银色金属边 screen 混合 → 银边染流动虹彩, 暗底几乎不动 */
  opacity: var(--ui-holo-disp-op, 1);
  filter: hue-rotate(var(--ui-holo-hue, 0deg));
}
.rw-panel-copy {
  /* why: 文案覆盖在玻璃框内部, 上方留空间给大奖标题与奖品交叠 */
  position: absolute;
  inset: 16% 8% 8%;
  z-index: 8;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: #fff;
  text-shadow: 0 4px 16px rgba(0, 0, 0, .42), 0 0 18px rgba(255, 255, 255, .5);
  /* why(用户改稿"先演礼物+框, 再弹大字+金币数值"): 文案层延迟到礼物帧播完(≈gift-dur)才弹入 —
     both 保留起手 opacity:0 期间隐藏; 延迟 var 化进 ui-editor. key=copy-openKey 保证每次开奖重播 */
  animation: rwCopyReveal .42s cubic-bezier(.2, 1.5, .4, 1) both;
  animation-delay: var(--rw-copy-delay, .58s);
}
@keyframes rwCopyReveal {
  0%   { opacity: 0; transform: translateY(14%) scale(.9); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
.rw-title {
  /* why: 72px 在 680px 弹窗内可容纳"超级大奖", 同时接近 Figma 大标题气势 */
  font-size: 72px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .96);
  -webkit-text-stroke: 1px rgba(255, 255, 255, .18);
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .18));
}
/* why(用户"奖项种类改字体PNG, 两版都用"): 奖项等级标题字体图 — 高度≈原标题气势, 居中, 沿用标题投影; clamp 随宽响应手机自动收一档 */
.rw-title-img {
  display: block;
  height: clamp(46px, 13.5vw, 66px);
  width: auto;
  max-width: 94%;
  margin: 0 auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 10px rgba(0, 0, 0, .28));
}
.rw-payout-row {
  /* why: 金币图标与金额作为一个整体居中, 让倍数徽章能从右侧飞入 */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-top: 16px;
  white-space: nowrap;
}
.rw-coin-mark {
  /* why(用户"尺寸略放大一点点"): 48→56; coin-spin 帧动画版走 <img>(见 .rw-coin-spin) */
  width: 56px;
  height: 56px;
  flex: 0 0 auto;
  background: url("./assets/icon/coin.webp") center/contain no-repeat;
  filter: drop-shadow(0 0 12px rgba(255, 216, 77, .72));
}
.rw-coin-spin { background: none; object-fit: contain; } /* why: 帧动画 img 用 src 逐帧翻转, 去掉 coin.webp 静态底 */
.rw-amount {
  /* why: 48px 金额在玻璃底框内与 72px 标题形成清晰层级 */
  position: relative;
  font-size: 48px;
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .94);
}
.rw-payout-row .rw-mult-badge {
  /* why: 保留旧的"倍数飞入金额"动画节奏, 位置改成新金额行右侧 */
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  transform-origin: left center;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
  background: linear-gradient(180deg, #fff7c2 0%, #ffd84d 45%, #ff9b2e 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 0 12px #ffb13a) drop-shadow(2px 3px 0 rgba(90, 32, 16, .5));
  animation: rwMultBadgeIn .26s cubic-bezier(.2, 1.5, .4, 1) backwards, rwMultPulse 1s ease-in-out .26s infinite;
}
.rw-payout-row .rw-mult-badge.is-merging {
  animation: rwMultMerge .42s cubic-bezier(.55, -0.35, .5, 1) forwards;
}
.rw-amount.is-pop {
  animation: rwAmountSlam .62s cubic-bezier(.2, 1.7, .35, 1);
}
.rw-amount.is-pop::after {
  /* why: 金额被倍数砸中时保留旧金光冲击反馈, 但改挂到新金额节点 */
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  transform: translate(-50%, -50%);
  background: radial-gradient(circle, rgba(255, 248, 180, .95) 0%, rgba(255, 177, 58, .55) 38%, transparent 70%);
  pointer-events: none;
  animation: rwSlamBurst .62s ease-out forwards;
}
.rw-subline,
.rw-miss-line {
  /* why: 底部说明在 Figma 中是小号白字, 18px 保持手机可读但不抢主标题 */
  margin-top: 18px;
  font-size: 18px;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: 0;
  color: rgba(255, 255, 255, .86);
  text-shadow: 0 2px 10px rgba(0, 0, 0, .5), 0 0 3px rgba(0, 0, 0, .7); /* iOS玻璃: 去青辉光→纯黑描边(奖励弹窗内暖调, 不留冷荧光) */
}
.rw-miss-line {
  /* why: 无奖没有金额行, 提示文案需要更靠近标题并略大 */
  margin-top: 20px;
  font-size: 30px;
}

@media (max-width: 480px), (max-height: 760px) {
  .rw-popup {
    /* why: 小屏压低弹窗高度, 避免皇冠层顶到 HUD 或底部 tabbar */
    width: min(88vw, 520px);
    height: 340px;
  }
  .rw-popup.lv-4 .rw-gift-static {
    /* why: 小屏下皇冠翅膀保持接近满宽, 但不能裁到屏幕边缘 */
    --rw-gift-size: 104%;
  }
  .rw-title {
    /* why: 56px 是 360px 宽手机上"超级大奖"不换行的安全字号 */
    font-size: 56px;
  }
  .rw-payout-row {
    /* why: 小屏金额行收紧间距, 防止倍数徽章阶段溢出屏幕 */
    gap: 8px;
    margin-top: 12px;
  }
  .rw-coin-mark {
    /* why: 小屏金额行整体缩一档, 仍保持金币图标可辨认(略放大 38→44) */
    width: 44px;
    height: 44px;
  }
  .rw-amount {
    /* why: 小屏金额最多四位数加号, 40px 保持一行显示 */
    font-size: 40px;
  }
  .rw-payout-row .rw-mult-badge {
    /* why: 小屏倍数徽章紧贴金额, 减少右侧溢出 */
    left: calc(100% + 6px);
    font-size: 30px;
  }
  .rw-subline,
  .rw-miss-line {
    /* why: 小屏底部说明压到 14px, 保证不和金额重叠 */
    margin-top: 12px;
    font-size: 14px;
  }
  .rw-miss-line {
    /* why: 无奖提示比说明文字高一级, 但不能压过标题 */
    font-size: 24px;
  }
  .rw-glass-panel {
    /* why: 手机上源图投影会把视觉边界推出屏幕, 收到 84% 保留安全留白 */
    width: 84%;
  }
}

@media (max-height: 620px) {
  .rw-popup {
    /* why: 极矮横屏/小窗时进一步压缩, 保持弹窗完整可见 */
    height: 300px;
  }
  .rw-title {
    /* why: 48px 是极矮视口下仍能读清的标题下限 */
    font-size: 48px;
  }
  .rw-subline {
    /* why: 极矮视口隐藏长说明, 优先保留标题和金币金额 */
    display: none;
  }
}

.cm-glass-pop-layer {
  /* why: 倍率跳字需要压过娃娃机 HUD 和底部 tab, 但不拦截点击 */
  position: fixed;
  inset: 0;
  z-index: 1100;
  pointer-events: none;
}

.cm-glass-pop {
  /* why: 用 fixed 坐标贴近触发的心动圈位置, 不受 App 内滚动/布局影响 */
  position: fixed;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(var(--cm-glass-glyph-h) * -.08); /* why: 单字 PNG 自带透明边, 略收字距让倍率读成一组 */
  min-height: calc(var(--cm-glass-glyph-h) * 1.45); /* why: 给弹起和外发光留裁切空间 */
  transform-origin: center;
  animation: cmGlassPopLife 1000ms cubic-bezier(.25, .9, .3, 1) both; /* why: 用户要求出现 1s 后消失; 干脆缩放用不过冲的 ease-out (过冲交给关键帧) */
  filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .48)); /* why: 保留旧跳字的压场阴影, 不叠黑底 */
  will-change: transform, opacity, filter;
}

.cm-glass-glyph-cell {
  /* why: 每个字格承载 PNG 本体和同尺寸 alpha 高光 canvas */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--cm-glass-glyph-h);
  flex: 0 0 auto;
  /* why(bug fix): 去掉逐字 cmGlassGlyphKick 动画和 nth-child 错峰 delay — 整串由 .cm-glass-pop 统一缩放弹出,
     修"中间数字慢半拍"(错峰根因) + 单字不再各自旋转晃动 (弹出更干脆) */
}

.cm-glass-glyph-img,
.cm-glass-glyph-band {
  /* why: 让 canvas 高光和 PNG 字符完全重合, 白色流光只通过 alpha 裁在字上 */
  display: block;
  height: 100%;
  width: auto;
  user-select: none;
  -webkit-user-drag: none;
}

.cm-glass-glyph-img {
  /* why: 用户明确要外发光, drop-shadow 按 PNG alpha 轮廓发光而不是叠黑底 */
  position: relative;
  z-index: 1;
  filter:
    drop-shadow(0 0 4px rgba(255, 255, 255, .82))
    drop-shadow(0 0 9px rgba(255, 255, 255, .55)) /* iOS玻璃: 青辉光→中性白 */
    drop-shadow(0 0 17px rgba(255, 139, 216, .34));
}

.cm-glass-glyph-band {
  /* why: 高光层覆盖 PNG 本体, 内容由 JS 按 PNG alpha 遮罩后绘制 */
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: .95;
  mix-blend-mode: normal;
}

.cm-glass-glyph-preload {
  /* why: canvas 需要拿到同源 PNG natural size/alpha, 预加载图不参与视觉显示 */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

@keyframes cmGlassPopLife {
  /* why(bug fix): 用户要"直接缩放弹出变大就行" — 只动 scale+opacity, 去掉上浮位移和 blur, 弹出更干脆.
     translate(-50%,-50%) 保持不变仅用于居中锚点 */
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.5); }
  16%  { opacity: 1; transform: translate(-50%, -50%) scale(1.12); } /* why: 快速弹到峰值 = "变大" */
  28%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }    /* why: 回落定位 */
  82%  { opacity: 1; transform: translate(-50%, -50%) scale(1); }    /* why: 稳定停留读数 */
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1); }    /* why: 原地淡出, 不再位移 */
}

@media (prefers-reduced-motion: reduce) {
  .cm-glass-pop,
  .cm-glass-glyph-cell {
    /* why: 系统减弱动态时仍显示 1s, 但去掉弹射晃动 */
    animation-timing-function: linear;
  }
  .cm-monitor-working-char { animation: none; }
  /* why: 120ms 只保留阶段可见性衔接，不让缩放、跳字或庆祝动效持续刺激。 */
  .cm-monitor-btn.is-upgrading,
  .cm-monitor-success-layer,
  .cm-monitor-success-card,
  .cm-monitor-success-layer.is-leaving { animation-duration: 120ms; }
  /* why: 用户必须看见完成星星；减弱动态时把爆发压到 260ms 且取消错峰，不再直接隐藏结果反馈。 */
  .cm-monitor-working.is-bursting,
  .cm-monitor-burst-star { animation-duration: 260ms; }
  .cm-monitor-burst-star { animation-delay: 0ms; }
  /* why: 减弱动态仍保留 720ms 的成功大字和粒子，确保用户不会误以为升级反馈缺失。 */
  .cm-monitor-celebration { animation-duration: 1200ms; }
  .cm-monitor-burst-title span { animation-duration: 1000ms; } /* why: 减弱动态仍让成功大字清晰停留，避免反馈再次像没出现。 */
  .cm-monitor-celebration-particle,
  .cm-monitor-burst-flash,
  .cm-monitor-burst-ring { animation-duration: 900ms; }
}

/* ── 弹窗场景系统 (popup-scene.jsx) — ui-editor 弹窗编辑器往弹窗上叠的 图片/文字/按钮 ── */
.ps-layer { position: absolute; inset: 0; z-index: 20; pointer-events: none; } /* why: 铺满目标弹窗容器、盖在其内容上; 子元素各自开 pointer-events */
.ps-el { position: absolute; box-sizing: border-box; pointer-events: auto; }
.ps-text, .ps-button { display: flex; align-items: center; line-height: 1.15; white-space: pre-wrap; overflow: hidden; } /* why: flex 竖直居中 + 下面 ps-al-* 定水平; pre-wrap 保留换行 */
.ps-al-center { justify-content: center; text-align: center; }
.ps-al-left   { justify-content: flex-start; text-align: left; }
.ps-al-right  { justify-content: flex-end; text-align: right; }
.ps-image { object-fit: contain; user-select: none; -webkit-user-drag: none; }
.ps-button {
  border: none; cursor: pointer; color: inherit;
  border-radius: calc(10 * var(--ui-unit)); /* why: 跟游戏其它玻璃件圆角量级一致 */
  background: rgba(20, 26, 50, .55);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  box-shadow: inset 0 0 0 1px rgba(150, 180, 255, .4), 0 2px 8px rgba(0, 0, 0, .3); /* why: 默认玻璃描边 + 轻投影, 编辑器可覆盖 */
}
.ps-button:active { transform: scale(.96); }
/* 分组间隔动效 — 循环里 ~80% 时间静止, 末段短促爆发一下 = "间隔式". 循环时长 = 元素 inline animation-duration(编辑器设的 interval) */
@keyframes psPulse  { 0%,82%,100% { transform: scale(1); }        88% { transform: scale(1.12); }         94% { transform: scale(.97); } }
@keyframes psShake  { 0%,80%,100% { transform: translateX(0); }   84% { transform: translateX(-4%); }     88% { transform: translateX(4%); }   92% { transform: translateX(-3%); } 96% { transform: translateX(2%); } }
@keyframes psWobble { 0%,80%,100% { transform: rotate(0); }       85% { transform: rotate(-4deg); }       90% { transform: rotate(4deg); }     95% { transform: rotate(-2deg); } }

/* why: 用户不要 main 当前 WebGL/金色跳字效果；倍率字和奖励金额统一换成软体气球材质，中心透明，左上光源，右下反光，镭射作为可关叠色层 */
.balloon-text {
  position: relative;
  display: inline-block;
  color: transparent;
  text-shadow: none;
  -webkit-text-fill-color: transparent;
  -webkit-text-stroke: 1px rgba(255, 244, 250, .92); /* why: 1px 只保留字形边界，中间不被实心填死 */
  background:
    radial-gradient(ellipse at 50% 54%, rgba(255, 255, 255, 0) 0 30%, rgba(255, 205, 226, .22) 43%, rgba(255, 244, 250, .84) 72%, rgba(255, 142, 185, .92) 100%),
    linear-gradient(135deg, rgba(255, 255, 255, .86) 0 18%, rgba(255, 190, 224, .36) 39%, rgba(255, 99, 162, .72) 100%); /* why: 左上主光 + 透明中腔 + 右下粉色厚度 */
  -webkit-background-clip: text;
  background-clip: text;
  filter:
    drop-shadow(0 0 8px rgba(255, 255, 255, .70))
    drop-shadow(0 0 20px rgba(255, 130, 190, .55)); /* why: 软体边缘靠柔光立起来，不用实心金属字 */
  isolation: isolate;
}
.balloon-text::before,
.balloon-text::after {
  content: attr(data-text);
  position: absolute;
  inset: 0;
  pointer-events: none;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
}
.balloon-text::before {
  background:
    radial-gradient(circle at 24% 18%, rgba(255, 255, 255, .96) 0 10%, rgba(255, 255, 255, .34) 16%, rgba(255, 255, 255, 0) 31%),
    radial-gradient(ellipse at 76% 73%, rgba(255, 255, 255, .62) 0 8%, rgba(255, 236, 244, .22) 18%, rgba(255, 255, 255, 0) 34%),
    linear-gradient(135deg, rgba(255, 255, 255, .36), rgba(255, 255, 255, 0) 55%); /* why: 左上高光、右下反光、软膜层模拟气球表面 */
  -webkit-background-clip: text;
  background-clip: text; /* why: background shorthand resets clipping; keep highlight inside glyphs */
  opacity: .95; /* why: 高光方向要清楚，但不能盖掉透明中腔 */
}
.balloon-text::after {
  background:
    linear-gradient(112deg, rgba(80, 255, 238, 0) 0 12%, rgba(85, 255, 239, .72) 24%, rgba(255, 92, 220, .78) 43%, rgba(255, 236, 105, .70) 61%, rgba(100, 170, 255, .74) 78%, rgba(100, 170, 255, 0) 100%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, .46) 0 2px, rgba(255, 255, 255, 0) 2px 7px); /* why: 镭射只是一层可关叠色，不改变气球基础材质 */
  -webkit-background-clip: text;
  background-clip: text; /* why: background shorthand resets clipping; keep laser inside glyphs */
  opacity: 0;
  mix-blend-mode: screen;
  transform: none;
  border-radius: 0;
}
.balloon-text.has-laser::after {
  opacity: .62; /* why: 镭射可见但不吞掉基础气球高光和透明中腔 */
}
.cm-ring-center .mult-display.balloon-text {
  transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy));
}
.cm-ring-center .mult-display.balloon-text.popping {
  animation: cmBalloonMultPop .56s cubic-bezier(.34, 1.55, .55, 1);
}
.rw-amount.balloon-text.is-pop {
  animation: rwBalloonAmountPop .56s cubic-bezier(.34, 1.55, .55, 1);
}
.rw-amount.balloon-text::after {
  color: transparent;
  -webkit-text-fill-color: transparent;
  -webkit-background-clip: text;
  background-clip: text;
  left: 0;
  top: 0;
  right: 0;
  bottom: 0;
  width: auto;
  height: auto;
  border-radius: 0;
  transform: none; /* why: 覆盖旧奖励金额 burst 层的居中位移，否则镭射文字会变成偏移残影 */
}
.rw-amount.balloon-text.is-pop::after {
  content: attr(data-text);
  background:
    linear-gradient(112deg, rgba(80, 255, 238, 0) 0 12%, rgba(85, 255, 239, .72) 24%, rgba(255, 92, 220, .78) 43%, rgba(255, 236, 105, .70) 61%, rgba(100, 170, 255, .74) 78%, rgba(100, 170, 255, 0) 100%),
    repeating-linear-gradient(112deg, rgba(255, 255, 255, .46) 0 2px, rgba(255, 255, 255, 0) 2px 7px);
  -webkit-background-clip: text;
  background-clip: text; /* why: 上面的 background 简写会重置裁剪，必须在最终规则里重新裁到字形内 */
  animation: none;
}
@keyframes cmBalloonMultPop {
  0%   { transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy)) scale(.86); opacity: .62; }
  38%  { transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy)) scale(1.18); opacity: 1; }
  72%  { transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy)) scale(.96); }
  100% { transform: translate(var(--ui-ring-mult-dx), var(--ui-ring-mult-dy)) scale(1); opacity: 1; }
}
@keyframes rwBalloonAmountPop {
  0%   { transform: scale(.88); opacity: .70; }
  38%  { transform: scale(1.16); opacity: 1; }
  72%  { transform: scale(.97); }
  100% { transform: scale(1); opacity: 1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   抓取弹窗改造 (用户 2026-07-08): 去框图+礼品图 / 金额跳字两版材质(laser·glass) / 倍率统一粉白
   两套跳字设计(外玻内彩镭 balloon-text · 黑玻 PNG 字形 glass-glyph)只用在这个弹窗的金额上.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ① 去框图: 框图 <img> 已从 JSX 删; 这里关掉玻璃底框的镭射画框环 ::after, 让弹窗只剩标题+金额+倍率+彩带光效 */
.rw-glass-panel.rw-glass-panel-bare::after { display: none !important; } /* why(用户): 框图连它的镭射画框环一起去 */
.rw-card.rw-card-frameless { background: none; border: none; box-shadow: none; } /* why: figma 卡若自带底也一并裸化 */

/* ② 倍率徽章统一粉白 css (盖掉原金色渐变 — 原 .rw-card .prize .rw-mult-badge 因 DOM 无 .prize 本就未生效).
      粉白 = 白字 + 4向1px白(加粗) + 8向2px柔粉(描边) + 粉白 halo, 与游戏内圈倍率 .mult-display 同款观感. */
.rw-payout-row .rw-mult-badge { /* why: 必须带 .rw-payout-row 才盖得住原金色规则(同选择器 0,2,0, 本规则在后 → 胜) */
  position: absolute; left: calc(100% + 10px); top: 50%;
  transform: translateY(-50%); transform-origin: left center;
  font-size: 40px; font-weight: 900; line-height: 1; white-space: nowrap; /* why: 略小于金额, 作陪衬不抢主体 */
  color: #fff; -webkit-text-fill-color: #fff; background: none;
  -webkit-background-clip: border-box; background-clip: border-box; filter: none; /* why: 还原 text 裁剪+清金色渐变字/金色发光 */
  text-shadow:
    1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff,
    2px 0 0 #ff8fb6, -2px 0 0 #ff8fb6, 0 2px 0 #ff8fb6, 0 -2px 0 #ff8fb6,
    2px 2px 0 #ff8fb6, -2px 2px 0 #ff8fb6, 2px -2px 0 #ff8fb6, -2px -2px 0 #ff8fb6,
    0 0 10px rgba(255, 255, 255, .95), 0 0 20px rgba(255, 220, 240, .75), 0 0 32px rgba(255, 200, 230, .55);
  animation: rwMultBadgeInPink .26s cubic-bezier(.2, 1.5, .4, 1) backwards, rwMultPulsePink 1s ease-in-out .26s infinite;
  will-change: transform, opacity;
}
.rw-payout-row .rw-mult-badge.is-merging { animation: rwMultMerge .42s cubic-bezier(.55, -0.35, .5, 1) forwards; } /* why: 合并冲刺动作沿用(纯位移, 无金色) */
@keyframes rwMultBadgeInPink {
  from { opacity: 0; transform: translateY(-50%) scale(.4) rotate(-12deg); }
  to   { opacity: 1; transform: translateY(-50%) scale(1) rotate(0); }
}
@keyframes rwMultPulsePink { /* why: 只脉冲缩放, 不像原金色版那样脉冲 drop-shadow 颜色 */
  0%, 100% { transform: translateY(-50%) scale(1); }
  50%      { transform: translateY(-50%) scale(1.12); }
}

/* ③ glass 版金额 = 内联金色 PNG 数字(digits-v4) + 仿 laser: JS count-up 滚动 + 滚完缩放弹大(rwGoldPop).
      内联排进金额行, 高度由 --rw-gold-h 定; 数字滚动值由 RwGoldAmount 逐帧更新. */
.rw-amount-gold {
  --rw-gold-h: 58px; /* why: 金色数字高度, 与 laser/字体标题气势相当; 手机 @media 收一档 */
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 1px; /* why: 数字 PNG 自带留白, 略留缝防糊在一起 */
  vertical-align: middle;
  transform-origin: center;
}
.rw-gold-digit {
  height: var(--rw-gold-h);
  width: auto;
  display: block;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, .3)); /* 金字压场投影 */
}
/* 滚完缩放弹大(仿 laser "跳大"): 冲到 1.5 再回落定格 */
.rw-amount-gold.is-pop { animation: rwGoldPop .5s cubic-bezier(.34, 1.56, .55, 1); }
@keyframes rwGoldPop {
  0%   { transform: scale(1); }
  32%  { transform: scale(1.5); }
  58%  { transform: scale(.92); }
  100% { transform: scale(1); }
}
/* glass 版 ×倍率 — 金额下面一行, merge 段弹入并常显(用户"在下面一行弹出倍率"). 粉白 css, 同圈内 mult-display 观感 */
.rw-gold-mult {
  margin-top: 8px;
  text-align: center;
  font-weight: 900;
  font-size: 42px;
  line-height: 1;
  color: #fff;
  -webkit-text-fill-color: #fff;
  text-shadow:
    1px 0 0 #fff, -1px 0 0 #fff, 0 1px 0 #fff, 0 -1px 0 #fff,
    2px 0 0 #ff8fb6, -2px 0 0 #ff8fb6, 0 2px 0 #ff8fb6, 0 -2px 0 #ff8fb6,
    2px 2px 0 #ff8fb6, -2px 2px 0 #ff8fb6, 2px -2px 0 #ff8fb6, -2px -2px 0 #ff8fb6,
    0 0 10px rgba(255, 255, 255, .95), 0 0 20px rgba(255, 220, 240, .75), 0 0 32px rgba(255, 200, 230, .55);
  animation: rwGoldMultIn .32s cubic-bezier(.2, 1.7, .4, 1) both; /* 弹入 */
}
@keyframes rwGoldMultIn {
  0%   { opacity: 0; transform: scale(.35) translateY(-8px); }
  70%  { opacity: 1; transform: scale(1.15) translateY(0); }
  100% { opacity: 1; transform: scale(1); }
}
@media (max-width: 420px) {
  .rw-amount-gold { --rw-gold-h: 46px; } /* why: 小屏收一档 */
  .rw-gold-mult { font-size: 34px; }
  .rw-payout-row .rw-mult-badge { font-size: 34px; } /* why: 带 .rw-payout-row 才盖得住 4470 的小屏 30px */
}

/* ═══════════ Codex 弹窗尺寸/位置 + 法线光效字形样式 (移植自 reward-popup-glyph-swap, 末尾覆盖旧规则) ═══════════ */
/* why(用户"抓取弹窗奖项名字/金币数值等大小都按codex来改"): 覆盖旧弹窗尺寸 + 给 -art 法线光效字形(canvas)定尺寸 */
.rw-popup {
  width: min(88vw, 720px);
  height: 430px;
  overflow: visible;
  --rw-title-size-pct: 84; --rw-title-size-cap: 560; --rw-title-maxh: 108px;
}
.rw-glass-panel {
  position: absolute; inset: 0 !important; z-index: 4; /* inset:0 撑满整个弹窗(!important 压过旧 @media 的 left:50%/width:84%) */
  display: grid; place-items: center; /* 字组落弹窗几何中心 */
  pointer-events: none; background: none; box-shadow: none;
  -webkit-backdrop-filter: none; backdrop-filter: none;
  width: auto; height: auto; transform: none !important; /* 清掉旧贴底 translateX(-50%); 不再动 left/right, 交给 inset */
}
.rw-glass-panel::before, .rw-glass-panel::after { display: none; } /* 连框带镭射环一起去 */
.rw-panel-copy {
  position: relative; inset: auto; width: 100%; max-width: 100%;
  padding: 0 4%; box-sizing: border-box; gap: 16px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  animation: rwCopyReveal .42s cubic-bezier(.2, 1.5, .4, 1) both; animation-delay: .18s; text-shadow: none;
}
/* 奖项名(法线光效字形 canvas) — 宽度/最大高/发光按档 */
.rw-title-art {
  position: relative; z-index: 9; display: block;
  width: min(calc(var(--rw-title-size-pct, 84) * 1%), calc(var(--rw-title-size-cap, 560) * 1px));
  max-height: var(--rw-title-maxh); object-fit: contain; user-select: none; -webkit-user-drag: none;
  filter: drop-shadow(0 12px 20px rgba(0,0,0,.28)) drop-shadow(0 0 20px var(--rw-title-glow, rgba(160,220,255,.4)));
}
.rw-popup.lv-0 { --rw-title-size-pct: 74; --rw-title-size-cap: 420; --rw-title-maxh: 88px;  --rw-title-glow: rgba(192,212,255,.38); --rw-amount-glow: rgba(192,212,255,.42); }
.rw-popup.lv-1 { --rw-title-size-pct: 56; --rw-title-size-cap: 320; --rw-title-maxh: 96px;  --rw-title-glow: rgba(96,255,233,.52);  --rw-amount-glow: rgba(120,255,236,.56); }
.rw-popup.lv-2 { --rw-title-size-pct: 62; --rw-title-size-cap: 360; --rw-title-maxh: 100px; --rw-title-glow: rgba(224,149,255,.58); --rw-amount-glow: rgba(229,162,255,.62); }
.rw-popup.lv-3 { --rw-title-size-pct: 68; --rw-title-size-cap: 400; --rw-title-maxh: 108px; --rw-title-glow: rgba(255,214,116,.64); --rw-amount-glow: rgba(255,220,130,.68); }
.rw-popup.lv-4 { --rw-title-size-pct: 88; --rw-title-size-cap: 620; --rw-title-maxh: 124px; --rw-title-glow: rgba(255,255,255,.82); --rw-amount-glow: rgba(255,246,188,.88); }
/* 金额行: 金币 icon + 法线光效数字 */
.rw-payout-row {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  margin-top: calc(var(--rw-amount-mt, 8) * 1px); white-space: nowrap; gap: 8px;
}
.rw-amount-art {
  display: inline-flex; align-items: flex-end; justify-content: center; position: relative;
  --rw-line-glyph-h: calc(var(--rw-amount-h, 62) * 1px);
  gap: calc(var(--rw-line-glyph-h) * var(--rw-amount-gap, -.11));
  filter: drop-shadow(0 12px 18px rgba(0,0,0,.30)) drop-shadow(0 0 18px var(--rw-amount-glow, rgba(120,255,236,.54)));
}
.rw-amount-art.is-pop { animation: rwAmountSlam .62s cubic-bezier(.2, 1.7, .35, 1); }
.rw-digit-art { height: var(--rw-line-glyph-h); width: auto; display: block; user-select: none; -webkit-user-drag: none; }
.rw-normal-lit { background: transparent; } /* 法线 canvas 替透明 PNG, 身后不能有填充 */
.rw-digit-art.is-plus { height: calc(var(--rw-line-glyph-h) * .5); transform: translateY(-50%); } /* why(用户 0709): 加号上移自身一半高度, 取代原 -2% 字高微调 */
.rw-digit-art.is-dot, .rw-digit-art.is-comma { height: calc(var(--rw-line-glyph-h) * .42); transform: translateY(calc(var(--rw-line-glyph-h) * -.02)); }
.rw-digit-art.is-multiply { height: calc(var(--rw-line-glyph-h) * .5); transform: translateY(calc(var(--rw-line-glyph-h) * -.05)); }
@media (max-width: 480px), (max-height: 760px) { .rw-popup { width: min(88vw, 520px); height: 340px; } }
@media (max-height: 620px) { .rw-popup { height: 300px; } }

/* ═══ 用户"奖项字/金额/倍率全部水平居中" ═══ */
/* 金额行右侧放和金币 icon 等宽的隐形占位, 抵消左侧金币对数字的偏移 → 金额数字真正居中(不再被金币推右) */
.rw-coin-spacer { width: 56px; height: 1px; flex: 0 0 auto; visibility: hidden; }
@media (max-width: 420px) { .rw-coin-spacer { width: 44px; } } /* 跟金币小屏尺寸一致 */
.rw-payout-row { justify-content: center !important; }
.rw-panel-copy { align-items: center !important; text-align: center; }
.rw-title-art { margin-left: auto !important; margin-right: auto !important; }
.rw-gold-mult { margin-left: auto !important; margin-right: auto !important; text-align: center !important; align-self: center !important; }

/* ═══ 用户: 弹窗字后面加背景图(reward-bg) + 叠一层按档颜色(超级大奖镭射彩虹) ═══ */
.rw-bg-art {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  opacity: .5; /* why(用户 0709 "透明底降到50%", 覆盖旧钦定 80%) */
  background: url("./assets/ui/main-v2/reward-bg.png") center/contain no-repeat; /* 背景图铺在字组身后 */
  animation: rwBgIn .2s ease-out both; /* why(用户"提前一些出现"): 快速淡入, 字组落定前背景已就位 */
}
.rw-bg-art::after { /* 叠色层: masked 到背景图形状, overlay 混合给背景上色 */
  content: ''; position: absolute; inset: 0; opacity: .92; mix-blend-mode: overlay;
  -webkit-mask: url("./assets/ui/main-v2/reward-bg.png") center/contain no-repeat;
          mask: url("./assets/ui/main-v2/reward-bg.png") center/contain no-repeat;
  background: radial-gradient(circle at 50% 45%, #dfe9ff, #9fb0d8); /* 兜底色 */
}
.rw-popup.lv-0 .rw-bg-art { opacity: .38; } /* why: 再来一次继续比常规档暗一档 — 随基准 80%→50% 等比压到 .38, 保住"空奖更黯"的层次 */
.rw-popup.lv-1 .rw-bg-art::after { background: radial-gradient(circle at 50% 45%, #a6fff0, #22b0d8); } /* 小奖 青 */
.rw-popup.lv-2 .rw-bg-art::after { background: radial-gradient(circle at 50% 45%, #eebaff, #a445cc); } /* 中奖 紫 */
.rw-popup.lv-3 .rw-bg-art::after { background: radial-gradient(circle at 50% 45%, #ffe79a, #ff9226); } /* 大奖 金 */
.rw-popup.lv-4 .rw-bg-art::after { /* 超级大奖: 镭射彩虹 */
  opacity: 1;
  background: conic-gradient(from 210deg, #ff3dd1, #ff8030, #ffd84d, #6fffe4, #5fd9ff, #b366ff, #ff3dd1);
}
@keyframes rwBgIn { from { opacity: 0; transform: scale(.72); } }
.rw-panel-copy { z-index: 2; } /* 字组压在背景之上 */

/* ═══════════════ 任务4: 抓取中进度条 — 锁蓝底 + 暖色叠圈 + 镭射 + 火焰 + 逐字标题 ═══════════════ */
/* why: 追加在文件末尾, 靠"同特异性后者胜"覆盖 v2 皮肤的 .cell.on / :nth-child(n+10) 粉格规则 */

/* why(任务4②): 抓取中(committed)整条底统一锁成冰蓝(盖住 v2 第10格起的粉), 给暖色叠圈当冷对比底; 关掉呼吸保持稳定 */
.cm-bar-neon.committed .cell.on {
  background: linear-gradient(180deg, rgba(151, 238, 255, .92), rgba(58, 206, 255, .66));
  box-shadow: 0 0 9px rgba(114, 226, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .6);
  animation: none;
}
/* why(任务4②): 暖色叠圈从头覆盖蓝底 — 橙黄→橙→粉红...(GRAB_LAP_PALETTE 经 --lap/--lap2 推入), 满一圈换一色 */
.cm-bar-neon.committed .cell.on.lap-on {
  background: linear-gradient(180deg, var(--lap, #ffd54a), var(--lap2, #ff9e2c));
  box-shadow: 0 0 10px var(--lap, #ffd54a), 0 0 20px var(--lap2, #ff9e2c), inset 0 1px 0 rgba(255, 255, 255, .62);
  animation: none;
}
/* why: v1 皮肤 .cell.on::after 有个亮点芯 — 叠色时染成暖色, 跟圈色一致 (v2 该伪元素 display:none, 无副作用) */
.cm-bar-neon.committed .cell.on.lap-on::after {
  background: rgba(255, 250, 240, .98);
  box-shadow: 0 0 4px #fff, 0 0 10px var(--lap, #ffd54a);
}

/* why(任务4①): 炫彩镭射滚动发光遮罩 — 彩虹斜纹横扫, screen 混合叠在进度条上; grabbing 才挂 */
.cm-bar-neon.grabbing { overflow: visible; } /* why: 让顶缘火焰能溢出条外(v1 皮肤本是 overflow:hidden 会裁掉火焰) */
.cm-bar-neon .cm-bar-laser {
  /* why(用户"抓取时刻整个进度条的镭射特效也要有圆角的, 或者说要遮罩进度条的图像"):
     原来写 border-radius:inherit —— 但 .cm-bar-neon 自己的圆角是 0(条的视觉圆角来自底框 PNG, 不是 CSS),
     inherit 到 0 = 一块直角矩形的彩虹硬压在圆角轨道上, 两头方角露在轨道外. 改吃共享的 --cm-bar-r.
     inset 也跟填充一样内缩 1.5px, 让镭射待在轨道里而不是骑在框边上. */
  position: absolute; inset: 1.5px; z-index: 3; pointer-events: none;
  border-radius: var(--cm-bar-r);
  overflow: hidden; /* why: 背景是 220% 宽的横扫彩虹 —— 不裁的话滚动时会从圆头两端溢出去 */
  mix-blend-mode: screen; opacity: .7; /* why(用户"彩色镭射光效加强一点"): .5 在亮背景上偏淡，.7 能明显提亮彩虹但仍透出视频画面。 */
  background: repeating-linear-gradient(112deg,
    #ff3d7f 0%, #ff9e2c 14%, #ffe83d 28%, #46ff8f 42%, #3dd6ff 56%, #9b6bff 70%, #ff3d7f 84%);
  background-size: 220% 100%;
  animation: cmBarLaser 1s linear infinite;
  filter: saturate(1.7) brightness(1.32); /* why: 同时小幅抬高色彩纯度与发光亮度，不追加外光层以避免顶部糊成一片。 */
}
@keyframes cmBarLaser { to { background-position: 220% 0; } }
/* why(用户"满抽取奖励时添加横向滚动斜条纹"): grabbing 才挂载的 laser 继续做彩虹底光，
   伪元素单独提供清晰冰蓝白斜纹；父层已有圆角裁切，条纹不会越出进度轨道。 */
.cm-bar-neon .cm-bar-laser::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: repeating-linear-gradient(
    112deg,
    transparent 0 8px,
    rgba(255, 255, 255, .88) 8px 13px,
    rgba(156, 231, 255, .78) 13px 18px,
    transparent 18px 24px
  ); /* why(用户"条纹加宽、光效加强"): 5px 白芯接 5px 更实的冰蓝边，总宽 10px；周期仍为 24px，滚动节奏不变。 */
  background-position-x: 0;
  mix-blend-mode: screen;
  opacity: 1; /* why: 父 laser 统一控制总透明度，子斜纹保持满强度才能在增强后的彩虹底光上清晰分离。 */
  animation: cmBarStripeScroll .72s linear infinite; /* why: 约每秒移动 1.4 个周期，明显横向流动但不快成闪烁。 */
}
@keyframes cmBarStripeScroll {
  to { background-position-x: 48px; } /* why: 正好移动两个 24px 斜纹周期，循环首尾无跳变。 */
}

/* why(任务3): 火焰改"进度条周身白色辉光自然燃烧" — 照参考图(亮白芯 + 蓝白软光晕), 贴条一圈柔光, 不规则闪烁像自然燃烧; screen 混合只加光 */
.cm-bar-neon .cm-bar-glow {
  position: absolute; inset: -16px -12px; z-index: 2; pointer-events: none; border-radius: 999px;
  background:
    radial-gradient(66% 200% at 50% 50%, rgba(255, 255, 255, .75), transparent 64%),
    radial-gradient(100% 300% at 50% 50%, rgba(170, 220, 255, .46), transparent 82%);
  filter: blur(8px);
  mix-blend-mode: screen;
  animation: cmBarGlow 1.5s ease-in-out infinite;
}
/* why: 不规则关键帧(28/46/70%) = 自然火苗式忽明忽暗; scaleY 起伏(辉光上下舔) 而 scaleX≈1(紧贴条身周围) */
@keyframes cmBarGlow {
  0%   { opacity: .60; transform: scaleX(1) scaleY(1); }
  28%  { opacity: .98; transform: scaleX(1.012) scaleY(1.22); }
  46%  { opacity: .76; transform: scaleX(1) scaleY(1.06); }
  70%  { opacity: 1;   transform: scaleX(1.016) scaleY(1.28); }
  100% { opacity: .60; transform: scaleX(1) scaleY(1); }
}

/* why(任务4①): 抓取中标题"抓取奖品中~"逐字浮现 — 每字上跳一下 + 循环变色(逐字 animation-delay 错相 = 各自乱变色) */
.cm-grab-title { display: flex; justify-content: center; white-space: nowrap; }
/* why(用户澄清): 未抓取态"抓取进度" — 复用 .cm-reward-title 的位置(进度条下方), 静态不逐字跳, 字距略大像进度标签 */
.cm-idle-title { width: calc(124 * var(--ui-unit)); white-space: nowrap; letter-spacing: .12em; } /* why: 四个汉字和字距收紧到真实占位，问号才能紧跟在文字之后。 */
.cm-grab-char {
  display: inline-block;
  animation: cmGrabCharJump 1.5s ease-in-out infinite;
  will-change: transform;
}
@keyframes cmGrabCharJump {
  0%   { transform: translateY(0) scale(1); color: #fff; }
  10%  { transform: translateY(-8px) scale(1.22); color: #ffd54a; }
  20%  { transform: translateY(0) scale(1); }
  35%  { color: #ff5fa8; }
  55%  { color: #5fd9ff; }
  75%  { color: #b6ff5a; }
  100% { transform: translateY(0) scale(1); color: #fff; }
}

/* ═══════════ 娃娃机阶段框(家园升级条幅同款) + 阶段说明弹窗(彩色镭射边玻璃底) ═══════════ */
/* 阶段框 = 家园 .sw-upg-bar 同款横向玻璃条；固定锚在进度条左端，不参与互动 HUD 的上下退场。 */
.cm-stage-bar {
  position: absolute !important; /* why: 运行态追踪发现长文本扫描器曾误加 relative，造成 1.5px 上下跳；组件已排除扫描，这里仍锁死定位作为防回归兜底。 */
  top: var(--ui-left-y) !important; /* why: 用户要求阶段框与金币框上边缘精确对齐；金币框是左栏首项，其真实顶边事实源就是 --ui-left-y，复用同一变量避免不同尺寸下像素漂移。 */
  left: var(--ui-progress-x);
  z-index: 15; /* why: 阶段框保持在顶部 HUD 之上，但不进入平台胶囊调试层。 */
  transform: scale(var(--ui-top-control-scale)) !important; /* why: 只允许基础同比缩放，任何互动状态都不能追加 Y 轴位移。 */
  transform-origin: top left; /* why: 阶段条从进度条左端向右缩放，任何画框尺寸下左边缘都不会漂移。 */
  animation: none !important; /* why: 切机、重挂或状态更新都不允许重新播放阶段框入场动画。 */
  transition: none !important; /* why: 禁掉继承或组合选择器带来的 transform/位置补间，阶段框坐标逐帧保持一致。 */
  will-change: auto; /* why: 阶段框不再运动，不创建可能导致亚像素漂移的独立合成层。 */
  height: 18px; box-sizing: border-box; padding: 0 11px;
  display: inline-flex; align-items: center; gap: 5px;
  background: linear-gradient(180deg, var(--ui-tune-stage-top, rgba(177, 187, 236, .95)), var(--ui-tune-stage-bottom, rgba(141, 168, 221, .96))); /* why: 用户第二次实机导出后定稿蓝紫阶段框渐变；变量仍允许继续微调。 */
  border: 1px solid var(--ui-tune-stage-border, rgba(160, 158, 255, .78)); border-radius: 999px; /* why: 用户第二次实机导出后定稿蓝紫阶段框描边色与 78% 透明度。 */
  -webkit-backdrop-filter: none; backdrop-filter: none; /* why: 阶段框不能持续采样动态视频，否则盒子不动也会产生视觉漂移。 */
  box-shadow: inset 0 1px 0 rgba(225, 247, 255, .46), 0 0 9px rgba(84, 186, 247, .42), 0 3px 12px rgba(0, 0, 0, .24); /* why: 浅蓝版本同步提亮内高光和蓝色轮廓光，但不恢复持续呼吸或位置动画。 */
  color: #ffffff; font-family: inherit; font-size: 11px; font-weight: 400; line-height: 1; white-space: nowrap; /* why(iOS玻璃): 阶段条字去蓝青→白 */
  text-shadow: 0 1px 2px rgba(0, 0, 0, .45); cursor: pointer; -webkit-tap-highlight-color: transparent;
}
.cm-stage-bar:active { filter: brightness(1.15); }
/* 白色上箭头 icon (照家园 sw-upg-ico) */
.cm-stage-ico {
  width: 13px; height: 13px; flex: 0 0 13px; background: #fff;
  -webkit-mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4 L21 13 L15.5 13 L15.5 20.5 L8.5 20.5 L8.5 13 L3 13 Z"/></svg>') no-repeat center / contain;
  mask: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 4 L21 13 L15.5 13 L15.5 20.5 L8.5 20.5 L8.5 13 L3 13 Z"/></svg>') no-repeat center / contain;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, .4));
}
.cm-stage-frac { font-weight: 400; }
.cm-stage-frac b { color: #ffe1a0; font-size: 12px; font-weight: 800; } /* why(iOS玻璃): 阶段进度数值去青→暖金 */
/* 弹窗遮罩: 半透暗底盖住娃娃机(其余 UI 靠 anyPopupOpen→is-popup-solo 淡隐, 见 App.anyPopupOpen) */
.cm-stage-mask {
  position: absolute; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center;
  background: rgba(6, 8, 18, .5); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: cmStageMaskIn .18s ease both;
}
@keyframes cmStageMaskIn { from { opacity: 0; } }
/* 弹窗: 玻璃半透底 + 磨砂, 彩色镭射边走下方 ::after(复用游戏共享镭射环) */
.cm-stage-popup {
  position: relative; isolation: isolate; overflow: hidden;
  width: min(84%, 340px); padding: 20px 20px 18px; border-radius: 20px;
  background: linear-gradient(180deg, rgba(20, 40, 70, .58), rgba(8, 18, 34, .64));
  -webkit-backdrop-filter: blur(9px) saturate(1.4); backdrop-filter: blur(9px) saturate(1.4);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .55);
  color: #eaf6ff;
  animation: cmStagePopIn .34s cubic-bezier(.22, .9, .32, 1.3) both;
}
/* 彩色镭射边(照 .rw-glass-panel::after: conic 彩虹环 + 四边画框 mask + cmLaserSpin 慢旋) */
.cm-stage-popup::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit; mix-blend-mode: screen;
  --rw-frame: 13px;
  background: conic-gradient(from calc(var(--cm-laser-angle, 0deg) + 210deg),
    rgba(255, 70, 160, .8), rgba(255, 150, 80, .65), rgba(255, 235, 110, .68),
    rgba(110, 255, 180, .65), rgba(90, 190, 247, .8), rgba(150, 110, 255, .78), /* why(iOS玻璃/镭射): 蓝停点 255→247 = 规范镭射蓝 #5abef7, 清荧光值保镭射环 */
    rgba(255, 70, 160, .8));
  -webkit-mask:
    linear-gradient(to right,  #000 0, #000 2px, transparent var(--rw-frame)) left / var(--rw-frame) 100% no-repeat,
    linear-gradient(to left,   #000 0, #000 2px, transparent var(--rw-frame)) right / var(--rw-frame) 100% no-repeat,
    linear-gradient(to bottom, #000 0, #000 2px, transparent var(--rw-frame)) top / 100% var(--rw-frame) no-repeat,
    linear-gradient(to top,    #000 0, #000 2px, transparent var(--rw-frame)) bottom / 100% var(--rw-frame) no-repeat;
  -webkit-mask-composite: source-over;
  mask:
    linear-gradient(to right,  #000 0, #000 2px, transparent var(--rw-frame)) left / var(--rw-frame) 100% no-repeat,
    linear-gradient(to left,   #000 0, #000 2px, transparent var(--rw-frame)) right / var(--rw-frame) 100% no-repeat,
    linear-gradient(to bottom, #000 0, #000 2px, transparent var(--rw-frame)) top / 100% var(--rw-frame) no-repeat,
    linear-gradient(to top,    #000 0, #000 2px, transparent var(--rw-frame)) bottom / 100% var(--rw-frame) no-repeat;
  mask-composite: add;
  animation: cmLaserSpin var(--ui-holo-laser-speed, 5s) linear infinite;
}
.cm-stage-popup.is-closing { animation: cmStagePopOut .22s ease forwards; }
@keyframes cmStagePopIn { from { opacity: 0; transform: scale(.82) translateY(10px); } }
@keyframes cmStagePopOut { to { opacity: 0; transform: scale(.86) translateY(6px); } }
.cm-stage-pop-title { margin: 0 0 12px; font-size: 18px; font-weight: 800; text-align: center; color: #ffffff; text-shadow: var(--cm-glass-text-outline); } /* why(iOS玻璃): 弹窗标题去蓝青→白, 青光晕→黑描边 token */
.cm-stage-pop-body p { margin: 0 0 10px; font-size: 13.5px; line-height: 1.62; color: #d7e6f5; }
.cm-stage-pop-body b { color: #ffd76a; font-weight: 800; }
.cm-stage-pop-body .ic { margin-right: 3px; }
.cm-stage-pop-hot { color: #ff8fb4 !important; font-weight: 800; text-align: center; margin: 12px 0 0 !important; }
.cm-stage-pop-cur { margin-top: 12px; padding-top: 11px; border-top: 1px solid rgba(255, 255, 255, .2); font-size: 12.5px; text-align: center; color: #ffffff; font-weight: 700; } /* why(iOS玻璃): 当前阶段行去蓝青分隔线/字→中性白 */

/* ═══════════ 新版出奖机弹窗 (rw2-*) — 设计+动效见 _reward-preview.html; 资产 assets/ui/reward-popup + reward-ticket-v2 ═══════════ */
@font-face { font-family: 'PHFT Heavy'; src: url('assets/fonts/AlibabaPuHuiTi-Heavy-ui.woff2?v=20260723phft1') format('woff2'), url('assets/fonts/AlibabaPuHuiTi-Heavy-ui.woff?v=20260723phft1') format('woff'), url('assets/fonts/AlibabaPuHuiTi-Heavy-ui.ttf?v=20260723phft1') format('truetype'); font-weight: 900; font-display: swap; }  /* why: 静态 Heavy 子集明确为 900；版本键强制旧客户端丢弃已缓存且被浏览器拒绝的旧字体。 */
@font-face { font-family: 'PHFT Regular Subtitle'; src: url('assets/fonts/AlibabaPuHuiTi-Regular-subtitle.woff2?v=20260727phftregular2') format('woff2'), url('assets/fonts/AlibabaPuHuiTi-Regular-subtitle.woff?v=20260727phftregular2') format('woff'); font-weight: 400; font-display: swap; } /* why: 字幕指定阿里巴巴普惠体普通字重；第二版子集加入新台词所需的波浪号字符。 */
/* 黑底 + 光效 + 横条: .rw-popup-layer 全屏内定位 */
.rw2-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .8); z-index: 1; animation: rw2Back .3s ease both; }
/* #4 横条重建: CSS 渐变带(无字) + 滚动"JUST DO IT ›"文字层; 上黑+上彩 / 下黑+下彩, 超级彩条=镭射流动 */
.rw2-rib { position: absolute; left: -14%; width: 128%; height: min(6.4vw, 46px); z-index: 2; overflow: hidden; pointer-events: none; transform: rotate(-7deg); }
.rw2-rib.black { transform: rotate(7deg); } /* 黑条反向斜 → 与彩条交叉成伪 X */
/* 黑条与彩条同高度、反向旋转 → 交叉成伪 X 形 (见 .rw2-rib.black 的 rotate) */
/* why(用户"横条动效提前到画面圆环/出奖机展开时就展开, 收起时机不变"): 揭示延迟整体前移 ~3.0s (3.45→0.45 起),
   对齐出奖机 box 淡入(.06s)/glow 升起(.32s)的展开时刻; 内部错峰(黑先彩后, 上下 0.05s)保持; 退场由 .is-exit 驱动不受影响. */
.rw2-rib.top-black { top: 6.5%; clip-path: inset(0 100% 0 0); animation: rw2RibInL .2s ease-out 0.45s both; }   /* 上黑: 反斜, 左→右先显 */
.rw2-rib.top-color { top: 6.5%; clip-path: inset(0 100% 0 0); animation: rw2RibInL .2s ease-out 0.62s both; }   /* 上彩: 正斜, 与黑交叉 */
.rw2-rib.bot-black { top: 88%; clip-path: inset(0 0 0 100%); animation: rw2RibInR .2s ease-out 0.50s both; }     /* 下黑: 反斜, 右→左先显 */
.rw2-rib.bot-color { top: 88%; clip-path: inset(0 0 0 100%); animation: rw2RibInR .2s ease-out 0.67s both; }     /* 下彩: 正斜, 与黑交叉 */
@keyframes rw2RibInL { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rw2RibInR { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
/* 底色带(::before, 与揭示 clip 解耦; 彩条颜色流动走这里, 与文字同向) */
.rw2-rib::before { content: ""; position: absolute; inset: 0; }
.rw2-rib.black::before { background: linear-gradient(180deg, #1a1926, #06060d); }
/* why(修 bug 用户"再来一次的抓取弹窗里, 那个彩色的条带为啥没看见, 只有黑字在滚动"):
   下面只给了 lv-1..4 的彩条底色, 漏了 lv-0(无奖=再来一次) → 彩条的 ::before 没有 background = 整条透明.
   但它的滚动文字层还在, 且 .rw2-rib-text 默认 color:#101018(深黑 — 那是给【亮彩条】配的, 见下方 .rw2-rib.black .rw2-rib-text 才改浅色)
   → 玩家看到的正是"条不见了, 只剩黑字在滚". 补上 lv-0 底色即可, 文字层不用动.
   配色按本档既有语言走【银灰】(见 styles.css"分档框辉光: 无奖=银灰"与 .rw-popup.lv-0 .rw-card 的灰渐变) — 空奖不该比中奖还花. */
.rw-popup-layer .rw2-rib.color.lv-0::before { background: linear-gradient(90deg, #8792a8, #cdd8ea, #8792a8); background-size: 200% 100%; animation: rw2RibFlow 3s linear infinite; } /* why: 流动节奏与 lv-1..3 一致, 只是色相是银灰 — 空奖的条也得动, 不动会像是坏了 */
.rw-popup-layer .rw2-rib.color.lv-1::before { background: linear-gradient(90deg, #3aa0ff, #7fe3ff, #3aa0ff); background-size: 200% 100%; animation: rw2RibFlow 3s linear infinite; }
.rw-popup-layer .rw2-rib.color.lv-2::before { background: linear-gradient(90deg, #35cf7a, #b6ff8a, #35cf7a); background-size: 200% 100%; animation: rw2RibFlow 3s linear infinite; }
.rw-popup-layer .rw2-rib.color.lv-3::before { background: linear-gradient(90deg, #ff8a3d, #ffd76a, #ff8a3d); background-size: 200% 100%; animation: rw2RibFlow 3s linear infinite; }
.rw-popup-layer .rw2-rib.color.lv-4::before { background: linear-gradient(90deg, #ff3d8b, #ff9a3d, #ffe23d, #6fff9e, #4ac8ff, #b46cff, #ff3d8b); background-size: 300% 100%; animation: rw2Laser 1.8s linear infinite; } /* 超级大奖: 镭射彩虹流动 */
@keyframes rw2RibFlow { to { background-position: -200% 0; } }
@keyframes rw2Laser { to { background-position: -300% 0; } }
/* 滚动文字层("弹出后字体沿斜向滚动"): 两份并排 + translateX(-50%) 无缝; delay 3.7s = 揭示后才滚 */
.rw2-rib-text { position: absolute; inset: 0; display: flex; align-items: center; white-space: nowrap; font-family: 'Arial Black', system-ui, sans-serif; font-weight: 900; font-size: min(4.3vw, 24px); letter-spacing: .5px; color: #101018; animation: rw2RibScroll 7s linear 0.7s infinite; will-change: transform; }
.rw2-rib.black .rw2-rib-text { color: #eee6ff; }
.rw2-rib-text span { flex: 0 0 auto; }
@keyframes rw2RibScroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
/* 退场收回(反向 clip; 触发在 .rw-popup-layer.is-exit) */
.rw-popup-layer.is-exit .rw2-rib.top-black, .rw-popup-layer.is-exit .rw2-rib.top-color { animation: rw2RibOutL .3s ease-in forwards; }
.rw-popup-layer.is-exit .rw2-rib.bot-black, .rw-popup-layer.is-exit .rw2-rib.bot-color { animation: rw2RibOutR .3s ease-in forwards; }
@keyframes rw2RibOutL { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }
@keyframes rw2RibOutR { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }
@keyframes rw2Back { from { opacity: 0; } }
@keyframes rw2BarL { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes rw2BarR { from { clip-path: inset(0 0 0 100%); } to { clip-path: inset(0 0 0 0); } }
/* 弹窗盒 = 覆盖旧 .rw-popup 卡片样式; 自成坐标系(aspect + container 供 cqw) */
.rw-popup.rw2-scene {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(92vw, 430px); aspect-ratio: 973 / 1090; height: auto;
  background: none; padding: 0; border: none; box-shadow: none; overflow: visible;
  container-type: inline-size; z-index: 3;
  opacity: 1;      /* ★ 关键: 覆盖基础 .rw-popup 的 opacity:0(它本靠 .enter 动画显现, 但被我 animation:none 关了) — 否则整个场景不可见, 只剩兄弟层的横条+黑底 */
  display: block;  /* 覆盖基础 .rw-popup 的 flex(场景子元素全绝对定位, 不需要 flex) */
  will-change: auto;
}
.rw-popup.rw2-scene.enter, .rw-popup.rw2-scene.exit { animation: none; } /* 停用旧整窗缩放入场, 改各组件分别入场 */
.rw2-scene img { position: absolute; display: block; }
.rw2-glow { left: 8%; top: -8%; width: 84%; z-index: 0; opacity: 0; animation: rw2Glow .65s ease .32s both; }
@keyframes rw2Glow { from { opacity: 0; } to { opacity: 1; } }
.rw2-box { left: 5.34%; top: 11.65%; width: 86.64%; z-index: 1; opacity: 0; animation: rw2Fade .34s ease .06s both; }  /* 出奖机在下; 淡入走 CSS, 摇晃走 WAAPI(见 reward-popup.jsx) */
@keyframes rw2Fade { to { opacity: 1; } }
/* 奖券组: 顶端卡黑色出口(30.5%) + overflow 遮罩 + 内层 translateY 吐出 */
.rw2-ticket-clip { position: absolute; left: 0; top: 30.5%; width: 100%; height: 69.5%; overflow: hidden; z-index: 2; }
.rw2-ticket-group { position: absolute; inset: 0; transform: translateY(-105%); animation: rw2Dispense .8s cubic-bezier(.3, .7, .3, 1) 1.1s both; }
@keyframes rw2Dispense { from { transform: translateY(-105%); } to { transform: translateY(0); } }
.rw2-ticket { left: 12.95%; top: -2%; width: 71.33%; }
.rw2-coins { left: 14%; top: 38%; width: 72%; height: 56%; object-fit: contain; object-position: center bottom; } /* 每档金币堆: 居中适配票据下半格 */
/* 无奖: 券下半"再来一次"(普惠体 Heavy 紫字, 居中) 替代金币堆 */
.rw2-retry { position: absolute; left: 0; top: 55%; width: 100%; text-align: center; font-family: 'PHFT Heavy', system-ui; font-weight: 900; color: #5f4f92; font-size: 15cqw; letter-spacing: 2px; }
.rw2-amount { position: absolute; left: 16%; top: 5%; width: 60%; height: 19%; display: flex; align-items: center; justify-content: center;
  font-family: 'PHFT Heavy', system-ui; font-weight: 900; color: #484a72; font-size: 14.5cqw; letter-spacing: .5px;
  text-shadow: 0 1.5px 0 rgba(255, 255, 255, .5), 0 3px 6px rgba(70, 50, 110, .28);
  transform: scale(1); animation: rw2AmtPop .52s ease 1.92s both; }  /* 到位弹性放大 */
@keyframes rw2AmtPop { 0% { transform: scale(1); } 32% { transform: scale(1.6); } 60% { transform: scale(.85); } 82% { transform: scale(1.08); } 100% { transform: scale(1); } }
.rw2-star { z-index: 4; opacity: 0; }
.rw2-star-l { left: 2.26%; top: 63.76%; width: 19.12%; animation: rw2StarL .6s ease 2.06s both; }
.rw2-star-r { left: 82.53%; top: 10.83%; width: 12.54%; animation: rw2StarR .6s ease 1.99s both; }
@keyframes rw2StarL { 0% { opacity: 0; transform: rotate(-40deg) scale(0); } 40% { opacity: 1; transform: rotate(8deg) scale(1.55); } 66% { transform: rotate(-4deg) scale(.85); } 85% { transform: rotate(0) scale(1.08); } 100% { opacity: 1; transform: rotate(0) scale(1); } }
@keyframes rw2StarR { 0% { opacity: 0; transform: rotate(40deg) scale(0); } 40% { opacity: 1; transform: rotate(-8deg) scale(1.55); } 66% { transform: rotate(4deg) scale(.85); } 85% { transform: rotate(0) scale(1.08); } 100% { opacity: 1; transform: rotate(0) scale(1); } }
/* 档位名 = Codex title 图, 盖章式(大→砸下→压扁→落定) */
.rw2-tier { left: 24%; top: -1%; width: 49%; max-height: 18.5%; object-fit: contain; z-index: 5; opacity: 0; animation: rw2Stamp .56s 2.13s both; }
.rw-popup.lv-4 .rw2-tier { left: 13.25%; width: 73.5%; max-height: 27%; top: -5%; }  /* 超级大奖标题 ×1.5(放大 slot); 字间距烘在 super.png 里, 收紧需重出图 */
.rw2-tier.is-en { left: 17%; top: -3%; width: 66%; max-height: 24%; } /* why: 英文单词的透明画布留白和字面高度都比中文标题大，槽位放大约三成后才与原中文奖项具有同等视觉重量。 */
.rw-popup.lv-4 .rw2-tier.is-en { left: 5%; top: -6%; width: 90%; max-height: 32%; } /* why: 最长的 Super Prize 单独扩到弹窗安全宽度内，让字号明显变大，同时两侧各留 5% 防止手机窄屏裁切辉光。 */
@keyframes rw2Stamp { 0% { opacity: 0; transform: scale(2.6); animation-timing-function: cubic-bezier(.5, 0, .9, .35); } 60% { opacity: 1; transform: scale(.9); animation-timing-function: cubic-bezier(.2, .85, .35, 1); } 82% { transform: scale(1.05); } 100% { opacity: 1; transform: scale(1); } }
/* 倍率吊牌 + 字符集 */
.rw2-tag { left: 72.56%; top: 30.18%; width: 19.42%; z-index: 6; opacity: 0; transform: scale(0); animation: rw2TagPop .48s 2.52s both; }
@keyframes rw2TagPop { 0% { opacity: 0; transform: scale(0); } 42% { opacity: 1; transform: scale(1.48); } 70% { transform: scale(.86); } 88% { transform: scale(1.06); } 100% { opacity: 1; transform: scale(1); } }
.rw2-mult-glyphs { position: absolute; left: 73%; top: 37.5%; width: 18%; height: 12%; display: flex; align-items: center; justify-content: center; gap: .3cqw; z-index: 7; opacity: 0; animation: rw2MultPop .36s ease 2.68s both; }
/* why(用户"改了五轮、硬刷很多次, 小数点根本没变"的真凶): 容器 .rw2-mult-glyphs 只有 18cqw, 而内容(x+1+.+5)约 23cqw →
   flex 默认 flex-shrink:1 会把整排自动压缩塞进容器. 于是我每次调负边距 → 总宽变小 → 浏览器就少压缩一点 → 字符相应变大,
   视觉间距被布局自我抵消, 几乎原地不动. 必须 flex-shrink:0 关掉自动压缩, 负边距才真正落到间距上.
   (关掉后总宽 = 23 - 2×3.2(dot 负边距) - 1.6(x 负边距) ≈ 15.6cqw < 18cqw, 仍在容器内, 不会溢出.) */
.rw2-mult-glyphs .rw2-mg { position: static; height: 72%; width: auto; flex-shrink: 0; }
/* why(用户"裁剪一下"): x.png / dot.png 已横向裁掉透明留白 (x 192×256→128×256, dot 192×256→53×256, 原图存为 *-orig.png).
   只裁横向、高度不动 → 纵向基线不变, 视觉大小也不变(元素框本来就只有中间那块实心), 但盒子不再虚胖.
   裁前靠负边距去"抵消"自身留白, 小数点一放大留白就跟着翻倍、越治越远 — 裁掉才是治本.
   裁后只剩"相邻数字自己的留白"(5.png 各 ~17.5% / 1.png 各 ~27% ≈ 1.3~2.0cqw) + flex gap(.3) 要吃, 故收 -1.6cqw.
   x 是首项、左侧只对容器边(justify-content:center 自动居中), 故不收左边. 嫌远/近只调这个值. */
.rw2-mult-glyphs .rw2-mg.is-x { height: 56%; margin-right: 0; }
/* why(用户两次"小数点和左右数字隔太远"): 实测 alpha 包围盒 — dot.png 画布 192×256 里可见绿点只有 53×57(宽占 27.6%, 两侧各 ~36% 透明留白),
   相邻数字自己也有留白(5.png 各 ~17.5% / 1.png 各 ~27%). 换算到弹窗容器单位, 每侧净空 ≈ 数字留白(1.3~2.0cqw)+flex gap(.3)+点留白(1.0) ≈ 2.6~3.3cqw,
   上版只收 -0.9cqw 远不够. 收到 -2.6cqw 吃掉点自身留白+相邻数字大部分留白, 留 ~0.3cqw 视觉间隙. 嫌远/近只调这两个值. */
   (用户"小数点放大到 2 倍"): height 28%→56%.
   (用户"又间距很远了, 裁剪一下"): dot.png 已裁成 53×256(左右留白归零) → 自身不再有留白要抵消, 负边距降到 -1.6cqw,
   只吃相邻数字自己的留白(~1.3~2.0cqw)+flex gap(.3). 裁剪后放大不会再连带放大留白, 不会重演"一放大就变远". */
/* why(实测定案): 0-9 / x / dot 现已全部横向裁掉透明留白 → 所有盒子=实心字形, 间距只由 flex gap(.3cqw) 决定.
   负边距必须归零(裁前那些 -1.6/-3.2cqw 是用来抵消留白的, 裁后再留会让字符互相重叠).
   小数点再收 -.3cqw 抵消掉 flex gap, 让它紧贴左右数字(小数点本就该比数字间距更紧). 嫌紧就把这个值调向 0. */
.rw2-mult-glyphs .rw2-mg.is-dot { height: 56%; align-self: flex-end; margin-bottom: 12%; margin-left: -.3cqw; margin-right: -.3cqw; }
@keyframes rw2MultPop { 0% { opacity: 0; transform: scale(1.55) rotate(12deg); } 70% { opacity: 1; transform: scale(.95) rotate(-2deg); } 100% { opacity: 1; transform: scale(1) rotate(0); } }
/* level 0 无奖: 只显档名, 无券/倍率(JSX 条件渲染) */
.rw-popup.rw2-scene.exit { opacity: 0; transition: opacity .28s ease; }  /* 退场: 场景组件淡出 */
/* 退场(金币吸回时): 横条倒放收回 + 黑底/光渐隐 (这三个是场景兄弟节点, 单独驱动) */
.rw2-backdrop.is-exit { animation: rw2BackOut .9s ease forwards; }
.rw2-glow.is-exit { animation: rw2GlowOut .5s ease forwards; }
.rw2-bar-top.is-exit { animation: rw2BarTopOut .3s ease-in forwards; }
.rw2-bar-bot.is-exit { animation: rw2BarBotOut .3s ease-in forwards; }
@keyframes rw2BackOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rw2GlowOut { from { opacity: 1; } to { opacity: 0; } }
@keyframes rw2BarTopOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 100% 0 0); } }  /* 上条倒放: 从右往左收回(入场是左→右) */
@keyframes rw2BarBotOut { from { clip-path: inset(0 0 0 0); } to { clip-path: inset(0 0 0 100%); } }  /* 下条倒放: 从左往右收回(入场是右→左) */

/* ── 主界面浅亮玻璃弹窗统一层 ──
   why: 只给点名的主界面弹窗换成家园升级确认框的浅亮材质；独立 token 避免五档奖励 .rw-* 继承换肤。 */
:root {
  --cm-light-popup-bg:
    radial-gradient(at 22% 2%, rgba(255, 255, 255, .34), transparent 46%),
    linear-gradient(148deg, rgba(250, 253, 255, .24) 0%, rgba(206, 224, 235, .14) 48%, rgba(84, 112, 132, .18) 100%);
  --cm-light-popup-border: rgba(255, 255, 255, .34);
  --cm-light-popup-backdrop: blur(4px) saturate(.88) contrast(1.08);
  --cm-light-popup-shadow: 0 10px 22px rgba(9, 21, 32, .28), 0 2px 4px rgba(8, 19, 28, .32), inset 0 1.5px 1px rgba(255, 255, 255, .62), inset 0 -4px 7px rgba(24, 48, 66, .24), -1px 0 0 rgba(84, 230, 255, .3), 1px 0 0 rgba(255, 139, 219, .24);
  --cm-light-button-bg: linear-gradient(148deg, rgba(255, 255, 255, .22) 0%, rgba(210, 235, 247, .12) 50%, rgba(93, 126, 148, .16) 100%);
  --cm-light-button-primary-bg: linear-gradient(148deg, rgba(255, 255, 255, .3) 0%, rgba(210, 235, 247, .17) 50%, rgba(93, 126, 148, .18) 100%);
  --cm-light-button-secondary-bg: linear-gradient(148deg, rgba(255, 255, 255, .18) 0%, rgba(210, 235, 247, .1) 50%, rgba(93, 126, 148, .14) 100%);
  /* why: 家园确认钮的六色晕染改为按钮内部四角柔光；.34/.30 峰值在浅玻璃里看得见颜色但不盖字。 */
  --cm-light-button-rainbow:
    radial-gradient(circle at 8% 18%, rgba(255, 61, 139, .34), transparent 38%),
    radial-gradient(circle at 92% 15%, rgba(255, 226, 61, .26), transparent 36%),
    radial-gradient(circle at 88% 86%, rgba(74, 200, 255, .34), transparent 42%),
    radial-gradient(circle at 12% 82%, rgba(180, 108, 255, .3), transparent 42%),
    radial-gradient(circle at 50% 50%, rgba(111, 255, 158, .12), transparent 56%);
  --cm-light-button-shadow: inset 0 1px 1px rgba(255, 255, 255, .5), inset 0 -2px 4px rgba(28, 48, 63, .2), 0 4px 8px rgba(8, 19, 28, .18);
  --cm-light-button-primary-shadow: inset 0 1px 1px rgba(255, 255, 255, .66), inset 0 -2px 4px rgba(28, 48, 63, .2), -1px 0 0 rgba(84, 230, 255, .44), 1px 0 0 rgba(255, 139, 219, .36), 0 5px 10px rgba(8, 19, 28, .22);
  --cm-light-button-secondary-shadow: inset 0 1px 1px rgba(255, 255, 255, .42), inset 0 -2px 4px rgba(28, 48, 63, .2), 0 4px 8px rgba(8, 19, 28, .16);
}

/* why: 44px 内晕范围、4px 柔化和 8s 慢速流动逐项复刻家园弹窗，避免旧镭射环抢眼。 */
@property --cm-light-prism-angle {
  syntax: '<angle>';
  initial-value: 0deg;
  inherits: false;
}
@keyframes cmLightPrismDrift { to { --cm-light-prism-angle: 360deg; } }

/* why: 峰值 1.045 比旧 1.08 更软，回落 .985 后在终点减速归零；420ms 保持弹出果断。 */
@keyframes cmLightGlassCenteredIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.72); }
  64% { opacity: 1; transform: translate(-50%, -50%) scale(1.045); }
  82% { opacity: 1; transform: translate(-50%, -50%) scale(.985); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* why: 关闭仅轻缩到 .92 并用 240ms 淡出，去掉旧故障式骤灭。 */
@keyframes cmLightGlassCenteredOut { to { opacity: 0; transform: translate(-50%, -50%) scale(.92); } }
/* why: 阶段弹窗由 grid 居中，不带 translate；沿用同一回弹幅度以免定位漂移。 */
@keyframes cmLightGlassPanelIn {
  0% { opacity: 0; transform: scale(.72); }
  64% { opacity: 1; transform: scale(1.045); }
  82% { opacity: 1; transform: scale(.985); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes cmLightGlassPanelOut { to { opacity: 0; transform: scale(.92); } }

/* why: 显式点名目标弹窗，保持尺寸、定位和内容布局，仅替换玻璃表面。 */
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-rate-popup, .cm-stage-popup, .cm-temp-prompt, .cm-upg-popup) {
  border: 1.5px solid var(--cm-light-popup-border);
  border-radius: 15px;
  background: var(--cm-light-popup-bg);
  -webkit-backdrop-filter: var(--cm-light-popup-backdrop);
  backdrop-filter: var(--cm-light-popup-backdrop);
  box-shadow: var(--cm-light-popup-shadow);
  text-shadow: var(--cm-glass-text-outline);
  isolation: isolate;
  overflow: visible;
}
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-rate-popup, .cm-stage-popup, .cm-temp-prompt, .cm-upg-popup) > * { position: relative; z-index: 1; }
/* why: 44px 边缘晕染、4px 柔化和 8s 慢速旋转逐项复刻家园升级弹窗，不把白光铺满面板。 */
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-rate-popup, .cm-stage-popup, .cm-temp-prompt, .cm-upg-popup)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: conic-gradient(from var(--cm-light-prism-angle), #ff3d8b, #ff9a3d, #ffe23d, #6fff9e, #4ac8ff, #b46cff, #ff3d8b);
  -webkit-mask: linear-gradient(to right, #000, transparent 44px) left / 44px 100% no-repeat, linear-gradient(to left, #000, transparent 44px) right / 44px 100% no-repeat, linear-gradient(to bottom, #000, transparent 44px) top / 100% 44px no-repeat, linear-gradient(to top, #000, transparent 44px) bottom / 100% 44px no-repeat;
  mask: linear-gradient(to right, #000, transparent 44px) left / 44px 100% no-repeat, linear-gradient(to left, #000, transparent 44px) right / 44px 100% no-repeat, linear-gradient(to bottom, #000, transparent 44px) top / 100% 44px no-repeat, linear-gradient(to top, #000, transparent 44px) bottom / 100% 44px no-repeat;
  -webkit-mask-composite: source-over;
  mask-composite: add;
  filter: blur(4px);
  opacity: .6;
  mix-blend-mode: screen;
  animation: cmLightPrismDrift 8s linear infinite;
  pointer-events: none;
}
/* why: 1.5px 静态棱镜边与家园弹窗完全一致，彩边清晰但不旋转抢眼。 */
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-rate-popup, .cm-stage-popup, .cm-temp-prompt, .cm-upg-popup)::after {
  content: "";
  position: absolute;
  inset: -1.5px;
  z-index: -1;
  padding: 1.5px;
  border-radius: inherit;
  background: conic-gradient(from 212deg, rgba(88, 232, 255, .92), rgba(154, 130, 255, .74), rgba(255, 142, 220, .68), rgba(255, 230, 166, .62), rgba(132, 255, 229, .84), rgba(88, 232, 255, .92));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  filter: drop-shadow(0 0 2px rgba(164, 226, 255, .28));
  opacity: .78;
  animation: none;
  pointer-events: none;
}

/* why: 常规居中弹窗统一轻回弹；升级反馈是短暂 toast，保留其原时序。 */
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-temp-prompt) { animation: cmLightGlassCenteredIn 420ms cubic-bezier(.18, .78, .24, 1) both; }
:is(.cm-ad-popup.cm-holo, .cm-mult-popup, .cm-temp-prompt).is-closing { animation: cmLightGlassCenteredOut 240ms cubic-bezier(.35, 0, .65, 1) both; }
.cm-stage-popup { animation: cmLightGlassPanelIn 420ms cubic-bezier(.18, .78, .24, 1) both; }
.cm-stage-popup.is-closing { animation: cmLightGlassPanelOut 240ms cubic-bezier(.35, 0, .65, 1) both; }

/* why: 目标弹窗按钮复刻家园升级按钮的浅玻璃层级；多色阴影只作轻微外辉光，不改变热区。 */
:is(.cm-mult-btn, .cm-ad-popup.cm-holo .cm-rate-boost-btn, .cm-temp-prompt .ov-prompt-btn) {
  position: relative;
  isolation: isolate;
  overflow: visible;
  border: 1px solid rgba(255, 255, 255, .34);
  border-radius: 10px;
  background: var(--cm-light-button-rainbow), var(--cm-light-button-bg);
  color: #fff;
  box-shadow: var(--cm-light-button-shadow);
  text-shadow: 0 0 4px rgba(255, 255, 255, .32), 0 2px 6px rgba(0, 0, 0, .94);
  -webkit-backdrop-filter: blur(3px) saturate(.9);
  backdrop-filter: blur(3px) saturate(.9);
}
:is(.cm-mult-btn.is-active, .cm-ad-popup.cm-holo .cm-rate-boost-btn:not(:disabled), .cm-temp-prompt .ov-prompt-btn.primary) {
  background: var(--cm-light-button-rainbow), var(--cm-light-button-primary-bg);
  border-color: rgba(210, 246, 255, .58);
  box-shadow: var(--cm-light-button-primary-shadow);
}
/* why: 次操作按钮使用家园 secondary 的更低白度表面，和主操作形成清晰层级。 */
.cm-temp-prompt .ov-prompt-btn.ghost {
  background: var(--cm-light-button-rainbow), var(--cm-light-button-secondary-bg);
  border-color: rgba(255, 255, 255, .28);
  box-shadow: var(--cm-light-button-secondary-shadow);
}
:is(.cm-mult-btn, .cm-ad-popup.cm-holo .cm-rate-boost-btn, .cm-temp-prompt .ov-prompt-btn)::before { animation: none; opacity: 0; }
/* why: 按钮外部的低透明彩虹光圈复刻家园操作按钮；只占视觉层，不扩大按钮热区。 */
:is(.cm-mult-btn, .cm-ad-popup.cm-holo .cm-rate-boost-btn, .cm-temp-prompt .ov-prompt-btn)::after {
  content: "";
  position: absolute;
  inset: -20%;
  z-index: -1;
  border-radius: 50%;
  background: conic-gradient(from var(--cm-light-prism-angle), #ff3d8b, #ff9a3d, #ffe23d, #6fff9e, #4ac8ff, #b46cff, #ff3d8b);
  -webkit-mask: radial-gradient(closest-side, #000 24%, rgba(0, 0, 0, .4) 54%, transparent 80%);
  mask: radial-gradient(closest-side, #000 24%, rgba(0, 0, 0, .4) 54%, transparent 80%);
  filter: blur(16px);
  opacity: .68;
  mix-blend-mode: screen;
  animation: cmLightPrismDrift 8s linear infinite;
  pointer-events: none;
}
:is(.cm-mult-btn.is-locked, .cm-ad-popup.cm-holo .cm-rate-boost-btn:disabled, .cm-temp-prompt .ov-prompt-btn:disabled, .cm-temp-prompt .ov-prompt-btn.is-disabled) {
  background: var(--cm-light-button-bg);
  opacity: .5;
  filter: grayscale(.28) brightness(.88);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 4px 10px rgba(0, 0, 0, .16);
}
/* why: 只有可点击按钮显示家园式炫彩；锁定/禁用按钮连外围彩光也一起收掉。 */
:is(.cm-mult-btn.is-locked, .cm-ad-popup.cm-holo .cm-rate-boost-btn:disabled, .cm-temp-prompt .ov-prompt-btn:disabled, .cm-temp-prompt .ov-prompt-btn.is-disabled)::after { opacity: 0; }
/* why: 字幕移动到屏幕上方安全区；参数按 1920×1080 基准缩放，0.56s 破裂与 16 粒子是在手机上仍清晰且不卡顿的最小完整水泡效果。 */
.cm-video-subtitle {
  --cm-subtitle-cyan: rgba(102, 241, 255, .88);
  --cm-subtitle-blue: rgba(105, 150, 255, .82);
  --cm-subtitle-pink: rgba(255, 126, 229, .76);
  --cm-subtitle-glow: rgba(147, 202, 255, .8);
  position: absolute;
  left: 50%;
  top: max(calc(env(safe-area-inset-top, 0px) + 104px * var(--ui-top-control-scale)), 17.5%); /* why: 字幕气泡从顶部控制区继续下移约 4% 画框高，避开阶段框、进度条和抓取进度文字。 */
  z-index: 8;
  max-width: min(82%, 560px);
  min-width: min(180px, 58%);
  padding: calc(11px * var(--ui-top-control-scale)) calc(24px * var(--ui-top-control-scale));
  transform: translate3d(-50%, 0, 0);
  border-radius: 999px;
  color: #fff;
  font-size: clamp(16px, calc(20px * var(--ui-scale, 1)), 22px);
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  isolation: isolate;
  pointer-events: none;
}
.cm-subtitle-glass {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border: 0;
  border-radius: inherit;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.cm-subtitle-rim {
  position: absolute;
  inset: -3px;
  z-index: 1;
  width: calc(100% + 6px);
  height: calc(100% + 6px);
  overflow: visible;
  filter: none;
}
.cm-subtitle-rim path {
  fill: none;
  stroke: rgba(218, 250, 255, .92);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.cm-subtitle-rim-burst-segment {
  opacity: 0;
}
.cm-subtitle-text {
  /* why: 用户再次要求加强外阴影和外发光；0.65px 黑描边配合 9px 黑扩散稳住亮背景，冷白青辉光扩大到 38px。 */
  position: relative;
  z-index: 2;
  display: block;
  font-family: 'PHFT Regular Subtitle', 'PingFang SC', sans-serif;
  font-weight: 400;
  -webkit-text-stroke: .65px rgba(0, 0, 0, .96);
  paint-order: stroke fill;
  text-shadow:
    0 3px 7px rgba(0, 0, 0, 1),
    0 0 9px rgba(0, 0, 0, .98),
    0 0 11px rgba(235, 254, 255, 1),
    0 0 22px rgba(127, 231, 255, .98),
    0 0 38px rgba(57, 178, 255, .82);
}
html:not([lang^="zh"]) .cm-subtitle-text {
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; /* why: 普惠体字幕子集只覆盖中文；其他九种文字交给手机系统的本地语言字体，避免日/韩/泰字符混用回退字形。 */
}
.cm-subtitle-particles {
  position: absolute;
  inset: 0;
  z-index: 3;
  overflow: visible;
  opacity: 0;
}
.cm-subtitle-particles i {
  position: absolute;
  left: var(--particle-left);
  top: var(--particle-top);
  width: var(--particle-size);
  height: var(--particle-size);
  margin: calc(var(--particle-size) / -2);
  border-radius: 70% 35% 70% 35%;
  border: .5px solid rgba(235, 254, 255, .72);
  background: linear-gradient(145deg, rgba(255, 255, 255, .88), rgba(169, 232, 244, .68) 54%, rgba(76, 145, 163, .42));
  box-shadow: none;
  opacity: 0;
}
.cm-video-subtitle.is-entering {
  animation: cm-subtitle-float-in .8s cubic-bezier(.2, .82, .22, 1) both;
}
.cm-video-subtitle.is-entering .cm-subtitle-glass,
.cm-video-subtitle.is-entering .cm-subtitle-rim {
  animation: cm-subtitle-circle-expand .8s cubic-bezier(.18, .88, .22, 1.12) both;
}
.cm-video-subtitle.is-entering .cm-subtitle-text {
  animation: cm-subtitle-text-appear .8s ease-out both;
}
.cm-video-subtitle.is-visible .cm-subtitle-glass {
  animation: cm-subtitle-breathe 1.8s ease-in-out infinite;
}
.cm-video-subtitle.is-bursting {
  /* why: 气泡本体在 280ms 内结束上浮，水滴由独立动画继续保留，不再被气泡节奏拖慢。 */
  animation: cm-subtitle-bubble-float-away .28s cubic-bezier(.3, .72, .25, 1) both;
}
.cm-video-subtitle.is-bursting .cm-subtitle-rim {
  animation: cm-subtitle-rim-fade .22s linear both;
}
.cm-video-subtitle.is-bursting .cm-subtitle-rim-soft-shape {
  opacity: 0;
}
.cm-video-subtitle.is-bursting .cm-subtitle-rim-burst-segment {
  opacity: 1;
  animation: cm-subtitle-rim-segment-erase .05s var(--segment-delay) linear both; /* why: 50ms 单段擦除配合 14ms 错峰，让边缘约 204ms 内由底到顶完全破开。 */
}
.cm-video-subtitle.is-bursting .cm-subtitle-glass {
  animation: cm-subtitle-glass-pop .22s .02s steps(6, end) both; /* why: 6 步在 240ms 内收掉水膜，形成更干脆的瞬间破裂。 */
}
.cm-video-subtitle.is-bursting .cm-subtitle-text {
  animation: cm-subtitle-text-dissolve .20s .02s ease-out both; /* why: 文字跟随气泡本体快速结束，不能与较长粒子余韵一起拖尾。 */
}
.cm-video-subtitle.is-bursting .cm-subtitle-particles {
  opacity: 1;
}
.cm-video-subtitle.is-bursting .cm-subtitle-particles i {
  animation: cm-subtitle-particle-burst .38s var(--particle-delay) cubic-bezier(.12, .68, .28, 1) both; /* why: 用户允许粒子更久；380ms 展开法线水花和重力下坠，与快速消失的气泡形成余韵。 */
}
@keyframes cm-subtitle-float-in {
  0% { opacity: 0; transform: translate3d(-50%, 30px, 0); }
  42% { opacity: 1; transform: translate3d(-50%, -3px, 0); }
  100% { opacity: 1; transform: translate3d(-50%, 0, 0) scale(1); filter: blur(0); }
}
@keyframes cm-subtitle-circle-expand {
  0% { opacity: .8; transform: scale(.22, .92); }
  42% { opacity: 1; transform: scale(.25, 1); }
  78% { transform: scale(1.035, .94); }
  100% { opacity: 1; transform: scale(1); }
}
@keyframes cm-subtitle-text-appear {
  0%, 46% { opacity: 0; transform: translate3d(0, 5px, 0); filter: blur(3px); }
  100% { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
}
@keyframes cm-subtitle-breathe {
  0%, 100% { transform: scale(1); filter: brightness(1); }
  38% { transform: scale(1.022, .94); filter: brightness(1.1); border-radius: 48% / 58%; }
  68% { transform: scale(.988, 1.035); filter: brightness(1.04); border-radius: 52% / 44%; }
}
@keyframes cm-subtitle-bubble-float-away {
  0% { transform: translate3d(-50%, 0, 0); }
  100% { transform: translate3d(-50%, -24px, 0); }
}
@keyframes cm-subtitle-rim-fade {
  0%, 96% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes cm-subtitle-rim-segment-erase {
  0% { opacity: 1; }
  100% { opacity: 0; }
}
@keyframes cm-subtitle-glass-pop {
  0% { clip-path: inset(0 0 0 0); opacity: 1; transform: scale(1); border-radius: 999px; }
  18% { transform: scale(1.04, .88); border-radius: 46% / 62%; }
  34% { transform: scale(.97, 1.08); border-radius: 54% / 40%; }
  100% { clip-path: inset(0 0 100% 0); opacity: 0; transform: scale(1.08, .82); }
}
@keyframes cm-subtitle-text-dissolve {
  0% { opacity: 1; transform: translate3d(0, 0, 0); filter: blur(0); }
  42% { opacity: .82; transform: translate3d(0, -2px, 0); filter: blur(.35px); }
  100% { opacity: 0; transform: translate3d(0, -9px, 0) scale(.97); filter: blur(3px); }
}
@keyframes cm-subtitle-particle-burst {
  0% { opacity: 0; transform: translate3d(0, 0, 0) rotate(var(--particle-rotate)) scale(.2); }
  18% { opacity: .92; transform: translate3d(0, 0, 0) rotate(var(--particle-rotate)) scale(1); }
  58% {
    opacity: .7;
    transform: translate3d(var(--particle-mid-x), var(--particle-mid-y), 0) rotate(var(--particle-rotate)) scale(.8);
  }
  100% {
    opacity: 0;
    transform: translate3d(var(--particle-x), var(--particle-fall-y), 0) rotate(var(--particle-rotate)) scale(.38);
  }
}

/* 满圈部位选择：HUD 按屏幕归属方向退出，字幕不参与退场。 */
.cm-frame {
  --interaction-hud-exit-ms: 820ms; /* why: 与 app.jsx 状态机一致；前段清楚位移、末段淡出，避免再次像直接消失。 */
  --interaction-hud-return-ms: 360ms; /* why: 回场略快，让互动视频开始时主界面及时恢复。 */
  --interaction-exit-left: -125%; /* why: 使用自身宽度的 125% 并叠加画框位移，小屏也能完全离开安全区。 */
  --interaction-exit-right: 150%; /* why: 设置按钮较小，需要更大的自身位移才能完全出屏。 */
  --interaction-exit-up: -180%; /* why: 顶部进度与阶段框要越过刘海安全区。 */
  --interaction-exit-down: 180%; /* why: 底栏和任务条越过画框底边，不在圆角处露边。 */
}
.cm-topbar,
.cm-gift-exit-shell,
.cm-trigger-box,
.tq-card,
.cm-ring-stage,
.cm-charge-panel > .cm-grab-title,
.cm-settings-btn,
.guide-bar,
.cm-tabbar {
  transition-property: transform, opacity;
  transition-duration: var(--interaction-hud-return-ms);
  transition-timing-function: cubic-bezier(.22, .82, .2, 1); /* why: 回场带轻微弹性，但不改变控件原始缩放。 */
  will-change: transform, opacity;
}
.cm-gift-exit-shell {
  position: absolute;
  inset: 0;
  z-index: 5; /* why: 外壳只承接礼包退场位移，层级沿用左侧卡片区并保持低于字幕与互动按钮。 */
  pointer-events: none;
}
.cm-gift-exit-shell .cm-gift-btn {
  pointer-events: auto;
}
.cm-frame.is-interaction-hud-exiting .cm-topbar,
.cm-frame.is-interaction-choosing .cm-topbar,
.cm-frame.is-interaction-resolving .cm-topbar,
.cm-frame.is-interaction-hud-exiting .cm-gift-exit-shell,
.cm-frame.is-interaction-choosing .cm-gift-exit-shell,
.cm-frame.is-interaction-resolving .cm-gift-exit-shell,
.cm-frame.is-interaction-hud-exiting .cm-trigger-box,
.cm-frame.is-interaction-choosing .cm-trigger-box,
.cm-frame.is-interaction-resolving .cm-trigger-box,
.cm-frame.is-interaction-hud-exiting .tq-card,
.cm-frame.is-interaction-choosing .tq-card,
.cm-frame.is-interaction-resolving .tq-card {
  transform: translate3d(calc(-100vw - var(--interaction-exit-left)), 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--interaction-hud-exit-ms) cubic-bezier(.32, .05, .18, 1), opacity 240ms 560ms linear; /* why: 先保留实体看清移动，最后 260ms 才淡掉；总时长与 820ms 状态机对齐。 */
}
.cm-frame.is-interaction-hud-exiting .cm-gift-exit-shell,
.cm-frame.is-interaction-choosing .cm-gift-exit-shell,
.cm-frame.is-interaction-resolving .cm-gift-exit-shell {
  transform: translate3d(-110%, 0, 0); /* why: 礼包退场壳铺满整个画框，不能复用卡片宽度补偿公式；固定向左越过一整屏并多留 10% 安全量。 */
}
.cm-frame.is-interaction-hud-exiting .cm-charge-panel > .cm-grab-title,
.cm-frame.is-interaction-choosing .cm-charge-panel > .cm-grab-title,
.cm-frame.is-interaction-resolving .cm-charge-panel > .cm-grab-title {
  transform: translate3d(0, calc(-100vh - var(--interaction-exit-up)), 0);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--interaction-hud-exit-ms) cubic-bezier(.32, .05, .18, 1), opacity 240ms 560ms linear;
}
.cm-frame.is-interaction-hud-exiting .cm-settings-btn,
.cm-frame.is-interaction-choosing .cm-settings-btn,
.cm-frame.is-interaction-resolving .cm-settings-btn {
  transform: translate3d(calc(100vw + var(--interaction-exit-right)), 0, 0);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--interaction-hud-exit-ms) cubic-bezier(.32, .05, .18, 1), opacity 240ms 560ms linear;
}
.cm-frame.is-interaction-hud-exiting .cm-ring-stage,
.cm-frame.is-interaction-choosing .cm-ring-stage,
.cm-frame.is-interaction-resolving .cm-ring-stage {
  transform: translate(calc(-50% + var(--ui-ring-dx, 0px)), calc(-50% + var(--ui-ring-dy, 0px))) scale(0);
  opacity: 0;
  pointer-events: none;
  transition: transform 420ms cubic-bezier(.5, 0, 1, .42), opacity 110ms 310ms linear; /* why: 常态倍率圈在进入部位选择时必须以自身中心完整缩到 0，而不是被稳定态白名单瞬间硬切掉。 */
}
.cm-frame.is-interaction-hud-exiting .guide-bar,
.cm-frame.is-interaction-choosing .guide-bar,
.cm-frame.is-interaction-resolving .guide-bar {
  transform: translate3d(0, calc(100vh + var(--interaction-exit-down)), 0);
  opacity: 0;
  pointer-events: none;
  transition: transform 680ms cubic-bezier(.32, .05, .18, 1), opacity 220ms 440ms linear; /* why: 任务条路程短于底栏，680ms 可同时到达边界且不再先瞬间消失。 */
}
.cm-frame.is-interaction-hud-exiting .cm-tabbar,
.cm-frame.is-interaction-choosing .cm-tabbar,
.cm-frame.is-interaction-resolving .cm-tabbar {
  transform: translate3d(0, calc(100vh + var(--interaction-exit-down)), 0);
  opacity: 0;
  pointer-events: none;
  transition: transform var(--interaction-hud-exit-ms) cubic-bezier(.32, .05, .18, 1), opacity 240ms 560ms linear;
}

/* why: 各控件可能有自己的 transform 动画（礼包呼吸、心动圈、触发卡），单独列退场选择器仍可能被动画覆盖；
   进入稳定选择态后改用直接子层白名单，严格只保留待机视频、字幕和部位选择层。 */
.cm-frame.is-interaction-choosing > :not(.cm-swipe-stage):not(.cm-video-subtitle):not(.cm-interaction-choice) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}
.cm-frame.is-interaction-resolving > :not(.cm-swipe-stage):not(.cm-touch-video):not(.cm-video-subtitle):not(.cm-interaction-choice):not(.cm-video-dissolve-layer):not(.cm-video-dissolve-veil) {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

.cm-interaction-choice {
  --choice-water: rgba(201, 238, 255, .2); /* why: 延续字幕液泡的浅水质感，不用紫色实底遮人物。 */
  --choice-rim: rgba(218, 249, 255, .3); /* why: 用户指定按钮边缘 30% 透明度，让静态圆泡退后、点击涟漪成为主要视觉提示。 */
  --choice-ripple: rgba(255, 255, 255, .72); /* why: 用户指定涟漪只用白色；72% 保持动态提示清楚但不重新压过人物。 */
  position: absolute;
  inset: 0;
  z-index: 7; /* why: 高于玩法 HUD/视频、低于 z-index 8 的字幕，确保字幕始终保留。 */
  pointer-events: none;
}
.cm-interaction-choice-copy {
  position: absolute;
  left: 50%;
  top: max(calc(env(safe-area-inset-top, 0px) + 18px), 4.5%); /* why: 说明整体移到屏幕顶部，并保留刘海安全区；4.5% 在 9:16 手机上不会贴死边缘。 */
  width: min(92%, 760px);
  opacity: 0;
  transform: translate3d(-50%, 14px, 0);
  color: #fff;
  font-family: "Alibaba PuHuiTi", "Alibaba PuHuiTi 3.0", sans-serif;
  font-size: clamp(22px, calc(30px * var(--ui-scale, 1)), 34px); /* why: 从原 16–24px 放大到 22–34px，顶部说明在手机上无需靠近也能读清。 */
  font-weight: 400;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .92), 0 0 8px rgba(255, 255, 255, .92), 0 0 16px rgba(255, 255, 255, .7);
  transition: opacity 220ms ease, transform 320ms cubic-bezier(.18, .78, .22, 1); /* why: 文案随液泡浮现，不抢先盖住退场 HUD。 */
}
.cm-interaction-choice.is-visible .cm-interaction-choice-copy {
  opacity: 1;
  transform: translate3d(-50%, 0, 0);
}
.cm-intimacy-unlock {
  position: absolute;
  left: 50%;
  top: max(calc(env(safe-area-inset-top, 0px) + 76px), 12.5%); /* why: 亲密提示位于顶部大字下方，并为刘海、字幕气泡和两行信息保留垂直安全间距。 */
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(7px, calc(10px * var(--ui-scale, 1)), 12px);
  width: max-content;
  max-width: 92%;
  opacity: 0;
  transform: translateX(-50%); /* why: 倍率章与展开文案必须以组合后的总宽度为整体居中；只有 left:50% 会从中线向右排版。 */
  pointer-events: none;
}
.cm-interaction-choice.is-visible .cm-intimacy-unlock {
  animation: cm-intimacy-banner-in 940ms cubic-bezier(.16, .8, .2, 1) 120ms both; /* why: 倍率先从原圆环位置飞来盖章，再由左向右展开文案，总时长低于 HUD 完整退场。 */
}
.cm-intimacy-mult-stamp {
  flex: 0 0 auto;
  color: #fff4bc;
  font-family: "Alibaba PuHuiTi", "Alibaba PuHuiTi 3.0", sans-serif;
  font-size: clamp(20px, calc(27px * var(--ui-scale, 1)), 31px);
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.03em;
  transform-origin: 50% 50%;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .9), 0 0 8px rgba(255, 216, 95, .95), 0 0 16px rgba(255, 187, 62, .72);
  animation: cm-intimacy-stamp-flight 720ms cubic-bezier(.14, .82, .18, 1) both;
}
.cm-intimacy-unlock-copy {
  overflow: hidden;
  max-width: 0;
  white-space: nowrap;
  color: #fff;
  font-family: "Alibaba PuHuiTi", "Alibaba PuHuiTi 3.0", sans-serif;
  font-size: clamp(15px, calc(19px * var(--ui-scale, 1)), 22px); /* why: 与字幕正文同一视觉级别，低于顶部操作说明且不遮挡互动区。 */
  font-weight: 400;
  line-height: 1.35;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .9), 0 0 9px rgba(255, 255, 255, .78);
  animation: cm-intimacy-copy-reveal 420ms ease-out 570ms both;
}
.cm-interaction-bubble.is-intimacy {
  --choice-ripple: rgba(255, 219, 98, .96); /* why: 特殊头部热区由白圈升级为柔金圈，但仍保留水波透明感。 */
}
.cm-interaction-bubble.is-intimacy .cm-interaction-bubble-ripple {
  border-color: rgba(255, 222, 112, .96);
  filter: drop-shadow(0 0 5px rgba(255, 230, 132, .96)) drop-shadow(0 0 12px rgba(255, 193, 70, .72));
  box-shadow: inset 0 0 6px rgba(255, 246, 192, .52), 0 0 10px rgba(255, 205, 70, .7);
}
.cm-interaction-intimacy-particles {
  position: absolute;
  inset: 50%;
  z-index: 3;
  pointer-events: none;
}
.cm-interaction-intimacy-particles i {
  --spark-angle: calc(var(--spark-index) * 36deg); /* why: 10 颗微粒均匀环绕特殊热区，密度足够辨识但不会变成奖励烟花。 */
  position: absolute;
  width: 2px;
  height: 2px;
  border-radius: 50%;
  background: rgba(255, 231, 139, .88);
  box-shadow: 0 0 4px rgba(255, 198, 71, .72);
  animation: cm-intimacy-particle-drift 1.65s ease-out calc(var(--spark-index) * -137ms) infinite; /* why: 负延迟让粒子首次出现即处于分散状态，避免十颗同时从中心喷发。 */
}
.cm-interaction-choice-buttons {
  position: absolute;
  inset: 0;
}
.cm-interaction-bubble {
  position: absolute;
  left: var(--zone-left);
  top: var(--zone-top);
  width: var(--zone-width);
  height: var(--zone-height);
  padding: 0;
  border: 0;
  background: transparent;
  color: #fff;
  pointer-events: auto;
  cursor: pointer;
}
.cm-interaction-bubble-visual {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  left: var(--bubble-x);
  top: var(--bubble-y, 50%); /* why(UI Editor 手校): 每个正式热区的光圈/手指可以分别上下移动，未提供校准值时仍居中。 */
  width: clamp(64px, calc(76px * var(--ui-scale, 1)), 88px);
  aspect-ratio: 1;
  border: 0;
  border-radius: 50%;
  opacity: 0;
  transform: translate3d(-50%, calc(-50% + 28px), 0) scale(0);
  isolation: isolate;
  box-shadow: none; /* why: 用户取消按钮本体外观，只保留涟漪与点击爆裂动效。 */
}
.cm-interaction-choice.is-hud-exiting .cm-interaction-bubble-visual,
.cm-interaction-choice.is-choosing .cm-interaction-bubble-visual {
  opacity: 1;
  animation: cm-interaction-bubble-in 680ms cubic-bezier(.14, .86, .2, 1.12) calc(240ms + var(--choice-delay)) both; /* why: HUD 开始撤退 240ms 后涟漪交叠浮入，错峰保持 90ms，不再等待 820ms 退场完成。 */
}
.cm-interaction-bubble-glass {
  position: absolute;
  inset: 0;
  z-index: 1;
  border-radius: inherit;
  background: linear-gradient(145deg, rgba(255, 255, 255, .2), var(--choice-water) 52%, rgba(145, 192, 225, .12));
  backdrop-filter: blur(5px) saturate(1.08); /* why: 5px 只柔化泡内视频，不形成椭圆遮罩。 */
  -webkit-backdrop-filter: blur(5px) saturate(1.08);
}
.cm-interaction-bubble-glass,
.cm-interaction-bubble-rim {
  display: none; /* why: 彻底取消按钮玻璃本体与静态描边，画面只留下白色涟漪和点击后的水粒子。 */
}
.cm-interaction-bubble-rim {
  position: absolute;
  inset: -2px; /* why: 给持续形变的 SVG 描边留出 2px 呼吸空间，不让波峰被圆泡盒裁切。 */
  z-index: 3;
  width: calc(100% + 4px);
  height: calc(100% + 4px);
  overflow: visible;
  pointer-events: none;
}
.cm-interaction-bubble-rim path {
  fill: none;
  stroke: var(--choice-rim);
  stroke-width: 1.35;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.cm-interaction-bubble-ripple {
  position: absolute;
  inset: -10%; /* why: 涟漪从圆形泡泡边缘贴着出生，不留断层。 */
  z-index: 2;
  border: 2px solid var(--choice-ripple);
  border-radius: 50%;
  opacity: 0;
  pointer-events: none;
  filter: drop-shadow(0 0 5px rgba(255, 255, 255, .98)) drop-shadow(0 0 12px rgba(255, 255, 255, .76)); /* why: 双层纯白发光强化水波扩散，不再混入蓝色色相。 */
  box-shadow: inset 0 0 6px rgba(255, 255, 255, .48), 0 0 10px rgba(255, 255, 255, .64); /* why: 内外光晕全部改为中性白，在不同色视频上不产生蓝边。 */
  animation: cm-interaction-ripple 1.08s ease-out calc(var(--hand-loop-delay) + 540ms) infinite; /* why: 每次手指沿指向轴到达人物触点时只生成一道涟漪，不再用紧邻双圈模拟重复点击。 */
}
.cm-interaction-tap-hand {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 5;
  width: clamp(62px, calc(78px * var(--ui-scale, 1)), 92px); /* why: 手势需要比 64–88px 涟漪略大才构成强提示，同时上限 92px 避免遮住人物面部。 */
  aspect-ratio: 1;
  background: url("assets/ui/main-v2/icon_tap_hand-v1.png") center / contain no-repeat;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .42)) drop-shadow(0 0 7px rgba(255, 255, 255, .72)); /* why: 深浅视频背景都要辨认出白色手势，黑阴影负责轮廓，白光只做轻量材质呼应。 */
  pointer-events: none;
  transform-origin: var(--hand-origin-x) 82%; /* why: 原图指尖在 38%/82%，水平镜像后变成 62%/82%；左右手势都必须围绕真实指尖旋转。 */
  opacity: .96; /* why: 用户要求手势常显，循环中不再通过透明度退场。 */
  animation: cm-interaction-tap-hand 1.08s ease-in-out var(--hand-loop-delay) infinite; /* why: 只保留连续往返的 0→50→100 三点曲线，没有任何重复关键帧停顿；各热区用负延迟永久错相。 */
}
.cm-interaction-bubble.is-selected .cm-interaction-bubble-visual {
  animation: cm-interaction-bubble-pop 90ms ease-out both;
}
.cm-interaction-bubble.is-rejected .cm-interaction-bubble-visual {
  animation: cm-interaction-bubble-remelt 120ms ease-in both;
}
.cm-interaction-bubble-drops {
  position: absolute;
  inset: 50%;
  z-index: 4;
  pointer-events: none;
}
.cm-interaction-bubble-drops i {
  --drop-angle: calc(var(--drop-index) * 30deg); /* why: 12 颗水滴按整圆法线均匀喷出。 */
  position: absolute;
  width: 3px; /* why: 手机端 3px 是水滴可见且不显烟花的上限。 */
  height: 6px; /* why: 二比一滴形比圆粒子更像水。 */
  border-radius: 70% 45% 70% 45%;
  background: rgba(210, 241, 255, .72);
  opacity: 0;
  transform: rotate(var(--drop-angle)) translateY(0);
}
.cm-interaction-bubble.is-selected .cm-interaction-bubble-drops i {
  animation: cm-interaction-water-drop 620ms cubic-bezier(.18, .68, .26, 1) both;
  animation-delay: calc(var(--drop-index) * 7ms); /* why: 轻微参差让破裂更自然，但全部在 90ms 泡体爆开后出发。 */
}
@keyframes cm-interaction-tap-hand {
  0% { transform: translate(var(--hand-anchor-x), -82%) translate3d(var(--hand-away-x), var(--hand-away-y), 0) rotate(var(--hand-rotation)) scaleX(var(--hand-facing)) scale(.96); }
  50% { transform: translate(var(--hand-anchor-x), -82%) translate3d(var(--hand-touch-x), var(--hand-touch-y), 0) rotate(var(--hand-rotation)) scaleX(var(--hand-facing)) scale(.96); }
  100% { transform: translate(var(--hand-anchor-x), -82%) translate3d(var(--hand-away-x), var(--hand-away-y), 0) rotate(var(--hand-rotation)) scaleX(var(--hand-facing)) scale(.96); }
}
.cm-interaction-choice-feedback {
  position: absolute;
  left: var(--choice-x);
  top: var(--choice-y);
  width: clamp(340px, calc(460px * var(--ui-scale, 1)), 520px); /* why: 用户指定点击后完整满格倍率圆环放大为上一版的两倍，170/230/260 三档同步乘 2，中心仍固定在所选部位。 */
  aspect-ratio: 1;
  animation: cm-interaction-feedback-pop 520ms cubic-bezier(.16, .76, .22, 1) both; /* why: 倍率从点击部位弹出，生命周期覆盖液泡爆开与 HUD 回场起步。 */
}
.cm-interaction-choice-full-ring {
  position: absolute;
  inset: 0;
  display: block;
  border-radius: 50%;
  filter: drop-shadow(0 8px 16px rgba(0, 0, 0, .46));
}
.cm-interaction-choice-full-ring .cm-ring-center .title {
  max-width: 78%;
  font-size: clamp(15px, calc(21px * var(--ui-scale, 1)), 24px);
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, .86), 0 0 12px var(--ring-color);
}
.cm-interaction-choice-full-ring .cm-ring-center .mult-display {
  font-size: clamp(25px, calc(36px * var(--ui-scale, 1)), 42px);
}
@keyframes cm-interaction-bubble-in {
  0% { opacity: 0; transform: translate3d(-50%, calc(-50% + 28px), 0) scale(0); border-radius: 50%; }
  38% { opacity: 1; transform: translate3d(-50%, calc(-50% - 7px), 0) scale(.66, 1.12); border-radius: 50%; }
  72% { transform: translate3d(-50%, calc(-50% + 3px), 0) scale(1.12, .92); }
  100% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); border-radius: 50%; }
}
@keyframes cm-interaction-ripple {
  0% { opacity: 1; transform: scale(.78); }
  34% { opacity: .82; }
  72% { opacity: .36; }
  100% { opacity: 0; transform: scale(1.72); } /* why: 不在关键帧里写死白色，普通热区继承白色、亲密热区才能完整继承金色；最大扩散仍收紧在 1.72 倍。 */
}
@keyframes cm-intimacy-banner-in {
  0% { opacity: 0; }
  18% { opacity: 1; }
  100% { opacity: 1; }
}
@keyframes cm-intimacy-stamp-flight {
  0% { opacity: 1; transform: translate3d(var(--stamp-flight-x, 0px), var(--stamp-flight-y, 0px), 0) scale(2.35) rotate(0deg); }
  52% { opacity: 1; transform: translate3d(0, 0, 0) scale(1.28) rotate(-8deg); }
  70% { transform: translate3d(0, 0, 0) scale(.9) rotate(-8deg); }
  100% { opacity: 1; transform: translate3d(0, 0, 0) scale(1) rotate(-8deg); }
}
@keyframes cm-intimacy-copy-reveal {
  from { opacity: 0; max-width: 0; transform: translateX(-6px); }
  to { opacity: 1; max-width: min(76vw, 34em); transform: translateX(0); } /* why: 用真实宽度从左向右展开，既不触发字幕矩形裁切回归，也能给长语言保留 76vw 可见空间。 */
}
@keyframes cm-intimacy-particle-drift {
  0% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(-28px) scale(.5); }
  24% { opacity: .92; }
  100% { opacity: 0; transform: rotate(var(--spark-angle)) translateY(-58px) scale(.18); }
}
@keyframes cm-interaction-bubble-pop {
  0% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-50%, calc(-50% - 2px), 0) scale(1.18, .72); }
}
@keyframes cm-interaction-bubble-remelt {
  0% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1); }
  100% { opacity: 0; transform: translate3d(-50%, calc(-50% + 5px), 0) scale(.18); }
}
@keyframes cm-interaction-water-drop {
  0% { opacity: .9; transform: rotate(var(--drop-angle)) translateY(0) scale(.7); }
  55% { opacity: .72; }
  100% { opacity: 0; transform: rotate(var(--drop-angle)) translateY(-34px) scale(.35); }
}
@keyframes cm-interaction-feedback-pop {
  0% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(.55); }
  24% { opacity: 1; transform: translate3d(-50%, -50%, 0) scale(1.28); }
  100% { opacity: 0; transform: translate3d(-50%, -50%, 0) scale(1.82); } /* why: 满格倍率圆环中心固定在点击部位，只继续扩大并渐隐，不再向上漂移。 */
}
@media (prefers-reduced-motion: reduce) {
  .cm-frame.is-interaction-choice *,
  .cm-interaction-choice * {
    animation-duration: 1ms !important;
    transition-duration: 1ms !important;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm-video-subtitle,
  .cm-video-subtitle *,
  .cm-video-subtitle::before,
  .cm-video-subtitle::after {
    animation-duration: 1ms !important;
    animation-delay: 0ms !important;
  }
}
