:root {
  --navy: #0b1b45;
  --blue: #0f6b9a;
  --ink: #17233f;
  --muted: #5d6880;
  --line: #dfe4ee;
  --soft: #f3f6fb;
  --accent: #0a5c8f;
  --danger: #c8321f;
  --ok: #0f7a4f;
  --kakao: #fee500;
  --radius: 16px;
  --grad: linear-gradient(135deg, var(--blue) 0%, var(--navy) 100%);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: #fff; color: var(--ink); line-height: 1.6; word-break: keep-all;
  font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Malgun Gothic', sans-serif;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }

.topbar { background: var(--navy); color: #fff; }
.topbar-in { max-width: 560px; margin: 0 auto; padding: 14px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 700; letter-spacing: .02em; }
.brand img { width: 30px; height: 30px; display: block; }
.toplink { background: none; border: 0; color: #d7deef; font-size: 14px; padding: 4px 0; text-decoration: none; }

.page { max-width: 560px; margin: 0 auto; padding: 36px 20px 40px; }
.has-bar { padding-bottom: 76px; }
h1 { font-size: 27px; line-height: 1.35; margin: 0 0 12px; letter-spacing: -.02em; white-space: pre-line; }
h2 { font-size: 18px; margin: 0 0 6px; }
.lead { color: var(--muted); margin: 0 0 24px; font-size: 15px; }
.lead b { color: var(--ink); }

.choice { display: block; width: 100%; text-align: left; border-radius: var(--radius); border: 1px solid var(--line); background: #fff; padding: 24px; margin-bottom: 14px; box-shadow: 0 2px 8px rgba(11, 27, 69, .05); }
.choice h2 { font-size: 20px; }
.choice p { margin: 0 0 14px; color: var(--muted); font-size: 15px; }
.choice .go { font-weight: 700; }
.choice.primary { background: var(--grad); border: 0; color: #fff; }
.choice.primary p { color: #dbe6f5; }
.choice:hover { transform: translateY(-1px); }

/* 두 번째 화면 */
.intro { background: var(--grad); color: #fff; min-height: 100dvh; display: flex; flex-direction: column; justify-content: center; }
.intro-in { max-width: 560px; width: 100%; margin: 0 auto; padding: 32px 24px; }
.intro h1 { font-size: 26px; margin-bottom: 8px; }
.intro p { margin: 0 0 22px; color: #e4ecf8; font-size: 16px; }
.intro h2 { color: #fff; font-size: 17px; margin-bottom: 10px; }
.intro ul { list-style: none; margin: 0 0 26px; padding: 0; }
.intro li { padding: 5px 0 5px 24px; position: relative; font-weight: 500; }
.intro li::before { content: '✓'; position: absolute; left: 0; color: #8fd3ff; font-weight: 700; }
.progress { height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .25); overflow: hidden; }
.progress i { display: block; height: 100%; width: 0; background: #fff; animation: fill var(--intro-time, 1s) linear forwards; }
@keyframes fill { to { width: 100%; } }

.card { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 20px; margin-bottom: 14px; }
.fee-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.fee-row:last-child { border-bottom: 0; }
.fee-row strong { font-size: 20px; color: var(--accent); white-space: nowrap; }
.fee-title { font-size: 13px; color: var(--muted); font-weight: 500; margin: 0 0 4px; }
.fee-list { margin: 0; padding: 0; list-style: none; font-size: 15px; }
.fee-list li { padding: 4px 0; }
.fee-list b { color: var(--accent); }
.callout { border-radius: 12px; background: var(--soft); padding: 14px 16px; font-size: 15px; margin-bottom: 14px; }
.callout b { color: var(--accent); }
.callout.free { color: var(--danger); font-weight: 700; }
details { font-size: 15px; margin-bottom: 18px; }
summary { cursor: pointer; color: var(--muted); padding: 6px 0; }
details ul { padding-left: 20px; margin: 8px 0 0; }
details p { margin: 8px 0 0; }

.btn { display: block; width: 100%; padding: 15px; border-radius: 12px; border: 1px solid var(--line); background: #fff; font-weight: 700; text-align: center; text-decoration: none; }
.btn.primary { background: var(--grad); border: 0; color: #fff; }
.btn:disabled { opacity: .55; cursor: default; }
.btn + .btn { margin-top: 10px; }

.field { margin-bottom: 18px; }
.field > label, .field > .label { display: block; font-weight: 700; font-size: 15px; margin-bottom: 6px; }
.req { color: var(--danger); margin-left: 2px; }
.input { width: 100%; height: 52px; padding: 0 14px; border: 1px solid var(--line); border-radius: 12px; background: #fff; font-size: 16px; }
.input:focus, .btn:focus-visible, .choice:focus-visible, .seg:focus-within { outline: 2px solid var(--accent); outline-offset: 1px; }
.input.bad { border-color: var(--danger); }
.hint { font-size: 13px; color: var(--muted); margin: 6px 0 0; }
.err { font-size: 13px; color: var(--danger); margin: 6px 0 0; }
.warn { font-size: 13px; color: #a15c00; margin: 6px 0 0; }
.pw-wrap { position: relative; }
.pw-wrap .input { padding-right: 64px; }
.pw-toggle { position: absolute; right: 6px; top: 8px; height: 36px; padding: 0 10px; border: 0; background: none; color: var(--muted); font-size: 14px; }
.segs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: block; position: relative; border: 1px solid var(--line); border-radius: 12px; padding: 13px; text-align: center; font-weight: 700; cursor: pointer; }
.seg input { position: absolute; opacity: 0; }
.seg:has(input:checked) { border-color: var(--accent); background: #eaf4fb; color: var(--accent); }
.secure { font-size: 13px; color: var(--muted); background: var(--soft); border-radius: 10px; padding: 10px 12px; margin: -6px 0 18px; }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; margin-bottom: 18px; cursor: pointer; }
.consent input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; }
.form-error { background: #fdeeec; color: var(--danger); border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
.form-error button { background: none; border: 0; padding: 0; color: inherit; text-decoration: underline; font-weight: 700; }

.receipt { text-align: center; background: var(--soft); border-radius: var(--radius); padding: 20px; margin-bottom: 18px; }
.receipt small { color: var(--muted); display: block; }
.receipt strong { font-size: 26px; letter-spacing: .03em; }
.steps { list-style: none; padding: 0; margin: 0 0 20px; counter-reset: s; }
.steps li { counter-increment: s; padding: 8px 0 8px 36px; position: relative; font-size: 15px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--navy); color: #fff; font-size: 13px; font-weight: 700; display: grid; place-items: center; }

.doc-row { display: grid; grid-template-columns: 108px 1fr; gap: 10px; padding: 9px 0; border-top: 1px solid var(--line); font-size: 14px; }
.result-row { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 15px; }
.result-row span:first-child { color: var(--muted); }
.result-row span:last-child { text-align: right; font-weight: 500; }
.badge { display: inline-block; padding: 2px 10px; border-radius: 99px; background: #eaf4fb; color: var(--accent); font-size: 13px; font-weight: 700; white-space: nowrap; }
.badge.s-취소, .badge.s-미수임 { background: #f0f1f4; color: var(--muted); }
.badge.s-신고완료 { background: #e5f5ee; color: var(--ok); }
.badge.s-상담중 { background: #fff3dc; color: #a15c00; }
.badge.s-수임완료 { background: #e8ebfa; color: #3346a8; }
.link-danger { background: none; border: 0; padding: 8px 0 0; color: var(--danger); font-size: 14px; text-decoration: underline; }

.foot { border-top: 1px solid var(--line); margin-top: 28px; padding-top: 18px; font-size: 13px; color: var(--muted); }
.foot p { margin: 2px 0; }
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: var(--navy); padding: 9px 14px calc(9px + env(safe-area-inset-bottom)); }
.bar-in { max-width: 560px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; align-items: center; }
.bar a { display: block; text-align: center; font-weight: 700; text-decoration: none; padding: 11px 6px; border-radius: 10px; color: #fff; font-size: 15px; }
.bar a.kakao { background: var(--kakao); color: #191600; }
.demo-note { background: #fff3dc; color: #7a4a00; font-size: 13px; text-align: center; padding: 7px 12px; }

.doc { font-size: 15px; }
.doc h1 { font-size: 24px; }
.doc h2 { font-size: 16px; margin-top: 24px; }
.doc ul { padding-left: 20px; }

/* 어드민 */
.admin { background: var(--soft); min-height: 100dvh; }
.admin .topbar-in { max-width: 1180px; }
.admin-main { max-width: 1180px; margin: 0 auto; padding: 22px 20px 48px; }
.login { max-width: 400px; margin: 60px auto; background: #fff; }
.tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.tab { border: 1px solid var(--line); background: #fff; border-radius: 10px; padding: 8px 16px; font-weight: 700; color: var(--muted); }
.tab.on { background: var(--navy); border-color: var(--navy); color: #fff; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 10px; margin-bottom: 14px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: left; }
.kpi.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.kpi small { color: var(--muted); display: block; font-size: 13px; }
.kpi b { font-size: 22px; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; align-items: center; }
.toolbar .input { height: 40px; width: auto; flex: 1 1 200px; font-size: 14px; }
.btn-s { border: 1px solid var(--line); background: #fff; border-radius: 9px; padding: 8px 12px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.btn-s.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn-s.danger { color: var(--danger); border-color: #efc5bf; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; background: #fafbfd; white-space: nowrap; }
th, td { padding: 11px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f6f9fd; }
tbody tr:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
tbody tr:last-child td { border-bottom: 0; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 34px 16px; text-align: center; color: var(--muted); }
.overlay { position: fixed; inset: 0; background: rgba(11, 27, 69, .4); z-index: 20; }
.panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; z-index: 21; overflow-y: auto; padding: 20px; box-shadow: -6px 0 24px rgba(11, 27, 69, .15); }
.panel h2 { font-size: 19px; margin: 0; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 12px; }
.panel h3 { font-size: 14px; margin: 20px 0 8px; color: var(--muted); }
.kv { display: grid; grid-template-columns: 96px 1fr auto; gap: 6px 8px; align-items: center; font-size: 14px; }
.kv > span:nth-child(3n+1) { color: var(--muted); }
.copy { border: 0; background: var(--soft); border-radius: 7px; padding: 3px 8px; font-size: 12px; }
.panel .input { height: 42px; font-size: 14px; }
.panel textarea.input { height: 76px; padding: 10px 14px; resize: vertical; }
.checks { display: grid; gap: 6px; font-size: 14px; margin: 8px 0; }
.checks label { display: flex; gap: 8px; align-items: center; cursor: pointer; }
.row { display: flex; gap: 8px; align-items: center; }
.row .input { flex: 1; min-width: 0; }
.panel-foot { display: flex; gap: 8px; margin-top: 20px; }
.panel-foot .btn-s.primary { flex: 1; padding: 11px; font-weight: 700; }
.vault { background: var(--soft); border-radius: 10px; padding: 12px; }
.modal { position: fixed; left: 50%; top: 50%; transform: translate(-50%, -50%); z-index: 31; width: min(400px, calc(100% - 32px)); background: #fff; border-radius: 14px; padding: 20px; }
.modal p { margin: 0 0 16px; font-size: 15px; white-space: pre-line; }
.modal-over { z-index: 30; }
.modal .row { justify-content: flex-end; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 40; }
.setting { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 14px; max-width: 620px; }
.setting .input { height: 44px; margin-bottom: 8px; font-size: 14px; }
.setting h2 { font-size: 16px; }
.setting p { font-size: 14px; color: var(--muted); margin: 0 0 12px; }
.banner { background: #fff3dc; color: #7a4a00; border-radius: 10px; padding: 12px 14px; font-size: 14px; margin-bottom: 14px; }
@media (max-width: 720px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 420px) {
  h1 { font-size: 24px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
