:root {
  --bg: #f5f8fb;
  --card: #ffffff;
  --ink: #16213a;
  --sub: #5d6b82;
  --line: #dfe6ef;
  --brand: #1a8fd8;
  --brand-2: #0f6fb0;
  --brand-soft: #e6f3fc;
  --warn: #c2410c;
  --naver: #03c75a;
  --radius: 16px;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
}
.app { max-width: 480px; margin: 0 auto; min-height: 100dvh; padding: 0 16px 32px; }

.top {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 0; background: var(--bg);
}
.brand { font-weight: 800; color: var(--brand-2); letter-spacing: -0.02em; }
.steps { display: flex; gap: 6px; }
.steps i { width: 18px; height: 4px; border-radius: 4px; background: var(--line); transition: background .3s; }
.steps i.on { background: var(--brand); }

.screen { display: none; animation: fade .35s ease; }
.screen.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.hero { padding: 36px 0 20px; }
.eyebrow { display: inline-block; margin: 0 0 12px; padding: 6px 12px; border-radius: 99px; background: var(--brand-soft); color: var(--brand-2); font-size: 13px; font-weight: 700; }
h1 { font-size: 36px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.03em; }
h2 { font-size: 26px; line-height: 1.3; margin: 4px 0 8px; letter-spacing: -0.03em; }
h3 { font-size: 18px; margin: 4px 0 12px; }
.lead { color: var(--sub); font-size: 16px; line-height: 1.6; margin: 0; }
.sub { color: var(--sub); margin: 0 0 20px; }
.q-num { margin: 16px 0 0; font-size: 13px; font-weight: 800; color: var(--brand); letter-spacing: .06em; }
.fine { text-align: center; color: var(--sub); font-size: 13px; margin: 12px 0; }

.how { list-style: none; padding: 0; margin: 8px 0 28px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.how li { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 14px 8px; text-align: center; font-size: 14px; font-weight: 600; }
.how b { display: block; width: 26px; height: 26px; line-height: 26px; margin: 0 auto 8px; border-radius: 50%; background: var(--brand); color: #fff; font-size: 13px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 52px; padding: 0 20px; border: 0; border-radius: 14px;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: transform .1s, opacity .2s, background .2s;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn.primary { background: var(--brand); color: #fff; }
.btn.primary:not(:disabled):hover { background: var(--brand-2); }
.btn.ghost { background: transparent; color: var(--sub); }
.btn.line { background: var(--card); color: var(--ink); border: 1px solid var(--line); }
.btn.small { height: 36px; font-size: 14px; padding: 0 14px; background: rgba(0,0,0,.6); color: #fff; }
.btn.big { width: 100%; height: 58px; font-size: 18px; }
.btn.naver { background: var(--naver); color: #fff; }
.btn.chat { background: #fee500; color: #191919; }

.nav { display: flex; gap: 10px; margin-top: 24px; }
.nav .btn.primary { flex: 1; }

.checks { display: grid; gap: 10px; }
.ck {
  position: relative; display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--radius); border: 2px solid var(--line);
  background: var(--card); cursor: pointer; transition: border-color .2s, background .2s;
}
.ck input { position: absolute; opacity: 0; pointer-events: none; }
.ck .box {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid #b9c6d6; background: #fff;
  display: grid; place-items: center; transition: all .15s;
}
.ck .box::after { content: ''; width: 7px; height: 13px; border: solid #fff; border-width: 0 3px 3px 0; transform: rotate(45deg) translate(-1px, -1px); opacity: 0; }
.ck b { display: block; font-size: 17px; }
.ck small { color: var(--sub); font-size: 13px; }
.ck:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.ck input:checked + .box { background: var(--brand); border-color: var(--brand); }
.ck input:checked + .box::after { opacity: 1; }
.ck input:focus-visible + .box { outline: 2px solid var(--brand); outline-offset: 2px; }
.badge { margin-left: auto; flex: none; font-style: normal; font-size: 11px; font-weight: 700; color: var(--brand-2); background: #fff; border: 1px solid #bcdcf3; padding: 3px 8px; border-radius: 99px; }

.field { display: block; margin: 16px 0 0; }
.field span { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.field input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; background: var(--card);
  font: inherit; font-size: 16px; color: var(--ink); padding: 14px;
}
.field input { height: 52px; }
.field input:focus, textarea:focus { outline: 2px solid var(--brand); border-color: transparent; }

.label { font-size: 14px; font-weight: 700; margin: 20px 0 6px; }
.field small { color: var(--sub); font-weight: 500; }
.field textarea { resize: vertical; min-height: 110px; line-height: 1.5; }
.count { display: block; text-align: right; font-style: normal; font-size: 12px; color: var(--sub); margin-top: 4px; }
.uploads { display: grid; grid-template-columns: 1fr; gap: 10px; }
.uploads.two { grid-template-columns: 1fr 1fr; }
.upload { border: 2px dashed #b9cde0; border-radius: var(--radius); background: var(--card); overflow: hidden; }
.upload.side { border-color: #f0b27a; background: #fffaf5; }
.upload-empty { padding: 18px 12px; text-align: center; }
.upload-empty p { margin: 10px 0 6px; font-size: 15px; }
.req { display: inline-block; font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--warn); padding: 2px 6px; border-radius: 6px; vertical-align: 1px; }
.guide { width: 64px; height: 82px; margin: 0 auto; opacity: .55; }
.guide.front { border: 3px solid var(--brand); border-radius: 50% 50% 46% 46%; }
.guide.profile {
  background: no-repeat center / contain url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 82' fill='none' stroke='%23c2410c' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M40 4C24 4 14 14 14 30c0 8 2 14 6 20v14c0 8 6 14 14 14h8M40 4c8 0 12 6 12 14l2 8-2 4 4 8-4 2 2 6-3 3 1 5c0 4-4 6-10 6'/%3E%3C/svg%3E");
}
.tips { list-style: none; padding: 0; margin: 0 0 12px; color: var(--sub); font-size: 12.5px; line-height: 1.6; }
.tips li::before { content: '· '; }
.upload-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.uploads.two .upload-btns { grid-template-columns: 1fr; }
.btn.sm { height: 42px; font-size: 14px; padding: 0 8px; }
.upload-preview { position: relative; }
.upload-preview img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.upload-preview .btn { position: absolute; right: 8px; bottom: 8px; }
.consent-title { font-size: 14px; font-weight: 800; margin: 10px 0 4px; color: var(--brand-2); }

.consent { margin-top: 20px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 14px; }
.check { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; cursor: pointer; }
.check.all { font-weight: 800; font-size: 15px; border-bottom: 1px solid var(--line); padding-bottom: 12px; }
.check input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.check span { flex: 1; }
.more { border: 0; background: none; color: var(--sub); text-decoration: underline; font: inherit; font-size: 13px; cursor: pointer; }
.terms { background: var(--bg); border-radius: 10px; padding: 10px 12px; margin-bottom: 6px; font-size: 12.5px; color: var(--sub); line-height: 1.6; }
.terms p { margin: 2px 0; }

.notice { color: var(--warn); font-size: 13px; font-weight: 600; margin: 14px 0 0; line-height: 1.5; }
.err { color: #dc2626; font-size: 14px; font-weight: 600; min-height: 1em; margin: 8px 0 0; }
.ok { color: #15803d; font-weight: 700; margin: 10px 0 0; }

.loading { text-align: center; padding-top: 40px; }
.scan { position: relative; width: 220px; height: 280px; margin: 0 auto 24px; border-radius: 24px; overflow: hidden; background: #dde7f0; box-shadow: 0 10px 30px rgba(26,143,216,.25); }
.scan img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.8); }
.beam { position: absolute; left: 0; right: 0; height: 60px; top: -60px; background: linear-gradient(to bottom, transparent, rgba(26,143,216,.55), transparent); animation: beam 1.8s ease-in-out infinite; }
@keyframes beam { to { top: 100%; } }
.loading-msg { font-size: 18px; font-weight: 700; min-height: 1.4em; }
.bar { height: 6px; border-radius: 6px; background: var(--line); overflow: hidden; margin: 16px 20px 0; }
.bar i { display: block; height: 100%; width: 0; background: var(--brand); transition: width .6s ease; }

.compare { position: relative; margin-top: 16px; aspect-ratio: 3 / 4; border-radius: 20px; overflow: hidden; background: #dde7f0; user-select: none; touch-action: pan-y; }
.compare img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; pointer-events: none; }
.before-wrap { position: absolute; inset: 0; clip-path: inset(0 50% 0 0); }
.handle { position: absolute; top: 0; bottom: 0; left: 50%; width: 3px; margin-left: -1.5px; background: #fff; pointer-events: none; }
.handle i { position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px; border-radius: 50%; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.handle i::before { content: '◀ ▶'; position: absolute; inset: 0; display: grid; place-items: center; font-size: 10px; color: var(--brand); font-style: normal; letter-spacing: 2px; }
.compare input[type=range] { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: ew-resize; margin: 0; }
.tag { position: absolute; top: 12px; padding: 4px 10px; border-radius: 99px; background: rgba(0,0,0,.55); color: #fff; font-size: 13px; font-weight: 700; pointer-events: none; }
.tag.l { left: 12px; } .tag.r { right: 12px; background: var(--brand); }
.demo-note { background: #fff7ed; color: #9a3412; border-radius: 12px; padding: 10px 12px; font-size: 13px; margin: 12px 0 0; }

.tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 14px; padding: 4px; background: #e6edf4; border-radius: 12px; }
.tabs button { height: 40px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-weight: 700; color: var(--sub); cursor: pointer; }
.tabs button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.hint { text-align: center; font-size: 13px; color: var(--sub); margin: 8px 0 0; }
.done-card { margin-top: 20px; padding: 16px; border-radius: var(--radius); background: #ecfdf3; border: 1px solid #bbf0d0; text-align: center; }
.done-card p { margin: 0; line-height: 1.6; color: #166534; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cta { display: grid; gap: 10px; margin-top: 16px; }
.cta .btn { width: 100%; }
#s-error .btn.big + .btn.big { margin-top: 10px; }
