/* 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: tighter stack — less air between tagline / autosave / CTA */
html.cutgo-web-local .empty-state {
  gap: 0;
}

html.cutgo-web-local .empty-state h1 {
  margin: 0 0 8px !important;
}

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

html.cutgo-web-local .empty-state .cutgo-web-empty-hint {
  margin: 4px 0 0 !important;
  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 {
  margin-top: 14px !important;
  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: 0;
  min-width: 0;
  margin-left: auto;
}

/* Note ↔ buttons */
html.cutgo-web-local .cutgo-web-title-actions {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 8px;
  margin-left: 16px;
  position: relative;
}

/* 导出 sits further right of the text/ghost cluster */
html.cutgo-web-local .top-export-group > .top-export-btn {
  margin-left: 14px;
}

/* Shared shell */
html.cutgo-web-local .cutgo-web-title-btn,
html.cutgo-web-local .top-export-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: var(--cutgo-web-btn-h);
  padding: 0 14px;
  border-radius: var(--cutgo-web-btn-radius);
  font: var(--cutgo-web-btn-font);
  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: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;
  }

  html.cutgo-web-local .cutgo-web-title-actions {
    margin-left: 0;
  }
}

/* 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.
 */
html.cutgo-web-local body.export-popout-open .cutgo-web-title-note,
html.cutgo-web-local body.export-popout-open .cutgo-web-title-actions,
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-actions::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;
}
