@media screen {
 .layout:has(.image-workbench) {
  display:block;
  max-width:1500px;
 }
 .layout:has(.image-workbench) > .sidebar {display:none}
}

.image-workbench {
 --editor-surface:#fff;
 --editor-quiet:#f4f7fb;
 --editor-stage:#f4f7fa;
 --editor-dot:#d6dfea;
 --editor-border:#d5deea;
 --editor-text:#1d2c43;
 --editor-muted:#4b5e74;
 --editor-selected:#e6effb;
 --editor-accent:#204f8b;
 margin:0 0 20px;
 border:1px solid var(--editor-border);
 border-radius:14px;
 background:var(--editor-surface);
 color:var(--editor-text);
 min-width:0;
}

html[data-qt-theme="dark"] .image-workbench {
 --editor-surface:#1d2839;
 --editor-quiet:#162031;
 --editor-stage:#283547;
 --editor-dot:#435267;
 --editor-border:#3c4a60;
 --editor-text:#e7eef8;
 --editor-muted:#b1bfd2;
 --editor-selected:#2c4463;
 --editor-accent:#a8cffd;
 background:var(--editor-surface);
 color:var(--editor-text);
}

.image-workbench [hidden] {display:none!important}
.image-editor-toolbar {
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:10px 14px;
 padding:12px;
 border-bottom:1px solid var(--editor-border);
}
.image-editor-toolbar > .image-editor-actions {order:1;flex:1 0 100%}
.image-editor-toolbar > .image-editor-status {order:2;flex-basis:100%;margin:0}
.image-save-actions {display:flex;align-items:center;flex-wrap:wrap;gap:6px;margin-inline-start:auto;min-width:0}
.image-save-format {display:flex;align-items:center;gap:6px;margin:0;font-size:.78rem;white-space:nowrap}
.image-save-format select {
 min-height:36px;min-width:66px;padding:7px 9px;
 border:1px solid var(--editor-border);border-radius:6px;
 background:var(--editor-surface);color:var(--editor-text);font:inherit;
}
.image-workbench .image-save-actions :is(.primary,.secondary) {min-width:0;min-height:36px;padding:7px 10px}
.image-editor-actions {display:flex;gap:6px;flex-wrap:wrap;align-items:center}
.image-editor-actions button {
 border:1px solid var(--editor-border);
 border-radius:6px;
 background:var(--editor-surface);
 color:var(--editor-text);
 font:600 .79rem/1.3 system-ui,sans-serif;
 padding:8px 9px;
 min-height:36px;
 cursor:pointer;
}
.image-workbench button[aria-pressed="true"] {
 background:var(--editor-selected);
 border-color:var(--editor-accent);
 color:var(--editor-accent);
}
.image-workbench button:disabled {opacity:.48;cursor:default}
.image-workbench button:focus-visible,.image-workbench select:focus-visible,.image-workbench input:focus-visible {
 outline:2px solid var(--editor-accent);
 outline-offset:2px;
}
.image-editor-surfaces {
 display:grid;
 grid-template-columns:minmax(145px,178px) minmax(0,1fr) minmax(188px,224px);
}
.image-editor-library,.image-editor-settings {min-width:0;padding:12px;background:var(--editor-surface)}
.image-editor-library {border-inline-end:1px solid var(--editor-border)}
.image-editor-settings {border-inline-start:1px solid var(--editor-border)}
.image-editor-library h2,.image-editor-settings h2 {
 color:var(--editor-text);
 margin:0;
 font:700 .88rem/1.35 system-ui,sans-serif;
}
.image-editor-settings h3 {font-size:.8rem;margin:18px 0 8px}
.image-editor-settings a {font-size:.76rem}
.image-editor-settings .xfield {margin:9px 0;min-width:0}
.image-editor-settings .xfield span {font-size:.75rem}
.image-editor-settings .xfield :is(select,input) {min-width:0;width:100%;padding:6px 7px}
.image-export-dimensions {display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:6px}
.image-tone,.image-save-settings {margin:8px 0;border-block:1px solid var(--editor-border);padding:7px 0;font-size:.79rem}
.image-tone summary,.image-save-settings summary {cursor:pointer;font-weight:650}
.image-tone label {display:grid;grid-template-columns:1fr auto;gap:2px 8px;margin-top:8px}
.image-tone input {grid-column:1/-1;width:100%;margin:0;accent-color:var(--editor-accent)}
.image-tone output {font-variant-numeric:tabular-nums;color:var(--editor-muted)}

.image-library-head {display:flex;align-items:center;justify-content:space-between;gap:5px}
#image-file-count {color:var(--editor-muted);font-size:.72rem;font-variant-numeric:tabular-nums;white-space:nowrap}
#image-file-list {
 display:grid;
 gap:6px;
 list-style:none;
 padding:2px;
 margin:10px -2px;
 max-height:520px;
 overflow:auto;
}
#image-file-list:empty {margin:0;padding:0}
#image-file-list li {min-width:0}
#image-file-list button {
 display:grid;
 grid-template-columns:40px minmax(0,1fr);
 align-items:center;
 text-align:start;
 gap:7px;
 width:100%;
 padding:4px;
 border:1px solid var(--editor-border);
 border-radius:8px;
 background:var(--editor-surface);
 color:var(--editor-text);
 cursor:pointer;
}
#image-file-list button[aria-pressed="true"] {
 background:var(--editor-selected);
 border-color:var(--editor-accent);
 color:var(--editor-accent);
}
#image-file-list img {width:40px;height:40px;object-fit:cover;border-radius:4px;background:var(--editor-quiet)}
.image-file-name {overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem}
.image-editor-library > .image-editor-actions {margin-top:10px}

.image-editor-center {min-width:0;background:var(--editor-quiet)}
.image-workbench .image-editor-stage {
 display:grid;
 place-items:center;
 padding:14px;
 --editor-viewport-height:clamp(245px,42vh,490px);
 min-height:var(--editor-viewport-height);
 background-color:var(--editor-stage);
 background-image:radial-gradient(circle,var(--editor-dot) .8px,transparent .8px);
 background-size:16px 16px;
 color:var(--editor-text);
}
.image-editor-viewport {width:100%;height:var(--editor-viewport-height);overflow:auto;overscroll-behavior:contain}
.image-editor-frame {display:grid;place-items:center;width:max-content;min-width:100%;min-height:100%}
.image-editor-stage.is-drop-target {outline:3px dashed #7dc9ff;outline-offset:-8px}
.image-editor-empty {
 display:grid;
 justify-items:center;
 gap:7px;
 text-align:center;
 padding:18px;
}
.image-editor-empty span {color:var(--editor-muted);font-size:.8rem}
.image-workbench canvas {
 display:block;
 max-width:none;
 background:repeating-conic-gradient(#e7ebf0 0% 25%,#fff 0% 50%) 0 0/14px 14px;
 box-shadow:0 0 0 1px #61738b60;
}
.image-workbench canvas:is(.is-cropping,.is-resizing,.is-panning) {touch-action:none}
.image-workbench canvas.is-cropping {cursor:crosshair}
.image-workbench canvas.is-panning {cursor:grab}
.image-workbench canvas.is-resizing {
 scroll-margin-block:calc(var(--qt-header-height,0px) + 8px) calc(var(--qt-footer-height,0px) + 10px);
}
.image-view-tools #image-zoom {font-size:.78rem;font-variant-numeric:tabular-nums;min-width:3.5ch;text-align:center}
.image-editor-stagebar {
 display:flex;
 align-items:center;
 flex-wrap:wrap;
 gap:6px 10px;
 padding:7px 10px;
}
.image-editor-stagebar .image-view-tools {margin-inline-start:auto}
.image-editor-view,.image-editor-size,.image-editor-hint,.image-editor-status {
 margin:0;
 color:var(--editor-muted);
 font-size:.78rem;
 line-height:1.45;
}
.image-editor-view {color:var(--editor-text);font-weight:650}
.image-editor-size {font-variant-numeric:tabular-nums}
.image-editor-size strong {color:var(--editor-text);white-space:nowrap}
.image-editor-hint {padding:6px 10px 10px}
.image-editor-status,.image-workbench #x-error {margin:8px 12px 12px}
.image-workbench ~ #x-result {scroll-margin-top:calc(var(--qt-header-height,0px) + 12px)}
.image-editor-view:empty,.image-editor-size:empty,.image-editor-status:empty {display:none}

@media(max-width:880px) {
 .image-editor-surfaces {grid-template-columns:minmax(0,1fr) minmax(182px,210px)}
 .image-editor-library {grid-column:1/-1;border:0;border-bottom:1px solid var(--editor-border)}
 .image-library-head {justify-content:flex-start;gap:10px}
 #image-file-list {display:flex;max-height:none;overflow-x:auto}
 #image-file-list li {flex:0 0 134px}
}
@media(max-width:620px) {
 .image-editor-surfaces {grid-template-columns:minmax(0,1fr)}
 .image-editor-settings {border:0;border-top:1px solid var(--editor-border)}
 .image-editor-toolbar .image-editor-actions {order:1;width:100%}
 .image-save-actions {margin-inline-start:0}
 .image-save-format span {display:none}
 .image-editor-stagebar .image-view-tools {margin-inline-start:0;flex-basis:100%;order:1}
 .image-workbench .image-editor-stage {--editor-viewport-height:clamp(210px,37vh,370px);padding:8px}
}
