/* The approved editor shell, mapped onto the native Argus workspace. */
[data-reference-editor] .ed-composer .recipe-batch {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
[data-reference-editor] .ed-composer .ed-output-modes {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
}
[data-reference-editor] .ed-composer .ed-output-modes button {
  min-height: 28px;
  padding: 3px 9px;
  border: 1px solid var(--nov05-editor-line);
  border-radius: var(--ref-r-2, 8px);
  background: var(--nov05-editor-bg);
  color: var(--nov05-editor-ink);
}
[data-reference-editor] .ed-composer .ed-output-modes button:is([aria-checked="true"],[aria-pressed="true"]) {
  background: var(--nov05-editor-accent);
  color: var(--ref-accent-ink);
}
[data-reference-editor] .ed-composer .gen-out-frames {
  grid-template-columns: repeat(auto-fit, minmax(min(132px, 100%), 1fr));
}
[data-reference-editor] .ed-composer .gen-out-frame {
  min-height: 30px;
  height: auto;
  border-radius: var(--ref-r-1, 7px);
  background: var(--nov05-editor-bg);
}
[data-reference-editor] .ed-composer .gen-out-frame > .api-model-picker {
  flex: 1 1 0;
  min-width: 0;
  overflow: hidden;
}
/* The editor and canvas capsule share the same generation controls. */
.editor-layer.ws[data-reference-editor] .ed-generation-unified
:is(.ed-generation-fields .gen-ctl, .ed-reference-heading, .ed-reference-actions button, [data-api-picker-open]) {
  font: 12px/1.35 var(--ref-f-ui);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .nov05-model-picker
:is(header button, [data-api-model-choice], [data-api-model-unavailable]) {
  font-family: inherit;
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .ed-reference-heading strong {
  font-weight: 500;
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .ed-reference-actions button {
  border-color: var(--ref-line);
  border-radius: var(--ref-r-2);
  background: var(--ref-surface);
  color: var(--ref-ink-2);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .ed-reference-actions button:enabled:hover {
  background: var(--ref-surface-2);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .ed-generation-references .gen-ref-add {
  display: grid;
  place-items: center;
  padding: 0;
  border: 1px dashed var(--ref-line-2);
  border-radius: var(--ref-r-1);
  background: var(--ref-surface-2);
  color: var(--ref-ink-2);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .gen-composer .gen-prompt-box {
  border-radius: var(--ref-r-2);
  background: var(--ref-surface-2);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .gen-composer .gen-prompt-box:focus-within {
  box-shadow: inset 0 0 0 1px var(--ref-ink-2);
}
.editor-layer.ws[data-reference-editor] .ed-generation-unified .gen-composer .gen-prompt-box [data-ed-composer-input] {
  background: transparent;
  color: var(--ref-ink);
  font: 14px/1.5 var(--ref-f-ui);
  outline: none;
}
[data-reference-editor] .ed-composer .ed-generation-inline-params {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-block: 6px;
}
.editor-layer.ws[data-reference-editor] .ws .ed-generation-inline-params > .ed-wf-params {
  display: flex;
  flex: 1 1 150px;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0;
}
.editor-layer.ws[data-reference-editor] .ws .ed-generation-inline-params .ed-wf-field {
  display: flex;
  flex: 1 1 68px;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  min-width: 0;
}
[data-reference-editor] .ed-composer .ed-generation-inline-params .ed-wf-field i { display: none; }
.editor-layer.ws[data-reference-editor] .ws .ed-generation-inline-params .ed-wf-field input {
  flex: 1;
  min-width: 42px;
  min-height: 30px;
  padding: 3px 5px;
}
[data-reference-editor] .ed-composer .ed-generation-inline-params > .gen-ctl {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
}
[data-reference-editor] .ed-composer .ed-generation-inline-params select[data-ai-input] {
  box-sizing: border-box;
  min-height: 30px;
  max-width: 100%;
  padding: 0 5px;
  border: 0;
  border-radius: var(--ref-r-1);
  background: transparent;
  color: var(--nov05-editor-ink);
  font: inherit;
  cursor: pointer;
}
[data-reference-editor] .ed-composer .ed-generation-inline-params select[data-ai-input]:enabled:hover {
  background: var(--nov05-editor-wash);
}
[data-reference-editor] .ed-composer .ed-generation-inline-params select[data-ai-input]:disabled {
  cursor: default;
}
@media (pointer: coarse) {
  [data-reference-editor] .ed-composer .ed-generation-inline-params select[data-ai-input] { min-height: 44px; }
  [data-reference-editor] .ed-composer :is(.ed-output-modes button, .gen-out-frame, .gen-out-frame [data-api-picker-open]) { min-height: 44px; }
}
.app-frame:has([data-reference-editor]) > .canvas-shell > .canvas-stage > :is(.zoom-control, .canvas-toolbar, .group-locations),
.app-frame:has([data-reference-editor]) > header {
  visibility: hidden;
  pointer-events: none;
}
html[data-argus-theme] .app-frame:has(.editor-layer.ws[data-reference-editor]) > .canvas-shell > :is(.left-rail, .sidebar:not(.aux-card--config,.aux-card--appearance)) {
  display: none;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] {
  --nov05-editor-bg: var(--ref-ed-bg, #c5c7c0);
  --nov05-editor-preview: var(--ref-ed-stage, #b9bbb4);
  --nov05-editor-paper: var(--ref-ed-surface, #d5d6d0);
  --nov05-editor-wash: var(--ref-surface-2, #e2e3dd);
  --nov05-editor-ink: var(--ref-ink, #151511);
  --nov05-editor-secondary: var(--ref-ink-2, #55564d);
  --nov05-editor-muted: var(--ref-ink-2, #55564d);
  --nov05-editor-line: var(--ref-line, rgba(21, 21, 17, .13));
  --nov05-editor-accent: var(--ref-accent, #151511);
  --nov05-editor-accent-deep: var(--ref-accent, #151511);
  --nov05-editor-accent-wash: var(--ref-surface-2, #e2e3dd);
}
.editor-layer.ws[data-reference-editor]::before {
  content: ""; position: absolute; inset: 0 auto 0 0;
  width: calc(var(--nov05-editor-context) + var(--ref-editor-reserved, 0px)); pointer-events: none;
  background: color-mix(in srgb, var(--ref-surface) 16%, transparent);
  backdrop-filter: blur(4px) saturate(.85);
  -webkit-backdrop-filter: blur(4px) saturate(.85);
}
.editor-layer.ws[data-reference-editor] {
  --nov05-editor-context: 22vw;
  --ref-editor-left: 60px;
  --ref-editor-right: 60px;
  --ref-editor-recipes: 336px;
  --ref-editor-film: 96px;
  --ref-editor-sheet: 0px;
  --ref-editor-recipe-inset: 0px;
  --ref-editor-layer-inset: 0px;
  font-family: var(--ref-f-ui, var(--nov05-font-data));
}
.editor-layer.ws[data-reference-editor]:is(.max, :not(.max)) > .ws {
  inset: 0 0 0 var(--nov05-editor-context);
  border: 0;
  border-radius: 10px 0 0 10px;
  background: var(--nov05-editor-bg);
  box-shadow: -30px 0 60px -20px rgb(0 0 0 / .35);
  overflow: hidden;
  max-width: none !important; /* The old narrow workspace cap adds a second, empty right gutter. */
}
[data-reference-editor] > .ws[data-ed-wf-open] {
  --ref-editor-recipe-inset: var(--ref-editor-recipes);
}
[data-reference-editor] > .ws[data-ed-operation-open] { --ref-editor-layer-inset: 234px; }
[data-reference-editor] > .ws > .ed-reference-left {
  position: absolute;
  z-index: 19;
  inset: 0 auto 0 0;
  width: var(--ref-editor-left);
  padding: 16px 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  border-right: 1px solid var(--nov05-editor-line);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-navigation-controls { display: none; }
[data-reference-editor] .ed-reference-left button,
[data-reference-editor] .ed-reference-header button,
[data-reference-editor] .ed-reference-stage-controls button,
[data-reference-editor] .ed-reference-compare {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  padding: 0;
  border: 0;
  border-radius: var(--ref-r-2);
  background: transparent;
  color: var(--nov05-editor-ink);
}
[data-reference-editor] .ed-reference-left button:enabled:is(:hover, [aria-expanded="true"]),
[data-reference-editor] .ed-reference-header button:hover,
[data-reference-editor] .ed-reference-stage-controls button:hover {
  background: var(--ref-line, rgb(0 0 0 / .13));
}
[data-reference-editor] .ed-reference-left > [aria-expanded="true"] {
  background: var(--nov05-editor-accent);
  color: var(--ref-accent-ink, #f1f1ea);
}
[data-reference-editor] > .ws > .ed-reference-header {
  position: absolute;
  z-index: 6;
  inset: 14px calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 14px) auto calc(var(--ref-editor-left) + 14px);
  height: 40px;
  padding-inline: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.ed-reference-header > div { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ed-reference-header > div > span {
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
  font: 400 19px/1.3 var(--ref-f-hand, var(--nov05-font-display));
}
.ed-reference-header small { white-space: nowrap; font: 11px var(--ref-f-mono, monospace); color: var(--nov05-editor-secondary); }
[data-reference-editor] .ed-reference-header button { flex: none; width: 40px; height: 40px; }
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:is([data-ed-operation-open], :not([data-ed-operation-open])) .ws-canvas {
  inset: 62px calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 14px) calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 26px) calc(var(--ref-editor-left) + var(--ref-editor-layer-inset) + 14px);
  width: auto;
  height: auto;
  margin: 0;
  border: 0;
  border-radius: var(--ref-r-3);
  background: var(--nov05-editor-preview);
}
[data-reference-editor] .ed-reference-stage-controls,
[data-reference-editor] .ed-reference-compare {
  position: absolute;
  z-index: 8;
  bottom: 16px;
  border-radius: var(--ref-r-2);
  background: var(--ref-surface, var(--nov05-editor-paper));
  box-shadow: var(--ref-shadow);
}
[data-reference-editor] .ed-reference-stage-controls { left: 16px; display: flex; align-items: center; height: 36px; padding-inline: 4px; }
[data-reference-editor] .ed-reference-stage-controls button { width: 30px; height: 30px; border-radius: var(--ref-r-2); font: 400 19px/1 var(--ref-f-ui, sans-serif); }
[data-reference-editor] .ed-reference-stage-controls output { padding-inline: 6px; font: 11px var(--ref-f-mono, monospace); }
[data-reference-editor] .ed-reference-compare { right: 16px; width: 40px; height: 40px; }
[data-reference-editor] .ed-reference-compare:disabled { opacity: .52; cursor: default; }
[data-reference-editor] .ed-reference-compare[hidden] { display: none; }

[data-reference-editor] .ed-wf-detailbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 4px 10px;
}
.editor-layer.ws[data-reference-editor] .ws .ed-wf-detailbar .ed-wf-head {
  display: contents;
}
[data-reference-editor] .ed-wf-detailbar .ed-wf-title {
  flex: 0 0 36px;
  min-height: 36px;
  display: grid;
  place-items: center;
}
[data-reference-editor] [data-wf-back] .ed-wf-back-icon {
  display: block;
  transition: transform 160ms var(--ref-ease);
}
[data-reference-editor] [data-wf-back]:is(:hover,:focus-visible) .ed-wf-back-icon { transform: translateX(-2px); }
[data-reference-editor] [data-wf-back]:active .ed-wf-back-icon { transform: translateX(-2px) scale(.92); }
@media (prefers-reduced-motion: reduce) {
  [data-reference-editor] [data-wf-back] .ed-wf-back-icon { transition: none; transform: none !important; }
}
[data-reference-editor] .ed-wf-detailbar .ed-wf-close { order: 1; }
[data-reference-editor] .ed-wf-detailbar .ed-wf-dhead {
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
[data-reference-editor] .ed-recipe-precision > summary {
  display: inline-grid;
  place-items: center;
  min-width: 36px;
  min-height: 36px;
  cursor: pointer;
  list-style: none;
  color: inherit;
}
[data-reference-editor] .ed-recipe-precision > summary::-webkit-details-marker { display: none; }
[data-reference-editor] .ed-op-pixels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px 12px;
  margin-bottom: 14px;
}
[data-reference-editor] .ed-op-pixels label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
}
[data-reference-editor] .ed-op-pixels input { width: 100%; font-variant-numeric: tabular-nums; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel > .ed-recipe-footer {
  flex: 0 0 auto;
  margin: 0;
  padding: 12px 14px;
  border-top: 1px solid var(--u6-line);
  background: var(--nov05-editor-paper);
}
[data-reference-editor] .ed-recipe-dimensions { display: grid; gap: 3px; margin-bottom: 10px; font-variant-numeric: tabular-nums; }
[data-reference-editor] .ed-recipe-dimensions small { color: var(--nov05-editor-secondary); font: inherit; font-size: 11px; }
[data-reference-editor] .ed-recipe-footer-actions { display: flex; gap: 8px; }
[data-reference-editor] .ed-recipe-footer-actions > button:first-child { flex: 0 0 40px; display: grid; place-items: center; }
[data-reference-editor] .ed-recipe-footer-actions > button:last-child { flex: 1; width: auto; }
[data-reference-editor] .ed-recipe-footer :is([data-op-pixel-status], .ed-recipe-run-status) { margin: 0 0 10px; font-size: 12px; overflow-wrap: anywhere; }
[data-reference-editor] .ed-recipe-footer .ed-recipe-compare { width: 100%; margin-top: 8px; }
@media (pointer: coarse) {
  [data-reference-editor] .ed-op-pixels input { font-size: 16px; min-height: 44px; }
  [data-reference-editor] .ed-recipe-footer-actions > button { min-height: 44px; }
}
[data-reference-editor] .ed-recipe-ratios {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
}
[data-reference-editor] .ed-recipe-ratios > button {
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 6px;
  min-height: 58px;
  padding: 4px 2px;
  border: 1px solid var(--u6-line);
  border-radius: var(--ref-r-1);
  background: transparent;
  color: inherit;
}
[data-reference-editor] .ed-recipe-ratios > button[aria-pressed="true"] {
  background: var(--nov05-editor-accent);
  color: var(--ref-accent-ink, #f1f1ea);
}
[data-reference-editor] .ed-recipe-ratios i { display: block; width: 22px; height: 15px; border: 1px solid currentColor; }
[data-reference-editor] [data-op-ratio-tile="free"] i { border-style: dashed; }
[data-reference-editor] [data-op-ratio-tile="1:1"] i { width: 19px; height: 19px; }
[data-reference-editor] [data-op-ratio-tile="4:3"] i { height: 17px; }
[data-reference-editor] [data-op-ratio-tile="9:16"] i { width: 12px; height: 21px; }
[data-reference-editor] .ed-recipe-size-presets { grid-template-columns: repeat(3,minmax(0,1fr)); }
[data-reference-editor] .ed-recipe-size-presets > button { min-height: 36px; }
[data-ed-reference-dragging] [data-recipe-shelf-reference] {
  outline: 1px dashed var(--nov05-editor-accent);
  outline-offset: 4px;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:is([data-ed-operation-open], :not([data-ed-operation-open])) .ed-history {
  inset: auto calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 14px) calc(var(--ref-editor-sheet) + 14px) calc(var(--ref-editor-left) + var(--ref-editor-layer-inset) + 14px);
  width: auto;
  height: var(--ref-editor-film);
  padding: 4px;
  gap: 8px;
  border: 0;
  background: transparent;
  scrollbar-width: none;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-history {
  right: calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 14px);
  bottom: calc(var(--ref-editor-sheet) + 14px);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws .ed-operation-panel {
  width: 100%;
  max-width: none;
  height: 100%;
  max-height: none;
  border-radius: var(--ref-r-3);
}
.editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-item {
  width: 112px;
  min-width: 112px;
  height: 80px;
  padding: 0;
  border-radius: var(--ref-r-1);
  overflow: hidden;
  transition: transform .3s var(--ref-spring, ease-out);
}
.editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-item[aria-current="true"] {
  border: 2px solid var(--ref-hi, var(--nov05-editor-accent));
}
.editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-item:hover { transform: translateY(-3px); }
.editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-thumb { height: 100%; }
.editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-thumb canvas { width: 100%; height: 100%; object-fit: cover; }
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail {
  inset: 14px var(--ref-editor-right) 14px auto;
  width: var(--ref-editor-recipes);
  max-width: none;
  padding: 0;
  gap: 0;
  border: 0;
  border-radius: var(--ref-r-3);
  background: var(--nov05-editor-paper);
  overscroll-behavior: contain;
  scrollbar-width: thin;
}
.editor-layer.ws[data-reference-editor] > .ws:not([data-ed-wf-open]) .ed-rail { display: none; }
.editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-rail .ed-wf-mount .ed-wf-panel[data-wf-view] {
  padding: 16px 16px 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.editor-layer.ws[data-reference-editor] .ws .ed-wf-head { padding: 0 4px 10px; border: 0; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-wf-listbody .ed-wf-tipslot:empty { display: none; }
.editor-layer.ws[data-reference-editor] .ws .ed-wf-head .ed-wf-title {
  font: var(--ref-display-w, 500) 19px/1.25 var(--ref-display, var(--ref-f-ui, sans-serif));
}
.editor-layer.ws[data-reference-editor] .ws .creation-catalog {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
}
.editor-layer.ws[data-reference-editor] .ws .creation-catalog .creation-choice {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 7px;
  width: auto;
  min-width: 0;
  min-height: 0;
  height: auto;
  aspect-ratio: 1;
  padding: 3px;
  border: 0;
  border-radius: var(--ref-r-2);
  background: transparent;
  color: var(--nov05-editor-secondary);
  font: 400 11.5px/1.2 var(--ref-f-ui, sans-serif);
}
.editor-layer.ws[data-reference-editor] .ws .creation-catalog .creation-choice:hover {
  background: var(--ref-line, rgb(0 0 0 / .13));
  color: var(--nov05-editor-ink);
  transform: translateY(-2px);
}
.editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-composer {
  padding: 12px 16px 16px;
  margin-top: auto;
  border: 0;
  border-top: 1px solid var(--nov05-editor-line);
  border-radius: 0;
  background: var(--nov05-editor-paper);
  font-family: var(--ref-f-ui, var(--nov05-font-data));
}
.editor-layer.ws[data-reference-editor] .ws .ed-composer .gen-prompt-box {
  border-radius: var(--ref-r-2);
  background: var(--nov05-editor-bg);
}
.editor-layer.ws[data-reference-editor] .ws .ed-composer .gen-prompt-box textarea {
  background: var(--nov05-editor-bg);
}
.editor-layer.ws[data-reference-editor] .ws .ed-composer .gen-prompt-box textarea { min-height: 100px; }
.editor-layer.ws[data-reference-editor] .ws .ed-composer :is(.gen-submit, .gen-send, .ed-c-send):not(:disabled) {
  background: var(--nov05-editor-accent);
  color: var(--ref-accent-ink, #f1f1ea);
}
.editor-layer.ws[data-reference-editor]:is(.ed-composer-docked, :not(.ed-composer-docked)) > .ws > .ed-toolbar {
  inset: 0 0 0 auto;
  width: var(--ref-editor-right);
  height: auto;
  gap: 4px;
  padding: 16px 0;
  border: 0;
  border-left: 1px solid var(--nov05-editor-line);
  border-radius: 0;
  background: var(--nov05-editor-bg);
  box-shadow: none;
}
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-drawing-tools { gap: 4px; }
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar :is(.ed-tool, .ed-drawing-tools > details) {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  border-radius: var(--ref-r-2);
}
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-workflow-tools { width: 42px; }
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-workflow-tools { background: transparent; border-inline: 0; border-bottom: 0; border-radius: 0; }
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-workflow-tools > .ed-tool { width: 40px; }
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar .ed-tool.active {
  background: var(--nov05-editor-accent);
  color: var(--ref-accent-ink, #f1f1ea);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(
  .ed-tool.active:is([data-ed-tool="select"], [data-ed-tool="crop"], [data-ed-tool="brush"], [data-ed-tool="eraser"], [data-ed-tool="mask"], [data-ed-tool="rect"], [data-ed-tool="ellipse"], [data-ed-tool="arrow"], [data-ed-tool="polyline"])
) > .ws-canvas,
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ws-canvas[data-ed-native-area-gesture] { touch-action: none; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ed-toolbar:has([data-ed-shape-group][open]) { z-index: 19; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ws-controls.ws-controls-demo.ws-controls-top {
  inset: 14px calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 54px) auto auto;
  z-index: 9;
  background: transparent;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ws-controls[data-ws-controls]:not(:has(button)) { display: none; }
.editor-layer.ws[data-reference-editor] .ws > .ed-reference-drawer {
  position: absolute;
  z-index: 18;
  inset: 0 auto 0 var(--ref-editor-left);
  width: min(300px, calc(100% - var(--ref-editor-left) - 12px));
  padding: 16px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border-right: 1px solid var(--nov05-editor-line);
  border-radius: 0 8px 8px 0;
  background: var(--nov05-editor-paper);
  box-shadow: 20px 0 40px -20px rgb(0 0 0 / .35);
}
[data-reference-editor] .ed-reference-drawer .editor-asset-shelf { padding: 0; }
[data-reference-editor] .ed-reference-drawer .editor-asset-tabs { gap: 2px; padding: 3px; border-radius: var(--ref-r-2); background: var(--nov05-editor-bg); }
[data-reference-editor] .ed-reference-drawer .editor-asset-tabs button { flex: 1 0 auto; padding-inline: 4px; border: 0; border-radius: var(--ref-r-2); background: transparent; font: 500 11px/1.3 var(--ref-f-ui, sans-serif); white-space: nowrap; }
[data-reference-editor] .ed-reference-drawer .editor-asset-tabs button[aria-pressed="true"] { background: var(--nov05-editor-accent); color: var(--ref-accent-ink, #f1f1ea); }
.editor-layer.ws[data-reference-editor] .ws > .ed-reference-drawer[data-source="layers"] {
  inset: 62px auto 14px calc(var(--ref-editor-left) + 14px);
  width: 220px; padding: 10px; border: 1px solid var(--nov05-editor-line); border-radius: var(--ref-r-3);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer [data-ed-operation-mount] {
  position: static; display: block; inset: auto; width: auto; height: auto; max-height: none;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer .ed-layer-dock {
  position: static; min-height: 0; height: auto; padding: 0; border: 0; box-shadow: none; background: transparent;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer .ed-operation-sections {
  display: flex;
  flex-direction: column;
  overflow: visible;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool {
  --ed-tool-swatch: 24px;
  flex: 0 0 auto;
  order: -2;
  margin-block: 4px 8px;
  padding-inline: 8px;
  border: 1px solid var(--nov05-editor-line);
  border-radius: var(--ref-r-2);
  background: var(--nov05-editor-bg);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool h3 {
  padding: 2px 0 0;
  background: transparent;
  font: 600 12px/24px var(--ref-f-ui, sans-serif);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool .ed-operation-field {
  grid-template-columns: minmax(3.2em, auto) minmax(0, 1fr);
  align-items: center;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool :is(p, output) { margin: 0; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-current-tool .ed-color {
  box-sizing: border-box;
  flex: 0 0 var(--ed-tool-swatch);
  width: var(--ed-tool-swatch);
  height: var(--ed-tool-swatch);
  min-height: var(--ed-tool-swatch);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool [data-native-area-panel] label {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  margin-block: 4px;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool .ed-font-list {
  max-height: 96px;
  overflow-y: auto;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer .ed-layer-primary { flex: 0 0 auto; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer .ed-operation-body { padding-inline: 0; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer .ed-layer-import { order: 1; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-reference-drawer [role="tree"] { min-height: 0; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock :is(button, summary, .ed-wf-title) {
  font-family: var(--ref-f-ui, var(--nov05-font-data));
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock [data-layer-action="select"] { font-size: 12px; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock .natlp-footer { gap: 3px; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock .natlp-footer > button { width: 25px; }
[data-reference-editor] .ed-reference-drawer .editor-asset-card { border: 0; padding: 0; background: transparent; }
[data-reference-editor] .ed-reference-drawer .editor-asset-card > img { border-radius: var(--ref-r-1); }
[data-reference-editor] [data-ed-layer-tool-mount] { order: -3; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-panel { max-height:none; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-controls { overflow:visible; padding:0; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-basic,
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-levels { grid-template-columns:minmax(0,1fr); }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-panel .ed-wf-field {
  grid-template-columns:minmax(0,1fr) minmax(26px,1.25fr) minmax(0,28px); gap:4px;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-levels input[type="number"] { grid-column:2 / -1; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-advanced[open] { position:static; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-advanced[open] .ed-cg-advanced-body { max-height:none; overflow:visible; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-controls:has(.ed-cg-advanced[open]) > :is(.ed-cg-basic,.ed-cg-levels) { display:grid; visibility:visible; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-cg-mount] .ed-cg-curve-cv { max-width:100%; height:auto !important; }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount]
:is(.ed-cg-actions > button, .ed-cg-chrow > button, [data-cg-curve-reset], [data-native-area-panel] button, [data-compositor-action]) {
  appearance: none;
  min-width: 0;
  min-height: 32px;
  border: 1px solid var(--nov05-editor-line);
  border-radius: var(--ref-r-2);
  background: var(--ref-surface);
  color: var(--nov05-editor-ink);
  font: 500 11px/1.35 var(--ref-f-ui, sans-serif);
  padding: 5px 7px;
  cursor: pointer;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount]
:is(.ed-cg-actions > button, .ed-cg-chrow > button, [data-cg-curve-reset], [data-native-area-panel] button, [data-compositor-action]):enabled:is(:hover, [aria-pressed="true"]) {
  border-color: var(--ref-ink-2);
  background: var(--ref-surface-2);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount] .ed-cg-actions > .ed-cg-save:enabled {
  border-color: var(--ref-accent);
  background: var(--ref-accent);
  color: var(--ref-accent-ink);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount] .ed-cg-actions > .ed-cg-save:enabled:hover {
  background: color-mix(in srgb, var(--ref-accent) 90%, var(--ref-accent-ink));
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount]
:is(.ed-cg-actions > button, .ed-cg-chrow > button, [data-cg-curve-reset], [data-native-area-panel] button, [data-compositor-action]):focus-visible {
  outline: 2px solid var(--ref-ink);
  outline-offset: 2px;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount]
:is(.ed-cg-actions > button, .ed-cg-chrow > button, [data-cg-curve-reset], [data-native-area-panel] button, [data-compositor-action]):disabled {
  opacity: .55;
  cursor: default;
}
@media (pointer: coarse) {
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-ed-layer-tool-mount]
:is(.ed-cg-actions > button, .ed-cg-chrow > button, [data-cg-curve-reset], [data-native-area-panel] button, [data-compositor-action]) { min-height: 44px; }
}
[data-reference-editor] [data-ed-shared-save-status] { order: -2; }
[data-reference-editor] .ed-storewarn { pointer-events: none; }
[data-reference-editor] .editor-shelf-tile { display: grid; align-content: start; gap: 4px; min-width: 0; }
[data-reference-editor] .editor-shelf-tile .editor-asset-card { width: 100%; }
[data-reference-editor] .editor-shelf-tile [draggable="true"] { cursor: grab; }
[data-reference-editor] .editor-shelf-tile > :is(button, a):not(.editor-asset-card),
[data-reference-editor] .editor-shelf-file-actions > button {
  display: grid; place-items: center; min-height: 32px; padding-inline: 5px;
  border: 1px solid var(--nov05-editor-line); border-radius: var(--ref-r-1);
  background: var(--nov05-editor-bg); color: var(--nov05-editor-ink); text-align: center;
}
[data-reference-editor] .editor-shelf-file-actions { display: grid; gap: 4px; margin-block: 10px; }
[data-reference-editor] [data-editor-pinterest-posts] > summary { min-height: 32px; align-content: center; cursor: pointer; }
[data-reference-editor][data-ed-reference-dragging] .ed-reference-drawer { opacity: .24; }
[data-reference-editor][data-ed-reference-dragging] [data-wf-refs] { outline: 2px dashed var(--nov05-editor-accent); outline-offset: -2px; }

@media (max-width: 1100px) {
  .editor-layer.ws[data-reference-editor] {
    --nov05-editor-context: 60px;
    --ref-editor-left: 56px;
    --ref-editor-right: 52px;
    --ref-editor-recipes: 0px;
    --ref-editor-film: 78px;
  }
  .editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open] { --ref-editor-sheet: min(372px, 49dvh); }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-layer-panel] {
    --ref-editor-layer-inset: 0px;
  }
  .editor-layer.ws[data-reference-editor] .ws > .ed-reference-drawer[data-source="layers"] {
    inset: 62px calc(var(--ref-editor-right) + 14px) 14px calc(var(--ref-editor-left) + 14px);
    width: auto;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-layer-panel] > :is(.ed-history, .ed-rail) { display: none !important; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-layer-panel] > .ws-canvas { visibility: hidden; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail:has(.ed-wf-panel) {
    inset: auto calc(var(--ref-editor-right) + 12px) 12px calc(var(--ref-editor-left) + 12px);
    width: auto;
    max-height: calc(var(--ref-editor-sheet) - 12px);
    box-shadow: 0 -10px 40px -16px rgb(0 0 0 / .3);
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail:has(.ed-wf-panel) .ed-wf-mount {
    flex: 0 0 auto;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail:has(.ed-recipe-footer) {
    height: calc(var(--ref-editor-sheet) - 12px);
    overflow: hidden;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail .ed-wf-mount:has(.ed-recipe-footer) {
    display: flex;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-rail .ed-wf-mount .ed-wf-panel[data-wf-view]:has(> .ed-recipe-footer) {
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    overflow: hidden;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-rail .ed-wf-mount .ed-wf-panel[data-wf-view]:has(> .ed-recipe-footer) .ed-wf-body {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    max-height: none;
    overflow: auto;
  }
  [data-reference-editor] .ed-wf-panel:has(> .ed-recipe-footer) > .ed-wf-detailbar { flex: 0 0 auto; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-rail .ed-wf-mount .ed-wf-panel[data-wf-view] {
    padding: 12px 12px 4px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-wf-view="list"] .ed-wf-head {
    min-height: 44px;
    height: 44px;
    padding-block: 0;
    gap: 6px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-wf-view="list"] .ed-wf-listbody { gap: 0; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws [data-wf-view="list"] .ed-wf-tipslot { display: none; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-composer {
    position: relative;
    padding: 8px 12px 12px;
    gap: 6px;
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-composer > [data-ed-generation-header] {
    position: absolute;
    inset: 8px 12px auto auto;
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-composer > [data-ed-generation-header] .gen-compact-top > span { display: none; }
  .editor-layer.ws[data-reference-editor] .ws .ed-composer > .ed-generation-references { padding-inline-end: 32px; }
  .editor-layer.ws[data-reference-editor] .ws .creation-catalog { display: flex; overflow-x: auto; scrollbar-width: none; }
  .editor-layer.ws[data-reference-editor] .ws .creation-catalog .creation-choice { width: 74px; height: 66px; aspect-ratio: auto; flex: none; }
  .editor-layer.ws[data-reference-editor] .ws .ed-composer .gen-prompt-box [data-ed-composer-input] { height: 78px; min-height: 64px; }
  .editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-item { width: 92px; min-width: 92px; height: 64px; }
}
@media (max-width: 560px) {
  .editor-layer.ws[data-reference-editor] {
    --nov05-editor-context: 44px;
    --ref-editor-left: 0px;
    --ref-editor-right: 0px;
    --ref-editor-film: 72px;
  }
  .editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open] { --ref-editor-sheet: min(338px, 46dvh); }
  .editor-layer.ws[data-reference-editor] .ws > .ed-reference-drawer[data-source="layers"] {
    inset: 58px 10px 66px; width: auto; padding-top: 10px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor]:is(.ed-composer-docked, :not(.ed-composer-docked)) > .ws[data-ed-operation-open] > .ed-toolbar { bottom: 10px; }
  [data-reference-editor] > .ws > .ed-reference-left { inset: 10px auto auto 10px; width: auto; padding: 0; gap: 2px; border: 0; flex-direction: row; }
  [data-reference-editor] .ed-reference-left > :nth-child(n + 4) { display: none; }
  [data-reference-editor] > .ws > .ed-reference-header { padding-left: 136px; }
  [data-reference-editor] .ed-reference-header small { display: none; }
  [data-reference-editor] .ed-reference-stage-controls { display: none; }
  [data-reference-editor] .ed-reference-compare { top: 10px; right: 10px; bottom: auto; }
  .editor-layer.ws[data-reference-editor]:is(.ed-composer-docked, :not(.ed-composer-docked)) > .ws > .ed-toolbar {
    inset: auto 10px calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 24px) 10px;
    width: auto;
    height: 46px;
    padding: 3px 6px;
    flex-direction: row;
    border: 0;
    border-radius: var(--ref-r-2);
    background: var(--ref-glass, var(--nov05-editor-paper));
    box-shadow: var(--ref-shadow);
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-drawing-tools {
    width: auto;
    min-width: 0;
    flex-direction: row;
    overflow-x: auto;
    overflow-y: hidden;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-shape-menu {
    inset: auto auto calc(100% + 6px) 0;
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-toolbar .ed-draw-properties {
    bottom: calc(100% + 6px);
    top: auto;
    right: 0;
    left: auto;
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-toolbar > .ed-workflow-tools {
    width: auto;
    max-width: 44%;
    min-width: 0;
    flex-direction: row;
    overflow-x: auto;
    padding: 0;
    border: 0;
    scrollbar-width: none;
  }
  .editor-layer.ws[data-reference-editor] .ws .ed-toolbar .ed-tsep { flex: 0 0 1px; height: 18px; width: 1px; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ws-controls.ws-controls-demo.ws-controls-top {
    inset: auto 16px calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 74px) auto;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) .ed-rail:has(.ed-wf-panel) {
    inset: auto 8px 8px;
    max-height: calc(var(--ref-editor-sheet) - 8px);
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] .ed-rail:has(.ed-recipe-footer) { height: calc(var(--ref-editor-sheet) - 8px); }
  .editor-layer.ws[data-reference-editor] .ws > .ed-reference-drawer { width: 84%; padding-top: 58px; }
}
@media (pointer: coarse) {
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-current-tool { --ed-tool-swatch: 36px; }
  [data-reference-editor] .ed-reference-left button { width: 44px; height: 44px; }
  [data-reference-editor] .ed-reference-drawer .editor-asset-tabs button { min-height: 44px; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock [data-native-layer-host] .natlp-row {
    grid-template-columns: 42px 36px minmax(0,1fr) 42px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock [data-native-layer-host] .natlp-row:has([data-layer-action="collapse"]) {
    grid-template-columns: 42px 36px 26px minmax(0,1fr) 42px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock [data-native-layer-host] .natlp-row.natlp-has-mask {
    grid-template-columns: 42px 32px 32px minmax(0,1fr) 42px;
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock .natlp-row :is([data-layer-action="visible"], [data-layer-action="lock"]),
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock .natlp-footer > button { width: 40px; min-height: 44px; }
  .editor-layer.ws[data-reference-editor] .ws .ed-toolbar :is(.ed-tool, .ed-drawing-tools > details) { width: 44px; min-height: 44px; flex-basis: 44px; }
  [data-reference-editor] .editor-shelf-tile > :is(button, a):not(.editor-asset-card),
  [data-reference-editor] .editor-shelf-file-actions > button { min-height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  .editor-layer.ws[data-reference-editor] .ws .ed-history .ed-hist-item { transition: none; }
}

/* The recipe viewport scrolls; the shared capsule composer stays at its foot. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail {
  display: flex; flex-direction: column; min-height: 0 !important;
  height: calc(100% - 28px); max-height: calc(100% - 28px);
  overflow: hidden !important;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount {
  display: flex; flex: 1 1 0 !important; min-height: 0 !important; height: auto; max-height: none;
  overflow: hidden !important;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view] {
  display: flex; flex-direction: column; flex: 1 1 0 !important;
  width: 100%; min-height: 0 !important; height: auto; max-height: 100%; overflow: hidden !important;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view] > :is(.ed-wf-listbody, .ed-wf-body) {
  flex: 1 1 0 !important; min-height: 0 !important; height: auto; max-height: none;
  overflow-y: auto !important; overscroll-behavior: contain; scrollbar-width: thin;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-listbody > .creation-catalog { flex: none; }
@media (min-width: 1101px) {
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-listbody { container-type: size; }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-listbody > .creation-catalog {
    /* Fit the five built-in rows while leaving room for the active recipe hint. */
    grid-auto-rows: clamp(52px, calc((100cqh - 80px) / 5), calc((100cqw - 12px) / 4));
  }
  .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-listbody .creation-choice {
    aspect-ratio: auto;
  }
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view] > :is(.ed-wf-head, .ed-wf-detailbar, footer) {
  flex: 0 0 auto;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer {
  position: relative; inset: auto; transform: none;
  flex: 0 1 auto !important; width: 100%; min-height: 0 !important; height: auto;
  max-height: min(64dvh, calc(100% - 44px)); margin-top: 0;
  overflow-y: auto !important; overscroll-behavior: contain;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] {
  min-height: 64px; height: 80px; max-height: 160px;
}
@media (max-width: 1100px) {
  .editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open] {
    --ref-editor-sheet: min(440px, calc(100dvh - 132px));
  }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail {
    height: calc(var(--ref-editor-sheet) - 12px); max-height: calc(var(--ref-editor-sheet) - 12px); z-index: 18;
  }
}

/* The editor exposes the same generation controls as the canvas capsule. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-composer .ed-generation-inline-params {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; min-width: 0;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-generation-inline-params > .ed-wf-params {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-column: 1 / -1; gap: 6px; margin: 0;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-generation-inline-params :is(.gen-ctl, .ed-wf-field, input, select) { min-width: 0; max-width: 100%; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-generation-inline-params .gen-ctl select { width: 100%; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] [data-ed-generation-direct] > .gen-ctl {
  display: flex; align-items: center; min-height: 28px; padding: 0 5px;
  border: 0; background: transparent;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] [data-ed-generation-direct] > .gen-ctl select {
  appearance: none; min-width: 0; height: 26px; padding: 0 2px; border: 0; background: transparent;
  color: var(--nov05-editor-ink); font: inherit;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-body {
  display: flex; flex-direction: column; min-height: 0; overflow: hidden;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tplbar {
  flex: 1 1 0; min-height: 0; height: auto; max-height: none;
  overflow-y: auto; padding: 4px 0 8px; overscroll-behavior: contain;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tiles {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); grid-auto-rows: auto;
  gap: 10px; align-content: start; padding: 0; overflow: visible;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tile {
  display: flex; flex-direction: column; width: 100%; height: auto; min-height: 0; padding: 0;
  border-radius: var(--ref-r-2); overflow: hidden;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-preview {
  position: relative; display: block; width: 100%; height: auto; aspect-ratio: 4 / 3;
  flex: 0 0 auto; min-height: 0; overflow: hidden; padding: 0;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-preview > img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tile > span:last-child {
  position: static; display: block; box-sizing: border-box; width: 100%; height: auto; min-height: 30px;
  padding: 6px; white-space: normal; overflow-wrap: anywhere; font: 12px/1.4 var(--ref-f-ui); color: var(--ref-ink); background: var(--ref-surface);
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ed-toolbar > .ed-workflow-tools {
  position: static !important; display: flex; flex-direction: column; flex: 0 0 auto;
  width: 40px; max-width: none; margin: 0 !important; padding: 0; gap: 4px;
  border: 0; border-radius: 0; background: transparent; box-shadow: none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-workflow-tools > .ed-tool {
  width: 40px; height: 40px; min-height: 40px; padding: 0;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-layer-corner {
  right: 10px; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; box-shadow: none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-layer-corner[aria-expanded="true"] { background: var(--nov05-editor-accent); color: var(--ref-accent-ink); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(> .ed-reference-drawer[data-source="layers"]:not([hidden])) {
  --ref-editor-layer-inset: calc(var(--ref-tool-width) + 14px);
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-reference-drawer[data-source="layers"] {
  inset: 0 auto var(--ref-editor-sheet) 0;
  width: var(--ref-editor-layer-inset); max-height: none; padding: 12px 8px; overflow: auto;
  box-sizing: border-box;
  border-width: 0 1px 0 0; border-radius: 0; box-shadow: none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-layer-panel] > .ed-reference-header {
  left: calc(var(--ref-editor-layer-inset) + 14px);
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-tool-parameters :is(select, input[type="number"], input[type="text"]) {
  box-sizing: border-box; min-width: 0; max-width: 100%; min-height: 28px;
  padding: 3px 6px; border: 1px solid var(--nov05-editor-line); border-radius: var(--ref-r-2);
  font: inherit; color: var(--nov05-editor-ink); background: var(--nov05-editor-bg);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters :is(.ed-pl-hint, .ed-lyr-cap, .ed-operation-empty) { display: none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters > .ed-operation-panel { position: static; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.ed-bucket-swatches { display: flex; flex-wrap: wrap; gap: 4px; }
.ed-bucket-field { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: center; gap: 6px; font-size: 11px; }
.ed-bucket-field > span { grid-column: 1 / -1; color: var(--nov05-editor-secondary); }
.ed-bucket-custom { position: relative; width: 24px; height: 24px; border: 1px solid var(--nov05-editor-line); border-radius: 50%; background: var(--sw); overflow: hidden; }
.ed-bucket-custom input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters input[type="range"]::-webkit-slider-runnable-track { height: 4px; border-radius: 9px; background: var(--ref-ink-3); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters input[type="range"]::-moz-range-track { height: 4px; border-radius: 9px; background: var(--ref-ink-3); }
@media (max-width: 560px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws > .ed-toolbar > .ed-workflow-tools { flex-direction: row; width: auto; max-width: min(36%, 108px); overflow-x: auto; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters .ed-operation-field { grid-template-columns: minmax(0,1fr); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-tool-parameters,
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-reference-drawer[data-source="layers"] { bottom: calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 78px); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar { z-index: 20; }
}
@media (max-width: 1100px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open]:has([data-wf-detail="builtin-flux2"]) { --ref-editor-sheet: min(650px, calc(100dvh - 132px)); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has([data-wf-detail="builtin-flux2"]) > .ed-rail > .ed-composer { max-height: min(40dvh, calc(100% - 270px)); }
}
@media (max-height: 520px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] {
    min-height: 48px; height: 64px; max-height: 96px;
  }
}

/* Navigation belongs to the screen edge; tool parameters belong to the image. */
.editor-layer.ws[data-reference-editor] {
  --ref-editor-nav: var(--workspace-rail-width);
  --ref-tool-width: clamp(116px, 18vw, 220px);
  --ref-editor-reserved: calc(var(--ref-tool-width) + 14px);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws {
  --ref-editor-left: 14px;
  --ref-editor-layer-inset: 0px;
  left: calc(var(--nov05-editor-context) + var(--ref-editor-reserved));
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws:has(> .ed-tool-parameters:not([hidden])),
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws:has(> .ed-reference-drawer[data-source="layers"]:not([hidden])) { left: var(--nov05-editor-context); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws:has(> .ed-tool-parameters:not([hidden])) {
  --ref-editor-layer-inset: calc(var(--ref-tool-width) + 14px);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-reference-left {
  position: fixed; inset: 0 auto 0 0; width: var(--ref-editor-nav); height: 100dvh;
  box-sizing:border-box; display:flex; flex-direction:column; padding:var(--workspace-rail-top) 0 8px 1px; gap:4px;
  z-index:30; border:0; border-right:1px solid var(--ref-line); background:var(--ref-surface);
  overflow-y:auto;
}
html[data-argus-theme] [data-reference-editor] .ed-reference-left button:disabled { opacity:.4; }
html[data-argus-theme] [data-reference-editor] .ed-reference-left > .bl-control { display:contents; }
html[data-argus-theme] .app-frame:has([data-reference-editor]) > .canvas-shell > .aux-card--appearance {
  position:fixed; inset:14px auto 14px calc(var(--workspace-rail-width) + 12px); width:272px;
  padding:12px; overflow:auto; z-index:900;
}
.app-frame:has([data-reference-editor]) .aux-card--appearance .appearance-panel > summary { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-layer-corner {
  position: absolute; z-index: 29; inset: auto 8px 12px auto;
  display: grid; place-items: center; width: 44px; height: 44px; padding: 0;
  border: 1px solid var(--nov05-editor-line); border-radius: var(--ref-r-2);
  background: var(--nov05-editor-paper); color: var(--nov05-editor-ink);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-layer-corner[aria-expanded="true"] {
  background: var(--nov05-editor-accent); color: var(--ref-accent-ink);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-tool-parameters {
  position: absolute; z-index: 17;
  inset: 62px auto calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 26px) 14px;
  box-sizing: border-box; width: var(--ref-tool-width); min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  border: 1px solid var(--nov05-editor-line); border-radius: var(--ref-r-2);
  background: var(--nov05-editor-paper); color: var(--nov05-editor-ink);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-tool-parameters[hidden] { display: none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters .ed-current-tool {
  margin: 0; padding: 8px; border: 0; background: transparent;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tool-parameters .ed-operation-body { padding: 0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:is([data-ed-operation-open], :not([data-ed-operation-open])) > .ed-history {
  inset: auto calc(var(--ref-editor-right) + var(--ref-editor-recipe-inset) + 14px) calc(var(--ref-editor-sheet) + 14px) calc(var(--ref-editor-left) + var(--ref-editor-layer-inset) + 14px);
  width: auto; height: var(--ref-editor-film);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-reference-drawer:not([data-source="layers"]) {
  position: fixed; inset: 0 auto 0 var(--ref-editor-nav); width: min(300px, calc(100vw - var(--ref-editor-nav) - 12px));
  z-index: 28;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-reference-drawer[data-source="layers"] {
  inset: auto calc(var(--ref-editor-right) + 12px) 64px auto;
  width: min(240px, calc(100% - 24px)); max-height: calc(100% - 130px);
}
@media (min-width: 561px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-toolbar { padding-bottom: 64px; }
}
@media (max-width: 1100px) {
  .editor-layer.ws[data-reference-editor] { --nov05-editor-context: 112px; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws[data-ed-layer-panel] > .ws-canvas { visibility: visible; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws[data-ed-layer-panel] > .ed-history { display: flex !important; }
}
@media (max-width: 560px) {
  .editor-layer.ws[data-reference-editor] { --nov05-editor-context: 88px; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-reference-header { padding-left: 8px; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-layer-corner {
    right: 8px; bottom: calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 24px);
  }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-reference-drawer[data-source="layers"] {
    bottom: calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 76px); max-height: calc(100% - var(--ref-editor-sheet) - var(--ref-editor-film) - 138px);
  }
}

/* Template categories share the canvas capsule chips; catalog keeps its own full-height scroll. */
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-catrow { display:block; padding:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-catrow .ed-wf-chips { display:flex; flex-wrap:nowrap; gap:2px; min-width:0; overflow-x:auto; overflow-y:hidden; width:100%; scrollbar-width:thin; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-chips .ed-wf-chip { flex:1 0 auto; display:inline-flex; gap:3px; align-items:center; justify-content:center; white-space:nowrap; padding:5px 4px; border:0; border-bottom:2px solid transparent; border-radius:2px; background:transparent; color:var(--ref-ink-2); font:11px var(--ref-f-ui); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-tiles .ed-personal-add { flex-direction:column; gap:6px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tiles .ed-personal-add-labeled {
  grid-column:span 2;
  min-height:104px;
  padding:14px 12px;
  gap:9px;
  text-align:center;
}
.ed-personal-add-labeled > strong {
  color:var(--ref-ink);
  font:600 12px/1.4 var(--ref-f-ui);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-chips .ed-wf-chip.on { border-bottom-color:var(--ref-accent); color:var(--ref-ink); font-weight:600; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-chips .ed-wf-chip.on::after { content:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-chips .ed-wf-chipn { display:inline; width:auto; height:auto; padding:0; background:transparent; color:var(--ref-ink-3); font:inherit; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-catrow .ed-wf-catsel { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__pad-outpaint"] .ed-wf-body { flex:0 0 auto; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__pad-outpaint"] > .rp-footer { margin-top:12px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tiles { gap:6px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="builtin-flux2"] .ed-wf-tile > span:last-child { padding:4px; font-size:10px; }

html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-toolbar > .ed-tools-toggle { margin-top:auto; flex:0 0 32px; min-height:32px; height:32px; background:transparent; border:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-toolbar.is-collapsed > :not(.ed-tools-toggle) { display:none !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-toolbar.is-collapsed { transform:translateX(100%); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws:has(> .ed-toolbar.is-collapsed) > .ed-layer-corner { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] .ed-wf-body { flex:0 0 auto; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] > .rp-footer { margin-top:12px; }

html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel:is([data-wf-detail="__reserved-lighting"],[data-wf-detail="__reserved-texture"]) .ed-wf-body { width:100%; min-width:0; margin-inline:0; padding-inline:0; box-sizing:border-box; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-gl-panel { width:100%; min-width:0; padding:0; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-gl-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-gl-actions button { min-width:0; padding:12px 8px; font:12px var(--ref-f-ui); color:var(--ref-ink); background:var(--ref-surface-2); border:1px solid var(--ref-line); border-radius:var(--ref-r-2); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel { display:flex; flex-direction:column; gap:14px; width:100%; min-width:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-input-roles { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-role-preview { min-height:160px; aspect-ratio:1; width:100%; box-sizing:border-box; position:relative; overflow:hidden; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-role-preview img { width:100%; height:100%; max-height:none; object-fit:contain; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-role-name { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-tx-params { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-up-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:8px; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-tx-panel .ed-up-actions button { min-width:0; }

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-detail]:is([data-wf-detail="__pad-outpaint"],[data-wf-detail="__reserved-upscale"]) > .ed-wf-body { flex:0 0 auto !important; max-height:calc(100% - 140px); }

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view]:is([data-wf-detail="__pad-outpaint"],[data-wf-detail="__reserved-upscale"],[data-wf-detail="__reserved-multiview"]) > .ed-wf-body { flex:0 1 auto !important; max-height:calc(100% - 140px); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view]:is([data-wf-detail="__pad-outpaint"],[data-wf-detail="__reserved-upscale"],[data-wf-detail="__reserved-multiview"]) > .rp-footer { margin-top:12px !important; }

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view]:is([data-wf-detail="__pad-outpaint"],[data-wf-detail="__reserved-upscale"],[data-wf-detail="__reserved-multiview"],[data-wf-detail="__reserved-texture"]) > .ed-wf-body { display:block !important; }

/* Keep the primary input and removable references on one stable thumbnail strip. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-composer.ed-generation-unified .ed-generation-references { display:grid; grid-template-columns:minmax(0,1fr) auto; align-items:start; column-gap:6px; padding:0; min-width:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor].ed-t2i-mode .ws .ed-composer.ed-generation-unified .ed-generation-references { display:none; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-composer.ed-generation-unified .ed-references { display:contents; min-height:0; max-height:none; width:auto; border:0; padding:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references .ed-reference-heading { grid-row:1; grid-column:1; margin:0; padding:0; align-self:center; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references .ed-reference-sources { grid-row:1; grid-column:1 / -1; display:flex; gap:6px; margin:0; padding:0; flex-wrap:wrap; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references .ed-generation-primary { width:56px; margin:0; padding:0; align-self:start; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-primary img { width:56px; height:52px; object-fit:contain; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references [data-wf-ref-list] { grid-row:2; grid-column:1; display:flex; gap:6px; grid-auto-columns:initial; min-width:0; max-width:100%; align-items:flex-start; overflow-x:auto; overflow-y:hidden; padding:0 2px 3px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references .ed-reference-actions {
  grid-row:2; grid-column:2; display:flex; align-items:center; gap:6px; margin-top:12px;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references .ed-references > small { grid-column:1 / -1; grid-row:3; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-composer.ed-generation-unified .ed-wf-reference-tile[data-wf-ref-item] { position:relative; display:grid; grid-template-rows:52px 14px; flex:0 0 74px; width:74px; min-width:74px; height:68px; gap:2px; padding:0; border:0; border-radius:0; background:transparent; box-sizing:border-box; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-composer.ed-generation-unified .ed-wf-reference-tile img { grid-row:1; grid-column:1; width:74px; height:52px; object-fit:contain; border-radius:var(--ref-r-1); margin:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-reference-tile > span { position:static; grid-row:2; grid-column:1; display:block; width:100%; max-width:100%; padding:0; font:9px/14px var(--ref-f-ui); color:var(--ref-ink-2); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; background:transparent; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-composer .ed-wf-reference-tile > .gen-ref-del { display:grid; place-items:center; position:absolute; z-index:3; inset:0 0 auto auto; width:22px; min-width:22px; height:22px; min-height:22px; padding:0; border:1px solid var(--ref-line); border-radius:50%; background:var(--ref-surface); color:var(--ref-ink); opacity:1; pointer-events:auto; font:15px/1 var(--ref-f-ui); }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-unified .ed-wf-reference-controls { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-reference-tile [data-wf-ref-preview-state] { grid-row:1; grid-column:1; align-self:center; position:relative; width:100%; font:9px/1.3 var(--ref-f-ui); }

/* The desktop rail shares one hit-box axis and retracts horizontally to the screen edge. */
@media (min-width:561px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar { align-items:center; transform:translateX(0); transition:transform 180ms ease; overflow:visible; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar > :is(.ed-drawing-tools,.ed-workflow-tools) { display:flex; flex-direction:column; align-items:center; width:40px; min-width:40px; padding-inline:0; margin-inline:auto !important; box-sizing:border-box; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar :is(.ed-tool,.ed-drawing-tools > details) { box-sizing:border-box; width:40px; min-width:40px; height:40px; min-height:40px; flex:0 0 40px; margin-inline:0; padding:0; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar .ed-tsep { width:20px; min-width:20px; height:1px; min-height:1px; margin-inline:auto; align-self:center; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar > .ed-tools-toggle { order:-1; margin:0; align-self:center; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar > .ed-tools-toggle svg { transform:rotate(-90deg); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed { top:0; right:0; bottom:0; left:auto; height:auto; min-height:0; padding:16px 0 64px; transform:translateX(100%); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed > .ed-tools-toggle { position:absolute; top:16px; left:-41px; background:var(--nov05-editor-bg); border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-2) 0 0 var(--ref-r-2); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed > .ed-tools-toggle svg { transform:rotate(90deg); }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-layer-corner { right:calc((var(--ref-editor-right) - 41px) / 2); width:40px; min-width:40px; height:40px; min-height:40px; padding:0; box-sizing:border-box; }
}
@media (prefers-reduced-motion:reduce) { html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws > .ed-toolbar { transition:none; } }
/* A small screen uses an overlay drawer; opening it must not re-fit the image. */
.editor-layer.ws[data-reference-editor] .ws-canvas > .pano-embedded {
  position: absolute; inset: 0; z-index: 12; border-radius: inherit;
  background: var(--nov05-editor-preview); color: var(--ref-ink); font-family: var(--ref-f-ui);
}
.editor-layer.ws[data-reference-editor] .pano-embedded :is(.pano-bar,.pano-hint) {
  background: var(--ref-ed-surface); color: var(--ref-ink-2); border-color: var(--ref-line);
}
.editor-layer.ws[data-reference-editor] .pano-embedded .pano-hint { display: none; }
.editor-layer.ws[data-reference-editor] .pano-embedded .pano-btn {
  color: var(--ref-ink); background: var(--ref-surface-2); border-color: var(--ref-line); border-radius: var(--ref-r-2); white-space: nowrap; flex-shrink: 0; padding: 4px 8px;
}
.editor-layer.ws[data-reference-editor] .pano-embedded .pano-title { display: none; }
.editor-layer.ws[data-reference-editor] .pano-embedded .pano-meta { color: var(--ref-ink-2); font: 11px/1.4 var(--ref-f-ui); }
@media (max-width:560px) {
  .editor-layer.ws[data-reference-editor] { --ref-editor-reserved: 0px; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws,
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(> .ed-tool-parameters:not([hidden])),
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(> .ed-reference-drawer[data-source="layers"]:not([hidden])) {
    --ref-editor-layer-inset: 0px;
  }
}

/* Layer controls inherit the editor's quiet type scale, including closed disclosure rows. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] { font:400 12px/1.45 var(--ref-f-ui); color:var(--nov05-editor-ink); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(button,input,select,textarea,summary) { font-family:var(--ref-f-ui); font-size:11.5px; line-height:1.4; letter-spacing:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .ed-layer-dock > .ed-wf-head { min-height:30px; padding:0 0 6px; margin:0; border:0; background:transparent; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(.ed-wf-title,h2,h3,h4) { font:500 12px/1.4 var(--ref-f-ui); color:var(--nov05-editor-ink); letter-spacing:0; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .editor-asset-tabs { gap:2px; padding:3px; margin-bottom:8px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .editor-asset-tabs button { font:500 11px/1.35 var(--ref-f-ui); min-height:28px; padding:5px 4px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(.ed-operation-sections,[data-native-layer-host]) { gap:8px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .natlp-controls { display:grid; grid-template-columns:minmax(0,1fr) 64px; align-items:end; gap:8px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(.natlp-controls label,[data-native-properties] label,[data-layer-transform-fields] label) { font:400 11px/1.4 var(--ref-f-ui); color:var(--nov05-editor-secondary); gap:4px; min-width:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(input:not([type="checkbox"]),select,textarea) { box-sizing:border-box; min-width:0; max-width:100%; min-height:28px; padding:4px 6px; border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-2); background:var(--nov05-editor-bg); color:var(--nov05-editor-ink); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] [data-layer-action="select"] { font:400 12px/1.4 var(--ref-f-ui); color:var(--nov05-editor-ink); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] [data-layer-action="select"][aria-pressed="true"] { font-weight:500; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] details { margin:0; padding:0; border:0; border-top:1px solid var(--nov05-editor-line); border-radius:0; background:transparent; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] summary { display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:32px; margin:0; padding:6px 0; box-sizing:border-box; list-style:none; color:var(--nov05-editor-secondary); font-weight:500; cursor:pointer; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] summary::-webkit-details-marker { display:none; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] summary::after { content:'⌄'; flex:none; font:14px/1 var(--ref-f-ui); color:var(--nov05-editor-secondary); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] details[open] > summary::after { transform:rotate(180deg); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] details[open] > :not(summary) { margin-block:6px; }

/* Export owns the former top slot; the single retract control owns the former export slot. */
.editor-layer.ws[data-reference-editor] .ed-tools-toggle-slot { display:flex; align-items:center; justify-content:center; flex:0 0 40px; width:40px; height:40px; }
@media (min-width:561px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar > [data-ed-file-menu] { order:-1; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar .ed-tools-toggle-slot > .ed-tools-toggle { margin:0; padding:0; width:40px; min-width:40px; height:40px; min-height:40px; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar .ed-tools-toggle-slot > .ed-tools-toggle svg { transform:rotate(-90deg); }
}
@media (max-width:560px) { .editor-layer.ws[data-reference-editor] .ed-tools-toggle-slot { flex-basis:32px; width:32px; min-width:32px; } }

/* Retraction stays horizontal on touch-width editors as well as the desktop rail. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar { transition:transform 180ms ease; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar .ed-tools-toggle svg { transform:rotate(-90deg); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed > .ed-tools-toggle svg { transform:rotate(90deg); }
@media (max-width:560px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed { inset:auto 10px calc(var(--ref-editor-sheet) + var(--ref-editor-film) + 24px) 10px; width:auto; height:46px; min-height:46px; margin:0; padding:0; border:0; background:transparent; box-shadow:none; transform:translateX(calc(100% + 10px)); overflow:visible; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed > .ed-tools-toggle { position:absolute; inset:3px auto auto -40px; box-sizing:border-box; width:40px; min-width:40px; height:40px; min-height:40px; flex:0 0 40px; margin:0; padding:0; border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-2) 0 0 var(--ref-r-2); background:var(--nov05-editor-bg); }
}
@media (prefers-reduced-motion:reduce) { html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar { transition:none; } }

/* The image library and layer controls have independent visibility and share the reserved sidebar. */
[data-reference-editor] .ed-reference-drawer[data-coexisting] { overflow:hidden !important; }
[data-reference-editor] .ed-reference-drawer[data-coexisting] .editor-asset-shelf { display:flex; flex-direction:column; height:100%; min-height:0; gap:10px; }
[data-reference-editor] .ed-reference-drawer[data-coexisting] .editor-asset-tabs { flex:0 0 auto; }
[data-reference-editor] .ed-reference-drawer[data-coexisting] [data-editor-layer-assets] { flex:0 1 46%; min-height:90px; overflow:auto; border-bottom:1px solid var(--nov05-editor-line); padding-bottom:10px; }
[data-reference-editor] .ed-reference-drawer[data-coexisting] :is([data-editor-canvas-assets],[data-editor-pinterest]):not([hidden]) { flex:1 1 0; min-height:90px; overflow:auto; overscroll-behavior:contain; }

/* One opening indicator belongs to the image viewport, never the title or filmstrip. */
html[data-argus-theme] .editor-layer.ws[data-reference-editor][data-ed-opening="loading"] > .ws { width:auto; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ed-loading-gate[data-ed-phase="loading"] {
  position:fixed; inset:auto; left:var(--ed-loading-x); top:var(--ed-loading-y); width:var(--ed-loading-w); height:var(--ed-loading-h);
  transform:none; display:grid; place-items:center; padding:0; background:transparent;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-loading-gate[data-ed-phase="loading"] .ed-opening-status {
  position:static; inset:auto; transform:none; margin:0; width:auto; min-width:0; max-width:100%;
  padding:10px 14px; border:1px solid var(--nov05-editor-line); border-radius:999px; background:var(--nov05-editor-paper); box-shadow:none;
}
[data-reference-editor] .ed-loading-gate[data-ed-phase="loading"] .project-load-label { display:none; }
[data-reference-editor][data-ed-opening="loading"] [data-ed-asset-state="loading"] { visibility:hidden; }
[data-reference-editor] .ed-hist-item { position:relative; }
.editor-layer.ws[data-ed-demo] .ws .ed-history .ed-hist-item[hidden] { display:none; }
[data-reference-editor] [data-history-image-state="loading"] { position:absolute; inset:4px 4px 22px; border-radius:var(--ref-r-2); background:var(--nov05-editor-wash); pointer-events:none; }
[data-reference-editor] img[data-display-state="loading"] + .image-display-note { display:none !important; }
/* The tool column scrolls without a visible scrollbar and retracts to an edge handle. */
html[data-argus-theme] .editor-layer.ws[data-reference-editor] :is(.ed-toolbar,.ed-drawing-tools,.ed-workflow-tools) { scrollbar-width:none; -ms-overflow-style:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] :is(.ed-toolbar,.ed-drawing-tools,.ed-workflow-tools)::-webkit-scrollbar { display:none; width:0; height:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed {
  position:absolute; inset:0 0 0 auto; width:0; min-width:0; max-width:0; height:auto; min-height:0;
  margin:0; padding:0; border:0; background:transparent; box-shadow:none; transform:none; overflow:visible; pointer-events:none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar.is-collapsed > .ed-tools-toggle {
  position:absolute; inset:50% 0 auto auto; transform:translateY(-50%); width:26px; min-width:26px; height:64px; min-height:64px;
  margin:0; padding:0; border:1px solid var(--nov05-editor-line); border-right:0; border-radius:12px 0 0 12px;
  background:var(--nov05-editor-paper); box-shadow:-4px 0 14px rgb(0 0 0 / .06); pointer-events:auto;
}

/* Image sources belong to the far-left library; native layer controls retain their editor dock. */
.editor-layer.ws[data-reference-editor] {
  --ref-library-left: var(--ref-editor-nav);
  --ref-library-width: min(334px, calc(100vw - var(--ref-library-left) - 28px));
  --ref-library-end: calc(var(--ref-library-left) + var(--ref-library-width) + 12px);
}
[data-reference-editor] > .ed-reference-entry {
  position:fixed; z-index:450; inset:0 auto 0 0; width:12px; pointer-events:auto;
}
[data-reference-editor] [data-ed-library-reveal] {
  position:absolute; top:50%; left:0; transform:translateY(-50%);
  display:grid; place-items:center; width:24px; min-height:52px; padding:0;
  border:1px solid var(--nov05-editor-line); border-left:0; border-radius:0 var(--ref-r-2) var(--ref-r-2) 0;
  background:var(--nov05-editor-paper); color:var(--nov05-editor-ink);
}
@media (pointer:coarse) {
  [data-reference-editor] [data-ed-library-reveal] { width:44px; }
}
html[data-argus-theme] .app-frame:not(:has(.aux-card--appearance,.aux-card--config)) .editor-layer.ws[data-reference-editor]:has(> .ed-reference-library[hidden]) > .ws > .ed-reference-left,
[data-reference-editor]:has(> .ed-reference-library:not([hidden])) > .ed-reference-entry,
.app-frame:has(.aux-card--appearance,.aux-card--config) [data-reference-editor] > .ed-reference-entry { display:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ed-reference-library {
  position:fixed; z-index:450; pointer-events:auto; inset:14px auto 14px var(--ref-library-left); width:var(--ref-library-width);
  padding:10px; box-sizing:border-box; overflow:auto; overscroll-behavior:contain;
  border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-3); background:var(--nov05-editor-paper);
}
[data-reference-editor] .ed-reference-library .editor-asset-shelf { padding:0; }
[data-reference-editor] .ed-reference-library .editor-asset-tabs { display:flex; gap:4px; margin-bottom:10px; }
[data-reference-editor] .ed-reference-library .editor-asset-tabs button { flex:1; min-width:0; font:inherit; }
[data-reference-editor] .ed-reference-library .editor-asset-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:8px; }
[data-reference-editor] .ed-reference-library .editor-shelf-tile { min-width:0; }
[data-reference-editor] .ed-reference-library .editor-asset-card { width:100%; min-width:0; }
[data-reference-editor] .ed-reference-library .editor-asset-card img { width:100%; object-fit:contain; }
[data-reference-editor] .ed-reference-library .editor-asset-caption { min-width:0; }
@media(min-width:1101px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ed-reference-library:not([hidden])) > .ws:has(> .ed-reference-drawer:not([hidden])) {
    left:max(var(--nov05-editor-context),var(--ref-library-end));
  }
}
@media(max-width:1100px) {
  .editor-layer.ws[data-reference-editor]:has(> .ws > .ed-reference-drawer:not([hidden])) {
    --ref-library-width: min(334px, calc(100vw - var(--ref-library-left) - var(--ref-tool-width) - 32px));
  }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ed-reference-library { inset:14px auto calc(var(--ref-editor-film) + 26px) var(--ref-library-left); padding:8px; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ed-reference-library:not([hidden])) > .ws > .ed-reference-drawer:not([hidden]) {
    position:fixed; inset:14px auto calc(var(--ref-editor-film) + 26px) var(--ref-library-end);
    width:min(var(--ref-tool-width),calc(100vw - var(--ref-library-end) - 12px));
  }
  [data-reference-editor] .ed-reference-drawer .natlp-footer { flex-wrap:wrap; }
}
@media (max-width:560px) {
  .editor-layer.ws[data-reference-editor] {
    --ref-library-width: min(334px, calc(100vw - var(--ref-library-left) - 60px));
  }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ed-reference-library:not([hidden])) > .ws > .ed-layer-corner {
    top:14px; bottom:auto;
  }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ed-reference-library:not([hidden])) > .ws > .ed-reference-drawer:not([hidden]) {
    top:62px;
  }
}

[data-reference-editor] > .ws::after {
  content:"";
  position:absolute;
  z-index:6;
  inset:0 auto 0 0;
  width:1px;
  pointer-events:none;
  background:color-mix(in srgb,var(--ref-hi) 28%,transparent);
  box-shadow:2px 0 8px 1px color-mix(in srgb,var(--ref-hi) 18%,transparent);
  animation:ed-edge-glow 420ms ease-out both;
}
@keyframes ed-edge-glow {
  from { opacity:0; }
  45% { opacity:.9; }
  to { opacity:.58; }
}
@media (prefers-reduced-motion:reduce) {
  [data-reference-editor] > .ws::after { animation:none; opacity:.58; }
}

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-compositor-workspace] > .ed-rail { display:none !important; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor]:has(> .ed-reference-library[hidden]) > .ws[data-ed-compositor-workspace] { left:0; }
[data-reference-editor] [data-ed-compositor-header] {
  position:absolute;
  z-index:12;
  top:16px;
  right:max(calc(var(--ed-rail-inset, 50px) + 12px), calc(var(--ref-editor-right, 60px) + 24px));
  display:flex;
  align-items:center;
  gap:8px;
  padding:4px 9px 4px 4px;
  border:1px solid var(--ref-line);
  border-radius:var(--ref-r-3);
  background:var(--ref-ed-surface);
  color:var(--ref-ink);
  font:600 12px var(--ref-f-ui);
}
[data-reference-editor] [data-ed-compositor-header] button > svg { transform:rotate(90deg); }
[data-reference-editor] [data-ed-compositor-header][hidden] { display:none; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-layer-panel][data-ed-wf-open] > .ed-rail { display:flex !important; }
@media(max-width:1100px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ws[data-ed-wf-open]) > .ed-reference-library { --ref-editor-sheet:min(440px,calc(100dvh - 132px)); }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor]:has(> .ws[data-ed-wf-open] [data-wf-detail="builtin-flux2"]) > .ed-reference-library { --ref-editor-sheet:min(650px,calc(100dvh - 132px)); }
}

/* Give the prompt room to compose, including after adding references. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] {
  min-height: clamp(160px, 23dvh, 280px); height: clamp(180px, 26dvh, 320px); max-height: none; resize: vertical;
}
@media (max-height: 520px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] { min-height: 112px; height: 128px; }
}

@media (max-width: 1100px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail { overflow-y:auto !important; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail > .ed-wf-mount:has(> .ed-wf-panel[data-wf-view="list"]) { min-height:180px !important; flex:0 0 180px !important; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer { flex:0 0 auto !important; max-height:none; }
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] { min-height:160px; height:180px; }
}


/* Stable recipe layout; content scrolls without drawing scrollbar chrome. */
html[data-argus-theme] .editor-layer.ws[data-reference-editor],
html[data-argus-theme] .editor-layer.ws[data-reference-editor] * { scrollbar-width:none !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor]::-webkit-scrollbar,
html[data-argus-theme] .editor-layer.ws[data-reference-editor] *::-webkit-scrollbar { display:none !important; width:0 !important; height:0 !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-generation-references [data-wf-ref-list] {
  overscroll-behavior-x: contain;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail { --recipe-compose-height:clamp(520px,56dvh,580px); overflow:hidden !important; display:flex; flex-direction:column; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount { flex:1 1 0 !important; min-height:120px !important; overflow:hidden; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view][data-wf-detail][data-wf-recipe] { position:relative; box-sizing:border-box; display:flex !important; flex-direction:column; height:100% !important; min-height:0 !important; max-height:100% !important; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view][data-wf-detail][data-wf-recipe] > .ed-wf-body { flex:1 1 0 !important; min-height:0 !important; max-height:none !important; overflow:auto !important; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount > .ed-wf-panel[data-wf-view][data-wf-detail][data-wf-recipe] > .rp-footer { flex:0 0 auto; margin-top:auto !important; padding:8px 14px 14px; min-height:96px; box-sizing:border-box; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer { position:relative; box-sizing:border-box; flex:0 0 var(--recipe-compose-height) !important; height:var(--recipe-compose-height); max-height:var(--recipe-compose-height); padding:14px 14px 346px; overflow:auto !important; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer > [data-ed-generation-header]:has(.gen-compact-top:empty) { display:none; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .ed-generation-references { min-height:106px; flex:0 0 auto; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box { position:absolute; left:14px; right:14px; bottom:76px; height:260px; min-height:260px; max-height:260px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box [data-ed-composer-input] { box-sizing:border-box; min-height:0 !important; height:100% !important; max-height:none; resize:none; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer [data-ed-generation-send] { position:absolute; z-index:2; right:22px; bottom:22px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer [data-ed-generation-send] button { width:34px; min-width:34px; height:34px; min-height:34px; padding:0; border-radius:50%; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer > [data-ed-wf-rstat] { margin:0; max-height:32px; padding-right:44px; overflow:auto; }

html[data-argus-theme] .editor-layer.ws[data-reference-editor] .rp-footer :is([role="status"],.xu-status) { min-height:22px; max-height:44px; overflow:auto; margin:0 0 6px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .rp-footer :is(button.rp-primary,[data-local-qwen-run],[data-ed-pad-run],[data-ang2="gen"]) { min-height:44px; height:44px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel:has(.ed-tx-panel,.ed-light-panel,.ed-cg-panel) .ed-wf-body { padding-bottom:140px !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-body :is(.ed-tx-panel,.ed-light-panel,[data-cg-mount],.ed-cg-panel) { position:static; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-body :is(.ed-tx-panel,.ed-light-panel,.ed-cg-panel) > :is(.ed-up-actions,.ed-cg-actions) { position:absolute; left:14px; right:14px; bottom:14px; margin:0; padding:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-body :is(.ed-tx-panel,.ed-light-panel,.ed-cg-panel) > :is([data-tx-status],[data-cg-status],.ed-up-status) { position:absolute; left:14px; right:14px; bottom:70px; height:22px; margin:0; overflow:auto; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-body :is(.ed-tx-panel,.ed-light-panel,.ed-cg-panel) > :is(.ed-up-actions,.ed-cg-actions) button { min-height:44px; }
@media(max-width:1100px) {
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail { --recipe-compose-height:460px; height:calc(var(--ref-editor-sheet) - 12px); max-height:calc(var(--ref-editor-sheet) - 12px); }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer {padding-bottom:246px;}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box {height:160px;min-height:160px;max-height:160px;}
}
@media (max-width:560px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(
    > .ed-tool-parameters:not([hidden])
  ):has(.ed-tool.active:is([data-ed-tool="brush"], [data-ed-tool="eraser"], [data-ed-tool="mask"])) {
    --ref-editor-layer-inset: calc(var(--ref-tool-width) + 14px);
  }
}

@media (max-width:560px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has(> .ed-reference-drawer[data-source="layers"]:not([hidden])) {
    --ref-active-layer-width: clamp(112px, 36vw, 156px);
    --ref-editor-layer-inset: var(--ref-active-layer-width);
  }
}

/* Keep a usable drawing surface above the recipe on short screens. */
@media (max-width:1100px) and (max-height:680px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] > .ws[data-ed-wf-open]:has(
    .ed-tool.active:is([data-ed-tool="brush"], [data-ed-tool="eraser"], [data-ed-tool="mask"]),
    [data-wf-detail="__recipe-local-inpaint"]
  ) {
    --ref-editor-sheet: min(440px, 45dvh);
  }
}


html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .gen-controls { max-height:110px; overflow:auto; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .gen-controls:has(.gen-out-frames) {
  max-height:min(38dvh,240px);
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .rp-footer { position:static !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .rp-footer > :is(.rp-primary,[data-local-qwen-run],.ed-recipe-footer-actions) { position:absolute; left:14px; right:14px; bottom:14px; width:auto; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .rp-footer > :is([role="status"],.xu-status) { position:absolute; left:14px; right:14px; bottom:70px; height:22px; margin:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .rp-footer > progress { position:absolute; left:14px; right:14px; bottom:64px; width:calc(100% - 28px); height:4px; margin:0; }

html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] .ed-wf-body { padding-bottom:352px !important; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] .ed-wf-body :is(.ed-up-panel,section) { position:static; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] label:has(> [data-refine2k-prompt]) { position:absolute; left:14px; right:14px; bottom:76px; height:280px; display:grid; grid-template-rows:20px minmax(0,1fr); gap:0; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel [data-refine2k-prompt] { height:100%; min-height:0; resize:none; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel [data-up-run] { min-height:44px; }
@media(max-width:1100px) {
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] .ed-wf-body { padding-bottom:252px !important; }
  html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel[data-wf-detail="__reserved-upscale"] label:has(> [data-refine2k-prompt]) { height:180px; }
}

@media(max-width:1100px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor]:has(> .ws[data-ed-wf-open]) > .ed-reference-library { --ref-editor-sheet:min(740px,calc(100dvh - 132px)); }
}

html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .xu-footer { position:static; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-wf-panel > .xu-footer .xu-run { position:absolute; left:14px; right:14px; bottom:14px; width:calc(100% - 28px); height:44px; }
@media(max-height:760px) {
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail {--recipe-compose-height:clamp(320px,56dvh,440px);}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-wf-mount {min-height:80px !important;}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer {padding-bottom:198px;}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-prompt-box {height:112px;min-height:112px;max-height:112px;}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer .gen-controls {max-height:calc(var(--recipe-compose-height) - 304px);}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail .ed-wf-panel[data-wf-detail="__reserved-upscale"] label:has(> [data-refine2k-prompt]) {height:132px;}
}

@media (max-width: 1100px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view="list"]) > .ed-rail > .ed-composer {
    flex-basis: min(var(--recipe-compose-height), max(0px, calc(100% - 144px))) !important;
  }
}

/* Keep the six everyday controls aligned and the action on its own baseline. */
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-base {
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:6px;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-composer
:is(.ed-generation-base,.ed-generation-inline-params) > :is(.gen-ctl,.ed-generation-seed) {
  display:flex;
  align-items:center;
  gap:4px;
  width:100%;
  min-width:0;
  height:30px;
  min-height:30px;
  margin:0;
  padding:0 5px;
  box-sizing:border-box;
  border:0;
  background:transparent;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-base > .gen-ctl :is([data-api-picker],select) {
  flex:1 1 0;
  min-width:0;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-base .api-model-picker [data-api-picker-open] {
  width:100%;
  min-width:0;
  padding-inline:0;
  border:0;
  background:transparent;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer :is(.ed-generation-base,.ed-generation-inline-params) select {
  height:100%;
  border:0;
  background-color:transparent;
  color:var(--nov05-editor-ink);
  font:inherit;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-seed .ed-wf-field {
  display:grid; grid-template-columns:auto minmax(0,1fr);
  align-items:center;
  gap:4px;
  margin:0;
  width:100%;
}
[data-reference-editor] .ed-composer .ed-generation-seed > svg { flex:0 0 13px; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-seed input {
  width:100%;
  min-width:0;
  min-height:0;
  padding:0 2px;
  border:0;
  background:transparent;
}

[data-reference-editor] .ed-composer :is(.ed-generation-base,.ed-generation-inline-params) :is(button, select, input):focus-visible {
  outline: 2px solid var(--ref-ink-2);
  outline-offset: -2px;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer [data-ed-generation-send] button {
  display:inline-flex;
  justify-content:center;
  align-items:center;
  gap:6px;
  white-space:nowrap;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-primary {
  display:flex;
  flex-direction:column;
  min-height:68px;
  gap:2px;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-primary [data-recipe-preview-state]:not([hidden]) {
  overflow-wrap:anywhere;
  font-size:10px;
  line-height:1.25;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-seed .ed-wf-field > span { white-space:nowrap; }
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .ed-composer .ed-generation-seed .ed-wf-field i { display:none; }

/* Let parameters and prompt share the available height without overlapping. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer.ed-generation-unified {
  display:flex;
  flex-direction:column;
  padding-bottom:14px;
}
/* These recipes own their inputs and actions inside the recipe panel. */
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail:has(> .ed-wf-mount > .ed-wf-panel:is(
  [data-wf-detail="__recipe-local-inpaint"], [data-wf-detail="__image-cutout"], [data-wf-detail="__extreme-upscale"],
  [data-wf-detail="__color-grade"], [data-wf-detail="__recipe-relight-prompt"], [data-wf-detail="__reserved-lighting"],
  [data-wf-detail="__light-migrate"], [data-wf-detail="__reserved-texture"], [data-wf-detail="__image-layered"],
  [data-wf-detail="__reserved-upscale"], [data-wf-detail="__pad-outpaint"], [data-wf-detail="__reserved-multiview"],
  [data-wf-detail="__local-image-tools"], [data-wf-detail="__import"]
)) > .ed-composer.ed-generation-unified {
  display:none;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .local-inpaint-tools > button {
  flex:1 1 0;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .local-inpaint-width {
  display:grid;
  grid-template-columns:1fr auto;
  align-items:center;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .local-inpaint-width input {
  grid-column:1 / -1;
}
html[data-argus-theme] .editor-layer.ws[data-reference-editor] .local-inpaint-prompt textarea,
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-wf-panel .ed-cutout-description textarea {
  min-height:clamp(96px, 20dvh, 200px);
  max-height:none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer.ed-generation-unified .gen-composer {
  display:flex;
  flex:1 1 auto;
  flex-direction:column;
  min-height:0;
  gap:8px;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer.ed-generation-unified .gen-controls {
  flex:0 1 auto;
  min-height:66px;
  max-height:110px;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-view]) > .ed-rail > .ed-composer.ed-generation-unified .gen-prompt-box {
  position:static;
  flex:1 0 60px;
  height:auto;
  min-height:60px;
  max-height:none;
}
.ed-reference-drawer .pending-recover-editor {
  position: static;
  min-width: 0;
  max-width: none;
  margin-top: 8px;
  border-color: var(--ref-line);
  background: var(--ref-surface);
  box-shadow: none;
}

.editor-layer[data-reference-editor] .ws [data-ed-zoom-group][open] .ed-reference-stage-controls {
  display: flex;
  align-items: center;
  width: max-content;
  height: 36px;
  left: auto;
  bottom: auto;
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ws .ed-file-actions {
  display:grid;
  width:max-content;
  min-width:140px;
  max-width:calc(100vw - 24px);
  max-height:calc(100dvh - 64px);
  overflow:auto;
  background:var(--ref-ed-surface);
  border-color:var(--ref-line);
  box-shadow:var(--ref-shadow);
}
.editor-layer[data-reference-editor] .ws .ed-file-actions > button {
  min-height:30px;
  padding:4px 9px;
  border:0;
  border-radius:var(--ref-r-1);
  background:transparent;
  color:var(--ref-ink);
  font:500 12px/1.4 var(--ref-f-ui, system-ui, sans-serif);
  text-align:left;
  cursor:pointer;
}
.ed-file-actions button:hover:not(:disabled),
.ed-file-actions button:focus-visible { background:var(--ctl-hover); }
.ed-file-actions button:disabled { opacity:.5; cursor:default; }
.editor-layer[data-reference-editor] [data-ed-reference-zoom="fit"] { width:auto; padding:0 7px; font-size:11px; }
.editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ed-toolbar > :is([data-ed-file-menu], [data-ed-zoom-group]) {
  flex:none;
  align-self:center;
  width:max-content;
  height:auto;
  margin:0;
}
.editor-layer.ws[data-reference-editor] .ws .ed-toolbar > :is([data-ed-zoom-group], [data-ed-file-menu]) > summary {
  display:grid;
  place-items:center;
  box-sizing:border-box;
  margin:0;
  padding:0;
  list-style:none;
}
.editor-layer[data-reference-editor] :is([data-ed-zoom-group], [data-ed-file-menu]) > summary::-webkit-details-marker { display:none; }
.editor-layer[data-reference-editor] .ed-toolbar .ed-tool > svg {
  display:block;
  flex:none;
  width:16px;
  height:16px;
}
.editor-layer[data-reference-editor] .ed-toolbar.is-collapsed > [data-ed-zoom-group] { display:none; }
@media (min-width:561px) {
  html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws > .ws-canvas { top:14px; }
}
html[data-argus-theme] .editor-layer[data-reference-editor] .ed-composer .ed-reference-sources {
  grid-column:1 / -1;
  align-items:center;
  flex-wrap:nowrap;
}
html[data-argus-theme] .editor-layer[data-reference-editor] .ed-composer .ed-reference-sources:has(> :is(progress:not([hidden]), [data-image-generation])) {
  margin-bottom:8px;
}
html[data-argus-theme] .editor-layer[data-reference-editor] .ed-composer .ed-reference-actions button {
  display:grid;
  place-items:center;
  width:28px;
  min-width:28px;
  min-height:26px;
  padding:0;
}
.ed-composer-progress-slot:not(:has(progress:not([hidden]))) { display:none; }
.ed-composer-progress {
  display:block;
  appearance:none;
  flex:1 1 0;
  min-width:0;
  width:100%;
  height:4px;
  border:0;
  border-radius:999px;
  overflow:hidden;
  background:var(--ref-line);
  accent-color:var(--ref-accent);
}
.ed-composer-progress[hidden] { display:none; }
.ed-reference-sources:has(> [data-image-generation]) > .ed-composer-progress { display:none; }
.ed-reference-sources > .image-generation-progress {
  position:relative;
  inset:auto;
  flex:1 1 0;
  min-width:0;
  max-width:none;
  margin:0;
}
.ed-reference-sources > .image-generation-progress ul {
  position:absolute;
  z-index:2;
  inset-inline:0;
  top:100%;
  bottom:auto;
  margin:0;
  background:var(--ref-surface);
  border:1px solid var(--ref-line);
  border-radius:6px;
}
.ed-composer-progress::-webkit-progress-bar { background:transparent; }
.ed-composer-progress::-webkit-progress-value { background:var(--ref-accent); border-radius:inherit; transition:width .22s ease; }
.ed-composer-progress::-moz-progress-bar { background:var(--ref-accent); border-radius:inherit; }
.editor-layer[data-reference-editor] .image-generation-progress:not(.has-percent) .image-generation-track { display:none; }
@media (prefers-reduced-motion:reduce) {
  .ed-composer-progress::-webkit-progress-value { transition:none; }
}
.ed-shared-input-note { margin:0; font:11px/1.4 var(--ref-f-ui); color:var(--ref-ink-2); }
.editor-layer.ws[data-reference-editor] .ws .ed-compare-grid {
  background:var(--ref-ed-surface);
  border-color:var(--ref-line);
  color:var(--ref-ink);
}
.editor-layer.ws[data-reference-editor] .ed-compare-grid .ed-cmp-lay {
  flex:1 1 0;
  min-height:0;
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(2,minmax(0,1fr));
}
.editor-layer.ws[data-reference-editor] .ed-compare-grid[data-ed-compare-three-columns] .ed-cmp-lay {
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.editor-layer.ws[data-reference-editor] .ed-compare-grid .ed-cmp-pane {
  min-height:0;
  position:relative;
  overflow:hidden;
  align-items:center;
  justify-content:center;
  border-color:var(--ref-line);
  background:var(--ref-ed-stage);
  color:var(--ref-ink);
  cursor:pointer;
}
.editor-layer.ws[data-reference-editor] .ed-compare-grid .ed-cmp-pane > span {
  position:absolute;
  inset:auto 6px 6px;
  padding:4px 6px;
  border-radius:var(--ref-r-1);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:var(--ref-ed-surface);
  text-align:center;
}
.editor-layer.ws[data-reference-editor] .ed-compare-grid .ed-cmp-linkbtn { margin-inline-start:auto; }
.editor-layer[data-reference-editor] .recipe-grid article:has([data-recipe-edit]) { cursor:pointer; }
.editor-layer[data-reference-editor] .recipe-grid [data-recipe-edit] {
  position:absolute;
  z-index:2;
  inset:auto 6px 6px;
  min-width:0;
  padding:5px 7px;
  border:1px solid var(--ref-line);
  border-radius:var(--ref-r-1);
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  background:var(--ref-ed-surface);
  color:var(--ref-ink);
}
.editor-layer[data-reference-editor] .recipe-grid article:has([data-recipe-edit]) footer { bottom:32px; }
html[data-argus-theme] .editor-layer[data-reference-editor] .ed-composer.ed-generation-unified .gen-prompt-box textarea {
  padding-bottom:46px;
}
.ed-reference-drawer .pending-recover-editor :is(.pr-toggle,.pr-meta,.pr-act button) {
  color: var(--ref-ink);
}

/* Native Compositor tools share the existing layer-parameter column. */
[data-ed-operation-tools] .ed-compositor-fields { display:grid; gap:8px; min-width:0; }
[data-ed-operation-tools] .ed-compositor-field { display:flex; align-items:center; justify-content:space-between; gap:8px; min-width:0; }
[data-ed-operation-tools] .ed-compositor-field input { width:82px; min-width:0; box-sizing:border-box; }
[data-ed-operation-tools] .ed-compositor-field input[type="color"] { height:28px; padding:2px; }
.ed-compositor-swatches { position:relative; display:block; width:21px; height:21px; }
.ed-compositor-swatches i { position:absolute; width:13px; height:13px; border:1px solid currentColor; border-radius:2px; }
.ed-compositor-swatches i:first-child { left:0; top:0; z-index:1; }
.ed-compositor-swatches i:last-child { right:0; bottom:0; }

[data-native-layer-host] .natlp-primary-actions {
  position:relative; display:grid; grid-template-columns:repeat(7,minmax(0,1fr)); align-items:center; gap:2px;
  width:100%; padding-block:4px;
}
@media (max-width: 560px) {
  [data-native-layer-host] .natlp-primary-actions { grid-template-columns:repeat(4,minmax(0,1fr)); }
}
[data-native-layer-host] .natlp-primary-actions > :is(button, details) { min-width:0; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .natlp-primary-actions > details {
  margin:0; border:0; background:transparent;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] :is(.natlp-primary-actions > button, .natlp-primary-actions > details > summary) {
  display:grid; grid-template-columns:minmax(0,1fr); place-items:center;
  width:100%; height:32px; min-height:32px; padding:0; border:0; border-radius:var(--ref-r-2);
  background:transparent; color:var(--nov05-editor-ink);
}
[data-native-layer-host] .natlp-primary-actions > button > svg,
[data-native-layer-host] .natlp-primary-actions > details > summary > svg { width:18px; height:18px; }
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer[data-source="layers"] .natlp-primary-actions > details > summary::after { content:none; }
html[data-argus-theme] [data-reference-editor] .natlp-primary-actions > :is(button:not(:disabled):hover, details[open] > summary, details > summary:hover) {
  background:var(--nov05-editor-bg);
}
[data-native-layer-host] .natlp-primary-actions :is(button, summary):focus-visible {
  outline:2px solid var(--nov05-editor-accent); outline-offset:-2px;
}
[data-native-layer-host] .natlp-primary-actions button:disabled { opacity:.4; }
[data-native-layer-host] [data-layer-menu="more"] { flex:0 0 100%; }
[data-native-layer-host] .natlp-menu-items { display:grid; gap:2px; }
[data-native-layer-host] .natlp-primary-actions .natlp-menu-items {
  position:absolute; z-index:2; inset:100% 0 auto; padding:6px; margin:0 !important;
  border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-2); background:var(--nov05-editor-paper);
  box-shadow:0 8px 18px rgb(0 0 0 / .12);
}
[data-native-layer-host] .natlp-menu-items > button { text-align:start; }
[data-native-layer-host] .natlp-look-settings:empty { display:none; }
[data-native-layer-host] .natlp-look-settings fieldset {
  min-width:0; margin:0 0 8px; padding:6px 8px 8px; border:1px solid var(--nov05-editor-line); border-radius:var(--ref-r-2);
}
[data-native-layer-host] .natlp-look-settings label {
  display:grid; grid-template-columns:minmax(0,1fr) minmax(42px,64px); align-items:center; gap:4px; padding-block:3px;
}
[data-native-layer-host] .natlp-look-settings input { min-width:0; width:100%; }
[data-native-layer-host] .natlp-look-settings input[type="checkbox"] { width:auto; justify-self:start; accent-color:var(--ref-accent); }
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock [data-native-layer-host] .natlp-row.natlp-has-mask:has([data-layer-action="collapse"]) {
  grid-template-columns:minmax(12px,22px) minmax(14px,30px) minmax(14px,30px) 12px minmax(0,1fr) minmax(12px,22px);
}
.editor-layer.ws[data-ed-demo][data-reference-editor] .ed-reference-drawer .ed-layer-dock .natlp-row.natlp-has-mask:has([data-layer-action="collapse"]) > * {
  min-width:0; max-width:100%;
}

.ed-layer-move-guides {
  position:absolute;
  inset:0;
  z-index:3;
  pointer-events:none;
}
.ed-layer-move-guides[hidden] { display:none; }
.ed-layer-move-guides rect { fill:none; stroke:rgba(0,0,0,.32); stroke-width:1; }
.ed-layer-move-guides .ed-layer-move-ants {
  stroke:rgba(255,255,255,.56);
  stroke-dasharray:4 4;
}
.ed-layer-move-guides [data-ed-layer-snap-line] {
  fill:none;
  stroke:var(--ref-accent);
  stroke-opacity:.78;
  stroke-width:1;
}
@media (prefers-reduced-motion:no-preference) {
  .ed-layer-move-ants { animation:ed-layer-move-ants .9s linear infinite; }
}
@keyframes ed-layer-move-ants { to { stroke-dashoffset:-8; } }

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws:has([data-wf-detail="__recipe-local-inpaint"]) > .ed-tool-parameters {
  inset-block:14px calc(var(--ref-editor-sheet) + 14px);
}
html[data-argus-theme] .ed-wf-panel[data-wf-detail="__prompt"] .photo-factor-panel {
  min-height:0;
  padding:0 2px 10px;
  overflow:visible;
}
.ed-wf-panel[data-wf-detail="__prompt"] .photo-factor-head > span:first-child {display:none}
.ed-wf-panel[data-wf-detail="__prompt"] .photo-factor-head {justify-content:flex-end}
.ed-wf-panel[data-wf-detail="__prompt"] .pf-pills {
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:6px;
}
.ed-wf-panel[data-wf-detail="__prompt"] .pf-pill {
  min-height:34px;
  justify-content:space-between;
  border:0;
}
.ed-wf-panel[data-wf-detail="__prompt"] .photo-factor-panel .pf-open {flex:1 1 auto;min-height:30px}
.ed-wf-panel[data-wf-detail="__prompt"] .pf-manage-add {
  display:grid;
  grid-template-columns:minmax(72px, .8fr) minmax(0, 2fr);
  gap:8px;
}
.ed-wf-panel[data-wf-detail="__prompt"] .pf-manage-add :is(select,input) {
  box-sizing:border-box;
  width:100%;
  height:36px;
  min-height:36px;
  padding-inline:8px;
  border:1px solid var(--nov05-editor-line);
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo] .ed-wf-panel[data-wf-detail="__prompt"] .pf-manage-add :is(select,input):focus-visible {
  outline:1px solid var(--nov05-editor-accent);
  outline-offset:-2px;
}
.ed-wf-panel[data-wf-detail="__prompt"] [data-pf-save] :is(input,button) {min-height:32px}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail:has([data-wf-detail="__prompt"]) > .ed-composer.ed-generation-unified > .ed-composer-progress-slot {
  order:1;
  margin-block:2px;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail:has([data-wf-detail="__prompt"]) > .ed-composer.ed-generation-unified > :is(.gen-composer,[role="status"]) {order:2}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail:has([data-wf-detail="__prompt"]) > .ed-composer.ed-generation-unified .gen-prompt-box {flex:1 0 112px;min-height:112px}

html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open]:has(.ed-wf-panel[data-wf-detail="__prompt"]) > .ed-rail > .ed-composer.ed-generation-unified {
  flex:0 1 clamp(252px, 38dvh, 390px) !important;
  gap:4px;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] > .ws[data-ed-wf-open] > .ed-rail:has([data-wf-detail="__prompt"]) > .ed-composer.ed-generation-unified .gen-controls {
  flex:none;
}
html[data-argus-theme] .editor-layer.ws[data-ed-demo][data-reference-editor] .ed-wf-panel[data-wf-detail="__prompt"] .pf-pill :is(.pf-open,.pf-arrow) {
  border:0;
  background:transparent;
  box-shadow:none;
}
