/* paperlens — 모바일 우선 반응형 + 다크모드 (PDF 도구 UX, 드롭존 중심) */
:root {
  --bg: #f4f6fb;
  --surface: #ffffff;
  --surface-2: #eef1f8;
  --ink: #14161f;
  --muted: #677080;
  --line: #e5e8f1;
  --brand: #2563eb;
  --brand-2: #3b82f6;
  --brand-soft: #e8efff;
  --ok: #0e9f6e;
  --danger: #d6455c;
  --shadow: 0 1px 2px rgba(20,25,50,.06), 0 8px 24px rgba(20,25,50,.06);
  --radius: 18px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1115; --surface: #171a21; --surface-2: #1f232c; --ink: #e9ebf2;
    --muted: #9aa3b2; --line: #2a2f3a; --brand: #60a5fa; --brand-2: #93c5fd;
    --brand-soft: #1c2740; --ok: #34d399; --danger: #f0788c;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard",
    "Malgun Gothic", "Noto Sans KR", sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }

/* header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.bar {
  max-width: 880px; margin: 0 auto; padding: 12px 16px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.brand { font-size: 1.15rem; font-weight: 800; color: var(--ink); text-decoration: none; letter-spacing: -.02em; }
.brand-mark { margin-right: 2px; }
.privacy-badge {
  font-size: .78rem; font-weight: 700; color: var(--ok);
  background: color-mix(in srgb, var(--ok) 12%, transparent);
  padding: 6px 10px; border-radius: 999px; white-space: nowrap;
}

/* layout */
.container { max-width: 880px; margin: 0 auto; padding: 20px 16px 8px; }
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 22px; margin-bottom: 16px;
}
.hero { text-align: center; padding: 18px 8px 6px; }
.hero h1 { margin: 0 0 6px; font-size: 1.7rem; letter-spacing: -.03em; }
.hero .tagline { margin: 0; color: var(--muted); }
.hero-note { max-width: 560px; margin: 12px auto 0; color: var(--muted); font-size: .92rem; }
.section-title { margin: 0 0 16px; font-size: 1.15rem; }
.section-title small { color: var(--muted); font-weight: 500; font-size: .8rem; margin-left: 4px; }

/* 도구 카드 그리드 (허브) */
.tool-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.tool-card {
  display: flex; flex-direction: column; gap: 4px; padding: 18px 16px;
  border-radius: 14px; background: var(--surface-2); text-decoration: none; color: var(--ink);
  border: 1px solid transparent; transition: all .14s ease;
}
.tool-card:hover { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 30%, transparent);
  transform: translateY(-2px); }
.tool-icon { font-size: 1.7rem; line-height: 1; }
.tool-name { font-size: 1rem; font-weight: 800; letter-spacing: -.01em; }
.tool-desc { font-size: .82rem; color: var(--muted); }
@media (max-width: 720px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 420px) { .tool-grid { grid-template-columns: 1fr; } }

/* 도구 페이지 */
.tool-hero h1 { display: inline-flex; align-items: center; gap: 8px; }

/* 드롭존 */
.dropzone {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; text-align: center; padding: 40px 20px; min-height: 200px;
  border: 2px dashed var(--line); border-radius: 16px; background: var(--surface-2);
  cursor: pointer; transition: all .14s ease;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: var(--brand-soft); outline: none; }
.dropzone.is-dragover { border-color: var(--brand); background: var(--brand-soft);
  box-shadow: 0 0 0 4px var(--brand-soft); transform: scale(1.005); }
.dropzone-icon { font-size: 2.4rem; line-height: 1; }
.dropzone-text { margin: 4px 0 0; font-size: 1.02rem; font-weight: 600; }
.dropzone-hint { margin: 0; color: var(--muted); font-size: .82rem; }

/* 옵션 영역 */
.options { margin-top: 18px; display: flex; flex-direction: column; gap: 14px; }
.options:empty { display: none; }
.field { display: flex; flex-direction: column; gap: 8px; }
.label { font-weight: 700; font-size: .95rem; }
.options input[type="text"], .options input[type="number"], .options input[type="password"],
.options select {
  width: 100%; height: 48px; padding: 0 14px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 12px; background: var(--surface); color: var(--ink);
}
.options input:focus, .options select:focus { outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px var(--brand-soft); }

/* 진행률 */
.progress {
  -webkit-appearance: none; appearance: none; width: 100%; height: 10px; margin-top: 16px;
  border: 0; border-radius: 999px; overflow: hidden; background: var(--surface-2);
}
.progress::-webkit-progress-bar { background: var(--surface-2); border-radius: 999px; }
.progress::-webkit-progress-value { background: linear-gradient(135deg, var(--brand-2), var(--brand)); border-radius: 999px; }
.progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }

/* 결과 / 다운로드 */
.result-area { margin-top: 16px; display: flex; flex-direction: column; gap: 12px; }
.result-area:empty { display: none; }
.result-files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.result-files li { display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: var(--surface-2); border-radius: 12px; padding: 12px 14px; }
.result-files .fname { font-weight: 600; word-break: break-all; }
.result-files .fsize { color: var(--muted); font-size: .82rem; font-variant-numeric: tabular-nums; }

/* 버튼 */
.btn-primary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; min-height: 50px;
  padding: 0 18px; border-radius: 14px; font-size: 1.02rem; font-weight: 800;
  text-decoration: none; cursor: pointer; border: 0; letter-spacing: -.01em;
}
.btn-primary { background: linear-gradient(135deg, var(--brand-2), var(--brand)); color: #fff;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 35%, transparent); }
.btn-primary:active { transform: translateY(1px); }
.btn-ghost { background: var(--surface); color: var(--brand); border: 1px solid var(--line); }
.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.note { margin: 16px 0 0; padding-top: 14px; border-top: 1px dashed var(--line); color: var(--muted); font-size: .86rem; }
.alert { background: color-mix(in srgb, var(--danger) 12%, transparent); color: var(--danger);
  padding: 11px 13px; border-radius: 11px; margin: 14px 0 0; font-weight: 600; }

/* 개인정보 강조 카드 */
.privacy-card { border-color: color-mix(in srgb, var(--ok) 35%, var(--line)); }

/* 안내 목록 */
.insight-list { margin: 0; padding-left: 18px; color: var(--ink); font-size: .92rem; }
.insight-list li { margin: 7px 0; }

/* 가이드 정의 목록 + FAQ */
.guide-defs { margin: 0; display: flex; flex-direction: column; }
.guide-def { padding: 12px 2px; border-bottom: 1px solid var(--line); }
.guide-def dt { font-weight: 800; }
.guide-def dt a { text-decoration: none; }
.guide-def dd { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.qa-q { margin: 16px 0 4px; font-size: 1rem; }
.qa-a { margin: 0; color: var(--ink); font-size: .92rem; }

.howto-steps { margin: 0; padding-left: 1.25rem; color: var(--ink); }
.howto-steps li { margin: 6px 0; font-size: .92rem; }

/* footer */
.site-footer { max-width: 880px; margin: 16px auto 32px; padding: 0 16px;
  color: var(--muted); font-size: .8rem; text-align: center; }
.disclaimer { margin: 0 0 6px; }
.credit { margin: 0; }
.credit a { color: var(--muted); }

/* desktop niceties */
@media (min-width: 760px) {
  .hero h1 { font-size: 2rem; }
}

/* 인쇄 */
@media print {
  .site-header, .site-footer, .no-print { display: none !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 1px solid #ccc; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
