  :root {
    --ink: #0f172a; --dim: rgba(15,23,42,.65);
    --coral: #e60027; --cobalt: #003cff; --mint: #00a843; --gold: #d97706;
    --panel: rgba(255,252,244,.94);
    --font-arcade: 'RocknRoll One', 'M PLUS Rounded 1c', "Hiragino Kaku Gothic ProN", sans-serif;
    --font-num: 'Chakra Petch', sans-serif;
  }
  * { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
  html, body {
    width: 100%; height: 100vh; height: 100dvh; overflow: hidden; color: var(--ink);
    background: #0b0f1d url('../../assets/room_hall_backdrop.webp') center top / cover no-repeat;
    font-family: 'M PLUS Rounded 1c', "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Meiryo", "Noto Sans JP", "PingFang SC", system-ui, sans-serif;
    user-select: none; -webkit-user-select: none; touch-action: none; overscroll-behavior: none; transition: background .4s;
  }
  .num-font {
    font-family: var(--font-num);
    font-weight: 800;
    font-style: italic;
    font-variant-numeric: tabular-nums;
  }
  /* =========================================================================
   * 0. 房间内 3D 预渲染机台外壳舞台容器 (#roomCabinetShell)
   *    挂载上下等宽的直立高清机壳 assets/room_shell_m01..05.png，球盘内嵌于机壳视窗下层
   * ========================================================================= */
  :root {
    --room-machine-bg: url('../../assets/room_shell_m01.webp?v=20261120_original_blue');
    --room-machine-skirt-bg: url('../../assets/room_skirt_m01.png?v=20261109q');
  }
  #roomCabinetShell {
    position: fixed;
    left: 50%;
    top: max(env(safe-area-inset-top, 0px), 18px);
    bottom: calc(44px + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
    height: calc(100dvh - 44px - max(env(safe-area-inset-top, 0px), 18px) - env(safe-area-inset-bottom, 0px));
    width: min(100vw, calc((100dvh - 44px - max(env(safe-area-inset-top, 0px), 18px) - env(safe-area-inset-bottom, 0px)) * 568 / 888));
    margin: 0;
    z-index: 1;
    overflow: visible;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
  }
  /* 球盘深色内衬底板（位于 3D canvas 下方，杜绝任何边缘漏光） */
  #roomCabinetShell::before {
    content: '';
    position: absolute;
    left: 9.5%;
    right: 9.5%;
    top: 14.5%;
    bottom: 11.5%;
    border-radius: 22% 22% 8px 8px;
    background: #010206;
    z-index: 1;
    pointer-events: none;
  }
  #roomShellBase {
    position: absolute;
    left: 0;
    width: 100%;
    top: 0;
    height: 100%;
    background: var(--room-machine-bg, url('../../assets/room_shell_m01.webp?v=20261120_original_blue')) center center / 100% 100% no-repeat;
    pointer-events: none;
    z-index: 3;
    filter: drop-shadow(0 16px 32px rgba(0, 0, 0, 0.75));
  }
  #roomShellBase::before {
    display: none !important;
  }
  /* ① 顶部计分屏槽位（Top Scoreboard Slot：香槟金黄铜机械倒角表盘外框，内嵌全景数码仪表） */
  #roomTopLcdSlot {
    position: absolute;
    left: 17.5%;
    top: 3.0%;
    width: 65.0%;
    height: 11.6%;
    border-radius: 10px;
    overflow: hidden;
    border: 3px solid #d4af37;
    background: linear-gradient(180deg, #071d39 0%, #030e1d 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.85), inset 0 2px 4px #fff2bb, inset 0 -2px 6px #5a3806, 0 0 14px rgba(212, 175, 55, 0.45);
    pointer-events: none;
    z-index: 4;
  }
  #roomTopLcdSlot canvas {
    width: 100%;
    height: 100%;
    display: block;
  }
  /* ①-b 顶部灯箱两侧 3D 霓虹灯柱中奖爆闪层（中奖/出球时红光与蓝光高频交替爆闪） */
  .room-pillar-lamp {
    position: absolute;
    top: 4.15%;
    width: 6.4%;
    height: 11.55%;
    border-radius: 12px / 8px;
    pointer-events: none;
    z-index: 4;
    opacity: 0;
    filter: blur(0.5px);
    transition: opacity 0.06s ease;
    will-change: opacity, background, box-shadow;
  }
  #roomPillarLampL { left: 6.15%; }
  #roomPillarLampR { right: 6.15%; }
  .room-pillar-lamp.flash-red {
    opacity: 1;
    background: linear-gradient(90deg, rgba(190, 18, 60, 0.88) 0%, rgba(255, 23, 68, 0.96) 24%, #ffffff 50%, rgba(255, 23, 68, 0.96) 76%, rgba(190, 18, 60, 0.88) 100%);
    box-shadow: 0 0 8px 2px rgba(255, 23, 68, 0.9), inset 0 0 4px rgba(255, 255, 255, 0.8);
  }
  .room-pillar-lamp.flash-blue {
    opacity: 1;
    background: linear-gradient(90deg, rgba(3, 105, 161, 0.88) 0%, rgba(0, 229, 255, 0.96) 24%, #ffffff 50%, rgba(0, 229, 255, 0.96) 76%, rgba(3, 105, 161, 0.88) 100%);
    box-shadow: 0 0 8px 2px rgba(0, 229, 255, 0.9), inset 0 0 4px rgba(255, 255, 255, 0.8);
  }
  /* ② 中央拱形球盘槽位（Playfield Canvas Slot，位于机壳内壁窗口 z-index: 2） */
  canvas#c {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: ns-resize;
    touch-action: none;
    user-select: none;
    -webkit-user-select: none;
    transition: transform 0.06s ease-out;
    z-index: 2;
  }
  /* ③ 底部前护板与拉杆容器 */
  #roomApronOverlay {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 4;
  }
  #roomApronBar,
  #roomApronLeftPlate,
  #roomApronSapphire {
    display: none !important;
  }
  #roomApronSockets {
    position: absolute;
    left: 14.5%;
    width: 44.0%;
    aspect-ratio: 232 / 84;
    top: 89.5%;
    border-radius: 999px;
    background: none;
    box-shadow: none;
  }
  /* ④ 右下角一体式 3D 发射杆总成（4 螺丝盒下沿对齐护板蓝线，拉动时黄金弹簧跟着同步拉长） */
  #roomPlunger3D {
    position: absolute;
    left: 82.0%;
    width: 9.2%;
    top: 84.85%;
    aspect-ratio: 236 / 563;
    display: block;
    filter: drop-shadow(0 4px 8px rgba(10, 5, 2, 0.62));
    pointer-events: auto;
    cursor: grab;
    touch-action: none;
    z-index: 4;
  }
  #roomPlunger3D:active {
    cursor: grabbing;
  }
  /* ⑤ 首球发射下拉引导浮层（锚定在右下角 3D 蓝宝石拉杆处，绝不遮挡球道与盘面，发球后自动渐隐） */
  #plungerGuideOverlay {
    position: absolute;
    left: 77.5%;
    width: 18.2%;
    top: 83.2%;
    height: 15.6%;
    pointer-events: none;
    z-index: 6;
    opacity: 1;
    transition: opacity 0.25s ease, transform 0.25s ease;
  }
  #plungerGuideOverlay.hidden {
    opacity: 0 !important;
    pointer-events: none !important;
    transform: translateY(4px) scale(0.95);
  }
  #plungerGuideOverlay .pg-ring {
    position: absolute;
    left: 50%;
    top: 47%;
    width: 66%;
    aspect-ratio: 1 / 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    border: 2.5px solid #FDE047;
    box-shadow:
      0 0 14px rgba(250, 204, 21, 0.92),
      inset 0 0 10px rgba(250, 204, 21, 0.55);
    animation: pgRingPulse 1.15s ease-in-out infinite;
  }
  #plungerGuideOverlay .pg-track {
    position: absolute;
    left: 50%;
    top: 44%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1px;
    animation: pgSlideDown 1.15s cubic-bezier(0.22, 0.61, 0.36, 1) infinite;
    filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.92));
  }
  #plungerGuideOverlay .pg-hand {
    font-size: clamp(16px, 2.5vh, 23px);
    line-height: 1;
  }
  #plungerGuideOverlay .pg-chevrons {
    font-size: clamp(12px, 1.8vh, 16px);
    font-weight: 900;
    line-height: 0.85;
    color: #FDE047;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.95), 0 1px 2px #000;
  }
  #plungerGuideOverlay .pg-pill {
    position: absolute;
    right: -4%;
    top: 83%;
    transform: translateX(0);
    padding: 3px 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, rgba(20, 12, 4, 0.96) 0%, rgba(45, 24, 6, 0.98) 100%);
    border: 1.5px solid #FDE047;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.85), 0 0 12px rgba(250, 204, 21, 0.58);
    color: #FEF08A;
    font-size: clamp(9.5px, 1.32vh, 11.5px);
    font-weight: 900;
    letter-spacing: 0.02em;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
    animation: pgPillBob 1.15s ease-in-out infinite;
  }
  #plungerGuideOverlay .pg-pill::after {
    content: '';
    position: absolute;
    right: 26%;
    top: -6px;
    width: 9px;
    height: 9px;
    background: #1B1004;
    border-left: 1.5px solid #FDE047;
    border-top: 1.5px solid #FDE047;
    transform: rotate(45deg);
  }
  #plungerGuideOverlay.boost-pulse .pg-ring {
    border-color: #34D399;
    box-shadow: 0 0 22px rgba(52, 211, 153, 0.98), 0 0 34px rgba(250, 204, 21, 0.95);
  }
  #plungerGuideOverlay.boost-pulse .pg-pill {
    border-color: #34D399;
    color: #FFFFFF;
    background: linear-gradient(180deg, rgba(6, 78, 59, 0.96) 0%, rgba(4, 120, 87, 0.96) 100%);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.9), 0 0 18px rgba(52, 211, 153, 0.85);
    transform: scale(1.08);
  }
  @keyframes pgRingPulse {
    0%, 100% { transform: translate(-50%, -50%) scale(0.92); opacity: 0.82; }
    50% { transform: translate(-50%, -32%) scale(1.12); opacity: 1; }
  }
  @keyframes pgSlideDown {
    0% { transform: translate(-50%, -6px); opacity: 0.35; }
    30% { opacity: 1; }
    80% { transform: translate(-50%, 24px); opacity: 1; }
    100% { transform: translate(-50%, 30px); opacity: 0.15; }
  }
  @keyframes pgPillBob {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(3px); }
  }
  #roomPlunger3D .plunger-part {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
  }
  /* 一体式 3D 4 螺丝发射盒顶盖 + 全长深凹 U 型金属导轨槽（承载内部弹簧与拉杆） */
  #plungerBase3D {
    display: block !important;
    clip-path: none;
    z-index: 1;
  }
  /* 中段 3D 黄金弹簧与芯轴：顶部固定在 4 螺丝盒下沿 (18.2%)，初始收短为 0.35 倍留出充足下拉空间，随手指下拉跟着拉长 */
  #plungerSpring3D {
    display: block !important;
    clip-path: inset(18.1% 22.8% 43.8% 22.8%);
    transform-origin: 50% 18.2%;
    transform: scaleY(0.35);
    will-change: transform;
    z-index: 2;
  }
  #plungerCoilCanvas {
    display: none !important;
  }
  /* 底部鎏金颈圈 + 球头：初始静止位置上移收短 (-24.57%)，为向下拉动留出长行程，随黄金弹簧拉长同步下移并保持正圆不变形 */
  #plungerKnob3D {
    clip-path: inset(55.6% 0% 0% 0%);
    transform: translate3d(0px, -24.57%, 0px);
    will-change: transform;
    z-index: 3;
  }

  /* 网页版（@media (min-width: 769px) and (min-aspect-ratio: 3/4)）：
   * 底部留出更大下探空间 + 无缝拼接各机台原图 3D 下护板与黄金底框 (assets/room_skirt_m01..05.png)；右侧 #power 拉杆条保留
   */
  @media (min-width: 769px) and (min-aspect-ratio: 3/4) {
    #roomCabinetShell {
      bottom: 118px;
      height: calc(100dvh - 118px);
      width: min(100vw, calc((100dvh - 118px) * 508 / 888));
    }
    /* 网页版机台底部无缝拼接对应机台 3D 下护板、拉杆底槽与黄金底框，彻底消除底部黑块 */
    #roomCabinetShell::after {
      content: '';
      position: absolute;
      left: 0;
      width: 100%;
      top: 99.6%;
      height: 76px;
      background: var(--room-machine-skirt-bg, url('../../assets/room_skirt_m01.png?v=3.4.3')) center top / 100% 100% no-repeat;
      filter: drop-shadow(0 14px 26px rgba(0, 0, 0, 0.78));
      pointer-events: none;
      z-index: 3;
    }
    #power {
      display: none !important;
    }
  }

  /* 手机竖屏自适应（@media (max-width: 768px), (max-aspect-ratio: 3/4)）：
   * 全屏只显示上下等宽的直立 3D 机台，手机版拉杆与机身保持不动，仅隐藏最右边拉杆条 (#power)
   */
  @media (max-width: 768px), (max-aspect-ratio: 3/4) {
    html, body {
      background: #080d1a !important;
    }
    .room-stage-container,
    #roomCabinetShell {
      left: 0 !important;
      top: 0 !important;
      bottom: 44px !important;
      transform: none !important;
      width: 100vw !important;
      max-width: 100vw !important;
      height: calc(100dvh - 44px) !important;
      max-height: calc(100dvh - 44px) !important;
      aspect-ratio: auto !important;
      margin: 0 !important;
      padding: 0 !important;
      border-radius: 0 !important;
      background: transparent !important;
      overflow: visible !important;
    }
    #roomShellBase {
      left: 0 !important;
      width: 100% !important;
      top: 0 !important;
      height: 100% !important;
      background: var(--room-machine-bg, url('../../assets/room_shell_m01.webp?v=20261120_original_blue')) center center / 100% 100% no-repeat !important;
      -webkit-mask-image: none !important;
      mask-image: none !important;
      filter: none !important;
    }
    #roomShellBase::before,
    #roomApronBar,
    #roomApronLeftPlate,
    #roomApronSapphire,
    #power {
      display: none !important;
    }
  }
  .hud { position: fixed; pointer-events: none; z-index: 5; }
  .panel { background: var(--panel);
    border: 2px solid #d8bc82; box-shadow: 0 8px 24px rgba(0,0,0,.55); border-radius: 16px; }

  #topbar { display: none !important; }

  /* =========================================================================
   * 1. 顶部净空：左上角紧凑迷你 App 奖券胶囊 (#ticketBar) + 快捷 +AD 激励广告按钮
   *    珍珠白 + 香槟金亮色轻奢风格
   * ========================================================================= */
  #ticketBar {
    position: fixed;
    top: max(112px, calc(env(safe-area-inset-top) + 12.8dvh));
    left: max(10px, env(safe-area-inset-left, 10px));
    height: 26px;
    padding: 0 5px 0 8px;
    border-radius: 999px;
    background: linear-gradient(180deg, #FFFDF9 0%, #F2E8D5 100%);
    border: 2px solid #D4A85F;
    box-shadow: 0 4px 10px rgba(90, 60, 20, 0.25), inset 0 1px 0 #FFFFFF;
    color: #4A3316;
    font-size: 11px;
    font-weight: 900;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    pointer-events: auto;
    z-index: 7;
    transition: transform 0.12s ease, filter 0.18s ease;
  }
  #ticketBar:hover { transform: scale(1.03); filter: brightness(1.04); }
  #ticketBar:active { transform: scale(0.95); }
  #ticketBar .tk-val {
    font-family: var(--font-num);
    font-weight: 900;
    font-style: italic;
    color: #fff8e7 !important;
    -webkit-text-fill-color: #fff8e7 !important;
    background: none !important;
    font-size: 13px !important;
    letter-spacing: 0.02em;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.9) !important;
  }
  #ticketBar .tk-orb {
    font-size: 10.5px;
    line-height: 1;
  }
  .tk-ad-plus {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 18px;
    padding: 0 5px;
    margin-left: 1px;
    border-radius: 999px;
    background: linear-gradient(135deg, #10b981, #059669);
    border: 1px solid #6ee7b7;
    color: #ffffff;
    font-family: var(--font-num);
    font-weight: 800;
    font-style: italic;
    font-size: 9px;
    line-height: 1;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.45);
    cursor: pointer;
  }
  .tk-ad-plus:hover { filter: brightness(1.12); }

  /* =========================================================================
   * 2. 右上角 3 颗标准系统圆钮（移至右侧霓虹柱下方的绿框位置：🏛️ ホール / 🎥 視点 / ⚙️ 設定）
   * ========================================================================= */
  #btns {
    top: max(146px, calc(env(safe-area-inset-top) + 16.8dvh));
    right: max(10px, env(safe-area-inset-right, 10px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 5px;
    pointer-events: auto;
    z-index: 7;
  }
  .btn-circle,
  .top-right-hud-btn {
    width: 38px;
    height: 38px;
    border-radius: 50% !important;
    background-image: url('../../assets/hud_round_buttons_3d.webp') !important;
    background-size: 342% auto !important;
    background-repeat: no-repeat !important;
    border: none !important;
    box-shadow: 0 4px 10px rgba(70, 45, 10, 0.3) !important;
    color: #4A3316;
    font-family: var(--font-arcade);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    line-height: 1.05;
    transition: transform 0.08s ease, filter 0.1s ease !important;
    position: relative;
    padding: 0;
  }
  /* 分别切取左(ホール建筑)、中(視点镜头)、右(設定齿轮)三颗 3D 圆键 */
  #bHall.btn-circle, .top-right-hud-btn:nth-child(1), #btns > .btn-circle:nth-of-type(1) { background-position: 5.8% center !important; }
  #bCam.btn-circle,  .top-right-hud-btn:nth-child(2), #btns > .btn-circle:nth-of-type(2) { background-position: 50.0% center !important; }
  #bMenu.btn-circle, .top-right-hud-btn:nth-child(3), #btns > .btn-circle:nth-of-type(3) { background-position: 94.2% center !important; }
  /* 隐藏旧扁平 emoji 与文字，保留 DOM ID 供多语言脚本安全更新 */
  #btns > .btn-circle > span,
  #btns > .top-right-hud-btn > span { display: none !important; }
  .btn-circle:hover,
  .top-right-hud-btn:hover { transform: scale(1.06); filter: brightness(1.06); }
  .btn-circle:active,
  .top-right-hud-btn:active {
    transform: translateY(2px) scale(0.94) !important;
    filter: brightness(1.15) !important;
  }
  .btn-circle.off,
  .top-right-hud-btn.off { opacity: .45; }

  /* =========================================================================
   * 3. 机身腰部左右边缘切台小耳标（‹ / ›）
   * ========================================================================= */
  .side-ear-btn {
    position: fixed;
    top: 58%;
    transform: translateY(-50%);
    width: 22px;
    height: 52px;
    background: linear-gradient(180deg, rgba(16, 24, 42, 0.88) 0%, rgba(6, 10, 20, 0.94) 100%);
    border: 1.5px solid rgba(216, 188, 130, 0.65);
    color: #fde047;
    font-size: 16px;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    pointer-events: auto;
    z-index: 6;
    opacity: 0.45;
    transition: opacity 0.18s ease, transform 0.12s ease, filter 0.15s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.65);
  }
  .side-ear-btn:hover, .side-ear-btn:active {
    opacity: 0.95;
    filter: brightness(1.15);
  }
  #bSidePrev {
    left: 0;
    border-left: none;
    border-radius: 0 10px 10px 0;
  }
  #bSideNext {
    right: 0;
    border-right: none;
    border-radius: 10px 0 0 10px;
  }

  /* 隐藏原右侧边缘重复的浮动技能球栏 (#trumpLoaderBar)，统一合并至机台左下角实体按键 (#apronBtns) */
  #trumpLoaderBar {
    display: none !important;
  }

  /* 盘面中央：MACHINE 02~05 高级预告 & 通行证面板 (#machineLockOverlay) */
  #machineLockOverlay {
    top: 48%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(352px, 88vw);
    padding: 20px 18px 18px;
    border-radius: 24px;
    background: linear-gradient(155deg, rgba(14, 22, 46, 0.96) 0%, rgba(5, 8, 18, 0.98) 100%);
    border: 2.5px solid #d8bc82;
    box-shadow:
      0 22px 52px rgba(0, 0, 0, 0.94),
      0 0 32px rgba(216, 188, 130, 0.28),
      inset 0 0 0 1.5px rgba(254, 240, 138, 0.22);
    /* thermal-opt */
    -webkit-/* thermal-opt */
    color: #f8fafc;
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
    pointer-events: auto;
    z-index: 11;
  }
  #machineLockOverlay.show { display: flex; animation: popIn 0.22s ease-out; }
  .mlo-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 13px;
    border-radius: 999px;
    font-family: var(--font-arcade);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.06em;
    background: rgba(245, 158, 11, 0.18);
    border: 1.5px solid #fde047;
    color: #fde047;
    text-shadow: 0 1px 0 #000;
  }
  .mlo-badge.unlocked {
    background: linear-gradient(135deg, rgba(147, 51, 234, 0.45) 0%, rgba(234, 179, 8, 0.35) 100%);
    border: 1.5px solid #fde047;
    color: #fef08a;
    box-shadow: 0 0 18px rgba(168, 85, 247, 0.55), inset 0 0 8px rgba(253, 224, 71, 0.35);
    text-shadow: 0 1px 2px #000, 0 0 8px rgba(253, 224, 71, 0.5);
  }
  .mlo-title {
    font-family: var(--font-arcade);
    font-size: 22px;
    font-weight: 900;
    letter-spacing: 0.06em;
    color: #fef08a;
    text-shadow: 0 2px 0 #000, 0 0 14px rgba(255, 200, 80, 0.55);
  }
  .mlo-sub {
    font-family: var(--font-arcade);
    font-size: 11px;
    font-weight: 900;
    color: #d8bc82;
    padding: 3px 11px;
    border-radius: 8px;
    background: rgba(216, 188, 130, 0.14);
    border: 1px solid rgba(216, 188, 130, 0.4);
    letter-spacing: 0.04em;
    text-shadow: 0 1px 0 #000;
  }
  .mlo-sub.coming-soon {
    background: linear-gradient(90deg, rgba(14, 165, 233, 0.24), rgba(147, 51, 234, 0.28));
    border-color: #7dd3fc;
    color: #e0f2fe;
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.25);
  }
  .mlo-desc {
    font-size: 12.5px;
    line-height: 1.6;
    color: #e2e8f0;
    font-weight: 800;
  }
  .mlo-prog-wrap {
    width: 100%;
    background: rgba(8, 13, 28, 0.92);
    border: 1px solid rgba(216, 188, 130, 0.4);
    border-radius: 12px;
    padding: 8px 11px;
    display: flex;
    flex-direction: column;
    gap: 5px;
  }
  .mlo-prog-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 11px;
    font-weight: 900;
    color: #f7e7c4;
  }
  #mloProgVal {
    font-family: var(--font-num);
    font-weight: 800;
    font-style: italic;
    font-size: 12.5px;
    color: #fde047;
  }
  .mlo-prog-bar {
    width: 100%;
    height: 8px;
    background: #03060e;
    border-radius: 999px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
  }
  .mlo-prog-fill {
    height: 100%;
    background: linear-gradient(90deg, #a855f7 0%, #f59e0b 55%, #fde047 100%);
    border-radius: 999px;
    box-shadow: 0 0 10px rgba(250, 204, 21, 0.6);
    transition: width 0.25s ease;
  }
  .mlo-btn-unlock {
    width: 100%;
    padding: 12px 14px;
    border-radius: 13px;
    border: 2px solid #fef9c3;
    background: linear-gradient(180deg, #fef08a 0%, #f59e0b 48%, #b45309 100%);
    color: #1e0d02;
    font-family: var(--font-arcade);
    font-size: 13.5px;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 4px 0 #78350f, 0 8px 20px rgba(245, 158, 11, 0.5), inset 0 1px 1px rgba(255,255,255,0.85);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.55);
    transition: transform 0.1s, filter 0.15s, box-shadow 0.1s;
  }
  .mlo-btn-unlock:hover { filter: brightness(1.08); }
  .mlo-btn-unlock:active {
    transform: translateY(3px);
    box-shadow: 0 1px 0 #78350f, 0 4px 10px rgba(245, 158, 11, 0.4);
  }
  .mlo-btn-back {
    width: 100%;
    padding: 10px 12px;
    border-radius: 12px;
    border: 1.5px solid rgba(216, 188, 130, 0.5);
    background: rgba(22, 32, 56, 0.92);
    color: #f7e7c4;
    font-family: var(--font-arcade);
    font-size: 12px;
    font-weight: 900;
    cursor: pointer;
    text-shadow: 0 2px 0 #000;
  }
  .mlo-btn-back:hover { background: rgba(34, 48, 82, 0.95); }

  /* =========================================================================
   * 4. 左下角前护板：3 颗王牌母球实体装填按键 (#apronBtns：3倍紅蓮 / 磁吸翡翠 / 黄金全開)
   *    彻底解决左右按钮重复冲突，带剩余球数角标与霓虹充能呼吸灯
   * ========================================================================= */
  #apronBtns {
    position: fixed;
    left: 50%;
    bottom: 68px;
    transform: translate(-50%, 50%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    pointer-events: auto;
    z-index: 6;
    transform-origin: center center;
  }
  .arcade-btn,
  .skill-btn {
    width: 62px;
    height: 62px;
    border-radius: 50% !important;
    background-image: url('../../assets/skill_buttons_3d.webp') !important;
    background-size: 348% auto !important;
    background-repeat: no-repeat !important;
    border: none !important;
    box-shadow: 0 5px 12px rgba(40, 20, 0, 0.45) !important;
    cursor: pointer;
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    font-family: var(--font-arcade);
    font-weight: 900;
    transition: transform 0.08s ease, filter 0.1s ease, box-shadow 0.18s ease !important;
    padding: 0 0 6px;
    outline: none;
  }
  /* 分别切取左(红宝石)、中(祖母绿)、右(琥珀金)三颗 3D 宝石按键 */
  #btnTrumpRuby,    .skill-btn:nth-child(1), .arcade-btn.ruby-neon    { background-position: 4.95% 50.5% !important; color: #ffe4e6; }
  #btnTrumpEmerald, .skill-btn:nth-child(2), .arcade-btn.emerald-neon { background-position: 50.0% 50.5% !important; color: #d1fae5; }
  #btnTrumpGold,    .skill-btn:nth-child(3), .arcade-btn.gold-neon    { background-position: 94.95% 50.5% !important; color: #fef9c3; }

  .arcade-btn:hover,
  .skill-btn:hover {
    filter: brightness(1.10);
    transform: translateY(-1px) scale(1.04);
  }
  /* 实体街机按键按压回弹反馈 */
  .arcade-btn:active,
  .skill-btn:active {
    transform: translateY(3px) scale(0.93) !important;
    filter: brightness(1.18) !important;
  }
  @keyframes apronArmedRuby {
    0%, 100% { box-shadow: 0 0 0 2.5px rgba(255, 23, 68, 0.75), 0 0 18px #ff1744, 0 5px 12px rgba(40, 20, 0, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(255, 23, 68, 0.95), 0 0 28px #ff1744, 0 5px 12px rgba(40, 20, 0, 0.45); }
  }
  @keyframes apronArmedEmerald {
    0%, 100% { box-shadow: 0 0 0 2.5px rgba(16, 185, 129, 0.75), 0 0 18px #10b981, 0 5px 12px rgba(40, 20, 0, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.95), 0 0 28px #10b981, 0 5px 12px rgba(40, 20, 0, 0.45); }
  }
  @keyframes apronArmedGold {
    0%, 100% { box-shadow: 0 0 0 2.5px rgba(250, 204, 21, 0.8), 0 0 20px #facc15, 0 5px 12px rgba(40, 20, 0, 0.45); }
    50% { box-shadow: 0 0 0 5px rgba(250, 204, 21, 0.98), 0 0 30px #fde047, 0 5px 12px rgba(40, 20, 0, 0.45); }
  }
  .arcade-btn.ruby-neon.armed {
    animation: apronArmedRuby 1.15s infinite ease-in-out;
    transform: translateY(-2px) scale(1.08);
    filter: brightness(1.15);
  }
  .arcade-btn.emerald-neon.armed {
    animation: apronArmedEmerald 1.15s infinite ease-in-out;
    transform: translateY(-2px) scale(1.08);
    filter: brightness(1.15);
  }
  .arcade-btn.gold-neon.armed {
    animation: apronArmedGold 1.15s infinite ease-in-out;
    transform: translateY(-2px) scale(1.08);
    filter: brightness(1.15);
  }
  /* 隐藏旧扁平小圆点，直接露出 3D 宝石球面 */
  .trump-dot {
    display: none !important;
  }
  .trump-lbl {
    font-family: var(--font-arcade);
    font-size: 8.5px;
    font-weight: 900;
    line-height: 1;
    padding: 1.5px 5px;
    border-radius: 999px;
    background: rgba(12, 8, 4, 0.68);
    color: #ffffff;
    letter-spacing: -0.02em;
    white-space: nowrap;
    text-shadow: 0 1px 2px #000;
  }
  .trump-cnt {
    position: absolute;
    top: 2px;
    right: -6px;
    min-width: 21px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: linear-gradient(135deg, #0f172a, #020617);
    border: 1.5px solid #d8bc82;
    color: #fde047;
    font-family: var(--font-num);
    font-weight: 800;
    font-style: italic;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.88);
    text-shadow: 0 1px 0 #000;
  }
  .trump-cnt.ad-free {
    background: linear-gradient(135deg, #10b981, #047857);
    border-color: #a7f3d0;
    color: #ffffff;
    font-family: var(--font-arcade);
    font-style: normal;
    font-size: 8.5px;
    padding: 0 4px;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.85);
  }

  #drawer {
    display: none;
    flex-direction: column;
    gap: 7px;
    background: rgba(10,15,28,.96);
    /* thermal-opt */
    -webkit-/* thermal-opt */
    padding: 10px;
    border-radius: 20px;
    border: 2px solid #d8bc82;
    box-shadow: 0 12px 28px rgba(0,0,0,.75);
    margin-top: 2px;
  }
  #drawer.open { display: flex; animation: popIn .16s ease-out; }
  @keyframes popIn { from { opacity: 0; transform: translateY(-6px) scale(.94); } to { opacity: 1; transform: translateY(0) scale(1); } }
  .drawer-row { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; }
  .drawer-btn {
    padding: 8px 11px; border-radius: 12px; border: 1.5px solid rgba(216,188,130,.38);
    background: rgba(22,32,54,.92); color: #f8fafc; font-size: 12px; font-weight: 900; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
  }
  .drawer-btn:hover { background: rgba(38,52,82,.95); }
  .drawer-btn:active { transform: scale(.95); }
  .drawer-btn.off { opacity: .42; }

  /* 右侧宽幅盲操触控感应区（覆盖中上部刻度尺与右下实体拉杆区直达屏幕最底边，支持顺畅下拉） */
  #powerTouchZone {
    position: fixed;
    right: 0;
    top: 32%;
    bottom: 0;
    width: 136px;
    height: auto;
    pointer-events: auto;
    z-index: 5;
    cursor: ns-resize;
    touch-action: none;
  }

  /* 右侧拉杆蓄力刻度槽 (#power)：整体下移至原 10 刻度位置，长度增加 1/5 (+20%) */
  #power {
    right: 6px;
    top: 44.0%;
    bottom: auto;
    pointer-events: auto;
    cursor: ns-resize;
    width: 40px;
    height: 326px;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 0 7px;
    gap: 4px;
    background: linear-gradient(180deg, #FFFDF9 0%, #F2E8D5 100%);
    border: 2.5px solid #D4A85F;
    box-shadow: 0 6px 16px rgba(80, 50, 10, 0.35), inset 0 1px 0 #FFFFFF;
    border-radius: 20px;
    z-index: 6;
  }
  #power .bar {
    position: relative;
    width: 11px;
    flex: 1;
    margin-left: 10px;
    background:
      repeating-linear-gradient(
        180deg,
        rgba(245, 185, 66, 0.28) 0px,
        rgba(245, 185, 66, 0.28) 1.5px,
        transparent 1.5px,
        transparent 8%
      ),
      #1A1208;
    border-radius: 6px;
    border: 1.2px solid #C69338;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.85);
    overflow: visible;
  }
  #power .fillp {
    position: absolute; left: 0; right: 0; top: 0; height: 0%;
    background: linear-gradient(180deg, #38bdf8 0%, #00e5ff 55%, #22c55e 100%);
    box-shadow: 0 0 8px rgba(0,229,255,.55);
    border-radius: 5px;
  }
  #power .sweet-zone {
    position: absolute; left: -3px; right: -3px; top: 65%; height: 19%;
    background: rgba(34, 197, 94, 0.25);
    border-top: 1.5px dashed #16a34a;
    border-bottom: 1.5px dashed #16a34a;
    border-radius: 3px;
    pointer-events: none;
  }
  #power .mark {
    position: absolute; left: -4px; right: -3px; height: 1.5px;
    background: rgba(168, 120, 40, 0.55); pointer-events: none;
  }
  #power .mark span {
    position: absolute; right: 13px; top: -6px;
    font-size: 8.5px; font-weight: 900; color: #5A3E1B;
    font-variant-numeric: tabular-nums;
  }
  #power .last-mark {
    position: absolute; left: -6px; right: -6px; top: 0%; height: 3px;
    background: #ff2a85; box-shadow: 0 0 8px rgba(255,42,133,.9);
    border-radius: 2px; opacity: 0; transition: top .18s, opacity .25s;
    pointer-events: none; z-index: 2;
  }
  #power .thumb {
    position: absolute; left: 50%; top: 0%; width: 24px; height: 24px;
    transform: translate(-50%, -50%);
    background:
      url('../../assets/plunger_handle_3d.png') 50% 96% / 112% auto no-repeat,
      radial-gradient(circle at 35% 32%, #82B1FF 0%, #1565C0 55%, #061A48 100%);
    border: 1.8px solid #E5C17B;
    border-radius: 50%;
    box-shadow:
      0 3px 9px rgba(10, 48, 128, 0.72),
      0 0 8px rgba(56, 189, 248, 0.55),
      inset 0 1.5px 2.5px rgba(255, 255, 255, 0.9);
    pointer-events: none; z-index: 3;
  }
  #power .mm {
    font-family: var(--font-num);
    font-weight: 800;
    font-style: italic;
    font-size: 11.5px;
    color: #1565C0;
    margin-top: 2px;
    text-shadow: 0 1px 0 #FFFFFF;
  }
  #power .lbl {
    font-family: var(--font-arcade);
    font-size: 8.5px;
    letter-spacing: .06em;
    color: #4A3316;
    font-weight: 900;
  }

  #hint { display: none !important; left: 50%; bottom: max(214px, calc(env(safe-area-inset-bottom) + 24.8dvh)); transform: translateX(-50%);
    padding: 2px 10px; font-size: 9.5px; font-weight: 900; color: #f5e6c8; letter-spacing: .02em;
    background: rgba(8,12,22,.84); border: 1px solid rgba(216,188,130,.45);
    max-width: 92vw; text-align: center; transition: opacity .6s; white-space: nowrap; }

/* 🖥️ 宽屏/桌面屏幕下 HUD 控件收敛对齐中央机台两翼，杜绝外飘至屏幕边缘 */
#power {
  display: none !important;
}

@media (min-width: 680px) {
  #ticketBar {
    left: max(12px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) + 12px)) !important;
  }
  #btns {
    right: max(12px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) + 12px)) !important;
  }
  #bStageCodex {
    right: max(60px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) + 60px)) !important;
  }
  .side-ear-btn.prev {
    left: max(6px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) - 20px)) !important;
  }
  .side-ear-btn.next {
    right: max(6px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) - 20px)) !important;
  }
  #plungerContainer {
    right: max(12px, calc(50vw - min(50vw, calc((100dvh - 44px) * 284 / 888)) + 12px)) !important;
  }
}

@media (min-width: 769px) and (min-aspect-ratio: 3/4) {
  #ticketBar {
    left: max(12px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) + 12px)) !important;
  }
  #btns {
    right: max(12px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) + 12px)) !important;
  }
  #bStageCodex {
    right: max(60px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) + 60px)) !important;
  }
  .side-ear-btn.prev {
    left: max(6px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) - 20px)) !important;
  }
  .side-ear-btn.next {
    right: max(6px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) - 20px)) !important;
  }
  #plungerContainer {
    right: max(12px, calc(50vw - min(50vw, calc((100dvh - 118px) * 254 / 888)) + 12px)) !important;
  }
}

/* ========================================================
   NO.06 浪速電鉄・平成改 专属绘真 V9 1:1 零畸变机壳与双屏合一布局 (R15)
   ======================================================== */
body.machine-m06 #roomCabinetShell {
  top: calc(max(env(safe-area-inset-top, 0px), 18px) + (100dvh - 44px - max(env(safe-area-inset-top, 0px), 18px) - env(safe-area-inset-bottom, 0px)) / 2) !important;
  bottom: auto !important;
  width: min(100vw, calc((100dvh - 44px - max(env(safe-area-inset-top, 0px), 18px) - env(safe-area-inset-bottom, 0px)) * 797 / 1024)) !important;
  height: auto !important;
  aspect-ratio: 797 / 1024 !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
}

body.machine-m06 #roomCabinetShell::before,
body.machine-m06 #roomCabinetShell::after {
  display: none !important;
}

body.machine-m06 #roomShellBase {
  z-index: 4 !important;
}

/* 顶部计分屏槽位：1:1 精准嵌入绘真 V9 上屏金框窗口 (x: 128..663, y: 57..364 in 797x1024)，
 * z-index: 3 高于 canvas#c (2) 且低于 #roomShellBase (4)，确保动态双六大屏清晰透出 */
body.machine-m06 #roomTopLcdSlot {
  left: 16.06% !important;
  width: 67.13% !important;
  top: 5.57% !important;
  height: 29.98% !important;
  border: none !important;
  border-radius: 10px !important;
  box-shadow: none !important;
  background: #071d39 !important;
  z-index: 3 !important;
}

body.machine-m06 #roomTopLcdSlot canvas {
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: fill !important;
}

/* 3D 物理球盘槽位：与 797×1024 外框 100% 共享同一根容器坐标，0.0px 对齐 */
body.machine-m06 canvas#c {
  top: 0 !important;
  height: 100% !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 2 !important;
}

/* 隐藏 1F 专属 DOM 遮挡层与广告补充按钮，保留通透的底部 3D 斜坡滚珠堆叠与 3D 金属拉杆；
 * 彻底恢复 #roomApronSockets 与 #apronBtns（3颗街机实体特技球大按键）并居中对齐 V9 底部四铆钉金框 */
body.machine-m06 #roomBallRefillAdBtn,
body.theme-us-arcade.machine-m06 #roomBallRefillAdBtn,
body.machine-m06 #bStageCodex,
body.theme-us-arcade.machine-m06 #bStageCodex,
body.machine-m06 #roomApronBar,
body.machine-m06 #roomApronLeftPlate,
body.machine-m06 #roomApronSapphire,
body.machine-m06 #adBannerSlot,
body.machine-m06 .free-balls-ad-btn,
body.machine-m06 #roomPillarLampL,
body.machine-m06 #roomPillarLampR,
body.machine-m06 #roomCozyJapanDecor {
  display: none !important;
}

/* NO.06 专属底部三色宝石道具键插座：上移坐稳黄铜围板上沿，充分让出下方由绘真13重绘的展示橱窗（与 NO.01~05 高度一致） */
/* The alpha edge follows the original 797 × 1024 cabinet aperture. */
body.machine-m06 #roomShellBase::after {
  content: "";
  position: absolute;
  pointer-events: none;
  left: 12.04517%;
  top: 91.69922%;
  width: 68.25596%;
  height: 8.30078%;
  background: url("../../assets/machines/m06/m06_apron_marble_showcase.webp?v=20261120-blue-r2") center / 100% 100% no-repeat;
}

body.machine-m06 #roomApronSockets {
  display: block !important;
  position: absolute !important;
  left: 15.0% !important;
  width: 44.0% !important;
  height: 7.4% !important;
  aspect-ratio: auto !important;
  top: 88.8% !important;
  border-radius: 999px !important;
  background: none !important;
  box-shadow: none !important;
  pointer-events: none !important;
  z-index: 5 !important;
}

/* NO.06 专属右侧力度刻度栏（严格收在右柱金框上方，禁止竖屏溢出底部） */
body.machine-m06 #plungerPowerGaugeBar {
  left: 91.5% !important;
  top: 45.5% !important;
  width: 4.8% !important;
  min-width: 14px !important;
  max-width: 24px !important;
  height: 35.5% !important;
  min-height: 0 !important;
  max-height: none !important;
}

/* NO.06 底部拉杆装置与引导完全对齐前五台 (NO.01~NO.05) 真实 236:563 比例与布局 */
body.machine-m06 #roomPlunger3D {
  left: 79.8% !important;
  width: 9.2% !important;
  top: 84.85% !important;
  height: auto !important;
  aspect-ratio: 236 / 563 !important;
  z-index: 125 !important;
}

body.machine-m06 #plungerGuideOverlay {
  left: 75.3% !important;
  width: 18.2% !important;
  top: 83.2% !important;
  height: 15.6% !important;
  z-index: 126 !important;
}

body.machine-m06 #plungerSweetSpotScale {
  right: 20.5% !important;
  top: 86.0% !important;
}

body.machine-m06 #apronBtns {
  display: flex !important;
  pointer-events: auto !important;
  z-index: 6 !important;
}

/* NO.06 下囲板。木縁を筐体の直下に固定し、盤面と発射装置を空ける。 */
body.machine-m06 {
  --m06-top-inset: max(18px, env(safe-area-inset-top, 0px));
  --m06-play-height: calc(100dvh - 44px - var(--m06-top-inset) - env(safe-area-inset-bottom, 0px));
  --m06-cab-height: min(calc(100vw * 1024 / 797), calc(var(--m06-play-height) - 76px));
  --m06-shell-center: calc(var(--m06-top-inset) + min(var(--m06-play-height) / 2, var(--m06-play-height) - 76px - var(--m06-cab-height) / 2));
}
.m06-apron-accessories { display: none; }
body.machine-m06:not(.in-hall) .m06-apron-accessories {
  position: fixed;
  top: calc(var(--m06-shell-center) + var(--m06-cab-height) / 2 + 12px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: grid;
  grid-template-columns: 0.94fr 1.15fr;
  gap: 5px;
  width: min(91vw, calc(var(--m06-cab-height) * 797 / 1024 * .91), 388px);
  padding: 3px 6px 5px;
  box-sizing: border-box;
  border: 1px solid #704522;
  border-top-color: #efd49c;
  border-radius: 2px 2px 8px 8px;
  background: repeating-linear-gradient(1deg, #542e1d77 0 1px, transparent 2px 4px),
              linear-gradient(#81522d, #391e14 13%, #5b351e 84%, #200f0d);
  box-shadow: inset 0 2px #c69c64, inset 0 -2px #8f6743, 0 4px 6px #030100b3;
  pointer-events: auto;
}
#btnF2Recharge, #btnM06Puzzle { display: none !important; }
body.machine-m06:not(.in-hall) .m06-apron-accessories > :is(#btnF2Recharge, #btnM06Puzzle) {
  position: relative;
  inset: auto;
  display: flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-width: 0;
  min-height: 44px;
  margin: 0;
  border: 0;
  border-radius: 2px;
  background: transparent var(--m06-prop) center / 100% 100% no-repeat;
  box-shadow: none;
  color: #fff0be;
  font: 800 clamp(11px, 3.1vw, 14px)/1 system-ui, sans-serif;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 1px 2px #1a0900, 0 -1px #432514;
  white-space: nowrap;
  gap: 4px;
  padding: 1px 12% 5px 10%;
  cursor: pointer;
  touch-action: manipulation;
  pointer-events: auto !important;
}
body.machine-m06:not(.in-hall) #btnF2Recharge {
  --m06-prop: url('../../assets/machines/m06/m06_apron_coin_slide.webp');
  padding-inline: 17% 5%;
}
.m06-rem-balls-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 3px;
  padding: 2px 5px;
  border-radius: 5px;
  background: rgba(15, 23, 42, 0.90);
  border: 1px solid #fbbf24;
  color: #fde047;
  font-size: 10.5px;
  font-weight: 900;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  flex-shrink: 0;
}
.m06-rem-balls-pill.low {
  background: rgba(127, 29, 29, 0.92);
  border-color: #fca5a5;
  color: #fee2e2;
}
#btnM06Puzzle { --m06-prop: url('../../assets/machines/m06/m06_apron_puzzle_album.webp'); }
.m06-plate-icon { width: 14px; height: 14px; flex: none; color: #f7d993; }
.m06-apron-accessories > button:active { transform: translateY(1px); filter: brightness(.92); }
.m06-apron-accessories > button:focus-visible { outline: 2px solid #fff1ba; outline-offset: 1px; }

body.machine-m06 #roomCabinetShell {
  width: calc(var(--m06-cab-height) * 797 / 1024) !important;
  top: var(--m06-shell-center) !important;
}
.m06-apron-accessories button > * { pointer-events: none; }

.m06-honor-host {
  inline-size: min(100%, 560px);
  margin: 0 auto 2px;
  padding: 0 8px;
  flex-shrink: 0;
  box-sizing: border-box;
}

.m06-puzzle-toast {
  position: fixed;
  top: max(calc(env(safe-area-inset-top, 8px) + 42px), 48px);
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  z-index: 260;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
  max-width: min(92vw, 360px);
  padding: 7px 14px;
  border-radius: 14px;
  border: 1px solid #fbbf24;
  background: rgba(15, 23, 42, 0.94);
  color: #fef3c7;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.55);
}
.m06-puzzle-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

#btnM06RapidFire {
  display: none !important;
}
body.machine-m06:not(.in-hall) #btnM06RapidFire.show {
  display: inline-flex !important;
  pointer-events: auto !important;
  touch-action: manipulation !important;
  user-select: none !important;
  -webkit-user-select: none !important;
  align-items: center;
  justify-content: center;
  gap: 5px;
  position: fixed;
  right: max(env(safe-area-inset-right, 14px), 14px);
  bottom: max(calc(env(safe-area-inset-bottom, 0px) + 74px), 74px);
  min-width: 102px;
  height: 46px;
  padding: 0 14px;
  z-index: 125;
  border-radius: 999px;
  border: 2px solid #fde047;
  background: linear-gradient(135deg, #b91c1c 0%, #ef4444 50%, #f59e0b 100%);
  color: #ffffff;
  font-size: 13.5px;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.85);
  box-shadow: 0 6px 18px rgba(239, 68, 68, 0.55), 0 0 0 2px rgba(253, 224, 71, 0.45), inset 0 1px 2px rgba(255, 255, 255, 0.65);
  cursor: pointer;
}
body.machine-m06:not(.in-hall) #btnM06RapidFire.show:active,
body.machine-m06:not(.in-hall) #btnM06RapidFire.show.firing {
  transform: scale(0.94);
  filter: brightness(1.12);
}

/* =========================================================================
 * R22 全机台真实水晶灯柱与拱门灯泡大联动层 (#m06RealLampsCanvas)
 * ========================================================================= */
/* R22 彻底移除悬浮机壳外侧假灯条与上屏 18 个假小蓝点，100% 由 #m06RealLampsCanvas + m06_cabinet_real_lamps_mask.png 驱动真实水晶灯柱与拱门灯泡 */
.cabinet-stage::before,
.cabinet-stage::after,
body.machine-m06 #m06PillarDiffuserL,
body.machine-m06 #m06PillarDiffuserR,
body.machine-m06 #m06StageStrobeWash,
body.machine-m06 .m06-marquee-bulb {
  display: none !important;
}

#m06RealLampsCanvas,
#m06RealLampsGlowCanvas,
#m06MidBeamGaugeCanvas {
  display: none;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
  mix-blend-mode: overlay;
}
#m06RealLampsGlowCanvas {
  z-index: 6;
  mix-blend-mode: screen;
}
#m06MidBeamGaugeCanvas {
  z-index: 7;
  mix-blend-mode: normal;
}
body.machine-m06:not(.in-hall) #m06RealLampsCanvas,
body.machine-m06:not(.in-hall) #m06RealLampsGlowCanvas,
body.machine-m06:not(.in-hall) #m06MidBeamGaugeCanvas {
  display: block;
}

body.machine-m06 #m06BackglassHalo {
  display: none !important;
  box-shadow: none !important;
  opacity: 0 !important;
}

/* =========================================================================
 * R24 ZERO OCCLUSION HUD + 收折式左下角「🎬 上屏小动画试看圆形微钮」
 * ========================================================================= */
#m06AnimePreviewDock {
  display: none;
  position: fixed;
  bottom: max(8px, env(safe-area-inset-bottom, 8px));
  left: max(8px, env(safe-area-inset-left, 8px));
  top: auto !important;
  right: auto !important;
  z-index: 30;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 6px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
  pointer-events: auto;
}
body.m06-pv-dock.machine-m06:not(.in-hall) #m06AnimePreviewDock {
  display: flex;
}
#m06AnimePreviewDock .m06-pv-toggle {
  appearance: none;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #fef08a;
  background: radial-gradient(circle at 35% 30%, rgba(45, 58, 92, 0.96), rgba(9, 15, 34, 0.96));
  border: 1.5px solid rgba(251, 191, 36, 0.72);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition: transform 0.12s ease, filter 0.12s ease;
}
#m06AnimePreviewDock .m06-pv-toggle:hover { filter: brightness(1.18); transform: scale(1.06); }
#m06AnimePreviewDock .m06-pv-toggle:active { transform: scale(0.94); }

#m06AnimePreviewDock .m06-pv-grid {
  display: none;
  flex-direction: column;
  gap: 6px;
  padding: 6px;
  border-radius: 16px;
  background: rgba(9, 15, 34, 0.88);
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
}
#m06AnimePreviewDock.expanded .m06-pv-grid {
  display: flex;
}
#m06AnimePreviewDock .m06-pv-btn {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  line-height: 1;
  color: #fffbeb;
  border: 1.5px solid rgba(251, 191, 36, 0.65);
  background: linear-gradient(180deg, rgba(30, 41, 59, 0.94), rgba(15, 23, 42, 0.98));
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.12s ease;
}
#m06AnimePreviewDock .m06-pv-btn:hover { filter: brightness(1.2); transform: scale(1.08); }
#m06AnimePreviewDock .m06-pv-btn:active { transform: scale(0.92); }
#m06AnimePreviewDock .m06-pv-btn[data-preview="lose"] { border-color: rgba(168, 85, 247, 0.82); color: #e9d5ff; }
#m06AnimePreviewDock .m06-pv-btn[data-preview="lv2"] { border-color: rgba(16, 185, 129, 0.82); color: #a7f3d0; }
#m06AnimePreviewDock .m06-pv-btn[data-preview="lv3"] { border-color: rgba(239, 68, 68, 0.88); color: #fecaca; background: linear-gradient(180deg, rgba(127, 29, 29, 0.92), rgba(69, 10, 10, 0.96)); }
#m06AnimePreviewDock .m06-pv-btn[data-preview="lv4"] { border-color: rgba(244, 114, 182, 0.92); color: #fef08a; background: linear-gradient(135deg, rgba(126, 34, 206, 0.9), rgba(217, 119, 6, 0.9)); }

/* =========================================================================
 * R24 零遮挡布局：#btns 与 #ticketBar 完全移出 #roomTopLcdSlot 与机台框体外
 * ========================================================================= */
@media (min-width: 720px) {
  body.machine-m06:not(.in-hall) #btns {
    top: 18px !important;
    bottom: auto !important;
    left: auto !important;
    right: max(8px, calc(50vw - min(50vw, calc((100dvh - 44px) * 797 / 2048)) - 48px)) !important;
    flex-direction: column !important;
    gap: 8px !important;
  }
  body.machine-m06:not(.in-hall) #btns .ib {
    width: 34px !important;
    height: 34px !important;
  }
}

@media (max-width: 719px) {
  body.machine-m06:not(.in-hall) #btns {
    top: auto !important;
    left: auto !important;
    bottom: max(8px, env(safe-area-inset-bottom, 8px)) !important;
    right: max(8px, env(safe-area-inset-right, 8px)) !important;
    flex-direction: row !important;
    gap: 6px !important;
  }
  body.machine-m06:not(.in-hall) #btns .ib {
    width: 30px !important;
    height: 30px !important;
    font-size: 14px !important;
  }
}

@media (min-width: 1020px) {
  body.machine-m06:not(.in-hall) #ticketBar {
    top: 18px !important;
    bottom: auto !important;
    right: auto !important;
    left: max(8px, calc(50vw - min(50vw, calc((100dvh - 44px) * 797 / 2048)) - 150px)) !important;
  }
}

@media (max-width: 1019px) {
  body.machine-m06:not(.in-hall) #ticketBar {
    top: auto !important;
    right: auto !important;
    bottom: max(9px, env(safe-area-inset-bottom, 9px)) !important;
    left: 48px !important;
  }
}

/* =========================================================================
 * R31 Gate 0 极限样片试播悬浮条 (仅 ?gate0_demo=1 显示，常态完全隐藏)
 * ========================================================================= */
#m06Gate0DemoBar {
  display: none;
  position: fixed;
  left: 50%;
  bottom: max(54px, calc(env(safe-area-inset-bottom, 8px) + 46px));
  transform: translateX(-50%);
  z-index: 120;
  pointer-events: auto !important;
  touch-action: manipulation;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  width: min(94vw, 440px);
  padding: 8px 10px;
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(12, 18, 36, 0.94) 0%, rgba(7, 10, 22, 0.96) 100%);
  border: 1.5px solid #f59e0b;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.82), 0 0 18px rgba(239, 68, 68, 0.35);
}
body.gate0-demo-mode.machine-m06:not(.in-hall) #m06Gate0DemoBar {
  display: flex;
}
#btnGate0DemoPlay {
  width: 100%;
  padding: 10px 12px;
  border-radius: 999px;
  border: 2px solid #fef08a;
  background: linear-gradient(180deg, #ef4444 0%, #b91c1c 55%, #7f1d1d 100%);
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
  box-shadow: 0 4px 14px rgba(239, 68, 68, 0.45), inset 0 1px 1px rgba(255, 255, 255, 0.55);
  cursor: pointer;
  pointer-events: auto !important;
  touch-action: manipulation;
  position: relative;
  z-index: 120;
}
#btnGate0DemoPlay:active {
  transform: scale(0.98);
}
#gate0DiagPill {
  font-size: 10px;
  font-weight: 800;
  color: #fde047;
  letter-spacing: 0.03em;
  text-align: center;
  opacity: 0.95;
}


