.resize-workspace,
.resize-workspace * { box-sizing: border-box; }
#resizeWorkspace.resize-workspace.ig-editor { --ig-inspector-width: clamp(250px, 23vw, 330px); }
.resize-editor-brand { display: inline-flex; min-width: 0; align-items: center; gap: 0; overflow: hidden; color: var(--ink); font-size: .95rem; font-weight: 800; text-decoration: none; white-space: nowrap; }
.resize-editor-brand img { width: 30px; height: 30px; flex: 0 0 30px; margin-right: 7px; border-radius: 8px; box-shadow: 0 5px 13px rgba(109,94,252,.28); }
.resize-editor-brand b { color: var(--brand); }
.resize-editor-title { display: grid; min-width: 0; gap: 2px; }
.resize-editor-title strong, .resize-editor-title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resize-editor-title strong { color: var(--ink); font-size: .9rem; }
.resize-editor-title span { color: var(--muted); font-size: .7rem; }
.resize-header-spacer { min-width: 0; flex: 1 1 auto; }
.resize-head-actions { display: flex; flex: 0 0 auto; gap: 4px; }
.resize-head-button { display: inline-grid; width: 40px; min-width: 40px; height: 40px; min-height: 40px; place-items: center; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); color: var(--ink-soft); padding: 0; touch-action: manipulation; }
.resize-head-button:hover { border-color: var(--brand); color: var(--brand); }
.resize-head-button svg { width: 20px; height: 20px; pointer-events: none; }
.resize-option-rail { align-items: center; }
.resize-rail-button { display: flex; width: 58px; min-width: 58px; height: 51px; min-height: 51px; flex: 0 0 51px; flex-direction: column; align-items: center; justify-content: center; gap: 3px; overflow: hidden; border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--ink-soft); padding: 0 3px; font-size: .64rem; font-weight: 700; line-height: 1; touch-action: manipulation; }
.resize-rail-button svg { width: 21px; height: 21px; pointer-events: none; }
.resize-rail-button span { overflow: hidden; max-width: 100%; text-overflow: ellipsis; white-space: nowrap; }
.resize-rail-button.on { border-color: color-mix(in srgb, var(--brand) 38%, var(--line)); background: color-mix(in srgb, var(--brand) 14%, var(--surface)); color: var(--brand); }
.resize-inspector-head { display: flex; height: 45px; min-width: 0; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); padding: 0 14px; }
.resize-inspector-head strong { color: var(--ink); font-size: .9rem; }
.resize-inspector-head span { min-width: 0; overflow: hidden; color: var(--muted); font-size: .68rem; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.resize-inspector-scroll { height: calc(100% - 45px); min-height: 0; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; }
.resize-workspace .controls { display: block; min-width: 0; margin: 0; }
.resize-workspace .control-section, .resize-files-panel { display: grid; min-width: 0; gap: 12px; border-bottom: 1px solid var(--line); padding: 14px; }
.resize-workspace [data-resize-content][hidden] { display: none !important; }
.resize-workspace .control-title { margin: 0; color: var(--ink-soft); font-size: .75rem; }
.resize-workspace .control-grid { display: grid; min-width: 0; grid-template-columns: 1fr; gap: 12px; }
.resize-workspace .field, .resize-workspace .inline-fields { min-width: 0; }
.resize-workspace input:not([type=checkbox]), .resize-workspace select { width: 100%; min-width: 0; }
.resize-workspace .inline-fields { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.resize-workspace .inline-fields .row { grid-column: 1 / -1; }
.resize-workspace .seg { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); }
.resize-workspace .seg-btn { min-width: 0; min-height: 40px; padding: 5px; font-size: .72rem; line-height: 1.1; }
.resize-workspace .actions[data-resize-content=export] { display: grid; grid-template-columns: 1fr; gap: 9px; padding: 14px; }
.resize-workspace .actions .btn { min-width: 0; min-height: 42px; justify-content: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resize-workspace .auto-update-note { color: var(--muted); font-size: .72rem; text-align: center; }
.resize-files-panel .control-heading { display: grid; gap: 4px; }
.resize-files-panel .control-heading h2 { margin: 0; color: var(--ink-soft); font-size: .75rem; }
.resize-files-panel .control-heading p { margin: 0; color: var(--muted); font-size: .73rem; line-height: 1.45; }
.resize-workspace .results { display: grid; min-width: 0; gap: 8px; margin: 0; padding: 0; }
.resize-file-selection { display: flex; min-width: 0; align-items: center; min-height: 38px; border: 1px solid var(--line); border-radius: 9px; background: var(--dropzone); padding: 8px 10px; }
.resize-file-selection label, .resize-file-check { display: flex; min-width: 0; align-items: center; gap: 9px; color: var(--ink-soft); font-size: .76rem; font-weight: 700; }
.resize-file-selection input, .resize-file-check input { width: 17px; height: 17px; flex: 0 0 17px; accent-color: var(--brand); }
.resize-file-row { display: grid; min-width: 0; grid-template-columns: 20px minmax(0, 1fr) minmax(0, 128px) 30px; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); padding: 8px; }
.resize-file-row.is-active { border-color: color-mix(in srgb, var(--brand) 62%, var(--line)); background: color-mix(in srgb, var(--brand) 7%, var(--surface)); }
.resize-file-check { min-height: 30px; overflow: hidden; }
.resize-file-focus { display: flex; min-width: 0; align-items: center; gap: 9px; border: 0; background: transparent; color: var(--ink-soft); padding: 0; text-align: left; touch-action: manipulation; }
.resize-file-focus:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 6px; }
.resize-file-focus img { display: block; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid var(--line); border-radius: 6px; background: var(--dropzone); object-fit: cover; }
.resize-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.resize-file-status { max-width: 128px; overflow: hidden; color: var(--muted); font-size: .68rem; line-height: 1.25; text-align: right; text-overflow: ellipsis; white-space: nowrap; }
.resize-file-status.is-ready { color: var(--ok); }
.resize-file-status.is-processing, .resize-file-status.is-loading { color: var(--brand); }
.resize-file-status.is-error { color: #ef4444; }
.resize-file-remove { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 7px; background: transparent; color: var(--ink-soft); font-size: 1.25rem; line-height: 1; padding: 0; touch-action: manipulation; }
.resize-file-remove:hover { border-color: #ef4444; color: #ef4444; }
.resize-stage-section { display: flex; min-width: 0; min-height: 0; flex-direction: column; overflow: hidden; background: var(--dropzone); }
.resize-stage { display: grid; min-width: 0; min-height: 0; flex: 1 1 auto; place-items: center; overflow: hidden; background: repeating-conic-gradient(rgba(128,128,128,.13) 0 25%, transparent 0 50%) 50% / 18px 18px; padding: 22px; }
#resizePreview { display: block; width: 100%; height: 100%; min-width: 0; min-height: 0; object-fit: contain; background: #fff; box-shadow: 0 14px 38px rgba(20,24,50,.2); }
.resize-preview-meta { min-height: 36px; margin: 0; border-top: 1px solid var(--line); background: var(--surface); color: var(--muted); padding: 9px 14px; font-size: .75rem; text-align: center; }
@media (max-width: 640px) {
  .resize-option-rail { align-items: stretch; }
  .resize-editor-brand { font-size: 0; gap: 0; }
  .resize-editor-brand img { width: 32px; height: 32px; flex-basis: 32px; margin-right: 0; }
  .resize-editor-title { display: none; }
  .resize-head-button { width: 36px; min-width: 36px; height: 36px; min-height: 36px; }
  .resize-stage { padding: 10px; }
  .resize-inspector-head { height: 39px; padding: 0 12px; }
  .resize-inspector-scroll { height: calc(100% - 39px); }
  .resize-rail-button { width: auto; min-width: 44px; flex: 1 1 44px; }
  .resize-workspace .control-section, .resize-files-panel { padding: 12px; }
  .resize-preview-meta { min-height: 38px; padding: 6px 10px; font-size: .69rem; }
  .resize-file-row { grid-template-columns: 20px minmax(0, 1fr) 28px; }
  .resize-file-check { grid-column: 1; grid-row: 1 / span 2; }
  .resize-file-status { grid-column: 2; grid-row: 2; max-width: none; padding-left: 0; text-align: left; }
  .resize-file-remove { grid-column: 3; grid-row: 1 / span 2; }
}
@media (max-width: 420px) { .resize-rail-button span { display:none; } .resize-rail-button { min-width: 40px; flex-basis:40px; } }
@media (max-width: 640px) and (max-height: 480px) { #resizeWorkspace.resize-workspace.ig-editor { --ig-inspector-height: min(180px, 32dvh); } .resize-preview-meta { display:none; } }
