:root {
  color-scheme: light;
  font-family: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  color: #151520;
  background: #f8f9fb;
  font-synthesis: none;
  --border: #dddee5;
  --muted: #606070;
  --brand: #8543ff;
  --brand-ink: #5926b9;
  --brand-soft: #f0e8ff;
  --brand-dark: #0c0c0d;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; font-size: 1rem; }
button, input, select { font: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; }
button:disabled, fieldset:disabled :is(input, select) { cursor: default; opacity: .55; }
small { font-size: .875rem; color: var(--muted); }
.topbar { background: var(--brand-dark); color: #f8f5ff; }
.topbar-inner { max-width: 1480px; min-height: 64px; padding: 0 32px; margin: auto; display: flex; align-items: center; }
.brand { display: inline-flex; gap: 15px; align-items: center; color: inherit; text-decoration: none; font-weight: 700; min-height: 44px; }
.brand img { width: 132px; height: auto; display: block; }
.separator { height: 20px; width: 1px; background: #48414f; }
.portal { max-width: 1480px; margin: auto; display: grid; grid-template-columns: 225px minmax(0, 1fr); min-height: calc(100vh - 64px); }
.sidebar { padding: 28px 17px; border-right: 1px solid var(--border); background: #fff; }
.nav-group { margin-top: 20px; }
.nav-label { display: block; padding: 0 12px 7px; font-size: .875rem; color: var(--muted); }
.nav-link { min-height: 44px; display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: #404050; text-decoration: none; font-size: .95rem; font-weight: 600; }
.nav-link svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-link:hover, .nav-link[aria-current="page"] { background: var(--brand-soft); color: var(--brand-ink); }
.nav-link[aria-current="page"] { font-weight: 750; }
main { min-width: 0; padding: 44px clamp(22px, 3.6vw, 54px) 52px; }
.portal-heading { padding: 20px 0 38px; }
.portal-heading p { color: var(--muted); margin: 10px 0 0; line-height: 1.55; }
.mobile-break { display: none; }
.tool-list h2 { margin: 0 0 13px; }
.tool-card { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) minmax(138px, 32%); align-items: center; max-width: 825px; min-height: 215px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: inherit; text-decoration: none; }
.tool-card:hover { border-color: #b289ff; box-shadow: 0 4px 20px #6330b614; }
.tool-content { padding: 27px 30px; }
.tool-content h3 { font-size: 1.34rem; margin: 0 0 9px; letter-spacing: -.035em; }
.tool-content p { color: var(--muted); margin: 0 0 20px; line-height: 1.55; max-width: 23rem; }
.tool-action { display: inline-flex; padding: 9px 12px; border-radius: 7px; border: 1px solid #e6d8ff; color: var(--brand-ink); background: #f8f4ff; font-weight: 750; font-size: .92rem; }
.tool-card:hover .tool-action { background: var(--brand-soft); }
.tool-art { align-self: stretch; position: relative; display: grid; place-items: center; overflow: hidden; border-radius: 0 15px 15px 0; background: radial-gradient(ellipse at 60% 46%, #eae0ff 0%, #f5efff 67%, #faf7ff 100%); }
.document-icon { width: 74px; height: 92px; display: grid; place-content: end start; padding: 12px; gap: 9px; border-radius: 9px 16px 9px 9px; font-size: .8rem; letter-spacing: .04em; box-shadow: 0 10px 23px #48278122; position: absolute; }
.document-icon i { display: block; width: 34px; height: 13px; border-block: 2px solid currentColor; opacity: .35; }
.document-source { color: #6032a5; background: #fff; border: 1px solid #ddc9fb; transform: translate(-29px, -10px) rotate(-12deg); }
.document-result { color: #fff; background: var(--brand); transform: translate(22px, 10px) rotate(9deg); }
.intro { margin-bottom: 26px; }
main h1:focus { outline: none; }
h1 { font-size: clamp(2rem, 4vw, 3.2rem); letter-spacing: -.058em; margin: 0 0 8px; line-height: 1.16; }
.intro p { color: var(--muted); margin: 0; line-height: 1.55; }
.workspace { display: grid; grid-template-columns: minmax(300px, 365px) minmax(0, 1fr); gap: 20px; align-items: start; }
.controls, .preview { border: 1px solid var(--border); background: #fff; border-radius: 16px; box-shadow: 0 2px 6px #202c4c08; }
.controls { padding: 23px; }
h2 { font-size: 1.06rem; letter-spacing: -.026em; margin: 0; }
.dropzone { text-align: center; padding: 20px 10px 16px; margin: 16px 0 18px; border: 1.5px dashed #c4a9f4; background: #faf7ff; border-radius: 13px; display: grid; justify-items: center; gap: 9px; }
.dropzone strong { font-size: .94rem; }
.dropzone[data-drag="true"] { border-color: var(--brand); background: #f0e8ff; }
.upload-symbol { position: relative; width: 34px; height: 34px; border: 1px solid #e6d8ff; background: #f0e8ff; border-radius: 9px; }
.upload-symbol::before { position: absolute; content: ""; width: 14px; height: 7px; border: solid var(--brand); border-width: 0 2px 2px; border-radius: 0 0 3px 3px; top: 17px; left: 8px; }
.upload-symbol::after { position: absolute; content: "+"; color: var(--brand); font-weight: 700; font-size: 19px; line-height: 1; top: 4px; left: 10px; }
.primary, .secondary { border: 1px solid transparent; border-radius: 9px; font-size: .92rem; font-weight: 700; display: inline-flex; text-decoration: none; align-items: center; justify-content: center; min-height: 39px; padding: 8px 13px; }
.primary { background: var(--brand); color: #fff; }
.primary:hover:not(:disabled) { background: var(--brand-ink); }
.primary:disabled { background: #e5e0ee; color: #60596b; opacity: 1; }
.secondary { background: #fff; color: var(--brand-ink); border-color: #dbd3e6; white-space: nowrap; }
.secondary:hover:not(:disabled) { background: #f7f0ff; }
fieldset { display: grid; gap: 7px; margin: 0; padding: 0; border: 0; min-width: 0; }
label { font-size: .93rem; font-weight: 700; }
input, select { border: 1px solid #d8d6e1; border-radius: 8px; padding: 9px 11px; width: 100%; min-height: 42px; background: #fff; color: inherit; font-size: .94rem; }
#range-help { margin-bottom: 10px; }
#convert { margin-top: 9px; min-height: 44px; }
.notes { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 16px; }
.notes strong { font-size: .92rem; }
.notes p, .status { font-size: .91rem; line-height: 1.55; color: var(--muted); margin: 6px 0 8px; overflow-wrap: anywhere; }
.status { margin: 12px 0; }
.status:empty { display: none; }
.status[data-error="true"] { color: #a2292c; }
#download { width: 100%; }
.file-row { display: grid; align-items: center; gap: 10px; grid-template-columns: auto minmax(0, 1fr) auto; margin: 16px 0 18px; padding: 11px; background: #f8f6fb; border-radius: 11px; }
.file-row strong { display: block; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size: .9rem; }
.file-type { background: #efe4ff; color: var(--brand-ink); font-size: .76rem; font-weight: 800; border-radius: 6px; padding: 9px 5px; }
.progress-row { display: flex; gap: 10px; align-items: center; margin-top: 12px; }
progress { width: 100%; height: 13px; accent-color: var(--brand); }
.preview { overflow: hidden; }
.preview-bar { min-height: 59px; display: flex; justify-content: space-between; align-items: center; padding: 9px 18px; gap: 8px; border-bottom: 1px solid var(--border); }
.pager { align-items: center; display: flex; gap: 9px; }
.pager span { color: var(--muted); font-variant-numeric: tabular-nums; font-size: .88rem; min-width: 56px; text-align: center; }
.pager button { width: 32px; height: 32px; border: 1px solid var(--border); background: #fff; color: var(--brand-ink); border-radius: 8px; padding: 0 0 3px; font-size: 1.4rem; line-height: 1; }
.pager button:hover:not(:disabled) { background: #f4ebff; }
.preview-body { min-height: 442px; height: clamp(442px, 61vh, 820px); overflow: auto; display: grid; justify-items: center; align-content: start; padding: 22px; background: #efeff4; }
.empty { min-height: 390px; display: flex; flex-direction: column; gap: 20px; justify-content: center; align-items: center; text-align: center; color: #606070; }
.empty strong { font-size: .97rem; }
.paper-symbol { position: relative; display: grid; place-items: center; width: 62px; height: 76px; border: 1px solid #d8c6f5; background: #faf7ff; border-radius: 9px; transform: rotate(-7deg); box-shadow: 5px 5px #e6d8ff; }
.paper-symbol i { width: 28px; height: 23px; border: solid #b79adf; border-width: 3px 0; position: relative; }
.paper-symbol i::after { content: ""; position: absolute; width: 22px; left: 0; top: 7px; height: 3px; background: #b79adf; }
.sheet { width: min(100%, 760px); }
.sheet canvas { display: block; width: 100%; height: auto; background: #fff; box-shadow: 0 2px 12px #1c2b4430; }
.sr-only { position: absolute; width: 1px; height: 1px; clip-path: inset(50%); overflow: hidden; white-space: nowrap; }
@media (max-width: 970px) {
  .portal { grid-template-columns: 188px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .workspace { gap: 14px; grid-template-columns: minmax(250px, 320px) minmax(0, 1fr); }
  .controls { padding: 17px; }
}
@media (max-width: 810px) {
  .topbar-inner { padding-inline: 22px; }
  .portal { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .sidebar { display: flex; gap: 8px; padding: 7px 18px; border: 0; border-bottom: 1px solid var(--border); }
  .nav-group { margin-top: 0; }
  .nav-label { display: none; }
  main { padding-top: 28px; }
}
@media (max-width: 610px) {
  .portal-heading { padding: 8px 0 28px; }
  .mobile-break { display: inline; }
  .tool-card { grid-template-columns: minmax(0, 1fr) 110px; }
  .tool-content { padding: 20px 17px; }
  .tool-content h3 { font-size: 1.13rem; }
  .document-icon { width: 55px; height: 73px; padding: 8px; font-size: .65rem; gap: 6px; }
  .document-icon i { width: 25px; height: 9px; }
  .document-source { transform: translate(-16px, -9px) rotate(-12deg); }
  .document-result { transform: translate(15px, 10px) rotate(9deg); }
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .preview-body { min-height: 340px; height: min(70vh, 570px); padding: 12px; }
  .empty { min-height: 300px; }
}
