/* PDF 압축 - 누끼 따기와 같은 단순하고 깔끔한 디자인
   색은 흑백 위주, 강조색 하나(파랑)만 씁니다. 값은 share/design-prompt.md와 같아요. */

:root {
  --ink: #111;
  --ink-2: #555;
  --ink-3: #8a8a8a;
  --line: #e4e4e4;
  --bg: #fafafa;
  --card: #fff;
  --accent: #1f6feb;
  --good: #1a7f37;
  --font: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  word-break: keep-all;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }

/* ---------- 머리글 ---------- */
.site-header {
  display: flex; align-items: center; justify-content: space-between;
  max-width: 1200px; margin: 0 auto; padding: 16px 20px;
}
.logo { font-weight: 800; font-size: 22px; text-decoration: none; letter-spacing: -0.5px; }
.logo span { color: var(--accent); }
.site-header nav { display: flex; gap: 18px; font-size: 14px; align-items: center; }
.site-header nav a { text-decoration: none; color: var(--ink-2); }
.site-header nav a:hover { color: var(--ink); }

main { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* ---------- 첫 화면 ---------- */
.hero { padding: 40px 0 24px; text-align: center; }
.hero h1 { font-size: clamp(28px, 5vw, 44px); line-height: 1.25; letter-spacing: -1px; margin: 0 0 16px; font-weight: 800; }
.points {
  list-style: none; padding: 0; margin: 0 0 28px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px;
  color: var(--ink-2); font-size: 15px;
}
.points li::before { content: "✓ "; color: var(--accent); font-weight: 700; }

.drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  max-width: 640px; margin: 0 auto; min-height: 180px; padding: 24px;
  background: var(--card); border: 1.5px dashed #c8c8c8; border-radius: 14px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over { border-color: var(--ink); background: #f4f4f4; }
.drop-title {
  display: inline-block; background: var(--ink); color: #fff;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 16px;
}
.drop-sub { color: var(--ink-3); font-size: 13px; }

/* ---------- 광고 자리 (승인 전에는 보이지 않음) ---------- */
.ad-slot { margin: 24px auto; max-width: 970px; }
.ad-slot:empty { margin: 0; }
body.show-ad-slots .ad-slot:empty {
  min-height: 90px; margin: 24px auto; border: 1px dashed #c8c8c8; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
}
body.show-ad-slots .ad-slot:empty::after { content: "광고 자리 (" attr(data-ad) ")"; color: var(--ink-3); font-size: 13px; }

/* ---------- 작업 공간 ---------- */
.workspace { max-width: 820px; margin: 8px auto 24px; display: flex; flex-direction: column; gap: 12px; }
.group { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.group h2 { font-size: 15px; margin: 0 0 12px; }

.seg { display: flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg-btn { flex: 1; border: 0; background: #fff; padding: 9px 14px; cursor: pointer; font-size: 14px; }
.seg-btn + .seg-btn { border-left: 1px solid var(--line); }
.seg-btn.active { background: var(--ink); color: #fff; }
.seg-btn small { display: block; font-size: 11.5px; opacity: .75; }

.hint { font-size: 12.5px; color: var(--ink-3); margin: 10px 0 0; }

/* 파일 목록 */
.files { list-style: none; padding: 0; margin: 0; }
.file {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center;
  padding: 12px 0; border-top: 1px solid var(--line);
}
.file:first-child { border-top: 0; padding-top: 0; }
.file-name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-info { grid-column: 1; font-size: 13px; color: var(--ink-2); }
.file-info b { color: var(--good); }
.file-info.error { color: #c0392b; }
.file-actions { grid-row: 1 / span 2; grid-column: 2; display: flex; gap: 6px; align-items: center; }
.bar { grid-column: 1; height: 4px; background: #ececec; border-radius: 2px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: var(--ink); transition: width .2s; }
.x {
  width: 28px; height: 28px; border: 0; border-radius: 50%; background: transparent; color: var(--ink-3);
  cursor: pointer; font-size: 16px; line-height: 28px; padding: 0;
}
.x:hover { background: #f1f1f1; color: var(--ink); }

.summary { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; }
.summary p { margin: 0; font-size: 14px; color: var(--ink-2); }
.summary p b { color: var(--ink); }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

/* 버튼 */
.btn-primary, .btn-line {
  border-radius: 8px; padding: 9px 14px; cursor: pointer; font-weight: 600; font-size: 14px;
}
.btn-primary { background: var(--ink); color: #fff; border: 1px solid var(--ink); }
.btn-primary:hover { background: #333; }
.btn-line { background: #fff; border: 1px solid #cfcfcf; }
.btn-line:hover { border-color: var(--ink); }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-text {
  border: 0; background: none; padding: 6px 0; cursor: pointer;
  color: var(--accent); font-size: 13px; text-decoration: underline; text-underline-offset: 3px;
}
button:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 설명 글 ---------- */
.content { max-width: 820px; margin: 24px auto 40px; }
.content section { padding: 28px 0; border-top: 1px solid var(--line); }
.content h1 { font-size: 28px; letter-spacing: -0.6px; margin: 8px 0 4px; }
.content h2 { font-size: 22px; margin: 0 0 12px; letter-spacing: -0.4px; }
.content p, .content li { color: #333; font-size: 15.5px; }
.content ol, .content ul { padding-left: 20px; }
.content li { margin-bottom: 8px; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { color: var(--ink-2); font-weight: 600; background: #f4f4f4; white-space: nowrap; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq summary { cursor: pointer; font-weight: 600; font-size: 16px; }
.faq details p { margin: 8px 0 0; }

.site-footer { border-top: 1px solid var(--line); padding: 28px 20px 40px; text-align: center; font-size: 13px; color: var(--ink-3); }
.site-footer nav { display: flex; gap: 18px; justify-content: center; flex-wrap: wrap; margin-bottom: 8px; }
.site-footer a { text-decoration: none; color: var(--ink-2); }

#toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px);
  max-width: calc(100% - 32px); background: var(--ink); color: #fff; font-size: 14px;
  padding: 10px 16px; border-radius: 10px; opacity: 0; pointer-events: none;
  transition: opacity .2s, transform .2s; z-index: 10;
}
#toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- 휴대폰 ---------- */
@media (max-width: 720px) {
  main { padding: 0 14px; }
  .site-header { padding: 12px 14px; }
  .site-header nav { gap: 12px; font-size: 13px; }
  .site-header nav a[href="faq.html"] { display: none; }
  .hero { padding: 24px 0 16px; }
  .points { font-size: 13px; gap: 4px 12px; margin-bottom: 18px; }
  .drop { min-height: 150px; }
  .seg-btn { padding: 8px 6px; font-size: 13px; }
  .file-info { grid-row: 2; }
  .file-actions { grid-row: 3; grid-column: 1 / -1; }
  .bar { grid-row: 4; }
  .content h2 { font-size: 19px; }
}
