/* Tool67 Unified Image Workbench layout. Consolidated active rules; scoped to Image pages. */
.t67-iwb-host{--iwb-v28-accent:#7855f5}
.t67-iwb-host .ve-shell{width:100%;max-width:1392px;padding:0 8px}
.t67-iwb-host .ve-layout{display:grid;grid-template-columns:minmax(0,4fr) minmax(0,6fr);gap:12px;align-items:start}
.t67-iwb-host .ve-layout>.ve-side,.t67-iwb-host .ve-layout>.ve-main{padding:3px!important;min-width:0;border-radius:17px;overflow:hidden;box-shadow:0 7px 23px rgba(29,47,90,.045)}
.t67-iwb-host .ve-side{position:relative;top:auto;max-height:none;overflow:visible}
.t67-iwb-host .t67-iwb-drop-wrap{gap:10px;padding:10px}
.t67-iwb-host .t67-iwb-drop-main{min-height:148px;border-radius:13px;background:#f8f7fd;border-color:#b7a1fd;transition:min-height .18s ease,padding .18s ease,background-color .2s ease,border-color .2s ease,box-shadow .2s ease}
/* Only the empty source upload zone gets the soft hover tint. Filled grid tiles have their own hover behavior. */
.t67-iwb-host:not(.has-source-images) #iwbSourceDrop:is(:hover,.drag){background:#efebff;border-color:#8670f4;box-shadow:0 0 0 2px rgba(120,85,245,.07)}
.t67-iwb-host .t67-iwb-prompt{font-size:14px}
.t67-iwb-host .t67-iwb-section-block#iwbPreviewSection{margin:0;width:100%}
.t67-iwb-host #iwbPreviewSection[hidden]{display:none!important}
.t67-iwb-host #iwbPreviewHolder{border:0!important;border-radius:0!important;padding:0!important;max-height:none!important;overflow:visible!important;height:auto!important;background:transparent!important;box-shadow:none!important}
.t67-iwb-host #iwbPreviewHolder::before,.t67-iwb-host #iwbPreviewHolder::after{display:none!important}
.t67-iwb-host #iwbPreviewHolder .t67-iwb-source-gallery{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:8px!important}
.t67-iwb-host #iwbPreviewHolder .t67-iwb-source-gallery>.ve-preview-card{grid-column:auto!important;aspect-ratio:1;min-width:0;min-height:0;border-radius:10px!important;overflow:hidden;background:#eef2f7}
.t67-iwb-host #iwbPreviewHolder .ve-preview-media{width:100%;height:100%;min-height:0!important;max-height:none!important;aspect-ratio:1!important;padding:0!important;background:#eef2f7}
.t67-iwb-host #iwbPreviewHolder .ve-preview-media img{display:block;width:100%!important;height:100%!important;max-width:100%!important;max-height:100%!important;object-fit:cover!important;padding:0!important}
.t67-iwb-host #iwbPreviewHolder .ve-preview-foot{display:none!important}
.t67-iwb-host #iwbPreviewHolder .t67-ict-tools{gap:3px!important;top:3px!important;right:3px!important;transform:none!important}
.t67-iwb-host #iwbPreviewHolder .t67-ict-btn{width:27px;height:27px;border-radius:7px;background:rgba(17,24,39,.87);border:1px solid #ffffff33;color:white}
.t67-iwb-host #iwbPreviewHolder .t67-ict-btn svg{width:14px;height:14px}
/* Reference upload, prompt, More Settings and original Start remain in the sidebar. */
.t67-iwb-host .t67-iwb-ref-toggle-row{margin-top:0}
.t67-iwb-host .t67-iwb-actions{margin-top:10px}
.t67-iwb-host .t67-iwb-start{font-size:15px}
/* Right pane is an actual result canvas, never a second copy of uploaded media. */
.t67-iwb-host .ve-main{min-height:340px;display:flex;flex-direction:column;gap:0}
.t67-iwb-host .t67-iwb-empty-workspace{min-height:335px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:9px;text-align:center;color:var(--iwb-muted);padding:28px 12px;background:transparent}
.t67-iwb-host .t67-iwb-empty-workspace[hidden],.t67-iwb-host.is-running .t67-iwb-empty-workspace{display:none!important}
.t67-iwb-host .t67-iwb-empty-icon{display:grid;place-items:center;color:#9b8ee0;width:48px;height:48px;border:1px solid var(--iwb-line);border-radius:14px;background:var(--iwb-soft)}
.t67-iwb-host .t67-iwb-empty-icon svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.8}
.t67-iwb-host .t67-iwb-empty-workspace strong{font-size:15px;color:var(--iwb-text);font-weight:650}
.t67-iwb-host .t67-iwb-empty-workspace small{font-size:12px;line-height:1.4}
.t67-iwb-host #iwbResultSection{min-width:0;min-height:0;margin:0;padding:8px}
.t67-iwb-host #iwbResultSection[hidden]{display:none!important}
.t67-iwb-host .t67-iwb-result-title{padding:7px 7px 11px;margin:0;align-items:center}
.t67-iwb-host .t67-iwb-result-title b{font-size:13px}
.t67-iwb-host #iwbResultHolder{width:100%;border:0!important;box-shadow:none!important;border-radius:0;padding:0;background:transparent}
.t67-iwb-host #iwbResultHolder .t67-iwb-result-gallery{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;align-items:start}
.t67-iwb-host #iwbResultHolder .t67-iwb-result-gallery>.ve-result-card{grid-column:auto!important;min-width:0;border-radius:11px;overflow:hidden}
.t67-iwb-host #iwbResultHolder .ve-result-foot{padding:8px}
.t67-iwb-host #iwbResultHolder .t67-ict-tools{display:flex!important;flex-direction:column!important;gap:3px!important}
.t67-iwb-host #iwbResultHolder .t67-ict-btn{width:29px;height:29px;border:1px solid #ffffff44;border-radius:7px;background:rgba(17,24,39,.88);color:#fff}
.t67-iwb-host #iwbResultHolder .t67-ict-btn svg{width:15px;height:15px}
.t67-iwb-host .t67-iwb-bulk{display:flex;justify-content:flex-end;align-items:center;margin-top:10px;padding:0 4px 4px}
.t67-iwb-host #iwbZipAll{min-height:38px;border:1px solid #bba5ff;background:#f4efff;color:#5c38c7;border-radius:10px;box-shadow:none;font-weight:700}
.t67-iwb-host #iwbZipAll[hidden]{display:none!important}
/* No legacy lighting bloom / fake background glow. */
.t67-iwb-host #iwbPreviewHolder .t67-iwb-grid-surface{display:none!important}
.t67-iwb-host .ve-main::before,.t67-iwb-host .ve-main::after{content:none!important;display:none!important}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-drop-main,body.dark .t67-iwb-host .t67-iwb-drop-main{background:#171b2a;border-color:#6553ad}
html[data-theme="dark"] .t67-iwb-host:not(.has-source-images) #iwbSourceDrop:is(:hover,.drag),body.dark .t67-iwb-host:not(.has-source-images) #iwbSourceDrop:is(:hover,.drag){background:#27223c;border-color:#9780ec;box-shadow:0 0 0 2px rgba(151,128,236,.12)}
html[data-theme="dark"] .t67-iwb-host #iwbZipAll,body.dark .t67-iwb-host #iwbZipAll{background:#262044;color:#d2bcff;border-color:#6553ad}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-empty-icon,body.dark .t67-iwb-host .t67-iwb-empty-icon{background:#202539}
@media(max-width:900px){
 .t67-iwb-host .ve-layout{grid-template-columns:minmax(0,1fr);gap:12px}
 .t67-iwb-host .ve-shell{padding:0 7px;width:100%}
 .t67-iwb-host .ve-main{min-height:240px}
 .t67-iwb-host .t67-iwb-empty-workspace{min-height:220px}
}
@media(max-width:600px){
 .t67-iwb-host .t67-iwb-drop-wrap{padding:8px;gap:8px}
 .t67-iwb-host .t67-iwb-drop-main{min-height:120px}
 .t67-iwb-host.has-source-images .t67-iwb-drop-main{min-height:88px}
 .t67-iwb-host #iwbPreviewHolder .t67-iwb-source-gallery{gap:6px!important}
 .t67-iwb-host #iwbResultHolder .t67-iwb-result-gallery{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:7px!important}
 .t67-iwb-host #iwbResultSection{padding:6px}
 .t67-iwb-host .t67-iwb-empty-workspace{min-height:180px}
 .t67-iwb-host #iwbResultHolder .t67-ict-btn{width:27px;height:27px}
}
@media(hover:none){
 .t67-iwb-host #iwbPreviewHolder .t67-ict-tools,.t67-iwb-host #iwbResultHolder .t67-ict-tools{opacity:1!important;pointer-events:auto!important;transform:none!important}
}
/* V28 final: natural result aspect-ratio, no letterboxing from old 3:4 frame. */
.t67-iwb-host #iwbResultHolder .ve-result-media{display:block!important;width:100%!important;aspect-ratio:auto!important;height:auto!important;min-height:0!important;max-height:none!important;background:transparent!important;padding:0!important;}
.t67-iwb-host #iwbResultHolder .ve-result-media img{display:block!important;width:100%!important;height:auto!important;max-height:360px!important;object-fit:contain!important;background:transparent!important;padding:0!important;}
.t67-iwb-host #iwbPreviewHolder .t67-ict-card:hover>.t67-ict-tools,
.t67-iwb-host #iwbPreviewHolder .t67-ict-card:focus-within>.t67-ict-tools,
.t67-iwb-host #iwbResultHolder .t67-ict-card:hover>.t67-ict-tools,
.t67-iwb-host #iwbResultHolder .t67-ict-card:focus-within>.t67-ict-tools{opacity:1!important;pointer-events:auto!important;transform:none!important}
html[data-theme="dark"] .t67-iwb-host #iwbResultHolder .ve-result-card,
body.dark .t67-iwb-host #iwbResultHolder .ve-result-card{background:#141c29!important;border-color:#344055!important;color:#ecf2ff!important}
html[data-theme="dark"] .t67-iwb-host #iwbResultHolder .ve-result-foot,
body.dark .t67-iwb-host #iwbResultHolder .ve-result-foot{color:#ecf2ff!important;background:#141c29!important}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-empty-workspace strong,
body.dark .t67-iwb-host .t67-iwb-empty-workspace strong{color:#eaf0fa!important}

.t67-iwb-host #iwbResultSection .t67-iwb-result-title b{display:none}
.t67-iwb-host #iwbResultSection .t67-iwb-result-title{justify-content:flex-end;padding:5px 7px 9px}

/* V29 — 4:6, separate sample libraries from user uploads, compact selectors */
.t67-iwb-host #iwbCompareWrap{display:none!important}
.t67-iwb-host .t67-iwb-settings-body .t67-iwb-field-grid{display:flex!important;align-items:center;justify-content:flex-start;flex-wrap:wrap;gap:7px}
.t67-iwb-host .t67-iwb-settings-body .t67-iwb-field-grid>.t67-iwb-field{flex:0 1 auto;min-width:0;max-width:100%}
.t67-iwb-host .t67-iwb-settings-body select.t67-iwb-select{width:auto!important;min-width:0!important;max-width:100%;padding:0 22px 0 7px;font-size:11px;}
.t67-iwb-host #iwbRefDrop.is-filled{border:1px solid var(--iwb-line)!important;background:#f8f7fd!important;padding:8px!important;min-height:0!important;overflow:visible!important;border-radius:12px!important;}
.t67-iwb-host #iwbRefDrop.is-filled .t67-iwb-drop-inner{width:100%;}
.t67-iwb-host .t67-iwb-ref-card{border:0!important;background:transparent!important;box-shadow:none!important;}
.t67-iwb-host .t67-iwb-ref-grid{gap:7px;}
.t67-iwb-host .t67-iwb-ref-card img{border-radius:9px;}
/* Original page's selectable style/sample gallery, above generated results on the right. */
.t67-iwb-host .t67-iwb-right-library{display:block;min-width:0;width:100%;max-height:400px;overflow:auto;padding:9px 9px 12px;border-bottom:1px solid var(--iwb-line);scrollbar-width:thin;}
.t67-iwb-host .t67-iwb-right-library[hidden]{display:none!important;}
.t67-iwb-host.has-library-gallery .t67-iwb-empty-workspace{min-height:155px;}
.t67-iwb-host.is-focus-results .t67-iwb-right-library{max-height:310px;}
@media(max-width:600px){.t67-iwb-host .t67-iwb-right-library{max-height:320px;padding:7px;}}
/* Selected reference thumbnails stay compact and borderless — never full-width banners. */
.t67-iwb-host #iwbRefDrop.is-filled .t67-iwb-ref-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:7px;}
.t67-iwb-host #iwbRefDrop.is-filled .t67-iwb-ref-card{aspect-ratio:1;min-height:0;overflow:hidden;border:0!important;border-radius:9px;background:transparent!important;}
.t67-iwb-host #iwbRefDrop.is-filled .t67-iwb-ref-card img{width:100%;height:100%;min-height:0;max-height:none!important;object-fit:cover;}

/* V30: compact 8-column reference gallery and functional category tabs on the right. */
.t67-iwb-host .t67-iwb-right-library :is(.hair-style-grid,.hs-style-grid,.pp-style-grid,.sk-style-picker,.pa-style-picker,.ct-style-grid,#ctStylePicker){display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr))!important;
  gap:7px!important;
}
.t67-iwb-host .t67-iwb-library-filter-tabs{
  position:sticky;top:0;z-index:3;display:flex;align-items:center;
  justify-content:flex-start;margin:0 0 8px;padding:3px 2px 8px;
  background:var(--iwb-panel,#fff);border-bottom:1px solid var(--iwb-line,#e5e7eb);
}
.t67-iwb-host .t67-iwb-library-filter-tabs #genderTabs{
  display:flex!important;align-items:center;justify-content:flex-start;flex-wrap:wrap;
  gap:6px;width:auto!important;max-width:100%;margin:0!important;padding:0!important;
  border:0!important;background:transparent!important;
}
.t67-iwb-host .t67-iwb-library-filter-tabs #genderTabs button{
  display:inline-flex;align-items:center;justify-content:center;min-height:31px;
  padding:5px 12px;border-radius:9px;font-size:12px;line-height:1.2;
  flex:none;width:auto!important;white-space:nowrap;
}
.t67-iwb-host .t67-iwb-right-library .hair-pick,
.t67-iwb-host .t67-iwb-right-library .hs-pick,
.t67-iwb-host .t67-iwb-right-library .pp-pick{
  min-width:0!important;
}
.t67-iwb-host .t67-iwb-right-library :is(.hair-pick,.hs-pick,.pp-pick) b{
  font-size:10px;line-height:1.3;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;
}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-library-filter-tabs,
body.dark .t67-iwb-host .t67-iwb-library-filter-tabs{background:var(--iwb-panel,#151b28);}
@media(max-width:600px){
 .t67-iwb-host .t67-iwb-right-library :is(.hair-style-grid,.hs-style-grid,.pp-style-grid,.sk-style-picker,.pa-style-picker,.ct-style-grid,#ctStylePicker){
   grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:6px!important;
 }
 .t67-iwb-host .t67-iwb-library-filter-tabs{padding:2px 1px 7px;}
 .t67-iwb-host .t67-iwb-library-filter-tabs #genderTabs button{min-height:30px;padding:5px 10px;font-size:11px;}
}


/* V31 — the actual upload dropzone becomes the last grid tile once files exist.
   The empty-state dropzone keeps its original full-width visual and behavior. */
.t67-iwb-host.has-source-images #iwbPreviewSection{
  margin:0!important;
}
.t67-iwb-host.has-source-images #iwbSourceDrop{
  box-sizing:border-box;
  display:grid;
  grid-column:auto!important;
  width:100%;height:auto!important;min-width:0;min-height:0!important;
  aspect-ratio:1;
  padding:7px!important;
  align-self:stretch;
  border:1px dashed #aaa0ef;
  border-radius:10px;
  background:#f6f4ff;
  transform:none;
  cursor:pointer;
}
.t67-iwb-host.has-source-images #iwbSourceDrop[hidden]{display:none!important}
.t67-iwb-host.has-source-images #iwbSourceDrop:hover,
.t67-iwb-host.has-source-images #iwbSourceDrop.drag{
  background:#efebff;
  border-color:#7255e9;
  transform:none;
}
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner{
  display:flex;flex-direction:column;align-items:center;justify-content:center;
  gap:4px;max-width:100%;min-width:0;
  text-align:center;
}
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon{
  width:31px;height:31px;flex:none;
  border:0;border-radius:8px;
  color:#785cf1;background:transparent;
}
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon svg{width:23px;height:23px}
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner b,
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner span{display:none}
.t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner::after{
  content:'Add images';color:#6d54c3;
  font-size:10px;font-weight:650;line-height:1.25;white-space:normal;
}
html[data-theme="dark"] .t67-iwb-host.has-source-images #iwbSourceDrop,
body.dark .t67-iwb-host.has-source-images #iwbSourceDrop{
  background:#201d31;border-color:#6752a6;
}
html[data-theme="dark"] .t67-iwb-host.has-source-images #iwbSourceDrop:hover,
body.dark .t67-iwb-host.has-source-images #iwbSourceDrop:hover{background:#2b2542;border-color:#a38cf3}
html[data-theme="dark"] .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon,
body.dark .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon{color:#c1afff}
html[data-theme="dark"] .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner::after,
body.dark .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner::after{color:#cbbdff}
@media(max-width:600px){
  .t67-iwb-host.has-source-images #iwbSourceDrop{min-height:0!important;padding:3px!important}
  .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon{width:25px;height:25px}
  .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-icon svg{width:19px;height:19px}
  .t67-iwb-host.has-source-images #iwbSourceDrop .t67-iwb-drop-inner::after{font-size:9px}
}

/* V36: Minimal controls in the original right-side style galleries.
   The single-image Portrait Art information strip is redundant with the style cards. */
.t67-iwb-host .t67-iwb-right-library .pa-style-summary{display:none!important}
.t67-iwb-host .t67-iwb-right-library :is(.pa-style-load,.pp-style-load){
  box-sizing:border-box;
  width:auto!important;
  min-width:0!important;
  min-height:24px!important;
  height:auto!important;
  padding:4px 9px!important;
  border:1px solid #d6d6dc!important;
  border-radius:8px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:var(--iwb-muted,#64748b)!important;
  font-family:inherit!important;
  font-size:11px!important;
  font-weight:600!important;
  letter-spacing:0!important;
  line-height:1.2!important;
  text-transform:none!important;
  cursor:pointer;
}
.t67-iwb-host .t67-iwb-right-library :is(.pa-style-load,.pp-style-load):hover{
  color:var(--iwb-text,#111827)!important;
  border-color:var(--iwb-muted,#64748b)!important;
}

/* Empty right-hand output canvas: soft geometric geometry instead of checkerboard.
   This acts ONLY while the existing empty state is visible, not during running
   or when result cards are present. No JS or generation lifecycle changes. */
.t67-iwb-host:not(.is-running) .ve-main:has(> #iwbEmptyWorkspace:not([hidden])){
  background-color:#f6f7fd!important;
  background-image:
    url('../img/image-empty-geometry-light.svg'),
    radial-gradient(ellipse at 50% 46%,#fff 0%,rgba(255,255,255,.95) 27%,transparent 75%),
    radial-gradient(ellipse at 95% 55%,rgba(217,228,255,.77),transparent 66%),
    radial-gradient(ellipse at 7% 4%,rgba(227,222,255,.69),transparent 64%),
    linear-gradient(145deg,#f6f7fd,#f1f4fc)!important;
  background-size:cover!important;
  background-position:center!important;
  background-repeat:no-repeat!important;
}
.t67-iwb-host .ve-main:has(> #iwbEmptyWorkspace:not([hidden])) #iwbEmptyWorkspace{
  flex:1 0 auto;
  background:transparent!important;
}
/* A style library stays an opaque, readable surface above the decoration. */
.t67-iwb-host .ve-main:has(> #iwbEmptyWorkspace:not([hidden])) #iwbLibrarySlot:not([hidden]){
  background:var(--iwb-card,#fff);
}
html[data-theme="dark"] .t67-iwb-host:not(.is-running) .ve-main:has(> #iwbEmptyWorkspace:not([hidden])),
body.dark .t67-iwb-host:not(.is-running) .ve-main:has(> #iwbEmptyWorkspace:not([hidden])){
  background-color:#101725!important;
  background-image:
    url('../img/image-empty-geometry-dark.svg'),
    radial-gradient(ellipse at 51% 47%,rgba(49,58,88,.26),transparent 73%),
    radial-gradient(ellipse at 100% 70%,rgba(62,79,143,.2),transparent 65%),
    radial-gradient(ellipse at 4% 0%,rgba(85,77,142,.15),transparent 66%),
    linear-gradient(145deg,#151928,#101727)!important;
}

/* V40 — compact, unframed left controls and a subtly clearer result panel edge.
   Scoped to the existing unified Image Workbench; no JS/HTML changes. */
.t67-iwb-host .t67-iwb-ref-toggle-row{
  justify-content:flex-start;
}
.t67-iwb-host .t67-iwb-settings{
  border:0;
  border-radius:0;
  background:transparent;
  box-shadow:none;
}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-settings,
body.dark .t67-iwb-host .t67-iwb-settings{
  border:0;
  background:transparent;
}
.t67-iwb-host .t67-iwb-settings > summary{
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:6px 0;
  line-height:1.4;
  list-style:none;
  color:var(--iwb-text);
}
.t67-iwb-host .t67-iwb-settings > summary::before{
  content:'▸';
  display:inline-block;
  flex:none;
  font-size:11px;
  line-height:1;
  color:var(--iwb-muted);
}
.t67-iwb-host .t67-iwb-settings[open] > summary::before{
  content:'▾';
}
.t67-iwb-host .t67-iwb-settings > summary::after{
  content:none!important;
  display:none!important;
}
.t67-iwb-host .t67-iwb-settings-body{
  padding:3px 0 8px;
  border-top:0;
}
.t67-iwb-host .ve-layout > .ve-main{
  border-color:#cbd5e1;
}
html[data-theme="dark"] .t67-iwb-host .ve-layout > .ve-main,
body.dark .t67-iwb-host .ve-layout > .ve-main{
  border-color:#3e4c62;
}

/* V41 — readable Add reference text, with a slightly taller click target. */
.t67-iwb-host .t67-iwb-ref-toggle-row .t67-iwb-ref-toggle{
  color:#111111;
  line-height:1.6;
  min-height:30px;
  padding:5px 0;
}
.t67-iwb-host .t67-iwb-ref-toggle-row .t67-iwb-ref-toggle:hover{
  color:#000000;
}
html[data-theme="dark"] .t67-iwb-host .t67-iwb-ref-toggle-row .t67-iwb-ref-toggle,
body.dark .t67-iwb-host .t67-iwb-ref-toggle-row .t67-iwb-ref-toggle{
  color:#f5f7fb;
}



/* V47: lock the entire left workbench during a running batch, but keep right-side image preview usable. */
.t67-iwb-host.is-running .ve-side{pointer-events:none;opacity:.96}
.t67-iwb-host.is-running .ve-side :is(#iwbSourceDrop,#iwbPreviewHolder,.t67-iwb-ref-toggle-row,#iwbRefWrap,.t67-iwb-input-row,.t67-iwb-settings,.t67-iwb-actions){cursor:not-allowed!important}

/* V53: session recovery notice and low-emphasis clear button. */
.t67-iwb-host .t67-iwb-restore-note{color:var(--iwb-muted);font-size:12px;line-height:1.5;padding:0 7px 11px}
.t67-iwb-host .t67-iwb-restore-note[hidden],.t67-iwb-host #iwbClearResults[hidden]{display:none!important}
.t67-iwb-host .t67-iwb-bulk{gap:9px;flex-wrap:wrap}
.t67-iwb-host #iwbClearResults{min-height:34px;border:1px solid var(--iwb-line);border-radius:9px;background:transparent;box-shadow:none;color:var(--iwb-muted);font-size:12px;font-weight:600;padding:6px 10px}
.t67-iwb-host #iwbClearResults:hover{color:var(--iwb-text);border-color:var(--iwb-muted)}

/* V54: shared Image Workbench panel alignment and compact library chrome.
   Used only within unified image workbenches; unrelated image tools are untouched. */
@media (min-width:901px){
  /* Let the taller column set the whole row height. */
  .t67-iwb-host .ve-layout{align-items:stretch}
  .t67-iwb-host .ve-layout>.ve-side{display:flex;flex-direction:column;align-self:stretch;height:auto}
  .t67-iwb-host .ve-side>.t67-iwb-drop-wrap{
    display:flex;flex:1 1 auto;min-height:0;flex-direction:column;
  }
  /* The prompt absorbs spare space; input and action controls remain their natural size. */
  .t67-iwb-host .ve-side>.t67-iwb-drop-wrap>.t67-iwb-input-row{
    display:flex;flex:1 1 auto;min-height:105px;flex-direction:column;
  }
  .t67-iwb-host .ve-side .t67-iwb-input-row>.t67-iwb-prompt{
    flex:1 1 auto;height:auto;min-height:105px;max-height:none;
  }
}
/* Remove the nested right-side library's frame padding, not the actual style-card gaps. */
.t67-iwb-host .ve-layout>.ve-main:has(> #iwbLibrarySlot:not([hidden])){
  padding:0!important;
}
.t67-iwb-host #iwbLibrarySlot.t67-iwb-right-library:not([hidden]){
  padding:0!important;margin:0!important;
}
/* A smaller, quieter shared Load More control. Event handlers and visibility are unchanged. */
.t67-iwb-host .t67-iwb-right-library :is(
  #ctLoadMoreStyles,#styleLoadMore,#loadMoreModels,
  .ct-mini-action,.pa-style-load,.pp-style-load,.load-more
){
  min-height:23px!important;height:auto!important;
  padding:3px 8px!important;
  font-size:11px!important;font-weight:400!important;
  line-height:1.15!important;letter-spacing:0!important;
  text-transform:none!important;box-shadow:none!important;
}
.t67-iwb-host .t67-iwb-right-library .ct-style-actions{
  margin:5px 0 4px!important;line-height:1.15;
}
