/* S004 cleanshot · 헬베티카 계열 단일 서체, 종이·잉크 톤 */
:root {
  --ink: #101613;
  --paper: #eef1ed;
  --panel: #fbfdfa;
  --muted: #62705f;
  --line: #d5ddd3;
  --accent: #0d7a55;
  --accent-ink: #07543b;
  --warn: #a63f16;
  --warn-bg: #fdf0e7;
  --ok-bg: #e6f4ec;
  --radius: 16px;
  --font: 'Helvetica Neue', Helvetica, 'Apple SD Gothic Neo', 'Noto Sans KR', Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }
html.modal-open { overflow: hidden; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.5;
  word-break: keep-all;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, figure { margin: 0; }
button { font: inherit; color: inherit; cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ── 머리 ─────────────────────────────────────────── */
.mast {
  display: flex; align-items: center; gap: 14px;
  padding: 16px clamp(16px, 4vw, 40px);
  border-bottom: 1px solid var(--line);
}
.wordmark {
  font-size: 23px; font-weight: 800; letter-spacing: -.05em;
  text-decoration: none; display: inline-flex; align-items: baseline; gap: 3px;
}
.wordmark span { color: var(--accent); }
.wordmark i { font-style: normal; font-size: 12px; transform: translateY(-6px); color: var(--muted); }
.edition {
  font-size: 10px; letter-spacing: .16em; text-transform: uppercase;
  color: var(--muted); border-left: 1px solid var(--line); padding-left: 14px;
}
.lang {
  margin-left: auto; background: var(--panel); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 14px; font-size: 13px; font-weight: 600; white-space: nowrap;
}
.lang:hover { border-color: var(--ink); }

main { max-width: 1120px; margin: 0 auto; padding: clamp(18px, 3vw, 30px) clamp(16px, 4vw, 40px) 60px; }

/* ── 소개 ─────────────────────────────────────────── */
.intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.intro-copy { max-width: 720px; min-width: 0; }
.eyebrow {
  font-size: 11px; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 700; margin-bottom: 10px;
}
h1 { font-size: clamp(30px, 5.6vw, 54px); line-height: 1.06; letter-spacing: -.045em; font-weight: 800; }
.lede { margin-top: 14px; font-size: clamp(15px, 1.6vw, 17px); color: #2c3a31; max-width: 46ch; }
.stamp {
  flex: none; width: 236px; padding: 14px 16px;
  border: 1.5px solid var(--ink); border-radius: 12px;
  display: grid; gap: 3px; transform: rotate(-2deg);
  background: var(--panel);
  transition: background .18s ease, border-color .18s ease, box-shadow .18s ease;
}
.stamp-label { font-size: 10px; letter-spacing: .06em; line-height: 1.3; color: var(--muted); }
.stamp strong {
  font-size: 23px; line-height: 1.15; letter-spacing: -.02em;
  word-break: keep-all;
}
.stamp small { font-size: 11px; line-height: 1.35; color: var(--muted); overflow-wrap: anywhere; }

/* 사진 상태별 경고: 빨강(위치) → 호박(기기·시각) → 초록(없음) */
.stamp[data-state="danger"] {
  border-color: #b3261e; background: #fdeceb;
  box-shadow: 0 0 0 3px rgba(179, 38, 30, .12);
}
.stamp[data-state="danger"] .stamp-label { color: #8f1d16; font-weight: 700; }
.stamp[data-state="danger"] .stamp-big { color: #b3261e; font-size: 25px; }
.stamp[data-state="danger"] .stamp-sub { color: #7d2b23; font-weight: 600; }

.stamp[data-state="caution"] {
  border-color: #b26a00; background: #fff5e2;
  box-shadow: 0 0 0 3px rgba(178, 106, 0, .1);
}
.stamp[data-state="caution"] .stamp-label { color: #8a5200; font-weight: 700; }
.stamp[data-state="caution"] .stamp-big { color: #9a5b00; }
.stamp[data-state="caution"] .stamp-sub { color: #6d4700; }

.stamp[data-state="safe"] {
  border-color: var(--accent); background: var(--ok-bg);
}
.stamp[data-state="safe"] .stamp-label { color: var(--accent-ink); }
.stamp[data-state="safe"] .stamp-big { color: var(--accent-ink); }
.stamp[data-state="safe"] .stamp-sub { color: var(--accent-ink); }

/* ── 작업대 ───────────────────────────────────────── */
.workspace {
  margin-top: clamp(20px, 3vw, 32px);
  display: grid; grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  gap: 16px; align-items: start;
}
.input-pane, .report-pane {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; min-width: 0;
}
.pane-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.pane-head h2 { font-size: 15px; letter-spacing: -.01em; }
.step {
  font-size: 10px; font-weight: 800; letter-spacing: .08em;
  border: 1px solid var(--ink); border-radius: 999px; padding: 2px 7px;
}
.tag {
  margin-left: auto; font-size: 10px; letter-spacing: .1em;
  color: var(--muted); border: 1px dashed var(--line); border-radius: 999px; padding: 3px 9px;
}
.save-head { margin-top: 22px; }

.drop {
  border: 1.5px dashed #b9c6b8; border-radius: 13px; background: #f4f8f3;
  padding: 22px 16px; text-align: center; transition: background .15s, border-color .15s;
}
.drop.dragging { border-color: var(--accent); background: var(--ok-bg); }
.upload-symbol { display: block; font-size: 26px; color: var(--accent); line-height: 1; margin-bottom: 10px; }
.choose {
  display: inline-block; background: var(--ink); color: var(--panel);
  border-radius: 10px; padding: 11px 20px; font-weight: 800; font-size: 14px;
}
.drop input[type="file"] { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; }
.drop p { margin-top: 10px; font-size: 13px; color: #33413a; }
.drop small { display: block; margin-top: 4px; font-size: 11px; color: var(--muted); }

.photo-preview { margin-top: 14px; }
.photo-preview img {
  width: 100%; max-height: 240px; object-fit: contain;
  background: #e7ece6; border: 1px solid var(--line); border-radius: 12px;
}
.photo-preview figcaption { margin-top: 8px; display: grid; gap: 2px; font-size: 12px; }
.photo-preview strong { overflow-wrap: anywhere; font-size: 12px; }
.photo-preview span { color: var(--muted); }

.text-button {
  background: none; border: 0; padding: 8px 0; font-size: 12.5px; font-weight: 700;
  color: var(--muted); text-decoration: underline; text-underline-offset: 3px;
}
.text-button:hover { color: var(--ink); }
#reset { margin-top: 10px; }

.note {
  margin-top: 8px; font-size: 12px; font-weight: 600; color: var(--warn);
  background: var(--warn-bg); border-radius: 8px; padding: 8px 10px;
}

/* ── 숨은 정보 ─────────────────────────────────────── */
.hint { font-size: 13.5px; color: var(--muted); }
.badge {
  display: flex; align-items: baseline; justify-content: space-between; gap: 10px;
  border-radius: 11px; padding: 11px 13px; margin-bottom: 12px;
  border: 1px solid var(--line); background: #f4f8f3;
}
.badge strong { font-size: 14px; letter-spacing: -.01em; }
.badge span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.badge.warn { background: var(--warn-bg); border-color: #f0c9ac; }
.badge.warn strong { color: var(--warn); }
.badge.ok { background: var(--ok-bg); border-color: #b9dcc8; }
.badge.ok strong { color: var(--accent-ink); }

.findings-wrap { overflow-x: auto; }
.findings { width: 100%; border-collapse: collapse; }
.findings th, .findings td {
  text-align: left; vertical-align: top; padding: 9px 0;
  border-top: 1px solid var(--line); font-size: 12.5px;
}
.findings thead th { border-top: 0; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.findings tbody th { font-weight: 700; width: 42%; padding-right: 12px; }
.findings .value { color: #2a3830; }
.findings tr.removed .value { color: var(--muted); text-decoration: line-through; }
.findings tr.removed th { color: var(--muted); text-decoration: line-through; }
.chip {
  display: inline-block; vertical-align: baseline; margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #e7ece6; color: var(--muted); font-size: 10px; font-weight: 700;
  text-decoration: none; white-space: nowrap;
}

.error {
  margin-top: 12px; font-size: 13px; font-weight: 600; color: #8f2f12;
  background: var(--warn-bg); border-radius: 9px; padding: 10px 12px;
}

/* ── 저장 ─────────────────────────────────────────── */
.clean-card { display: grid; gap: 8px; }
.verify { font-size: 14px; font-weight: 800; letter-spacing: -.01em; }
.verify.ok { color: var(--accent-ink); }
.verify.bad { color: var(--warn); }
.method { font-size: 12.5px; color: #33413a; }
.clean-stats { font-size: 12px; color: var(--muted); }
.primary {
  margin-top: 4px; width: 100%;
  background: var(--accent); color: #f3fff8; border: 0; border-radius: 12px;
  padding: 15px 18px; font-size: 15.5px; font-weight: 800; letter-spacing: -.01em;
  box-shadow: 0 3px 0 var(--accent-ink);
}
.primary:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--accent-ink); }
.primary:disabled { background: #c3cec4; color: #f4f8f3; box-shadow: 0 3px 0 #aab6ab; cursor: not-allowed; }
.status { margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.subnote { margin-top: 6px; font-size: 11.5px; color: var(--muted); }

/* ── 안내 ─────────────────────────────────────────── */
.guide { margin-top: clamp(34px, 5vw, 54px); }
.guide-head h2 { font-size: clamp(21px, 2.6vw, 28px); letter-spacing: -.03em; }
.steps {
  list-style: none; padding: 0; margin: 18px 0 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px;
}
.steps li { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.steps strong { display: block; font-size: 14px; margin-bottom: 6px; }
.steps p { font-size: 12.5px; color: #33413a; }

.faq { margin-top: 26px; }
.faq h3 { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.faq details { border-top: 1px solid var(--line); padding: 10px 0; }
.faq summary { font-size: 14px; font-weight: 700; cursor: pointer; }
.faq details p { margin-top: 6px; font-size: 13px; color: #33413a; }

footer {
  margin-top: 40px; padding-top: 16px; border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 11.5px; color: var(--muted);
}
footer a { color: var(--muted); }

/* ── 저장 모달 ────────────────────────────────────── */
.modal {
  position: fixed; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center;
  background: rgba(16, 22, 19, .55); padding: 16px;
}
.modal-inner {
  background: var(--panel); border-radius: 16px; padding: 18px; width: min(440px, 100%);
  max-height: 92vh; overflow: auto; display: grid; gap: 10px;
  border: 1px solid var(--line);
}
.modal-inner h2 { font-size: 17px; letter-spacing: -.02em; }
.modal-inner p { font-size: 13px; color: #33413a; }
.modal-inner img {
  width: 100%; max-height: 46vh; object-fit: contain;
  background: #e7ece6; border-radius: 10px; border: 1px solid var(--line);
}
.modal-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.secondary {
  background: var(--panel); border: 1.5px solid var(--ink); border-radius: 10px;
  padding: 10px 14px; font-size: 13px; font-weight: 700;
}
.noscript { padding: 24px; text-align: center; }

@media (max-width: 860px) {
  .workspace { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .stamp { width: 100%; transform: none; display: grid; gap: 3px; }
  .stamp strong, .stamp[data-state="danger"] .stamp-big { font-size: 26px; }
  .edition { display: none; }
}
