/* 手机专用试玩页样式（仅 8792 /m 使用）：隐藏编辑器，把试玩层全屏化，舞台 320x568(=9:16) 等比缩放居中 */
html, body { margin:0; padding:0; height:100%; width:100%; overflow:hidden; background:#000; overscroll-behavior:none;
  -webkit-text-size-adjust:100%; -webkit-tap-highlight-color:transparent; }
body { position:fixed; inset:0; height:100dvh; user-select:none; -webkit-user-select:none; -webkit-touch-callout:none; touch-action:none; }
#app { display:none !important; }                      /* 编辑器/画布/检查器全部隐藏(DOM 仍在，供运行时复用) */
#modal-shortcuts, .modal:not(#modal-playtest) { display:none !important; }
#modal-playtest { position:fixed !important; inset:0; padding:0 !important; background:#000 !important; z-index:50; display:block !important; }
#modal-playtest.hidden { display:none !important; }
#modal-playtest .playtest-shell { position:absolute; inset:0; width:100%; height:100%; max-height:none; border:0; border-radius:0; background:#000; box-shadow:none; display:block; overflow:hidden; }
#modal-playtest .playtest-bar { display:none !important; }   /* #pt-status 等节点仍在 DOM，仅隐藏 */
#modal-playtest .playtest-body { position:absolute; inset:0; padding:0; overflow:hidden; display:block; }
#modal-playtest .pt-log-wrap { display:none !important; }
#modal-playtest .pt-phone {
  position:absolute; left:50%; top:50%; width:320px; height:568px; margin:0; flex:none;
  border:0; border-radius:0; background:#000; overflow:hidden;
  transform:translate(-50%,-50%) scale(var(--s,1)); transform-origin:center center;
  touch-action:none; -webkit-user-select:none; user-select:none;
}
.pt-phone *, .pt-phone { touch-action:none; -webkit-touch-callout:none; -webkit-user-select:none; user-select:none; }
.pt-phone button { touch-action:manipulation; }
video { -webkit-touch-callout:none; }
/* 隐藏缩放后容易露出的编辑器 toast */
#status-toast { display:none !important; }

/* 首屏 / 结束屏 */
#m-start { position:fixed; inset:0; z-index:200; display:flex; flex-direction:column; align-items:center; justify-content:center;
  background:radial-gradient(ellipse at 50% 30%, #2a1e14 0%, #0c0a08 70%); color:#f2e8d8; text-align:center;
  padding:env(safe-area-inset-top) 24px env(safe-area-inset-bottom); font-family:"PingFang SC","Noto Sans SC",system-ui,sans-serif; }
#m-start.hidden { display:none !important; }
#m-start h1 { margin:0 0 6px; font-size:26px; letter-spacing:.08em; }
#m-start p { margin:0 0 34px; font-size:13px; opacity:.7; }
#m-go { width:72vw; max-width:300px; padding:20px 0; font-size:22px; font-weight:700; letter-spacing:.2em; color:#1a140c; border:0; border-radius:999px;
  background:linear-gradient(180deg,#f0d48a,#b8873a); box-shadow:0 8px 30px rgba(0,0,0,.5), 0 0 0 4px rgba(240,212,138,.18); touch-action:manipulation; }
#m-go:disabled { opacity:.45; }
#m-go:active:not(:disabled) { transform:scale(.97); }
#m-hint { margin-top:22px; font-size:12px; opacity:.55; line-height:1.6; }
#m-ver { position:absolute; bottom:calc(10px + env(safe-area-inset-bottom)); font-size:10px; opacity:.4; }

/* 加载转圈 */
#m-spin { position:fixed; left:50%; top:50%; width:44px; height:44px; margin:-22px 0 0 -22px; z-index:120; pointer-events:none; opacity:0; transition:opacity .2s;
  border:4px solid rgba(255,255,255,.18); border-top-color:#f0d48a; border-radius:50%; animation:m-rot .9s linear infinite; }
#m-spin.on { opacity:1; }
@keyframes m-rot { to { transform:rotate(360deg); } }

/* 浮动小控件：右上角，可折叠，不遮挡玩法 */
#m-fab { position:fixed; z-index:150; top:calc(6px + env(safe-area-inset-top)); right:calc(6px + env(safe-area-inset-right)); display:flex; gap:6px; align-items:center; }
#m-fab button { min-width:30px; height:30px; padding:0 10px; font-size:12px; color:#f2e8d8; border:1px solid rgba(242,232,216,.3);
  border-radius:15px; background:rgba(0,0,0,.45); opacity:.4; touch-action:manipulation; }
#m-fab button:active { opacity:.9; }
#m-fab .m-menu { display:flex; gap:6px; }
#m-fab #m-fold { min-width:26px; height:26px; padding:0 6px; opacity:.28; }
#m-fab.collapsed .m-menu { display:none; }
#m-fab.hidden { display:none; }

/* 横屏提示旋转（手机高度过小时才遮挡；宽屏电脑只留黑边） */
#m-rotate { display:none; position:fixed; inset:0; z-index:300; background:#000; color:#f2e8d8; align-items:center; justify-content:center; flex-direction:column; font-size:16px; letter-spacing:.1em; }
#m-rotate i { font-size:44px; font-style:normal; display:block; margin-bottom:14px; animation:m-tilt 1.6s ease-in-out infinite; }
@keyframes m-tilt { 0%,100% { transform:rotate(90deg); } 50% { transform:rotate(0deg); } }
@media (orientation:landscape) and (max-height:520px) { #m-rotate { display:flex; } }

/* pt-overlay 标题/副标题在手机上不占玩法区，只保留底部按钮 */
#modal-playtest .pt-title, #modal-playtest .pt-sub { display:none; }
#modal-playtest .pt-actions .btn { min-height:40px; font-size:13px; }

/* ===== perf1：手机渲染减负 ===== */
/* 1) 去掉 backdrop-filter / 静态 blur 滤镜（手机 GPU 每帧重采样，开销大；视觉差异极小） */
.pt-phone *, .pt-phone *::before, .pt-phone *::after { -webkit-backdrop-filter: none !important; backdrop-filter: none !important; }
.pt-phone .fx-heart, .pt-phone .fx-heart--rail, .pt-phone .fx-heart--rail[class*="soft-"] { filter: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
/* 2) 动画只用 transform/opacity，并提升为合成层 */
.st-vig-in { will-change: opacity; }
.st-root, .st-root.st-shake { will-change: transform; }
.st-btn:not(:disabled) { animation-name: st-btn-pulse-m !important; will-change: transform; }
@keyframes st-btn-pulse-m { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.07); } }
.pt-phone .comfort-hud.is-danger { animation-name: comfort-danger-blink-m !important; }
@keyframes comfort-danger-blink-m { 0%, 100% { opacity: 1; } 50% { opacity: .55; } }
.pt-phone .fx-heart, .pt-phone .fx-minus { will-change: transform, opacity; }
.pt-phone .st-tip, .pt-phone .st-tl, .pt-phone .hush-fade { will-change: opacity; }
/* 3) 视频层独立合成，减少与 HUD 叠加时的整层重绘 */
.pt-phone video { transform: translateZ(0); backface-visibility: hidden; }
.pt-phone .pleasure-fill { will-change: transform; }
/* 4) 舞台缩放层：固定 3D 层，避免每帧重新光栅化 */
#modal-playtest .pt-phone { will-change: transform; contain: layout paint style; }
/* 5) 页面隐藏时暂停装饰动画 */
@media (prefers-reduced-motion: reduce) { .pt-phone * { animation-duration: .001s !important; } }

/* ===== perf2：开始页加载进度条 ===== */
#m-load { display:none; width:72vw; max-width:300px; margin-top:18px; }
#m-lbar { height:6px; border-radius:3px; background:rgba(242,232,216,.16); overflow:hidden; }
#m-lfill { height:100%; width:100%; background:linear-gradient(90deg,#f0d48a,#b8873a); transform-origin:left center; transform:scaleX(0); will-change:transform; }
#m-ltxt { margin-top:8px; font-size:12px; opacity:.7; letter-spacing:.04em; }
#m-skip { display:none; margin-top:14px; padding:6px 14px; font-size:12px; color:#f2e8d8; opacity:.5; background:none; border:1px solid rgba(242,232,216,.25); border-radius:14px; touch-action:manipulation; }

/* ===== perf2：日志面板 ===== */
#m-logpanel { display:none; position:fixed; inset:0; z-index:400; background:rgba(8,6,4,.96); color:#d8cfbf; flex-direction:column; padding:calc(8px + env(safe-area-inset-top)) 8px calc(8px + env(safe-area-inset-bottom)); font-family:system-ui,sans-serif; touch-action:auto; }
#m-logpanel.on { display:flex; }
#m-logpanel * { touch-action:auto; user-select:text; -webkit-user-select:text; }
#m-logpanel .m-lbar2 { display:flex; align-items:center; gap:8px; font-size:13px; }
#m-logpanel .m-lbar2 span { flex:1; font-size:11px; opacity:.7; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
#m-logview { flex:1; margin:6px 0; overflow:auto; -webkit-overflow-scrolling:touch; font:10px/1.35 ui-monospace,Menlo,monospace; white-space:pre-wrap; word-break:break-all; background:#000; padding:6px; border-radius:6px; }
#m-logpanel button { padding:8px 10px; font-size:12px; color:#f2e8d8; background:rgba(242,232,216,.12); border:1px solid rgba(242,232,216,.3); border-radius:8px; }
#m-logpanel .m-lbtns { display:flex; flex-wrap:wrap; gap:6px; }
#m-fab #m-logbtn { opacity:.4; }

/* ===== perf3：下屏/上屏视频不再 display:none 切换(iOS 上会销毁/重建合成层与解码面)，改 visibility；特效延后/轻量 ===== */
.p3 .st-vid.hidden { display:block !important; visibility:hidden; }
.p3 .dq-pool-hint { display:none; }
.p3 .m-pool { position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0; }
/* 按键瞬间的特效：只用 transform/opacity，去掉 filter:brightness(按下时整圈重绘) 与 ::after 大径向渐变缩放 */
.p3 .st-btn:active:not(:disabled) { filter:none !important; }
.p3 .st-btn.flash::after { animation-duration:.25s; }
/* 被发现红闪：径向渐变层只做 opacity(已是)；震动改为只在 .split-waist 内 transform，且不含视频重排 */
.p3 .fx-catch-shake { animation-duration:.3s; }


/* station42: hide debug skip on mobile HUD (JS also strips pt-actions) */
#stSkip, .st-skip { display: none !important; }
