.pdfi-intro { padding-block: clamp(30px, 4.6vw, 56px) 30px; }
.pdfi-intro h1 { font-size: clamp(2.3rem, 5.6vw, 4.4rem); }
.pdfi-intro p { max-width: 800px; }
.pdfi-workspace { grid-template-columns: minmax(0, 2.12fr) minmax(300px, 1fr); gap: 18px; }
.pdfi-preview-panel { padding: 19px; }
.pdfi-panel-heading { gap: 12px; flex-wrap: wrap; margin-bottom: 17px; }
.pdfi-source-actions { display: flex; align-items: center; gap: 15px; }
.pdfi-source-actions .secondary { min-height: 40px; padding-inline: 13px; font-size: .875rem; }
.pdfi-source-actions .subtle { min-height: 40px; font-size: .875rem; }
.pdfi-document-area { display: grid; grid-template-columns: 128px minmax(0, 1fr); min-height: 492px; border: 1px solid #cdd3df; border-radius: 12px; overflow: hidden; background: #e6e9ef; }
.pdfi-document-area.drag { outline: 3px solid var(--accent); outline-offset: -3px; }
.pdfi-pages { position: relative; display: flex; flex-direction: column; min-width: 0; padding: 15px 10px 10px; background: #f4f5f8; border-right: 1px solid #cfd5df; }
.pdfi-pages-heading { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.pdfi-pages-heading h3 { margin: 0; font-size: .875rem; font-weight: 650; letter-spacing: -.02em; }
.pdfi-page-count { padding: 3px 6px; border: 1px solid #d2d8e3; border-radius: 5px; color: #52617b; background: #fff; font-size: .8125rem; font-weight: 550; }
.pdfi-selection-actions { display: flex; gap: 6px; margin-top: 10px; }
.pdfi-selection-actions button { flex: 1; min-height: 34px; padding: 4px; border: 1px solid #d0d7e3; border-radius: 6px; background: #fff; color: #43536f; font-size: .875rem; }
.pdfi-selection-actions button:hover:not(:disabled) { background: #e9efff; border-color: #acc0ee; }
.pdfi-selection-actions button:disabled { color: #8690a0; }
.pdfi-pages-hint { margin-top: 11px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.pdfi-pages-empty { margin-top: 25px; color: #6d7685; font-size: .875rem; line-height: 1.5; }
.pdfi-pages:has(.pdfi-page-item) .pdfi-pages-empty { display: none; }
.pdfi-page-list { display: grid; align-content: start; gap: 12px; max-height: 434px; margin: 16px -2px 0; padding: 2px; overflow-y: auto; overscroll-behavior: contain; list-style: none; scrollbar-width: thin; }
.pdfi-page-item { min-width: 0; padding: 5px; border: 1px solid transparent; border-radius: 8px; }
.pdfi-page-item:has([aria-current="page"]) { border-color: #acc0ef; background: #e7eeff; }
.pdfi-page-preview { display: flex; flex-direction: column; align-items: center; gap: 8px; width: 100%; min-height: 50px; padding: 5px 4px 7px; border: 0; border-radius: 5px; color: #4e5d77; background: transparent; }
.pdfi-page-preview:hover:not(:disabled) { background: #e4e9f2; }
.pdfi-page-preview[aria-current="page"] { color: #2145b1; }
.pdfi-page-thumb { display: block; max-width: 100%; width: auto; max-height: 112px; height: auto; background: #fff; box-shadow: 0 1px 4px #20242b24; }
.pdfi-page-number { color: inherit; font-size: .875rem; font-weight: 620; line-height: 1.25; }
.pdfi-page-check { display: flex; align-items: center; justify-content: center; gap: 6px; min-height: 36px; color: #52617b; font-size: .875rem; line-height: 1.3; cursor: pointer; }
.pdfi-page-check input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); cursor: pointer; }
.pdfi-preview-content { display: flex; flex-direction: column; min-width: 0; }
.pdfi-preview-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px 12px; min-height: 65px; padding: 11px 16px; border-bottom: 1px solid #d0d6e1; background: #fafbfc; }
.pdfi-preview-toolbar h3 { margin: 0; font-size: .875rem; font-weight: 620; letter-spacing: -.015em; }
.pdfi-page-navigation { display: flex; align-items: center; gap: 5px; }
.pdfi-icon-button { display: grid; place-items: center; width: 34px; height: 38px; padding: 0; border: 1px solid transparent; border-radius: 6px; background: transparent; color: #4c5d7a; }
.pdfi-icon-button svg { stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pdfi-icon-button:hover:not(:disabled) { background: #e9eef9; border-color: #c9d3e5; }
.pdfi-icon-button:disabled { color: #abb3c0; }
.pdfi-page-navigation input { width: 49px; min-height: 36px; padding: 3px 5px; border: 1px solid #b5becd; border-radius: 6px; color: var(--ink); background: #fff; font-size: .875rem; text-align: center; appearance: textfield; }
.pdfi-page-navigation input::-webkit-inner-spin-button, .pdfi-page-navigation input::-webkit-outer-spin-button { appearance: none; margin: 0; }
.pdfi-page-navigation input:disabled { color: #8992a2; border-color: #d2d8e3; background: #f2f4f8; }
.pdfi-preview-stage { position: relative; display: grid; flex: 1; place-items: center; min-height: 406px; min-width: 0; padding: 25px; background: #e6e9ef; overflow: hidden; }
.pdfi-preview-stage:has(.pdfi-preview-empty:not([hidden])) { padding: 0; background: radial-gradient(ellipse at 50% 50%, #354057, #252b36 90%); }
.pdfi-preview-empty { width: 100%; height: 100%; min-height: 406px; }
.pdfi-empty-pick { display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 11px; width: 100%; min-height: 406px; height: 100%; padding: 30px 20px; border: 0; color: #c4cede; background: transparent; text-align: center; }
.pdfi-empty-pick:focus-visible { outline-color: #b4c9ff; outline-offset: -5px; }
.pdfi-empty-pick strong { color: #fff; font-size: clamp(1.1rem, 2vw, 1.45rem); font-weight: 630; letter-spacing: -.025em; }
.pdfi-empty-pick > span:last-child { max-width: 23ch; font-size: .875rem; line-height: 1.5; }
.pdfi-document-icon { position: relative; display: block; width: 48px; height: 62px; margin-bottom: 13px; border: 1.5px solid #b1c2e6; border-radius: 6px; background: #2c3445; }
.pdfi-document-icon::before, .pdfi-document-icon::after, .pdfi-document-icon span { content: ''; position: absolute; left: 10px; right: 10px; height: 1.5px; background: #aebfdf; }
.pdfi-document-icon::before { top: 21px; }
.pdfi-document-icon::after { top: 30px; }
.pdfi-document-icon span { top: 39px; right: 18px; }
.pdfi-preview-stage canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 560px; background: #fff; box-shadow: 0 2px 4px #20242b12, 0 7px 18px #20242b12; }
.pdfi-preview-loading { position: absolute; inset: auto 15px 15px; padding: 9px 13px; border: 1px solid #b8c8e8; border-radius: 7px; color: #2145b1; background: #f1f5fff2; text-align: center; font-size: .875rem; line-height: 1.4; }
.pdfi-preview-caption { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px 12px; min-height: 39px; padding: 10px 14px; border-top: 1px solid #d0d6e1; color: var(--muted); background: #f4f6f9; font-size: .8125rem; line-height: 1.4; }
.pdfi-source-details { display: flex; justify-content: space-between; gap: 10px 20px; margin-top: 13px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.pdfi-source-details #source-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pdfi-source-details #source-pages { flex: none; }
.pdfi-preview-status { margin-top: 12px; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.pdfi-preview-status[data-error="true"] { color: #892918; }
.pdfi-settings-panel { padding: 22px; }
.pdfi-settings-panel > .panel-heading { margin-bottom: 23px; }
.pdfi-local-label { color: var(--muted); font-size: .875rem; }
.pdfi-settings { display: grid; gap: 22px; min-width: 0; margin: 0; padding: 0; border: 0; }
.pdfi-settings:disabled { opacity: .58; }
.pdfi-settings .field label, .pdfi-quality-heading label { font-size: .875rem; font-weight: 620; }
.pdfi-settings .field input, .pdfi-settings .field select { min-height: 44px; font-size: .9375rem; }
.pdfi-settings .field select { padding-right: 36px; appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='m2 2 4 4 4-4' fill='none' stroke='%23596982' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 13px center; }
.pdfi-settings .field-hint { font-size: .875rem; line-height: 1.5; }
.pdfi-settings .unit-field span { font-family: inherit; font-size: .875rem; }
.pdfi-custom-resolution { margin-top: 3px; }
.pdfi-quality-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pdfi-quality-heading output { padding: 4px 7px; border-radius: 5px; color: #2145b1; background: #e7eeff; font-size: .875rem; font-weight: 600; }
.pdfi-quality-field > input { width: 100%; margin: 14px 0 6px; accent-color: var(--accent); }
.pdfi-quality-labels { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .875rem; line-height: 1.4; }
.pdfi-export-actions { margin-top: 22px; padding-top: 17px; border-top: 1px solid var(--line); }
.pdfi-export-summary { margin-bottom: 13px; color: #485872; font-size: .875rem; line-height: 1.5; overflow-wrap: anywhere; }
.pdfi-export-actions .primary { min-height: 48px; justify-content: center; font-size: .9375rem; }
.pdfi-export-actions .primary .action-label { font-size: inherit; line-height: 1.3; }
.pdfi-export-actions .cancel { min-height: 43px; font-size: .875rem; }
.pdfi-export-note { margin-top: 17px; color: var(--muted); font-size: .875rem; line-height: 1.55; }
.pdf-image-page .warning, .pdf-image-page .status { font-size: .875rem; }
@media (max-width: 1000px) {
  .pdfi-workspace { grid-template-columns: minmax(0, 1.9fr) minmax(280px, 1fr); gap: 14px; }
  .pdfi-preview-panel, .pdfi-settings-panel { padding: 16px; }
  .pdfi-document-area { grid-template-columns: 111px minmax(0, 1fr); }
  .pdfi-preview-toolbar { padding: 10px; }
  .pdfi-preview-stage { padding: 18px; }
}
@media (max-width: 800px) {
  .pdfi-workspace { grid-template-columns: minmax(0, 1fr); }
  .pdfi-document-area { grid-template-columns: 128px minmax(0, 1fr); }
  .pdfi-preview-toolbar { flex-wrap: nowrap; }
  .pdfi-settings-panel { padding: 21px; }
  .pdfi-settings { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 23px; }
  .pdfi-export-actions, .pdfi-export-note { max-width: 620px; }
}
@media (max-width: 560px) {
  .pdfi-intro { padding-block: 30px 24px; }
  .pdfi-intro h1 span { white-space: normal; }
  .pdfi-preview-panel { padding: 14px; }
  .pdfi-source-actions { gap: 13px; }
  .pdfi-document-area { display: flex; flex-direction: column-reverse; min-height: 0; }
  .pdfi-preview-toolbar { min-height: 61px; padding-inline: 12px; gap: 6px; }
  .pdfi-preview-toolbar h3 { font-size: .875rem; }
  .pdfi-icon-button { width: 31px; height: 40px; }
  .pdfi-page-navigation { gap: 3px; }
  .pdfi-page-navigation input { width: 44px; }
  .pdfi-preview-stage { min-height: 330px; padding: 20px; }
  .pdfi-preview-stage canvas { max-height: 410px; }
  .pdfi-preview-empty, .pdfi-empty-pick { min-height: 330px; }
  .pdfi-pages { padding: 12px; border: 0; border-top: 1px solid #ccd4e1; }
  .pdfi-pages-heading { justify-content: start; gap: 9px; }
  .pdfi-selection-actions { position: absolute; top: 10px; right: 12px; width: 105px; margin-top: 0; }
  .pdfi-pages-hint { margin-top: 10px; }
  .pdfi-pages-hint br { display: none; }
  .pdfi-pages-hint br::after { content: ' '; }
  .pdfi-page-list { display: flex; gap: 10px; margin-top: 12px; overflow-x: auto; overflow-y: hidden; max-height: none; padding-bottom: 4px; }
  .pdfi-page-item { width: 94px; flex: 0 0 94px; }
  .pdfi-page-check { min-height: 44px; }
  .pdfi-page-thumb { max-height: 88px; }
  .pdfi-pages-empty { margin-top: 16px; margin-bottom: 8px; }
  .pdfi-preview-caption { font-size: .8125rem; padding-inline: 12px; }
  .pdfi-source-details { flex-wrap: wrap; gap: 3px 12px; }
  .pdfi-settings-panel { padding: 20px; }
  .pdfi-settings { grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { .pdfi-page-list { scroll-behavior: auto; } }
