.tn-pdfs-tool {
  --pdfs-paper: #faf6ee; --pdfs-wash: #f5efdf; --pdfs-ink: #1a1208; --pdfs-muted: #5a4a30;
  --pdfs-line: #b8a888; --pdfs-soft: #ddd4be; --pdfs-button: #ede6d4; --pdfs-hover: #dfd4bb;
  --pdfs-primary: #1a1208; --pdfs-primary-hover: #5a3018; --pdfs-primary-text: #faf6ee; --pdfs-accent: #a83d00;
  min-width: 0; border: 1px solid var(--pdfs-line); background: var(--pdfs-paper); color: var(--pdfs-ink);
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; font-size: 14px; line-height: 1.5;
}
body:is([data-scheme="dark"], [data-scheme="inverse"], [data-scheme="auto"][data-d="dark"], [data-scheme="auto"][data-l="dark"]) .tn-pdfs-tool,
html[data-scheme="dark"] body:not([data-scheme="light"]) .tn-pdfs-tool {
  --pdfs-paper: #241d12; --pdfs-wash: #322a1a; --pdfs-ink: #f7ead1; --pdfs-muted: #c3b492;
  --pdfs-line: #826744; --pdfs-soft: #574a37; --pdfs-button: #2f2115; --pdfs-hover: #3a2a1b;
  --pdfs-primary: #6a3b1f; --pdfs-primary-hover: #824826; --pdfs-primary-text: #f7ead1; --pdfs-accent: #e8823f;
}
@media (prefers-color-scheme: dark) {
  body[data-scheme="auto"] .tn-pdfs-tool {
    --pdfs-paper: #241d12; --pdfs-wash: #322a1a; --pdfs-ink: #f7ead1; --pdfs-muted: #c3b492;
    --pdfs-line: #826744; --pdfs-soft: #574a37; --pdfs-button: #2f2115; --pdfs-hover: #3a2a1b;
    --pdfs-primary: #6a3b1f; --pdfs-primary-hover: #824826; --pdfs-primary-text: #f7ead1; --pdfs-accent: #e8823f;
  }
}
.tn-pdfs-tool *, .tn-pdfs-tool *::before, .tn-pdfs-tool *::after { box-sizing: border-box; }
.tn-pdfs-tool [hidden] { display: none !important; }
.tn-pdfs-tool :is(p, figure, dl, dt, dd, fieldset, legend, ul, ol, li) { margin: 0; padding: 0; }
.tn-pdfs-tool :is(fieldset, legend) { min-width: 0; border: 0; }
.tn-pdfs-tool :is(code, pre, kbd, samp) { padding: 0; border: 0; border-radius: 0; background: transparent; color: inherit; -webkit-text-fill-color: inherit; }
.tn-pdfs-tool .tn-pdfs-drop { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: 170px; padding: 24px 20px; border-bottom: 1px solid var(--pdfs-line); background: var(--pdfs-wash); }
.tn-pdfs-tool .tn-pdfs-drop > div { min-width: 0; }
.tn-pdfs-tool .tn-pdfs-drop-title { margin-bottom: 10px; font-size: 23px; font-weight: 800; line-height: 1.4; color: var(--pdfs-ink); overflow-wrap: anywhere; }
.tn-pdfs-tool .tn-pdfs-drop p + p { color: var(--pdfs-muted); }
.tn-pdfs-tool #pdfsLimit { margin-top: 8px; }
.tn-pdfs-tool .tn-pdfs-dragging { outline: 2px dashed var(--pdfs-accent); outline-offset: -6px; }
.tn-pdfs-tool .tn-pdfs-picker { display: grid; flex: 0 1 300px; gap: 8px; width: 100%; max-width: 340px; }
.tn-pdfs-tool .tn-pdfs-picker label { display: block; margin: 0; font-size: 13px; font-weight: 700; }
.tn-pdfs-tool #pdfsFile { display: block; width: 100%; max-width: 100%; min-width: 0; min-height: 38px; margin: 0; padding: 0; border: 0; border-radius: 0; background: transparent; color: var(--pdfs-ink); -webkit-text-fill-color: var(--pdfs-ink); font-family: inherit; font-size: 12px; line-height: 38px; box-shadow: none; }
.tn-pdfs-tool .tn-pdfs-btn,
.tn-pdfs-tool #pdfsFile::file-selector-button {
  display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto;
  height: 38px; min-height: 38px; margin: 0; padding: 0 12px; border: 1px solid var(--pdfs-line); border-radius: 0;
  background: var(--pdfs-button); color: var(--pdfs-ink); -webkit-text-fill-color: var(--pdfs-ink);
  font-family: "Courier New", monospace; font-size: 13px; font-weight: 900; line-height: 1; letter-spacing: 0; text-transform: none;
  text-align: center; text-decoration: none; white-space: nowrap; box-shadow: none; cursor: pointer; outline: none;
}
.tn-pdfs-tool #pdfsFile::file-selector-button { margin-right: 8px; background: var(--pdfs-primary); color: var(--pdfs-primary-text); -webkit-text-fill-color: var(--pdfs-primary-text); }
.tn-pdfs-tool .tn-pdfs-btn--primary { background: var(--pdfs-primary); color: var(--pdfs-primary-text); -webkit-text-fill-color: var(--pdfs-primary-text); }
.tn-pdfs-tool .tn-pdfs-btn:hover:not(:disabled) { background: var(--pdfs-hover); }
.tn-pdfs-tool .tn-pdfs-btn--primary:hover:not(:disabled), .tn-pdfs-tool #pdfsFile:hover::file-selector-button { background: var(--pdfs-primary-hover); }
.tn-pdfs-tool :is(button, input, textarea, a):focus-visible { outline: 2px solid var(--pdfs-accent); outline-offset: 2px; }
.tn-pdfs-tool :is(button, input, textarea):disabled { opacity: .5; cursor: not-allowed; }
.tn-pdfs-tool .tn-pdfs-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
.tn-pdfs-tool .tn-pdfs-file-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--pdfs-line); }
.tn-pdfs-tool .tn-pdfs-file-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; flex: 1; gap: 12px 20px; min-width: 0; }
.tn-pdfs-tool .tn-pdfs-file-meta > div { min-width: 0; }
.tn-pdfs-tool .tn-pdfs-file-meta dt { margin-bottom: 3px; font-size: 12px; font-weight: 600; color: var(--pdfs-muted); }
.tn-pdfs-tool #pdfsName { overflow-wrap: anywhere; font-weight: 700; }
.tn-pdfs-tool :is(.tn-pdfs-notice, .tn-pdfs-errors) { padding: 12px 18px; border-bottom: 1px solid var(--pdfs-line); border-left: 3px solid var(--pdfs-accent); background: var(--pdfs-wash); color: var(--pdfs-ink); overflow-wrap: anywhere; }
.tn-pdfs-tool .tn-pdfs-errors:empty { display: none; }
.tn-pdfs-tool .tn-pdfs-modes { display: flex; flex-wrap: wrap; gap: 8px 18px; padding: 10px 18px 14px; border-bottom: 1px solid var(--pdfs-line); }
.tn-pdfs-tool .tn-pdfs-modes legend { padding: 12px 0 0; font-size: 12px; font-weight: 700; color: var(--pdfs-muted); }
.tn-pdfs-tool .tn-pdfs-modes label { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: 0; font-size: 14px; font-weight: 700; cursor: pointer; }
.tn-pdfs-tool input:is([type="checkbox"], [type="radio"]) { display: inline-block; flex: 0 0 18px; width: 18px; height: 18px; min-width: 18px; margin: 0; padding: 0; appearance: auto; accent-color: var(--pdfs-accent); box-shadow: none; }
.tn-pdfs-tool input[type="checkbox"] { border-radius: 0; }
.tn-pdfs-tool .tn-pdfs-settings { padding: 14px 18px; border-bottom: 1px solid var(--pdfs-line); }
.tn-pdfs-tool .tn-pdfs-setting { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px 14px; align-items: center; }
.tn-pdfs-tool .tn-pdfs-setting > label { margin: 0; font-size: 13px; font-weight: 700; }
.tn-pdfs-tool .tn-pdfs-setting > :is(p, .tn-pdfs-check) { grid-column: 2; }
.tn-pdfs-tool .tn-pdfs-setting .tn-pdfs-check { display: flex; align-items: center; gap: 8px; min-height: 38px; font-weight: 600; cursor: pointer; }
.tn-pdfs-tool .tn-pdfs-setting :is(input[type="text"], textarea) {
  display: block; width: 100%; min-width: 0; min-height: 38px; margin: 0; padding: 8px 10px; border: 1px solid var(--pdfs-line); border-radius: 0;
  background: var(--pdfs-paper); color: var(--pdfs-ink); -webkit-text-fill-color: var(--pdfs-ink); box-shadow: none; outline: none;
  font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; font-size: 14px; font-weight: 600; line-height: 1.5; font-variant-numeric: lining-nums tabular-nums; letter-spacing: normal;
}
.tn-pdfs-tool .tn-pdfs-setting input[type="text"] { height: 38px; }
.tn-pdfs-tool .tn-pdfs-setting textarea { resize: vertical; max-height: 320px; }
.tn-pdfs-tool .tn-pdfs-setting :is(input, textarea)::placeholder { color: var(--pdfs-ink); -webkit-text-fill-color: var(--pdfs-ink); font-weight: 400; opacity: .35; }
.tn-pdfs-tool .tn-pdfs-setting :is(input, textarea):focus-visible { outline: 2px solid var(--pdfs-accent); outline-offset: 2px; }
.tn-pdfs-tool #pdfsChunk { max-width: 150px; }
.tn-pdfs-tool .tn-pdfs-caption { font-size: 12px; line-height: 1.6; color: var(--pdfs-muted); overflow-wrap: anywhere; }
.tn-pdfs-tool .tn-pdfs-plan { padding: 14px 18px; border-bottom: 1px solid var(--pdfs-line); background: var(--pdfs-wash); }
.tn-pdfs-tool #pdfsPlan { max-height: 240px; overflow-y: auto; list-style: none; margin-top: 8px; }
.tn-pdfs-tool #pdfsPlan:empty { display: none; }
.tn-pdfs-tool #pdfsPlan li { display: flex; justify-content: space-between; gap: 8px 18px; padding: 7px 0; border-top: 1px solid var(--pdfs-soft); font-size: 12px; }
.tn-pdfs-tool #pdfsPlan li span { min-width: 0; overflow-wrap: anywhere; }
.tn-pdfs-tool #pdfsPlan li .tn-pdfs-number { flex: 0 1 55%; text-align: right; }
.tn-pdfs-tool .tn-pdfs-preview-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px 0; }
.tn-pdfs-tool .tn-pdfs-empty { display: flex; align-items: center; justify-content: center; gap: 20px; min-height: 230px; padding: 24px 18px; color: var(--pdfs-muted); }
.tn-pdfs-tool .tn-pdfs-empty-sheet { display: flex; align-items: center; justify-content: center; flex: 0 0 100px; height: 140px; border: 1px solid var(--pdfs-line); background: var(--pdfs-wash); font-size: 18px; font-weight: 800; }
.tn-pdfs-tool .tn-pdfs-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); align-items: start; gap: 12px; padding: 16px 18px; }
.tn-pdfs-tool .tn-pdfs-grid:empty { display: none; }
.tn-pdfs-tool .tn-pdfs-page-card { min-width: 0; margin: 0; padding: 9px; border: 1px solid var(--pdfs-line); background: var(--pdfs-paper); }
.tn-pdfs-tool .tn-pdfs-page-card[data-selected="true"] { border-color: var(--pdfs-accent); }
.tn-pdfs-tool .tn-pdfs-page-label { display: flex; align-items: center; gap: 8px; min-height: 38px; margin: -3px 0 5px; cursor: pointer; }
.tn-pdfs-tool .tn-pdfs-preview { display: flex; align-items: center; justify-content: center; width: 100%; height: 225px; padding: 6px; overflow: hidden; border: 1px solid var(--pdfs-soft); background: var(--pdfs-wash); color: var(--pdfs-muted); text-align: center; font-size: 12px; }
.tn-pdfs-tool .tn-pdfs-preview canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; border: 0; border-radius: 0; background: #fff; }
.tn-pdfs-tool .tn-pdfs-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; padding: 0 12px 16px; }
.tn-pdfs-tool #pdfsView { font-size: 12px; }
.tn-pdfs-tool .tn-pdfs-save-row { display: flex; align-items: center; justify-content: space-between; gap: 14px 20px; padding: 16px 18px; border-top: 3px double var(--pdfs-line); background: var(--pdfs-wash); }
.tn-pdfs-tool #pdfsStatus { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tn-pdfs-tool .tn-pdfs-outputs { list-style: none; }
.tn-pdfs-tool .tn-pdfs-outputs:empty { display: none; }
.tn-pdfs-tool .tn-pdfs-outputs li { display: flex; align-items: center; justify-content: space-between; gap: 12px 20px; padding: 12px 18px; border-top: 1px solid var(--pdfs-soft); }
.tn-pdfs-tool .tn-pdfs-outputs li > span { min-width: 0; overflow-wrap: anywhere; font-weight: 800; }
.tn-pdfs-tool .tn-pdfs-final-note { padding: 12px 18px 16px; border-top: 1px solid var(--pdfs-line); }
.tn-pdfs-tool .tn-pdfs-noscript { padding: 16px 18px; border-top: 1px solid var(--pdfs-line); }
.tn-pdfs-tool .tn-pdfs-number { font-family: -apple-system, BlinkMacSystemFont, "Pretendard", "Segoe UI", system-ui, sans-serif; font-weight: 800; font-variant-numeric: lining-nums tabular-nums; letter-spacing: normal; }
.tn-pdfs-page .tn-pdfs-responsive-ad { width: 100%; max-width: 900px; min-height: 90px; height: auto !important; max-height: none !important; margin: 24px auto; background: transparent; border: 0; overflow: visible; }
.tn-pdfs-page .tn-pdfs-responsive-ad--top { margin-top: 54px; }
@media (max-width: 1000px) {
  .tn-pdfs-tool .tn-pdfs-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .tn-pdfs-tool .tn-pdfs-save-row { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .tn-pdfs-tool .tn-pdfs-drop { flex-direction: column; align-items: flex-start; gap: 18px; }
  .tn-pdfs-tool .tn-pdfs-picker { flex-basis: auto; }
  .tn-pdfs-tool .tn-pdfs-file-row { flex-direction: column; align-items: flex-start; gap: 12px; }
  .tn-pdfs-tool .tn-pdfs-file-meta { width: 100%; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-pdfs-tool .tn-pdfs-filename { grid-column: 1 / -1; }
  .tn-pdfs-tool .tn-pdfs-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tn-pdfs-tool .tn-pdfs-save-row { flex-direction: column; align-items: flex-start; }
  .tn-pdfs-tool .tn-pdfs-setting { grid-template-columns: minmax(0, 1fr); }
  .tn-pdfs-tool .tn-pdfs-setting > :is(p, .tn-pdfs-check) { grid-column: 1; }
}
@media (max-width: 600px) {
  .tn-pdfs-tool .tn-pdfs-drop { padding: 20px 12px; }
  .tn-pdfs-tool .tn-pdfs-drop-title { font-size: 21px; }
  .tn-pdfs-tool :is(.tn-pdfs-file-row, .tn-pdfs-modes, .tn-pdfs-settings, .tn-pdfs-plan, .tn-pdfs-preview-bar, .tn-pdfs-save-row, .tn-pdfs-final-note, .tn-pdfs-notice, .tn-pdfs-errors) { padding-left: 10px; padding-right: 10px; }
  .tn-pdfs-tool .tn-pdfs-grid { gap: 8px; padding: 12px 8px 16px; }
  .tn-pdfs-tool .tn-pdfs-page-card { padding: 7px; }
  .tn-pdfs-tool .tn-pdfs-preview { height: 170px; padding: 4px; }
  .tn-pdfs-tool #pdfsPlan li { flex-direction: column; gap: 3px; }
  .tn-pdfs-tool #pdfsPlan li .tn-pdfs-number { text-align: left; }
  .tn-pdfs-tool .tn-pdfs-empty { gap: 14px; min-height: 210px; padding: 20px 10px; }
  .tn-pdfs-tool .tn-pdfs-empty-sheet { flex-basis: 70px; height: 104px; }
  .tn-pdfs-tool .tn-pdfs-outputs li { flex-direction: column; align-items: flex-start; padding: 12px 10px; }
  .tn-pdfs-page .tn-pdfs-responsive-ad--top { margin-top: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .tn-pdfs-tool * { scroll-behavior: auto; transition: none; }
}
