:root { --pdf-ink: #15202b; --pdf-accent: #d94b35; --pdf-paper: #fff; --pdf-desk: #e8e8e5; }
.pdf-shell { background: #f8f8f6; }
.pdf-hero { width: min(100%, 1160px); margin: auto; padding: 34px clamp(20px, 4vw, 48px) 72px; }
.pdf-hero .breadcrumb { margin-bottom: 38px; }
.pdf-hero-copy { max-width: 850px; }
.pdf-hero h1 { margin: 8px 0 18px; font-size: clamp(40px, 6vw, 68px); letter-spacing: -.045em; }
.pdf-hero .lead { max-width: 720px; }
.pdf-local { display: inline-flex; align-items: center; gap: 9px; margin-top: 18px; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.pdf-local::before { content: "⌁"; width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid currentColor; }
.pdf-workspace { margin-top: 42px; border: 2px solid var(--pdf-ink); background: var(--pdf-paper); }
.pdf-drop { min-height: 350px; margin: 14px; padding: 40px 18px; display: flex; flex-direction: column; align-items: center; justify-content: center; border: 1px dashed #858585; text-align: center; cursor: pointer; }
.pdf-drop.is-over { border-color: var(--pdf-accent); background: #fff9f7; }
.pdf-drop > span { width: 54px; height: 54px; margin-bottom: 18px; display: grid; place-items: center; border: 1px solid var(--pdf-ink); font-size: 28px; font-weight: 300; }
.pdf-drop h2 { margin: 0; font-size: clamp(25px, 3vw, 34px); }
.pdf-drop p { margin: 9px 0; color: #666; }
.pdf-drop small { margin-top: 16px; color: #666; font-size: 10px; }
.pdf-drop .pdf-load-status { min-height: 18px; margin: 14px 0 0; color: #26734d; font-size: 10px; font-weight: 700; }
.pdf-drop .pdf-load-status:empty { display: none; }
.pdf-drop .pdf-load-status.is-error { display: block; color: #b52727; }
.pdf-special-drop { min-height: 330px; margin: 14px; }
.pdf-selected-file { max-width: min(100%, 620px); margin-top: 16px; overflow: hidden; font: 700 11px/1.5 ui-monospace, monospace; text-overflow: ellipsis; white-space: nowrap; }
.pdf-selected-file:empty { display: none; }
.pdf-toolbar { min-height: 68px; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid #ccc; }
.pdf-toolbar > div { display: flex; align-items: center; gap: 13px; }
.pdf-toolbar strong { font-size: 17px; }
.pdf-toolbar span { color: #666; font: 10px ui-monospace, monospace; }
.pdf-body { min-height: 620px; display: grid; grid-template-columns: 245px minmax(0, 1fr); }
.pdf-options { padding: 20px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid #aaa; background: #fff; }
.pdf-options > label:not(.pdf-check) { display: flex; flex-direction: column; gap: 6px; color: #555; font-size: 10px; font-weight: 700; }
.pdf-options select, .pdf-options textarea, .pdf-options input[type="text"], .pdf-options input[type="number"], .pdf-options input[type="file"] { width: 100%; min-height: 39px; padding: 8px 9px; border: 1px solid #bbb; border-radius: 0; background: #fff; font: inherit; color: #111; }
.pdf-options input[type="file"] { min-height: 50px; font-size: 9px; }
.pdf-option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.pdf-option-grid > label { display: flex; flex-direction: column; gap: 5px; color: #555; font-size: 9px; font-weight: 700; }
.pdf-check { display: flex; align-items: flex-start; gap: 8px; font-size: 10px; cursor: pointer; }
.pdf-check input { margin: 1px 0 0; }
.pdf-options .button { width: 100%; margin-top: 3px; }
.pdf-auto-orient { padding-top: 3px; display: flex; flex-direction: column; gap: 7px; }
.pdf-auto-orient .button { min-height: 44px; border: 1px solid var(--pdf-ink); background: #f5f5f2; color: var(--pdf-ink); font-size: 11px; font-weight: 700; }
.pdf-auto-orient small { color: #666; font-size: 8px; line-height: 1.55; }
.pdf-option-note { margin: 0; padding: 11px; border: 1px solid #d3d3d0; background: #f7f7f4; color: #555; font-size: 9px; line-height: 1.65; }
.pdf-form-wrap, .pdf-signature-wrap { display: flex; flex-direction: column; gap: 8px; }
.pdf-form-wrap > strong, .pdf-signature-wrap > strong { color: #555; font-size: 10px; }
.pdf-form-fields { max-height: 300px; padding: 10px; display: flex; flex-direction: column; gap: 11px; border: 1px solid #bbb; overflow: auto; }
.pdf-form-fields > p { margin: 0; color: #666; font-size: 9px; line-height: 1.5; }
.pdf-form-field { display: flex; flex-direction: column; gap: 5px; color: #555; font-size: 9px; font-weight: 700; }
.pdf-form-field input[type="checkbox"] { align-self: flex-start; }
.pdf-signature-pad { width: 100%; height: auto; aspect-ratio: 22 / 7; border: 1px solid #aaa; background: #fff; cursor: crosshair; touch-action: none; }
.pdf-signature-wrap .text-button { align-self: flex-start; }
#pdfStatus { min-height: 32px; margin: 0; color: #26734d; font-size: 10px; line-height: 1.5; }
#pdfStatus.is-error { color: #b52727; }
.pdf-pages-wrap { min-width: 0; padding: 24px; background: var(--pdf-desk); overflow: auto; }
.pdf-empty { color: #666; text-align: center; }
.pdf-pages { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 18px; align-items: start; }
.pdf-page { min-width: 0; padding: 9px; border: 1px solid #bbb; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.07); }
.pdf-page.is-draggable { cursor: grab; }
.pdf-page.is-draggable:active { cursor: grabbing; }
.pdf-page.is-selected { outline: 3px solid var(--pdf-accent); outline-offset: 0; }
.pdf-page-preview { position: relative; min-height: 180px; display: grid; place-items: center; background: #eee; overflow: hidden; }
.pdf-page-preview img { display: block; max-width: 100%; max-height: 220px; object-fit: contain; transform-origin: center; }
.pdf-page-preview span { position: absolute; left: 6px; top: 6px; min-width: 25px; height: 25px; padding: 0 5px; display: grid; place-items: center; background: rgba(20,20,20,.88); color: #fff; font: 10px ui-monospace, monospace; }
.pdf-orientation-badge { position: absolute; right: 6px; top: 6px; padding: 5px 6px; background: #fff; border: 1px solid #aaa; color: #333; font: 7px ui-monospace, monospace; letter-spacing: .04em; }
.pdf-orientation-badge.is-high { border-color: #24734d; color: #17633f; }
.pdf-orientation-badge.is-medium { border-color: #9b6b12; color: #74500e; }
.pdf-orientation-badge.is-low { border-color: #b52727; color: #a02222; }
.pdf-page > strong { display: block; margin-top: 8px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.pdf-page > small { color: #777; font-size: 8px; }
.pdf-page-actions { display: grid; grid-template-columns: repeat(var(--pdf-actions, 1), 1fr); margin-top: 8px; border: 1px solid #ddd; }
.pdf-page-actions button { min-height: 29px; border: 0; border-right: 1px solid #ddd; background: #fff; cursor: pointer; }
.pdf-page-actions button:last-child { border-right: 0; color: #b52727; }
.pdf-page-actions button:hover { background: #f1f1ef; }

.pdf-category { width: min(100%, 1160px); margin: auto; padding: 70px clamp(20px, 4vw, 48px) 100px; }
.pdf-category h1 { margin: 8px 0 18px; font-size: clamp(48px, 7vw, 78px); letter-spacing: -.045em; }
.pdf-category-lead { max-width: 680px; color: #444; line-height: 1.8; }
.pdf-tool-grid { margin-top: 50px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.pdf-tool-card { min-height: 290px; padding: 24px 28px 28px; display: flex; flex-direction: column; border: 1px solid #d7d7d7; background: #fff; text-decoration: none; }
.pdf-tool-card:hover { border-color: #111; background: #f6f6f3; }
.pdf-tool-card span { color: var(--pdf-accent); font: 10px ui-monospace, monospace; letter-spacing: .09em; }
.pdf-tool-card .pdf-tool-illustration { width: 100%; height: 92px; margin: 18px 0 20px; display: grid; place-items: center; border-top: 1px solid #e2e2de; border-bottom: 1px solid #e2e2de; color: var(--pdf-ink); }
.pdf-tool-illustration svg { width: 112px; height: 76px; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: square; stroke-linejoin: miter; }
.pdf-tool-card:hover .pdf-tool-illustration { color: var(--pdf-accent); }
.pdf-tool-card h2 { margin: auto 0 9px; font-size: 26px; }
.pdf-tool-card p { margin: 0; color: #555; font-size: 12px; line-height: 1.65; }

.pdf-support { margin-top: 56px; }
.pdf-support > h2 { max-width: 760px; margin-bottom: 16px; }
.pdf-support-summary { max-width: 780px; margin: 0 0 28px; color: #444; line-height: 1.8; }
.pdf-support-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 0 0 32px; border-top: 1px solid #aaa; border-left: 1px solid #aaa; }
.pdf-support-facts > div { min-width: 0; padding: 20px 22px; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; background: #fff; }
.pdf-support-facts dt { margin-bottom: 8px; color: #666; font: 700 9px/1.2 ui-monospace, monospace; letter-spacing: .09em; text-transform: uppercase; }
.pdf-support-facts dd { margin: 0; font-size: 14px; line-height: 1.65; }
.pdf-support h3 { margin: 0 0 14px; font-size: 18px; }
.pdf-support-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin: 0 0 36px; padding: 0; list-style: none; counter-reset: pdf-step; border-top: 1px solid #aaa; border-left: 1px solid #aaa; }
.pdf-support-steps li { min-height: 96px; padding: 18px 20px; border-right: 1px solid #aaa; border-bottom: 1px solid #aaa; counter-increment: pdf-step; font-size: 13px; line-height: 1.6; }
.pdf-support-steps li::before { content: "0" counter(pdf-step); display: block; margin-bottom: 12px; color: var(--pdf-accent); font: 700 9px/1 ui-monospace, monospace; }
.pdf-related-tools > div { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pdf-related-tools a { min-width: 0; padding: 18px 20px; display: grid; gap: 8px; border: 1px solid #aaa; background: #fff; text-decoration: none; }
.pdf-related-tools a:hover { border-color: var(--pdf-ink); background: #f1f1ed; }
.pdf-related-tools span { color: var(--pdf-accent); font: 700 8px/1 ui-monospace, monospace; letter-spacing: .08em; }
.pdf-related-tools strong { font-size: 14px; overflow-wrap: anywhere; }

.pdf-compare-workspace { margin-top: 42px; border: 2px solid #111; background: #fff; }
.pdf-compare-inputs { display: grid; grid-template-columns: 1fr 1fr; }
.pdf-compare-drop { min-height: 310px; margin: 14px; padding: 28px 16px; }
.pdf-compare-drop:first-child { margin-right: 7px; }
.pdf-compare-drop:last-child { margin-left: 7px; }
.pdf-compare-drop h2 { max-width: 440px; font-size: clamp(19px, 2vw, 24px); }
.pdf-compare-settings { background: #f6f6f3; }
.pdf-compare-settings h2 { margin: 0; }
.pdf-compare-setting-grid { display: grid; grid-template-columns: 1fr 1fr auto; gap: 16px; align-items: end; margin-top: 25px; }
.pdf-compare-setting-grid label { display: flex; flex-direction: column; gap: 6px; color: #555; font-size: 10px; font-weight: 700; }
.pdf-compare-settings select { min-height: 42px; padding: 8px; border: 1px solid #aaa; border-radius: 0; background: #fff; }
.pdf-compare-settings .button { min-height: 42px; }
.pdf-compare-settings > p { min-height: 18px; margin: 16px 0 0; color: #26734d; font-size: 10px; }
.pdf-compare-settings > p.is-error { color: #b52727; }
.pdf-compare-settings > small { display: block; margin-top: 6px; color: #666; font-size: 9px; }
.pdf-compare-results { padding: 28px; border-top: 1px solid #aaa; }
.pdf-compare-results > header { display: flex; justify-content: space-between; gap: 18px; align-items: center; }
.pdf-compare-results > header > div:first-child { display: flex; flex-direction: column; gap: 3px; }
.pdf-compare-results > header span { color: #666; font-size: 10px; }
.pdf-compare-view { display: flex; border: 1px solid #aaa; }
.pdf-compare-view button { min-height: 38px; padding: 7px 12px; border: 0; border-right: 1px solid #aaa; background: #fff; cursor: pointer; font-size: 10px; }
.pdf-compare-view button:last-child { border-right: 0; }
.pdf-compare-view button.is-active { background: var(--pdf-ink); color: #fff; }
#pdfComparePages { margin: 24px 0; display: flex; flex-direction: column; gap: 22px; }
.pdf-compare-page { border: 1px solid #bbb; background: var(--pdf-desk); }
.pdf-compare-page > header { padding: 10px 13px; display: flex; justify-content: space-between; background: #fff; border-bottom: 1px solid #bbb; }
.pdf-compare-page > header span { color: #b52727; font: 10px ui-monospace, monospace; }
.pdf-compare-visual { padding: 14px; display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.pdf-compare-page:not(.is-side) .pdf-compare-visual { grid-template-columns: 1fr; }
.pdf-compare-visual figure { margin: 0; min-width: 0; background: #fff; }
.pdf-compare-visual img { width: 100%; max-height: 720px; display: block; object-fit: contain; }
.pdf-compare-visual figcaption { padding: 7px 10px; border-top: 1px solid #ddd; font-size: 9px; }

.pdf-tray { position: fixed; right: 18px; bottom: 18px; z-index: 50; width: min(390px, calc(100vw - 36px)); }
.pdf-tray-toggle { width: 165px; min-height: 55px; margin-left: auto; padding: 9px 12px; display: flex; align-items: center; justify-content: space-between; border: 1px solid var(--pdf-ink); background: var(--pdf-ink); color: #fff; box-shadow: 5px 5px 0 rgba(0,0,0,.12); cursor: pointer; }
.pdf-tray-toggle > span { display: flex; flex-direction: column; align-items: flex-start; }
.pdf-tray-toggle small { font: 7px ui-monospace, monospace; letter-spacing: .1em; }
.pdf-tray-toggle strong { font-size: 12px; }
.pdf-tray-toggle b { min-width: 25px; height: 25px; display: grid; place-items: center; border: 1px solid #66717a; font: 10px ui-monospace, monospace; }
.pdf-tray-panel { margin-bottom: 9px; border: 1px solid var(--pdf-ink); background: #fff; box-shadow: 7px 7px 0 rgba(0,0,0,.12); }
.pdf-tray-panel[hidden] { display: none; }
.pdf-tray-panel header { padding: 14px 15px; display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid #ddd; }
.pdf-tray-panel header > div { display: flex; align-items: center; gap: 7px; }
.pdf-tray-panel header > div:first-child { min-width: 0; flex-direction: column; align-items: flex-start; gap: 1px; }
.pdf-tray-panel header small { color: #666; font: 7px ui-monospace, monospace; letter-spacing: .1em; }
.pdf-tray-panel header strong { font-size: 14px; }
.pdf-tray-panel button { min-height: 28px; border: 0; background: #fff; cursor: pointer; }
.pdf-tray-panel .pdf-tray-clear { padding: 0 8px; border: 1px solid #ddd; font-size: 9px; }
.pdf-tray-close { width: 28px; font-size: 16px; }
.pdf-tray-files { max-height: 126px; padding: 10px 15px; display: flex; flex-direction: column; overflow: auto; }
.pdf-tray-files span, .pdf-tray-files em { padding: 3px 0; overflow: hidden; color: #666; font-size: 10px; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.pdf-tray-open { display: block; margin: 0 15px; padding: 10px; border: 1px solid var(--pdf-ink); text-align: center; text-decoration: none; font-size: 10px; font-weight: 700; }
.pdf-tray-note { display: block; padding: 10px 15px 14px; color: #666; font-size: 8px; line-height: 1.5; }

@media (max-width: 800px) {
  .pdf-hero h1, .pdf-category h1 { font-size: 30px; line-height: 1.18; letter-spacing: -.025em; }
  .pdf-body { grid-template-columns: 1fr; }
  .pdf-options { border-right: 0; border-bottom: 1px solid #aaa; }
  .pdf-options #pdfExport { position: sticky; z-index: 8; bottom: max(0px, env(safe-area-inset-bottom)); box-shadow: 0 -8px 0 #fff, 0 5px 0 #fff; }
  .pdf-pages { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pdf-tool-grid { grid-template-columns: 1fr 1fr; }
  .pdf-compare-setting-grid { grid-template-columns: 1fr 1fr; }
  .pdf-compare-setting-grid .button { grid-column: 1 / -1; }
}
@media (max-width: 500px) {
  .pdf-toolbar { align-items: flex-start; flex-direction: column; }
  .pdf-pages { grid-template-columns: 1fr; }
  .pdf-tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .pdf-tool-card { min-width: 0; min-height: 250px; padding: 16px 14px; }
  .pdf-tool-card span { font-size: 8px; overflow-wrap: anywhere; }
  .pdf-tool-card .pdf-tool-illustration { height: 68px; margin: 12px 0 15px; }
  .pdf-tool-illustration svg { width: 82px; height: 58px; }
  .pdf-tool-card h2 { margin-bottom: 7px; font-size: clamp(16px, 4.8vw, 20px); overflow-wrap: anywhere; }
  .pdf-tool-card p { font-size: 11px; line-height: 1.55; }
  .pdf-support { margin-top: 40px; }
  .pdf-support-facts, .pdf-support-steps { grid-template-columns: 1fr; }
  .pdf-support-facts > div, .pdf-support-steps li { min-height: 0; padding: 16px; }
  .pdf-related-tools > div { grid-template-columns: 1fr; }
  .pdf-tray { right: 10px; bottom: 10px; width: calc(100vw - 20px); }
  .pdf-compare-inputs, .pdf-compare-setting-grid, .pdf-compare-visual { grid-template-columns: 1fr; }
  .pdf-compare-drop { min-height: 270px; margin: 10px; }
  .pdf-compare-drop:first-child, .pdf-compare-drop:last-child { margin: 10px; }
  .pdf-compare-results > header { align-items: flex-start; flex-direction: column; }
  .pdf-compare-view { width: 100%; }
  .pdf-compare-view button { flex: 1; }
}

.pdf-ocr-workspace { margin-top: 42px; border: 2px solid #111; background: #fff; }
.pdf-ocr-file { display: grid; grid-template-columns: 100px minmax(180px, 1fr) minmax(220px, 1.4fr); align-items: center; min-height: 112px; border-right: 1px solid #111; border-left: 1px solid #111; cursor: pointer; }
.pdf-ocr-file > span, .pdf-ocr-result > span { align-self: stretch; display: flex; align-items: center; justify-content: center; border-right: 1px solid #d7d7d2; font: 700 12px/1 var(--font-mono); letter-spacing: .08em; }
.pdf-ocr-file > strong { padding: 24px 28px; font-size: 22px; }
.pdf-ocr-file > em { overflow: hidden; margin: 18px 24px; padding: 17px 20px; border: 1px dashed #999; background: #f6f6f3; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.pdf-ocr-file input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.pdf-ocr-settings h2 { margin: 0; }
.pdf-ocr-setting-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 25px; }
.pdf-ocr-setting-grid label { display: grid; gap: 8px; font-size: 13px; }
.pdf-ocr-setting-grid select, .pdf-ocr-setting-grid input { width: 100%; min-height: 48px; padding: 0 12px; border: 1px solid #999; border-radius: 0; background: #fff; font: inherit; }
.pdf-ocr-check { display: flex; align-items: center; gap: 10px; margin-top: 18px; font-size: 14px; }
.pdf-ocr-check input { inline-size: 18px; block-size: 18px; accent-color: #111; }
.pdf-ocr-settings > small { display: block; margin-top: 16px; color: #686863; }
.pdf-ocr-actions { display: flex; gap: 10px; padding: 24px 28px; border-top: 1px solid #d7d7d2; }
.pdf-ocr-stop { border-color: #a9201b; color: #a9201b; }
.pdf-ocr-progress { margin: 0 28px 24px; padding: 22px 24px; border: 1px solid #111; }
.pdf-ocr-progress > div { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.pdf-ocr-progress progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 0; background: #e5e5e0; }
.pdf-ocr-progress progress::-webkit-progress-bar { background: #e5e5e0; }
.pdf-ocr-progress progress::-webkit-progress-value { background: #111; }
.pdf-ocr-progress progress::-moz-progress-bar { background: #111; }
.pdf-ocr-result { margin: 0 28px 32px; padding: 28px; border: 1px solid #111; box-shadow: 6px 6px 0 #111; }
.pdf-ocr-result > span { justify-content: flex-start; margin-bottom: 15px; border: 0; color: #64645f; }
.pdf-ocr-result h2 { margin: 0 0 12px; font-size: clamp(24px, 3vw, 38px); }
.pdf-ocr-result p { margin: 0 0 6px; }
.pdf-ocr-result small { display: block; color: #64645f; }
.pdf-ocr-result > div { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (max-width: 900px) { .pdf-ocr-setting-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .pdf-ocr-workspace { margin-top: 28px; }
  .pdf-ocr-file { grid-template-columns: 58px 1fr; min-height: 0; }
  .pdf-ocr-file > span { grid-row: 1 / 3; }
  .pdf-ocr-file > strong { padding: 18px; font-size: 18px; }
  .pdf-ocr-file > em { margin: 0 16px 16px; padding: 14px; }
  .pdf-ocr-setting-grid { grid-template-columns: 1fr; }
  .pdf-ocr-actions { display: grid; }
  .pdf-ocr-actions .button { width: 100%; }
  .pdf-ocr-progress > div { display: grid; gap: 6px; }
  .pdf-ocr-result { padding: 22px 18px; box-shadow: 4px 4px 0 #111; }
  .pdf-ocr-result > div { display: grid; }
  .pdf-ocr-result .button { width: 100%; }
}

.pdf-compressor-workspace { margin-top: 42px; border: 2px solid #111; background: #fff; }
.pdf-compressor-file { display: grid; grid-template-columns: 100px minmax(180px, 1fr) minmax(220px, 1.4fr); align-items: center; min-height: 112px; border: 1px solid #111; border-top: 0; cursor: pointer; }
.pdf-compressor-file > span, .pdf-compressor-result > span { align-self: stretch; display: flex; align-items: center; justify-content: center; border-right: 1px solid #d7d7d2; font: 700 12px/1 var(--font-mono); letter-spacing: .08em; }
.pdf-compressor-file > strong { padding: 24px 28px; font-size: 22px; }
.pdf-compressor-file > em { overflow: hidden; margin: 18px 24px; padding: 17px 20px; border: 1px dashed #999; background: #f6f6f3; font-style: normal; text-overflow: ellipsis; white-space: nowrap; }
.pdf-compressor-file input { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.pdf-compressor-settings { padding: 34px 40px; }
.pdf-compressor-settings h2 { margin: 0; }
.pdf-compressor-presets { display: grid; grid-template-columns: repeat(3, 1fr); margin: 25px 0 0; padding: 0; border: 0; border-top: 1px solid #d7d7d2; border-bottom: 1px solid #d7d7d2; }
.pdf-compressor-presets label { position: relative; min-height: 128px; border-right: 1px solid #aaa; cursor: pointer; }
.pdf-compressor-presets label:last-child { border-right: 0; }
.pdf-compressor-presets input { position: absolute; top: 18px; left: 18px; inline-size: 18px; block-size: 18px; accent-color: #111; }
.pdf-compressor-presets label > span { display: grid; gap: 9px; height: 100%; padding: 48px 20px 20px; }
.pdf-compressor-presets strong { font-size: 19px; }
.pdf-compressor-presets small { color: #656560; line-height: 1.55; }
.pdf-compressor-presets label:has(input:checked) { background: #f1f1ed; box-shadow: inset 0 -5px #111; }
.pdf-compressor-warning { margin: 0; padding: 16px 20px; border: 1px solid #a9201b; border-top: 0; color: #a9201b; }
.pdf-compressor-local { display: block; padding: 18px 28px 0; color: #686863; }
.pdf-compressor-actions { display: flex; gap: 10px; padding: 24px 28px; }
.pdf-compressor-stop { border-color: #a9201b; color: #a9201b; }
.pdf-compressor-progress { margin: 0 28px 24px; padding: 22px 24px; border: 1px solid #111; }
.pdf-compressor-progress > div { display: flex; justify-content: space-between; gap: 20px; margin-bottom: 14px; }
.pdf-compressor-progress progress { display: block; width: 100%; height: 8px; border: 0; border-radius: 0; background: #e5e5e0; }
.pdf-compressor-progress progress::-webkit-progress-bar { background: #e5e5e0; }
.pdf-compressor-progress progress::-webkit-progress-value { background: #111; }
.pdf-compressor-progress progress::-moz-progress-bar { background: #111; }
.pdf-compressor-result { margin: 0 28px 32px; padding: 28px; border: 1px solid #111; box-shadow: 6px 6px 0 #111; }
.pdf-compressor-result > span { justify-content: flex-start; margin-bottom: 14px; border: 0; color: #656560; }
.pdf-compressor-result h2 { margin: 0 0 20px; font-size: clamp(24px, 3vw, 38px); }
.pdf-compressor-metrics { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid #aaa; }
.pdf-compressor-metrics > div { display: grid; gap: 6px; padding: 18px; border-right: 1px solid #aaa; }
.pdf-compressor-metrics > div:last-child { border-right: 0; }
.pdf-compressor-metrics small { color: #666; }
.pdf-compressor-metrics strong { font-size: 24px; }
.pdf-compressor-result > p { margin: 18px 0 0; }
.pdf-compressor-result > div:last-child { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }

@media (max-width: 640px) {
  .pdf-compressor-workspace { margin-top: 28px; }
  .pdf-compressor-file { grid-template-columns: 58px 1fr; min-height: 0; }
  .pdf-compressor-file > span { grid-row: 1 / 3; }
  .pdf-compressor-file > strong { padding: 18px; font-size: 18px; }
  .pdf-compressor-file > em { margin: 0 16px 16px; padding: 14px; }
  .pdf-compressor-presets { grid-template-columns: 1fr; }
  .pdf-compressor-settings { padding: 26px 18px; }
  .pdf-compressor-presets label { min-height: 98px; border-right: 0; border-bottom: 1px solid #aaa; }
  .pdf-compressor-presets label:last-child { border-bottom: 0; }
  .pdf-compressor-presets label > span { padding-top: 42px; }
  .pdf-compressor-actions { display: grid; }
  .pdf-compressor-actions .button { width: 100%; }
  .pdf-compressor-progress > div { display: grid; gap: 6px; }
  .pdf-compressor-result { padding: 22px 18px; box-shadow: 4px 4px 0 #111; }
  .pdf-compressor-metrics { grid-template-columns: 1fr; }
  .pdf-compressor-metrics > div { border-right: 0; border-bottom: 1px solid #aaa; }
  .pdf-compressor-metrics > div:last-child { border-bottom: 0; }
  .pdf-compressor-result > div:last-child { display: grid; }
  .pdf-compressor-result .button { width: 100%; }
}

.scan-pdf-workspace { margin-top: 42px; border: 2px solid #111; background: #fff; }
.scan-pdf-workspace .pdf-drop { min-height: 390px; }
.scan-pdf-main .pdf-toolbar { border-top: 0; }
.scan-pdf-files { display: grid; border-top: 1px solid #aaa; }
.scan-pdf-file { display: grid; grid-template-columns: minmax(0, 1fr) auto 44px; align-items: stretch; min-height: 76px; border-bottom: 1px solid #aaa; }
.scan-pdf-file > div { display: grid; align-content: center; gap: 6px; padding: 16px 24px; overflow: hidden; }
.scan-pdf-file strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-pdf-file small { color: #666; }
.scan-pdf-file > span { min-width: 90px; display: grid; place-items: center; padding: 12px; border-left: 1px solid #d7d7d2; color: #555; font: 700 10px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.scan-pdf-file > span.is-processing { color: #a34700; }
.scan-pdf-file > span.is-done { color: #26734d; }
.scan-pdf-file > span.is-failed { color: #b52727; }
.scan-pdf-file > button { border: 0; border-left: 1px solid #d7d7d2; background: #fff; font-size: 22px; cursor: pointer; }
.scan-pdf-file > button:hover { background: #111; color: #fff; }
.scan-pdf-settings h2, .scan-pdf-results h2 { margin: 0; }
.scan-pdf-setting-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin-top: 25px; }
.scan-pdf-setting-grid label { display: grid; gap: 8px; color: #444; font-size: 11px; font-weight: 700; }
.scan-pdf-setting-grid input, .scan-pdf-setting-grid select { width: 100%; height: 52px; padding: 0 14px; border: 1px solid #aaa; border-radius: 0; background: #fff; color: #111; font: 600 15px/1.2 var(--font-sans); }
.scan-pdf-settings > small { display: block; margin-top: 20px; color: #666; line-height: 1.7; }
.scan-pdf-actions { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 24px 40px; border-top: 1px solid #aaa; }
.scan-pdf-actions > div { flex: 1; display: grid; gap: 10px; }
.scan-pdf-actions progress { width: min(520px, 100%); height: 7px; border: 0; border-radius: 0; background: #e5e5e0; }
.scan-pdf-actions progress::-webkit-progress-bar { background: #e5e5e0; }
.scan-pdf-actions progress::-webkit-progress-value { background: #111; }
.scan-pdf-actions progress::-moz-progress-bar { background: #111; }
.scan-pdf-results { padding: 34px 40px; border-top: 2px solid #111; }
.scan-pdf-results .results-heading { margin-bottom: 22px; }
.scan-pdf-result-list { display: grid; }
.scan-pdf-results #scanPdfResultList { border: 1px solid #aaa; }
.scan-pdf-results #scanPdfResultList article { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 18px 20px; border-bottom: 1px solid #aaa; }
.scan-pdf-results #scanPdfResultList article:last-child { border-bottom: 0; }
.scan-pdf-results #scanPdfResultList article > div { display: grid; gap: 5px; min-width: 0; }
.scan-pdf-results #scanPdfResultList strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.scan-pdf-results #scanPdfResultList small { color: #666; }

@media (max-width: 760px) {
  .scan-pdf-workspace { margin-top: 28px; }
  .scan-pdf-workspace .pdf-drop { min-height: 330px; }
  .scan-pdf-setting-grid { grid-template-columns: 1fr; }
  .scan-pdf-actions { align-items: stretch; padding: 22px 18px; flex-direction: column; }
  .scan-pdf-actions .button { width: 100%; }
  .scan-pdf-results { padding: 26px 18px; }
  .scan-pdf-results .results-heading { align-items: stretch; flex-direction: column; }
  .scan-pdf-results #scanPdfResultList article { align-items: stretch; flex-direction: column; }
  .scan-pdf-results #scanPdfResultList .button { width: 100%; }
}

