.image-to-psd-card-media {
  position: relative;
  display: grid !important;
  place-items: center;
  overflow: hidden;
  background: #f3f5fb !important;
}

.image-to-psd-card-layer {
  position: absolute;
  width: 44%;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(86, 96, 212, .22);
  border-radius: 10px;
  background: rgba(255, 255, 255, .84);
  box-shadow: 0 10px 24px rgba(76, 83, 165, .12);
}

.image-to-psd-card-layer-back { transform: translate(-18%, -13%) rotate(-7deg); }
.image-to-psd-card-layer-middle { transform: translate(0, 0); }
.image-to-psd-card-layer-front {
  display: grid;
  place-items: center;
  color: #5f69d7;
  transform: translate(18%, 13%) rotate(7deg);
}
.image-to-psd-card-layer-front svg { width: 28px; height: 28px; }

body.image-to-psd-active #preview-frame > :not(.image-to-psd-stage),
body.image-to-psd-active .upload-column,
body.image-to-psd-active #generate-count-box,
body.image-to-psd-active #extra-prompt-wrap,
body.image-to-psd-active .extra-prompt-wrap,
body.image-to-psd-active #feature-experience {
  display: none !important;
}

html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] #task-panel #generate-count-box,
html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] #task-panel #generate-count-box > .generate-count-section,
html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] #task-panel #generate-count-box > .generation-resolution-section {
  display: none !important;
}

html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] #task-panel.task-panel {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) auto !important;
  gap: 14px !important;
}

body.image-to-psd-active #task-panel > .task-heading {
  display: grid !important;
  grid-column: 1 / 2 !important;
  grid-row: 1 !important;
  align-self: start !important;
}

body.image-to-psd-active .task-body {
  display: contents !important;
}

body.image-to-psd-active.workstation-feature-mode .settings-column {
  grid-column: 1 / 2 !important;
  grid-row: 2 / 4 !important;
  align-self: stretch !important;
  height: 100% !important;
}

body.image-to-psd-active.workstation-feature-mode .preview-column {
  grid-column: 2 / 3 !important;
  grid-row: 1 / 3 !important;
  align-self: stretch !important;
  padding-left: 0 !important;
}

body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] .settings-scroll-area > :not(#settings-card),
body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] .generate-action-row > :not(#generate) {
  display: none !important;
}

body.image-to-psd-active .generate-action-row #generate { width: 100%; }
body.image-to-psd-active #ai-operation-assistant { display: none !important; }

html body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] main.content-grid #task-panel .task-body .settings-column #settings-card,
html body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] main.content-grid #task-panel .task-body .settings-column #settings-card:hover {
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  box-shadow: none !important;
}

html body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] main.content-grid #task-panel .task-body .settings-column #settings-card::before,
html body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] main.content-grid #task-panel .task-body .settings-column #settings-card::after {
  content: none !important;
  display: none !important;
}

body.image-to-psd-active #settings-card > .settings-head { display: none !important; }

body.image-to-psd-active #preview-canvas,
body.image-to-psd-active #preview-frame {
  width: 100%;
  height: 100%;
  min-height: 620px;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: hidden;
}

body.image-to-psd-active #preview-frame {
  max-width: none !important;
  max-height: none !important;
}

.image-to-psd-stage {
  display: none;
  width: 100%;
  height: 100%;
  min-height: 620px;
}

body.image-to-psd-active .image-to-psd-stage { display: block; }

.image-to-psd-workspace {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 620px;
}

.image-to-psd-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.image-to-psd-workspace.has-layers .image-to-psd-main {
  grid-template-columns: minmax(224px, 254px) minmax(0, 1fr);
  gap: 14px;
}

.image-to-psd-preview-area {
  display: grid;
  grid-template-rows: minmax(0, 1fr) auto;
  gap: 12px;
  min-width: 0;
  min-height: 0;
  height: 100%;
}

.image-to-psd-preview-surface {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: 8px 4px;
  overflow: visible;
  background: transparent;
}

.image-to-psd-preview-surface.is-empty { min-height: 520px; }

.image-to-psd-preview-surface > canvas,
.image-to-psd-preview-surface > img {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 100%;
  max-height: 100%;
  object-fit: contain;
}

.image-to-psd-preview-surface:has([data-psd-composite]) { cursor: default; }
.image-to-psd-preview-surface.is-moving-layer { cursor: grabbing; }

.image-to-psd-selection-outline {
  position: absolute;
  z-index: 3;
  border: 2px solid #5f69d7;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .95), 0 6px 18px rgba(49, 58, 160, .18);
  pointer-events: none;
  touch-action: none;
  will-change: left, top;
}

.image-to-psd-selection-outline::before,
.image-to-psd-selection-outline::after {
  content: "";
  position: absolute;
  width: 7px;
  height: 7px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #5f69d7;
  box-shadow: 0 0 0 1px #5f69d7;
}
.image-to-psd-selection-outline::before { top: -5px; left: -5px; }
.image-to-psd-selection-outline::after { right: -5px; bottom: -5px; }
.image-to-psd-selection-outline > span {
  position: absolute;
  bottom: calc(100% + 6px);
  left: -2px;
  max-width: 170px;
  padding: 4px 7px;
  overflow: hidden;
  border-radius: 6px;
  background: #5964c9;
  color: #fff;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
  pointer-events: none;
}

.image-to-psd-processing {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(247, 248, 252, .58);
  backdrop-filter: blur(3px);
}

.image-to-psd-processing svg {
  width: 32px;
  height: 32px;
  color: #6570d6;
  animation: image-to-psd-spin 1s linear infinite;
}

@keyframes image-to-psd-spin { to { transform: rotate(360deg); } }

.image-to-psd-layer-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  overflow: hidden;
  border: 1px solid #e8eaf1;
  border-radius: 14px;
  background: rgba(255, 255, 255, .86);
}

.image-to-psd-layer-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 44px;
  padding: 0 12px;
  border-bottom: 1px solid #eceef4;
}

.image-to-psd-layer-panel-head strong { flex: none; color: #2f3444; font-size: 13px; }
.image-to-psd-layer-panel-head small { color: #969baa; font-size: 10px; white-space: nowrap; }
.image-to-psd-layer-list {
  display: grid;
  align-content: start;
  gap: 4px;
  min-height: 0;
  padding: 7px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.image-to-psd-layer-panel-footer {
  display: flex;
  justify-content: center;
  padding: 11px 12px 12px;
  border-top: 1px solid #eceef4;
}

.image-to-psd-layer-panel-footer button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(194px, 100%);
  min-height: 44px;
  padding: 9px 16px;
  border: 1px solid #d8dcf2;
  border-radius: 10px;
  background: #f7f8ff;
  color: #5964c7;
  cursor: pointer;
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1;
  transition: border-color .16s ease, background .16s ease, transform .16s ease;
}
.image-to-psd-layer-panel-footer button:hover:not(:disabled) { border-color: #aeb5e7; background: #eef0ff; transform: translateY(-1px); }
.image-to-psd-layer-panel-footer button:disabled { opacity: .45; cursor: default; }
.image-to-psd-layer-panel-footer svg { width: 16px; height: 16px; }

.image-to-psd-layer-row {
  position: relative;
  display: grid;
  grid-template-columns: 14px 46px minmax(0, 1fr) 28px 28px;
  align-items: center;
  gap: 7px;
  min-width: 0;
  min-height: 58px;
  padding: 5px 6px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: #343847;
  cursor: default;
  transition: border-color .16s ease, background .16s ease, opacity .16s ease;
}

.image-to-psd-layer-row[draggable="true"] { cursor: grab; }
.image-to-psd-layer-row[draggable="true"]:active { cursor: grabbing; }
.image-to-psd-layer-row:hover { background: #f6f7fa; }
.image-to-psd-layer-row.selected { border-color: #d8dcf6; background: #f2f4ff; }
.image-to-psd-layer-row.is-hidden { opacity: .48; }
.image-to-psd-layer-row.is-drop-target { border-color: transparent; background: #f6f7ff; }
.image-to-psd-layer-row.is-drop-before::before,
.image-to-psd-layer-row.is-drop-after::after {
  content: "";
  position: absolute;
  right: 4px;
  left: 4px;
  z-index: 4;
  height: 2px;
  border-radius: 2px;
  background: #5f69d7;
  box-shadow: 0 0 0 1px rgba(95, 105, 215, .12);
  pointer-events: none;
}
.image-to-psd-layer-row.is-drop-before::before { top: -3px; }
.image-to-psd-layer-row.is-drop-after::after { bottom: -3px; }
.image-to-psd-layer-row.is-dragging-layer { opacity: .38; }

.image-to-psd-layer-drag {
  display: grid;
  place-items: center;
  color: #a8acb8;
}
.image-to-psd-layer-drag svg { width: 14px; height: 14px; }

.image-to-psd-layer-thumb {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  overflow: hidden;
  border: 1px solid #e5e7ed;
  border-radius: 8px;
  background-color: #fff;
  background-image: linear-gradient(45deg, #eff0f4 25%, transparent 25%), linear-gradient(-45deg, #eff0f4 25%, transparent 25%), linear-gradient(45deg, transparent 75%, #eff0f4 75%), linear-gradient(-45deg, transparent 75%, #eff0f4 75%);
  background-size: 10px 10px;
  background-position: 0 0, 0 5px, 5px -5px, -5px 0;
}
.image-to-psd-layer-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; }

.image-to-psd-layer-copy { display: grid; gap: 3px; min-width: 0; }
.image-to-psd-layer-copy strong,
.image-to-psd-layer-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.image-to-psd-layer-copy strong { font-size: 11px; font-weight: 500; }
.image-to-psd-layer-copy small { color: #989ca9; font-size: 9px; }

.image-to-psd-layer-download,
.image-to-psd-layer-visibility {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  padding: 0;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: #808594;
  cursor: pointer;
}
.image-to-psd-layer-download:hover,
.image-to-psd-layer-visibility:hover { background: #fff; color: #5964ca; }
.image-to-psd-layer-download { color: #8a8f9e; }
.image-to-psd-layer-visibility:disabled { cursor: default; }
.image-to-psd-layer-download svg,
.image-to-psd-layer-visibility svg { width: 15px; height: 15px; }

body.image-to-psd-active #task-panel > #task-recent-panel {
  position: static !important;
  display: grid !important;
  grid-column: 2 / 3 !important;
  grid-row: 3 !important;
  grid-template-columns: 66px minmax(0, 1fr) !important;
  width: 100% !important;
  min-height: 138px !important;
  margin: 0 !important;
  padding: 8px !important;
  border: 1px solid #e8eaf1 !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .72) !important;
  box-shadow: none !important;
}

body.image-to-psd-active #task-panel > #task-recent-panel[hidden] { display: none !important; }
body.image-to-psd-active #task-panel > #task-recent-panel .task-recent-gallery { min-width: 0; }
.image-to-psd-recent-state {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 8px;
  min-height: 100px;
  padding: 8px;
  color: inherit;
  font-size: 13px;
  font-weight: 400;
}
.image-to-psd-recent-state button {
  padding: 4px 10px;
  border: 1px solid currentColor;
  border-radius: 6px;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: 500;
  cursor: pointer;
}
body.image-to-psd-active #task-panel > #task-recent-panel .image-to-psd-recent-item .task-recent-card {
  cursor: pointer;
}
body.image-to-psd-active #task-panel > #task-recent-panel .image-to-psd-recent-item em {
  position: absolute;
  right: 5px;
  bottom: 5px;
  left: auto;
  max-width: calc(100% - 10px);
  padding: 3px 5px;
  border-radius: 5px;
  background: rgba(43, 47, 61, .72);
  color: #fff;
  font-size: 9px;
  font-style: normal;
  transform: none;
}

.image-to-psd-settings { display: grid; gap: 14px; width: 100%; min-width: 0; max-width: 100%; }
.image-to-psd-settings section { min-width: 0; border: 0; background: transparent; }
.image-to-psd-control-settings-groups {
  display: grid;
  gap: 10px;
  min-width: 0;
}
.image-to-psd-settings-card {
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, .52);
}
.image-to-psd-settings section.image-to-psd-settings-card {
  border: 1px solid #dfe3ef;
  border-radius: 12px;
  background: rgba(255, 255, 255, .52);
  padding: 12px 10px !important;
}

.image-to-psd-upload-section { padding: 0 !important; }
.image-to-psd-upload-card {
  position: relative;
  display: grid !important;
  grid-template-columns: 54px minmax(0, 1fr) !important;
  grid-template-rows: auto !important;
  align-items: center !important;
  justify-items: stretch !important;
  gap: 12px !important;
  width: 100% !important;
  min-height: 136px !important;
  padding: 16px !important;
  border: 1px dashed #cfd4e4 !important;
  border-radius: 14px !important;
  background: #fbfcff !important;
  color: #333849 !important;
  text-align: left !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.image-to-psd-upload-card:hover { border-color: #7a82dc !important; background: #f7f8ff !important; }
.image-to-psd-upload-card .upload-icon {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: #eef1ff;
  color: #6370d7;
}
.image-to-psd-upload-card .upload-icon svg { width: 24px; height: 24px; }
.image-to-psd-upload-card .upload-copy { grid-column: 2; grid-row: 1; display: grid; gap: 5px; min-width: 0; }
.image-to-psd-upload-card .upload-copy strong { font-size: 14px; }
.image-to-psd-upload-card .upload-copy small { overflow: hidden; color: #8d92a2; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }

.image-to-psd-upload-card.is-filled { grid-template-columns: 72px minmax(0, 1fr) !important; }
.image-to-psd-upload-card.is-filled .upload-icon { display: none; }
.image-to-psd-upload-thumb {
  cursor: zoom-in;
  grid-column: 1;
  grid-row: 1;
  width: 72px;
  height: 86px;
  border-radius: 10px;
  object-fit: cover;
}
.image-to-psd-upload-card.is-filled > .image-to-psd-upload-thumb {
  display: block !important;
  width: 72px !important;
  height: 86px !important;
  margin: 0 !important;
  object-fit: cover !important;
}
.image-to-psd-upload-card.is-dragging-file {
  border-color: #6570d7 !important;
  background: #f3f4ff !important;
  box-shadow: 0 0 0 2px rgba(101, 112, 215, .12) inset;
}
.image-to-psd-upload-card.is-filled .upload-copy { grid-column: 2; }

.image-to-psd-resolution.image-to-psd-settings-card { padding: 2px 6px !important; }
.image-to-psd-section-head { display: flex; align-items: center; min-height: 24px; margin-bottom: 9px; }
.image-to-psd-section-head strong { color: #353a4a; font-size: 14px; font-weight: 700; }
.image-to-psd-resolution-grid { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; width: 100%; min-width: 0; }
.image-to-psd-resolution-grid button {
  position: relative;
  display: grid;
  place-items: center;
  gap: 3px;
  min-width: 0;
  min-height: 46px;
  padding: 8px 4px;
  border: 1px solid #e0e3ec;
  border-radius: 9px;
  background: #fff;
  color: #3b3f4e;
  text-align: center;
  cursor: pointer;
}
.image-to-psd-resolution-grid button:hover { border-color: #bfc5e8; }
.image-to-psd-resolution-grid button.selected { border-color: #6570d7; background: #f1f3ff; box-shadow: 0 0 0 1px #6570d7 inset; color: #4d58bb; }
.image-to-psd-resolution-grid strong { font-size: 15px; font-weight: 500; line-height: 1.1; }

.image-to-psd-message {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  margin: 0;
  padding: 9px 11px;
  border-radius: 9px;
  background: #f1f2f6;
  color: #6a6e7e;
  font-size: 11px;
  line-height: 1.5;
  overflow-wrap: anywhere;
  word-break: break-word;
  white-space: normal;
}
.image-to-psd-message.error { background: #ffedef; color: #b83e4a; }

.image-to-psd-preview-footer {
  position: relative;
  min-height: 138px;
  padding: 0 4px 2px;
}
.image-to-psd-downloads,
.image-to-psd-download-actions { display: grid; grid-template-columns: minmax(0, 1fr); gap: 9px; }
.image-to-psd-download-actions {
  width: min(316px, calc(50% - 150px));
  min-width: 280px;
}
.image-to-psd-downloads button,
.image-to-psd-download-actions button,
.image-to-psd-regenerate,
.image-to-psd-retry {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  justify-content: stretch;
  gap: 10px;
  min-height: 62px;
  padding: 9px 13px;
  border: 1px solid #dfe2ec;
  border-radius: 9px;
  background: #fff;
  color: #5964c7;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.image-to-psd-downloads button.primary,
.image-to-psd-download-actions button.primary { border-color: #606bcc; background: #606bcc; color: #fff; box-shadow: 0 8px 18px rgba(75, 86, 190, .16); }
.image-to-psd-download-actions button:hover:not(:disabled),
.image-to-psd-regenerate:hover:not(:disabled) { border-color: #aeb5e7; background: #f7f8ff; transform: translateY(-1px); }
.image-to-psd-download-actions button.primary:hover:not(:disabled) { border-color: #5661c3; background: #5661c3; box-shadow: 0 10px 22px rgba(75, 86, 190, .22); }
.image-to-psd-download-actions button:disabled,
.image-to-psd-regenerate:disabled { cursor: not-allowed; opacity: .55; }
.image-to-psd-download-actions button.primary:disabled { border-color: #d9dce8; background: #e8eaf2; box-shadow: none; color: #8c91a0; opacity: 1; }
.image-to-psd-download-actions button > span:last-child,
.image-to-psd-regenerate > span:last-child { display: grid; gap: 4px; min-width: 0; }
.image-to-psd-download-actions button strong,
.image-to-psd-regenerate strong { overflow: hidden; font-size: 15px; font-weight: 650; letter-spacing: .01em; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.image-to-psd-download-actions button small,
.image-to-psd-regenerate small { overflow: hidden; color: #8b91a1; font-size: 12px; font-weight: 450; line-height: 1.2; text-overflow: ellipsis; white-space: nowrap; }
.image-to-psd-download-actions button.primary small { color: rgba(255, 255, 255, .78); }
.image-to-psd-download-actions button.primary:disabled small { color: #9b9fad; }
.image-to-psd-action-icon { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: #f0f2ff; color: #5964c9; }
.image-to-psd-download-actions button.primary .image-to-psd-action-icon { background: rgba(255, 255, 255, .16); color: #fff; }
.image-to-psd-download-actions button.primary:disabled .image-to-psd-action-icon { background: #f3f4f8; color: #9297a6; }
.image-to-psd-downloads svg,
.image-to-psd-download-actions svg,
.image-to-psd-regenerate svg,
.image-to-psd-retry svg { width: 17px; height: 17px; }

.image-to-psd-regenerate {
  position: absolute;
  bottom: 2px;
  left: 50%;
  width: min(286px, calc(100% - 24px));
  transform: translateX(-50%);
  grid-template-columns: minmax(0, 1fr);
  min-height: 52px;
  padding: 8px 16px;
  border-style: dashed;
  border-color: rgba(108, 118, 195, .38);
  background: transparent;
  box-shadow: none;
  text-align: center;
}
.image-to-psd-regenerate strong { font-size: 14px; font-weight: 550; letter-spacing: 0; }
.image-to-psd-regenerate small { font-size: 11px; font-weight: 400; }
.image-to-psd-regenerate:hover:not(:disabled) { border-color: rgba(95, 105, 215, .66); background: rgba(244, 246, 255, .7); transform: translateX(-50%) translateY(-1px); }

.image-to-psd-retry { width: 100%; }

html[data-theme="dark"] .image-to-psd-layer-panel,
html[data-theme="dark"] body.image-to-psd-active .image-to-psd-recent-host #task-recent-panel,
html[data-theme="dark"] .image-to-psd-upload-card,
html[data-theme="dark"] .image-to-psd-settings-card,
html[data-theme="dark"] .image-to-psd-resolution-grid button,
html[data-theme="dark"] .image-to-psd-downloads button,
html[data-theme="dark"] .image-to-psd-download-actions button,
html[data-theme="dark"] .image-to-psd-regenerate,
html[data-theme="dark"] .image-to-psd-layer-panel-footer button,
html[data-theme="dark"] .image-to-psd-retry {
  border-color: #343845 !important;
  background: #20232b !important;
  color: #e8eaf1 !important;
}
html[data-theme="dark"] .image-to-psd-settings-card { background: rgba(32, 35, 43, .72) !important; }
html[data-theme="dark"] .image-to-psd-regenerate { border-color: rgba(151, 160, 232, .42) !important; background: transparent !important; }
html[data-theme="dark"] .image-to-psd-layer-panel-head { border-color: #343845; }
html[data-theme="dark"] .image-to-psd-layer-panel-head strong,
html[data-theme="dark"] .image-to-psd-section-head strong { color: #eceef5; }
html[data-theme="dark"] .image-to-psd-layer-count-help { color: #a99af0; }
html[data-theme="dark"] .image-to-psd-layer-row:hover,
html[data-theme="dark"] .image-to-psd-layer-row.selected { background: #292e3a; }
html[data-theme="dark"] .image-to-psd-processing { background: rgba(20, 23, 29, .62); }

@media (max-width: 1180px) {
  .image-to-psd-workspace.has-layers .image-to-psd-main { grid-template-columns: 218px minmax(0, 1fr); gap: 10px; }
  .image-to-psd-layer-row { grid-template-columns: 12px 42px minmax(0, 1fr) 26px 26px; gap: 5px; }
  .image-to-psd-layer-thumb { width: 42px; height: 42px; }
  .image-to-psd-preview-footer { display: grid; grid-template-columns: minmax(260px, 300px) minmax(220px, 1fr); gap: 12px; align-items: end; }
  .image-to-psd-download-actions { width: 100%; min-width: 0; }
  .image-to-psd-regenerate { position: static; justify-self: center; width: min(286px, 100%); transform: none; }
  .image-to-psd-regenerate:hover:not(:disabled) { transform: translateY(-1px); }
}

@media (max-width: 980px) {
  html:not([data-mobile-workbench="true"]) body.feature-focus-mode.workstation-feature-mode.image-to-psd-active[data-active-feature="image-to-psd"] #task-panel.task-panel { grid-template-columns: minmax(0, 1fr) !important; grid-template-rows: auto auto !important; }
  body.image-to-psd-active.workstation-feature-mode .settings-column,
  body.image-to-psd-active.workstation-feature-mode .preview-column { grid-column: 1 !important; grid-row: auto !important; }
  body.image-to-psd-active #preview-canvas,
  body.image-to-psd-active #preview-frame,
  .image-to-psd-stage,
  .image-to-psd-workspace { min-height: 520px; }
  .image-to-psd-workspace.has-layers .image-to-psd-main { grid-template-columns: minmax(0, 1fr); overflow: visible; }
  .image-to-psd-preview-surface { min-height: 360px; }
  .image-to-psd-preview-area { grid-row: auto; min-height: 460px; }
  .image-to-psd-layer-panel { max-height: 340px; }
  .image-to-psd-preview-footer { grid-template-columns: minmax(0, 1fr); min-height: 216px; }
  .image-to-psd-download-actions,
  .image-to-psd-regenerate { width: 100%; }
  body.image-to-psd-active #task-panel > #task-recent-panel { display: none !important; }
}
/* Capability errors have an explicit retry without changing task state. */
[data-psd-capabilities-retry] {
  padding: 2px 6px;
  border: 0;
  color: inherit;
  background: transparent;
  font: inherit;
  font-weight: 500;
  text-decoration: underline;
  cursor: pointer;
}
