/* The dialog has a stable frame; only the canvas display size adapts to it. */
#annotation-dialog.image-editor-dialog{--image-editor-button-width:88px;width:min(1080px,calc(100vw - 32px));max-width:calc(100vw - 32px);height:min(900px,calc(100dvh - 32px));max-height:calc(100dvh - 32px);box-sizing:border-box;border-radius:16px;padding:18px;overflow:hidden}
#annotation-dialog.image-editor-dialog[open]{display:flex;flex-direction:column;gap:10px}
.image-editor-dialog .dialog-header{flex:0 0 auto;align-items:center;margin:0;gap:12px}
.image-editor-heading{display:flex;align-items:center;gap:14px;min-width:0;flex:1}
.image-editor-dialog h2{flex-shrink:0;font-size:17px;font-weight:500;margin:0}
#image-editor-status{min-width:0;font-size:11px;line-height:1.6;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.image-editor-dialog button{display:inline-flex;align-items:center;justify-content:center;flex:0 0 var(--image-editor-button-width);width:var(--image-editor-button-width);min-width:0;max-width:var(--image-editor-button-width);height:32px;min-height:32px;padding:0;border:1px solid var(--site-line);border-radius:7px;background:#fff;font-size:12px;font-weight:400;line-height:1;white-space:nowrap;box-shadow:none}
.image-editor-dialog button.primary,.image-editor-dialog button[aria-pressed=true]{background:var(--site-lime);border-color:var(--site-lime)}
.image-editor-dialog button:disabled{background:#f5f7f2;border-color:var(--site-line);cursor:default}
.image-editor-dialog #close-image-editor{flex:0 0 32px;width:32px;max-width:32px;font-size:22px;border-color:transparent}
.image-editor-modes,.image-annotation-options,.image-editor-history,.image-editor-dialog .dialog-actions{display:flex;align-items:center;gap:8px;margin:0;flex-shrink:0}
.image-editor-modes,.image-annotation-options{flex-wrap:wrap}
.image-annotation-options label{display:flex;align-items:center;gap:6px;font-size:12px;white-space:nowrap}
.image-annotation-options input[type=color]{width:36px;height:32px;padding:2px;border:1px solid var(--site-line);background:#fff;border-radius:5px}
.image-annotation-options input[type=range]{width:105px;accent-color:#a1be53}
.image-annotation-options output{width:30px;font-size:11px}
.image-editor-dialog .canvas-holder{flex:1 1 0;min-width:0;min-height:1px;max-height:none;overflow:hidden;border:1px solid var(--site-line);border-radius:8px;background:#eef1eb;display:flex;align-items:center;justify-content:center}
.image-editor-dialog canvas{display:block;flex:none;max-width:none;max-height:none;width:auto;height:auto;touch-action:none;cursor:crosshair}
.image-editor-footer{display:flex;align-items:center;justify-content:space-between;flex:0 0 auto;gap:8px;min-width:0}
.task-editor-gallery .image-edit-actions{position:absolute;top:7px;right:7px;display:flex;gap:6px}.task-editor-gallery .image-edit-actions button{position:static}
@media(max-width:600px){#annotation-dialog.image-editor-dialog{--image-editor-button-width:clamp(48px,calc((100vw - 80px)/5),88px);padding:12px;max-width:calc(100vw - 20px);width:calc(100vw - 20px)}.image-editor-dialog button{font-size:11px}.image-editor-heading{gap:10px}.image-editor-dialog h2{font-size:15px}.image-editor-modes,.image-annotation-options,.image-editor-history,.image-editor-dialog .dialog-actions,.image-editor-footer{gap:6px}.image-annotation-options input[type=range]{width:80px}}
