.edit-panel { width: min(720px, calc(100% - 32px)); }
.edit-source { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
#editSourceMeta { color: var(--fg-3); font-size: var(--fz-xs); overflow-wrap: anywhere; }
.edit-canvas-wrap { display: grid; place-items: center; }
.edit-stage { position: relative; background: var(--sunken); border: 1px solid var(--line); border-radius: var(--r2); overflow: hidden; margin-bottom: 16px; }
.edit-stage img { display: block; width: 100%; height: auto; }
.edit-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; opacity: .55; touch-action: none; cursor: crosshair; }
.edit-stage canvas[data-eraser="true"] { cursor: cell; }
.edit-mask-tools { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.edit-mask-tools [aria-pressed="true"] { color: var(--a); border-color: var(--a); background: var(--a-bg); }
.edit-brush-field { grid-template-columns: 1fr auto; }
.edit-brush-field input { grid-column: 1 / -1; width: 100%; }
.edit-settings { margin: 12px 0 18px; }
.edit-settings summary { color: var(--fg-2); font-size: var(--fz-xs); cursor: pointer; margin-bottom: 12px; }
.edit-panel input:not([type="range"]), .edit-panel textarea, .edit-panel select { width: 100%; min-width: 0; }
#editStatus:empty { display: none; }
@media (max-width: 640px) { .edit-panel { width: 100%; } }
