/* ============================================================
   Project: NOVA · 模块 2-57：🍓《24灯鲜果跑马机》3D 精雕街机皮肤与多屏自适应样式
   遵循铁律：
   1. 3D 无字精雕底座 + 100% 开源免费商用 SIL OFL 游戏字体立体字效 + 同材质嵌入式展开框
   2. 1:1 像素级对齐 V10 定稿预览（STAGE_COORDS 100%×100% 百分比坐标锁定）
   3. 全手机屏幕比例自适应（--fm-u 整机等比缩放 + --fm-stage-u 中心舞台字号精确联动，零裁切零滚动）
   ============================================================ */

@font-face {
  font-family: 'NovaMonument';
  src: url('../assets/fonts/nova-monument-core.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'NovaMonumentI18n';
  src: url('../assets/fonts/nova-monument-i18n.woff2') format('woff2');
  font-weight: 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'NovaJadeCallig';
  src: url('../assets/fonts/nova-jade-core.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: block;
  unicode-range: U+0000-56DD, U+56DF-63A1, U+63A3-10FFFF;
}
@font-face {
  font-family: 'NovaJadeCalligI18n';
  src: url('../assets/fonts/nova-jade-i18n.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-56DD, U+56DF-63A1, U+63A3-10FFFF;
}
@font-face {
  font-family: 'NovaKai';
  src: url('../assets/fonts/nova-kai-core.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}
@font-face {
  font-family: 'NovaNumeral';
  src: url('../assets/fonts/nova-numeral.woff2') format('woff2');
  font-weight: 700;
  font-style: normal;
  font-display: block;
}

/* Full-screen zero-scroll stage integration inside #view-arcade (Plan A: hide global topbar & bottom nav while in cabinet) */
body.nova-in-fruit-stage header.topbar,
body.nova-in-fruit-stage #appNav {
  display: none !important;
}
body.nova-in-fruit-stage .shell {
  gap: 0 !important;
  padding: max(4px, env(safe-area-inset-top, 0px)) 4px max(6px, env(safe-area-inset-bottom, 0px)) !important;
}
.ah-shell.in-stage-fruit {
  height: calc(100vh - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  height: calc(var(--app-vh, 100vh) - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  height: calc(100dvh - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100vh - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(var(--app-vh, 100vh) - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  max-height: calc(100dvh - 10px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px)) !important;
  padding: 0 !important;
  border: none !important;
  border-radius: 16px !important;
  background: transparent !important;
  box-shadow: none !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
}
.ah-shell.in-stage-fruit #ahGlCanvas {
  opacity: 0.15 !important;
}
.ah-shell.in-stage-fruit .ah-layer,
.ah-shell.in-stage-fruit #ahGameStage,
.ah-shell.in-stage-fruit #ahFruitStageWrap {
  flex: 1 1 0% !important;
  min-height: 0 !important;
  min-width: 0 !important;
  width: 100% !important;
  max-width: 100% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 0 !important;
  overflow: hidden !important;
}

/* ==================== Root Cabinet Frame (V12 1:1 Proportion Lock) ==================== */
#fmCabinetRoot {
  --fm-u: 1px;
  --fm-stage-u: 1px;
  width: min(100%, calc(380 * var(--fm-u)));
  max-width: min(100%, calc(380 * var(--fm-u)));
  min-width: 0;
  height: auto;
  max-height: 100%;
  flex: 0 1 auto;
  min-height: 0;
  border-radius: calc(18 * var(--fm-u));
  overflow: hidden;
  display: flex;
  flex-direction: column;
  position: relative;
  user-select: none;
  -webkit-user-select: none;
  box-sizing: border-box;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.92);
}
#fmCabinetRoot *,
#fmCabinetRoot *::before,
#fmCabinetRoot *::after {
  box-sizing: border-box;
}

#fmCabinetRoot.skin-obsidian {
  font-family: 'NovaMonument', 'NovaMonumentI18n', 'NovaNumeral', 'STZhongsong', 'Noto Serif SC', Georgia, serif;
  background: radial-gradient(circle at 50% 30%, #1a202c 0%, #0d1017 55%, #06080c 100%);
  border: 2.5px solid #c59b27;
}
#fmCabinetRoot.skin-qianli {
  font-family: 'NovaJadeCallig', 'NovaJadeCalligI18n', 'NovaNumeral', 'STXinwei', 'STKaiti', Georgia, serif;
  background: radial-gradient(circle at 50% 30%, #133a36 0%, #092222 55%, #041214 100%);
  border: 2.5px solid #d4af37;
}
#fmCabinetRoot.skin-royal {
  font-family: 'NovaMonument', 'NovaMonumentI18n', 'NovaNumeral', 'STZhongsong', 'Noto Serif SC', Georgia, serif;
  background: radial-gradient(circle at 50% 30%, #450a14 0%, #240409 58%, #0f0204 100%);
  border: 2.5px solid #f59e0b;
}
#fmCabinetRoot.skin-starry {
  font-family: 'NovaMonument', 'NovaMonumentI18n', 'NovaNumeral', 'STZhongsong', 'Noto Serif SC', Georgia, serif;
  background: radial-gradient(circle at 50% 28%, #162e63 0%, #0a1738 56%, #040a1a 100%);
  border: 2.5px solid #fbbf24;
}

#fmCabinetRoot .fm-coin-ico {
  width: calc(12 * var(--fm-u));
  height: calc(12 * var(--fm-u));
  object-fit: contain;
  vertical-align: -2px;
  display: inline-block;
}

/* Metallic Gold Chiseled Relief & Carved Jade Text Effects */
#fmCabinetRoot .gold-relief {
  background: linear-gradient(180deg, #fffef5 0%, #fce394 42%, #d49b35 80%, #9c6816 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fce394;
  filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 3px rgba(212, 175, 55, 0.25));
}
#fmCabinetRoot .emerald-relief {
  background: linear-gradient(180deg, #ecfdf5 0%, #6ee7b7 45%, #10b981 85%, #047857 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #6ee7b7;
  filter: drop-shadow(0 1.5px 1px rgba(0, 0, 0, 0.92)) drop-shadow(0 0 5px rgba(52, 211, 153, 0.45));
}
#fmCabinetRoot .jade-carved {
  color: #1f332c;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.68), 0 -0.5px 0 rgba(0, 0, 0, 0.35);
}
#fmCabinetRoot .jade-vermilion {
  color: #9f1212;
  text-shadow: 0 1px 0 rgba(255, 250, 235, 0.82), 0 0 6px rgba(254, 240, 138, 0.6);
}

/* ==================== 1. Merged Single-Row Game Header (Back + Wallet Pill + Skin + Rules) ==================== */
#fmCabinetRoot .arcade-top-strip {
  height: calc(32 * var(--fm-u));
  padding: 0 calc(6 * var(--fm-u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(4 * var(--fm-u));
  flex-shrink: 0;
}
#fmCabinetRoot.skin-obsidian .arcade-top-strip {
  background: linear-gradient(90deg, #11151f, #1e2536, #11151f);
  border-bottom: 1.5px solid #c59b27;
}
#fmCabinetRoot.skin-qianli .arcade-top-strip {
  background: linear-gradient(90deg, #0b2926, #164e48, #0b2926);
  border-bottom: 1.5px solid #d4af37;
}
#fmCabinetRoot.skin-royal .arcade-top-strip {
  background: linear-gradient(90deg, #2e060d, #540b18, #2e060d);
  border-bottom: 1.5px solid #f59e0b;
}
#fmCabinetRoot.skin-starry .arcade-top-strip {
  background: linear-gradient(90deg, #081430, #16316b, #081430);
  border-bottom: 1.5px solid #fbbf24;
}

#fmCabinetRoot .back-btn,
#fmCabinetRoot .skin-switch-btn,
#fmCabinetRoot .music-quick-btn,
#fmCabinetRoot .help-btn {
  font-family: inherit;
  cursor: pointer;
  line-height: 1.15;
  white-space: nowrap;
  transition: transform 0.1s ease, filter 0.12s ease;
}
#fmCabinetRoot .back-btn:active,
#fmCabinetRoot .skin-switch-btn:active,
#fmCabinetRoot .music-quick-btn:active,
#fmCabinetRoot .help-btn:active {
  transform: scale(0.95);
}

#fmCabinetRoot .back-btn {
  padding: calc(3 * var(--fm-u)) calc(7.5 * var(--fm-u));
  border-radius: calc(5.5 * var(--fm-u));
  font-size: calc(9.6 * var(--fm-u));
  font-weight: 900;
  background: linear-gradient(180deg, #fef08a, #b45309);
  border: 1px solid #fde68a;
  color: #270e04;
  flex-shrink: 0;
}

#fmCabinetRoot .fm-wallet-pill {
  display: flex;
  align-items: center;
  gap: calc(4.5 * var(--fm-u));
  background: linear-gradient(180deg, rgba(16, 20, 29, 0.94), rgba(7, 9, 14, 0.96));
  border: 1px solid #d4af37;
  border-radius: 99px;
  padding: calc(2 * var(--fm-u)) calc(4.5 * var(--fm-u)) calc(2 * var(--fm-u)) calc(7.5 * var(--fm-u));
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.85), 0 1px 4px rgba(0, 0, 0, 0.55);
  min-width: 0;
  max-width: 58%;
  cursor: pointer;
}
#fmCabinetRoot.skin-qianli .fm-wallet-pill {
  background: linear-gradient(180deg, rgba(7, 36, 33, 0.95), rgba(4, 20, 19, 0.98));
  border-color: #fde68a;
}
#fmCabinetRoot.skin-royal .fm-wallet-pill {
  background: linear-gradient(180deg, rgba(45, 6, 13, 0.95), rgba(22, 2, 6, 0.98));
  border-color: #fbbf24;
}
#fmCabinetRoot.skin-starry .fm-wallet-pill {
  background: linear-gradient(180deg, rgba(12, 29, 68, 0.95), rgba(5, 13, 34, 0.98));
  border-color: #fcd34d;
}
#fmCabinetRoot .fm-wallet-coin {
  width: calc(13.5 * var(--fm-u));
  height: calc(13.5 * var(--fm-u));
  object-fit: contain;
  flex-shrink: 0;
}
#fmCabinetRoot .fm-wallet-val {
  font-family: 'NovaNumeral', 'NovaMonument', Georgia, serif;
  font-size: calc(10.8 * var(--fm-u));
  font-weight: 900;
  color: #fde047;
  letter-spacing: 0.3px;
  white-space: nowrap;
  line-height: 1.1;
}
#fmCabinetRoot .fm-wallet-plus {
  width: calc(16.5 * var(--fm-u));
  height: calc(16.5 * var(--fm-u));
  border-radius: 50%;
  background: linear-gradient(180deg, #fef08a, #d97706);
  border: 1px solid #ffffff;
  color: #270e04;
  font-size: calc(11 * var(--fm-u));
  font-weight: 900;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
  padding: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: transform 0.1s ease;
}
#fmCabinetRoot .fm-wallet-plus:active {
  transform: scale(0.9);
}

#fmCabinetRoot .trial-tag {
  font-size: calc(9.1 * var(--fm-u));
  font-weight: 900;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.62);
  padding: calc(2 * var(--fm-u)) calc(7.5 * var(--fm-u));
  border-radius: 99px;
  border: 1px solid #d4af37;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
#fmCabinetRoot .trial-tag b {
  color: #4ade80;
}
#fmCabinetRoot .right-tools {
  display: flex;
  gap: calc(3 * var(--fm-u));
  align-items: center;
  flex-shrink: 0;
}
#fmCabinetRoot .skin-switch-btn {
  padding: calc(3 * var(--fm-u)) calc(6.5 * var(--fm-u));
  border-radius: calc(5.5 * var(--fm-u));
  font-size: calc(9.2 * var(--fm-u));
  font-weight: 900;
  background: linear-gradient(180deg, #374151, #111827);
  border: 1px solid #d4af37;
  color: #fef08a;
}
#fmCabinetRoot.skin-qianli .skin-switch-btn {
  background: linear-gradient(180deg, #0f766e, #115e59);
  border-color: #fde68a;
  color: #ecfdf5;
}
#fmCabinetRoot.skin-royal .skin-switch-btn {
  background: linear-gradient(180deg, #991b1b, #450a0a);
  border-color: #fbbf24;
  color: #fef08a;
}
#fmCabinetRoot.skin-starry .skin-switch-btn {
  background: linear-gradient(180deg, #1d4ed8, #0f2557);
  border-color: #fde68a;
  color: #fef9c3;
}
#fmCabinetRoot .music-quick-btn {
  padding: calc(3 * var(--fm-u)) calc(5.8 * var(--fm-u));
  border-radius: calc(5.5 * var(--fm-u));
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.24), rgba(5, 150, 105, 0.36));
  border: 1px solid rgba(52, 211, 153, 0.72);
  color: #a7f3d0;
  font-size: calc(8.9 * var(--fm-u));
  font-weight: 900;
}
#fmCabinetRoot .music-quick-btn.is-off {
  background: rgba(15, 23, 42, 0.65);
  border-color: rgba(148, 163, 184, 0.42);
  color: #94a3b8;
}
#fmCabinetRoot .help-btn {
  padding: calc(3 * var(--fm-u)) calc(6 * var(--fm-u));
  border-radius: calc(5.5 * var(--fm-u));
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.32);
  color: #ffffff;
  font-size: calc(9.2 * var(--fm-u));
  font-weight: 900;
}

/* ==================== 2. Top Twin 3D Digital Boxes (WIN & STAKE) ==================== */
#fmCabinetRoot .twin-led-bar {
  padding: calc(4 * var(--fm-u)) calc(6 * var(--fm-u)) calc(2.5 * var(--fm-u));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: calc(6 * var(--fm-u));
  flex-shrink: 0;
}
#fmCabinetRoot .arcade-led-frame {
  padding: 2px;
  border-radius: calc(8 * var(--fm-u));
  background: linear-gradient(180deg, #fde68a 0%, #c59b27 50%, #78350f 100%);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.75);
  min-width: 0;
}
#fmCabinetRoot .arcade-led-inner {
  background: linear-gradient(180deg, #0b0908 0%, #050404 100%);
  border-radius: calc(6 * var(--fm-u));
  padding: calc(2 * var(--fm-u)) calc(8 * var(--fm-u));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  min-width: 0;
  flex-wrap: wrap;
}
#fmCabinetRoot .arcade-led-lbl {
  font-size: calc(9.5 * var(--fm-u));
  font-weight: 900;
  color: #e5c158;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
#fmCabinetRoot .arcade-led-digits {
  font-family: 'NovaNumeral', 'NovaMonument', Georgia, serif;
  font-size: calc(14 * var(--fm-u));
  font-weight: 900;
  color: #fbbf24;
  text-shadow: 0 0 6px rgba(245, 158, 11, 0.5);
  letter-spacing: 0.4px;
  margin-left: auto;
  word-break: break-all;
}
#fmCabinetRoot .arcade-led-digits.win-green {
  color: #4ade80;
  text-shadow: 0 0 8px rgba(34, 197, 94, 0.65);
}

/* ==================== 3. Main 7x7 Sculpted 3D Board (1:1 Design Proportion Lock) ==================== */
#fmCabinetRoot .cabinet-board-outer {
  margin: calc(2 * var(--fm-u)) calc(6 * var(--fm-u));
  padding: calc(5 * var(--fm-u));
  border-radius: calc(14 * var(--fm-u));
  position: relative;
  width: calc(100% - 12 * var(--fm-u));
  aspect-ratio: 368 / 444;
  flex: 0 0 auto;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#fmCabinetRoot.skin-obsidian .cabinet-board-outer {
  background: linear-gradient(135deg, #b48a3e 0%, #374151 30%, #111827 70%, #c59b27 100%);
  border: 2px solid #e5c158;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9), inset 0 0 8px #000;
}
#fmCabinetRoot.skin-qianli .cabinet-board-outer {
  background: linear-gradient(135deg, #e5c158 0%, #115e59 35%, #0f4c4a 65%, #d4af37 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.85), inset 0 0 8px #042f2e;
}
#fmCabinetRoot.skin-royal .cabinet-board-outer {
  background: linear-gradient(135deg, #fbbf24 0%, #92400e 35%, #450a0a 70%, #f59e0b 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9), inset 0 0 8px #270e04;
}
#fmCabinetRoot.skin-starry .cabinet-board-outer {
  background: linear-gradient(135deg, #fde047 0%, #1e40af 32%, #0c1d42 70%, #fbbf24 100%);
  border: 2px solid #fef08a;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.9), inset 0 0 8px #050d24;
}

#fmCabinetRoot .perimeter-grid {
  flex: 1 1 0%;
  min-height: 0;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  grid-template-rows: repeat(7, minmax(0, 1fr));
  gap: calc(3 * var(--fm-u));
  padding: calc(3 * var(--fm-u));
  border-radius: calc(10 * var(--fm-u));
}
#fmCabinetRoot.skin-obsidian .perimeter-grid { background: #07090e; border: 1.5px solid #785c22; }
#fmCabinetRoot.skin-qianli .perimeter-grid   { background: #06211f; border: 1.5px solid #b48a3e; }
#fmCabinetRoot.skin-royal .perimeter-grid    { background: #1a0408; border: 1.5px solid #b45309; }
#fmCabinetRoot.skin-starry .perimeter-grid   { background: #050d21; border: 1.5px solid #d4af37; }

/* 24 Perimeter Tiles */
#fmCabinetRoot .f-tile {
  border-radius: calc(7 * var(--fm-u));
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  transition: transform 0.08s ease, box-shadow 0.08s ease;
}
#fmCabinetRoot.skin-obsidian .f-tile {
  background: radial-gradient(circle at 50% 40%, #2d3748 0%, #161b26 65%, #0b0e14 100%);
  border: 1.5px solid #c59b27;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.85);
}
#fmCabinetRoot.skin-obsidian .f-tile.small-tile {
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0f172a 72%, #070a10 100%);
  border: 1.5px solid #64748b;
}
#fmCabinetRoot.skin-obsidian .f-tile.top-king {
  background: radial-gradient(circle at 50% 40%, #78350f 0%, #3b1704 68%, #1c0a00 100%);
  border: 2px solid #fde047;
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.65);
}

#fmCabinetRoot.skin-qianli .f-tile {
  background: radial-gradient(circle at 50% 38%, #ffffff 0%, #f5f0e1 62%, #d8ccb2 100%);
  border: 1.5px solid #c59b27;
  box-shadow: inset 0 2px 3px #ffffff, inset 0 -2px 3px rgba(133, 98, 42, 0.45);
}
#fmCabinetRoot.skin-qianli .f-tile.small-tile {
  background: radial-gradient(circle at 50% 40%, #f0fdf4 0%, #cce3dc 68%, #94b8ad 100%);
  border: 1.5px solid #5f8d7e;
}
#fmCabinetRoot.skin-qianli .f-tile.top-king {
  background: radial-gradient(circle at 50% 40%, #fef9c3 0%, #eab308 68%, #a16207 100%);
  border: 2px solid #fffbeb;
}

#fmCabinetRoot.skin-royal .f-tile {
  background: radial-gradient(circle at 50% 42%, #fffef5 0%, #fde68a 64%, #d97706 100%);
  border: 2px solid #b45309;
  box-shadow: inset 0 1.5px 2px #ffffff, inset 0 -2px 3px rgba(120, 53, 15, 0.55);
}
#fmCabinetRoot.skin-royal .f-tile.small-tile {
  background: radial-gradient(circle at 50% 42%, #f8fafc 0%, #e2e8f0 68%, #94a3b8 100%);
  border: 1.5px solid #64748b;
}
#fmCabinetRoot.skin-royal .f-tile.top-king {
  background: radial-gradient(circle at 50% 40%, #fef08a 0%, #f59e0b 65%, #7c2d12 100%);
  border: 2px solid #fffbeb;
}

#fmCabinetRoot.skin-starry .f-tile {
  background: radial-gradient(circle at 50% 40%, #1e3a8a 0%, #0f204b 66%, #071029 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.45), inset 0 -2px 3px rgba(0, 0, 0, 0.85);
}
#fmCabinetRoot.skin-starry .f-tile.small-tile {
  background: radial-gradient(circle at 50% 40%, #1e293b 0%, #0c1733 72%, #050a1a 100%);
  border: 1.5px solid #60a5fa;
}
#fmCabinetRoot.skin-starry .f-tile.top-king {
  background: radial-gradient(circle at 50% 40%, #fde047 0%, #b45309 66%, #1e3a8a 100%);
  border: 2px solid #fffbeb;
  box-shadow: inset 0 0 8px rgba(251, 191, 36, 0.65);
}

#fmCabinetRoot .f-tile.lucky-tile {
  background: radial-gradient(circle at 50% 38%, #fef08a 0%, #d97706 55%, #7c2d12 100%) !important;
  border: 1.5px solid #fde047 !important;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.48), inset 0 0 6px rgba(255, 251, 235, 0.45);
}
#fmCabinetRoot .f-tile.lucky-tile::before {
  content: "";
  position: absolute;
  inset: -45%;
  background: conic-gradient(
    from 0deg,
    transparent 0deg,
    #ffffff 45deg,
    #fde047 90deg,
    transparent 140deg,
    transparent 180deg,
    #ffffff 225deg,
    #fde047 270deg,
    transparent 320deg
  );
  animation: fmLuckyBorderSpin 2.8s linear infinite;
  pointer-events: none;
  z-index: 1;
}
#fmCabinetRoot .f-tile.lucky-tile::after {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: calc(5.5 * var(--fm-u));
  background: radial-gradient(circle at 50% 36%, #fef08a 0%, #d97706 58%, #7c2d12 100%);
  pointer-events: none;
  z-index: 1;
}
#fmCabinetRoot .f-tile.lucky-tile img.fruit-3d {
  position: relative;
  z-index: 2;
  width: 74%;
  height: 74%;
  transform: translateY(-4.5px);
}
@keyframes fmLuckyBorderSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
#fmCabinetRoot .f-tile img.fruit-3d {
  width: 82%;
  height: 82%;
  object-fit: contain;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.55));
  transform: translateY(-2px);
  pointer-events: none;
}
#fmCabinetRoot .f-tile.small-tile img.fruit-3d {
  width: 78%;
  height: 78%;
}

#fmCabinetRoot .tile-mult-badge {
  position: absolute;
  bottom: 1px;
  right: 2px;
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(10 * var(--fm-u));
  font-weight: 900;
  color: #fffef0;
  -webkit-text-stroke: 2px #5c190c;
  paint-order: stroke fill;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
}
#fmCabinetRoot .tile-mult-badge.small-b {
  font-family: inherit;
  font-size: calc(8 * var(--fm-u));
  background: rgba(12, 16, 28, 0.88);
  color: #fde68a;
  -webkit-text-stroke: 0px;
  padding: 0.5px 3px;
  border-radius: 3px;
  border: 1px solid #c59b27;
  right: 1px;
  bottom: 1px;
}
#fmCabinetRoot .tile-mult-badge.king {
  font-family: inherit;
  left: 0;
  right: 0;
  bottom: 1px;
  text-align: center;
  font-size: calc(8.8 * var(--fm-u));
  color: #fef08a;
  -webkit-text-stroke: 2px #451a03;
}
#fmCabinetRoot .tile-mult-badge.lucky-lbl {
  position: absolute !important;
  z-index: 3;
  font-family: inherit;
  left: 2px;
  right: 2px;
  bottom: 2px;
  height: calc(11.5 * var(--fm-u));
  border-radius: 0 0 calc(4.5 * var(--fm-u)) calc(4.5 * var(--fm-u));
  overflow: hidden;
  display: flex;
  align-items: center;
  background: rgba(20, 8, 4, 0.92);
  border-top: 1px solid rgba(253, 224, 71, 0.72);
  color: #fef08a;
  -webkit-text-stroke: 0px;
  padding: 0;
}
#fmCabinetRoot .tile-mult-badge.lucky-lbl .lucky-marquee-inner {
  display: inline-block;
  white-space: nowrap;
  font-size: calc(8.0 * var(--fm-u));
  font-weight: 900;
  color: #fef08a;
  padding-left: 0;
  animation: fmLuckyTextMarquee 4.0s linear infinite;
}
@keyframes fmLuckyTextMarquee {
  0%   { transform: translateX(0%); }
  100% { transform: translateX(-50%); }
}

#fmCabinetRoot .f-tile {
  cursor: pointer;
}
#fmCabinetRoot .f-tile.trail {
  box-shadow: 0 0 10px rgba(251, 191, 36, 0.72), inset 0 0 6px rgba(254, 240, 138, 0.65) !important;
  border-color: #fde047 !important;
}
#fmCabinetRoot .f-tile.inspect-hl {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 0 12px rgba(56, 189, 248, 0.9), inset 0 0 8px rgba(254, 240, 138, 0.85) !important;
  z-index: 3;
  animation: fmInspectPulse 1.1s ease-in-out infinite alternate;
}
#fmCabinetRoot .f-tile.lit {
  background: radial-gradient(circle, #ffffff 0%, #fde047 55%, #ea580c 100%) !important;
  border: 2.5px solid #ffffff !important;
  box-shadow: 0 0 16px #fbbf24, 0 0 8px #ef4444, inset 0 0 8px #ffffff !important;
  z-index: 4;
  transform: scale(1.05);
}
@keyframes fmInspectPulse {
  from { filter: brightness(1.02); transform: scale(1.0); }
  to   { filter: brightness(1.18); transform: scale(1.04); }
}

/* ==================== 4. V5 CLEAN-SLOT 3D CENTER STAGE (100%x100% Exact Mapping) ==================== */
#fmCabinetRoot .center-stage {
  grid-row: 2 / 7;
  grid-column: 2 / 7;
  border-radius: calc(8 * var(--fm-u));
  overflow: hidden;
  position: relative;
  min-width: 0;
  min-height: 0;
}
#fmCabinetRoot.skin-obsidian .center-stage {
  background: url("../assets/ui/fruit_machine/stage_obsidian.jpg") center / 100% 100% no-repeat;
  border: 1.5px solid #d4af37;
}
#fmCabinetRoot.skin-qianli .center-stage {
  background: url("../assets/ui/fruit_machine/stage_qianli.jpg") center / 100% 100% no-repeat;
  border: 1.5px solid #d4af37;
}
#fmCabinetRoot.skin-royal .center-stage {
  background: url("../assets/ui/fruit_machine/stage_royal.jpg") center / 100% 100% no-repeat;
  border: 1.5px solid #fbbf24;
}
#fmCabinetRoot.skin-starry .center-stage {
  background: url("../assets/ui/fruit_machine/stage_starry.jpg") center / 100% 100% no-repeat;
  border: 1.5px solid #fde047;
}

#fmCabinetRoot .carved-slot {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
}

/* Tier 1 Engraved Win Text & Toggle Button */
#fmCabinetRoot .slot-win-text {
  font-size: calc(10.8 * var(--fm-stage-u));
  font-weight: 900;
  letter-spacing: 0.5px;
  gap: calc(4 * var(--fm-stage-u));
  padding: 0 4px;
  overflow: hidden;
}
#fmCabinetRoot.skin-qianli .slot-win-text {
  font-size: calc(11.3 * var(--fm-stage-u));
  letter-spacing: 0.7px;
}
#fmCabinetRoot .slot-win-toggle {
  cursor: pointer;
  border: none;
  background: transparent;
  padding: 0;
  z-index: 6;
  border-radius: calc(4 * var(--fm-stage-u));
  transition: transform 0.1s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#fmCabinetRoot .slot-win-toggle:active {
  transform: scale(0.9);
}
#fmCabinetRoot .slot-win-toggle.state-open {
  background: rgba(250, 204, 21, 0.16);
  box-shadow: inset 0 0 6px rgba(250, 204, 21, 0.55);
}
#fmCabinetRoot .slot-win-toggle.state-pinned {
  background: rgba(16, 185, 129, 0.24);
  box-shadow: inset 0 0 8px rgba(74, 222, 128, 0.72), 0 0 8px rgba(250, 204, 21, 0.55);
}

/* Tier 2: 5 Wide Nameplates (Clickable Tap-to-Inspect) */
#fmCabinetRoot .slot-tablet {
  font-size: calc(9.8 * var(--fm-stage-u));
  font-weight: 900;
  letter-spacing: 0.5px;
  pointer-events: auto;
  cursor: pointer;
  border-radius: calc(4 * var(--fm-stage-u));
  padding: 0 calc(3 * var(--fm-stage-u));
  transition: transform 0.08s ease, box-shadow 0.15s ease, background 0.15s ease;
}
#fmCabinetRoot .slot-tablet:active {
  transform: translateX(-50%) scale(0.95) !important;
}
#fmCabinetRoot .slot-tablet.inspect-hl {
  background: rgba(56, 189, 248, 0.22);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.88), inset 0 0 6px rgba(56, 189, 248, 0.75);
}
#fmCabinetRoot.skin-qianli .slot-tablet {
  font-size: calc(10.6 * var(--fm-stage-u));
  letter-spacing: 0.6px;
}

/* Tier 3: Wide Clean Side Plaques (Clickable Tap-to-Inspect) */
#fmCabinetRoot .slot-wing {
  flex-direction: column;
  justify-content: center;
  gap: 1px;
  line-height: 1.08;
  pointer-events: auto;
  cursor: pointer;
  border-radius: calc(5 * var(--fm-stage-u));
  transition: box-shadow 0.15s ease, background 0.15s ease;
}
#fmCabinetRoot .slot-wing.inspect-hl {
  background: rgba(250, 204, 21, 0.18);
  box-shadow: 0 0 12px rgba(250, 204, 21, 0.9), inset 0 0 6px rgba(56, 189, 248, 0.7);
}
#fmCabinetRoot .slot-wing .w-range {
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(10.5 * var(--fm-stage-u));
  font-weight: 900;
  letter-spacing: 0.8px;
}
#fmCabinetRoot .slot-wing .w-lbl {
  font-size: calc(11 * var(--fm-stage-u));
  font-weight: 900;
  letter-spacing: 1px;
}
#fmCabinetRoot.skin-qianli .slot-wing .w-lbl {
  font-size: calc(11.8 * var(--fm-stage-u));
}

/* Tier 3 Center Ivory Roller Drum Numerals (Clickable Tap-to-Inspect) */
#fmCabinetRoot .slot-drum-digit {
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(23 * var(--fm-stage-u));
  font-weight: 900;
  background: linear-gradient(180deg, #7f1d1d 0%, #b91c1c 45%, #450a0a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #991b1b;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.85)) drop-shadow(0 1.5px 2px rgba(0, 0, 0, 0.35));
  pointer-events: auto;
  cursor: pointer;
  padding: 0 calc(3 * var(--fm-stage-u));
  border-radius: calc(4 * var(--fm-stage-u));
}
#fmCabinetRoot .slot-drum-digit.inspect-hl {
  filter: drop-shadow(0 0 8px #fde047) drop-shadow(0 1px 0 rgba(255, 255, 255, 0.95));
}

/* ==================== 5. EMBEDDED 3D EXPLAIN PANEL (V14 Single-Border Wide Canvas + ● 常驻 + Zero Flicker) ==================== */
#fmCabinetRoot .embedded-explain-panel {
  position: absolute;
  left: 2.5%;
  width: 95.0%;
  top: 2.0%;
  border-radius: calc(10 * var(--fm-stage-u));
  overflow: hidden;
  z-index: 8;
  padding: 7.8% 10.2% 7.4% 10.6%;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  gap: calc(3.5 * var(--fm-stage-u));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.88);
}
#fmCabinetRoot .embedded-explain-panel.pop-anim {
  animation: fmPanelPop 0.16s cubic-bezier(0.2, 0.85, 0.35, 1);
}
@keyframes fmPanelPop {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
#fmCabinetRoot.skin-obsidian .embedded-explain-panel {
  height: 48.0%;
  background: url("../assets/ui/fruit_machine/panel_obsidian.jpg") center / 100% 100% no-repeat;
  color: #f1f5f9;
}
#fmCabinetRoot.skin-qianli .embedded-explain-panel {
  height: 48.0%;
  border-radius: calc(15 * var(--fm-stage-u));
  padding: 8.2% 10.4% 7.6% 10.8%;
  background: url("../assets/ui/fruit_machine/panel_qianli.jpg") center / 102% 102% no-repeat;
  color: #271d14;
}
#fmCabinetRoot.skin-royal .embedded-explain-panel {
  top: 1.8%;
  height: 44.5%;
  padding: 7.6% 10.2% 7.2% 10.6%;
  background: url("../assets/ui/fruit_machine/panel_royal.jpg") center / 100% 100% no-repeat;
  color: #fef3c7;
}
#fmCabinetRoot.skin-starry .embedded-explain-panel {
  top: 1.6%;
  height: 47.5%;
  padding: 7.8% 10.2% 7.4% 10.6%;
  background: url("../assets/ui/fruit_machine/panel_starry.jpg") center / 100% 100% no-repeat;
  color: #eff6ff;
}

#fmCabinetRoot .eep-head {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(5.5 * var(--fm-stage-u));
  padding-bottom: 2.5px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.38);
  flex-shrink: 0;
}
#fmCabinetRoot.skin-qianli .eep-head { border-bottom-color: rgba(133, 98, 42, 0.35); }

#fmCabinetRoot .eep-title {
  font-size: calc(10.6 * var(--fm-stage-u));
  font-weight: 900;
  letter-spacing: 0.4px;
  white-space: nowrap;
}
#fmCabinetRoot.skin-obsidian .eep-title { color: #fde68a; text-shadow: 0 1px 2px #000; }
#fmCabinetRoot.skin-qianli .eep-title   { color: #0f5132; }
#fmCabinetRoot.skin-royal .eep-title    { color: #fde047; text-shadow: 0 1px 2px #000; }
#fmCabinetRoot.skin-starry .eep-title   { color: #fef08a; text-shadow: 0 1px 2px #000; }

#fmCabinetRoot .eep-badge {
  font-size: calc(8.1 * var(--fm-stage-u));
  padding: 1px 5.5px;
  border-radius: 4px;
  font-weight: 900;
  background: rgba(212, 175, 55, 0.18);
  border: 1px solid rgba(212, 175, 55, 0.6);
  color: #fef08a;
  white-space: nowrap;
}
#fmCabinetRoot.skin-qianli .eep-badge {
  background: rgba(15, 118, 110, 0.14);
  border-color: #0f766e;
  color: #0f5132;
}
#fmCabinetRoot .eep-badge.pinned-badge {
  background: linear-gradient(180deg, rgba(16, 185, 129, 0.36), rgba(5, 150, 105, 0.52));
  border-color: #4ade80;
  color: #bbf7d0;
  box-shadow: 0 0 6px rgba(74, 222, 128, 0.45);
}
#fmCabinetRoot.skin-qianli .eep-badge.pinned-badge {
  background: linear-gradient(180deg, #059669, #047857);
  border-color: #fde047;
  color: #ffffff;
}
#fmCabinetRoot .eep-badge.hint-badge {
  background: rgba(14, 116, 144, 0.35);
  border-color: #38bdf8;
  color: #e0f2fe;
}
#fmCabinetRoot.skin-qianli .eep-badge.hint-badge {
  background: rgba(14, 116, 144, 0.16);
  border-color: #0284c7;
  color: #0c4a6e;
}

#fmCabinetRoot .eep-body {
  font-size: calc(9.4 * var(--fm-stage-u));
  line-height: 1.42;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-y;
}
#fmCabinetRoot .eep-body::-webkit-scrollbar {
  width: 4px;
}
#fmCabinetRoot .eep-body::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 4px;
}
#fmCabinetRoot .eep-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #fde68a, #b45309);
  border-radius: 4px;
}
#fmCabinetRoot.skin-qianli .eep-body::-webkit-scrollbar-track {
  background: rgba(133, 98, 42, 0.16);
}
#fmCabinetRoot.skin-qianli .eep-body::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, #0f766e, #047857);
}
#fmCabinetRoot.skin-qianli .eep-body {
  font-family: 'NovaKai', 'NovaMonument', 'NovaMonumentI18n', serif;
  font-size: calc(9.8 * var(--fm-stage-u));
  font-weight: 900;
  line-height: 1.40;
}
#fmCabinetRoot.skin-royal .eep-body {
  font-size: calc(9.3 * var(--fm-stage-u));
  line-height: 1.40;
}
#fmCabinetRoot .eep-body b.hl  { color: #fde047; }
#fmCabinetRoot .eep-body b.win { color: #4ade80; }
#fmCabinetRoot.skin-qianli .eep-body b.hl  { color: #9f1212; }
#fmCabinetRoot.skin-qianli .eep-body b.win { color: #047857; }

#fmCabinetRoot .eep-foot {
  display: none !important;
}

/* ==================== 6. 8-Door Fruit Betting Deck ==================== */
#fmCabinetRoot .betting-panel {
  margin: calc(2 * var(--fm-u)) calc(6 * var(--fm-u));
  padding: calc(4 * var(--fm-u)) calc(5 * var(--fm-u)) calc(5 * var(--fm-u));
  border-radius: calc(11 * var(--fm-u));
  flex-shrink: 0;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
}
#fmCabinetRoot.skin-obsidian .betting-panel { background: linear-gradient(180deg, #141923 0%, #0b0e14 100%); border: 1.5px solid #b48a3e; }
#fmCabinetRoot.skin-qianli .betting-panel   { background: linear-gradient(180deg, #0d3834 0%, #07211f 100%); border: 1.5px solid #d4af37; }
#fmCabinetRoot.skin-royal .betting-panel    { background: linear-gradient(180deg, #3b0711 0%, #1f0308 100%); border: 1.5px solid #f59e0b; }
#fmCabinetRoot.skin-starry .betting-panel   { background: linear-gradient(180deg, #0f2352 0%, #07122b 100%); border: 1.5px solid #fbbf24; }

#fmCabinetRoot .chip-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(4 * var(--fm-u));
  margin-bottom: calc(3 * var(--fm-u));
  padding: 0 1px;
  font-size: calc(8.4 * var(--fm-u));
  font-weight: 900;
  color: #fde68a;
  min-width: 0;
  max-width: 100%;
}
#fmCabinetRoot .chip-bar > span:first-child {
  flex: 0 1 auto;
  min-width: 0;
  max-width: 62%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#fmCabinetRoot .chip-bar .trial-inline-badge {
  display: inline-block;
  max-width: 100%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 1px calc(5 * var(--fm-u));
  border-radius: 99px;
  background: rgba(5, 46, 22, 0.85);
  border: 1px solid #4ade80;
  color: #fef08a;
  font-size: calc(7.8 * var(--fm-u));
}
#fmCabinetRoot .chip-bar .trial-inline-badge b {
  color: #4ade80;
}
#fmCabinetRoot .chip-pills {
  display: flex;
  align-items: center;
  gap: calc(3 * var(--fm-u));
  font-family: 'NovaNumeral', Georgia, serif;
  flex: 1 1 0;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
}
#fmCabinetRoot .chip-pills::-webkit-scrollbar {
  display: none;
}
#fmCabinetRoot .c-pill {
  padding: calc(1.5 * var(--fm-u)) calc(5.5 * var(--fm-u));
  border-radius: 99px;
  background: rgba(0, 0, 0, 0.55);
  border: 1px solid rgba(212, 175, 55, 0.38);
  color: #e2e8f0;
  font-family: inherit;
  font-size: calc(8.3 * var(--fm-u));
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 2px;
}
#fmCabinetRoot .c-pill.c-pill-custom {
  font-family: system-ui, -apple-system, 'Noto Sans SC', sans-serif;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.52), rgba(8, 51, 68, 0.85));
  border-color: #38bdf8;
  color: #e0f2fe;
}
#fmCabinetRoot .c-pill.active {
  background: linear-gradient(180deg, #fde047, #b45309);
  border-color: #ffffff;
  color: #270e04;
  box-shadow: 0 0 8px rgba(250, 204, 21, 0.45);
}
#fmCabinetRoot .c-pill.c-pill-custom.active.active-pct {
  background: linear-gradient(180deg, #38bdf8, #0369a1);
  border-color: #fef08a;
  color: #ffffff;
  box-shadow: 0 0 9px rgba(56, 189, 248, 0.55);
}
#fmCabinetRoot .c-pill-clear {
  padding: calc(1.5 * var(--fm-u)) calc(5.5 * var(--fm-u));
  border-radius: 99px;
  background: rgba(127, 29, 29, 0.58);
  border: 1px solid rgba(248, 113, 113, 0.72);
  color: #fecaca;
  font-size: calc(8.0 * var(--fm-u));
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}
#fmCabinetRoot .c-pill-clear:active {
  transform: scale(0.94);
}

@media (max-width: 380px) {
  #fmCabinetRoot .chip-bar {
    overflow: hidden;
    gap: calc(2.5 * var(--fm-u));
  }
  #fmCabinetRoot .chip-bar > span:first-child {
    max-width: 36%;
  }
  #fmCabinetRoot .chip-pills {
    gap: calc(1.8 * var(--fm-u));
  }
  #fmCabinetRoot .c-pill {
    padding: calc(1.4 * var(--fm-u)) calc(3.2 * var(--fm-u));
    font-size: calc(7.4 * var(--fm-u));
  }
  #fmCabinetRoot .c-pill-clear {
    padding: calc(1.4 * var(--fm-u)) calc(3.8 * var(--fm-u));
    font-size: calc(7.4 * var(--fm-u));
  }
}

#fmCabinetRoot .doors-row {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  gap: calc(3 * var(--fm-u));
}
#fmCabinetRoot .door-item {
  display: flex;
  flex-direction: column;
  gap: calc(2 * var(--fm-u));
  min-width: 0;
}
#fmCabinetRoot .door-led-screen {
  background: #060404;
  border: 1px solid #785c22;
  border-radius: calc(4 * var(--fm-u));
  text-align: center;
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(8.5 * var(--fm-u));
  font-weight: 900;
  color: #52525b;
  padding: 1px 1px;
  white-space: nowrap;
  overflow: hidden;
}
#fmCabinetRoot .door-led-screen.active { color: #fbbf24; border-color: #d4af37; }
#fmCabinetRoot .door-led-screen.won    { color: #4ade80; border-color: #4ade80; background: #052e16; }

#fmCabinetRoot .door-3d-btn {
  height: calc(54 * var(--fm-u));
  border-radius: calc(9 * var(--fm-u));
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2px 1px;
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform 0.08s ease, opacity 0.14s ease, box-shadow 0.12s ease;
}
#fmCabinetRoot .door-3d-btn.cap-disabled {
  opacity: 0.48;
  filter: grayscale(0.25);
}
#fmCabinetRoot .door-3d-btn.holding-active {
  transform: translateY(1.5px) scale(0.97);
  border-color: #fde047 !important;
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.92), inset 0 0 8px rgba(254, 240, 138, 0.6) !important;
}
#fmCabinetRoot .door-3d-btn:active {
  transform: translateY(2px);
}
#fmCabinetRoot.skin-obsidian .door-3d-btn {
  background: radial-gradient(circle at 50% 35%, #2d3748 0%, #161b26 70%, #0b0e14 100%);
  border: 1.5px solid #c59b27;
  box-shadow: 0 3px 0 #05070b, inset 0 1px 1px rgba(254, 240, 138, 0.35);
}
#fmCabinetRoot.skin-qianli .door-3d-btn {
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f3ede0 68%, #d6cbb5 100%);
  border: 1.5px solid #c59b27;
  box-shadow: 0 3px 0 #5c4028, inset 0 1px 1px #ffffff;
}
#fmCabinetRoot.skin-royal .door-3d-btn {
  background: radial-gradient(circle at 50% 35%, #fffef5 0%, #fde68a 65%, #d97706 100%);
  border: 1.5px solid #fef08a;
  box-shadow: 0 3px 0 #78350f, inset 0 1px 1px #ffffff;
}
#fmCabinetRoot.skin-starry .door-3d-btn {
  background: radial-gradient(circle at 50% 35%, #1e40af 0%, #0f204b 68%, #071029 100%);
  border: 1.5px solid #fcd34d;
  box-shadow: 0 3px 0 #040918, inset 0 1px 1px rgba(254, 240, 138, 0.42);
}
#fmCabinetRoot .door-3d-btn {
  position: relative;
}
#fmCabinetRoot .door-3d-btn.won {
  border: 2px solid #4ade80 !important;
  box-shadow: 0 3px 0 #15803d, 0 0 10px #4ade80 !important;
}
#fmCabinetRoot .door-3d-btn.inspect-hl {
  border: 2px solid #38bdf8 !important;
  box-shadow: 0 3px 0 #0284c7, 0 0 12px rgba(56, 189, 248, 0.9) !important;
}
#fmCabinetRoot .door-3d-btn.glove-target {
  border: 2px solid #fde047 !important;
  box-shadow: 0 3px 0 #b45309, 0 0 14px rgba(250, 204, 21, 0.95) !important;
  animation: fmGloveTargetPulse 0.9s ease-in-out infinite alternate;
}
@keyframes fmGloveTargetPulse {
  from { filter: brightness(1.02); }
  to   { filter: brightness(1.22); }
}
#fmCabinetRoot .door-3d-btn img {
  width: calc(30 * var(--fm-u));
  height: calc(30 * var(--fm-u));
  object-fit: contain;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.5));
  pointer-events: none;
}
#fmCabinetRoot .door-mult-tag {
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(7.6 * var(--fm-u));
  font-weight: 900;
  line-height: 1.05;
  margin-top: 2px;
  white-space: nowrap;
}
#fmCabinetRoot.skin-obsidian .door-mult-tag { color: #fde68a; }
#fmCabinetRoot.skin-qianli .door-mult-tag   { color: #5c4028; }
#fmCabinetRoot.skin-royal .door-mult-tag    { color: #78350f; }
#fmCabinetRoot.skin-starry .door-mult-tag   { color: #fde68a; }

/* ==================== 7. TRUE 3D SCULPTED GEMSTONE/METAL BUTTON DECK ==================== */
#fmCabinetRoot .arcade-control-deck {
  position: relative;
  margin: calc(2 * var(--fm-u)) calc(6 * var(--fm-u)) calc(4 * var(--fm-u));
  padding: calc(5 * var(--fm-u)) calc(5 * var(--fm-u));
  border-radius: calc(12 * var(--fm-u));
  display: grid;
  grid-template-columns: 1fr 1fr 1.02fr 1.02fr 1.38fr 0.9fr;
  gap: calc(4 * var(--fm-u));
  align-items: center;
  flex-shrink: 0;
}
#fmCabinetRoot.skin-obsidian .arcade-control-deck {
  background: linear-gradient(180deg, #181d29 0%, #0b0e15 100%);
  border: 1.5px solid #c59b27;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.22), 0 4px 10px rgba(0, 0, 0, 0.85);
}
#fmCabinetRoot.skin-qianli .arcade-control-deck {
  background: linear-gradient(180deg, #11423e 0%, #072422 100%);
  border: 1.5px solid #d4af37;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.28), 0 4px 10px rgba(0, 0, 0, 0.85);
}
#fmCabinetRoot.skin-royal .arcade-control-deck {
  background: linear-gradient(180deg, #3f0812 0%, #1f0308 100%);
  border: 1.5px solid #fbbf24;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.32), 0 4px 10px rgba(0, 0, 0, 0.85);
}
#fmCabinetRoot.skin-starry .arcade-control-deck {
  background: linear-gradient(180deg, #102554 0%, #061028 100%);
  border: 1.5px solid #fcd34d;
  box-shadow: inset 0 1px 2px rgba(254, 240, 138, 0.28), 0 4px 10px rgba(0, 0, 0, 0.85);
}

#fmCabinetRoot .btn-3d-tex {
  position: relative;
  height: calc(48 * var(--fm-u));
  border: none;
  background-color: transparent;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  background-position: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.75));
  line-height: 1.05;
  cursor: pointer;
  padding: 0 2px;
  font-family: inherit;
  user-select: none;
  -webkit-user-select: none;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  transition: transform 0.08s ease, filter 0.1s ease, opacity 0.15s ease;
}
#fmCabinetRoot .btn-3d-tex.cap-disabled {
  opacity: 0.52;
  filter: grayscale(0.25) drop-shadow(0 2px 3px rgba(0, 0, 0, 0.6));
}
#fmCabinetRoot .btn-3d-tex.holding-active {
  transform: translateY(2px) scale(0.96);
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, 0.95));
}
#fmCabinetRoot .btn-3d-tex:active:not(:disabled) {
  transform: translateY(2px) scale(0.97);
}
#fmCabinetRoot .btn-3d-tex:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
#fmCabinetRoot .btn-3d-tex.idle-hint-ready {
  opacity: 0.86;
}
#fmCabinetRoot .btn-3d-tex.inspect-hl {
  filter: drop-shadow(0 0 10px rgba(56, 189, 248, 0.95)) drop-shadow(0 0 6px #fde047);
}
#fmCabinetRoot .btn-3d-tex.glove-target {
  filter: drop-shadow(0 0 14px rgba(250, 204, 21, 1)) drop-shadow(0 0 8px #4ade80);
  animation: fmGloveTargetPulse 0.85s ease-in-out infinite alternate;
}

/* ==================== V13 Friendly Index-Finger White Glove & Guide Bubble ==================== */
#fmCabinetRoot .betting-panel {
  position: relative;
}
#fmCabinetRoot .fm-glove-anchor {
  position: absolute;
  right: calc(-8 * var(--fm-u));
  bottom: calc(-14 * var(--fm-u));
  width: calc(36 * var(--fm-u));
  height: calc(36 * var(--fm-u));
  pointer-events: none;
  z-index: 32;
  animation: fmGloveBob 0.7s ease-in-out infinite alternate;
}
#fmCabinetRoot .btn-ruby .fm-glove-anchor {
  right: calc(-4 * var(--fm-u));
  bottom: calc(-14 * var(--fm-u));
  width: calc(38 * var(--fm-u));
  height: calc(38 * var(--fm-u));
}
@keyframes fmGloveBob {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(-2px, -4px) scale(0.95); }
}
#fmCabinetRoot .fm-glove-ripple {
  display: none !important;
}
#fmCabinetRoot .fm-guide-callout {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  top: calc(-22 * var(--fm-u));
  z-index: 35;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(15, 23, 42, 0.96), rgba(5, 46, 22, 0.96));
  border: 1.5px solid #fde047;
  border-radius: 99px;
  padding: calc(2 * var(--fm-u)) calc(9 * var(--fm-u));
  font-size: calc(8.8 * var(--fm-u));
  font-weight: 900;
  color: #fef08a;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.9), 0 0 10px rgba(250, 204, 21, 0.45);
}
#fmCabinetRoot .fm-guide-callout b {
  color: #4ade80;
}
#fmCabinetRoot .btn-sapphire {
  background-image: url("../assets/ui/fruit_machine/btn_3d_sapphire.png");
}
#fmCabinetRoot .btn-emerald {
  background-image: url("../assets/ui/fruit_machine/btn_3d_emerald.png");
}
#fmCabinetRoot .btn-ruby {
  height: calc(50 * var(--fm-u));
  background-image: url("../assets/ui/fruit_machine/btn_3d_ruby.png");
}
#fmCabinetRoot .btn-gold {
  height: calc(46 * var(--fm-u));
  background-image: url("../assets/ui/fruit_machine/btn_3d_gold.png");
}

#fmCabinetRoot .btn-main-lbl {
  font-size: calc(13.2 * var(--fm-u));
  font-weight: 900;
  letter-spacing: 1px;
  white-space: nowrap;
}
#fmCabinetRoot .btn-emerald .btn-main-lbl {
  font-size: calc(14.2 * var(--fm-u));
  letter-spacing: 0px;
}
#fmCabinetRoot .btn-ruby .btn-main-lbl {
  font-size: calc(15 * var(--fm-u));
  letter-spacing: 1.5px;
}
#fmCabinetRoot .btn-sub-num {
  font-family: 'NovaNumeral', Georgia, serif;
  font-size: calc(8.4 * var(--fm-u));
  font-weight: 900;
  color: #fef9c3;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.95);
  margin-top: 1px;
  letter-spacing: 0.3px;
  white-space: nowrap;
  max-width: 92%;
  overflow: hidden;
  text-overflow: ellipsis;
}
#fmCabinetRoot .btn-gold .btn-main-lbl {
  font-size: calc(12.2 * var(--fm-u));
  letter-spacing: 0.8px;
  color: #2b1202;
  text-shadow: 0 1px 0 rgba(255, 252, 220, 0.75);
}

/* ==================== 8. Rules & Positive Humanistic Plaque Modal ==================== */
#fmRulesModal {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: rgba(3, 6, 14, 0.82);
  backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
#fmRulesModal.show {
  display: flex;
}
#fmRulesModal .fm-rules-card {
  width: 100%;
  max-width: 430px;
  max-height: 84vh;
  max-height: calc(var(--app-vh, 100vh) * 0.84);
  max-height: 84dvh;
  border-radius: 18px;
  border: 2px solid #d4af37;
  background: linear-gradient(180deg, #131826 0%, #090c14 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.92);
  color: #f1f5f9;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  font-family: 'NovaMonument', 'NovaMonumentI18n', 'Noto Serif SC', Georgia, serif;
}
#fmRulesModal .fm-rules-head {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(212, 175, 55, 0.35);
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(212, 175, 55, 0.1);
}
#fmRulesModal .fm-rules-head h3 {
  margin: 0;
  font-size: 15px;
  color: #fef08a;
}
#fmRulesModal .fm-rules-close {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid #fde68a;
  background: linear-gradient(180deg, #fde68a, #92400e);
  color: #270e04;
  font-weight: 900;
  cursor: pointer;
}
#fmRulesModal .fm-rules-body {
  padding: 14px 16px;
  overflow-y: auto;
  font-family: system-ui, -apple-system, 'Noto Sans SC', sans-serif;
  font-size: 12.5px;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
#fmRulesModal .fm-rules-sec {
  padding: 10px 12px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.25);
}
#fmRulesModal .fm-rules-sec h4 {
  margin: 0 0 5px;
  font-size: 13px;
  color: #fde047;
}
#fmRulesModal .fm-plaque-card {
  padding: 11px 13px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(15, 118, 110, 0.28), rgba(6, 33, 31, 0.92));
  border: 1.5px solid #6ee7b7;
  color: #ecfdf5;
}
#fmRulesModal .fm-plaque-card h4 {
  margin: 0 0 5px;
  font-size: 13px;
  color: #a7f3d0;
}
#fmRulesModal .fm-dev-reset-wrap {
  padding-top: 4px;
  text-align: center;
}
#fmRulesModal .fm-dev-reset-btn {
  width: 100%;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px dashed rgba(250, 204, 21, 0.55);
  background: rgba(250, 204, 21, 0.10);
  color: #fde047;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}
#fmRulesModal .fm-dev-reset-btn:active {
  transform: scale(0.985);
  background: rgba(250, 204, 21, 0.20);
}
#fmRulesModal .fm-voice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 6px;
}
#fmRulesModal .fm-voice-btn {
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid rgba(212, 175, 55, 0.35);
  background: rgba(15, 23, 42, 0.72);
  color: #e2e8f0;
  font-size: 11.5px;
  font-weight: 800;
  cursor: pointer;
  transition: all 0.14s ease;
}
#fmRulesModal .fm-voice-btn.is-active {
  border-color: #fde047;
  background: linear-gradient(135deg, rgba(250, 204, 21, 0.26), rgba(217, 119, 6, 0.35));
  color: #fef08a;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}

/* ==================== 10. V15 PLAN A: TIERED WIN MONEY SHOWCASE (BIG WIN 3D ROLLING BANNER + SMALL WIN 3D FLOAT) ==================== */
#fmCabinetRoot .lcd-box.win-pop-flash {
  animation: fmLcdWinFlash 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes fmLcdWinFlash {
  0%   { transform: scale(1); box-shadow: 0 0 0 rgba(94, 255, 163, 0); }
  35%  { transform: scale(1.045); box-shadow: 0 0 16px rgba(94, 255, 163, 0.75); border-color: #6ee7b7; }
  100% { transform: scale(1); }
}

#fmCabinetRoot .fm-win-showcase-layer {
  position: absolute;
  inset: 0;
  z-index: 12;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3.5%;
}

/* Scenario 1: High-Impact Big Win (>=15x / LUCKY Feature / Hi-Lo Double Win) */
#fmCabinetRoot .fm-bigwin-card {
  pointer-events: auto;
  cursor: pointer;
  position: relative;
  width: 94%;
  padding: calc(10 * var(--fm-stage-u)) calc(9 * var(--fm-stage-u)) calc(8 * var(--fm-stage-u));
  border-radius: calc(13 * var(--fm-stage-u));
  background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.36) 0%, rgba(15, 23, 42, 0.96) 64%, rgba(5, 10, 22, 0.98) 100%);
  border: 2px solid #fde047;
  box-shadow:
    0 0 26px rgba(250, 204, 21, 0.62),
    inset 0 0 16px rgba(254, 240, 138, 0.32),
    0 10px 24px rgba(0, 0, 0, 0.85);
  text-align: center;
  overflow: hidden;
  animation: fmBigWinPopIn 0.28s cubic-bezier(0.22, 1.28, 0.36, 1) forwards;
}
#fmCabinetRoot.skin-royal .fm-bigwin-card {
  background: radial-gradient(circle at 50% 0%, rgba(255, 215, 90, 0.40) 0%, rgba(74, 14, 26, 0.96) 64%, rgba(28, 4, 10, 0.98) 100%);
  border-color: #ffe07d;
}
#fmCabinetRoot.skin-starry .fm-bigwin-card {
  background: radial-gradient(circle at 50% 0%, rgba(250, 204, 21, 0.38) 0%, rgba(15, 36, 84, 0.96) 64%, rgba(6, 15, 38, 0.98) 100%);
  border-color: #fde047;
}
#fmCabinetRoot.skin-qianli .fm-bigwin-card {
  background: radial-gradient(circle at 50% 0%, rgba(254, 243, 199, 0.97) 0%, rgba(236, 253, 245, 0.97) 66%, rgba(209, 250, 229, 0.99) 100%);
  border-color: #d97706;
  box-shadow:
    0 0 24px rgba(217, 119, 6, 0.52),
    inset 0 0 14px rgba(251, 191, 36, 0.28),
    0 10px 22px rgba(6, 46, 34, 0.65);
}
#fmCabinetRoot .fm-bigwin-card.tier-grand {
  border-width: 2.5px;
  box-shadow:
    0 0 34px rgba(251, 191, 36, 0.85),
    0 0 14px rgba(244, 63, 94, 0.65),
    inset 0 0 20px rgba(254, 240, 138, 0.45),
    0 12px 26px rgba(0, 0, 0, 0.9);
}
#fmCabinetRoot .fm-bigwin-card.landed-pulse {
  animation: fmBigWinLandedPulse 0.38s cubic-bezier(0.22, 1.35, 0.36, 1);
}
#fmCabinetRoot .fm-bigwin-card.fade-out,
#fmCabinetRoot .fm-smallwin-float.fade-out {
  opacity: 0 !important;
  transform: scale(0.92) translateY(calc(-6 * var(--fm-stage-u))) !important;
  transition: opacity 0.2s ease, transform 0.2s ease !important;
}

#fmCabinetRoot .fm-bw-halo {
  position: absolute;
  width: calc(190 * var(--fm-stage-u));
  height: calc(190 * var(--fm-stage-u));
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0.38;
  pointer-events: none;
  z-index: 0;
  animation: fmBwHaloSpin 9s linear infinite;
}
@keyframes fmBwHaloSpin {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to   { transform: translate(-50%, -50%) rotate(360deg); }
}

#fmCabinetRoot .fm-bw-ribbon {
  position: relative;
  z-index: 1;
  display: inline-block;
  background: linear-gradient(90deg, #7c2d12 0%, #ea580c 50%, #7c2d12 100%);
  border: 1.5px solid #fef08a;
  color: #fffbeb;
  font-family: 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: calc(9.2 * var(--fm-stage-u));
  font-weight: 900;
  padding: calc(2 * var(--fm-stage-u)) calc(10 * var(--fm-stage-u));
  border-radius: 99px;
  letter-spacing: 0.6px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.55);
  margin-bottom: calc(4 * var(--fm-stage-u));
}
#fmCabinetRoot .fm-bigwin-card.tier-grand .fm-bw-ribbon {
  background: linear-gradient(90deg, #881337 0%, #e11d48 50%, #881337 100%);
  border-color: #fde047;
}

#fmCabinetRoot .fm-bw-sub {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--fm-stage-u));
  font-size: calc(10.2 * var(--fm-stage-u));
  font-weight: 800;
  color: #fde68a;
  margin-bottom: calc(2 * var(--fm-stage-u));
}
#fmCabinetRoot.skin-qianli .fm-bw-sub {
  color: #064e3b;
}
#fmCabinetRoot .fm-ws-fruit-ico {
  width: calc(19 * var(--fm-stage-u));
  height: calc(19 * var(--fm-stage-u));
  object-fit: contain;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.55));
}

#fmCabinetRoot .fm-bw-money-row {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(5 * var(--fm-stage-u));
  flex-wrap: wrap;
  margin: calc(2 * var(--fm-stage-u)) 0 calc(4 * var(--fm-stage-u));
}
#fmCabinetRoot .fm-bw-coin {
  width: calc(24 * var(--fm-stage-u)) !important;
  height: calc(24 * var(--fm-stage-u)) !important;
  object-fit: contain;
  filter: drop-shadow(0 0 8px rgba(250, 204, 21, 0.85));
}
#fmCabinetRoot .fm-bw-digits {
  font-family: 'NovaNumeral', 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: calc(23.5 * var(--fm-stage-u));
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: 0.4px;
  background: linear-gradient(180deg, #ffffff 0%, #fef08a 35%, #f59e0b 72%, #b45309 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #fde047;
  filter: drop-shadow(0 2px 0 #451a03) drop-shadow(0 0 10px rgba(251, 191, 36, 0.72));
  word-break: break-all;
}
#fmCabinetRoot.skin-qianli .fm-bw-digits {
  background: linear-gradient(180deg, #dc2626 0%, #b91c1c 52%, #7f1d1d 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: #b91c1c;
  filter: drop-shadow(0 1.5px 0 #fef3c7) drop-shadow(0 2px 6px rgba(185, 28, 28, 0.38));
}

#fmCabinetRoot .fm-bw-hint {
  position: relative;
  z-index: 1;
  font-size: calc(8.0 * var(--fm-stage-u));
  color: rgba(254, 243, 199, 0.82);
}
#fmCabinetRoot.skin-qianli .fm-bw-hint {
  color: rgba(6, 78, 59, 0.78);
}

/* Scenario 2: Small Win (<15x) Non-blocking 3D Floating Text */
#fmCabinetRoot .fm-smallwin-float {
  pointer-events: none;
  position: relative;
  text-align: center;
  padding: calc(7 * var(--fm-stage-u)) calc(14 * var(--fm-stage-u));
  border-radius: calc(16 * var(--fm-stage-u));
  background: radial-gradient(circle, rgba(15, 23, 42, 0.90) 0%, rgba(6, 12, 24, 0.55) 88%);
  border: 1.5px solid rgba(110, 231, 183, 0.72);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.72), 0 0 14px rgba(16, 245, 160, 0.35);
  animation: fmSmallWinFloatAnim 1.15s cubic-bezier(0.2, 0.85, 0.3, 1) forwards;
}
#fmCabinetRoot.skin-royal .fm-smallwin-float {
  background: radial-gradient(circle, rgba(58, 12, 22, 0.92) 0%, rgba(24, 4, 9, 0.58) 88%);
}
#fmCabinetRoot.skin-starry .fm-smallwin-float {
  background: radial-gradient(circle, rgba(16, 38, 88, 0.92) 0%, rgba(6, 15, 38, 0.62) 88%);
}
#fmCabinetRoot.skin-qianli .fm-smallwin-float {
  background: radial-gradient(circle, rgba(254, 243, 199, 0.95) 0%, rgba(209, 250, 229, 0.82) 88%);
  border-color: #d97706;
}
#fmCabinetRoot .fm-sw-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(4 * var(--fm-stage-u));
  font-size: calc(9.6 * var(--fm-stage-u));
  font-weight: 800;
  color: #fde68a;
  margin-bottom: calc(2 * var(--fm-stage-u));
}
#fmCabinetRoot.skin-qianli .fm-sw-sub {
  color: #064e3b;
}
#fmCabinetRoot .fm-sw-money {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: calc(5 * var(--fm-stage-u));
}
#fmCabinetRoot .fm-sw-coin {
  width: calc(20 * var(--fm-stage-u)) !important;
  height: calc(20 * var(--fm-stage-u)) !important;
  object-fit: contain;
}
#fmCabinetRoot .fm-sw-digits {
  font-family: 'NovaNumeral', 'NovaMonument', 'NovaMonumentI18n', sans-serif;
  font-size: calc(20 * var(--fm-stage-u));
  font-weight: 900;
  color: #5effa3;
  text-shadow: 0 2px 0 #052e16, 0 0 12px rgba(94, 255, 163, 0.78);
}
#fmCabinetRoot.skin-qianli .fm-sw-digits {
  color: #b91c1c;
  text-shadow: 0 1.5px 0 #fef3c7, 0 0 8px rgba(185, 28, 28, 0.35);
}

@keyframes fmBigWinPopIn {
  0%   { opacity: 0; transform: scale(0.68); }
  70%  { opacity: 1; transform: scale(1.04); }
  100% { opacity: 1; transform: scale(1.0); }
}
@keyframes fmBigWinLandedPulse {
  0%   { transform: scale(1.0); }
  40%  { transform: scale(1.06); }
  100% { transform: scale(1.0); }
}
@keyframes fmSmallWinFloatAnim {
  0%   { opacity: 0; transform: translateY(calc(12 * var(--fm-stage-u))) scale(0.82); }
  22%  { opacity: 1; transform: translateY(0) scale(1.04); }
  78%  { opacity: 1; transform: translateY(calc(-6 * var(--fm-stage-u))) scale(1.0); }
  100% { opacity: 0; transform: translateY(calc(-14 * var(--fm-stage-u))) scale(0.95); }
}

/* ==================== 9. V16 Dual-Mode Custom Chip Modal (Wallet % + Fixed Coins · 4 Skins) ==================== */
#fmRulesModal .fm-coin-ico {
  display: inline-block;
  width: 15px;
  height: 15px;
  object-fit: contain;
  vertical-align: -2.5px;
  flex-shrink: 0;
}

#fmCustomChipModal {
  position: fixed;
  inset: 0;
  z-index: 9550;
  background: rgba(3, 6, 14, 0.84);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 12px;
}
#fmCustomChipModal.show {
  display: flex;
}
#fmCustomChipModal .fm-coin-ico {
  display: inline-block;
  width: 16px !important;
  height: 16px !important;
  max-width: 16px !important;
  max-height: 16px !important;
  object-fit: contain;
  vertical-align: -3px;
  flex-shrink: 0;
}
#fmCustomChipModal .fm-cm-pane[data-cmpane="fixed"] .fm-cm-input-wrap > .fm-coin-ico {
  width: 22px !important;
  height: 22px !important;
  max-width: 22px !important;
  max-height: 22px !important;
  vertical-align: middle;
}
#fmCustomChipModal .fm-cm-card {
  width: 100%;
  max-width: 392px;
  max-height: 88vh;
  max-height: calc(var(--app-vh, 100vh) - 24px);
  max-height: 88dvh;
  overflow-y: auto;
  overflow-x: hidden;
  border-radius: 18px;
  border: 2px solid #d4af37;
  background: radial-gradient(120% 90% at 50% 0%, rgba(212, 175, 55, 0.16), transparent 62%), linear-gradient(180deg, #192132 0%, #0c101a 100%);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.92), inset 0 1px 0 rgba(255, 244, 200, 0.35);
  color: #f8f3e6;
  padding: 14px 15px 15px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  font-family: system-ui, -apple-system, 'Noto Sans SC', sans-serif;
}
#fmCustomChipModal .fm-cm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
#fmCustomChipModal .fm-cm-title {
  margin: 0;
  font-family: "NovaTitleSerif", "Noto Sans SC", serif;
  font-size: 15.5px;
  font-weight: 900;
  color: #fde68a;
  min-width: 0;
}
#fmCustomChipModal .fm-cm-close {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
  border-radius: 50%;
  border: 1px solid rgba(253, 230, 138, 0.42);
  background: rgba(0, 0, 0, 0.38);
  color: #fde68a;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
#fmCustomChipModal .fm-cm-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5px;
  background: rgba(5, 8, 15, 0.76);
  padding: 4px;
  border-radius: 11px;
  border: 1px solid rgba(212, 175, 55, 0.32);
}
#fmCustomChipModal .fm-cm-tab {
  border: 1px solid transparent;
  background: transparent;
  color: #94a3b8;
  font-size: 12px;
  font-weight: 900;
  padding: 7px 5px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  white-space: nowrap;
  min-width: 0;
}
#fmCustomChipModal .fm-cm-tab.active {
  background: linear-gradient(180deg, #0284c7, #0369a1);
  border-color: #7dd3fc;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(56, 189, 248, 0.38);
}
#fmCustomChipModal .fm-cm-tab.active[data-cmtab="fixed"] {
  background: linear-gradient(180deg, #d97706, #92400e);
  border-color: #fde047;
  color: #fffbeb;
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.35);
}
#fmCustomChipModal .fm-cm-pane {
  display: none;
  flex-direction: column;
  gap: 9px;
}
#fmCustomChipModal .fm-cm-pane.active {
  display: flex;
}
#fmCustomChipModal .fm-cm-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #060911;
  border: 2px solid #38bdf8;
  border-radius: 11px;
  padding: 7px 11px;
}
#fmCustomChipModal .fm-cm-pane[data-cmpane="fixed"] .fm-cm-input-wrap {
  border-color: #fbbf24;
}
#fmCustomChipModal .fm-cm-prefix,
#fmCustomChipModal .fm-cm-suffix {
  font-size: 11.5px;
  color: #cbd5e1;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
}
#fmCustomChipModal .fm-cm-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: #ffffff;
  font-size: 21px;
  font-weight: 900;
  font-family: 'NovaNumeral', Consolas, monospace;
}
#fmCustomChipModal .fm-cm-unit {
  font-size: 18px;
  font-weight: 900;
  color: #38bdf8;
  flex-shrink: 0;
}
#fmCustomChipModal .fm-cm-live-bar {
  background: rgba(250, 204, 21, 0.1);
  border: 1px solid rgba(250, 204, 21, 0.45);
  border-radius: 10px;
  padding: 7px 10px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 12px;
  color: #cbd5e1;
}
#fmCustomChipModal .fm-cm-live-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}
#fmCustomChipModal .fm-cm-sub-row {
  font-size: 11.5px;
  opacity: 0.9;
}
#fmCustomChipModal .fm-cm-live-bar b {
  color: #f8fafc;
}
#fmCustomChipModal .fm-cm-conv,
#fmCustomChipModal .fm-cm-all8 {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
#fmCustomChipModal .fm-cm-conv {
  color: #fde047;
  font-weight: 900;
  font-size: 13.5px;
}
#fmCustomChipModal .fm-cm-cap-warn {
  margin-top: 2px;
  font-size: 11px;
  font-weight: 800;
  color: #fbbf24;
  line-height: 1.38;
}
#fmCustomChipModal .fm-cm-slider {
  width: 100%;
  accent-color: #fde047;
  height: 6px;
  cursor: pointer;
}
#fmCustomChipModal .fm-cm-quick-pct,
#fmCustomChipModal .fm-cm-quick-fixed {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 5px;
}
#fmCustomChipModal .fm-cm-qbtn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 8px;
  padding: 6px 3px;
  color: #f8fafc;
  font-size: 11px;
  font-weight: 900;
  cursor: pointer;
  text-align: center;
  white-space: nowrap;
}
#fmCustomChipModal .fm-cm-qbtn.gold-q {
  border-color: rgba(250, 204, 21, 0.72);
  color: #fef08a;
}
#fmCustomChipModal .fm-cm-qbtn.active {
  background: rgba(245, 158, 11, 0.28);
  border-color: #fde047;
  color: #fde047;
}
#fmCustomChipModal .fm-cm-note {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.42;
}
#fmCustomChipModal .fm-cm-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
#fmCustomChipModal .fm-cm-bal {
  font-size: 12px;
  color: #cbd5e1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  min-width: 0;
}
#fmCustomChipModal .fm-cm-bal b {
  color: #fde047;
}
#fmCustomChipModal .fm-cm-submit {
  background: linear-gradient(180deg, #fde047, #d97706);
  border: 1.5px solid #fef08a;
  border-radius: 10px;
  color: #270e04;
  font-size: 13px;
  font-weight: 900;
  padding: 7px 14px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.45);
}
#fmCustomChipModal .fm-cm-submit:active {
  transform: scale(0.96);
}

/* 4-Skin Synchronization for #fmCustomChipModal */
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-card {
  background: linear-gradient(180deg, #fffdf8 0%, #f3ebd8 68%, #e2d5ba 100%);
  border-color: #c59b27;
  color: #103029;
  box-shadow: 0 20px 46px rgba(0, 0, 0, 0.72), inset 0 2px 0 #ffffff;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-title {
  font-family: "NovaKai", "NovaTitleSerif", "Noto Sans SC", serif;
  color: #8f1414;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-close {
  background: rgba(16, 48, 41, 0.1);
  border-color: #c59b27;
  color: #103029;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-tabs {
  background: rgba(15, 62, 55, 0.12);
  border-color: rgba(197, 155, 39, 0.55);
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-tab {
  color: #265348;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-tab.active[data-cmtab="pct"] {
  background: url("../assets/ui/jackpot_wheel/btn_qianli_celadon.jpg") center / 100% 100% no-repeat;
  border-color: #d4af37;
  color: #fffbeb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-tab.active[data-cmtab="fixed"] {
  background: url("../assets/ui/jackpot_wheel/btn_qianli_cinnabar.jpg") center / 100% 100% no-repeat;
  border-color: #fef08a;
  color: #fffbeb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-input-wrap {
  background: #ffffff;
  border-color: #0f766e;
  box-shadow: inset 0 2px 5px rgba(16, 48, 41, 0.1);
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-pane[data-cmpane="fixed"] .fm-cm-input-wrap {
  border-color: #c59b27;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-input {
  color: #103029;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-prefix,
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-suffix,
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-note,
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-bal {
  color: #265348;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-unit {
  color: #0f766e;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-live-bar {
  background: rgba(16, 82, 72, 0.08);
  border-color: rgba(197, 155, 39, 0.65);
  color: #164e48;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-live-bar b {
  color: #103029;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-conv,
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-bal b {
  color: #991b1b;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-cap-warn {
  color: #b45309;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-qbtn {
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f3ede0 70%, #dfd2b7 100%);
  border-color: #c59b27;
  color: #103029;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-qbtn.active {
  background: linear-gradient(180deg, #fef9c3, #fde68a);
  border: 1.5px solid #991b1b;
  color: #7c2d12;
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-foot {
  border-top-color: rgba(197, 155, 39, 0.35);
}
body[data-nova-skin="qianli"] #fmCustomChipModal .fm-cm-submit {
  background: url("../assets/ui/jackpot_wheel/btn_qianli_cinnabar.jpg") center / 100% 100% no-repeat;
  border-color: #fef08a;
  color: #fffbeb;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

body[data-nova-skin="royal"] #fmCustomChipModal .fm-cm-card {
  background: radial-gradient(120% 90% at 50% 0%, rgba(244, 63, 94, 0.2), transparent 62%), linear-gradient(180deg, #470813 0%, #1d0308 100%);
  border-color: #f59e0b;
}
body[data-nova-skin="starry"] #fmCustomChipModal .fm-cm-card {
  background: radial-gradient(120% 90% at 50% 0%, rgba(96, 165, 250, 0.24), transparent 62%), linear-gradient(180deg, #16316e 0%, #071029 100%);
  border-color: #fbbf24;
}

#fmCabinetRoot .fm-bigfont-btn.is-on {
  background: linear-gradient(180deg, #fde047 0%, #d97706 100%) !important;
  color: #1c1917 !important;
  border-color: #ffffff !important;
}
body.nova-bigfont-on #fmCabinetRoot .arcade-led-digits {
  font-size: calc(14 * var(--fm-u));
}
body.nova-bigfont-on #fmCabinetRoot .plaque-main-txt {
  font-size: calc(11.2 * var(--fm-stage-u));
}
body.nova-bigfont-on #fmCabinetRoot .door-mult,
body.nova-bigfont-on #fmCabinetRoot .door-bet {
  font-size: calc(10.2 * var(--fm-u));
}
