/* 시트클리너 — 라이트 B2B UI */
:root {
  --ink: #101828;
  --ink-2: #344054;
  --muted: #667085;
  --line: #e4e7ec;
  --line-2: #eef1f6;
  --bg: #f7f8fb;
  --card: #ffffff;
  --brand: #1d3fd6;
  --brand-dark: #152fb0;
  --brand-soft: #eef1ff;
  --ok: #067647;
  --mark: #fff6d6;
  --mark-line: #f5c518;
  --radius: 16px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 8px 24px rgba(16, 24, 40, .06);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .04), 0 16px 40px rgba(16, 24, 40, .08);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "맑은 고딕", "Noto Sans KR", "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 { margin: 0; line-height: 1.25; letter-spacing: -0.02em; }
p { margin: 0; }
a { color: var(--brand); }

.wrap { width: min(1080px, 100% - 40px); margin-inline: auto; }
.pc-only { display: inline; }

/* ── 헤더 ── */
.site-head {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: var(--brand); color: #fff; font-size: 17px;
}
.brand-text { display: flex; flex-direction: column; font-weight: 800; font-size: 17px; line-height: 1.1; }
.brand-text small { font-weight: 500; font-size: 11px; color: var(--muted); letter-spacing: 0; margin-top: 3px; }
.site-nav { display: flex; align-items: center; gap: 22px; font-size: 14px; font-weight: 600; }
.site-nav a { color: var(--ink-2); text-decoration: none; }
.site-nav a:hover { color: var(--brand); }
.nav-cta {
  padding: 8px 14px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand) !important;
}

/* ── 히어로 ── */
.hero { padding: 56px 0 26px; text-align: center; }
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600; color: var(--ink-2);
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: #12b76a; }
.hero h1 { margin: 18px 0 14px; font-size: clamp(30px, 5.4vw, 46px); font-weight: 800; }
.hero h1 .accent { color: var(--brand); }
.lead { font-size: clamp(15px, 2.2vw, 17px); color: var(--muted); }

/* ── 툴 패널 ── */
.panel {
  background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; box-shadow: var(--shadow-lg);
  padding: 22px;
}
.panel > * + * { margin-top: 20px; }

/* 업로드 */
.dropzone {
  border: 2px dashed #cfd6e4; border-radius: var(--radius);
  background: #fbfcfe; padding: 34px 20px;
  text-align: center; transition: border-color .15s, background .15s, transform .15s;
  cursor: pointer; outline: none;
}
.dropzone:hover, .dropzone:focus-visible { border-color: var(--brand); background: #f7f9ff; }
.dropzone.is-drag { border-color: var(--brand); background: var(--brand-soft); transform: scale(.998); }
.dz-icon { color: var(--brand); margin-bottom: 6px; }
.dz-title { font-size: 17px; font-weight: 700; }
.dz-sub { margin-top: 6px; font-size: 13.5px; color: var(--muted); }
.dropzone .btn { margin-top: 16px; }
.dz-sample { margin-top: 14px; font-size: 13px; color: var(--muted); }
.dropzone.is-loading { opacity: .6; pointer-events: none; }
.dropzone.has-file {
  display: flex; align-items: center; justify-content: center; flex-wrap: wrap;
  gap: 10px 14px; padding: 12px 16px; border-style: solid; border-color: var(--line); background: #fff;
}
.dropzone.has-file .dz-icon,
.dropzone.has-file .dz-sub,
.dropzone.has-file .dz-sample { display: none; }
.dropzone.has-file .dz-title { font-size: 13.5px; font-weight: 600; color: var(--muted); margin: 0; }
.dropzone.has-file .btn { margin-top: 0; padding: 8px 14px; font-size: 13.5px; border-radius: 9px; }
.error-msg {
  margin-top: 14px; padding: 11px 14px; border-radius: 10px;
  background: #fef3f2; border: 1px solid #fecdca; color: #b42318;
  font-size: 13.5px; font-weight: 600;
}

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid transparent; border-radius: 11px;
  padding: 12px 20px; font-size: 15px; font-weight: 700; font-family: inherit;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s, transform .06s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-outline { background: #fff; color: var(--ink); border-color: #d0d5dd; }
.btn-outline:hover { border-color: var(--brand); color: var(--brand); }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { background: var(--line-2); }
.btn-sm { padding: 8px 13px; font-size: 13px; border-radius: 9px; }
.link-btn {
  border: 0; background: none; padding: 0; font: inherit; font-weight: 700;
  color: var(--brand); cursor: pointer; text-decoration: underline; text-underline-offset: 3px;
}

/* 파일 정보 */
.file-info {
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 14px 16px; border: 1px solid var(--line);
  border-radius: var(--radius); background: #fbfcfe; flex-wrap: wrap;
}
.file-meta { display: flex; align-items: center; gap: 12px; min-width: 0; }
.file-badge {
  flex: none; display: grid; place-items: center;
  width: 40px; height: 40px; border-radius: 10px;
  background: #e7f6ec; color: var(--ok); font-size: 11px; font-weight: 800; letter-spacing: .04em;
}
.file-text { display: flex; flex-direction: column; min-width: 0; }
.file-text strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 46vw; }
.file-text span { font-size: 12.5px; color: var(--muted); }
.file-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.sheet-pick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); font-weight: 600; }
.sheet-pick select {
  font: inherit; font-size: 13.5px; padding: 7px 10px; border-radius: 8px;
  border: 1px solid var(--line); background: #fff; color: var(--ink); max-width: 42vw;
}

/* 옵션 */
.options { border-top: 1px solid var(--line-2); padding-top: 20px; }
.options-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.options-head h2 { font-size: 16px; font-weight: 800; }
.hint { font-size: 12.5px; color: var(--muted); }
.opt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.opt {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #fff; cursor: pointer; transition: border-color .12s, background .12s;
}
.opt:hover { border-color: #b9c2d6; }
.opt:has(input:checked) { border-color: var(--brand); background: #f7f9ff; }
.opt input {
  appearance: none; -webkit-appearance: none;
  flex: none; width: 18px; height: 18px; margin: 2px 0 0;
  border: 1.6px solid #c3cad8; border-radius: 5px; background: #fff;
  cursor: pointer; position: relative; transition: background .12s, border-color .12s;
}
.opt input:checked { background: var(--brand); border-color: var(--brand); }
.opt input:checked::after {
  content: ""; position: absolute; inset: 0;
  background: no-repeat center/11px 9px url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 10'%3E%3Cpath d='M1 5.2 4.2 8.4 11 1.6' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
.opt-body { display: flex; flex-direction: column; }
.opt-body b { font-size: 14px; font-weight: 700; }
.opt-body small { font-size: 12px; color: var(--muted); margin-top: 2px; }

.dedupe-row {
  margin-top: 14px; padding: 14px 16px;
  border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe;
}
.dedupe-row > label { display: block; font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.dedupe-row select {
  width: 100%; font: inherit; font-size: 13.5px; padding: 8px;
  border: 1px solid var(--line); border-radius: 9px; background: #fff; color: var(--ink);
}
.dedupe-row .hint { margin-top: 8px; }

/* 결과 */
.result { border-top: 1px solid var(--line-2); padding-top: 20px; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.stat {
  padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; background: #fbfcfe;
  display: flex; flex-direction: column; gap: 2px;
}
.stat-label { font-size: 12px; color: var(--muted); font-weight: 600; }
.stat strong { font-size: 22px; font-weight: 800; letter-spacing: -0.02em; }
.stat strong.ink { color: var(--brand); }
.encoding-note {
  margin-top: 12px; font-size: 13px; color: var(--ink-2);
  background: #eff8f2; border: 1px solid #cfe9da; border-radius: 10px; padding: 10px 13px;
}
.encoding-note.warn { background: #fff8ea; border-color: #f3dcae; }

.downloads { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.dl-note { font-size: 12.5px; color: var(--muted); }

.preview { margin-top: 20px; }
.tabs { display: flex; align-items: center; gap: 6px; border-bottom: 1px solid var(--line); }
.tab {
  border: 0; background: none; font: inherit; font-size: 14px; font-weight: 700;
  color: var(--muted); padding: 10px 12px; cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.tab.is-active { color: var(--brand); border-bottom-color: var(--brand); }
.preview-count { margin-left: auto; font-size: 12.5px; color: var(--muted); }
.table-scroll {
  max-height: 420px; overflow: auto; margin-top: 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #fff;
}
.preview-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 13px; }
.preview-table th, .preview-table td {
  padding: 9px 12px; border-bottom: 1px solid var(--line-2);
  text-align: left; white-space: nowrap; max-width: 260px;
  overflow: hidden; text-overflow: ellipsis;
}
.preview-table thead th {
  position: sticky; top: 0; z-index: 1;
  background: #f4f6fb; font-size: 12.5px; font-weight: 800; color: var(--ink-2);
  border-bottom: 1px solid var(--line);
}
.preview-table thead th .col-tag {
  display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px;
  background: #e6eaff; color: var(--brand); font-size: 10.5px; font-weight: 700; vertical-align: 1px;
}
.preview-table tbody tr:hover td { background: #fafbff; }
.preview-table td.chg {
  background: var(--mark); box-shadow: inset 0 -2px 0 var(--mark-line);
}
.preview-table td.num { font-variant-numeric: tabular-nums; }
.preview-table td.rownum { color: var(--muted); font-size: 11.5px; background: #fafbfd; width: 48px; }
.preview-table .empty-cell { color: #c3cad8; }
.preview-table .cell-wrap { display: inline-flex; gap: 6px; align-items: baseline; }
.preview-table .was { color: var(--muted); font-size: 11px; text-decoration: line-through; opacity: .8; }

.privacy-line {
  display: flex; align-items: center; gap: 7px; justify-content: center;
  margin-top: 18px; font-size: 12.5px; color: var(--muted);
}

/* 섹션 공통 */
.section-title { font-size: clamp(20px, 3vw, 26px); font-weight: 800; text-align: center; }
.section-sub { margin-top: 10px; text-align: center; color: var(--muted); font-size: 14.5px; }

/* 사용법 */
.steps { padding: 64px 0 8px; }
.step-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step-list li {
  background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px;
  display: flex; gap: 14px;
}
.step-no {
  flex: none; display: grid; place-items: center; width: 28px; height: 28px;
  border-radius: 8px; background: var(--brand-soft); color: var(--brand); font-weight: 800; font-size: 13px;
}
.step-list b { font-size: 14.5px; }
.step-list p { margin-top: 4px; font-size: 13px; color: var(--muted); }

/* 크몽 CTA */
.cta { padding: 64px 0 8px; }
.cta-grid { margin-top: 26px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.cta-card {
  display: flex; flex-direction: column; gap: 8px;
  padding: 24px; border-radius: 16px; text-decoration: none;
  background: #fff; border: 1px solid var(--line);
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.cta-card:hover { border-color: var(--brand); box-shadow: var(--shadow); transform: translateY(-2px); }
.cta-tag {
  align-self: flex-start; padding: 3px 9px; border-radius: 999px;
  background: var(--brand-soft); color: var(--brand); font-size: 11.5px; font-weight: 800;
}
.cta-card h3 { font-size: 18px; color: var(--ink); }
.cta-card p { font-size: 13.5px; color: var(--muted); }
.cta-price { margin-top: auto; padding-top: 10px; font-size: 13.5px; font-weight: 700; color: var(--brand); }
.cta-price b { font-size: 15px; }

/* FAQ */
.faq { padding: 64px 0 12px; max-width: 820px; }
.faq details {
  background: #fff; border: 1px solid var(--line); border-radius: 12px;
  padding: 4px 18px; margin-top: 10px;
}
.faq details[open] { border-color: #c9d2ea; }
.faq summary {
  cursor: pointer; list-style: none; padding: 14px 0;
  font-size: 14.5px; font-weight: 700; display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-size: 18px; font-weight: 600; flex: none; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 0 16px; font-size: 13.5px; color: var(--ink-2); }
.faq code {
  background: #f2f4f8; border-radius: 5px; padding: 1px 5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12.5px;
}

/* 푸터 */
.site-foot { margin-top: 64px; border-top: 1px solid var(--line); background: #fff; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 0; flex-wrap: wrap; }
.foot-brand { display: flex; flex-direction: column; font-size: 14px; }
.foot-brand span { font-size: 12px; color: var(--muted); }
.foot-note, .foot-copy { font-size: 12px; color: var(--muted); }
.foot-note a { color: var(--muted); }

/* 반응형 */
@media (max-width: 860px) {
  .opt-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-list { grid-template-columns: 1fr; }
  .cta-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 15px; }
  .wrap { width: min(1080px, 100% - 28px); }
  .site-nav { gap: 14px; font-size: 13px; }
  .site-nav a:not(.nav-cta) { display: none; }
  .hero { padding: 36px 0 18px; }
  .panel { padding: 16px; border-radius: 16px; }
  .dropzone { padding: 26px 14px; }
  .dz-title { font-size: 15.5px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .opt-grid { grid-template-columns: 1fr; }
  .opt { padding: 12px; }
  .options-head { display: block; }
  .options-head .hint { display: block; margin-top: 4px; }
  .file-text strong { max-width: 52vw; }
  .downloads { flex-direction: column; align-items: stretch; }
  .downloads .btn { width: 100%; }
  .preview-table th, .preview-table td { padding: 8px 10px; }
  .pc-only { display: none; }
  .foot-inner { flex-direction: column; align-items: flex-start; gap: 8px; }
}
