:root {
  color-scheme: light;
  --paper: #ffffff;
  --worktop: #edf1f2;
  --ink: #20373e;
  --muted: #5d6e76;
  --line: #d4dde0;
  --queue: #162b32;
  --queue-muted: #b4c3c7;
  --queue-line: #395057;
  --queue-selected: #25434a;
  --accent: #087c72;
  --accent-hover: #06685f;
  --positive: #166b51;
  --positive-surface: #e8f4ee;
  --negative: #a83b32;
  --negative-surface: #fff0ed;
  --caution: #795423;
  --caution-surface: #fff6e6;
  --focus: #087c72;
  --shadow-paper: 0 8px 28px #23383f12;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 16px;
  font-synthesis: none;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; color: var(--ink); background: var(--worktop); font-size: .875rem; line-height: 1.6; }
button, input { font: inherit; }
button, a, input, summary { -webkit-tap-highlight-color: transparent; }
button { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); color: var(--ink); font-weight: 600; line-height: 1.45; cursor: pointer; transition: background 160ms ease-out, border-color 160ms ease-out, color 160ms ease-out; }
button:hover:not(:disabled) { background: #f2f6f6; border-color: #9db1b7; }
button:active:not(:disabled) { background: #e5eeed; }
button:disabled { color: #596b73; background: #e6ecee; border-color: #d4dde0; cursor: not-allowed; }
button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }
button svg, .local-status svg { width: 20px; height: 20px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent); text-underline-offset: 4px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
::selection { color: #173a34; background: #c8e9e1; }
input { caret-color: var(--accent); }
.primary { color: var(--paper); background: var(--accent); border-color: var(--accent); }
.primary:hover:not(:disabled) { color: var(--paper); background: var(--accent-hover); border-color: var(--accent-hover); }
.primary:active:not(:disabled) { background: #05584f; }
.quiet-button { border-color: transparent; background: transparent; font-weight: 500; }
.quiet-button:hover:not(:disabled) { border-color: transparent; background: #e6eeef; }
.quiet-button:disabled { border-color: transparent; background: transparent; }
.screen-reader { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.app-header { height: 64px; position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 28px 0 23px; background: var(--paper); border-bottom: 1px solid var(--line); }
.app-identity { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark { width: 30px; height: 32px; color: var(--accent); stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }
.app-identity h1 { margin: 0; font-size: 1.125rem; line-height: 1.3; font-weight: 650; letter-spacing: -.025em; white-space: nowrap; }
.trial-badge { color: #52686f; background: #f1f5f5; border: 1px solid #d4dfe1; padding: 2px 7px; border-radius: 4px; font-size: .75rem; white-space: nowrap; }
.local-status { display: flex; align-items: center; gap: 7px; color: var(--muted); margin: 0; font-size: .8125rem; white-space: nowrap; }
.local-status svg { width: 18px; height: 18px; color: var(--accent); }

.workspace { display: grid; grid-template-columns: 264px minmax(0,1fr); min-height: calc(100dvh - 64px); }
.queue { position: sticky; top: 64px; height: calc(100dvh - 64px); min-height: 460px; display: flex; flex-direction: column; overflow-y: auto; background: var(--queue); color: #f3f7f8; scrollbar-color: #69848c var(--queue); }
.queue-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 26px 20px 20px; }
.queue-heading h2 { margin: 0; font-size: .875rem; font-weight: 600; }
.file-count { color: var(--queue-muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.queue-add { padding: 0 16px 14px; }
.queue-button { width: 100%; color: #f3f7f8; background: #244149; border-color: #54727a; }
.queue-button:hover:not(:disabled) { color: #fff; background: #31535c; border-color: #7d9da5; }
.queue-button:disabled { color: #a7b9bf; background: #243d45; border-color: #39545c; }
.queue :focus-visible { --focus: #90dac8; }
.file-list { padding: 0 12px 20px; flex: 1; min-height: 0; }
.list-empty { margin: 60px 8px 0; color: var(--queue-muted); font-size: .8125rem; line-height: 1.9; }
.list-empty p { margin: 0; }
.list-empty p + p { margin-top: 3px; font-size: .75rem; }
.file-row { display: grid; grid-template-columns: minmax(0,1fr) 44px; margin-bottom: 6px; border-radius: 6px; background: transparent; transition: background 160ms ease-out; }
.file-row.selected { background: var(--queue-selected); }
.file-row:hover { background: #203b43; }
.file-row.selected:hover { background: var(--queue-selected); }
.file-select { display: flex; align-items: flex-start; justify-content: flex-start; min-width: 0; gap: 10px; min-height: 100px; padding: 14px 0 14px 12px; border: 0; color: inherit; background: transparent; text-align: left; font-weight: 400; white-space: normal; }
.file-select:hover:not(:disabled), .file-select:active:not(:disabled) { border: 0; background: transparent; }
.file-icon { position: relative; display: flex; align-items: center; justify-content: center; flex: 0 0 30px; height: 37px; margin-top: 2px; border: 1px solid #91a9b1; border-radius: 3px; color: #c2d2d8; font-size: .75rem; line-height: 1; font-weight: 600; }
.file-info { display: block; flex: 1; min-width: 0; }
.file-name { display: block; color: #f3f7f8; font-size: .875rem; line-height: 1.5; font-weight: 550; overflow-wrap: anywhere; }
.file-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin: 5px 0 7px; font-size: .75rem; line-height: 1.45; color: var(--queue-muted); font-variant-numeric: tabular-nums; }
.demo-label { color: #d2c7f2; }
.file-status { display: flex; align-items: center; gap: 6px; font-size: .75rem; line-height: 1.5; color: var(--queue-muted); }
.file-status.queued, .file-status.cancelled { color: #c5d1d5; }
.file-status.processing { color: #a0d9ed; }
.file-status.ready, .file-status.unchanged { color: #91dbc2; }
.file-status.blocked, .file-status.error { color: #ffb4aa; }
.remove-file { align-self: start; width: 44px; height: 44px; padding: 0; margin-top: 5px; border: 0; background: transparent; color: var(--queue-muted); font-size: 0; }
.remove-file::before { content: ""; width: 16px; height: 16px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 6 8 8M14 6l-8 8' fill='none' stroke='black' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") center / contain no-repeat; }
.remove-file:hover:not(:disabled) { color: #ffb4aa; background: #3d3b40; }
.queue-footer { padding: 18px 20px 22px; border-top: 1px solid var(--queue-line); }
.queue-summary { display: grid; grid-template-columns: 1fr 1fr 1.3fr; gap: 10px; margin-bottom: 22px; font-size: .75rem; line-height: 1.5; color: var(--queue-muted); }
.queue-summary span { display: flex; flex-direction: column; gap: 4px; }
.queue-summary strong { color: #f3f7f8; font-size: 1.125rem; line-height: 1.4; font-weight: 550; font-variant-numeric: tabular-nums; }
.queue-limit { margin: 0; font-size: .75rem; line-height: 1.8; color: var(--queue-muted); }
.queue-keep { display: flex; align-items: center; gap: 7px; margin: 14px 0 0; color: #d0dce0; font-size: .75rem; }
.queue-keep svg { width: 16px; height: 16px; stroke: currentColor; stroke-width: 1.3; stroke-linecap: round; stroke-linejoin: round; }
.queue-toggle { display: none; }

.workbench { min-width: 0; display: flex; flex-direction: column; padding: 24px 28px 0; }
.empty-workspace { flex: 1; min-height: 490px; display: flex; align-items: center; justify-content: center; background: var(--paper); }
.empty-content { width: min(100%,520px); padding: 48px 24px 36px; text-align: center; }
.upload-symbol { width: 56px; height: 56px; margin-bottom: 23px; color: #66838b; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
.empty-content h2 { margin: 0 0 14px; font-size: 1.5rem; line-height: 1.4; letter-spacing: -.025em; font-weight: 600; text-wrap: balance; }
.empty-description { margin: 0; font-size: .9375rem; color: var(--muted); }
.mobile-break { display: none; }
.empty-choose { min-width: 192px; min-height: 48px; padding: 12px 24px; margin-top: 30px; font-size: .9375rem; }
.drop-hint { margin: 12px 0 0; color: var(--muted); font-size: .8125rem; }
.empty-limit { margin: 30px 0 0; font-size: .8125rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.component-note { margin: 7px 0 0; color: var(--muted); font-size: .75rem; }
.workspace-toolbar { display: flex; align-items: center; justify-content: center; gap: 12px; padding: 0 24px 24px; background: var(--paper); }
.batch-actions, .utility-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.workspace:not(:has(#fileDetail:not([hidden]))) .batch-actions:not(:has(#clearFiles:not(:disabled))),
.workspace:not(:has(#fileDetail:not([hidden]))) #processFiles,
.workspace:not(:has(#fileDetail:not([hidden]))) .queue-add,
.workspace:not(:has(#fileDetail:not([hidden]))) .queue-summary,
.workspace:not(:has(#fileDetail:not([hidden]))) #downloadZip { display: none; }
.workspace:not(:has(#fileDetail:not([hidden]))) .demo-button { font-size: .8125rem; color: var(--muted); text-decoration: underline; text-underline-offset: 4px; }
.workspace:has(#fileDetail:not([hidden])) .workspace-toolbar { justify-content: space-between; min-height: 76px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.process-button::before, .zip-button::before { content: ""; width: 18px; height: 18px; flex: 0 0 auto; background: currentColor; mask-position: center; mask-size: contain; mask-repeat: no-repeat; }
.process-button::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m7 4 8 6-8 6V4Z' fill='none' stroke='black' stroke-width='1.5' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.zip-button::before { mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M10 3v10m-3.5-3.5L10 13l3.5-3.5M4 13v4h12v-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); }
.file-detail { min-width: 0; }
.detail-header { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 22px; background: var(--paper); }
.detail-title { min-width: 0; }
.detail-name { margin: 0; font-size: 1.125rem; line-height: 1.5; font-weight: 600; letter-spacing: -.015em; overflow-wrap: anywhere; }
.detail-source { margin: 6px 0 0; font-size: .75rem; color: var(--muted); }
.detail-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; margin-top: 6px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.detail-meta span + span { padding-left: 12px; border-left: 1px solid var(--line); }
.detail-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: 8px; flex: 0 0 auto; }
.result-banner { display: flex; align-items: flex-start; gap: 10px; padding: 14px 20px; margin-top: 16px; background: #e1e8eb; color: #3b5661; font-size: .875rem; overflow-wrap: anywhere; }
.result-banner.ready, .result-banner.unchanged { background: var(--positive-surface); color: var(--positive); }
.result-banner.blocked, .result-banner.error { background: var(--negative-surface); color: var(--negative); }
.result-banner.processing { background: #e5eff5; color: #295b73; }
.result-banner.cancelled { background: var(--caution-surface); color: var(--caution); }
.dot { display: inline-block; flex: 0 0 auto; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.banner-dot { margin-top: 8px; }
.spinner { display: inline-block; flex: 0 0 auto; width: 12px; height: 12px; border: 1.5px solid currentColor; border-top-color: transparent; border-radius: 50%; animation: spin .85s linear infinite; }
.spinner.banner-dot { margin-top: 5px; }
@keyframes spin { to { transform: rotate(360deg); } }
.preview-tools { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 24px 0 14px; }
.preview-tools h3 { margin: 0; font-size: .875rem; font-weight: 600; }
.page-controls { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: .8125rem; font-variant-numeric: tabular-nums; }
.icon-button { width: 44px; height: 44px; padding: 0; }
.page-controls input { width: 52px; min-height: 44px; padding: 8px 4px; color: var(--ink); background: var(--paper); border: 1px solid #a8bbc1; border-radius: 5px; text-align: center; appearance: textfield; font-variant-numeric: tabular-nums; }
.page-controls input:disabled { color: #596b73; border-color: var(--line); background: #e6ecee; }
.page-controls input::-webkit-inner-spin-button { appearance: none; }
.preview-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; align-items: start; }
.preview-box { min-width: 0; margin: 0; }
.preview-box figcaption { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 0 12px; font-size: .8125rem; font-weight: 550; }
.preview-tag { color: var(--muted); font-size: .75rem; font-weight: 400; }
.preview-sheet { min-width: 0; min-height: 440px; padding: 12px; display: flex; align-items: flex-start; justify-content: center; background: var(--paper); box-shadow: var(--shadow-paper); }
.preview-sheet img { display: block; max-width: 100%; height: auto; background: var(--paper); }
.preview-placeholder { align-self: center; max-width: 240px; padding: 28px 16px; color: var(--muted); font-size: .875rem; line-height: 1.9; text-align: center; overflow-wrap: anywhere; }
.comparison-foot { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: 8px 20px; padding: 16px 0 22px; color: var(--muted); font-size: .75rem; }
.comparison-foot p { margin: 0; }
.comparison-metric { font-variant-numeric: tabular-nums; }
.issues { margin-bottom: 24px; padding-top: 18px; border-top: 1px solid #c7d3d7; }
.issues h3 { margin: 0 0 12px; font-size: .875rem; font-weight: 600; }
.issue-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.issue-list li { margin: 0; padding: 13px 16px; background: var(--caution-surface); color: var(--caution); line-height: 1.8; font-size: .8125rem; white-space: pre-wrap; overflow-wrap: anywhere; }
.issue-list li.issue { color: var(--negative); background: var(--negative-surface); }
.work-status { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; padding: 14px 0; color: var(--muted); font-size: .8125rem; }
.work-status-content { min-width: 0; display: flex; align-items: center; gap: 16px; }
.work-message { min-width: 0; overflow-wrap: anywhere; }
.work-message.error { color: var(--negative); }
.work-message.success { color: var(--positive); }
.work-status progress { flex: 0 0 120px; width: 120px; height: 5px; border: 0; border-radius: 3px; overflow: hidden; appearance: none; background: #cdd9dc; accent-color: var(--accent); }
.work-status progress::-webkit-progress-bar { background: #cdd9dc; }
.work-status progress::-webkit-progress-value { background: var(--accent); }
.work-status progress::-moz-progress-bar { background: var(--accent); }
.cancel-button { color: var(--negative); border-color: #d9b9b5; flex: 0 0 auto; background: var(--paper); }
.cancel-button:hover:not(:disabled) { color: #8d2a23; background: var(--negative-surface); border-color: #c88e86; }
.workspace-footer { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 12px 28px; border-top: 1px solid #cdd8dc; padding: 10px 0 15px; font-size: .75rem; color: var(--muted); }
.scope-notes { min-width: 0; grid-column: 1 / -1; grid-row: 1; }
.scope-notes summary { width: fit-content; max-width: calc(100% - 120px); min-height: 44px; display: flex; align-items: center; gap: 7px; cursor: pointer; list-style: none; }
.scope-notes summary::-webkit-details-marker { display: none; }
.scope-notes summary svg { width: 16px; height: 16px; flex: 0 0 auto; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; transition: transform 160ms ease-out; }
.scope-notes[open] summary svg { transform: rotate(180deg); }
.scope-copy { max-width: 72ch; padding: 0 0 12px; font-size: .8125rem; line-height: 1.9; }
.scope-copy p { margin: 0 0 12px; }
.scope-copy p:last-child { margin-bottom: 0; }
.scope-copy strong { color: var(--ink); font-weight: 600; }
.credits-link { min-height: 44px; display: inline-flex; align-items: center; grid-column: 2; grid-row: 1; justify-self: end; position: relative; }
.drop-active { outline: 3px dashed var(--accent); outline-offset: -5px; }
.workspace.drop-active .empty-workspace { background: #f2faf7; }

/* Legal content shares the document surface; license resources remain intact. */
.credits-body { background: var(--worktop); }
.credits-header { max-width: 900px; margin: 0 auto; padding: 20px 32px; }
.credits-header a { display: inline-flex; align-items: center; min-height: 44px; gap: 8px; }
.credits-header svg { width: 18px; height: 18px; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.credits-document { max-width: 836px; margin: 0 auto 48px; padding: 40px 48px; background: var(--paper); font-size: .9375rem; line-height: 1.95; }
.credits-document h1 { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.4; letter-spacing: -.025em; }
.credits-document h2 { margin: 36px 0 12px; font-size: 1.125rem; line-height: 1.5; }
.credits-document p { margin: 0 0 16px; }
.credits-document ul { padding-left: 22px; }
.credits-document li { margin-bottom: 12px; overflow-wrap: anywhere; }
.credits-document details { margin: 18px 0; padding: 0; }
.credits-document summary { min-height: 44px; padding: 10px 0; color: var(--accent); cursor: pointer; }

@media (min-width: 1500px) {
  .workbench { padding-left: 40px; padding-right: 40px; }
  .preview-grid { gap: 28px; }
  .preview-sheet { min-height: 560px; padding: 16px; }
}
@media (max-width: 1180px) {
  .workbench { padding-left: 20px; padding-right: 20px; }
  .workspace:has(#fileDetail:not([hidden])) .workspace-toolbar { align-items: flex-start; gap: 12px; padding: 14px 18px; }
  .utility-actions { justify-content: flex-end; }
  .detail-header { align-items: flex-start; flex-direction: column; gap: 16px; padding: 20px 18px; }
  .detail-actions { justify-content: flex-start; }
  .preview-grid { gap: 16px; }
  .preview-sheet { min-height: 380px; padding: 8px; }
}
@media (max-width: 760px) {
  .app-header { padding: 0 16px; gap: 10px; }
  .app-identity { gap: 8px; }
  .app-identity h1 { font-size: 1rem; }
  .brand-mark { width: 24px; height: 28px; }
  .trial-badge { font-size: .75rem; padding: 2px 6px; }
  .local-status { font-size: .75rem; }
  .local-status svg { display: none; }
  .local-status-detail { display: none; }
  .workspace { grid-template-columns: minmax(0,1fr); }
  .queue { position: relative; top: auto; height: auto; min-height: 0; overflow: visible; }
  .workspace:not(:has(#fileDetail:not([hidden]))) .queue { display: none; }
  .queue-heading { min-height: 52px; padding: 8px 150px 8px 18px; }
  .queue-add { position: absolute; top: 4px; right: 16px; padding: 0; }
  .queue-button { min-height: 44px; width: auto; padding: 8px 12px; }
  .file-list { max-height: none; overflow: visible; padding: 0 10px 6px; }
  .workspace[data-queue-expanded="false"] .file-row:not(.selected) { display: none; }
  .workspace[data-queue-expanded="false"] .file-meta { display: none; }
  .file-row { margin-bottom: 0; }
  .file-select { min-height: 60px; gap: 8px; padding: 8px 0 8px 8px; }
  .file-icon { flex-basis: 27px; height: 33px; }
  .file-status { margin-top: 4px; }
  .file-name { font-size: .875rem; }
  .queue-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 12px 4px 18px; }
  .queue-summary { display: flex; flex-wrap: wrap; gap: 4px 10px; margin: 0; }
  .queue-summary span { flex-direction: row; align-items: baseline; gap: 4px; white-space: nowrap; }
  .queue-summary strong { font-size: .875rem; }
  .queue-toggle { display: inline-flex; flex: 0 0 auto; gap: 5px; padding: 8px 6px; border: 0; background: transparent; color: #d0dce0; font-size: .75rem; font-weight: 500; white-space: nowrap; }
  .queue-toggle::after { content: ""; width: 14px; height: 14px; background: currentColor; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m6 8 4 4 4-4' fill='none' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat; }
  .queue-toggle[aria-expanded="true"]::after { transform: rotate(180deg); }
  .queue-toggle:hover:not(:disabled) { color: #fff; background: #25434a; border-color: transparent; }
  .queue-limit, .queue-keep { display: none; }
  .workbench { padding: 12px 16px 0; }
  .empty-workspace { min-height: 430px; }
  .empty-content { padding: 40px 16px 24px; }
  .empty-content h2 { font-size: 1.375rem; }
  .empty-description { font-size: .875rem; }
  .mobile-break { display: initial; }
  .upload-symbol { margin-bottom: 20px; }
  .empty-choose { margin-top: 26px; }
  .empty-limit { margin-top: 26px; font-size: .75rem; }
  .component-note { max-width: 240px; margin: 8px auto 0; }
  .workspace-toolbar { padding-bottom: 20px; }
  .workspace:has(#fileDetail:not([hidden])) .workspace-toolbar { flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: flex-start; gap: 6px; min-height: 0; padding: 10px 8px; }
  .workspace:has(#fileDetail:not([hidden])) .batch-actions,
  .workspace:has(#fileDetail:not([hidden])) .utility-actions { display: contents; }
  .workspace:has(#fileDetail:not([hidden])) .workspace-toolbar button { flex: 1 1 calc(50% - 6px); padding: 8px; font-size: .8125rem; white-space: nowrap; }
  .zip-button::before { display: none; }
  .workspace[data-pending-count="0"][data-busy="false"] #processFiles { display: none; }
  .workspace[data-pending-count="0"][data-busy="false"] .workspace-toolbar button { flex: 0 0 auto; }
  .workspace[data-pending-count="0"][data-busy="false"] .workspace-toolbar #downloadZip { flex: 1 1 auto; }
  .detail-header { padding: 12px; gap: 8px; }
  .detail-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 8px; width: 100%; }
  .detail-name { font-size: 1rem; }
  .detail-title .detail-name { flex-basis: 100%; }
  .detail-source { margin-top: 4px; }
  .detail-meta { margin-top: 4px; gap: 4px 8px; font-size: .75rem; }
  .detail-meta span + span { padding-left: 8px; }
  .detail-actions { width: 100%; gap: 6px; }
  .detail-actions button { padding-left: 10px; padding-right: 10px; font-size: .8125rem; }
  .detail-actions .download-file { margin-left: auto; }
  .result-banner { padding: 10px 12px; margin-top: 10px; }
  .preview-tools { padding: 12px 0 8px; gap: 8px; }
  .preview-tools h3 { font-size: .875rem; }
  .page-controls { gap: 4px; font-size: .75rem; }
  .page-controls input { width: 44px; }
  .preview-grid { grid-template-columns: minmax(0,1fr); gap: 24px; }
  .preview-box figcaption { padding-bottom: 10px; }
  .preview-sheet { min-height: 400px; padding: 12px; }
  .comparison-foot { padding-bottom: 20px; }
  .work-status { align-items: flex-start; gap: 10px; }
  .work-status-content { align-items: flex-start; flex-direction: column; gap: 10px; padding-top: 8px; }
  .work-status progress { flex-basis: auto; max-width: 180px; width: 100%; }
  .credits-header { padding: 12px 20px; }
  .credits-document { margin: 0 12px 24px; padding: 28px 24px; font-size: .875rem; }
  .credits-document h1 { font-size: 1.5rem; }
}
@media (max-width: 380px) {
  .app-header { padding: 0 12px; }
  .local-status { display: none; }
  .workbench { padding-left: 12px; padding-right: 12px; }
  .empty-content { padding-left: 10px; padding-right: 10px; }
  .preview-tools { align-items: flex-start; flex-direction: column; }
  .page-controls { align-self: flex-end; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
