.order-image-editor-dialog {
  width: min(1120px, calc(100vw - 28px));
  max-width: 1120px;
  max-height: calc(100vh - 28px);
  padding: 0;
  border: 1px solid rgba(111, 169, 216, .28);
  border-radius: 14px;
  background: #f7f9fc;
  color: var(--text, #172033);
  box-shadow: 0 24px 80px rgba(23, 32, 51, .28);
}

.order-image-editor-dialog::backdrop { background: rgba(16, 24, 40, .72); backdrop-filter: blur(3px); }
.order-image-editor-shell { display: grid; max-height: calc(100vh - 30px); grid-template-rows: auto minmax(0, 1fr) auto; }
.order-image-editor-head { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 16px; border-bottom: 1px solid rgba(111, 169, 216, .2); background: #fff; }
.order-image-editor-head > div { display: grid; grid-template-columns: auto auto; align-items: baseline; gap: 4px 10px; min-width: 0; }
.order-image-editor-head span { color: var(--pink-strong, #d9537a); font-size: 11px; font-weight: 900; letter-spacing: .06em; }
.order-image-editor-head strong { font-size: 17px; }
.order-image-editor-head small { grid-column: 1 / -1; overflow: hidden; color: var(--muted, #68758a); text-overflow: ellipsis; white-space: nowrap; }
.order-image-editor-body { display: grid; grid-template-columns: minmax(0, 1fr) 250px; min-height: 0; overflow: auto; }
.order-image-editor-stage { display: grid; align-content: center; justify-items: center; gap: 8px; min-width: 0; padding: 18px; background: #1f2937; }
.order-image-editor-stage canvas { display: block; width: min(100%, 800px); height: auto; max-height: calc(100vh - 200px); border-radius: 8px; background: #dfe5ec; box-shadow: 0 10px 34px rgba(0, 0, 0, .28); touch-action: none; cursor: grab; }
.order-image-editor-stage canvas[data-tool='pen'], .order-image-editor-stage canvas[data-tool='arrow'], .order-image-editor-stage canvas[data-tool='text'] { cursor: crosshair; }
.order-image-editor-stage p { margin: 0; color: #d7dee8; font-size: 11px; text-align: center; }
.order-image-editor-tools { display: grid; align-content: start; gap: 14px; padding: 16px; overflow: auto; border-left: 1px solid rgba(111, 169, 216, .2); background: #fff; }
.order-image-editor-tools fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; }
.order-image-editor-tools legend, .order-image-editor-tools label > span { color: var(--muted, #68758a); font-size: 11px; font-weight: 850; }
.order-image-editor-segmented, .order-image-editor-tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 5px; }
.order-image-editor-tool-grid { grid-template-columns: repeat(2, 1fr); }
.order-image-editor-segmented button, .order-image-editor-tool-grid button, .order-image-editor-small-actions button { min-height: 32px; border: 1px solid rgba(111, 169, 216, .28); border-radius: 7px; background: #f8fbff; color: #334155; font-size: 11px; font-weight: 800; cursor: pointer; }
.order-image-editor-segmented button.is-active, .order-image-editor-tool-grid button.is-active { border-color: rgba(242, 122, 154, .62); background: var(--pink-soft, #fff2f6); color: var(--pink-strong, #d9537a); }
.order-image-editor-zoom, .order-image-editor-color, .order-image-editor-text { display: grid; gap: 7px; }
.order-image-editor-zoom > span { display: flex; justify-content: space-between; }
.order-image-editor-zoom input { accent-color: var(--pink, #f27a9a); }
.order-image-editor-color input { width: 100%; height: 34px; padding: 2px; border: 1px solid rgba(111, 169, 216, .28); border-radius: 7px; background: #fff; }
.order-image-editor-text input { min-height: 34px; padding: 0 9px; border: 1px solid rgba(111, 169, 216, .28); border-radius: 7px; }
.order-image-editor-small-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 5px; }
.order-image-editor-small-actions button:last-child { grid-column: 1 / -1; }
.order-image-editor-actions { display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px; border-top: 1px solid rgba(111, 169, 216, .2); background: #fff; }

@media (max-width: 760px) {
  .order-image-editor-body { grid-template-columns: 1fr; }
  .order-image-editor-tools { grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid rgba(111, 169, 216, .2); border-left: 0; }
  .order-image-editor-stage canvas { max-height: 48vh; }
}
