/* CutGo web-local workspace — title-bar note + action buttons */
html.cutgo-web-local body {
  --cutgo-web-banner-h: 0px;
  --cutgo-web-btn-h: 28px;
  --cutgo-web-btn-radius: var(--cg-radius-sm, 5px);
  --cutgo-web-btn-font: 650 12px/1 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
}

/* Beat eagle-parity `--workspace-pad` (often 4px); keep light air at edge */
html.cutgo-web-local .title-bar,
html.cutgo-web-local[data-density] .title-bar,
html.cutgo-web-local:root[data-density] .title-bar {
  padding: 0 16px !important;
  gap: 16px;
  overflow: visible !important;
}

html.cutgo-web-local .cutgo-web-title-note {
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  min-width: 0;
  max-width: min(420px, 36vw);
  margin: 0;
  padding: 0;
  color: rgba(245, 245, 247, 0.68);
  font: 500 11px/1.35 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

html.cutgo-web-local .cutgo-web-title-note b {
  color: #a3e635;
  font-weight: 700;
}

/* Empty-state: shared layout gap (8px) — keep web-only typography tweaks */
html.cutgo-web-local .empty-state {
  gap: 8px;
}

html.cutgo-web-local .empty-state h1,
html.cutgo-web-local .empty-state > p,
html.cutgo-web-local .empty-state .cutgo-web-empty-hint,
html.cutgo-web-local .empty-state #emptyImport {
  margin: 0 !important;
}

html.cutgo-web-local .empty-state > p {
  max-width: none;
  text-align: center;
  line-height: 1.45;
  white-space: nowrap;
}

html.cutgo-web-local .empty-state .cutgo-web-empty-hint {
  max-width: none;
  color: rgba(245, 245, 247, 0.45);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.01em;
  line-height: 1.4;
  text-align: center;
  white-space: nowrap;
}

html.cutgo-web-local .empty-state #emptyImport {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 14px !important;
}

html.cutgo-web-local .top-export-group {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px !important;
  min-width: 0;
  margin-left: auto;
}

html.cutgo-web-local .cutgo-web-title-note {
  margin-right: 0;
}

/* Shared shell — outline / solid / settings same box */
html.cutgo-web-local .cutgo-web-title-btn,
html.cutgo-web-local .cutgo-web-back-home,
html.cutgo-web-local .top-settings-btn,
html.cutgo-web-local #btnSettings,
html.cutgo-web-local .top-export-btn {
  box-sizing: border-box !important;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  width: auto !important;
  min-width: 0 !important;
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  padding: 0 14px !important;
  margin: 0 !important;
  border-radius: var(--cutgo-web-btn-radius) !important;
  font: var(--cutgo-web-btn-font) !important;
  line-height: 1 !important;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  transition: background 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

/* Logo → 官网 */
html.cutgo-web-local .title-bar-logo-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  line-height: 0;
  text-decoration: none;
  border-radius: 4px;
  cursor: pointer;
}

html.cutgo-web-local .title-bar-logo-link:hover .title-bar-logo {
  opacity: 0.82;
}

html.cutgo-web-local .title-bar-logo-link .cutgo-wordmark {
  pointer-events: none;
}

html.cutgo-web-local .title-bar-logo-link:focus-visible {
  outline: 2px solid rgba(163, 230, 53, 0.55);
  outline-offset: 2px;
}

/* 设置 — 同尺寸描边，中性灰（压过 workspace.css 的 26×26） */
html.cutgo-web-local .top-export-group > .top-settings-btn,
html.cutgo-web-local .top-settings-btn,
html.cutgo-web-local #btnSettings {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
  padding: 0 14px !important;
  border-radius: var(--cutgo-web-btn-radius) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  background: transparent !important;
  color: rgba(235, 235, 245, 0.86) !important;
  font: var(--cutgo-web-btn-font) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

html.cutgo-web-local .top-settings-btn:hover,
html.cutgo-web-local #btnSettings:hover {
  border-color: rgba(255, 255, 255, 0.28) !important;
  background: rgba(255, 255, 255, 0.06) !important;
  color: rgba(245, 245, 247, 0.96) !important;
}

/* 导出 — 同高度实心绿（压过 compact 24px） */
html.cutgo-web-local .top-export-group > .top-export-btn,
html.cutgo-web-local .top-export-btn,
html.cutgo-web-local #btnTopExport,
html.cutgo-web-local:root[data-density='compact'] .top-export-btn {
  height: 28px !important;
  min-height: 28px !important;
  max-height: 28px !important;
  width: auto !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

/* 返回官网 / 安装扩展 — 同款绿色描边（返回官网在左侧「导入」旁） */
html.cutgo-web-local .cutgo-web-back-home,
html.cutgo-web-local a.cutgo-web-back-home:link,
html.cutgo-web-local a.cutgo-web-back-home:visited {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  height: var(--cutgo-web-btn-h, 28px) !important;
  min-height: var(--cutgo-web-btn-h, 28px) !important;
  padding: 0 14px !important;
  margin: 0;
  border-radius: var(--cutgo-web-btn-radius, 5px);
  border: 1px solid rgba(163, 230, 53, 0.55) !important;
  background: transparent !important;
  color: var(--cg-brand, #a3e635) !important;
  font: var(--cutgo-web-btn-font, 650 12px/1 -apple-system, BlinkMacSystemFont, 'PingFang SC', sans-serif) !important;
  text-decoration: none !important;
  -webkit-text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: none !important;
  flex-shrink: 0;
}

html.cutgo-web-local a.cutgo-web-back-home:hover,
html.cutgo-web-local a.cutgo-web-back-home:active {
  background: rgba(163, 230, 53, 0.12) !important;
  border-color: var(--cg-brand, #a3e635) !important;
  color: var(--cg-brand-hover, #b8f04a) !important;
  text-decoration: none !important;
}

html.cutgo-web-local .cutgo-web-back-home:focus-visible {
  outline: 2px solid rgba(163, 230, 53, 0.55);
  outline-offset: 2px;
}

/* Outline — 安装扩展（转化次级，不与导出抢主色） */
html.cutgo-web-local .cutgo-web-title-btn.is-outline {
  height: var(--cutgo-web-btn-h) !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  background: transparent !important;
  border: 1px solid rgba(163, 230, 53, 0.55) !important;
  color: var(--cg-brand, #a3e635) !important;
}

html.cutgo-web-local .cutgo-web-title-btn.is-outline:hover {
  background: rgba(163, 230, 53, 0.12) !important;
  border-color: var(--cg-brand, #a3e635) !important;
  color: var(--cg-brand-hover, #b8f04a) !important;
}

/* Solid primary — 仅导出 */
html.cutgo-web-local .top-export-btn {
  height: var(--cutgo-web-btn-h) !important;
  padding: 0 14px !important;
  font-size: 12px !important;
  font-weight: 650 !important;
  background: var(--cg-brand, #a3e635) !important;
  border: 1px solid var(--cg-brand, #a3e635) !important;
  color: #0a0a0c !important;
}

html.cutgo-web-local .top-export-btn:hover {
  background: var(--cg-brand-hover, #b8f04a) !important;
  border-color: var(--cg-brand-hover, #b8f04a) !important;
  color: #0a0a0c !important;
}

@media (max-width: 1100px) {
  html.cutgo-web-local .cutgo-web-title-note {
    max-width: min(280px, 28vw);
  }
}

@media (max-width: 900px) {
  html.cutgo-web-local .cutgo-web-title-note {
    display: none;
  }
}

/* Hide in-page shell chrome that only applies inside extension iframe */
html.cutgo-web-local .inpage-shell-meta,
html.cutgo-web-local #btnInpageClose {
  display: none !important;
}

/*
 * Export open: demote web title chrome (说明 / 安装扩展 / 返回官网 / 导出)
 * to match extension AI-panel / export-button treatment.
 * Note: .cutgo-web-title-actions uses display:contents — demote its children, not the wrapper.
 */
html.cutgo-web-local body.export-popout-open .cutgo-web-title-note,
html.cutgo-web-local body.export-popout-open .cutgo-web-title-btn,
html.cutgo-web-local body.export-popout-open .cutgo-web-back-home,
html.cutgo-web-local body.export-popout-open .top-export-btn {
  position: relative !important;
  pointer-events: none !important;
  user-select: none !important;
  filter: blur(2.5px) brightness(0.42) !important;
  opacity: 0.38 !important;
}

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

/*
 * Kill page-player floating transport if extension is still injected on cutgo.cn
 * (builtin blacklist + this CSS). Workspace already has its own dashboard + timeline.
 */
html.cutgo-web-local #cutgo-page-transport,
html.cutgo-web-local #cutgo-inpage-transport-slot,
html.cutgo-web-local #cutgo-transport-hover-zone,
html.cutgo-web-local #cutgo-page-settings-fab,
html.cutgo-web-local #cutgo-page-settings,
html.cutgo-web-local #cutgo-page-settings-panel,
html.cutgo-web-local .cutgo-entry-wrap,
html.cutgo-web-local #cutgoEntryBtn,
html.cutgo-web-local [data-cutgo-entry],
html.cutgo-web-local .cutgo-fab,
html.cutgo-web-local #cutgo-player-badge {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Legacy sticky banner (removed from HTML; keep safe if cached) */
.cutgo-web-banner {
  display: none !important;
}

/* Website surface — show web-only blocks; hide true extension-only chrome.
   Do NOT blanket-hide `.cutgo-ext-only`: per EAGLE_VS_BROWSER rules that class means
   「扩展 + 官网可见、Eagle 隐藏」. Export dest UI (更改… / 按视频建夹 / 打开文件夹 /
   导出完整视频 / 设置里导出文件夹项) must match extension new-tab local video. */
html.cutgo-web-local .cutgo-web-only,
html.cutgo-web-local .update-surface-web {
  display: block !important;
}
html.cutgo-web-local .inpage-shell-close.cutgo-ext-only,
html.cutgo-web-local .settings-tab.cutgo-ext-only[data-tab='cache'],
html.cutgo-web-local .settings-page.cutgo-ext-only[data-page='cache'],
html.cutgo-web-local .settings-ai-sync-hint.cutgo-ext-only,
html.cutgo-web-local .update-surface-ext {
  display: none !important;
}
