body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] {
  --cutout-accent: #6254e7;
  --cutout-accent-soft: rgba(98, 84, 231, 0.1);
  --cutout-border: #e6e5ef;
  --cutout-surface: #ffffff;
  --cutout-muted: #6f7382;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #preview-frame,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .compare-pane,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .task-recent-image {
  background-color: #f7f7fa !important;
  background-image:
    linear-gradient(45deg, #e8e8ee 25%, transparent 25%),
    linear-gradient(-45deg, #e8e8ee 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e8e8ee 75%),
    linear-gradient(-45deg, transparent 75%, #e8e8ee 75%) !important;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0 !important;
  background-size: 16px 16px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #preview-badge {
  color: #5547d9;
  border-color: rgba(98, 84, 231, 0.22);
  background: rgba(255, 255, 255, 0.9);
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #product-upload,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .extra-prompt-box,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .generate-count-box {
  border-color: var(--cutout-border) !important;
  background: var(--cutout-surface) !important;
  box-shadow: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #product-upload:hover,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #product-upload:focus-visible {
  border-color: rgba(98, 84, 231, 0.55) !important;
  box-shadow: 0 0 0 3px rgba(98, 84, 231, 0.1) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #extra-prompt {
  height: 140px !important;
  min-height: 140px !important;
  max-height: 140px !important;
  resize: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .prompt-optimize-button,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] .library-select-row,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #video-script-button,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #set-ratio-section,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] #free-bottom-ratio-section {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

html[data-theme="dark"] body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"] {
  --cutout-border: #363646;
  --cutout-surface: #202027;
  --cutout-muted: #aaaaba;
}

/* Keep cutout results in a stable fixed grid after all shared desktop styles load. */
@media (min-width: 761px) {
  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid {
    display: grid !important;
    grid-template-columns: repeat(8, minmax(0, 1fr)) !important;
    grid-template-rows: none !important;
    grid-auto-flow: row !important;
    grid-auto-rows: auto !important;
    align-items: start !important;
    align-content: start !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card {
    grid-row: auto !important;
    align-self: start !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    aspect-ratio: 3 / 4 !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card:not(.wrinkle-running-card) {
    padding: 0 !important;
    border: 0 !important;
    border-radius: 12px !important;
    background: #eef0f4 !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card:not(.wrinkle-running-card)
    > .wrinkle-latest-open {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: auto !important;
    height: auto !important;
    aspect-ratio: auto !important;
    border-radius: inherit !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card:not(.wrinkle-running-card)
    .wrinkle-latest-thumb {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    border-radius: inherit !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card:not(.wrinkle-running-card)
    .wrinkle-latest-thumb
    > :is(img, .work-image-empty) {
    position: absolute !important;
    inset: 0 !important;
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    aspect-ratio: auto !important;
    object-fit: cover !important;
    object-position: center !important;
  }

  html[data-theme="dark"]:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="background-remove"]
    #detail-page-latest-panel
    > .wrinkle-latest-panel
    > .wrinkle-latest-grid
    > .wrinkle-latest-card:not(.wrinkle-running-card) {
    background: #2b3037 !important;
  }
}
