.dither-workspace { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 32px; align-items: start; }
.dither-controls { display: grid; gap: 16px; }
.dither-drop { display: grid; gap: 8px; width: 100%; min-height: 132px; padding: 24px; border: 2px dashed var(--line); border-radius: 6px; background: var(--tl-inset-bg); color: var(--foreground); font: inherit; text-align: center; cursor: pointer; transition: border-color 150ms, background 150ms; }
.dither-drop strong { font-size: 16px; font-weight: 600; }
.dither-drop span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.dither-drop:hover, .file-dragover .dither-drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--background)); }
.dither-drop .drop-active { display: none; }
.file-dragover .dither-drop .drop-idle { display: none; }
.file-dragover .dither-drop .drop-active { display: block; }
.dither-controls hr { border: 0; border-top: 1px solid var(--line); margin: 8px 0; }
.check-field { display: flex; align-items: center; gap: 10px; font-size: 14px; min-height: 32px; }
.check-field input { accent-color: var(--accent); width: 18px; height: 18px; }
.dither-workspace button { border: 1px solid var(--line); border-radius: 5px; padding: 10px 14px; min-height: 44px; background: var(--surface); color: var(--foreground); font: inherit; font-size: 14px; cursor: pointer; transition: background 150ms, border-color 150ms; }
.dither-workspace button:hover:not(:disabled) { border-color: var(--accent); background: var(--tl-inset-bg); }
.dither-workspace button.primary { background: var(--accent); color: #fff; }
.dither-workspace button:disabled { opacity: .45; cursor: default; }
.dither-workspace :is(button, summary):focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.preview-pair { display: grid; gap: 24px; }
.preview-pair figure { margin: 0; }
.preview-pair figcaption { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.canvas-bed { min-height: 170px; padding: 20px; display: flex; align-items: center; justify-content: center; overflow: hidden; background: #e9e9e4; }
.canvas-bed canvas { display: block; max-width: 100%; max-height: 360px; width: auto; height: auto; object-fit: contain; }
#result { image-rendering: pixelated; }
#status { font-size: 13px; min-height: 42px; margin: 16px 0; color: var(--muted); }
.exports { display: flex; flex-wrap: wrap; gap: 10px; }
.dither-preview details { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 16px; font-size: 13px; }
.dither-preview summary { cursor: pointer; min-height: 32px; }
.dither-preview pre { overflow: auto; max-height: 260px; padding: 16px; background: var(--tl-inset-bg); font-size: 12px; }
.tool-panel a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 800px) { .dither-workspace { grid-template-columns: 1fr; } .dither-controls { max-width: 100%; } }
