/* Keep free-generate aligned with the normal workstation layout. */
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .topbar {
  display: flex !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .workspace {
  display: block !important;
  width: 100% !important;
  min-width: 0 !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
  background: transparent !important;
  background-image: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .hero-card,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .function-board,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-generate-page,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .works-panel {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .task-panel {
  display: grid !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .content-grid {
  height: calc(100vh - 56px) !important;
  min-height: 0 !important;
  max-height: calc(100vh - 56px) !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  padding: 32px 24px 30px !important;
  background:
    linear-gradient(
      180deg,
      rgba(248, 244, 255, 0.82) 0%,
      rgba(253, 252, 255, 0.78) 42%,
      rgba(255, 255, 255, 0.9) 100%
    ) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .extra-prompt-box {
  position: relative !important;
  z-index: 3 !important;
  display: grid !important;
  gap: 8px !important;
  padding: 18px !important;
  border: 1px solid rgba(214, 210, 236, 0.96) !important;
  border-radius: 18px !important;
  background: #ffffff !important;
  box-shadow: 0 10px 22px rgba(105, 91, 164, 0.055) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .extra-prompt-box > span {
  min-height: auto !important;
  color: #30384d !important;
  font-size: 14px !important;
  font-weight: 560 !important;
  line-height: 1.25 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #extra-prompt {
  height: 280px !important;
  min-height: 280px !important;
  max-height: 280px !important;
  padding: 16px 17px 58px !important;
  border: 1px solid rgba(214, 210, 236, 0.96) !important;
  border-radius: 14px !important;
  color: #20263a !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  resize: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #extra-prompt:focus {
  border-color: rgba(109, 85, 238, 0.55) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(109, 85, 238, 0.08), 0 12px 24px rgba(105, 91, 164, 0.08) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button {
  position: absolute !important;
  right: 30px !important;
  bottom: 30px !important;
  z-index: 85 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(91, 73, 230, 0.42) !important;
  border-radius: 999px !important;
  color: #5b4be8 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.18) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button .lucide {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.2 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button span {
  font-weight: 450 !important;
  -webkit-font-smoothing: antialiased !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button:hover:not(:disabled) {
  border-color: rgba(91, 73, 230, 0.5) !important;
  color: #ffffff !important;
  background: #5b4be8 !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.2) !important;
  transform: translateY(-1px) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button:disabled {
  color: #5b4be8 !important;
  border-color: rgba(91, 73, 230, 0.32) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 20px rgba(91, 73, 230, 0.1) !important;
  cursor: not-allowed !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .prompt-optimize-button.is-busy {
  color: #ffffff !important;
  background: #5b4be8 !important;
  cursor: wait !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .preview-empty,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .preview-empty-visual,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .preview-empty-actions {
  display: flex !important;
}

body[data-active-feature="free-generate"] .free-generate-empty-message {
  position: relative;
  isolation: isolate;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  min-height: 320px;
  overflow: hidden;
  padding: 32px;
}


body[data-active-feature="free-generate"] .free-generate-empty-message p {
  margin: 0;
  color: #313548;
  font-size: clamp(24px, 1.75vw, 34px);
  font-weight: 650;
  letter-spacing: 0.12em;
  line-height: 1.35;
  text-align: center;
  text-shadow: 0 10px 30px rgba(54, 48, 94, 0.08);
  transform-origin: center;
  white-space: nowrap;
  backface-visibility: hidden;
  will-change: transform;
  animation: free-generate-copy-enter 620ms cubic-bezier(0.22, 1, 0.36, 1) both,
    free-generate-copy-drift 4.8s cubic-bezier(0.45, 0, 0.55, 1) 800ms infinite;
}

html[data-theme="dark"] body[data-active-feature="free-generate"] .free-generate-empty-message p {
  color: #ececf7;
  text-shadow: 0 12px 34px rgba(139, 125, 255, 0.14);
}

@keyframes free-generate-copy-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes free-generate-copy-drift {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale3d(1, 1, 1);
  }
  50% {
    transform: translate3d(0, -3px, 0) scale3d(1.008, 1.008, 1);
  }
}


@media (prefers-reduced-motion: reduce) {
  body[data-active-feature="free-generate"] .free-generate-empty-message p {
    animation: none;
  }
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-card {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #video-storyboard-button,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #set-ratio-section {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .upload-column:has(.free-upload-strip:not([hidden])) #product-upload {
  align-content: start !important;
  min-height: 236px !important;
  padding: 18px 16px 14px !important;
  grid-template-columns: auto minmax(0, 1fr) !important;
  justify-items: stretch !important;
  text-align: left !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .upload-column:has(.free-upload-strip:not([hidden])) #product-upload .upload-icon {
  grid-column: 1 !important;
  grid-row: 1 !important;
  justify-self: start !important;
  align-self: center !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .upload-column:has(.free-upload-strip:not([hidden])) #product-upload .upload-copy {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: center !important;
  justify-self: stretch !important;
  min-width: 0 !important;
  display: grid !important;
  gap: 3px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .upload-column:has(.free-upload-strip:not([hidden])) #product-upload strong {
  font-size: 16px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #upload-stack {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  display: flex !important;
  justify-self: stretch !important;
  justify-content: flex-start !important;
  gap: 4px !important;
  width: 100% !important;
  min-width: 0 !important;
  margin-top: 6px !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  padding: 0 1px 2px !important;
  scroll-snap-type: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip[hidden] {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip.is-scrollable {
  overflow-x: auto !important;
  scroll-snap-type: x mandatory !important;
  scrollbar-width: thin !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .video-upload-slot {
  position: relative !important;
  display: grid !important;
  grid-template-rows: auto 20px !important;
  gap: 7px !important;
  place-items: stretch !important;
  flex: 0 0 calc((100% - 16px) / 5) !important;
  width: calc((100% - 16px) / 5) !important;
  min-width: calc((100% - 16px) / 5) !important;
  aspect-ratio: auto !important;
  height: auto !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  scroll-snap-align: start !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .video-upload-slot img {
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: 3 / 4 !important;
  min-height: 0 !important;
  object-fit: cover !important;
  overflow: hidden !important;
  border: 1px solid rgba(226, 230, 242, 0.9) !important;
  border-radius: 10px !important;
  background: #f7f7fb !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .video-upload-slot small {
  position: static !important;
  display: grid !important;
  place-items: center !important;
  align-self: start !important;
  min-width: 0 !important;
  padding: 0 2px !important;
  color: #4b5368 !important;
  background: transparent !important;
  font-size: 10px !important;
  font-weight: 500 !important;
  line-height: 1.1 !important;
  text-align: center !important;
  white-space: nowrap !important;
  overflow: hidden !important;
  text-overflow: ellipsis !important;
  pointer-events: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .upload-stack-delete {
  right: 4px !important;
  top: 4px !important;
  display: grid !important;
  place-items: center !important;
  width: 20px !important;
  height: 20px !important;
  min-width: 20px !important;
  min-height: 20px !important;
  padding: 0 !important;
  border: 1px solid rgba(255, 255, 255, 0.72) !important;
  border-radius: 999px !important;
  color: #fff !important;
  background: rgba(19, 24, 38, 0.48) !important;
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.18) !important;
  opacity: 0.72 !important;
  transform: none !important;
  transition: opacity 0.16s ease, transform 0.16s ease, background 0.16s ease !important;
  backdrop-filter: blur(8px) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .upload-stack-delete .lucide {
  width: 11px !important;
  height: 11px !important;
  stroke-width: 2.6 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .upload-stack-delete:hover,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-upload-strip .upload-stack-delete:focus-visible {
  opacity: 1 !important;
  transform: none !important;
  background: rgba(239, 68, 68, 0.9) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .extra-prompt-box.has-video-highlight #extra-prompt {
  color: transparent !important;
  caret-color: #20263a !important;
  -webkit-text-fill-color: transparent !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .extra-prompt-box.has-video-highlight #extra-prompt::placeholder {
  color: #8a91a3 !important;
  -webkit-text-fill-color: #8a91a3 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-prompt-highlight {
  position: absolute !important;
  z-index: 1 !important;
  overflow: hidden !important;
  pointer-events: none !important;
  white-space: pre-wrap !important;
  overflow-wrap: break-word !important;
  border: 1px solid transparent !important;
  color: #20263a !important;
  font-size: 14px;
  line-height: 1.65;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-prompt-highlight-token {
  display: inline !important;
  padding: 0 !important;
  border-radius: 0 !important;
  color: #2563eb !important;
  background: transparent !important;
  box-shadow: none !important;
  font-size: inherit !important;
  font-weight: inherit !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .extra-prompt-box .video-material-mention {
  position: absolute !important;
  left: 30px !important;
  right: auto !important;
  bottom: 30px !important;
  z-index: 80 !important;
  display: inline-flex !important;
  align-items: center !important;
  gap: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention[hidden] {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-button {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-width: 66px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(91, 73, 230, 0.32) !important;
  border-radius: 999px !important;
  color: #5b4be8 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.12) !important;
  font-size: 12px !important;
  font-weight: 450 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-button:hover:not(:disabled) {
  border-color: rgba(91, 73, 230, 0.5) !important;
  color: #ffffff !important;
  background: #5b4be8 !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.2) !important;
  transform: translateY(-1px) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-button:disabled {
  color: #5b4be8 !important;
  border-color: rgba(109, 85, 238, 0.18) !important;
  background: rgba(255, 255, 255, 0.88) !important;
  box-shadow: 0 8px 16px rgba(91, 73, 230, 0.07) !important;
  opacity: 0.58 !important;
  cursor: not-allowed !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu {
  position: absolute !important;
  left: 0 !important;
  top: auto !important;
  bottom: calc(100% + 6px) !important;
  z-index: 90 !important;
  display: grid !important;
  gap: 4px !important;
  width: 136px !important;
  max-height: 186px !important;
  overflow-y: auto !important;
  padding: 7px !important;
  border: 1px solid rgba(221, 224, 238, 0.92) !important;
  border-radius: 12px !important;
  background: #fff !important;
  box-shadow: 0 14px 34px rgba(42, 48, 74, 0.16) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu[hidden] {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu button {
  display: grid !important;
  grid-template-columns: 32px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
  min-height: 44px !important;
  padding: 6px 7px 6px 10px !important;
  border: 0 !important;
  border-radius: 9px !important;
  color: #20263a !important;
  background: transparent !important;
  text-align: left !important;
  cursor: pointer !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu button:hover,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu[data-caret-menu] button[aria-selected="true"] {
  background: rgba(123, 97, 255, 0.09) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu strong {
  grid-column: 2 !important;
  grid-row: 1 !important;
  overflow: hidden !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu .video-material-mention-thumb {
  grid-column: 1 !important;
  grid-row: 1 !important;
  display: grid !important;
  place-items: center !important;
  width: 32px !important;
  height: 32px !important;
  overflow: hidden !important;
  border-radius: 8px !important;
  background: #f3f5fb !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-menu .video-material-mention-thumb img {
  display: block !important;
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .video-material-mention-empty {
  overflow: hidden !important;
  color: #8a91a3 !important;
  font-size: 11px !important;
  font-weight: 500 !important;
  line-height: 1.25 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-bottom-area {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 12px !important;
  overflow: visible !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generate-count-box {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generate-action-row {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  gap: 10px !important;
  width: 100% !important;
  min-width: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section {
  display: block !important;
  position: relative !important;
  grid-column: 1 !important;
  grid-row: 1 !important;
  min-width: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .settings-bottom-area {
  position: relative !important;
  z-index: 120 !important;
  overflow: visible !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section.is-open {
  z-index: 121 !important;
}

/* Print extraction keeps the local extraction-type card, without the shared
 * settings shell around it. */
body.feature-focus-mode.workstation-feature-mode[data-active-feature="print-extract"] #settings-card {
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="print-extract"] #settings-card::before,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="print-extract"] #settings-card::after {
  content: none !important;
  display: none !important;
}

/* Detail-page quantities are chosen per module, so its footer has only ratio
 * and resolution and must not retain an empty middle column. */
body.feature-focus-mode.workstation-feature-mode[data-active-feature="detail-page"][data-active-feature="detail-page"] .settings-bottom-area {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  column-gap: 12px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="detail-page"][data-active-feature="detail-page"] #free-bottom-ratio-section {
  grid-column: 1 !important;
  width: 100% !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="detail-page"][data-active-feature="detail-page"] #generate-count-box > .generation-resolution-section {
  grid-column: 2 !important;
  width: 100% !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .inline-model-section {
  grid-column: 1 !important;
  grid-row: 2 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generate-count-section {
  grid-column: 2 !important;
  grid-row: 1 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generation-resolution-section {
  grid-column: 3 !important;
  grid-row: 1 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .create-button.full {
  grid-column: 1 !important;
  grid-row: 1 !important;
  width: 100% !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .inline-model-section,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generate-count-section,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .generation-resolution-section,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .print-compact-select {
  width: 100% !important;
  max-width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .mobile-free-ratio-toggle,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .inline-model-section summary,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .print-compact-select summary {
  width: 100% !important;
  min-width: 0 !important;
  box-sizing: border-box !important;
  grid-template-columns: 30px minmax(0, 1fr) 12px !important;
  gap: 2px 7px !important;
  padding: 8px 9px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] .settings-bottom-area {
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 12px 10px !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #generate-count-box,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] .generate-action-row {
  display: contents !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #free-bottom-ratio-section {
  display: block !important;
  grid-column: 1 !important;
  grid-row: 2 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #inline-model-section {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
}

/* 自由生图模型选择：增大点击高度、校正模型名垂直居中，并从底部工具栏向上展开。 */
body[data-active-feature="free-generate"] #inline-model-section > summary {
  display: flex !important;
  align-items: center !important;
  gap: 8px !important;
  height: 50px !important;
  min-height: 50px !important;
  padding: 9px 12px !important;
  box-sizing: border-box !important;
}

body[data-active-feature="free-generate"] #inline-model-section > summary > span {
  align-self: center !important;
  line-height: 1.2 !important;
}

body[data-active-feature="free-generate"] #inline-model-section > summary > [data-inline-model-current] {
  display: flex !important;
  align-self: stretch !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-height: 0 !important;
  margin-left: auto !important;
  line-height: 1 !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-current-content {
  display: inline-flex !important;
  /* Override the legacy summary span rule, which bottom-aligns nested spans. */
  align-self: center !important;
  align-items: center !important;
  justify-content: flex-end !important;
  gap: 8px !important;
  min-width: 0 !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.2 !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-current-logo {
  flex: 0 0 24px !important;
  box-sizing: border-box !important;
  width: 24px !important;
  height: 24px !important;
  padding: 3px !important;
  border: 1px solid rgba(216, 214, 232, 0.92) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 5px rgba(35, 40, 62, 0.06) !important;
  object-fit: contain !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-current-label {
  align-self: center !important;
  overflow: hidden !important;
  min-width: 0 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body[data-active-feature="free-generate"] #inline-model-section > summary::after {
  align-self: center !important;
  flex: 0 0 auto !important;
  transform: rotate(225deg) translate(-1px, -1px) !important;
  transition: transform 150ms ease !important;
}

body[data-active-feature="free-generate"] #inline-model-section[open] > summary::after {
  transform: rotate(45deg) translateY(-2px) !important;
}

body[data-active-feature="free-generate"] #inline-model-section > .inline-model-options {
  top: auto !important;
  right: 0 !important;
  bottom: calc(100% + 8px) !important;
  left: 0 !important;
  width: 100% !important;
  min-width: 0 !important;
  z-index: 61 !important;
}

body[data-active-feature="free-generate"] #inline-model-section [data-inline-model-hint] {
  display: none !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-option-content {
  display: grid !important;
  grid-template-columns: 24px minmax(0, 1fr) !important;
  align-items: center !important;
  gap: 9px !important;
  width: min(210px, 100%) !important;
  min-width: 0 !important;
  max-width: 100% !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-option-logo {
  flex: 0 0 auto !important;
  box-sizing: border-box !important;
  width: 24px !important;
  height: 24px !important;
  padding: 3px !important;
  border: 1px solid rgba(216, 214, 232, 0.92) !important;
  border-radius: 7px !important;
  background: #ffffff !important;
  box-shadow: 0 2px 5px rgba(35, 40, 62, 0.06) !important;
  object-fit: contain !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-option-label {
  /* The label must never auto-place into the fixed-width avatar column. */
  grid-column: 2 !important;
  overflow: hidden !important;
  min-width: 0 !important;
  line-height: 1.2 !important;
  text-align: left !important;
  text-overflow: clip !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-option {
  padding-top: 6px !important;
  padding-bottom: 6px !important;
}

body[data-active-feature="free-generate"] #inline-model-section .inline-model-option.selected .inline-model-option-logo {
  border-color: rgba(255, 255, 255, 0.78) !important;
  box-shadow: 0 3px 8px rgba(47, 36, 117, 0.16) !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #generate-count-box > .generate-count-section {
  grid-column: 2 !important;
  grid-row: 2 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #generate-count-box > .generation-resolution-section {
  grid-column: 3 !important;
  grid-row: 2 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"][data-active-feature="free-generate"] #generate {
  grid-column: 1 / -1 !important;
  grid-row: 3 !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section {
  padding: 0 !important;
  border: 1px solid rgba(123, 97, 255, 0.18) !important;
  border-radius: 16px !important;
  background: linear-gradient(180deg, #ffffff 0%, #faf9ff 100%) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.85), 0 8px 18px rgba(66, 57, 132, 0.06) !important;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .free-ratio-heading {
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .mobile-free-ratio-toggle {
  position: relative !important;
  display: grid !important;
  grid-template-columns: 30px minmax(0, 1fr) 12px !important;
  grid-template-rows: auto auto !important;
  align-items: center !important;
  align-content: center !important;
  justify-items: start !important;
  gap: 2px 7px !important;
  width: 100% !important;
  min-width: 0 !important;
  min-height: 58px !important;
  padding: 8px 9px !important;
  border: 0 !important;
  border-radius: 16px !important;
  color: #30384d !important;
  background: transparent !important;
  font-family: inherit !important;
  text-align: left !important;
  cursor: pointer !important;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .mobile-free-ratio-toggle > .lucide {
  grid-column: 1 !important;
  grid-row: 1 / 3 !important;
  align-self: center !important;
  box-sizing: content-box !important;
  width: 18px !important;
  height: 18px !important;
  padding: 4px !important;
  border-radius: 8px !important;
  color: #7869df !important;
  background: rgba(123, 97, 255, 0.07) !important;
  stroke-width: 1.75 !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .mobile-free-ratio-toggle > span {
  grid-column: 2 !important;
  grid-row: 1 !important;
  align-self: end !important;
  color: #30384d !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .mobile-free-ratio-toggle > strong {
  grid-column: 2 !important;
  grid-row: 2 !important;
  overflow: hidden !important;
  align-self: start !important;
  max-width: 100% !important;
  color: #7162e8 !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.15 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .mobile-free-ratio-toggle::after {
  grid-column: 3 !important;
  grid-row: 1 / 3 !important;
  content: "" !important;
  width: 7px !important;
  height: 7px !important;
  border-right: 2px solid rgba(113, 98, 232, 0.52) !important;
  border-bottom: 2px solid rgba(113, 98, 232, 0.52) !important;
  transform: rotate(45deg) translateY(-2px) !important;
  transition: transform 0.16s ease !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section.is-open {
  border-color: rgba(123, 97, 255, 0.38) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.9), 0 12px 24px rgba(92, 76, 180, 0.1) !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section.is-open .mobile-free-ratio-toggle::after {
  transform: rotate(225deg) translate(-2px, -2px) !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .free-generate-option-grid {
  position: absolute !important;
  left: 0 !important;
  right: 0 !important;
  bottom: calc(100% + 8px) !important;
  z-index: 80 !important;
  display: none !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
  width: min(410px, calc(300% + 20px)) !important;
  padding: 12px !important;
  padding-bottom: 12px !important;
  border: 1px solid rgba(123, 97, 255, 0.16) !important;
  border-radius: 16px !important;
  background: #ffffff !important;
  box-shadow: 0 18px 38px rgba(36, 39, 64, 0.16) !important;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section.is-open .free-generate-option-grid {
  display: grid !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .free-generate-option-grid button {
  display: grid !important;
  grid-template-rows: 26px auto !important;
  place-items: center !important;
  gap: 3px !important;
  min-width: 0 !important;
  min-height: 50px !important;
  padding: 6px 4px !important;
  border: 1px solid rgba(123, 97, 255, 0.14) !important;
  border-radius: 12px !important;
  color: #4d5368 !important;
  background: #fbfbff !important;
  box-sizing: border-box !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .free-generate-option-grid button span {
  overflow: hidden !important;
  max-width: 100% !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
  text-overflow: ellipsis !important;
  white-space: nowrap !important;
}

body.feature-focus-mode.workstation-feature-mode #free-bottom-ratio-section .free-generate-option-grid button.selected {
  border-color: rgba(123, 97, 255, 0.68) !important;
  color: #5b4bf0 !important;
  background: #f7f4ff !important;
  box-shadow: inset 0 0 0 1px rgba(123, 97, 255, 0.14) !important;
}

/* Final prompt treatment: free generate uses the workstation prompt field. */
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box {
  display: grid !important;
  grid-template-columns: max-content max-content minmax(0, 1fr) !important;
  grid-template-rows: auto auto auto !important;
  align-items: center !important;
  gap: 8px 10px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box::before {
  content: none !important;
  display: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box > span {
  grid-column: 1 / -1 !important;
  grid-row: 1 !important;
  min-height: auto !important;
  color: #30384d !important;
  font-size: 14px !important;
  font-weight: 560 !important;
  line-height: 1.25 !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt {
  grid-column: 1 / -1 !important;
  grid-row: 2 !important;
  box-sizing: border-box !important;
  width: 100% !important;
  min-height: 320px !important;
  height: 320px !important;
  max-height: 520px !important;
  padding: 16px 17px 58px !important;
  overflow-x: hidden !important;
  overflow-y: hidden !important;
  overscroll-behavior: contain !important;
  scrollbar-width: thin !important;
  scrollbar-color: rgba(111, 101, 151, 0.5) transparent !important;
  border: 1px solid rgba(214, 210, 236, 0.96) !important;
  border-radius: 14px !important;
  color: #20263a !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(105, 91, 164, 0.055) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  resize: none !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt.is-scrollable {
  overflow-y: auto !important;
  scrollbar-gutter: stable !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt::-webkit-scrollbar {
  width: 9px;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt::-webkit-scrollbar-track {
  margin-block: 10px;
  background: transparent;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt::-webkit-scrollbar-thumb {
  min-height: 38px;
  border: 2px solid transparent;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(139, 124, 205, 0.52), rgba(103, 88, 173, 0.62)) padding-box;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(121, 102, 210, 0.72), rgba(91, 75, 184, 0.78)) padding-box;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column .extra-prompt-box #extra-prompt::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #task-panel .settings-column .extra-prompt-box:has(> #video-material-mention:not([hidden])) > #video-material-mention {
  grid-column: 2 !important;
  grid-row: 2 !important;
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  align-self: end !important;
  justify-self: start !important;
  margin: 0 0 14px !important;
}

html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #task-panel .settings-column .extra-prompt-box > .pet-product-main-copy-inline-actions {
  display: contents !important;
}

html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #task-panel .settings-column .extra-prompt-box #prompt-optimize-button {
  grid-column: 1 !important;
  grid-row: 2 !important;
  position: relative !important;
  inset: auto !important;
  z-index: 2 !important;
  align-self: end !important;
  justify-self: start !important;
  margin: 0 0 14px 16px !important;
}
body[data-active-feature="free-generate"] .free-page-composer,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-page-composer {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

body[data-active-feature="free-generate"] .free-page-prompt,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .free-page-prompt {
  position: relative !important;
  display: grid !important;
  min-height: 0 !important;
  gap: 8px !important;
}

body[data-active-feature="free-generate"] #free-page-prompt,
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #free-page-prompt {
  min-height: 280px !important;
  height: 280px !important;
  max-height: 280px !important;
  padding: 16px 17px 58px !important;
  border: 1px solid rgba(214, 210, 236, 0.96) !important;
  border-radius: 14px !important;
  color: #20263a !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(105, 91, 164, 0.055) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  resize: none !important;
}

/* Hard fallback: the free page can be visible before body state classes are synced. */
#free-generate-page .free-page-composer {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
}

#free-generate-page .free-page-prompt {
  position: relative !important;
  min-height: 0 !important;
  gap: 8px !important;
}

#free-generate-page #free-page-prompt {
  min-height: 280px !important;
  height: 280px !important;
  max-height: 280px !important;
  padding: 16px 17px 58px !important;
  border: 1px solid rgba(214, 210, 236, 0.96) !important;
  border-radius: 14px !important;
  color: #20263a !important;
  background: #ffffff !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 10px 22px rgba(105, 91, 164, 0.055) !important;
  font-size: 14px !important;
  line-height: 1.65 !important;
  resize: none !important;
}

#free-generate-page #free-page-prompt:focus {
  border-color: rgba(109, 85, 238, 0.55) !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(109, 85, 238, 0.08), 0 12px 24px rgba(105, 91, 164, 0.08) !important;
}

#free-generate-page .free-prompt-optimize-button {
  position: static !important;
  z-index: 2 !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 4px !important;
  min-height: 34px !important;
  padding: 0 14px !important;
  border: 1px solid rgba(91, 73, 230, 0.42) !important;
  border-radius: 999px !important;
  color: #5b4be8 !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.18) !important;
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 1 !important;
  cursor: pointer !important;
  transition: border-color 0.16s ease, color 0.16s ease, background 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease !important;
}

#free-generate-page .free-prompt-optimize-button .lucide {
  width: 13px !important;
  height: 13px !important;
  stroke-width: 2.2 !important;
}

#free-generate-page .free-prompt-optimize-button span {
  font-weight: 450 !important;
  -webkit-font-smoothing: antialiased !important;
}

#free-generate-page .free-prompt-optimize-button:hover:not(:disabled) {
  border-color: rgba(91, 73, 230, 0.5) !important;
  color: #ffffff !important;
  background: #5b4be8 !important;
  box-shadow: 0 12px 24px rgba(91, 73, 230, 0.2) !important;
  transform: translateY(-1px) !important;
}

#free-generate-page .free-prompt-optimize-button:disabled {
  color: #5b4be8 !important;
  border-color: rgba(91, 73, 230, 0.32) !important;
  background: #ffffff !important;
  box-shadow: 0 10px 20px rgba(91, 73, 230, 0.1) !important;
  cursor: not-allowed !important;
}

#free-generate-page .free-prompt-optimize-button.is-busy {
  color: #ffffff !important;
  background: #5b4be8 !important;
  cursor: wait !important;
}

/* Free-generate upload sources. Real buttons share one centered flex layout. */
body[data-active-feature="free-generate"] #product-upload {
  position: relative !important;
  pointer-events: auto !important;
}
/* Cached first paint can show hover before the application is ready for clicks. */
body.workbench-first-frame-restored[data-active-feature="free-generate"] #product-upload .free-upload-actions button {
  pointer-events: none;
}
.free-upload-actions { display: none; }
body[data-active-feature="free-generate"] #product-upload .free-upload-actions {
  display: flex;
  justify-content: center;
  gap: 10px;
  width: 100%;
  grid-column: 1 / -1;
}
body[data-active-feature="free-generate"] #product-upload .free-upload-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 1 115px;
  min-width: 0;
  height: 38px;
  padding: 0 8px;
  box-sizing: border-box;
  border: 1px solid #dbe2ec;
  border-radius: 9px;
  background: #fff;
  color: #303846;
  font-family: inherit;
  line-height: 1.2;
  font-size: 14px;
  font-weight: 400;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: 0 2px 4px #1d35570a;
  transition: none !important;
}
body[data-active-feature="free-generate"] #product-upload .free-upload-actions button:is(:hover, :focus-visible) {
  background: #2678ff;
  border-color: #2678ff;
  color: #fff;
}
.free-upload-actions svg { width: 16px; height: 16px; flex: 0 0 16px; }
body[data-active-feature="free-generate"] .free-upload-progress-surface {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  aspect-ratio: 3 / 4;
  border: 1px solid #e2e6f2;
  border-radius: 10px;
  background: #f4f6fb;
  color: #81889b;
  font-size: 12px;
  font-weight: 400;
}
body[data-active-feature="free-generate"] .free-upload-spinner {
  width: 20px;
  height: 20px;
  border: 2px solid #dce3f4;
  border-top-color: #6475ed;
  border-radius: 50%;
  animation: free-upload-spin .8s linear infinite;
}
@keyframes free-upload-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  body[data-active-feature="free-generate"] .free-upload-spinner { animation: none; }
}
.free-upload-actions button:focus-visible { outline: 2px solid #4388ff; outline-offset: 2px; }
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) {
  display: grid !important;
  align-content: center !important;
  justify-items: center !important;
  min-height: 170px !important;
  padding: 20px 16px 46px !important;
  gap: 10px !important;
  box-sizing: border-box !important;
  border: 1px dashed #d9e1ee !important;
  border-radius: 12px !important;
  background: #f7f8fa !important;
  transition: none !important;
}
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)):is(:hover, :focus-within) {
  border-color: #4388ff !important;
  background: #eef5ff !important;
}
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .upload-column #product-upload .upload-icon {
  display: block !important;
  width: 52px !important;
  height: 52px !important;
  border-radius: 0 !important;
  background: url("/images/site-assets/free-upload-folder.png") center/contain no-repeat !important;
  box-shadow: none !important;
}
body[data-active-feature="free-generate"] #product-upload .upload-icon > *,
body[data-active-feature="free-generate"] #product-upload .free-upload-illustration { display: none !important; }
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) .upload-copy { display: grid !important; gap: 6px !important; }
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) #upload-title {
  font-size: 14px !important;
  font-weight: 500 !important;
  color: #303846 !important;
}
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) #upload-note {
  font-size: 12px !important;
  font-weight: 400 !important;
  color: #8b93a5 !important;
}
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) .free-upload-actions {
  position: absolute;
  bottom: 16px;
  left: 16px;
  width: calc(100% - 32px);
  opacity: 0;
  pointer-events: none;
}
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)):is(:hover, :focus-within) .free-upload-actions {
  opacity: 1;
  pointer-events: auto;
}
body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)):is(:hover, :focus-within) #upload-note { visibility: hidden; }
@media (hover: none) {
  body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) .free-upload-actions { opacity: 1; pointer-events: auto; }
  body[data-active-feature="free-generate"] #product-upload:has(#detail-upload-strip:is([hidden], :empty)) #upload-note { visibility: hidden; }
}
.free-phone-card { position: relative; width: min(420px, 90vw); text-align: center; padding: 28px; }
.free-phone-close { position: absolute; top: 8px; right: 12px; border: 0; background: transparent; font-size: 24px; cursor: pointer; }
.free-phone-qr { width: 230px; max-width: 100%; aspect-ratio: 1; margin: 12px auto; }
.free-phone-tip { color: #798395; font-size: 12px; font-weight: 400; }
.free-phone-upload-status { font-size: 14px; }

/* Visible workstation prompt controls: keep the material button clickable and inside the viewport. */
body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-column {
  grid-template-rows: minmax(0, 1fr) auto !important;
  gap: 12px !important;
  overflow: hidden !important;
}

body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"] .settings-scroll-area {
  display: grid !important;
  min-height: 0 !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
}

/* The enlarged upload card can leave less than one prompt row on short
 * desktop viewports. Scroll the complete settings stack instead of shrinking
 * the prompt host and letting its textarea overlap the fixed controls. */
@media (min-width: 981px) and (max-height: 800px) {
  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"]
    #task-panel .settings-column {
    grid-template-rows: max-content max-content !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"]
    #task-panel .settings-scroll-area {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode.workstation-feature-mode[data-active-feature="free-generate"]
    #task-panel .settings-scroll-area > .extra-prompt-box {
    align-self: start !important;
    height: auto !important;
  }
}

/* Use the same pure white canvas for every desktop feature workbench. */
@media (min-width: 981px) {
  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode:not(.library-focus-mode)
    .main-area {
    background: #ffffff !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode:not(.library-focus-mode)
    .content-grid {
    background: #ffffff !important;
    background-image: none !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode:not(.library-focus-mode)
    .workspace {
    background: transparent !important;
    background-image: none !important;
  }

  html:not([data-mobile-workbench="true"])
    body.feature-focus-mode:not(.library-focus-mode)
    .task-panel {
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    background-image: none !important;
    box-shadow: none !important;
  }
}
