.editor-shell { max-width: 1200px; }
.editor-shell .task-heading h1 { letter-spacing: -.045em; }
.editor-shell .task-lede { max-width: 770px; }
.editor-shell .task-grid { grid-template-columns: minmax(0, 1fr) 320px; }
.editor-shell .task-controls > .task-eyebrow { margin-bottom: 5px; }
.editor-shell .task-controls h2 { margin-bottom: 21px; }
.editor-shell select:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.editor-skip { position: fixed; left: 16px; top: -60px; z-index: 100; padding: 12px 16px; border-radius: 8px; background: var(--panel); color: var(--ink); font-size: 14px; }
.editor-skip:focus { top: 12px; }
.editor-source-heading { min-width: 0; }
.editor-source-heading .task-source-info { line-height: 1.5; overflow-wrap: anywhere; }
.editor-source-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; flex-shrink: 0; gap: 6px; }
.editor-source-actions .task-btn { padding: 9px 12px; font-size: 12px; white-space: nowrap; }
.editor-shell .task-stage { display: flex; flex-direction: column; }
.editor-preview { min-height: 360px; }
.editor-shell .editor-preview { flex: 1; }
.editor-preview.drag-over { outline: 3px solid var(--accent); outline-offset: -3px; background-color: var(--accent-soft); }
.editor-preview > canvas { max-height: 440px; }
.editor-empty { padding: 12px 0; }
.editor-empty h2 { margin-top: 20px; font-size: 22px; letter-spacing: -.025em; }
.editor-empty p { max-width: 330px; margin: 6px auto 16px; line-height: 1.6; }
.editor-empty small { display: block; margin-top: 12px; color: var(--ink-soft); font-size: 10px; }
.editor-sample-pair { display: flex; align-items: center; justify-content: center; gap: 13px; max-width: 390px; margin: auto; }
.editor-sample-pair img { display: block; width: calc((100% - 48px) / 2); max-width: none; height: auto; border: 5px solid var(--panel); border-radius: 5px; box-shadow: 0 6px 15px rgba(18, 24, 22, .1); opacity: 1; }
.editor-sample-pair img:first-child { transform: rotate(-3deg); }
.editor-sample-pair img:last-child { transform: rotate(3deg); }
.editor-sample-pair > span { color: var(--accent-strong); font-family: var(--mono); font-size: 23px; }
.editor-sample-flip { width: min(300px, 82%); position: relative; margin: 0 auto; }
.editor-sample-flip img { display: block; width: 100%; max-width: none; height: auto; max-height: 170px; border: 5px solid var(--panel); border-radius: 5px; box-shadow: 0 6px 15px rgba(18, 24, 22, .1); opacity: 1; }
.editor-sample-flip > span { position: absolute; bottom: -12px; right: 15px; display: grid; place-items: center; width: 42px; height: 32px; border: 1px solid var(--muted-line); border-radius: 7px; color: var(--accent-strong); background: var(--panel); font-size: 26px; line-height: 1; }
.editor-control-group { border: 0; padding: 0; margin: 0; min-width: 0; }
.editor-control-group legend { padding: 0; margin-bottom: 8px; font-size: 12px; font-weight: 600; }
.editor-layouts { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin-bottom: 16px; }
.editor-layouts button { padding: 8px 2px; min-height: 70px; font-size: 11px; }
.editor-layouts svg { width: 27px; height: 27px; }
.editor-layout-fields { grid-template-columns: minmax(0, 1fr) 65px; gap: 9px; }
.editor-layout-fields select, .editor-layout-fields input { padding: 8px; font-size: 12px; }
.editor-sizing-hint { margin-top: -4px; }
.editor-export-fields { border-top: 1px solid var(--muted-line); padding-top: 17px; margin-top: 16px; }
.editor-background { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 8px; }
.editor-background > span { margin: 0; }
.editor-background input[type="color"] { width: 58px; height: 36px; min-height: 36px; padding: 4px; flex-shrink: 0; cursor: pointer; }
.editor-quality > span { display: flex; align-items: center; justify-content: space-between; }
.editor-quality output { color: var(--ink-soft); font-family: var(--mono); font-size: 11px; font-weight: 400; }
.editor-quality input[type="range"] { min-height: 24px; padding: 0; border: 0; background: transparent; accent-color: var(--accent); cursor: pointer; }
.editor-shell #downloadBtn { display: block; width: 100%; margin: 13px 0 8px; min-height: 47px; font-size: 14px; }
.editor-download-hint { text-align: center; margin-bottom: 0; font-size: 10px; }
.editor-shell .task-summary { font-size: 12px; min-height: 48px; }
.editor-shell .task-preview-note { margin-top: 10px; }
.editor-flips { gap: 9px; margin-bottom: 11px; }
.editor-flips button { min-height: 110px; padding: 12px 4px; }
.editor-flips svg { width: 35px; height: 31px; margin-bottom: 9px; }
.editor-flips strong { display: block; font-size: 12px; font-weight: 600; margin-bottom: 4px; }
.editor-flips span { display: block; color: var(--ink-soft); font-size: 10px; }
.editor-reset-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.editor-reset-row .task-hint { margin: 0; font-size: 10px; }
.editor-reset-row .task-btn { font-size: 11px; white-space: nowrap; }
.editor-compare { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; align-items: center; padding: 16px; }
.editor-compare > .editor-empty { grid-column: 1 / -1; }
.editor-compare figure { min-width: 0; width: 100%; margin: 0; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.editor-compare figure:has(> img[hidden]), .editor-compare figure:has(> canvas[hidden]) { display: none; }
.editor-compare figcaption { width: 100%; margin-bottom: 12px; color: var(--ink-soft); font-size: 10px; letter-spacing: .06em; text-transform: uppercase; font-weight: 600; }
.editor-compare .editor-after figcaption { color: var(--accent-strong); }
.editor-compare img, .editor-compare canvas { display: block; max-width: 100%; max-height: 350px; width: auto; height: auto; box-shadow: 0 2px 8px rgba(18, 24, 22, .08); }
.editor-source-list { list-style: none; padding: 0; margin: 18px 0 0; display: grid; gap: 7px; max-height: 284px; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
.editor-item { display: flex; align-items: center; gap: 11px; min-width: 0; padding: 9px; border: 1px solid var(--muted-line); border-radius: 8px; background: var(--panel); }
.editor-thumb { width: 48px; height: 40px; flex-shrink: 0; object-fit: contain; border: 1px solid var(--muted-line); border-radius: 4px; background: repeating-conic-gradient(var(--checker) 0% 25%, transparent 0% 50%) 0 0 / 10px 10px; }
.editor-item-info { flex: 1; min-width: 0; color: var(--ink-soft); font-size: 10px; line-height: 1.45; overflow-wrap: anywhere; }
.editor-item-info strong { display: block; color: var(--ink); font-size: 11px; font-weight: 600; }
.editor-item-info small { display: block; font-family: var(--mono); font-size: 9px; margin-top: 3px; }
.editor-item-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; flex-shrink: 0; gap: 4px; }
.editor-item-actions button { border: 1px solid var(--muted-line); border-radius: 5px; min-height: 32px; padding: 5px 8px; background: var(--panel); color: var(--ink); font-size: 10px; }
.editor-item-actions button:hover:not(:disabled) { border-color: var(--accent); background: var(--accent-soft); }
.editor-item-actions button:disabled { opacity: .38; cursor: not-allowed; }
.editor-limits { display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 6px 18px; margin: 14px 0 0; color: var(--ink-soft); font-family: var(--mono); font-size: 10px; line-height: 1.7; }
.editor-notes { margin-top: 32px; }
.editor-notes .content-block h2 { font-size: 23px; letter-spacing: -.025em; }
.editor-notes .task-steps li { line-height: 1.65; }
.editor-notes .task-steps strong { margin-bottom: 5px; }
.editor-fit-note p { max-width: 960px; }
.editor-related h2 { margin-bottom: 18px; }
@media (max-width: 1000px) {
  .editor-shell .task-grid { grid-template-columns: minmax(0, 1fr) 300px; }
  .editor-shell .task-stage, .editor-shell .task-controls { padding: 20px; }
  .editor-shell .task-upload-bar { align-items: flex-start; }
  .editor-source-actions { max-width: 175px; }
  .editor-source-actions .task-btn { min-height: 40px; padding: 8px 10px; }
  .editor-layout-fields { grid-template-columns: minmax(0, 1fr) 58px; gap: 8px; }
  .editor-layout-fields select { font-size: 11px; padding-left: 6px; }
  .editor-item { flex-wrap: wrap; }
  .editor-item-actions { margin-left: auto; }
}
@media (max-width: 720px) {
  .editor-shell .task-grid { display: flex; flex-direction: column; }
  .editor-shell .task-stage { order: 0; padding: 17px; }
  .editor-shell .task-controls { order: 1; padding: 20px; border-left: 0; border-top: 1px solid var(--muted-line); }
  .editor-shell .task-preview { min-height: 300px; }
  [data-editor="merge"] .editor-shell .editor-preview { min-height: 200px; }
  .editor-shell .task-preview canvas { max-height: 380px; }
  .editor-source-actions { max-width: none; }
  .editor-empty h2 { font-size: 21px; }
  .editor-shell .task-controls h2 { margin-bottom: 18px; }
  .editor-layouts { gap: 8px; }
  .editor-layout-fields { grid-template-columns: minmax(0, 1fr) 80px; gap: 12px; }
  .editor-layout-fields select { font-size: 13px; padding-left: 10px; }
  .editor-layouts button { min-height: 72px; font-size: 12px; }
  .editor-shell #downloadBtn { min-height: 48px; }
  .editor-compare { gap: 10px; padding: 12px; }
  .editor-compare figcaption { font-size: 9px; }
  .editor-source-list { max-height: 300px; }
  .editor-item { flex-wrap: nowrap; }
  .editor-item-actions { margin-left: 0; }
  .editor-item-actions button { min-height: 36px; }
  .editor-limits { justify-content: flex-start; gap: 3px 14px; padding: 0 3px; font-size: 9px; }
  .editor-notes { margin-top: 26px; }
  .editor-notes .task-steps { grid-template-columns: 1fr; gap: 18px; }
}
@media (max-width: 450px) {
  .editor-shell .task-upload-bar { flex-wrap: wrap; gap: 11px; margin-bottom: 15px; }
  .editor-source-actions { justify-content: flex-start; }
  .editor-source-actions .task-btn { min-height: 40px; }
  .editor-preview { padding: 12px; }
  .editor-sample-pair { gap: 9px; }
  .editor-sample-pair img { width: calc((100% - 30px) / 2); border-width: 4px; }
  .editor-sample-pair > span { font-size: 19px; }
  .editor-empty h2 { margin-top: 18px; }
  .editor-empty p { font-size: 12px; }
  .editor-item { flex-wrap: wrap; gap: 8px; }
  .editor-item-actions { width: 100%; justify-content: flex-start; padding-left: 56px; }
  .editor-item-actions button { flex: 1; padding: 5px; }
  .editor-item-info strong { font-size: 11px; }
  .editor-compare { grid-template-columns: minmax(0, 1fr); padding: 12px; gap: 18px; }
  .editor-compare figcaption { margin-bottom: 8px; }
  .editor-compare img, .editor-compare canvas { max-height: 220px; }
}
@media (prefers-reduced-motion: reduce) { .editor-shell *, .editor-shell *::before, .editor-shell *::after { transition: none !important; } }
