/* PhotoBaby 展示页 · 交互演示舞台 */

/* ========== 功能切换导航 ========== */
.pbx-tabs {
  display: flex; justify-content: center; flex-wrap: wrap; gap: 6px;
  width: fit-content; margin: 0 auto 26px; padding: 6px;
  border-radius: 999px; background: rgba(19, 15, 28, 0.78); border: 1px solid var(--line);
  backdrop-filter: blur(14px);
}
.pbx-tab {
  position: relative; display: inline-flex; align-items: center; gap: 8px;
  height: 40px; padding: 0 18px; border-radius: 999px;
  font-size: 14px; color: var(--dim); white-space: nowrap; overflow: hidden;
  transition: color 0.3s, background 0.3s;
}
.pbx-tab svg { width: 16px; height: 16px; }
.pbx-tab:hover { color: var(--ink); }
.pbx-tab.is-on { color: #fff; background: rgba(139, 92, 246, 0.28); box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.4); }
/* 自动轮播进度：每个演示循环时这条线跑满 */
.pbx-tab .bar { position: absolute; left: 14px; right: 14px; bottom: 5px; height: 2px; border-radius: 2px; background: rgba(255, 255, 255, 0.08); opacity: 0; }
.pbx-tab.is-on .bar { opacity: 1; }
.pbx-tab .bar i { display: block; height: 100%; width: 0; border-radius: 2px; background: linear-gradient(90deg, var(--violet), var(--gold)); }

/* ========== 演示主舞台：左侧说明 + 右侧模拟软件窗口 ========== */
.pbx-stage {
  display: grid; grid-template-columns: minmax(0, 0.78fr) minmax(0, 1.62fr); gap: 34px; align-items: stretch;
}
.pbx-stage > * { min-width: 0; }
.pbx-copy { display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.pbx-copy-panel { display: none; }
.pbx-copy-panel.is-on { display: block; animation: pbxCopyIn 0.7s var(--ease); }
@keyframes pbxCopyIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
.pbx-copy-panel .kicker-num { font-family: var(--mono); font-size: 12px; color: var(--violet-3); letter-spacing: 0.1em; }
.pbx-copy-panel h3 {
  margin-top: 10px; font-family: var(--serif); font-size: clamp(24px, 2.4vw, 32px);
  font-weight: 600; line-height: 1.35; letter-spacing: 0.02em; text-wrap: balance;
}
.pbx-copy-panel > p { margin-top: 14px; color: var(--dim); font-size: 15px; line-height: 1.85; }
.pbx-points { list-style: none; margin-top: 22px; display: flex; flex-direction: column; gap: 12px; }
.pbx-points li { display: flex; gap: 10px; font-size: 14px; color: var(--ink); line-height: 1.6; }
.pbx-points li svg { width: 17px; height: 17px; color: var(--violet); flex-shrink: 0; margin-top: 3px; }
.pbx-try {
  margin-top: 24px; padding: 14px 16px; border-radius: 12px;
  background: rgba(139, 92, 246, 0.1); border: 1px dashed rgba(192, 132, 252, 0.4);
  font-size: 13.5px; color: var(--violet-3); line-height: 1.7;
}
.pbx-try b { color: #fff; font-weight: 600; }
.kbd {
  display: inline-grid; place-items: center; min-width: 22px; height: 21px; padding: 0 6px; margin: 0 2px;
  border-radius: 5px; font-family: var(--mono); font-size: 11.5px; color: var(--ink);
  background: linear-gradient(180deg, #2a2236, #1a1524); border: 1px solid rgba(196, 150, 255, 0.28);
  box-shadow: 0 1px 0 rgba(0, 0, 0, 0.6); vertical-align: 1px;
}

/* ========== 模拟软件窗口 ========== */
.pbx-app {
  position: relative; border-radius: 16px; overflow: hidden;
  background: #121016; border: 1px solid rgba(255, 255, 255, 0.09);
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(0, 0, 0, 0.4), 0 0 90px rgba(124, 58, 237, 0.14);
  aspect-ratio: 16 / 10.4; display: flex; flex-direction: column; user-select: none;
}
.pbx-app-bar {
  height: 38px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 14px;
  background: #19161f; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.pbx-lights { display: flex; gap: 7px; }
.pbx-lights i { width: 11px; height: 11px; border-radius: 50%; }
.pbx-lights i:nth-child(1) { background: #ff5f57; }
.pbx-lights i:nth-child(2) { background: #febc2e; }
.pbx-lights i:nth-child(3) { background: #28c840; }
.pbx-app-title { font-size: 12px; color: #8f879c; flex: 1; text-align: center; margin-right: 52px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pbx-app-modes { display: flex; gap: 2px; padding: 2px; border-radius: 7px; background: #0f0d13; }
.pbx-app-modes span { font-size: 11px; padding: 3px 10px; border-radius: 5px; color: #7d7589; }
.pbx-app-modes span.is-on { background: #2b2436; color: #ece6f5; }

.pbx-app-body { position: relative; flex: 1; min-height: 0; }
.pbx-scene { position: absolute; inset: 0; display: none; }
.pbx-scene.is-on { display: flex; animation: pbxSceneIn 0.55s var(--ease); }
@keyframes pbxSceneIn { from { opacity: 0; transform: scale(0.985); } to { opacity: 1; transform: none; } }

/* 软件画布区通用：棋盘格底 */
.pbx-canvas-wrap {
  position: relative; flex: 1; min-width: 0; display: grid; place-items: center; overflow: hidden;
  background: #0b0a0e radial-gradient(circle at 50% 50%, #17141d 0%, #0b0a0e 70%);
}
.pbx-sidepanel { width: 30%; max-width: 290px; flex-shrink: 0; background: #17141c; border-left: 1px solid rgba(255, 255, 255, 0.06); padding: 12px; overflow: hidden; display: flex; flex-direction: column; gap: 10px; }
.pbx-panel-title { font-size: 11px; color: #9a92a6; letter-spacing: 0.08em; display: flex; justify-content: space-between; align-items: center; }
.pbx-panel-title b { color: #ece6f5; font-weight: 600; letter-spacing: 0; }

/* 模拟鼠标指针 */
.pbx-cursor {
  position: absolute; left: 0; top: 0; z-index: 30; width: 22px; height: 22px; pointer-events: none;
  transition: transform 0.9s var(--ease), opacity 0.3s; opacity: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.6));
}
.pbx-cursor.is-on { opacity: 1; }
.pbx-cursor.is-press svg { transform: scale(0.82); }
.pbx-cursor svg { width: 22px; height: 22px; transition: transform 0.15s; }
.pbx-ripple {
  position: absolute; z-index: 29; width: 34px; height: 34px; margin: -17px 0 0 -17px; border-radius: 50%;
  border: 2px solid rgba(233, 184, 255, 0.9); pointer-events: none; animation: pbxRipple 0.6s ease-out forwards;
}
@keyframes pbxRipple { from { transform: scale(0.3); opacity: 1; } to { transform: scale(1.5); opacity: 0; } }

/* ========== ① 原生 PS 体验 ========== */
.ps-shell { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ps-optbar {
  height: 30px; flex-shrink: 0; display: flex; align-items: center; gap: 14px; padding: 0 12px;
  background: #1a1720; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px; color: #9a92a6; white-space: nowrap; overflow: hidden;
}
.ps-optbar b { color: #ece6f5; font-weight: 500; }
.ps-optbar .pill { padding: 1px 7px; border-radius: 4px; background: #262131; color: #d6cee2; font-family: var(--mono); font-size: 10.5px; }
.ps-main { flex: 1; display: flex; min-height: 0; }
.ps-tools {
  width: 62px; flex-shrink: 0; background: #17141c; border-right: 1px solid rgba(255, 255, 255, 0.06);
  display: flex; flex-direction: column; align-items: center; justify-content: space-between; padding: 8px 4px;
}
.ps-tools-grid { display: grid; grid-template-columns: repeat(2, 26px); gap: 3px; }
.ps-tool { width: 26px; height: 26px; border-radius: 5px; display: grid; place-items: center; color: #9a92a6; transition: background 0.18s, color 0.18s; position: relative; }
.ps-tool svg { width: 15px; height: 15px; }
.ps-tool:hover { background: #24202c; color: #ece6f5; }
.ps-tool.is-on { background: #3a2f4d; color: #fff; box-shadow: inset 0 0 0 1px rgba(192, 132, 252, 0.5); }
.ps-tool .tip {
  position: absolute; left: 34px; top: 50%; transform: translateY(-50%); white-space: nowrap; z-index: 20;
  font-size: 11px; padding: 3px 8px; border-radius: 5px; background: #000; color: #fff; opacity: 0; pointer-events: none; transition: opacity 0.16s;
}
.ps-tool:hover .tip { opacity: 1; }
.ps-swatches { position: relative; width: 34px; height: 32px; margin-top: 6px; padding-top: 6px; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.ps-swatches i { position: absolute; width: 16px; height: 16px; border-radius: 3px; border: 1.5px solid rgba(255, 255, 255, 0.45); }
.ps-swatches i:nth-child(1) { left: 2px; top: 8px; background: #f5f1fa; z-index: 2; }
.ps-swatches i:nth-child(2) { right: 2px; bottom: 0; background: #1e1829; z-index: 1; }
.ps-photo { position: relative; height: 92%; aspect-ratio: 1466 / 2200; border-radius: 3px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7); }
.ps-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.ps-photo .after { transition: opacity 0.5s; }
.ps-ants {
  position: absolute; border: 1.5px dashed rgba(255, 255, 255, 0.95); border-radius: 50%;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.5); opacity: 0; transition: opacity 0.3s; animation: pbxAnts 0.8s linear infinite;
}
@keyframes pbxAnts { to { border-color: rgba(192, 132, 252, 0.95); } }
.ps-layers { display: flex; flex-direction: column; gap: 5px; }
.ps-layer {
  display: flex; align-items: center; gap: 8px; padding: 6px; border-radius: 7px; font-size: 11.5px; color: #c9c1d6;
  background: #1d1924; border: 1px solid transparent; transition: background 0.25s, border-color 0.25s, transform 0.4s var(--ease), opacity 0.4s;
}
.ps-layer.is-on { background: #2b2338; border-color: rgba(192, 132, 252, 0.45); color: #fff; }
.ps-layer.is-new { animation: pbxLayerIn 0.6s var(--ease); }
@keyframes pbxLayerIn { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
.ps-layer .eye { width: 14px; height: 14px; color: #9a92a6; flex-shrink: 0; cursor: pointer; }
.ps-layer .eye.is-off { opacity: 0.25; }
.ps-layer .th { width: 26px; height: 26px; border-radius: 4px; background-size: cover; background-position: center 20%; flex-shrink: 0; border: 1px solid rgba(255, 255, 255, 0.1); }
.ps-layer .th.is-adj { background: linear-gradient(135deg, #2b2338, #4c3a6a); display: grid; place-items: center; color: #e9b8ff; }
.ps-layer .th.is-adj svg { width: 14px; height: 14px; }
.ps-layer .nm { flex: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ps-layer .mask { width: 18px; height: 22px; border-radius: 3px; background: radial-gradient(ellipse at 50% 40%, #fff 30%, #000 75%); flex-shrink: 0; border: 1px solid rgba(255, 255, 255, 0.15); }
.ps-curve-box { position: relative; aspect-ratio: 1; border-radius: 8px; background: #0f0d13; border: 1px solid rgba(255, 255, 255, 0.07); overflow: hidden; touch-action: none; }
.ps-curve-box svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.ps-curve-pt {
  position: absolute; width: 14px; height: 14px; margin: -7px 0 0 -7px; border-radius: 50%;
  background: #fff; border: 2px solid #8b5cf6; cursor: grab; box-shadow: 0 0 10px rgba(139, 92, 246, 0.7); touch-action: none;
}
.ps-curve-pt:active { cursor: grabbing; }
.ps-blend { display: flex; justify-content: space-between; gap: 6px; font-size: 11px; color: #9a92a6; }
.ps-blend span { padding: 4px 8px; border-radius: 5px; background: #1d1924; flex: 1; text-align: center; }

/* ========== ② 人像美颜 ========== */
.bt-photo { position: relative; height: 95%; aspect-ratio: 960 / 1450; border-radius: 3px; overflow: hidden; box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7); }
.bt-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.bt-after-stack { position: absolute; inset: 0; clip-path: inset(0 0 0 50%); }
.bt-after-stack img { opacity: 0; }
.bt-split { position: absolute; top: 0; bottom: 0; left: 50%; width: 2px; margin-left: -1px; background: #fff; box-shadow: 0 0 10px rgba(0, 0, 0, 0.6); cursor: ew-resize; z-index: 4; }
.bt-split i { position: absolute; top: 50%; left: 50%; width: 30px; height: 30px; margin: -15px 0 0 -15px; border-radius: 50%; background: rgba(18, 16, 22, 0.9); border: 1.5px solid #fff; display: grid; place-items: center; }
.bt-split i svg { width: 14px; height: 14px; color: #fff; }
.bt-label { position: absolute; top: 10px; z-index: 3; font-size: 11px; padding: 2px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.6); color: #fff; }
/* 人脸识别扫描框 */
.bt-face {
  position: absolute; z-index: 3; border: 1.5px solid rgba(233, 184, 255, 0.95); border-radius: 6px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.3), 0 0 20px rgba(192, 132, 252, 0.45); opacity: 0; transition: opacity 0.4s, transform 0.6s var(--ease); transform: scale(1.25);
}
.bt-face.is-on { opacity: 1; transform: scale(1); }
.bt-face::before { content: ""; position: absolute; left: 0; right: 0; height: 2px; top: 0; background: linear-gradient(90deg, transparent, #e9b8ff, transparent); animation: pbxScan 1.4s ease-in-out infinite; }
@keyframes pbxScan { 0%, 100% { top: 0; } 50% { top: calc(100% - 2px); } }
.bt-face span { position: absolute; left: -1px; top: -22px; font-size: 10.5px; padding: 1px 7px; border-radius: 4px 4px 4px 0; background: #8b5cf6; color: #fff; white-space: nowrap; }
.bt-dots i { position: absolute; width: 4px; height: 4px; margin: -2px 0 0 -2px; border-radius: 50%; background: #e9b8ff; box-shadow: 0 0 6px #c084fc; opacity: 0; transition: opacity 0.3s; }
.bt-dots.is-on i { opacity: 1; }
.bt-group { display: flex; flex-direction: column; gap: 9px; padding: 10px; border-radius: 9px; background: #1d1924; }
.bt-group-h { font-size: 11.5px; color: #ece6f5; font-weight: 600; display: flex; justify-content: space-between; }
.bt-group-h small { color: #8b5cf6; font-weight: 500; }
.bt-row { display: grid; grid-template-columns: 52px 1fr 26px; align-items: center; gap: 8px; font-size: 11px; color: #b6aec2; }
.bt-row output { text-align: right; font-family: var(--mono); font-size: 10.5px; color: #ece6f5; }
.bt-range { -webkit-appearance: none; appearance: none; width: 100%; height: 16px; background: transparent; cursor: pointer; }
.bt-range::-webkit-slider-runnable-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #a78bfa var(--p, 0%), #3a3245 var(--p, 0%)); }
.bt-range::-moz-range-track { height: 3px; border-radius: 2px; background: linear-gradient(90deg, #a78bfa var(--p, 0%), #3a3245 var(--p, 0%)); }
.bt-range::-webkit-slider-thumb { -webkit-appearance: none; width: 12px; height: 12px; margin-top: -4.5px; border-radius: 50%; background: #fff; border: 2px solid #8b5cf6; box-shadow: 0 0 6px rgba(139, 92, 246, 0.8); }
.bt-range::-moz-range-thumb { width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2px solid #8b5cf6; }
.bt-people { display: flex; gap: 6px; }
.bt-people span { width: 34px; height: 34px; border-radius: 50%; background-size: cover; background-position: center 18%; border: 2px solid transparent; opacity: 0.5; }
.bt-people span.is-on { border-color: #a78bfa; opacity: 1; }
.bt-sync { margin-top: auto; font-size: 11px; text-align: center; padding: 8px; border-radius: 7px; background: #2b2338; color: #e9b8ff; }

/* ========== ③ AI 创成式（扩展 / 消除 / 填充） ========== */
.ai-modes { position: absolute; top: 12px; left: 50%; transform: translateX(-50%); z-index: 12; display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: rgba(18, 16, 22, 0.86); border: 1px solid rgba(255, 255, 255, 0.08); backdrop-filter: blur(10px); }
.ai-mode { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px; border-radius: 7px; font-size: 12px; color: #a9a1b6; transition: background 0.25s, color 0.25s; }
.ai-mode svg { width: 14px; height: 14px; }
.ai-mode:hover { color: #fff; }
.ai-mode.is-on { background: #8b5cf6; color: #fff; }
.ai-stage { position: relative; width: 100%; height: 100%; display: grid; place-items: center; overflow: hidden; }
/* 画面：扩展模式下外侧是真实透明棋盘格，绝不提前露出待生成画面 */
.ai-photo {
  position: relative; height: 74%; aspect-ratio: 1536 / 1024; border-radius: 3px; overflow: hidden;
  background-color: #16141c;
  background-image:
    linear-gradient(45deg, #221f2b 25%, transparent 25%),
    linear-gradient(-45deg, #221f2b 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #221f2b 75%),
    linear-gradient(-45deg, transparent 75%, #221f2b 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  box-shadow: 0 12px 44px rgba(0, 0, 0, 0.65);
}
.ai-photo.is-portrait { height: 76%; margin-top: 24px; aspect-ratio: 2 / 3; }
.ai-photo.is-tall { height: 76%; margin-top: 24px; aspect-ratio: 9 / 16; }
.ai-photo .ai-base { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.25s; }
.ai-photo.is-expand .ai-base { opacity: 0; }
.ai-photo .ai-crop { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; clip-path: inset(0 22% 0 22%); }
.ai-photo .ai-crop.is-out { transition: clip-path 1.6s var(--ease); clip-path: inset(0 0 0 0); }
.ai-photo .ai-after { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; z-index: 2; pointer-events: none; transition: opacity 0.9s var(--ease); }
.ai-photo .ai-after.is-show { opacity: 1; }
.ai-cropframe { position: absolute; top: 0; bottom: 0; left: 22%; right: 22%; border: 1.5px solid #fff; transition: left 1.1s var(--ease), right 1.1s var(--ease); z-index: 4; }
.ai-cropframe i { position: absolute; width: 8px; height: 28px; border-radius: 4px; background: #fff; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.55); cursor: ew-resize; }
.ai-cropframe i:nth-child(1) { left: -4px; top: 50%; margin-top: -14px; }
.ai-cropframe i:nth-child(2) { right: -4px; top: 50%; margin-top: -14px; }
.ai-cropframe.is-hide { opacity: 0; pointer-events: none; transition: opacity 0.4s; }
/* 消除/填充的「生成中」流光与粒子 */
.ai-sel {
  position: absolute; z-index: 5; border: 1.5px dashed #fff; border-radius: 4px; opacity: 0; pointer-events: none;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.4); animation: pbxAnts 0.8s linear infinite;
}
.ai-sel.is-lasso { border-radius: 46% 54% 40% 60% / 30% 30% 70% 70%; }
.ai-sel.is-on { opacity: 1; }
.ai-gen { position: absolute; z-index: 6; overflow: hidden; border-radius: 6px; opacity: 0; pointer-events: none; }
.ai-gen.is-on { opacity: 1; }
.ai-gen::before {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(110deg, transparent 20%, rgba(233, 184, 255, 0.55) 45%, rgba(243, 217, 171, 0.45) 55%, transparent 80%);
  background-size: 250% 100%; animation: pbxShimmer 1.1s linear infinite; mix-blend-mode: screen;
}
.ai-gen::after { content: ""; position: absolute; inset: 0; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); background: rgba(139, 92, 246, 0.16); }
@keyframes pbxShimmer { from { background-position: 150% 0; } to { background-position: -100% 0; } }
.ai-spark { position: absolute; z-index: 7; width: 5px; height: 5px; border-radius: 50%; background: #fff; box-shadow: 0 0 8px #e9b8ff, 0 0 16px #c084fc; pointer-events: none; animation: pbxSpark 1s ease-out forwards; }
@keyframes pbxSpark { from { opacity: 1; transform: translate(0, 0) scale(1); } to { opacity: 0; transform: translate(var(--dx), var(--dy)) scale(0.2); } }
/* 悬浮 AI 条（模拟 PhotoBaby 画布上的 AI 条） */
.ai-bar {
  position: absolute; z-index: 13; left: 50%; bottom: 16px; transform: translate(-50%, 12px); opacity: 0;
  display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; border-radius: 12px; width: min(440px, 86%);
  background: rgba(24, 20, 30, 0.94); border: 1px solid rgba(192, 132, 252, 0.3); box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
  transition: opacity 0.4s, transform 0.5s var(--ease);
}
.ai-bar.is-on { opacity: 1; transform: translate(-50%, 0); }
.ai-bar svg { width: 15px; height: 15px; color: #c084fc; flex-shrink: 0; }
.ai-bar .txt { flex: 1; font-size: 12.5px; color: #ece6f5; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-height: 18px; }
.ai-bar .txt.is-ph { color: #7d7589; }
.ai-bar .go { height: 30px; padding: 0 14px; border-radius: 8px; font-size: 12px; background: #8b5cf6; color: #fff; flex-shrink: 0; transition: transform 0.15s, background 0.2s; }
.ai-bar .go.is-press { transform: scale(0.94); background: #a78bfa; }
.ai-toast { position: absolute; z-index: 14; top: 56px; left: 50%; transform: translate(-50%, -6px); opacity: 0; font-size: 12px; padding: 6px 12px; border-radius: 8px; background: rgba(39, 168, 92, 0.94); color: #fff; transition: opacity 0.3s, transform 0.4s var(--ease); white-space: nowrap; }
.ai-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.ai-hint { position: absolute; z-index: 12; right: 12px; bottom: 12px; font-size: 11px; color: #9a92a6; padding: 4px 9px; border-radius: 6px; background: rgba(0, 0, 0, 0.45); pointer-events: none; }

/* ========== ④ 一句话 P 图（真实像素对齐前后图，整图光影与环境同步变化） ========== */
.pp-wrap { flex: 1; display: grid; grid-template-columns: 1fr minmax(0, 0.92fr); gap: 0; min-width: 0; }
.pp-canvas { position: relative; display: grid; place-items: center; background: #0b0a0e; overflow: hidden; padding: 12px; }
.pp-photo { position: relative; height: 92%; aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; box-shadow: 0 12px 42px rgba(0, 0, 0, 0.72); }
.pp-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pp-photo .pp-after { clip-path: inset(0 0 100% 0); z-index: 2; }
.pp-photo .pp-after.is-reveal { transition: clip-path 1.15s var(--ease); clip-path: inset(0 0 0 0); }
.pp-photo .pp-after.is-peek { transition: opacity 0.2s; opacity: 0; }
.pp-photo .scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 0%, rgba(192, 132, 252, 0.0) 40%, rgba(233, 184, 255, 0.5) 50%, rgba(192, 132, 252, 0) 60%, transparent 100%); background-size: 100% 300%; }
.pp-photo .scan.is-on { opacity: 1; animation: pbxSweep 1.3s ease-in-out infinite; }
@keyframes pbxSweep { from { background-position: 0 100%; } to { background-position: 0 0%; } }
.pp-res { position: absolute; z-index: 4; left: 10px; top: 10px; font-size: 10.5px; padding: 2px 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.65); color: #fff; font-family: var(--mono); }
.pp-hold { position: absolute; z-index: 4; right: 10px; bottom: 10px; font-size: 11px; padding: 4px 10px; border-radius: 6px; background: rgba(0, 0, 0, 0.68); border: 1px solid rgba(255, 255, 255, 0.16); color: #ece6f5; }
.pp-hold:hover { background: rgba(28, 21, 38, 0.9); color: #fff; }
.pp-chat { background: #17141c; border-left: 1px solid rgba(255, 255, 255, 0.06); display: flex; flex-direction: column; padding: 12px; gap: 10px; min-width: 0; }
.pp-models { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.pp-model { padding: 8px 10px; border-radius: 9px; background: #1d1924; border: 1px solid transparent; text-align: left; transition: border-color 0.25s, background 0.25s; }
.pp-model b { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #ece6f5; }
.pp-model b i { width: 7px; height: 7px; border-radius: 50%; }
.pp-model small { display: block; margin-top: 2px; font-size: 10.5px; color: #8f879c; }
.pp-model.is-on { background: #2b2338; border-color: rgba(192, 132, 252, 0.5); }
.pp-log { flex: 1; display: flex; flex-direction: column; gap: 8px; overflow: hidden; justify-content: flex-end; }
.pp-msg { max-width: 92%; font-size: 12px; line-height: 1.6; padding: 7px 10px; border-radius: 10px; animation: pbxLayerIn 0.4s var(--ease); }
.pp-msg.me { align-self: flex-end; background: #8b5cf6; color: #fff; border-bottom-right-radius: 3px; }
.pp-msg.ai { align-self: flex-start; background: #24202c; color: #d8d0e4; border-bottom-left-radius: 3px; }
.pp-msg.ai .bar { margin-top: 6px; height: 3px; border-radius: 2px; background: #3a3245; overflow: hidden; }
.pp-msg.ai .bar i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a78bfa, #f3d9ab); transition: width 0.25s linear; }
.pp-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pp-chip { font-size: 11px; padding: 5px 10px; border-radius: 999px; background: #1d1924; color: #c9c1d6; border: 1px solid rgba(255, 255, 255, 0.07); transition: border-color 0.2s, color 0.2s, background 0.2s; }
.pp-chip:hover { border-color: rgba(192, 132, 252, 0.5); color: #fff; }
.pp-chip.is-on { background: #2b2338; border-color: rgba(192, 132, 252, 0.6); color: #fff; }
.pp-input { display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 10px; border-radius: 10px; background: #0f0d13; border: 1px solid rgba(192, 132, 252, 0.25); }
.pp-input .t { flex: 1; font-size: 12px; color: #ece6f5; white-space: nowrap; overflow: hidden; min-height: 18px; }
.pp-input .t::after { content: ""; display: inline-block; width: 1px; height: 13px; margin-left: 1px; background: #c084fc; vertical-align: -2px; animation: pbxBlink 1s steps(1) infinite; }
@keyframes pbxBlink { 50% { opacity: 0; } }
.pp-input button { height: 28px; padding: 0 12px; border-radius: 7px; background: #8b5cf6; color: #fff; font-size: 11.5px; flex-shrink: 0; }

/* ========== ⑤ 一键选片 ========== */
.cl-wrap { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.cl-toolbar { height: 40px; flex-shrink: 0; display: flex; align-items: center; gap: 10px; padding: 0 12px; background: #17141c; border-bottom: 1px solid rgba(255, 255, 255, 0.06); font-size: 11.5px; color: #9a92a6; }
.cl-views { display: flex; gap: 3px; padding: 2px; border-radius: 7px; background: #0f0d13; }
.cl-views button { height: 24px; padding: 0 9px; border-radius: 5px; font-size: 11px; color: #8f879c; transition: background 0.2s, color 0.2s; }
.cl-views button.is-on { background: #2d243b; color: #fff; }
.cl-filter { display: flex; gap: 4px; }
.cl-filter button { height: 26px; padding: 0 10px; border-radius: 6px; font-size: 11.5px; color: #a9a1b6; background: #1d1924; transition: background 0.2s, color 0.2s; }
.cl-filter button.is-on { background: #8b5cf6; color: #fff; }
.cl-count { margin-left: auto; font-family: var(--mono); color: #ece6f5; }
.cl-count b { color: #f3d9ab; font-weight: 600; }
.cl-body { position: relative; flex: 1; min-height: 0; display: flex; }
.cl-grid { position: relative; flex: 1; min-height: 0; padding: 12px; display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); grid-auto-rows: max-content; gap: 8px; align-content: start; background: #0e0c12; overflow: hidden; }
.cl-grid.is-hide { display: none; }
/* 选片 · 双图对比视图 */
.cl-compare { display: none; flex: 1; min-height: 0; padding: 12px; gap: 10px; background: #0b0a0e; grid-template-columns: 1fr 1fr; }
.cl-compare.is-on { display: grid; }
.cl-cmp-item { position: relative; border-radius: 8px; overflow: hidden; border: 2px solid rgba(255, 255, 255, 0.08); background: #121016; cursor: pointer; transition: border-color 0.25s; }
.cl-cmp-item.is-win { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.24); }
.cl-cmp-item img { width: 100%; height: 100%; object-fit: cover; object-position: center 22%; transition: transform 0.6s var(--ease); }
.cl-cmp-item.is-zoom img { transform: scale(1.42); transform-origin: 50% 24%; }
.cl-cmp-tag { position: absolute; left: 8px; top: 8px; font-size: 11px; padding: 2px 8px; border-radius: 5px; background: rgba(0, 0, 0, 0.65); color: #fff; display: flex; gap: 6px; align-items: center; }
.cl-cmp-tag b { color: #f3d9ab; }
.cl-cmp-pick { position: absolute; right: 8px; bottom: 8px; font-size: 11px; padding: 4px 10px; border-radius: 6px; background: rgba(24, 20, 30, 0.85); color: #d6cee2; border: 1px solid rgba(255, 255, 255, 0.14); }
.cl-cmp-item.is-win .cl-cmp-pick { background: #8b5cf6; color: #fff; border-color: #a78bfa; }
/* 选片 · 基础调色与光影 */
.cl-grade { display: none; flex: 1; min-height: 0; }
.cl-grade.is-on { display: flex; }
.cl-grade-view { flex: 1; display: grid; place-items: center; background: #0b0a0e; position: relative; padding: 12px; overflow: hidden; }
.cl-grade-view img { height: 96%; max-width: 100%; object-fit: contain; border-radius: 4px; box-shadow: 0 10px 36px rgba(0, 0, 0, 0.65); transition: filter 0.35s var(--ease); }
.cl-film-grain {
  position: absolute; inset: 12px; pointer-events: none; opacity: 0; transition: opacity 0.4s;
  background-image: radial-gradient(rgba(255, 245, 225, 0.14) 1px, transparent 0);
  background-size: 4px 4px; mix-blend-mode: overlay;
}
.cl-film-grain.is-on { opacity: 0.7; }
.cl-grade-badge { position: absolute; left: 12px; top: 12px; font-size: 11px; padding: 3px 9px; border-radius: 5px; background: rgba(0, 0, 0, 0.65); color: #ece6f5; font-family: var(--mono); z-index: 2; }
.cl-grade-panel { width: 34%; max-width: 286px; flex-shrink: 0; background: #17141c; border-left: 1px solid rgba(255, 255, 255, 0.06); padding: 11px; display: flex; flex-direction: column; gap: 8px; }
.cl-presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.cl-preset {
  display: flex; align-items: center; gap: 6px; padding: 5px 8px; border-radius: 7px;
  background: #1d1924; border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 11px; color: #c9c1d6; text-align: left; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.cl-preset i { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.cl-preset:hover { border-color: rgba(192, 132, 252, 0.4); color: #fff; }
.cl-preset.is-on { background: #2b2338; border-color: rgba(192, 132, 252, 0.6); color: #fff; }
.cl-hist { height: 34px; border-radius: 6px; background: #0f0d13; border: 1px solid rgba(255, 255, 255, 0.06); overflow: hidden; }
.cl-hist svg { width: 100%; height: 100%; display: block; }

/* ========== ⑥ 插件体系（原厂 UXP 插件兼容 + 多面板停靠） ========== */
.pl-wrap { flex: 1; display: flex; min-width: 0; }
.pl-canvas { position: relative; flex: 1; min-width: 0; display: grid; place-items: center; background: #0b0a0e; padding: 12px; overflow: hidden; }
.pl-photo { position: relative; height: 92%; aspect-ratio: 2 / 3; border-radius: 5px; overflow: hidden; box-shadow: 0 12px 42px rgba(0, 0, 0, 0.72); }
.pl-photo.is-tall { aspect-ratio: 9 / 16; }
.pl-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pl-photo .pl-after { clip-path: inset(0 0 100% 0); z-index: 2; }
.pl-photo .pl-after.is-reveal { transition: clip-path 1.1s var(--ease); clip-path: inset(0 0 0 0); }
.pl-photo .pl-after.is-peek { transition: opacity 0.2s; opacity: 0; }
.pl-photo .scan { position: absolute; inset: 0; z-index: 3; pointer-events: none; opacity: 0; background: linear-gradient(180deg, transparent 0%, rgba(192, 132, 252, 0) 40%, rgba(233, 184, 255, 0.5) 50%, rgba(192, 132, 252, 0) 60%, transparent 100%); background-size: 100% 300%; }
.pl-photo .scan.is-on { opacity: 1; animation: pbxSweep 1.25s ease-in-out infinite; }
.pl-panel {
  width: 31%; max-width: 268px; flex-shrink: 0; background: #17141c;
  border-left: 1px solid rgba(255, 255, 255, 0.06); padding: 12px;
  display: flex; flex-direction: column; gap: 10px;
}
.pl-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding-bottom: 8px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.pl-head img { height: 22px; width: auto; object-fit: contain; }
.pl-uxp-tag { font-size: 10px; padding: 2px 7px; border-radius: 999px; background: rgba(74, 222, 128, 0.14); color: #86efac; border: 1px solid rgba(74, 222, 128, 0.35); white-space: nowrap; }
.pl-feats { display: flex; flex-direction: column; gap: 6px; }
.pl-feat {
  padding: 8px 10px; border-radius: 8px; background: #1d1924; border: 1px solid rgba(255, 255, 255, 0.06);
  text-align: left; transition: border-color 0.2s, background 0.2s;
}
.pl-feat b { display: block; font-size: 12px; color: #ece6f5; font-weight: 500; }
.pl-feat small { display: block; font-size: 10.5px; color: #8f879c; margin-top: 2px; }
.pl-feat.is-on { background: #2b2338; border-color: rgba(192, 132, 252, 0.55); }
.pl-apply {
  height: 34px; border-radius: 8px; background: linear-gradient(135deg, #a78bfa, #8b5cf6);
  color: #fff; font-size: 12.5px; font-weight: 500; transition: transform 0.15s, opacity 0.2s;
}
.pl-apply:active, .pl-apply.is-press { transform: scale(0.96); }
.pl-prog { height: 3px; border-radius: 2px; background: #2b2436; overflow: hidden; opacity: 0; transition: opacity 0.2s; }
.pl-prog.is-on { opacity: 1; }
.pl-prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a78bfa, #f3d9ab); }
.pl-compat {
  margin-top: auto; padding: 8px 9px; border-radius: 8px; background: #120f17; border: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 10.5px; color: #9a92a6; line-height: 1.55;
}
.pl-compat b { color: #e9b8ff; font-weight: 500; }
.pl-rail {
  width: 50px; flex-shrink: 0; background: #120f17; border-left: 1px solid rgba(255, 255, 255, 0.06);
  padding: 10px 6px; display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.pl-rail-btn {
  width: 38px; height: 38px; border-radius: 9px; background: #1d1924; border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px;
  font-size: 10px; color: #a9a1b6; transition: border-color 0.2s, background 0.2s, color 0.2s;
}
.pl-rail-btn span { font-weight: 600; font-size: 11px; }
.pl-rail-btn:hover { color: #fff; border-color: rgba(192, 132, 252, 0.45); }
.pl-rail-btn.is-on { background: #342748; color: #fff; border-color: rgba(192, 132, 252, 0.7); box-shadow: 0 0 14px rgba(139, 92, 246, 0.35); }
.pl-rail-import { margin-top: auto; font-size: 15px; color: #8f879c; }
.pl-toast { position: absolute; z-index: 14; top: 14px; left: 50%; transform: translate(-50%, -6px); opacity: 0; font-size: 11.5px; padding: 5px 12px; border-radius: 8px; background: rgba(39, 168, 92, 0.94); color: #fff; transition: opacity 0.3s, transform 0.35s var(--ease); white-space: nowrap; pointer-events: none; }
.pl-toast.is-on { opacity: 1; transform: translate(-50%, 0); }
.cl-card { position: relative; border-radius: 6px; overflow: hidden; aspect-ratio: 3 / 4; background: #1d1924; cursor: pointer; border: 2px solid transparent; transition: border-color 0.2s, opacity 0.35s, transform 0.35s var(--ease); }
.cl-card img { width: 100%; height: 100%; object-fit: cover; }
.cl-card.is-sel { border-color: #a78bfa; box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.3); }
.cl-card.is-reject { opacity: 0.22; }
.cl-card.is-hidden { display: none; }
.cl-card.is-drop { animation: pbxDrop 0.55s var(--ease) backwards; }
@keyframes pbxDrop { from { opacity: 0; transform: translateY(-24px) scale(0.86); } to { opacity: 1; transform: none; } }
.cl-stars { position: absolute; left: 4px; right: 4px; bottom: 4px; display: flex; gap: 1px; padding: 2px 4px; border-radius: 4px; background: rgba(0, 0, 0, 0.62); width: fit-content; }
.cl-stars svg { width: 9px; height: 9px; color: #4a4255; }
.cl-stars svg.is-lit { color: #f3d9ab; }
.cl-stars:empty { display: none; }
.cl-pop { position: absolute; inset: 0; display: grid; place-items: center; pointer-events: none; }
.cl-pop span { font-size: 18px; color: #f3d9ab; text-shadow: 0 0 12px rgba(243, 217, 171, 0.9); animation: pbxPop 0.7s var(--ease) forwards; }
@keyframes pbxPop { from { opacity: 1; transform: scale(0.6); } 60% { opacity: 1; transform: scale(1.25); } to { opacity: 0; transform: scale(1.1) translateY(-10px); } }
.cl-badge-x { position: absolute; right: 4px; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: #e54b6b; color: #fff; display: grid; place-items: center; font-size: 10px; }
/* 导入：文件夹拖入动画 */
.cl-import { position: absolute; inset: 0; z-index: 10; display: grid; place-items: center; background: rgba(11, 10, 14, 0.86); transition: opacity 0.4s; }
.cl-import.is-gone { opacity: 0; pointer-events: none; }
.cl-drop { width: min(340px, 70%); padding: 26px 20px; border-radius: 14px; text-align: center; border: 1.5px dashed rgba(192, 132, 252, 0.5); background: rgba(139, 92, 246, 0.06); transition: border-color 0.3s, background 0.3s; }
.cl-drop.is-hot { border-color: #e9b8ff; background: rgba(139, 92, 246, 0.16); }
.cl-drop svg { width: 34px; height: 34px; color: #c084fc; }
.cl-drop b { display: block; margin-top: 8px; font-size: 13px; color: #ece6f5; }
.cl-drop small { display: block; margin-top: 4px; font-size: 11px; color: #8f879c; }
.cl-drop .prog { margin-top: 12px; height: 3px; border-radius: 2px; background: #2b2436; overflow: hidden; }
.cl-drop .prog i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #a78bfa, #f3d9ab); }
.cl-folder { position: absolute; z-index: 11; width: 70px; height: 56px; pointer-events: none; opacity: 0; transition: transform 1.1s var(--ease), opacity 0.3s; }
.cl-folder svg { width: 100%; height: 100%; }
.cl-folder span { position: absolute; left: 50%; top: 100%; transform: translateX(-50%); font-size: 10px; white-space: nowrap; color: #ece6f5; background: rgba(0, 0, 0, 0.6); padding: 1px 6px; border-radius: 4px; margin-top: 3px; }
.cl-keyhint { position: absolute; z-index: 9; right: 12px; bottom: 12px; display: flex; gap: 4px; align-items: center; font-size: 11px; color: #9a92a6; padding: 5px 9px; border-radius: 8px; background: rgba(18, 16, 22, 0.88); border: 1px solid rgba(255, 255, 255, 0.07); }
.cl-key-flash { position: absolute; z-index: 15; left: 50%; top: 46%; transform: translate(-50%, -50%); padding: 10px 18px; border-radius: 12px; font-family: var(--mono); font-size: 22px; color: #fff; background: rgba(18, 16, 22, 0.88); border: 1px solid rgba(192, 132, 252, 0.5); opacity: 0; pointer-events: none; }
.cl-key-flash.is-on { animation: pbxKey 0.7s var(--ease); }
@keyframes pbxKey { 0% { opacity: 0; transform: translate(-50%, -40%) scale(0.9); } 25% { opacity: 1; transform: translate(-50%, -50%) scale(1); } 100% { opacity: 0; transform: translate(-50%, -60%) scale(1); } }

/* ========== 演示下方：效果对比提示条 ========== */
.pbx-stage-foot { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--faint); }
.pbx-replay { display: inline-flex; align-items: center; gap: 6px; color: var(--dim); font-size: 13px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); transition: color 0.2s, border-color 0.2s; }
.pbx-replay:hover { color: #fff; border-color: var(--line-2); }
.pbx-replay svg { width: 14px; height: 14px; }

@media (max-width: 1080px) {
  .pbx-stage { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .pbx-copy { order: 2; }
}
@media (max-width: 760px) {
  .pbx-tabs {
    width: 100%; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 5px; padding: 6px; border-radius: 14px; margin-bottom: 16px;
  }
  .pbx-tab {
    height: 36px; padding: 0 6px; font-size: 12px; gap: 4px;
    justify-content: center; border-radius: 9px; min-width: 0;
  }
  .pbx-tab svg { width: 13px; height: 13px; flex-shrink: 0; }
  .pbx-tabs:has([data-tab="studio"]) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .pbx-tabs:has([data-tab="studio"]) .pbx-tab {
    padding-inline: 3px; font-size: 11px; line-height: 1.15; white-space: normal;
  }
  .pbx-tabs:has([data-tab="studio"]) .pbx-tab svg { display: none; }
  .pbx-tab .bar { left: 8px; right: 8px; bottom: 3px; }

  /* 模拟软件窗口改为自适应高度：上方完整画布 + 下方完整交互面板，绝不隐藏演示内容 */
  .pbx-app { aspect-ratio: auto; height: auto; border-radius: 14px; max-width: 100%; }
  .pbx-app-bar { height: 34px; padding: 0 10px; gap: 8px; }
  .pbx-lights i { width: 9px; height: 9px; }
  .pbx-app-title { display: none; }
  .pbx-app-body { position: relative; min-height: 0; }
  .pbx-scene { position: relative; inset: auto; width: 100%; }
  .pbx-scene.is-on { display: flex; flex-direction: column; }

  /* ① 原生 PS：单列精简工具栏 + 居中大图 + 底部双栏（曲线 + 图层）全部可见 */
  .ps-optbar { height: 28px; gap: 8px; padding: 0 10px; font-size: 10.5px; overflow-x: auto; scrollbar-width: none; }
  .ps-optbar::-webkit-scrollbar { display: none; }
  .ps-main { flex-direction: column; }
  .ps-tools {
    width: 100%; flex-direction: row; align-items: center; justify-content: flex-start;
    gap: 6px; padding: 6px 8px; border-right: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    overflow-x: auto; scrollbar-width: none;
  }
  .ps-tools::-webkit-scrollbar { display: none; }
  .ps-tools-grid { display: flex; flex-wrap: nowrap; gap: 4px; }
  .ps-tool { width: 28px; height: 28px; flex: 0 0 auto; }
  .ps-tool .tip { display: none; }
  .ps-swatches { display: none; }
  [data-scene="ps"] .pbx-canvas-wrap { height: 280px; flex: none; padding: 10px; }
  [data-scene="ps"] .pbx-sidepanel {
    display: grid; grid-template-columns: 126px minmax(0, 1fr); grid-template-rows: auto auto 1fr; gap: 6px 12px;
    width: 100%; max-width: none; border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 10px 12px; align-items: start;
  }
  [data-scene="ps"] .pbx-panel-title:first-child { grid-column: 1 / -1; grid-row: 1; }
  [data-scene="ps"] .ps-curve-box { grid-column: 1; grid-row: 2 / 4; width: 126px; height: 126px; }
  [data-scene="ps"] .ps-blend { display: none; }
  [data-scene="ps"] .ps-layers { grid-column: 2; grid-row: 3; }

  /* ② 人像美颜：上方大特写 + 下方完整 4 滑杆 2×2 网格，手机直接可拖 */
  [data-scene="beauty"] .pbx-canvas-wrap { height: 320px; flex: none; padding: 10px; }
  [data-scene="beauty"] .pbx-sidepanel {
    display: flex; width: 100%; max-width: none; border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 10px 12px; gap: 8px;
  }
  [data-scene="beauty"] .bt-people { display: none; }
  [data-scene="beauty"] .bt-group { padding: 8px 10px; gap: 7px; }
  [data-scene="beauty"] .bt-row { grid-template-columns: 56px 1fr 26px; font-size: 11.5px; }

  /* ③ AI 创成式：保留模式文字标签 + 充足画布高度 */
  [data-scene="ai"] .pbx-canvas-wrap { height: 390px; flex: none; padding: 10px; }
  .ai-modes { top: 8px; padding: 3px; gap: 3px; }
  .ai-mode { height: 28px; padding: 0 10px; font-size: 11.5px; }
  .ai-mode span { display: inline; }
  .ai-photo { height: 64%; margin-top: 10px; }
  .ai-photo.is-portrait, .ai-photo.is-tall { height: 72%; margin-top: 16px; }
  .ai-bar { width: calc(100% - 16px); bottom: 10px; padding: 5px 5px 5px 10px; }
  .ai-bar .txt { font-size: 11.5px; }
  .ai-hint { display: none; }

  /* ④ 一句话 P 图：上方实图 + 下方模型切换、状态与 4 预设完整展示 */
  .pp-wrap { grid-template-columns: 1fr; grid-template-rows: 310px auto; }
  .pp-canvas { height: 310px; padding: 10px; }
  .pp-chat { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 10px 12px; gap: 8px; }
  .pp-log { display: flex; max-height: 76px; }
  .pp-model { padding: 7px 8px; }
  .pp-model small { display: none; }

  /* ⑤ 一键选片：上方工具栏换行整洁，网格 4 列 / 对比并排 / 调色上下排布（保留全部胶片预设与滑杆） */
  .cl-toolbar { height: auto; flex-wrap: wrap; padding: 8px 10px; gap: 6px; }
  .cl-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; padding: 10px; min-height: 310px; }
  .cl-compare { min-height: 290px; padding: 10px; gap: 8px; }
  .cl-grade.is-on { flex-direction: column; }
  .cl-grade-view { height: 270px; flex: none; padding: 10px; }
  .cl-grade-panel {
    display: flex; width: 100%; max-width: none; border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 10px 12px;
  }
  .cl-hist { display: none; }
  .cl-keyhint { display: none !important; }
  .cl-import { min-height: 310px; }

  /* ⑥ 插件体系：顶部横向插件栏 + 完整画布 + 底部插件面板 */
  .pl-wrap { flex-direction: column; }
  .pl-rail {
    order: -1; width: 100%; flex-direction: row; justify-content: center; gap: 8px;
    padding: 8px 10px; border-left: 0; border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  }
  .pl-rail-btn { width: auto; height: 30px; padding: 0 12px; border-radius: 999px; }
  .pl-rail-import { margin-top: 0; padding: 0 10px; }
  .pl-canvas { height: 310px; flex: none; padding: 10px; }
  .pl-panel {
    display: flex; width: 100%; max-width: none; border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06); padding: 10px 12px; gap: 8px;
  }
  .pl-feats { display: grid; grid-template-columns: 1fr; gap: 5px; }
  .pl-feat:nth-child(n+3) { display: none; }
  .pl-compat { display: none; }

  .pbx-copy-panel h3 { font-size: 22px; }
  .pbx-copy-panel > p { font-size: 14px; }
  .pbx-try { font-size: 12.5px; padding: 11px 13px; }
  .pbx-stage-foot { font-size: 12px; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .pbx-scene.is-on, .pbx-copy-panel.is-on { animation: none; }
}


/* 3D 棚拍光效 */
.pbx-studio {
  --studio-line: #363943;
  --studio-hi: #a5e5f0;
  --studio-text: #e2e5ec;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 32%);
  width: 100%;
  min-height: 0;
  background: #1a1c21;
  color: var(--studio-text);
}
.pbx-studio__monitor,
.pbx-studio__panel {
  display: grid;
  grid-template-rows: 37px minmax(0, 1fr);
  min-width: 0;
  min-height: 0;
  margin: 0;
}
.pbx-studio__monitor {
  background: #25282d;
}
.pbx-studio__panel {
  background: #202228;
  border-left: 1px solid #111216;
}
.pbx-studio__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-inline: 13px;
  border-bottom: 1px solid var(--studio-line);
  background: #202227;
  font-size: 12px;
  font-weight: 600;
}
.pbx-studio__source {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--studio-hi);
  font-size: 11px;
  font-weight: 500;
}
.pbx-studio__source::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.pbx-studio__compare,
.pbx-studio__presets button {
  min-height: 26px;
  padding-inline: 8px;
  border: 1px solid var(--studio-line);
  border-radius: 4px;
  background: #292c32;
  color: var(--studio-text);
  font-size: 11px;
}
.pbx-studio button:hover { background: #373b45; }
.pbx-studio button[aria-pressed="true"] {
  border-color: #57818c;
  background: #273941;
  color: #d2f5fb;
}
.pbx-studio :focus-visible {
  outline: 2px solid var(--studio-hi);
  outline-offset: 2px;
}
.pbx-studio__frame {
  display: grid;
  min-height: 0;
  min-width: 0;
  margin: 0 12px;
}
.pbx-studio__frame > img,
.pbx-studio__layers,
.pbx-studio__layers img {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
}
.pbx-studio__layers { display: grid; }
.pbx-studio__layers img { opacity: 0; }
.pbx-studio__layers img:nth-child(2) { opacity: 1; }
.pbx-studio__controls {
  padding: 13px 12px;
  overflow: auto;
  color-scheme: dark;
}
.pbx-studio__field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px;
  font-size: 12px;
}
.pbx-studio__field output {
  color: var(--studio-hi);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.pbx-studio__map {
  --lamp-x: 50%;
  --beam-alpha: .32;
  position: relative;
  isolation: isolate;
  height: clamp(96px, 13vw, 166px);
  margin-top: 8px;
  overflow: hidden;
  border: 1px solid var(--studio-line);
  border-radius: 5px;
  background-color: #171a20;
  background-image: linear-gradient(#64768d26 1px, transparent 1px), linear-gradient(90deg, #64768d26 1px, transparent 1px);
  background-size: 16px 16px;
  background-position: center 60%;
  cursor: grab;
  touch-action: none;
}
.pbx-studio__map:active { cursor: grabbing; }
.pbx-studio__orbit {
  position: absolute;
  inset: 16% 9% 11%;
  border: 1px solid #64859d85;
  border-radius: 50%;
}
.pbx-studio__beam {
  position: absolute;
  inset: 0;
  background: linear-gradient(#a0e7fa, #7ba5c8);
  opacity: var(--beam-alpha);
  clip-path: polygon(calc(var(--lamp-x) - 3%) 28%, calc(var(--lamp-x) + 3%) 28%, 57% 82%, 43% 82%);
}
.pbx-studio__target {
  position: absolute;
  left: 50%;
  top: 70%;
  width: 28px;
  height: 22px;
  transform: translate(-50%, -50%);
  border: 1px solid #ffd48d;
  border-radius: 50%;
  background: #2a2624;
}
.pbx-studio__target::after {
  content: "";
  position: absolute;
  inset: 4px 8px;
  border: 1px solid #ffd48d;
  border-radius: 50%;
}
.pbx-studio__lamp {
  position: absolute;
  left: var(--lamp-x);
  top: 28%;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  transform: translate(-50%, -50%);
  border: 1px solid var(--studio-hi);
  border-radius: 50%;
  background: #19272e;
}
.pbx-studio__lamp i {
  width: 13px;
  height: 8px;
  border: 1px solid #c8f1fa;
  border-radius: 2px;
  background: #a2c8d2;
}
.pbx-studio__range {
  display: block;
  width: 100%;
  height: 26px;
  margin: 2px 0;
  accent-color: #98d2e2;
  cursor: pointer;
}
.pbx-studio__presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
}
.pbx-studio__presets button { padding-inline: 1px; }
.pbx-studio__intensity {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--studio-line);
}
@media (max-width: 760px) {
  .pbx-studio { grid-template: auto / minmax(0, 1fr); }
  .pbx-studio__monitor { grid-template-rows: 36px minmax(0, 1fr); }
  .pbx-studio__frame { height: clamp(218px, 66vw, 420px); }
  .pbx-studio__panel { border-top: 1px solid #111216; border-left: none; }
  .pbx-studio__map { height: clamp(100px, 37vw, 170px); }
}

/* AI 追色工作台 */
.pbx-grade {
  --grade-bg: #1b1b1e;
  --grade-border: #36363e;
  --grade-ink: #e9e8ec;
  --grade-dim: #b7b5c3;
  --grade-focus: #a99bfc;
  display: grid;
  grid-template-rows: 42px minmax(0, 1fr);
  width: 100%;
  min-height: 0;
  color: var(--grade-ink);
  background: var(--grade-bg);
}
.pbx-grade-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 13px;
  gap: 8px;
  border-bottom: 1px solid var(--grade-border);
  font-size: 13px;
}
.pbx-grade-modes {
  display: flex;
  padding: 2px;
  border: 1px solid var(--grade-border);
  border-radius: 6px;
  background: #101013;
}
.pbx-grade-modes button {
  padding: 4px 9px;
  color: var(--grade-dim);
  font-size: 11px;
  line-height: 1.4;
  white-space: nowrap;
  border-radius: 4px;
}
.pbx-grade-modes button[aria-pressed="true"] { color: #f8f7ff; background: #3d3654; }
.pbx-grade-modes button:hover { color: #fff; }
.pbx-grade-main {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(92px, 17%) minmax(0, 1fr) minmax(148px, 25%);
}
.pbx-grade-inputs, .pbx-grade-tools {
  display: grid;
  align-content: start;
  min-width: 0;
  min-height: 0;
  gap: 12px;
  padding: 12px;
  background: #202024;
}
.pbx-grade-inputs { border-right: 1px solid var(--grade-border); }
.pbx-grade-tools { border-left: 1px solid var(--grade-border); }
.pbx-grade-inputs figure { min-width: 0; min-height: 0; margin: 0; }
.pbx-grade-inputs figcaption, .pbx-grade-scope p, .pbx-grade-adjust label {
  color: var(--grade-ink);
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
}
.pbx-grade-inputs img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border: 1px solid var(--grade-border);
  border-radius: 4px;
  background: #151519;
  object-fit: cover;
}
.pbx-grade-inputs figure:last-child img { border-color: #675987; }
.pbx-grade-viewer {
  display: grid;
  place-items: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  padding: 12px;
  background: #111114;
}
.pbx-grade-frame {
  --grade-split: 50%;
  position: relative;
  min-height: 0;
  width: min(100%, 344px);
  height: 100%;
  max-height: 430px;
  margin: 0;
  overflow: hidden;
  isolation: isolate;
  background: #151519;
}
.pbx-grade-frame > img, .pbx-grade-layer, .pbx-grade-layer img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.pbx-grade-layer { clip-path: inset(0 0 0 var(--grade-split)); }
.pbx-grade-frame[data-grade-view="result"] .pbx-grade-layer { clip-path: none; }
.pbx-grade-frame[data-grade-view="original"] .pbx-grade-layer { visibility: hidden; }
.pbx-grade-label {
  position: absolute;
  top: 10px;
  padding: 3px 7px;
  background: rgba(17, 17, 20, 0.85);
  color: #f6f5fa;
  border: 1px solid rgba(255, 255, 255, .2);
  border-radius: 4px;
  font-size: 11px;
  pointer-events: none;
}
.pbx-grade-label--before { left: 9px; }
.pbx-grade-label--after { right: 9px; }
.pbx-grade-frame[data-grade-view="original"] .pbx-grade-label--after,
.pbx-grade-frame[data-grade-view="result"] .pbx-grade-label--before,
.pbx-grade-frame[data-grade-view="split"].is-full-original .pbx-grade-label--after,
.pbx-grade-frame[data-grade-view="split"].is-full-result .pbx-grade-label--before { display: none; }
.pbx-grade-divider {
  position: absolute;
  left: clamp(14px, var(--grade-split), calc(100% - 14px));
  top: 0;
  bottom: 0;
  width: 2px;
  background: #fff;
  box-shadow: 0 1px 8px #1212188c;
  transform: translateX(-50%);
  pointer-events: none;
}
.pbx-grade-divider svg {
  position: absolute;
  top: 52%;
  left: 50%;
  width: 28px;
  height: 28px;
  padding: 3px;
  color: #19191e;
  background: #faf9ff;
  border-radius: 50%;
  box-shadow: 0 2px 8px #1212188c;
  transform: translate(-50%, -50%);
}
.pbx-grade-split {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  touch-action: pan-y;
}
.pbx-grade-frame[data-grade-view="original"] :is(.pbx-grade-divider, .pbx-grade-split),
.pbx-grade-frame[data-grade-view="result"] :is(.pbx-grade-divider, .pbx-grade-split) { display: none; }
.pbx-grade-frame:has(.pbx-grade-split:focus-visible) .pbx-grade-divider svg {
  outline: 2px solid var(--grade-focus);
  outline-offset: 3px;
}
.pbx-grade-scope canvas {
  display: block;
  width: 100%;
  height: 67px;
  border: 1px solid var(--grade-border);
  border-radius: 4px;
  background: #141417;
}
.pbx-grade-adjust label { display: flex; justify-content: space-between; gap: 5px; }
.pbx-grade-adjust output {
  color: var(--grade-focus);
  font-variant-numeric: tabular-nums;
}
.pbx-grade-adjust input {
  width: 100%;
  margin: 0;
  height: 24px;
  accent-color: var(--grade-focus);
  cursor: pointer;
}
.pbx-grade :is(button, .pbx-grade-adjust input):focus-visible {
  outline: 2px solid var(--grade-focus);
  outline-offset: 2px;
}

@media (max-width: 760px) {
  .pbx-grade-main {
    grid-template-columns: 72px minmax(0, 1fr);
    grid-template-rows: auto auto;
  }
  .pbx-grade-inputs { padding: 8px; gap: 9px; }
  .pbx-grade-viewer { min-height: clamp(235px, 78vw, 450px); padding: 8px; }
  .pbx-grade-tools {
    grid-column: 1 / -1;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr);
    align-items: center;
    gap: 14px;
    padding: 8px 12px;
    border: 0;
    border-top: 1px solid var(--grade-border);
  }
  .pbx-grade-scope canvas { height: 36px; }
}
