/* ---------- v2: 海螺 AI 生成桥接 ---------- */
/* 桥接状态: 悬浮在画布左上角 (viewport 内 absolute, 不占工具栏, 不随画布缩放) */
#bridge-status {
  position: absolute; left: 14px; top: 12px; z-index: 15;
  padding: 5px 12px; border-radius: 20px;
  font-size: 12px; color: var(--tx-3); background: rgba(31,35,45,.92);
  backdrop-filter: blur(8px);
  border: 1px solid var(--panel-line); white-space: nowrap; cursor: default;
  box-shadow: 0 6px 20px rgba(3,6,14,.45);
  transition: color .3s, border-color .3s, box-shadow .3s;
}
#bridge-status.online {
  color: #7ee7ad; border-color: rgba(45,212,191,.4);
  box-shadow: 0 0 14px rgba(45,212,191,.18);
}
#bridge-status.offline { color: var(--tx-3); }
/* 🔢 H3 前进指针 chip: 悬浮在状态条下方, 点击弹出手动设置面板 */
#h3-cursor-chip {
  position: absolute; left: 14px; top: 48px; z-index: 15;
  padding: 4px 12px; border-radius: 20px;
  font-size: 11px; color: #a9c4ff; background: rgba(31,35,45,.92);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(91,140,255,.35); white-space: nowrap; cursor: pointer;
  box-shadow: 0 6px 20px rgba(3,6,14,.45);
  transition: all .2s;
}
#h3-cursor-chip:hover { color: #dfe8ff; border-color: rgba(91,140,255,.7); background: rgba(41,48,64,.96); }
#h3-cursor-pop {
  position: absolute; left: 14px; top: 84px; z-index: 40;
  width: 200px; padding: 10px;
  background: rgba(25,29,39,.97); backdrop-filter: blur(10px);
  border: 1px solid var(--panel-line); border-radius: 14px;
  box-shadow: 0 16px 44px rgba(3,6,14,.6);
  display: flex; flex-direction: column; gap: 9px;
}
#h3-cursor-pop[hidden] { display: none; }
#h3-cursor-pop .h3c-row { display: flex; gap: 8px; }
#h3-cursor-pop .h3c-row input {
  flex: 1; min-width: 0; border: 1px solid var(--panel-line); border-radius: 9px;
  background: rgba(255,255,255,.05); color: var(--tx);
  font-size: 13px; padding: 7px 10px; outline: none;
}
#h3-cursor-pop .h3c-row input:focus { border-color: rgba(91,140,255,.6); }
#h3-cursor-pop .h3c-apply {
  border: 1px solid rgba(91,140,255,.5); border-radius: 9px; cursor: pointer;
  background: rgba(91,140,255,.18); color: #a9c4ff;
  font-size: 12px; font-weight: 600; padding: 7px 16px; transition: all .15s;
}
#h3-cursor-pop .h3c-apply:hover { background: rgba(91,140,255,.35); color: #dfe8ff; }
#h3-cursor-pop .h3c-apply:disabled { opacity: .5; cursor: wait; }

/* 提示词卡生成按钮: 「一个球」第17款·虚空雷暴 (3D Void Storm · 虚空暗涌 + 闪电电弧 + 3D琉璃高光) */
.card.prompt .btn-generate {
  position: relative; overflow: hidden;
  display: block; width: 100%; margin-top: 9px;
  padding: 11.5px 12px;
  border-radius: 13px;
  border: 1.5px solid rgba(6, 182, 212, 0.75);
  background: radial-gradient(circle at 35% 30%, rgba(99, 102, 241, 0.45) 0%, rgba(147, 51, 234, 0.35) 40%, #05060b 80%, #020306 100%);
  color: #eaf8ff; font-size: 13.5px; font-weight: 800; letter-spacing: .5px;
  cursor: pointer; z-index: 0;
  box-shadow: 0 0 16px rgba(59, 130, 246, 0.45), 0 0 36px rgba(147, 51, 234, 0.3),
              inset 0 0 14px rgba(6, 182, 212, 0.2);
  transition: transform .12s, box-shadow .25s, border-color .25s;
}

/* 顶部 3D 琉璃高光切面 (「一个球」通用 3D Glass Specular) */
.card.prompt .btn-generate::before {
  content: ''; position: absolute; top: 1.5px; left: 8%; right: 8%; height: 48%;
  border-radius: 12px 12px 60% 60% / 10px 10px 40% 40%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.65) 0%, rgba(255, 255, 255, 0.08) 70%, transparent 100%);
  pointer-events: none; z-index: 2;
}

/* 虚空雷暴核心 & 闪电电弧层 (仿「一个球」雷暴闪电与暗星云) */
.card.prompt .btn-generate::after {
  content: ''; position: absolute; inset: 0;
  background: 
    radial-gradient(circle at 50% 50%, rgba(255, 255, 255, 0.2) 0%, rgba(59, 130, 246, 0.35) 20%, transparent 60%),
    linear-gradient(115deg, transparent 40%, rgba(255, 255, 255, 0.8) 48%, rgba(6, 182, 212, 0.9) 50%, rgba(255, 255, 255, 0.8) 52%, transparent 60%);
  background-size: 100% 100%, 200% 200%;
  background-position: center, -120% 0;
  opacity: .5; pointer-events: none; z-index: 1;
  transition: opacity .25s;
}

/* 悬停: 虚空雷暴爆发！高能闪电撕裂虚空 + 剧烈电离电弧呼吸闪烁 */
.card.prompt .btn-generate:hover {
  border-color: rgba(6, 182, 212, 0.95);
  box-shadow: 0 0 22px rgba(59, 130, 246, 0.75), 0 0 50px rgba(147, 51, 234, 0.55),
              inset 0 0 20px rgba(6, 182, 212, 0.35);
  animation: void-storm-pulse 1.8s ease-in-out infinite;
}
.card.prompt .btn-generate:hover::after {
  opacity: 1;
  animation: void-lightning-strike 1.6s cubic-bezier(0.4, 0, 0.2, 1) infinite;
}
@keyframes void-storm-pulse {
  0%, 100% {
    box-shadow: 0 0 18px rgba(59, 130, 246, 0.6), 0 0 40px rgba(147, 51, 234, 0.4),
                inset 0 0 16px rgba(6, 182, 212, 0.25);
  }
  50% {
    box-shadow: 0 0 28px rgba(59, 130, 246, 0.9), 0 0 65px rgba(147, 51, 234, 0.7),
                inset 0 0 24px rgba(6, 182, 212, 0.5);
  }
}
@keyframes void-lightning-strike {
  0% { background-position: center, -120% 0; opacity: 0.6; }
  15% { background-position: center, 50% 0; opacity: 1; filter: brightness(1.6); }
  25% { background-position: center, 60% 0; opacity: 0.8; }
  35% { background-position: center, 220% 0; opacity: 0.4; }
  100% { background-position: center, 220% 0; opacity: 0.4; }
}
.card.prompt .btn-generate:active { transform: scale(.97); }

/* 🎯 提示词卡双按钮排布 (九宫格预审 + 生成视频) */
.card.prompt .prompt-gen-btn-group {
  display: flex;
  gap: 8px;
  width: 100%;
  margin-top: 9px;
  align-items: stretch;
}
.card.prompt .prompt-gen-btn-group .btn-generate {
  flex: 1 1 auto;
  margin-top: 0 !important;
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid {
  flex: 0 0 auto;
  position: relative;
  overflow: visible;
  padding: 0 11px;
  border-radius: 13px;
  border: 1.5px solid rgba(168, 85, 247, 0.75);
  background: radial-gradient(circle at 35% 30%, rgba(168, 85, 247, 0.45) 0%, rgba(99, 102, 241, 0.35) 50%, #0d0b1a 90%);
  color: #f5f3ff;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .4px;
  cursor: pointer;
  box-shadow: 0 0 14px rgba(168, 85, 247, 0.35), inset 0 0 10px rgba(192, 132, 252, 0.25);
  transition: all .2s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid:hover {
  border-color: rgba(216, 180, 254, 0.95);
  box-shadow: 0 0 20px rgba(168, 85, 247, 0.65), 0 0 35px rgba(139, 92, 246, 0.45), inset 0 0 14px rgba(233, 213, 255, 0.4);
  transform: translateY(-1px);
  color: #ffffff;
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid:active {
  transform: scale(0.96);
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid .previs-grid-picker-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 1px 5px;
  height: 19px;
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(216, 180, 254, 0.35);
  color: #e9d5ff;
  font-size: 10px;
  font-weight: 800;
  cursor: pointer;
  transition: all .15s ease;
  pointer-events: auto;
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid .previs-grid-picker-trigger:hover {
  background: rgba(168, 85, 247, 0.45);
  border-color: #f3e8ff;
  color: #ffffff;
  transform: scale(1.12);
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.6);
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid .previs-ratio-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 5px;
  padding: 1px 7px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  color: #fef08a;
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(250, 204, 21, 0.55);
  border-radius: 6px;
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: all .15s ease;
  pointer-events: auto;
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid .previs-ratio-tag:hover {
  background: rgba(234, 179, 8, 0.35);
  border-color: #fde047;
  color: #ffffff;
  transform: scale(1.08);
  box-shadow: 0 0 10px rgba(250, 204, 21, 0.5);
}

.previs-grid-menu {
  position: fixed;
  z-index: 10000;
  width: 350px;
  background: rgba(15, 13, 26, 0.97);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(168, 85, 247, 0.5);
  border-radius: 14px;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.85), 0 0 24px rgba(168, 85, 247, 0.25);
  padding: 8px 10px 10px 10px;
  font-family: inherit;
  color: #f3f4f6;
  animation: previsMenuPop 0.16s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
}
@keyframes previsMenuPop {
  from { opacity: 0; transform: scale(0.94) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}
.pg-menu-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 4px 8px 4px;
  font-size: 11.5px;
  font-weight: 700;
  color: #c084fc;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 4px;
}
.pg-menu-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.pg-menu-close-btn {
  background: transparent;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  font-size: 13px;
  line-height: 1;
  padding: 3px 6px;
  border-radius: 5px;
  transition: all .15s ease;
}
.pg-menu-close-btn:hover {
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
}
.pg-menu-ratio-info {
  font-size: 10px;
  color: #fef08a;
  background: rgba(234, 179, 8, 0.2);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(250, 204, 21, 0.3);
}
/* 🎯 宫格预审模型切换药丸 */
.pg-engine-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 8px;
  margin: 3px 0 6px 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
}
.pg-engine-label {
  font-size: 11px;
  font-weight: 700;
  color: #cbd5e1;
}
.pg-engine-capsules {
  display: flex;
  gap: 5px;
}
.pg-engine-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #94a3b8;
  font-size: 11px;
  font-weight: 800;
  padding: 2px 9px;
  border-radius: 6px;
  cursor: pointer;
  transition: all .15s ease;
}
.pg-engine-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  color: #ffffff;
}
.pg-engine-btn.active {
  background: linear-gradient(135deg, #a855f7, #6366f1);
  border-color: #c084fc;
  color: #ffffff;
  box-shadow: 0 0 10px rgba(168, 85, 247, 0.5);
}
.card.prompt .prompt-gen-btn-group .btn-previs-grid .previs-engine-tag {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 4px;
  padding: 1px 5px;
  font-size: 10px;
  font-weight: 800;
  color: #e9d5ff;
  background: rgba(168, 85, 247, 0.35);
  border: 1px solid rgba(216, 180, 254, 0.5);
  border-radius: 5px;
  letter-spacing: 0.3px;
}
.pg-menu-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-height: 165px;
  overflow-y: auto;
  flex-shrink: 0;
  padding-right: 2px;
}
.pg-menu-list::-webkit-scrollbar {
  width: 4px;
}
.pg-menu-list::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
}
.pg-menu-item {
  display: flex;
  align-items: center;
  padding: 6px 8px;
  border-radius: 7px;
  cursor: pointer;
  transition: all .15s ease;
  user-select: none;
}
.pg-menu-item:hover {
  background: rgba(168, 85, 247, 0.22);
}
.pg-menu-item.active {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.35), rgba(99, 102, 241, 0.3));
  border: 1px solid rgba(192, 132, 252, 0.5);
}
.pg-item-icon {
  font-size: 15px;
  margin-right: 8px;
  color: #d8b4fe;
}
.pg-item-info {
  flex: 1;
}
.pg-item-title {
  font-size: 11.5px;
  font-weight: 700;
  color: #ffffff;
  line-height: 1.2;
}
.pg-item-layout {
  font-size: 10.5px;
  font-weight: 600;
  color: #a78bfa;
}
.pg-item-desc {
  font-size: 9.5px;
  color: #9ca3af;
  margin-top: 1px;
}
.pg-item-check {
  font-size: 13px;
  font-weight: 800;
  color: #a7f3d0;
  margin-left: 6px;
}

/* 🎯 方案1: 宫格预审浮窗底部无黑盒提示词编辑器 */
.pg-prompt-editor-section {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.pg-prompt-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pg-prompt-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.pg-prompt-title {
  font-size: 11px;
  font-weight: 700;
  color: #f1f5f9;
}
.pg-prompt-status-badge {
  font-size: 9px;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border: 1px solid rgba(148, 163, 184, 0.25);
  transition: all .15s ease;
}
.pg-prompt-status-badge.custom-saved {
  background: rgba(16, 185, 129, 0.2);
  color: #6ee7b7;
  border-color: rgba(16, 185, 129, 0.45);
}
.pg-prompt-subtip {
  font-size: 9.5px;
  color: #94a3b8;
  line-height: 1.3;
}
.pg-prompt-textarea {
  width: 100%;
  height: 115px;
  box-sizing: border-box;
  background: rgba(6, 6, 14, 0.7);
  border: 1px solid rgba(168, 85, 247, 0.35);
  border-radius: 7px;
  color: #f8fafc;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 10.5px;
  line-height: 1.45;
  padding: 6px 8px;
  resize: vertical;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.pg-prompt-textarea:focus {
  border-color: #c084fc;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.3);
}
.pg-prompt-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 3px;
}
.pg-prompt-btn {
  font-size: 10.5px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 6px;
  cursor: pointer;
  border: none;
  transition: all .15s ease;
  user-select: none;
  white-space: nowrap;
}
.pg-prompt-btn-reset {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #cbd5e1;
}
.pg-prompt-btn-reset:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}
.pg-prompt-btn-save {
  background: rgba(16, 185, 129, 0.18);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #6ee7b7;
}
.pg-prompt-btn-save:hover {
  background: rgba(16, 185, 129, 0.32);
  color: #a7f3d0;
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.35);
}
.pg-prompt-btn-gen {
  margin-left: auto;
  background: linear-gradient(135deg, #a855f7, #6366f1);
  color: #ffffff;
  border: 1px solid rgba(216, 180, 254, 0.4);
  box-shadow: 0 2px 8px rgba(168, 85, 247, 0.4);
  font-weight: 800;
}
.pg-prompt-btn-gen:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(168, 85, 247, 0.6);
  transform: translateY(-1px);
}

/* 🎬 九宫格预审卡直达生视频按钮高亮微动效 */
.btn-previs-to-video:hover,
.btn-previs-to-video-bar:hover {
  filter: brightness(1.15);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.6) !important;
}
.btn-previs-to-video:active,
.btn-previs-to-video-bar:active {
  transform: scale(0.96);
}

/* 🎬 方案3: 宫格图直达右侧视频成片徽标按钮 */
.btn-previs-jump-video {
  transition: all 0.18s ease;
}
.btn-previs-jump-video:hover {
  filter: brightness(1.2);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(56, 189, 248, 0.5) !important;
}
.btn-previs-jump-video:active {
  transform: scale(0.96);
}

/* 🎬 方案3: 视频卡绝对右侧生成 脉冲呼吸光圈动效 */
@keyframes previsSpawnPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.95), 0 0 35px rgba(16, 185, 129, 0.8) !important;
    border-color: #10b981 !important;
    transform: scale(1.025);
  }
  30% {
    box-shadow: 0 0 0 16px rgba(16, 185, 129, 0), 0 0 50px rgba(16, 185, 129, 0.9) !important;
    border-color: #34d399 !important;
    transform: scale(1.01);
  }
  60% {
    box-shadow: 0 0 0 24px rgba(16, 185, 129, 0), 0 0 35px rgba(16, 185, 129, 0.5) !important;
    border-color: #10b981 !important;
    transform: scale(1);
  }
  100% {
    box-shadow: none !important;
    transform: scale(1);
  }
}
.card.card-spawn-pulse {
  animation: previsSpawnPulse 2.8s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  z-index: 120 !important;
}

/* Q3, M3, D2, CHAIN 等全部公用 H3 虚空雷暴，无单独颜色覆盖 */

/* 视频卡: 生成进度态 */
.card.video .gen-progress {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 10px; min-height: 130px; padding: 14px;
  border-radius: 10px; background: #12141c; border: 1px dashed rgba(var(--c-video-rgb), .3);
  text-align: center;
}
.gen-spinner {
  width: 26px; height: 26px; border-radius: 50%;
  border: 3px solid var(--panel-line); border-top-color: var(--c-video);
  animation: gen-spin 1s linear infinite;
}
@keyframes gen-spin { to { transform: rotate(360deg); } }
.gen-text { font-size: 12px; color: #9aa3b8; line-height: 1.5; word-break: break-all; }
.card.video .gen-progress.gen-failed { border-color: #5a3038; background: #1c1214; }
.card.video .gen-progress.gen-failed .gen-text { color: #e8a0aa; }
/* 方案C: 失败块红光呼吸 — 埋头做别的时回头一眼就能看到哪张卡挂了 */
.card .gen-progress.gen-failed { animation: genFailPulse 2.2s ease-in-out infinite; }
@keyframes genFailPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 80, 80, 0); }
  50%      { box-shadow: 0 0 18px 3px rgba(255, 80, 80, .38); }
}

/* 🔔 通知总开关按钮 (工具栏「清空」右侧): 开=淡金高亮, 关=灰暗 */
.tb-btn.tb-notify { color: #e8c98a; border-color: rgba(232, 201, 138, .35); }
.tb-btn.tb-notify.notify-off { color: #7a8194; border-color: #333a48; opacity: .75; }
.tb-btn.tb-notify.notify-off:hover { color: #9aa3b8; }

/* 🔔 通知偏好设置控制中心浮层 (方案3: macOS Control Center 风格) */
#notify-popover {
  position: fixed;
  z-index: 60;
  width: 250px;
  background: #1e2129;
  border: 1px solid #2f3442;
  border-radius: 12px;
  box-shadow: 0 14px 40px rgba(0,0,0,.6), 0 0 0 1px rgba(255,255,255,.05);
  padding: 10px 12px;
  font-size: 13px;
  color: var(--tx);
  user-select: none;
  backdrop-filter: blur(16px);
}
#notify-popover .np-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 4px 8px 4px;
  margin-bottom: 6px;
  border-bottom: 1px solid rgba(255,255,255,.08);
}
#notify-popover .np-title {
  font-size: 12px;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: .3px;
}
#notify-popover .np-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 8px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
#notify-popover .np-item:hover {
  background: rgba(255,255,255,.05);
}
#notify-popover .np-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
#notify-popover .np-label {
  font-weight: 500;
  color: #e2e8f0;
  font-size: 13px;
}
#notify-popover .np-desc {
  font-size: 11px;
  color: #717d96;
}

/* iOS/macOS 风格滑动开关 */
.np-switch {
  position: relative;
  display: inline-block;
  width: 38px;
  height: 22px;
  flex-shrink: 0;
  cursor: pointer;
}
.np-switch input {
  opacity: 0;
  width: 0;
  height: 0;
  margin: 0;
}
.np-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #333a48;
  transition: .24s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 22px;
}
.np-slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #e2e8f0;
  transition: .24s cubic-bezier(0.4, 0, 0.2, 1);
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.np-switch input:checked + .np-slider {
  background-color: #3b82f6;
}
.np-switch input:checked + .np-slider:before {
  transform: translateX(16px);
  background-color: #ffffff;
}

.gen-actions { display: flex; gap: 8px; margin-top: 2px; }
.gen-actions button {
  padding: 5px 14px; border: 1px solid #3a4050; border-radius: 7px;
  background: #232733; color: #cfd6e4; font-size: 12px; cursor: pointer;
}
.gen-actions button:hover { background: #2e3342; }

/* 视频卡: 水印徽章 */
.card.video .gen-badge {
  position: absolute; top: 6px; left: 6px;
  padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 600;
  pointer-events: none; z-index: 2;
}
.card.video .badge-clean { background: rgba(28,120,80,.88); color: #d8ffe9; }
.card.video .badge-wm { background: rgba(120,100,40,.88); color: #f5ecc8; }
.gen-actions .gen-cancel { color: #f0a8b0; }

/* 成片卡: 一键变参考素材按钮 (迭代第二段/续写镜头) */
.card.video .btn-as-ref {
  margin-top: 8px; width: 100%; padding: clamp(9px, 2cqw, 18px) 10px;
  border: 1px solid rgba(var(--c-video-rgb), .35); border-radius: 10px;
  background: rgba(var(--c-video-rgb), .08);
  color: #f5b8d5; font-size: clamp(14px, 2.7cqw, 22px); font-weight: 600;
  cursor: pointer; transition: background .15s, filter .15s, transform .06s;
}
.card.video .btn-as-ref:hover { background: rgba(var(--c-video-rgb), .18); filter: brightness(1.1); }
.card.video .btn-as-ref:active { transform: scale(.98); }

/* 视频卡: 底部操作行 (作为参考素材 + 拆镜头 并排) */
.card.video .video-row-actions { display: flex; gap: 8px; margin-top: 8px; }
.card.video .video-row-actions .btn-as-ref { flex: 1; margin-top: 0; }
.card.video .btn-scandet {
  flex: 1; padding: clamp(9px, 2cqw, 18px) 10px;
  border: 1px solid rgba(var(--c-note-rgb), .4); border-radius: 10px;
  background: rgba(var(--c-note-rgb), .08);
  color: #f5dfa0; font-size: clamp(14px, 2.7cqw, 22px); font-weight: 600;
  cursor: pointer; transition: background .15s, filter .15s, transform .06s;
}
.card.video .btn-scandet:hover { background: rgba(var(--c-note-rgb), .18); filter: brightness(1.1); }
.card.video .btn-scandet:active { transform: scale(.98); }


/* ============================================================ */
/* 方案3: 九宫格转视频抽屉式参数抽检与实时调试坞 (PrevisDock) 样式 */
/* ============================================================ */
.previs-dock {
  position: fixed; inset: 0; z-index: 999999;
  pointer-events: none; visibility: hidden;
  transition: visibility .28s;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
}
.previs-dock.active {
  pointer-events: auto; visibility: visible;
}

/* 遮罩背景 (半透明带轻微模糊，点击可关闭) */
.pd-backdrop {
  position: absolute; inset: 0;
  background: rgba(4, 7, 14, 0.45);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .28s ease;
}
.previs-dock.active .pd-backdrop {
  opacity: 1;
}

/* 右侧抽屉面板 */
.pd-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: 520px; max-width: 95vw;
  background: rgba(18, 22, 31, 0.96);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.7), inset 1px 0 0 rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
}
.previs-dock.active .pd-panel {
  transform: translateX(0);
}

/* 抽屉头部 */
.pd-header {
  padding: 16px 20px;
  background: rgba(24, 29, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.pd-title-group { display: flex; flex-direction: column; gap: 3px; }
.pd-badge {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: #10b981; text-transform: uppercase;
}
.pd-title { margin: 0; font-size: 16px; font-weight: 700; color: #f8fafc; }
.pd-subtitle { font-size: 11px; color: #94a3b8; }
.pd-close-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8; font-size: 16px; width: 32px; height: 32px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pd-close-btn:hover {
  background: rgba(239, 68, 68, 0.2); color: #f87171; border-color: rgba(239, 68, 68, 0.4);
}

/* 抽屉内容主体 */
.pd-body {
  flex: 1; overflow-y: auto; padding: 18px 20px;
  display: flex; flex-direction: column; gap: 20px;
}
.pd-section {
  background: rgba(25, 31, 45, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px; padding: 14px 16px;
  display: flex; flex-direction: column; gap: 10px;
}
.pd-section-head {
  display: flex; align-items: center; justify-content: space-between;
}
.pd-sec-title {
  font-size: 13.5px; font-weight: 700; color: #f1f5f9;
  display: flex; align-items: center; gap: 6px;
}
.pd-sec-hint { font-size: 11px; color: #94a3b8; font-weight: normal; }
.pd-sec-badge {
  font-size: 10.5px; padding: 2px 7px; border-radius: 4px;
  background: rgba(16, 185, 129, 0.15); color: #34d399;
  border: 1px solid rgba(16, 185, 129, 0.3);
}
.pd-sec-desc {
  margin: 0; font-size: 11.5px; line-height: 1.5; color: #94a3b8;
}
.pd-sec-desc code {
  background: rgba(0, 0, 0, 0.35); padding: 1px 4px; border-radius: 3px;
  color: #38bdf8; font-family: monospace; font-size: 11px;
}
.pd-sec-tool-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1; font-size: 11px; padding: 3px 8px; border-radius: 6px;
  cursor: pointer; transition: all .15s;
}
.pd-sec-tool-btn:hover { background: rgba(255, 255, 255, 0.12); color: #fff; }

/* 素材抽检列表 */
.pd-assets-list {
  display: flex; flex-direction: column; gap: 8px; margin-top: 4px;
}
.pd-asset-row {
  display: flex; align-items: center; justify-content: space-between;
  background: rgba(15, 19, 28, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px; padding: 7px 10px;
  transition: all .2s;
}
.pd-asset-row:hover {
  background: rgba(25, 32, 48, 0.8); border-color: rgba(255, 255, 255, 0.16);
}
.pd-asset-row.is-grid-master {
  border-color: rgba(16, 185, 129, 0.45);
  background: rgba(6, 44, 30, 0.3);
}
.pd-asset-row.is-disabled {
  opacity: 0.45; filter: grayscale(0.8);
}
.pd-asset-left {
  display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0;
}
.pd-asset-check {
  cursor: pointer; width: 15px; height: 15px; accent-color: #10b981;
}
.pd-asset-thumb {
  position: relative; width: 44px; height: 44px; border-radius: 6px;
  overflow: hidden; background: #000; flex-shrink: 0; cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.15);
}
.pd-asset-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.pd-grid-tag {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(16, 185, 129, 0.85); color: #fff;
  font-size: 8.5px; text-align: center; font-weight: 700; line-height: 12px;
}
.pd-asset-info {
  display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0;
}
.pd-asset-title-line {
  display: flex; align-items: center; gap: 6px;
}
.pd-asset-name {
  font-size: 12px; font-weight: 600; color: #f1f5f9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-asset-mention-tag {
  font-size: 10px; font-family: monospace; font-weight: 700;
  padding: 1px 5px; border-radius: 4px;
  background: rgba(56, 189, 248, 0.18); color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.35);
}
.pd-asset-disabled-tag {
  background: rgba(239, 68, 68, 0.15); color: #f87171;
  border-color: rgba(239, 68, 68, 0.3);
}
.pd-asset-desc {
  font-size: 10.5px; color: #64748b;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pd-asset-tools {
  display: flex; flex-direction: column; gap: 3px; margin-left: 6px;
}
.pd-order-btn {
  background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8; font-size: 9px; width: 22px; height: 18px; border-radius: 4px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pd-order-btn:hover:not(:disabled) {
  background: rgba(255, 255, 255, 0.15); color: #fff;
}
.pd-order-btn:disabled {
  opacity: 0.25; cursor: not-allowed;
}

/* 文本编辑区 */
.pd-textarea {
  width: 100%; box-sizing: border-box;
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px; padding: 10px 12px;
  color: #e2e8f0; font-size: 12px; line-height: 1.6;
  resize: vertical; outline: none; transition: border-color .15s;
  font-family: inherit;
}
.pd-textarea:focus {
  border-color: rgba(16, 185, 129, 0.6);
  box-shadow: 0 0 10px rgba(16, 185, 129, 0.15);
}

/* 实时编译报文预览区 */
.pd-preview-box {
  background: rgba(7, 10, 17, 0.95);
  border: 1px dashed rgba(56, 189, 248, 0.35);
  border-radius: 8px; padding: 12px 14px;
  font-size: 11.5px; line-height: 1.65; color: #cbd5e1;
  max-height: 180px; overflow-y: auto; user-select: text;
  word-break: break-word;
}
.pd-preview-box .pd-hl-mention {
  background: rgba(56, 189, 248, 0.2); color: #38bdf8;
  font-weight: 700; padding: 1px 4px; border-radius: 3px;
  border: 1px solid rgba(56, 189, 248, 0.4);
}
.pd-empty-hint { color: #64748b; font-style: italic; }

/* 参数网格 */
.pd-params-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}
.pd-param-item {
  display: flex; flex-direction: column; gap: 5px;
}
.pd-param-item label {
  font-size: 11.5px; color: #94a3b8; font-weight: 600;
}
.pd-param-item select {
  background: rgba(10, 14, 22, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px; padding: 7px 10px;
  color: #e2e8f0; font-size: 12px; outline: none; cursor: pointer;
}
.pd-param-item select:focus {
  border-color: rgba(16, 185, 129, 0.6);
}

/* 抽屉底部 */
.pd-footer {
  padding: 14px 20px;
  background: rgba(22, 27, 39, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; flex-direction: column; gap: 12px;
  flex-shrink: 0;
}
.pd-footer-status {
  display: flex; align-items: center; gap: 8px; font-size: 11.5px; color: #94a3b8;
}
.pd-status-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10b981;
}
.pd-footer-status.is-busy .pd-status-dot {
  background: #f59e0b; animation: pdPulse 1.2s infinite ease-in-out;
}
.pd-footer-status.is-busy { color: #f59e0b; }
@keyframes pdPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}
.pd-footer-actions {
  display: flex; align-items: center; gap: 12px;
}
.pd-btn-cancel {
  padding: 10px 18px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.pd-btn-cancel:hover {
  background: rgba(255, 255, 255, 0.12); color: #fff;
}
.pd-btn-submit {
  flex: 1; position: relative; overflow: hidden;
  padding: 11px 20px; border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35), 0 0 0 1px rgba(255, 255, 255, 0.1) inset;
  color: #ffffff; font-size: 13.5px; font-weight: 700; letter-spacing: .3px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .2s;
}
.pd-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 22px rgba(16, 185, 129, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2) inset;
  filter: brightness(1.08);
}
.pd-btn-submit:active:not(:disabled) { transform: translateY(1px); }
.pd-btn-submit:disabled {
  opacity: 0.6; cursor: not-allowed; filter: grayscale(0.5);
}

/* ============================================================ */
/* 方案1: 发射前「导演审片与参数装配总控弹窗 (PrevisModal)」样式 */
/* ============================================================ */
.pm-modal-mask {
  position: fixed; inset: 0; z-index: 999999;
  background: rgba(6, 9, 16, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity .24s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  user-select: none;
}
.pm-modal-mask.active {
  opacity: 1; pointer-events: auto;
}

.pm-modal {
  width: 95vw; max-width: 1240px; height: 92vh; max-height: 880px;
  background: #121622;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 18px;
  box-shadow: 0 32px 80px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(255, 255, 255, 0.06);
  display: flex; flex-direction: column; overflow: hidden;
  transform: scale(0.97) translateY(12px);
  transition: transform .26s cubic-bezier(0.16, 1, 0.3, 1);
  color: #e2e8f0;
}
.pm-modal-mask.active .pm-modal {
  transform: scale(1) translateY(0);
}

/* 顶栏 */
.pm-header {
  padding: 14px 24px;
  background: rgba(22, 28, 42, 0.95);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.pm-header-left { display: flex; align-items: center; gap: 10px; }
.pm-logo-tag {
  font-size: 10px; font-weight: 800; letter-spacing: 1px;
  color: #10b981; background: rgba(16, 185, 129, 0.12);
  padding: 3px 8px; border-radius: 4px; border: 1px solid rgba(16, 185, 129, 0.3);
}
.pm-title { margin: 0; font-size: 17px; font-weight: 700; color: #f8fafc; }
.pm-subtitle { font-size: 12px; color: #94a3b8; }
.pm-close-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #94a3b8; font-size: 16px; width: 34px; height: 34px; border-radius: 8px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.pm-close-btn:hover {
  background: rgba(239, 68, 68, 0.2); color: #f87171; border-color: rgba(239, 68, 68, 0.4);
}

/* 主体容器 */
.pm-body {
  flex: 1; overflow-y: auto; padding: 18px 24px;
  display: flex; flex-direction: column; gap: 16px;
}

/* 面板通用组件 */
.pm-panel {
  background: rgba(23, 29, 43, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px; padding: 14px 18px;
  display: flex; flex-direction: column; gap: 10px;
}
.pm-panel-head {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap;           /* 🆕 2026-09-10:左标题+右按钮排不够时换行,避免按钮被压扁 */
  row-gap: 8px;
  column-gap: 12px;
}
.pm-head-title {
  display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 700; color: #f1f5f9;
}
.pm-badge-count {
  font-size: 11px; font-weight: normal; color: #38bdf8;
  background: rgba(56, 189, 248, 0.12); padding: 2px 8px; border-radius: 12px;
  border: 1px solid rgba(56, 189, 248, 0.25);
}
.pm-tip { font-size: 11.5px; color: #94a3b8; }
.pm-mini-btn {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1; font-size: 11px; padding: 4px 10px; border-radius: 6px;
  cursor: pointer; transition: all .15s;
  white-space: nowrap;        /* 🆕 2026-09-10:禁止文字上下分层换行 */
  flex-shrink: 0;            /* 容器缩窄时按钮不被压扁 */
}
.pm-mini-btn:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pm-mini-accent {
  background: rgba(16, 185, 129, 0.15); color: #34d399; border-color: rgba(16, 185, 129, 0.35);
}
.pm-mini-accent:hover {
  background: rgba(16, 185, 129, 0.28); color: #a7f3d0;
}

/* 槽位拖拽滑动轨 */
.pm-slots-track {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px;
  margin-top: 4px;
}
.pm-slot-card {
  position: relative;
  background: rgba(15, 19, 28, 0.75);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 8px;
  cursor: grab; transition: all .18s ease;
}
.pm-slot-card:hover {
  border-color: rgba(56, 189, 248, 0.4); background: rgba(24, 31, 46, 0.85);
  transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}
.pm-slot-card.is-grid-master {
  border-color: rgba(16, 185, 129, 0.5);
  background: rgba(6, 44, 30, 0.35);
}
.pm-slot-card.is-disabled {
  opacity: 0.4; filter: grayscale(0.8);
}
.pm-slot-card.is-dragging {
  opacity: 0.3; border-style: dashed;
}
.pm-slot-card.drag-over {
  border: 2px dashed #38bdf8; background: rgba(56, 189, 248, 0.15);
}
.pm-slot-order-tag {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  font-size: 11px; font-weight: 800; font-family: monospace;
  background: rgba(0, 0, 0, 0.75); color: #38bdf8;
  padding: 2px 7px; border-radius: 5px; border: 1px solid rgba(56, 189, 248, 0.35);
}
.pm-slot-thumb {
  width: 100%; height: 110px; border-radius: 7px;
  overflow: hidden; background: #000; position: relative; cursor: zoom-in;
  border: 1px solid rgba(255, 255, 255, 0.08);
}
.pm-slot-thumb img {
  width: 100%; height: 100%; object-fit: cover;
}
.pm-master-badge {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(16, 185, 129, 0.9); color: #fff;
  font-size: 10px; text-align: center; font-weight: 700; line-height: 18px;
}
.pm-slot-meta {
  display: flex; flex-direction: column; gap: 2px;
}
.pm-slot-title {
  font-size: 12px; font-weight: 600; color: #f1f5f9;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-slot-role {
  font-size: 11px; color: #94a3b8;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.pm-slot-actions {
  display: flex; align-items: center; justify-content: space-between; gap: 6px;
  border-top: 1px solid rgba(255, 255, 255, 0.06); padding-top: 6px;
}
.pm-slot-move {
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1; font-size: 10px; width: 26px; height: 22px; border-radius: 5px;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
}
.pm-slot-move:hover:not(:disabled) { background: rgba(255, 255, 255, 0.18); color: #fff; }
.pm-slot-move:disabled { opacity: 0.25; cursor: not-allowed; }
.pm-slot-toggle {
  flex: 1; background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cbd5e1; font-size: 11px; height: 22px; border-radius: 5px; cursor: pointer;
}
.pm-slot-toggle:hover { background: rgba(239, 68, 68, 0.2); color: #f87171; border-color: rgba(239, 68, 68, 0.4); }

/* 下部双栏 */
.pm-content-split {
  display: grid; grid-template-columns: 2.4fr 1fr; gap: 16px; flex: 1; min-height: 320px;
}
.pm-panel-prompt {
  display: flex; flex-direction: column;
}
.pm-head-tools {
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;           /* 🆕 2026-09-10:容器太窄时按钮自动换到下一行(每个按钮内部不换) */
  justify-content: flex-end;
}
.pm-tab-group {
  display: inline-flex; align-items: center;
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 6px; padding: 2px; gap: 2px;
}
.pm-tab-btn {
  background: transparent; border: none;
  color: #94a3b8; font-size: 11px; font-weight: 600;
  padding: 3px 8px; border-radius: 4px; cursor: pointer;
  transition: all .15s;
  white-space: nowrap;        /* 🆕 2026-09-10:禁止文字上下分层换行 */
  flex-shrink: 0;            /* 容器缩窄时按钮不被压扁 */
}
.pm-tab-btn:hover { color: #f1f5f9; }
.pm-tab-btn.active {
  background: rgba(56, 189, 248, 0.2);
  color: #38bdf8;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}

.pm-editor-wrap {
  flex: 1; display: flex; position: relative; min-height: 250px;
}
.pm-prompt-textarea {
  width: 100%; box-sizing: border-box; height: 100%; min-height: 250px;
  background: rgba(9, 12, 19, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 10px; padding: 12px 14px;
  color: #e2e8f0; font-size: 13px; line-height: 1.65;
  resize: none; outline: none; font-family: inherit; user-select: text;
  transition: border-color .15s;
}
.pm-prompt-textarea:focus {
  border-color: rgba(16, 185, 129, 0.65);
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.15);
}
.pm-prompt-footer {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 11px; color: #94a3b8; margin-top: 4px;
}
.pm-prompt-stat b { color: #38bdf8; }
.pm-prompt-hint code {
  background: rgba(0,0,0,0.4); padding: 1px 4px; border-radius: 3px; color: #38bdf8;
}

.pm-blocks-container {
  flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 8px;
  padding: 4px 4px 12px 2px;
  max-height: 600px;
}
.pm-block-item {
  background: rgba(14, 19, 29, 0.85);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: transform 0.18s ease, border-color 0.18s ease, opacity 0.18s ease;
  position: relative;
  cursor: grab;
}
.pm-block-item:hover {
  border-color: rgba(255, 255, 255, 0.25);
  background: rgba(20, 27, 42, 0.95);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.pm-block-item:active {
  cursor: grabbing;
}
.pm-block-item.is-dragging {
  opacity: 0.35;
  border: 1px dashed #38bdf8;
  transform: scale(0.98);
}
.pm-block-item.drag-over-top {
  border-top: 2px solid #38bdf8 !important;
  transform: translateY(2px);
}
.pm-block-item.drag-over-bottom {
  border-bottom: 2px solid #38bdf8 !important;
  transform: translateY(-2px);
}
.pm-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  user-select: none;
}
.pm-block-head-left {
  display: flex;
  align-items: center;
  gap: 6px;
}
.pm-block-handle {
  color: #64748b;
  font-size: 14px;
  font-weight: bold;
  cursor: grab;
  padding: 0 3px;
  line-height: 1;
  transition: color 0.15s;
}
.pm-block-item:hover .pm-block-handle {
  color: #38bdf8;
}
.pm-block-pill {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.pm-block-del-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #f87171;
  font-size: 11px;
  font-weight: bold;
  padding: 2px 8px;
  border-radius: 4px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  transition: all 0.15s;
}
.pm-block-del-btn:hover {
  background: rgba(239, 68, 68, 0.4);
  color: #fff;
  border-color: #ef4444;
  transform: scale(1.04);
}
.pm-block-text {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #e2e8f0;
  font-size: 12.5px;
  line-height: 1.6;
  font-family: inherit;
  resize: none;
  box-sizing: border-box;
  overflow: hidden;
  height: auto;
  cursor: text;
}

/* ============================================================
   🆕 2026-09-10 v2:第 10 行"自定义" block (middle column 注入)
   - .pm-block-item.is-user-content-block 紫色虚线
   - .pm-block-edit-btn 编辑按钮(代替删除按钮)
   - .pm-block-user-content-text 只读文本
   ============================================================ */
.pm-block-item.is-user-content-block {
  background: rgba(168, 85, 247, 0.06);
  border-style: dashed;
  border-width: 1.5px;
}
.pm-block-item.is-user-content-block:hover {
  background: rgba(168, 85, 247, 0.1);
}
.pm-block-item.is-user-content-block .pm-block-pill {
  font-weight: 700;
  letter-spacing: 0.3px;
}

.pm-block-edit-btn {
  flex-shrink: 0;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.4);
  color: #c084fc;
  font-size: 11.5px;
  font-weight: 500;
  padding: 4px 10px;
  border-radius: 5px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s ease;
  letter-spacing: 0.2px;
}
.pm-block-edit-btn:hover {
  background: rgba(168, 85, 247, 0.25);
  border-color: rgba(168, 85, 247, 0.7);
  color: #d8b4fe;
  transform: translateY(-1px);
}
.pm-block-edit-btn:active {
  transform: translateY(0);
}

.pm-block-user-content-text {
  padding: 10px 12px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #e2e8f0;
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(15, 23, 42, 0.5);
  border-radius: 4px;
  border-left: 3px solid #a855f7;
  margin-top: 2px;
  max-height: 200px;
  overflow-y: auto;
}

/* 右侧栏 */
.pm-side-col {
  display: flex; flex-direction: column; gap: 14px;
}
.pm-camera-options {
  display: flex; flex-direction: column; gap: 8px;
}
.pm-radio-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: rgba(14, 18, 27, 0.7);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 9px; padding: 9px 12px; cursor: pointer;
  transition: all .15s;
}
.pm-radio-card:hover {
  background: rgba(23, 30, 45, 0.85); border-color: rgba(255, 255, 255, 0.18);
}
.pm-radio-card input {
  margin-top: 3px; accent-color: #10b981; cursor: pointer;
}
.pm-rc-info { display: flex; flex-direction: column; gap: 2px; }
.pm-rc-title { font-size: 12px; font-weight: 600; color: #f1f5f9; }
.pm-rc-desc { font-size: 10.5px; color: #94a3b8; line-height: 1.4; }

/* 参数表单 */
.pm-params-form {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
}
.pm-form-row {
  display: flex; flex-direction: column; gap: 4px;
}
.pm-form-row label {
  font-size: 11px; font-weight: 600; color: #94a3b8;
}
.pm-select {
  background: rgba(10, 14, 22, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 7px; padding: 7px 10px;
  color: #e2e8f0; font-size: 11.5px; outline: none; cursor: pointer;
}
.pm-select:focus { border-color: rgba(16, 185, 129, 0.6); }

/* 底栏操作区 */
.pm-footer {
  padding: 14px 24px;
  background: rgba(22, 28, 42, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex; align-items: center; justify-content: space-between;
  flex-shrink: 0;
}
.pm-footer-status {
  display: flex; align-items: center; gap: 8px; font-size: 12px; color: #94a3b8;
}
.pm-pulse-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #10b981;
}
.pm-pulse-dot.is-busy {
  background: #f59e0b; animation: pmPulse 1.2s infinite ease-in-out;
}
@keyframes pmPulse {
  0%, 100% { transform: scale(0.9); opacity: 0.6; }
  50% { transform: scale(1.3); opacity: 1; }
}
.pm-footer-buttons {
  display: flex; align-items: center; gap: 14px;
}
.pm-btn-cancel {
  padding: 10px 20px; border-radius: 10px;
  background: rgba(255, 255, 255, 0.06); border: 1px solid rgba(255, 255, 255, 0.12);
  color: #cbd5e1; font-size: 13px; font-weight: 600; cursor: pointer;
  transition: all .15s;
}
.pm-btn-cancel:hover { background: rgba(255, 255, 255, 0.14); color: #fff; }
.pm-btn-submit {
  position: relative; overflow: hidden;
  padding: 11px 26px; border-radius: 10px;
  background: linear-gradient(135deg, #059669 0%, #10b981 100%);
  border: 1px solid rgba(52, 211, 153, 0.5);
  box-shadow: 0 4px 18px rgba(16, 185, 129, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  color: #ffffff; font-size: 14px; font-weight: 700; letter-spacing: .4px;
  cursor: pointer; display: flex; align-items: center; gap: 8px;
  transition: all .2s;
}
.pm-btn-submit:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  filter: brightness(1.08);
}
.pm-btn-submit:active:not(:disabled) { transform: translateY(1px); }
.pm-btn-submit:disabled {
  opacity: 0.6; cursor: not-allowed; filter: grayscale(0.5);
}
