/* Eagle plugin UI parity */
:root {
  --card-width-val: 104;
  --card-width: calc(var(--card-width-val) * 1px);
  --workspace-title-h: 52px;
  --workspace-pad: 8px;
  --workspace-left-gap: 0px;
  --workspace-stack-gap: 0px;
  --dashboard-pad-y: 10px;
  --dashboard-pad-x: 12px;
  --dashboard-gap: 10px;
  --console-pad-y: 16px;
  --console-pad-x: 16px;
  --console-gap: 16px;
  --workspace-transport-pad-y: 10px;
  --control-size: 32px;
  --timeline-track-h: 228px;
  --workspace-shot-library-w: 400px;
  --workspace-inspector-w: 320px;
  --workspace-shot-library-active-w: var(--workspace-shot-library-w);
  --workspace-inspector-active-w: var(--workspace-inspector-w);
}

:root[data-density='cozy'] {
  --workspace-title-h: 48px;
  --workspace-pad: 5px;
  --workspace-left-gap: 0px;
  --workspace-stack-gap: 0px;
  --dashboard-pad-y: 8px;
  --dashboard-pad-x: 10px;
  --dashboard-gap: 8px;
  --console-pad-y: 12px;
  --console-pad-x: 12px;
  --console-gap: 10px;
  --workspace-transport-pad-y: 8px;
  --control-size: 30px;
  --timeline-track-h: 198px;
  --workspace-shot-library-w: 360px;
  --workspace-inspector-w: 296px;
}

:root[data-density='compact'] {
  --workspace-title-h: 44px;
  --workspace-pad: 4px;
  --workspace-left-gap: 0px;
  --workspace-stack-gap: 0px;
  --dashboard-pad-y: 7px;
  --dashboard-pad-x: 8px;
  --dashboard-gap: 7px;
  --console-pad-y: 10px;
  --console-pad-x: 10px;
  --console-gap: 8px;
  --workspace-transport-pad-y: 6px;
  --control-size: 28px;
  --timeline-track-h: 172px;
  --workspace-shot-library-w: 330px;
  --workspace-inspector-w: 268px;
}

/* Default three-column ratio: video-first, shot library + inspector fixed */
.workspace-left {
  flex: 1 1 0 !important;
  min-width: 0 !important;
}

.workspace-middle {
  flex: 1 1 var(--workspace-shot-library-active-w, var(--workspace-shot-library-w)) !important;
  min-width: var(--workspace-shot-library-active-w, var(--workspace-shot-library-w, 320px)) !important;
  width: auto !important;
  max-width: none;
}

#panel-middle:focus,
.workspace-middle:focus {
  outline: none;
}

.workspace-right {
  width: var(--workspace-inspector-active-w, var(--workspace-inspector-w)) !important;
  flex: 0 0 var(--workspace-inspector-active-w, var(--workspace-inspector-w)) !important;
  margin-left: auto !important;
  max-width: none;
}

/* Left column video viewport: workspace-layout.css */

#ghostVideo,
#sceneProbeVideo {
  position: absolute;
  top: -9999px;
  left: -9999px;
  width: 10px;
  height: 10px;
  opacity: 0.01;
  pointer-events: none;
}

.thumb-preview {
  position: absolute;
  width: 160px;
  height: 90px;
  background: #000;
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  bottom: 12px;
  display: none;
  z-index: 1000;
  pointer-events: none;
  overflow: hidden;
  transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.8);
}

#thumbCanvas {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.thumb-preview .thumb-time {
  position: absolute;
  bottom: 4px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0, 0, 0, 0.7);
  color: #ffcc00;
  font-family: 'SF Mono', monospace;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: bold;
}

.main-app-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.top-export-group {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.top-export-btn {
  height: 28px;
  padding: 0 14px;
  border: 1px solid var(--cg-brand, #a3e635);
  border-radius: var(--cg-radius-sm, 5px);
  background: var(--cg-brand, #a3e635);
  color: #0a0a0c;
  font-size: 12px;
  font-weight: 650;
  cursor: pointer;
  box-shadow: none;
}

.top-export-btn:hover {
  background: var(--cg-brand-hover, #b8f04a);
  border-color: var(--cg-brand-hover, #b8f04a);
}

:root[data-density='compact'] .top-export-btn {
  height: 24px;
  padding: 0 11px;
  font-size: 11px;
}

.export-popout-backdrop {
  display: none !important;
}

.inspector-export-card {
  display: none;
  position: fixed;
  /* Anchor to top-right so the panel covers the title-bar 导出 button. */
  top: 6px;
  right: 12px;
  left: auto;
  transform: none;
  width: min(320px, calc(100vw - 24px)) !important;
  max-height: calc(100vh - 16px);
  z-index: 90003;
  background: #141416 !important;
  border: 1px solid rgba(255, 255, 255, 0.22) !important;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(163, 230, 53, 0.12),
    0 0 0 1px rgba(255, 255, 255, 0.06),
    0 20px 56px rgba(0, 0, 0, 0.62);
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
  isolation: isolate;
}

.inspector-export-card .right-panel-card-head {
  background: #141416 !important;
  border-bottom: 1px solid #252527;
}

.inspector-export-card .inspector-export-dock {
  background: #141416 !important;
}

.inspector-export-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--cg-brand, #a3e635), transparent);
  opacity: 0.9;
  pointer-events: none;
  z-index: 2;
}

.inspector-export-card[hidden] {
  display: none !important;
}

body.export-popout-open .inspector-export-card {
  display: flex;
}

body.export-popout-open .inspector-export-card .inspector-export-dock {
  overflow-y: auto;
  flex: 1 1 auto;
  min-height: 0;
}

/*
 * Export open: demote AI analysis + title-bar export chrome (blur + dim + no pointer).
 * Magazine / timeline / player stay interactive so selection can still change.
 * Web: also demote 安装扩展 / 返回官网 / 说明文案. Inpage: also demote 关闭 (Esc / 面板 × 仍可关).
 */
body.export-popout-open .inspector-ai-card,
body.export-popout-open .top-export-btn,
body.export-popout-open .cutgo-web-title-actions,
body.export-popout-open .cutgo-web-title-note,
html.cutgo-inpage-shell body.export-popout-open .inpage-shell-close {
  position: relative;
  pointer-events: none;
  user-select: none;
  filter: blur(2.5px) brightness(0.42);
  opacity: 0.38;
  transition: opacity 0.15s ease, filter 0.15s ease;
}

body.export-popout-open .inspector-ai-card::after,
body.export-popout-open .top-export-btn::after,
body.export-popout-open .cutgo-web-title-actions::after,
body.export-popout-open .cutgo-web-title-note::after,
html.cutgo-inpage-shell body.export-popout-open .inpage-shell-close::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: rgba(6, 6, 8, 0.62);
  pointer-events: none;
  z-index: 6;
}

.export-popout-close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border: 1px solid #3a3a3c;
  border-radius: 6px;
  background: #1c1c1e;
  color: #d1d1d6;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
}

.export-popout-close:hover {
  color: #fff;
  border-color: #555;
}

:root[data-density='compact'] .inspector-export-card {
  top: 4px;
  right: 8px;
  width: min(300px, calc(100vw - 16px)) !important;
  max-height: calc(100vh - 12px);
}

:root[data-density] .title-bar {
  height: var(--workspace-title-h) !important;
  padding: 0 var(--workspace-pad) !important;
}

.top-left-group {
  gap: 10px;
}

.title-bar-logo {
  display: block;
  height: 22px;
  width: auto;
  max-width: 96px;
  object-fit: contain;
  flex-shrink: 0;
  user-select: none;
  -webkit-user-drag: none;
}

:root[data-density='compact'] .title-bar-logo {
  height: 18px;
  max-width: 80px;
}

:root[data-density='compact'] .top-left-group {
  gap: 8px;
}

:root[data-density] .main-app-wrapper {
  height: calc(100% - var(--workspace-title-h)) !important;
  padding: var(--workspace-pad) !important;
}

:root[data-density] #dropOverlay {
  inset: var(--workspace-title-h) 0 0 0 !important;
}

:root[data-density] .workspace-left {
  gap: var(--workspace-left-gap) !important;
}

:root[data-density] .workspace-transport-stack {
  gap: var(--workspace-stack-gap) !important;
}

:root[data-density] .workspace-left .timeline-container {
  height: var(--timeline-track-h) !important;
}

:root[data-density] .timeline-wrapper .io-duration-float,
:root[data-density] .workspace-left .io-duration-float {
  top: calc(var(--timeline-ruler-h, 20px) + 12px) !important;
  bottom: auto !important;
}

.dashboard .control-console {
  display: grid;
  grid-template-columns: minmax(0, auto) minmax(0, 1fr) minmax(min-content, auto);
  align-items: center;
  background: transparent;
  padding: var(--console-pad-y) var(--console-pad-x);
  border-radius: 0;
  border: none;
  container-type: inline-size;
  container-name: ws-console;
}

.player-wrapper > .dashboard .control-console,
.workspace-left-stage-tail > .dashboard .control-console {
  background: transparent !important;
  border: none !important;
  border-radius: 0 !important;
}

:root[data-density] .dashboard {
  padding: var(--dashboard-pad-y) var(--dashboard-pad-x) !important;
  gap: var(--dashboard-gap) !important;
}

:root[data-density] .player-wrapper > .dashboard,
:root[data-density] .workspace-left-stage-tail > .dashboard {
  padding: 0 !important;
  gap: 0 !important;
}

.dashboard .console-left {
  grid-column: 1;
  justify-self: start;
  display: flex;
  align-items: center;
  min-width: 0;
}

.dashboard .console-right {
  grid-column: 3;
  min-width: 0;
}

.player-timecode {
  white-space: nowrap;
  letter-spacing: 0.03em;
  font-size: 11px;
  font-family: var(--cg-font-timecode, 'SF Pro Text', -apple-system, BlinkMacSystemFont, sans-serif);
  font-variant-numeric: tabular-nums;
  font-feature-settings: 'tnum' 1, 'zero' 0;
  padding: 3px 9px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.player-timecode #curTime {
  color: #d1d1d6;
}

.player-timecode #durTime {
  color: #8e8e93;
}

.player-timecode .timecode-sep {
  color: #555;
  font-weight: 500;
}

.dashboard .console-center {
  grid-column: 2;
  justify-self: center;
  display: flex;
  gap: var(--console-gap);
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  min-width: 0;
  max-width: 100%;
}

.lcd-monitor {
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 11px;
  font-weight: 500;
  background: #0a0a0c;
  padding: 3px 9px;
  border-radius: 6px;
  border: 1px solid #28282a;
  color: #8e8e93;
}

.icon-group-capsule {
  display: flex;
  gap: 4px;
  align-items: center;
  background: #18181a;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid #28282a;
}

.icon-btn {
  position: relative;
  background: transparent;
  border: none;
  color: #8e8e93;
  width: var(--control-size);
  height: var(--control-size);
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
}

.icon-btn svg {
  width: calc(var(--control-size) - 14px);
  height: calc(var(--control-size) - 14px);
  fill: currentColor;
}

.icon-btn.zoom-text-btn {
  font-size: 20px;
  font-weight: bold;
  font-family: monospace;
}

.icon-btn:hover {
  background: #2c2c2e;
  color: #fff;
}

.icon-btn.play-btn {
  /* Same color as siblings; slight scale only for primary affordance */
  transform: scale(1.1);
}

.icon-btn.active-blue {
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
}

.ai-lab-bar {
  background: var(--cg-surface-2, #151517);
  border: none;
  border-radius: 0;
  padding: 6px 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

:root[data-density='cozy'] .ai-lab-bar {
  padding: 6px 10px;
  gap: 8px;
}

:root[data-density='compact'] .ai-lab-bar {
  padding: 5px 8px;
  gap: 7px;
  border-radius: 6px;
}

.ai-config-area {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

:root[data-density='compact'] .ai-config-area {
  gap: 6px;
}

.ai-title {
  color: var(--cg-text, rgba(245, 245, 247, 0.94));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

:root[data-density='compact'] .ai-title {
  font-size: 12px;
}

#scoutBtn {
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.14));
  color: var(--cg-brand, #a3e635);
  font-weight: 650;
  border: 1px solid rgba(163, 230, 53, 0.45);
  padding: 6px 14px;
  font-size: 11px;
  border-radius: 5px;
  cursor: pointer;
}

:root[data-density='compact'] #scoutBtn,
:root[data-density='compact'] .premium-btn {
  padding: 5px 10px;
  font-size: 10px;
}

#scoutBtn:disabled {
  background: #2c2c2e;
  border-color: #3a3a3c;
  color: #555;
  cursor: not-allowed;
}

#scoutResultText {
  color: #8e8e93;
  font-size: 11px;
  margin-left: 8px;
  display: none;
}

#scoutCount {
  color: #fff;
  font-weight: bold;
}

#scoutResetBtn {
  display: none;
  height: 24px;
  width: 24px;
  padding: 0;
  margin-left: 4px;
}

.ai-action-group {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

:root[data-density='compact'] .ai-action-group {
  gap: 6px;
}

.premium-btn {
  background: #2c2c2e;
  color: #d1d1d6;
  border: 1px solid #3a3a3c;
  padding: 6px 14px;
  font-size: 11px;
  border-radius: 5px;
  cursor: pointer;
  white-space: nowrap;
}

.premium-btn:disabled {
  color: #555;
  border-color: #333;
  cursor: not-allowed;
}

/* Shot library empty state — centered in panel, visible on open */
.selection-wrapper {
  position: relative;
}

#shotList.shot-list.is-empty {
  display: flex !important;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  min-height: 100%;
  padding: 0 16px 0 20px;
  box-sizing: border-box;
}

.mag-empty-state {
  padding: 0 16px;
  color: #8e8e93;
  user-select: none;
  text-align: left;
  width: 100%;
  max-width: 300px;
  box-sizing: border-box;
  background: transparent;
}

.mag-empty-state.mag-empty-filtered {
  padding: 12px 14px;
}

.mag-empty-title {
  font-size: 11px;
  font-weight: 600;
  color: #a1a1a6;
  letter-spacing: 0.2px;
  margin: 0 0 8px;
}

.mag-empty-panel {
  background: rgba(255, 255, 255, 0.02);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 6px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mag-empty-line {
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.65;
}

.mag-kbd {
  display: inline-block;
  background: #2c2c2e;
  padding: 1px 5px;
  border-radius: 3px;
  color: #d1d1d6;
  border: 1px solid #3a3a3c;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.4;
  vertical-align: baseline;
}

.mag-empty-footer {
  margin-top: 8px;
  font-size: 10px;
  color: #555;
  line-height: 1.45;
  letter-spacing: 0.1px;
}

@keyframes shot-incoming-flash {
  0%,
  100% {
    border-color: #28282a;
    box-shadow: none;
    background: #1e1e20;
  }
  18%,
  55% {
    border-color: var(--cg-brand, #a3e635);
    box-shadow: inset 0 0 0 1px var(--cg-brand-line, rgba(163, 230, 53, 0.32));
    background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  }
}

.shot-item.shot-incoming-flash {
  animation: shot-incoming-flash 1.25s ease-out;
}

.shot-list.list-mode .shot-item.shot-incoming-flash {
  animation: shot-incoming-flash 1.25s ease-out;
}

/* Shot library */
.workspace-middle {
  display: flex;
  flex-direction: column;
  min-height: 0;
  min-width: var(--workspace-shot-library-w);
}

.right-panel-header {
  flex-shrink: 0;
  z-index: 30;
}

.selection-wrapper {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 覆盖 workspace.css 中错误的 .shot-list 横向 grid */
#shotList.shot-list,
.right-panel-scroll.shot-list {
  display: block !important;
  grid-template-columns: unset !important;
  gap: 0 !important;
  padding: 0 8px 8px !important;
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  background: var(--cg-surface, #141416);
}

#shotList.shot-list,
.right-panel-scroll,
.inspector-body,
.selection-wrapper {
  scrollbar-width: thin;
  scrollbar-color: #3a3a3c transparent;
}

#shotList.shot-list::-webkit-scrollbar,
.right-panel-scroll::-webkit-scrollbar,
.inspector-body::-webkit-scrollbar,
.selection-wrapper::-webkit-scrollbar {
  width: 5px;
  height: 5px;
}

#shotList.shot-list::-webkit-scrollbar-track,
.right-panel-scroll::-webkit-scrollbar-track,
.inspector-body::-webkit-scrollbar-track {
  background: transparent;
}

#shotList.shot-list::-webkit-scrollbar-thumb,
.right-panel-scroll::-webkit-scrollbar-thumb,
.inspector-body::-webkit-scrollbar-thumb {
  background: rgba(58, 58, 60, 0.85);
  border-radius: 999px;
}

#shotList.shot-list::-webkit-scrollbar-thumb:hover,
.right-panel-scroll::-webkit-scrollbar-thumb:hover,
.inspector-body::-webkit-scrollbar-thumb:hover {
  background: #555;
}

.shot-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 8px;
}

.group-header {
  padding: 10px 14px;
  background: var(--cg-surface-2, #1c1c1e);
  color: #d1d1d6;
  font-size: 12px;
  font-weight: bold;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  border-top: 1px solid #28282a;
  border-bottom: 1px solid #28282a;
  /* No sticky — avoids title floating over thumbs while scrolling */
  position: relative;
  top: auto;
  z-index: 1;
  margin-top: 0;
  box-shadow: none;
}

.group-content {
  padding: 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(calc(var(--card-width-val, 96) * 1px), 1fr));
  gap: var(--shot-grid-gap, 8px);
  align-content: flex-start;
}

.group-content.is-collapsed {
  display: none !important;
}

.shot-collection-grid {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 8px;
  padding: 4px 6px 10px !important;
  grid-template-columns: none !important;
}

/* 分镜入口卡：缩略图 + 标题/操作右对齐，按内容收窄 */
.shot-item.shot-collection-row {
  display: flex !important;
  flex-direction: row !important;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  width: max-content;
  max-width: 100%;
  min-width: 0;
  padding: 6px 10px 6px 6px;
  background: #18181a !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
  border-width: 1px !important;
  border-radius: 10px !important;
  box-sizing: border-box;
}

.shot-item.shot-collection-row:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #1c1c1e !important;
}

.shot-item.shot-collection-row.selected {
  border-color: var(--cg-brand, #a3e635) !important;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12)) !important;
  box-shadow: inset 0 0 0 1px var(--cg-brand-line, rgba(163, 230, 53, 0.32));
}

.shot-item.shot-collection-row .shot-thumb-container {
  position: relative;
  width: clamp(72px, calc(var(--card-width-val, 104) * 0.92 * 1px), 180px);
  height: clamp(50px, calc(var(--card-width-val, 104) * 0.65 * 1px), 128px);
  flex: 0 0 auto;
  margin: 0;
  border-radius: 7px;
  overflow: hidden;
  background: #0a0a0b;
  align-self: center;
}

.shot-item.shot-collection-row .shot-thumb {
  position: absolute;
  left: 5%;
  top: 7%;
  width: 90%;
  height: 86%;
  object-fit: cover;
  object-position: center 55%;
  border-radius: 3px;
  pointer-events: none;
}

.shot-item.shot-collection-row .ai-badge,
.shot-item.shot-collection-row .fav-indicator {
  display: none;
}

.shot-item.shot-collection-row .batch-select-check {
  top: 3px;
  left: 3px;
  z-index: 3;
}

.shot-collection-meta {
  flex: 0 0 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding: 4px 0 2px;
  gap: 16px;
  width: max-content;
}

.shot-collection-title {
  flex: 0 0 auto;
  min-width: 0;
  color: #a1a1a6;
  font-size: clamp(11px, calc(var(--card-width-val, 104) * 0.125 * 1px), 16px);
  font-weight: 500;
  line-height: 1.2;
  white-space: nowrap;
  text-align: left;
  letter-spacing: 0.01em;
}

.shot-collection-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  gap: 0;
}

.shot-collection-btn {
  height: auto;
  padding: 0 !important;
  border-radius: 0;
  font-size: clamp(11px, calc(var(--card-width-val, 104) * 0.115 * 1px), 14px);
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
}

.shot-collection-btn.is-open {
  border: none !important;
  background: transparent !important;
  color: var(--cg-brand, #a3e635) !important;
  box-shadow: none !important;
}

.shot-collection-btn.is-open:hover {
  color: var(--cg-brand-hover, #b8f04a) !important;
  background: transparent !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shot-collection-btn.is-download {
  border: none !important;
  background: transparent !important;
  color: #6e6e73 !important;
  font-weight: 500;
  box-shadow: none !important;
}

.shot-collection-btn.is-download:hover {
  color: #d1d1d6 !important;
  background: transparent !important;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.shot-group.is-entry-group > .group-header,
.shot-group.is-inventory-group > .group-header {
  margin-top: 4px;
  padding: 8px 8px 6px;
  background: transparent;
  color: #d1d1d6;
  font-size: 11px;
  font-weight: 650;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  border-bottom: none;
  box-shadow: none;
}

.shot-group.is-entry-group:first-child > .group-header {
  margin-top: 0;
  border-top: none;
  padding-top: 8px;
}

.group-header-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.group-header-right {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  flex: 0 0 auto;
  margin-left: 10px;
}

.group-select-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-right: 2px;
}

.group-select-actions[hidden] {
  display: none !important;
}

.group-select-link {
  border: none;
  background: transparent;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
  padding: 3px 5px;
  margin: -3px 0;
  cursor: pointer;
  border-radius: 4px;
}

.group-select-link:hover {
  color: #a1a1a6;
}

.shot-list.list-mode .group-content {
  grid-template-columns: none;
}

.shot-list.list-mode .group-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 8px;
}

.shot-list.list-mode .group-content.shot-collection-grid {
  display: flex !important;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px;
  padding: 4px 6px !important;
}

.selection-marquee {
  display: none;
  position: fixed;
  z-index: 99990;
  border: 1px solid rgba(10, 132, 255, 0.9);
  background: rgba(10, 132, 255, 0.12);
  pointer-events: none;
}

.shot-item.marquee-hit {
  outline: 1px dashed rgba(10, 132, 255, 0.8);
  outline-offset: -1px;
}

.shot-item.seq-playing {
  border-color: #0a84ff;
  box-shadow: 0 0 0 1px rgba(10, 132, 255, 0.5);
}

.shot-item {
  background: #1e1e20;
  border: 2px solid #28282a;
  border-radius: 8px;
  padding: 6px;
  cursor: pointer;
  width: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  transition: all 0.15s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.shot-item.selected {
  border-color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  box-shadow: inset 0 0 0 1px var(--cg-brand-line, rgba(163, 230, 53, 0.32));
}

.batch-select-mode .shot-item.selected {
  border-color: #28282a;
  background: #1e1e20;
}

.batch-select-check {
  position: absolute;
  top: 5px;
  left: 5px;
  width: 16px;
  height: 16px;
  z-index: 21;
  border-radius: 50%;
  border: 1.5px solid rgba(255, 255, 255, 0.78);
  background: rgba(0, 0, 0, 0.28);
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  color: #fff;
  box-sizing: border-box;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.batch-select-mode .batch-select-check {
  display: flex;
}

.batch-select-check:hover {
  border-color: rgba(255, 255, 255, 0.95);
}

.batch-select-check.active {
  background: var(--cg-brand, #a3e635);
  border-color: var(--cg-brand, #a3e635);
  color: #0a0a0c;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

.batch-select-check svg {
  width: 11px;
  height: 11px;
  display: block;
}

.batch-select-check.active svg {
  filter: drop-shadow(0 0 0.5px rgba(0, 0, 0, 0.4));
}

.batch-select-entry {
  height: 26px;
  padding: 0 10px;
  border-radius: 4px;
  border: 1px solid #3a3a3c;
  background: #2c2c2e;
  color: #d1d1d6;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.batch-select-entry:hover {
  background: #343436;
  color: #f5f5f7;
}

.batch-select-entry.active {
  border-color: #0a84ff;
  color: #0a84ff;
  background: rgba(10, 132, 255, 0.12);
}

.list-mode .batch-select-check {
  width: 14px;
  height: 14px;
  top: 3px;
  left: 3px;
  border-width: 1px;
}

.list-mode .batch-select-check svg {
  width: 8px;
  height: 8px;
}

.shot-thumb-container {
  position: relative;
  width: 100%;
  aspect-ratio: 16/9;
  border-radius: 4px;
  overflow: hidden;
  background: #000;
}

.shot-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
  transition: opacity 0.12s ease;
}

.shot-hover-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
  z-index: 10;
  pointer-events: none;
  border-radius: inherit;
  background: #000;
}

.shot-index-badge {
  position: absolute;
  top: 4px;
  left: 4px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 9px;
  font-family: 'SF Mono', monospace;
  font-weight: 700;
  padding: 2px 5px;
  border-radius: 3px;
  z-index: 12;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.ai-badge {
  position: absolute;
  bottom: 4px;
  left: 4px;
  top: auto;
  background: rgba(0, 0, 0, 0.65);
  color: #34c759;
  font-size: 9px;
  font-family: 'SF Mono', monospace;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 15;
}

.fav-indicator {
  /*
   * Size/inset relative to the rendered thumb box — not --card-width-val.
   * Grid thumbs jump in column steps; linear slider binding made the star
   * grow while the picture stayed put.
   * (margin % is always vs containing-block width → equal top/right inset)
   */
  --fav-pad: clamp(2px, 4.5%, 8px);
  --fav-size: clamp(10px, 15%, 28px);
  position: absolute;
  top: 0;
  right: 0;
  margin: var(--fav-pad) var(--fav-pad) 0 0;
  width: var(--fav-size);
  height: var(--fav-size);
  z-index: 20;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  opacity: 0.68;
  transition: opacity 0.18s ease, color 0.18s ease;
}

.shot-thumb-container:hover .fav-indicator {
  opacity: 1;
  color: rgba(255, 255, 255, 0.95);
}

.fav-indicator.active {
  color: #ffd60a;
  opacity: 1;
  filter: drop-shadow(0 0 1px rgba(0, 0, 0, 0.45));
}

.fav-indicator svg {
  width: 100%;
  height: 100%;
  display: block;
}

.fav-indicator:not(.active) svg path {
  fill: none;
  stroke: currentColor;
}

.fav-indicator.active svg path {
  fill: currentColor;
  stroke: none;
}

.inspector-fav-star {
  position: absolute;
  z-index: 12;
  top: 8px;
  right: 8px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: none;
  background: rgba(0, 0, 0, 0.38);
  border-radius: 5px;
  color: rgba(255, 255, 255, 0.72);
  cursor: pointer;
  opacity: 0.62;
  transition: opacity 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.inspector-fav-star svg {
  width: 100%;
  height: 100%;
  display: block;
}

.inspector-preview-box:hover .inspector-fav-star {
  opacity: 1;
  color: rgba(255, 255, 255, 0.98);
}

.inspector-fav-star.active {
  color: #ffd60a;
  opacity: 1;
  background: rgba(0, 0, 0, 0.5);
}

.shot-group.is-focus-scope > .group-header {
  color: #e5e5ea;
}

.shot-meta-bottom {
  display: flex;
  flex-direction: column;
  margin-top: 5px;
  gap: 2px;
}

.shot-meta-bottom.single-row {
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.shot-meta-bottom.single-row .meta-dur {
  flex-shrink: 0;
}

.meta-row-1 {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  gap: 6px;
}

.meta-tag {
  color: #8e8e93;
  font-family: 'SF Mono', Consolas, monospace;
  font-weight: 500;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
  text-align: left;
}

.meta-dur {
  color: #8e8e93;
  font-family: 'SF Mono', Consolas, monospace;
  font-weight: 400;
  font-size: 10px;
  flex-shrink: 0;
  text-align: right;
}

.meta-row-2 {
  color: #6e6e73;
  font-family: 'SF Mono', Consolas, monospace;
  font-size: 9px;
  font-weight: 400;
}

/* 批量处理：纯色遮罩，避免虚化视频卡顿 */
.loading {
  background: rgba(10, 10, 12, 0.94) !important;
  backdrop-filter: none !important;
}

body.is-processing #video {
  visibility: hidden;
}

body.is-processing #playerBox::after {
  content: '';
  position: absolute;
  inset: 0;
  background: #0a0a0c;
  z-index: 4;
  border-radius: inherit;
}

.list-mode .shot-meta-bottom {
  display: none;
}

.list-mode .shot-list-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  overflow: hidden;
}

.list-mode .list-title {
  color: #c7c7cc;
  font-size: clamp(9px, calc(var(--card-width-val, 104) * 0.105 * 1px), 15px);
  font-weight: 500;
  font-family: 'SF Mono', Consolas, monospace;
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

.list-mode .list-desc {
  color: #6e6e73;
  font-size: clamp(8px, calc(var(--card-width-val, 104) * 0.086 * 1px), 12px);
  font-weight: 400;
  font-family: 'SF Mono', Consolas, monospace;
  display: flex;
  gap: clamp(8px, calc(var(--card-width-val, 104) * 0.115 * 1px), 16px);
}

.list-mode .shot-item {
  flex-direction: row;
  align-items: center;
  max-width: none;
  border-radius: 0;
  border: none;
  border-bottom: 1px solid #28282a;
  background: transparent;
  padding: clamp(2px, calc(var(--card-width-val, 104) * 0.04 * 1px), 8px) 8px;
  gap: 0;
}

.list-mode .shot-thumb-container {
  /* Track「大小」slider: ~0.7× card width, keep 16:9 */
  width: clamp(48px, calc(var(--card-width-val, 104) * 0.7 * 1px), 168px);
  height: auto;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  margin-right: clamp(8px, calc(var(--card-width-val, 104) * 0.115 * 1px), 16px);
}

.view-toggle-group {
  display: flex;
  gap: 4px;
}

.view-btn {
  background: transparent;
  border: 1px solid #3a3a3c;
  color: #8e8e93;
  width: 28px;
  height: 26px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.view-btn.active {
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  color: var(--cg-brand, #a3e635);
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.32));
}

.scale-control {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.scale-control span {
  color: #8e8e93;
  font-size: 10px;
  white-space: nowrap;
}

.scale-control input {
  width: 70px;
  accent-color: var(--cg-brand, #a3e635);
}

.scale-control input.ws-card-scale-range {
  --scale-fill: 24%;
  width: var(--ws-ai-slider, 88px);
  height: 14px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  flex-shrink: 0;
  outline: none;
}

.scale-control input.ws-card-scale-range:focus,
.scale-control input.ws-card-scale-range:focus-visible {
  outline: none;
  box-shadow: none;
}

.scale-control input.ws-card-scale-range::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 0;
  background: linear-gradient(
    to right,
    var(--cg-brand, #a3e635) 0%,
    var(--cg-brand, #a3e635) var(--scale-fill, 24%),
    rgba(255, 255, 255, 0.14) var(--scale-fill, 24%),
    rgba(255, 255, 255, 0.14) 100%
  );
}

.scale-control input.ws-card-scale-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 11px;
  height: 11px;
  margin-top: -3.5px;
  border: 0;
  border-radius: 50%;
  background: var(--cg-brand, #a3e635);
  box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.88);
}

.scale-control input.ws-card-scale-range::-moz-range-track {
  height: 4px;
  border-radius: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.14);
}

.scale-control input.ws-card-scale-range::-moz-range-progress {
  height: 4px;
  border-radius: 0;
  background: var(--cg-brand, #a3e635);
}

.scale-control input.ws-card-scale-range::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border: 0;
  border-radius: 50%;
  background: var(--cg-brand, #a3e635);
  box-shadow: 0 0 0 2px rgba(10, 10, 12, 0.88);
}

/* AI Inspector panel */
.workspace-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
  background: #121212;
  padding: 8px 8px 4px;
  gap: 6px;
}

:root[data-density='compact'] .workspace-right {
  padding: 6px 6px 3px;
  gap: 5px;
}

.right-panel-card {
  background: #141416;
  border: 1px solid #2c2c2e;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.inspector-ai-card {
  flex: 1 1 0;
  min-height: 0;
}

.right-panel-card-head {
  flex-shrink: 0;
  padding: 10px 14px 8px;
  border-bottom: 1px solid #252527;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

:root[data-density='compact'] .right-panel-card-head {
  padding: 8px 10px 7px;
}

.right-panel-card-title {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  color: #f2f2f7;
  letter-spacing: -0.01em;
}

.inspector-body {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  background: transparent;
  gap: 0;
}

:root[data-density='compact'] .inspector-body {
  padding: 8px 10px 10px;
}

/* 空态 / 选中态共用详情骨架（方案 C：无缩略图；画面描述用分镜台 D 壳） */
.inspector-body.is-empty-only .inspect-empty,
.inspector-body.is-empty-only #inspectEmpty,
.inspector-body.has-detail .inspect-empty,
.inspector-body.has-detail #inspectEmpty {
  display: none !important;
}

.inspector-body.is-empty-only .inspector-detail-state,
.inspector-body.is-empty-only #inspectDetail,
.inspector-body.has-detail .inspector-detail-state,
.inspector-body.has-detail #inspectDetail {
  display: flex !important;
  flex-direction: column;
  gap: 16px;
  flex: 1 1 auto;
  min-height: 0;
  width: 100%;
  overflow-y: auto;
  align-self: flex-start;
}

.inspector-body.is-empty-only .inspector-preview-box,
.inspector-body.is-empty-only #inspectPreviewBox {
  display: none !important;
}

.inspector-body.is-empty-only .inspector-meta-block {
  padding-top: 2px;
  padding-bottom: 10px;
}

.inspector-empty-hint-row .inspector-empty-title {
  color: #d1d1d6;
  font-weight: 650;
}

.inspector-body.is-empty-only .ai-magic-btn {
  background: transparent;
  border: 1px solid rgba(163, 230, 53, 0.28);
  color: rgba(163, 230, 53, 0.55);
  cursor: not-allowed;
  opacity: 1;
  filter: none;
}

.inspector-body.is-empty-only .ai-magic-btn:hover {
  background: transparent;
  filter: none;
}

.inspector-empty {
  flex: 1;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #8e8e93;
  font-size: 12px;
  gap: 16px;
  padding: 24px;
}

.inspector-detail-state {
  display: none;
  flex-direction: column;
  gap: 16px;
  width: 100%;
}

.inspector-export-dock {
  flex: 0 0 auto;
  padding: 10px 14px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow: visible;
}

:root[data-density='compact'] .inspector-export-dock {
  padding: 8px 10px 10px;
  gap: 10px;
}

.export-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}

.export-field-label {
  color: #8e8e93;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.2;
}

.export-scope-select {
  height: 32px;
}

.export-panel-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -2px 0 0;
  color: #8e8e93;
  font-size: 11px;
  cursor: pointer;
  user-select: none;
}

.export-panel-check input {
  margin: 0;
  accent-color: var(--cg-brand, #a3e635);
}

.export-secondary-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding-top: 2px;
}

.export-secondary-link {
  border: none;
  background: transparent;
  color: #6e6e73;
  font-size: 11px;
  font-weight: 500;
  padding: 0;
  cursor: pointer;
}

.export-secondary-link:hover:not(:disabled) {
  color: #aeaeb2;
}

.export-secondary-link:disabled {
  opacity: 0.38;
  cursor: not-allowed;
}

.export-dock-rule {
  border: 0;
  height: 1px;
  margin: 0;
  background: #252527;
  flex-shrink: 0;
}

.export-scope-list .export-dock-rule {
  margin: 4px 0 2px;
}

.export-scope-list {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.export-scope-option {
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 26px;
  padding: 3px 6px;
  border-radius: 6px;
  cursor: pointer;
  user-select: none;
}

:root[data-density='compact'] .export-scope-option {
  min-height: 22px;
  padding: 2px 5px;
  gap: 6px;
}

:root[data-density='compact'] .export-dock-select,
:root[data-density='compact'] .export-path-btn,
:root[data-density='compact'] .export-deliverable-btn {
  height: 26px;
  font-size: 10px;
}

:root[data-density='compact'] .export-path-line {
  gap: 6px;
}

:root[data-density='compact'] .export-dock-primary {
  min-height: 32px;
  padding: 6px 8px;
  font-size: 11px;
}

.export-scope-option:hover:not(:has(input:disabled)) {
  background: rgba(255, 255, 255, 0.04);
}

.export-scope-option:has(input:checked) {
  background: rgba(10, 132, 255, 0.12);
}

.export-scope-option:has(input:disabled) {
  opacity: 0.38;
  cursor: not-allowed;
}

.export-scope-option input {
  margin: 0;
  accent-color: #0a84ff;
}

.export-scope-text {
  color: #e5e5ea;
  font-size: 11px;
  line-height: 1.3;
}

.export-scope-count {
  color: #8e8e93;
  font-size: 10px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  white-space: nowrap;
}

.export-param-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.export-param-grid .export-field {
  gap: 6px;
}

.export-param-cell.is-disabled .export-field-label {
  opacity: 0.55;
}

.export-param-cell {
  display: block;
  min-width: 0;
}

.export-param-cell[hidden] {
  display: none;
}

.export-dock-select {
  width: 100%;
  height: 32px;
  border-radius: 6px;
  border: 1px solid #3a3a3c;
  background: #121212;
  color: #e5e5ea;
  font-size: 11px;
  padding: 0 8px;
  outline: none;
}

.export-dock-select:focus,
.export-dock-select:focus-visible {
  border-color: var(--cg-brand, #a3e635);
  box-shadow: 0 0 0 2px var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
}

.export-dock-select:disabled,
.export-dock-select option:disabled {
  color: #666;
  opacity: 0.72;
  cursor: not-allowed;
}

.export-path-line {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.export-path-field {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  min-height: 32px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid #3a3a3c;
  background: #121212;
  box-sizing: border-box;
}

.export-path-label {
  flex: 1;
  min-width: 0;
  color: #e5e5ea;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-path-btn {
  height: 32px;
  padding: 0 10px;
  border-radius: 6px;
  border: 1px solid #3a3a3c;
  background: #121212;
  color: #d1d1d6;
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
  box-sizing: border-box;
  outline: none;
}

.export-path-btn:focus,
.export-path-btn:focus-visible {
  border-color: var(--cg-brand, #a3e635);
  box-shadow: 0 0 0 2px var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
}

.export-path-btn:hover {
  border-color: #555;
  color: #fff;
}

.export-deliverable-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.export-dock-primary {
  width: 100%;
  min-height: 40px;
  border: 1px solid rgba(163, 230, 53, 0.55);
  border-radius: 8px;
  background: var(--cg-brand, #a3e635);
  color: #0a0a0c;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  padding: 10px 12px;
  cursor: pointer;
  margin-top: 2px;
}

.export-dock-primary:hover:not(:disabled) {
  background: var(--cg-brand-hover, #b8f04a);
  box-shadow: 0 0 14px rgba(163, 230, 53, 0.28);
}

.export-dock-primary:disabled {
  background: #2c2c2e;
  color: #666;
  cursor: not-allowed;
}

.export-dock-primary.is-complete {
  background: #248a3d;
}

.export-dock-primary.is-failed {
  background: #8b2e2e;
}

.export-complete-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  margin-top: -2px;
  padding: 6px 8px;
  border: 1px solid rgba(52, 199, 89, 0.28);
  border-radius: 6px;
  background: rgba(52, 199, 89, 0.07);
}

.export-complete-row[hidden] {
  display: none;
}

.export-complete-path {
  flex: 1;
  min-width: 0;
  color: #d1d1d6;
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.export-open-folder-btn {
  height: 26px;
  border-radius: 6px;
  border: 1px solid rgba(52, 199, 89, 0.34);
  background: rgba(52, 199, 89, 0.12);
  color: #b8f3c7;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
  flex-shrink: 0;
}

.export-open-folder-btn:hover:not(:disabled) {
  border-color: rgba(52, 199, 89, 0.62);
  color: #fff;
}

.export-open-folder-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.export-deliverable-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.export-deliverable-row .export-deliverable-btn {
  width: 100%;
}

.inspector-preview-box {
  width: 100%;
  aspect-ratio: 16 / 9;
  flex-shrink: 0;
  position: relative;
  background: #000;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #28282a;
}

.inspector-preview-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.inspector-meta-block {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-bottom: 12px;
  border-bottom: 1px solid #28282a;
  flex-shrink: 0;
}

.inspector-ai-advanced {
  display: flex;
  flex-direction: column;
  gap: 0;
  flex-shrink: 0;
}

.inspector-collapse-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  margin: 0;
  padding: 8px 10px;
  border: 1px solid #2c2c2e;
  border-radius: 6px;
  background: #1c1c1e;
  color: #8e8e93;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.inspector-collapse-toggle:hover {
  background: #242426;
  color: #d1d1d6;
  border-color: #3a3a3c;
}

.inspector-collapse-toggle.is-expanded {
  border-bottom-left-radius: 0;
  border-bottom-right-radius: 0;
  border-bottom-color: transparent;
  color: #d1d1d6;
}

.inspector-collapse-title-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px;
  min-width: 0;
  text-align: left;
}

.inspector-collapse-title {
  font-weight: 600;
  color: #d1d1d6;
}

.inspector-collapse-hint {
  font-size: 10px;
  font-weight: 400;
  color: #6e6e73;
}

.inspector-collapse-toggle:hover .inspector-collapse-hint {
  color: #8e8e93;
}

.inspector-collapse-chevron {
  font-size: 10px;
  opacity: 0.85;
}

.inspector-ai-query-preview {
  display: none !important;
}

.inspector-collapse-panel {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border: 1px solid #2c2c2e;
  border-top: none;
  border-radius: 0 0 6px 6px;
  background: #18181a;
}

.inspector-collapse-panel.is-open {
  display: flex;
}

.inspector-collapse-panel[hidden] {
  display: none !important;
}

.inspector-textarea-compact {
  min-height: 88px;
}

.ai-magic-btn {
  background: var(--cg-brand, #a3e635);
  border: none;
  border-radius: 8px;
  color: #0a0a0c;
  font-weight: 650;
  font-size: 13px;
  padding: 10px 0;
  width: 100%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: background 0.2s ease, filter 0.2s ease;
  box-shadow: none;
  flex-shrink: 0;
}

.ai-magic-btn:hover {
  filter: brightness(1.06);
  background: var(--cg-brand-hover, #b8f04a);
  transform: none;
  box-shadow: none;
}

.ai-magic-btn:disabled {
  cursor: not-allowed;
}

.inspector-label-hint {
  font-weight: normal;
  font-size: 10px;
  color: #555;
}

/* 画面描述：对齐分镜台（标题 + 复制 + 软壳） */
.inspector-desc-shell {
  flex: 1 1 auto;
  min-height: 88px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px 12px 0;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.3);
  border: 0;
  overflow: visible;
}

.inspector-desc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 22px;
}

.inspector-desc-label {
  margin: 0;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 0.04em;
  color: #8e8e93;
}

.inspector-desc-copy {
  height: 22px;
  padding: 0 8px;
  border-radius: 6px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #d1d1d6;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
  line-height: 1;
  flex: 0 0 auto;
}

.inspector-desc-copy:hover {
  border-color: rgba(163, 230, 53, 0.45);
  color: #a3e635;
  background: rgba(163, 230, 53, 0.08);
}

.inspector-desc-copy:disabled {
  opacity: 0.4;
  cursor: default;
  pointer-events: none;
}

.inspector-textarea.inspector-desc-edit {
  flex: 1 1 auto;
  min-height: 72px;
  min-width: 0;
  margin: 0;
  padding: 4px 2px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: rgba(245, 245, 247, 0.95);
  font-size: 13px;
  line-height: 1.5;
  resize: none;
  overflow: auto;
  box-shadow: none;
}

.inspector-textarea.inspector-desc-edit:focus,
.inspector-textarea.inspector-desc-edit:focus-visible {
  border-color: transparent;
  box-shadow: none;
  color: #f5f5f7;
}

.inspector-desc-shell.is-empty .inspector-desc-edit {
  color: #8e8e93;
}

.inspector-section {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex-shrink: 0;
}

.inspector-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  color: #8e8e93;
}

.inspector-info-val {
  color: #d1d1d6;
  font-family: 'SF Mono', monospace;
}

.inspector-action-btn {
  width: 100%;
  padding: 6px 10px !important;
  font-size: 11px !important;
  font-weight: 500;
  line-height: 1.2;
  min-height: 28px;
  box-sizing: border-box;
}

.inspector-action-btn.danger {
  color: #ff453a !important;
  border-color: rgba(255, 69, 58, 0.45) !important;
}

.inspector-action-btn.danger:hover {
  background: rgba(255, 69, 58, 0.12) !important;
}

.inspector-label {
  color: #8e8e93;
  font-size: 11px;
  display: block;
  margin-bottom: 6px;
}

.inspector-textarea,
.inspector-name-input,
.tag-input {
  width: 100%;
  background: #1c1c1e;
  border: 1px solid #28282a;
  color: #d1d1d6;
  border-radius: 6px;
  padding: 8px;
  font-size: 12px;
  box-sizing: border-box;
  outline: none;
}

.inspector-textarea:focus,
.inspector-textarea:focus-visible,
.inspector-name-input:focus,
.inspector-name-input:focus-visible,
.tag-input:focus,
.tag-input:focus-visible {
  border-color: #0a84ff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.12);
}

.inspector-textarea {
  min-height: 120px;
  height: auto;
  resize: none;
  overflow: hidden;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}

#inspectDesc.inspector-textarea {
  min-height: 72px;
}

.inspector-tags-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 32px;
  align-items: center;
  background: #1c1c1e;
  border: 1px solid #28282a;
  border-radius: 6px;
  padding: 6px 8px;
  transition: border-color 0.2s;
}

.inspector-tags-container:focus-within {
  border-color: #0a84ff;
  box-shadow: 0 0 0 2px rgba(10, 132, 255, 0.1);
}

.inspector-tags-container .tag-input {
  background: transparent;
  border: none;
  padding: 2px 0;
  flex: 1;
  min-width: 60px;
}

.inspector-tags-container .tag {
  background: #2c2c2e;
  color: #d1d1d6;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  cursor: pointer;
}

.inspector-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.inspector-actions .inspector-action-btn {
  flex: 1;
}

/* Footer shortcuts — always visible; density only adjusts size/spacing */
.footer-shortcuts {
  flex-shrink: 0;
  background: var(--program-chrome-bg, #101012);
  border: 1px solid var(--cg-line, rgba(255, 255, 255, 0.09));
  padding: 7px 14px;
  display: flex;
  align-items: center;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  white-space: nowrap;
  scrollbar-width: thin;
}

.footer-shortcuts::-webkit-scrollbar {
  height: 4px;
}

.footer-shortcuts::-webkit-scrollbar-thumb {
  background: #3a3a3c;
  border-radius: 4px;
}

.footer-shortcuts > .shortcut-group,
.footer-shortcuts > .shortcut-divider {
  opacity: 0.5;
  flex-shrink: 0;
  transition: opacity 0.25s ease;
}

.footer-shortcuts:hover > .shortcut-group,
.footer-shortcuts:hover > .shortcut-divider {
  opacity: 1;
}

:root[data-density='cozy'] .footer-shortcuts {
  padding: 5px 10px;
}

:root[data-density='compact'] .footer-shortcuts {
  min-height: 28px;
  padding: 4px 8px;
}

:root[data-density='compact'] .shortcut-group {
  gap: 6px;
}

:root[data-density='compact'] .group-label {
  font-size: 8px;
}

:root[data-density='compact'] .shortcut-item {
  font-size: 9px;
  gap: 3px;
}

:root[data-density='compact'] .shortcut-item kbd {
  font-size: 8px;
  padding: 1px 3px;
}

:root[data-density='compact'] .shortcut-divider {
  height: 10px;
  margin: 0 8px;
}

:root[data-density='compact'] .footer-status-cluster {
  margin-left: auto;
  width: auto;
  flex-shrink: 0;
}

:root[data-density='compact'] .global-status {
  font-size: 10px;
  max-width: 28vw;
  overflow: hidden;
  text-overflow: ellipsis;
}

.footer-status-cluster {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  position: sticky;
  right: 0;
  padding-left: 12px;
  background: linear-gradient(90deg, rgba(16, 16, 18, 0) 0%, var(--program-chrome-bg, #101012) 18%);
}

.shortcut-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.group-label {
  color: #555;
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
}

.shortcut-item {
  color: #8e8e93;
  font-size: 10px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.shortcut-item kbd {
  background: #2c2c2e;
  color: #d1d1d6;
  border: 1px solid #3a3a3c;
  padding: 2px 4px;
  border-radius: 4px;
  font-size: 9px;
  font-family: 'SF Mono', monospace;
}

.shortcut-divider {
  width: 1px;
  height: 12px;
  background: #3a3a3c;
  margin: 0 12px;
}

.global-status {
  font-family: 'SF Mono', monospace;
  font-size: 11px;
  color: #e5e5ea;
}

.debug-toggle {
  height: 22px;
  padding: 0 8px;
  border-radius: 5px;
  border: 1px solid #48484a;
  background: #2c2c2e;
  color: #c7c7cc;
  font: 700 10px 'SF Mono', monospace;
  cursor: pointer;
}

.debug-toggle:hover {
  color: #fff;
  border-color: #555;
}

.debug-panel {
  position: fixed;
  right: 18px;
  bottom: 44px;
  z-index: 2000;
  width: min(306px, calc(100vw - 28px));
  background: rgba(28, 28, 30, 0.98);
  border: 1px solid #3a3a3c;
  border-radius: 8px;
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.55);
  padding: 10px;
}

.debug-panel[hidden] {
  display: none;
}

.debug-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 8px;
  border-bottom: 1px solid #28282a;
}

.debug-panel-head b {
  font-size: 12px;
  color: #e5e5ea;
}

.debug-panel-head button {
  width: 24px;
  height: 24px;
  border: 1px solid #3a3a3c;
  border-radius: 5px;
  background: #242426;
  color: #8e8e93;
  cursor: pointer;
}

.debug-grid {
  display: grid;
  grid-template-columns: 62px minmax(0, 1fr);
  gap: 7px 8px;
  padding: 9px 0;
  font-size: 11px;
}

.debug-grid span,
.debug-error span {
  color: #636366;
}

.debug-grid b {
  color: #d1d1d6;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
}

.debug-error {
  border-top: 1px solid #28282a;
  padding-top: 8px;
  font-size: 11px;
}

.debug-error p {
  margin: 5px 0 0;
  color: #a1a1a6;
  line-height: 1.45;
  white-space: normal;
  user-select: text;
}

.debug-actions {
  border-top: 1px solid #28282a;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.debug-retry-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid var(--cg-brand-line, rgba(163, 230, 53, 0.45));
  background: var(--cg-brand-glow, rgba(163, 230, 53, 0.18));
  color: var(--cg-brand, #a3e635);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.debug-copy-btn {
  width: 100%;
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid rgba(120, 120, 128, 0.45);
  background: rgba(120, 120, 128, 0.14);
  color: #e5e5ea;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.debug-copy-btn:hover {
  background: rgba(120, 120, 128, 0.22);
}

.debug-retry-btn:hover:not(:disabled) {
  background: rgba(163, 230, 53, 0.28);
}

.debug-retry-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.debug-retry-hint {
  margin: 0;
  font-size: 10px;
  color: #636366;
  line-height: 1.35;
}

.settings-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: #8e8e93;
  line-height: 1.45;
}

/* Eagle-only blocks stay hidden in extension / web; eagle-overlay.css reveals them. */
.cutgo-eagle-only {
  display: none !important;
}

.settings-hint.is-error {
  color: #ff6b6b;
}

.settings-action-btn:disabled {
  opacity: 0.65;
  cursor: wait;
}

.settings-action-btn.is-armed {
  border-color: var(--cg-brand, #a3e635);
  color: var(--cg-brand, #a3e635);
}

.settings-cache-lead {
  margin-bottom: 12px;
}

.settings-cache-card {
  background: #141416;
  border: 1px solid #2c2c2e;
  border-radius: 10px;
  padding: 12px 14px;
}

.settings-cache-report {
  margin: 0 0 10px;
  padding: 10px 12px;
  max-height: 220px;
  overflow: auto;
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.06);
  color: #d1d1d6;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
}

.settings-cache-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.settings-cache-cleanup .settings-hint {
  margin-bottom: 8px;
}

.settings-cache-policy {
  color: #636366;
  font-size: 11px;
}

.cutgo-settings-modal .settings-page[data-page='cache'].active {
  display: block;
}

.settings-action-btn {
  display: inline-block;
  margin-bottom: 8px;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1px solid #3a3a3c;
  background: #2c2c2e;
  color: #f5f5f7;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
}

.settings-action-btn:hover {
  background: #3a3a3c;
}

.context-menu {
  position: fixed;
  background: rgba(30, 30, 32, 0.95);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 6px 0;
  min-width: 180px;
  z-index: 100000;
  display: none;
  flex-direction: column;
  list-style: none;
  margin: 0;
}

.context-menu li {
  padding: 8px 16px;
  color: #d1d1d6;
  font-size: 12px;
  cursor: pointer;
}

.context-menu li:hover {
  background: #0a84ff;
  color: #fff;
}

.context-menu li.disabled {
  color: #5f5f66;
  cursor: default;
}

.context-menu li.disabled:hover {
  background: transparent;
  color: #5f5f66;
}

.context-menu .divider {
  height: 1px;
  background: rgba(255, 255, 255, 0.08);
  margin: 4px 0;
  padding: 0;
}

/* Eagle tooltips — only when data-tooltip is set (avoid empty bubbles on premium-btn) */
.icon-btn[data-tooltip]::after,
.top-settings-btn[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.95);
  color: #d1d1d6;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-family: 'PingFang SC', sans-serif;
  font-weight: normal;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
  pointer-events: none;
  z-index: 8000;
  border: 1px solid #3a3a3c;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
}

.premium-btn[data-tooltip]::after,
.player-audio-ctrl[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.95);
  color: #d1d1d6;
  padding: 8px 12px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'PingFang SC', sans-serif;
  font-weight: normal;
  white-space: normal;
  max-width: 220px;
  width: max-content;
  line-height: 1.5;
  text-align: left;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
  pointer-events: none;
  z-index: 8000;
  border: 1px solid #3a3a3c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.player-speed-ctrl[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  top: calc(100% + 10px);
  bottom: auto;
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  background: rgba(28, 28, 30, 0.95);
  color: #d1d1d6;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 11px;
  font-family: 'PingFang SC', sans-serif;
  font-weight: normal;
  white-space: nowrap;
  max-width: none;
  width: max-content;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s, visibility 0s;
  pointer-events: none;
  z-index: 8002;
  border: 1px solid #3a3a3c;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.6);
}

.icon-btn[data-tooltip]:hover::after,
.top-settings-btn[data-tooltip]:hover::after,
.premium-btn[data-tooltip]:hover::after,
.player-speed-ctrl[data-tooltip]:hover::after,
.player-audio-ctrl[data-tooltip]:hover::after {
  opacity: 1;
  visibility: visible;
}

.premium-btn,
.player-speed-ctrl,
.player-audio-ctrl {
  position: relative;
}

/* Player overlay — hide while playing unless hover/pause */
.video-ui-layer {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 500;
  transition: opacity 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.video-filename-overlay {
  position: absolute;
  top: 18px;
  left: 22px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 12px;
  font-weight: 500;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
  max-width: calc(100% - 220px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: auto;
}

.false-color-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 420;
  opacity: 1;
}

.false-color-overlay[hidden] {
  display: none !important;
}

#playerBox.false-color-active > video {
  visibility: visible;
}

.player-color-scope-ctrl {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 510;
  pointer-events: auto;
}

#playerBox.is-playing:not(:hover) .player-color-scope-ctrl {
  opacity: 0.55;
  transition: opacity 0.25s ease;
}

#playerBox.is-playing:hover .player-color-scope-ctrl,
#playerBox.false-color-active .player-color-scope-ctrl,
#playerBox.rgb-parade-active .player-color-scope-ctrl,
#playerBox.vectorscope-active .player-color-scope-ctrl,
#playerBox.rgb-vectorscope-active .player-color-scope-ctrl {
  opacity: 1;
}

.color-scope-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: rgba(255, 255, 255, 0.92);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}

.color-scope-btn:hover,
.color-scope-btn[aria-expanded='true'] {
  background: rgba(0, 0, 0, 0.78);
  border-color: rgba(255, 255, 255, 0.28);
}

.color-scope-btn[data-mode='false-color'] {
  color: #7dd3fc;
  border-color: rgba(125, 211, 252, 0.35);
}

.color-scope-btn[data-mode='rgb-parade'] {
  color: #fda4af;
  border-color: rgba(253, 164, 175, 0.35);
}

.color-scope-btn[data-mode='vectorscope'] {
  color: #c4b5fd;
  border-color: rgba(196, 181, 253, 0.35);
}

.color-scope-btn[data-mode='rgb-vectorscope'] {
  color: #fcd34d;
  border-color: rgba(252, 211, 77, 0.35);
}

.false-color-overlay.is-rgb-parade {
  pointer-events: none;
  opacity: 0.92;
}

.false-color-overlay.is-vectorscope {
  pointer-events: none;
  opacity: 1;
}

.false-color-overlay.is-rgb-vectorscope {
  pointer-events: none;
  opacity: 1;
}

#playerBox.rgb-parade-active > video {
  visibility: visible;
}

#playerBox.vectorscope-active > video {
  visibility: visible;
}

#playerBox.rgb-vectorscope-active > video {
  visibility: visible;
}

.color-scope-chevron {
  font-size: 9px;
  opacity: 0.75;
}

.color-scope-menu {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  min-width: 188px;
  padding: 4px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.color-scope-menu[hidden] {
  display: none !important;
}

.color-scope-item {
  display: block;
  width: 100%;
  padding: 7px 10px;
  border: none;
  border-radius: 5px;
  background: transparent;
  color: #d1d1d6;
  font-size: 11px;
  text-align: left;
  cursor: pointer;
}

.color-scope-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.color-scope-item.active {
  background: rgba(10, 132, 255, 0.18);
  color: #7dd3fc;
}

.player-audio-ctrl {
  position: absolute;
  bottom: 16px;
  /* Left of 适合 / zoom so the expanding volume slider never covers it. */
  right: 136px !important;
  z-index: 40 !important;
  pointer-events: auto;
  box-sizing: border-box;
  background: rgba(0, 0, 0, 0.6);
  height: 28px;
  width: 28px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
  transition: width 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), padding 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
  color: #fff;
}

.player-audio-ctrl .audio-icon-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  line-height: 0;
  transform: translateX(1.75px);
}

.player-audio-ctrl .audio-icon-wrapper svg {
  display: block;
  width: 18px;
  height: 18px;
}

.player-audio-ctrl:hover {
  width: 124px;
  padding: 0 8px;
  justify-content: flex-start;
  background: rgba(0, 0, 0, 0.85);
  z-index: 45 !important;
  /* Let the thumb clear the capsule edge at 100% volume. */
  overflow: visible;
}

.player-audio-ctrl .vol-slider-container {
  width: 0;
  opacity: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  transition: width 0.3s, opacity 0.3s;
}

.player-audio-ctrl:hover .vol-slider-container {
  width: 78px;
  opacity: 1;
  margin-left: 6px;
  overflow: visible;
  padding: 0 5px;
  box-sizing: border-box;
}

/* Volume track — medium weight (not native-thick, not hairline). */
#volume {
  width: 100%;
  height: 16px;
  margin: 0;
  padding: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  accent-color: #fff;
}

#volume::-webkit-slider-runnable-track {
  height: 3.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
}

#volume::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 10px;
  height: 10px;
  margin-top: -3.25px;
  border-radius: 50%;
  background: #fff;
  border: 0;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}

#volume::-moz-range-track {
  height: 3.5px;
  border-radius: 2px;
  background: rgba(255, 255, 255, 0.42);
}

#volume::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 0;
  border-radius: 50%;
  background: #fff;
}

.player-speed-ctrl {
  z-index: 36;
}

.player-speed-ctrl {
  position: absolute;
  bottom: 16px;
  right: 16px;
  height: 28px;
  box-sizing: border-box;
  pointer-events: auto;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: 14px;
  padding: 0 10px;
  display: inline-flex;
  align-items: center;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  cursor: pointer;
}

#playerBox.is-playing:not(:hover) .video-ui-layer {
  opacity: 0;
}

.title-center b,
#projectTitle {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.api-tag-beta {
  font-size: 9px;
  color: #0a84ff;
  font-weight: 700;
  margin-left: 6px;
}

.settings-hint {
  font-size: 11px;
  color: #8e8e93;
  line-height: 1.5;
  margin: 0 0 10px;
  max-width: 420px;
}

.cutgo-settings-modal .settings-hint a {
  color: var(--cg-brand, #a3e635);
  text-decoration: none;
}

.settings-hint a {
  color: var(--cg-brand, #a3e635);
  text-decoration: none;
}

.settings-hint a:hover {
  text-decoration: underline;
}

.settings-hint code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: #aeaeb2;
}

.cutgo-settings-modal .settings-page {
  display: none;
}

.cutgo-settings-modal .settings-page.active {
  display: block;
}

.cutgo-settings-modal .settings-page[data-page='ai'].active {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cutgo-settings-modal .settings-block {
  background: #141416;
  border: 1px solid #2c2c2e;
  border-radius: 10px;
  padding: 14px 16px 12px;
}

.cutgo-settings-modal .settings-block-head {
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid #252527;
}

.cutgo-settings-modal .settings-block-title-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 6px;
}

.cutgo-settings-modal .settings-block-title {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  color: #f2f2f7;
  letter-spacing: -0.01em;
}

.cutgo-settings-modal .settings-block-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #8e8e93;
  background: rgba(142, 142, 147, 0.14);
  border: 1px solid rgba(142, 142, 147, 0.22);
}

.cutgo-settings-modal .settings-block-tag.pro {
  color: var(--cg-brand, #a3e635);
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.1));
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.28));
}

.cutgo-settings-modal .settings-block-tag.beta {
  color: #ffd60a;
  background: rgba(255, 214, 10, 0.08);
  border-color: rgba(255, 214, 10, 0.24);
}

.cutgo-settings-modal .settings-block-lead {
  margin: 0;
  font-size: 11px;
  line-height: 1.5;
  color: #8e8e93;
  max-width: 440px;
}

.cutgo-settings-modal .settings-block-body .setting-row:last-of-type {
  margin-bottom: 0;
}

.cutgo-settings-modal .settings-block-body .ai-test-row {
  margin-top: 4px;
  margin-bottom: 0;
}

.cutgo-settings-modal .settings-provider-guide {
  margin: 2px 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.06));
  border: 1px solid var(--cg-brand-line, rgba(163, 230, 53, 0.14));
  border-left: 3px solid var(--cg-brand, #a3e635);
}

.cutgo-settings-modal .settings-provider-guide b {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: #d1d1d6;
  margin-bottom: 4px;
}

.cutgo-settings-modal .settings-provider-guide p {
  margin: 0;
  font-size: 11px;
  line-height: 1.55;
  color: #8e8e93;
}

.cutgo-settings-modal .settings-provider-guide a {
  color: var(--cg-brand, #a3e635);
  text-decoration: none;
}

.cutgo-settings-modal .settings-provider-guide a:hover {
  text-decoration: underline;
}

.cutgo-settings-modal .settings-provider-guide code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 10px;
  color: #aeaeb2;
}

.cutgo-settings-modal .settings-provider-guide strong {
  color: #d1d1d6;
  font-weight: 600;
}

.cutgo-settings-modal .ai-test-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 4px 0 12px;
  padding-left: 0;
}

.ai-test-status {
  font-size: 11px;
  color: #8e8e93;
}

.ai-test-status[data-state='ok'] {
  color: #34c759;
}

.ai-test-status[data-state='err'] {
  color: #ff3b30;
}


.cutgo-settings-modal .ai-prompt-row {
  flex-direction: column;
  align-items: stretch;
}

.cutgo-settings-modal .ai-prompt-row span:first-child {
  margin-bottom: 6px;
}

.cutgo-settings-modal .settings-content {
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3c transparent;
}

.cutgo-settings-modal .settings-content::-webkit-scrollbar {
  width: 6px;
}

.cutgo-settings-modal .settings-content::-webkit-scrollbar-thumb {
  background: #3a3a3c;
  border-radius: 3px;
}

.cutgo-settings-modal .settings-textarea,
.cutgo-settings-modal .ai-prompt-row textarea {
  width: 100%;
  max-width: 360px;
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: #fff;
  border-radius: 4px;
  padding: 8px;
  font-size: 11px;
  line-height: 1.45;
  resize: vertical;
  scrollbar-width: thin;
  scrollbar-color: #3a3a3c #1c1c1e;
}

.cutgo-settings-modal .settings-textarea::-webkit-scrollbar,
.cutgo-settings-modal .ai-prompt-row textarea::-webkit-scrollbar {
  width: 6px;
}

.cutgo-settings-modal .settings-textarea::-webkit-scrollbar-thumb,
.cutgo-settings-modal .ai-prompt-row textarea::-webkit-scrollbar-thumb {
  background: #3a3a3c;
  border-radius: 3px;
}

.cutgo-settings-modal .settings-textarea::-webkit-scrollbar-track,
.cutgo-settings-modal .ai-prompt-row textarea::-webkit-scrollbar-track {
  background: #1c1c1e;
}

.setting-ctrl-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
}

.setting-ctrl-inline input[type='text'] {
  flex: 1;
  min-width: 120px;
}

.shortcut-list-settings {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.shortcut-row-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #d1d1d6;
  padding: 6px 0;
  border-bottom: 1px solid #28282a;
}

.shortcut-row-item kbd {
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 10px;
  font-family: ui-monospace, monospace;
  color: #fff;
}

body.hover-ui-only .shot-item .shot-actions {
  opacity: 0;
  transition: opacity 0.15s;
}

body.hover-ui-only .shot-item:hover .shot-actions {
  opacity: 1;
}

.styled-btn-secondary {
  background: #2c2c2e;
  border: 1px solid #3a3a3c;
  color: #d1d1d6;
  height: 24px;
  padding: 0 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
}

.import-btn {
  background: transparent;
  border: 1px solid var(--cg-line, rgba(255, 255, 255, 0.09));
  color: var(--cg-text-secondary, rgba(174, 174, 178, 0.9));
  height: 26px;
  padding: 0 12px;
  border-radius: var(--cg-radius-sm, 5px);
  cursor: pointer;
  font-size: 11px;
  font-weight: 550;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.top-settings-btn {
  width: auto;
  min-width: 0;
  padding: 0 12px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1;
}

.import-btn:hover {
  color: var(--cg-text, rgba(245, 245, 247, 0.94));
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
}


/* Settings — Eagle layout */
.cutgo-settings-modal .settings-shell {
  width: min(720px, 92vw);
  max-height: 85vh;
}

.cutgo-settings-modal .settings-sidebar {
  width: 180px;
  border-right: 1px solid #28282a;
  padding: 12px 0;
}

.cutgo-settings-modal .settings-brand {
  padding: 18px 16px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
}

.cutgo-settings-modal .settings-brand-logo {
  width: 132px;
  height: 132px;
  object-fit: contain;
  border-radius: 18px;
  filter: drop-shadow(0 0 22px rgba(145, 255, 42, 0.16));
  opacity: 0.98;
}

.cutgo-settings-modal .settings-brand span {
  margin-top: 0;
  line-height: 1.45;
  text-align: center;
  font-size: 12px;
}

.cutgo-settings-modal .settings-header {
  align-items: center;
}

.cutgo-settings-modal .settings-tab {
  display: block;
  width: 100%;
  text-align: left;
  padding: 10px 16px;
  background: transparent;
  border: none;
  color: #8e8e93;
  font-size: 12px;
  cursor: pointer;
}

.cutgo-settings-modal .settings-tab.active {
  color: #fff;
  background: var(--cg-brand-dim, rgba(163, 230, 53, 0.12));
  border-left: 2px solid var(--cg-brand, #a3e635);
}

.cutgo-settings-modal .settings-group-title {
  font-size: 11px;
  font-weight: 700;
  color: #8e8e93;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #28282a;
}

.cutgo-settings-modal .version-title {
  margin-top: 18px;
}

.cutgo-settings-modal .version-card {
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 10px 12px;
  color: #8e8e93;
}

.cutgo-settings-modal .version-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  min-height: 22px;
}

.cutgo-settings-modal .version-row span {
  color: #d1d1d6;
  font-size: 12px;
}

.cutgo-settings-modal .version-row b,
.cutgo-settings-modal .version-row code {
  color: #e5e5ea;
  font: 600 12px 'SF Mono', Consolas, monospace;
  text-align: right;
}

.cutgo-settings-modal .version-card p {
  margin: 8px 0 0;
  color: #8e8e93;
  font-size: 11px;
  line-height: 1.5;
}

.cutgo-settings-modal .version-card p code {
  color: #a1a1a6;
  font-family: 'SF Mono', Consolas, monospace;
}

.cutgo-settings-modal .update-status-card b.is-new {
  color: var(--cg-brand, #a3e635);
}

.cutgo-settings-modal .update-status-card b.is-ok {
  color: #34c759;
}

.cutgo-settings-modal .update-notes-box {
  min-height: 72px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.025);
  color: #a1a1a6;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.cutgo-settings-modal .update-actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.cutgo-settings-modal .update-actions-row .settings-action-btn.primaryish {
  background: var(--cg-brand-glow, rgba(163, 230, 53, 0.18));
  border-color: var(--cg-brand-line, rgba(163, 230, 53, 0.35));
  color: var(--cg-brand, #a3e635);
}

.cutgo-settings-modal .update-download-panel {
  margin-top: 4px;
}

.cutgo-settings-modal .update-steps {
  margin: 0;
  padding-left: 18px;
  color: #a1a1a6;
  font-size: 12px;
  line-height: 1.65;
}

.cutgo-settings-modal .update-steps code {
  color: #d1d1d6;
  font-family: 'SF Mono', Consolas, monospace;
}

.cutgo-settings-modal .setting-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  font-size: 12px;
}

.cutgo-settings-modal .setting-row span:first-child {
  color: #d1d1d6;
  flex-shrink: 0;
}

.cutgo-settings-modal .setting-row select,
.cutgo-settings-modal .setting-row input[type='text'],
.cutgo-settings-modal .setting-row input[type='number'] {
  background: #1c1c1e;
  border: 1px solid #3a3a3c;
  color: #fff;
  border-radius: 4px;
  padding: 4px 8px;
  font-size: 11px;
}

.cutgo-settings-modal .setting-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  font-size: 12px;
  color: #d1d1d6;
  cursor: pointer;
}

.cutgo-settings-modal .setting-check input[type='checkbox'] {
  accent-color: var(--cg-brand, #a3e635);
}

.cutgo-settings-modal .setting-desc-inline {
  color: #8e8e93;
  font-size: 10px;
  margin-left: 8px;
}
