/* ======================================================================
   sign.css — 계약자 페이지(/my) 전용(옛 서명자 화면 스타일). 관리자 화면(키트)과 섞지 않는다. 모바일 우선.
   ====================================================================== */
body.sg { margin: 0; background: #f1f5f9; color: #0f172a;
    font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
    -webkit-text-size-adjust: 100%; }
.sg-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; background: #0f172a; color: #fff; }
.sg-brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: -.01em; }
.sg-mark { width: 24px; height: 24px; border-radius: 6px; }
.sg-head-sub { font-size: 12px; color: #94a3b8; }
.sg-wrap { max-width: 480px; margin: 0 auto; padding: 20px 16px 32px; }
.sg-wrap-doc { max-width: 820px; }
.sg-card { background: #fff; border-radius: 16px; padding: 22px 18px; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); margin-bottom: 16px; }
.sg-center { text-align: center; padding: 36px 18px; }
.sg-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: #64748b; }
.sg-h1 { margin: 0 0 8px; font-size: 20px; font-weight: 800; line-height: 1.35; letter-spacing: -.02em; }
.sg-text { margin: 0; font-size: 14.5px; color: #475569; line-height: 1.6; }
.sg-form { display: flex; flex-direction: column; gap: 10px; margin-top: 16px; }
.sg-label { font-size: 13px; font-weight: 700; color: #334155; }
.sg-input { height: 52px; border: 1px solid #cbd5e1; border-radius: 12px; padding: 0 14px; font-size: 20px; letter-spacing: .12em; background: #fff; }
.sg-input:focus { outline: none; border-color: #0f172a; box-shadow: 0 0 0 3px rgba(15, 23, 42, .12); }
.sg-hint { margin: 0; font-size: 12.5px; color: #64748b; line-height: 1.55; }
.sg-error { margin: 0; padding: 10px 12px; border-radius: 10px; background: #fef2f2; color: #b91c1c; font-size: 13.5px; font-weight: 600; }
.sg-error[hidden] { display: none; }
.sg-btn { display: flex; align-items: center; justify-content: center; height: 52px; border-radius: 12px; border: 0; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer; }
.sg-btn-primary { background: #0f172a; color: #fff; }
.sg-btn-primary:disabled { background: #94a3b8; }
.sg-link { background: none; border: 0; color: #2563eb; font-size: 13.5px; font-weight: 600; cursor: pointer; padding: 4px 0; }
.sg-doc { background: #fff; border-radius: 16px; padding: 22px 16px; box-shadow: 0 1px 3px rgba(15, 23, 42, .08); margin-bottom: 16px; }
.sg-doc .cdoc { font-size: 14px; }
.sg-doc .cdoc-title { font-size: 20px; }
.sg-agree { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; font-weight: 600; line-height: 1.5; padding: 12px; border: 1px solid #e2e8f0; border-radius: 12px; }
.sg-agree input { width: 22px; height: 22px; margin: 1px 0 0; flex: none; accent-color: #0f172a; }
.sg-pad-head { display: flex; align-items: center; justify-content: space-between; margin-top: 4px; }
.sg-pad { position: relative; height: 200px; border: 2px dashed #94a3b8; border-radius: 12px; background: #fff; }
.sg-pad canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; cursor: crosshair; border-radius: 12px; }
.sg-pad-ph { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #94a3b8; font-size: 15px; pointer-events: none; }
.sg-done { text-align: center; }
.sg-done .sg-btn { margin-top: 16px; }
.sg-done .sg-btn + .sg-btn { margin-top: 10px; }
.sg-check { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; background: #dcfce7; color: #15803d; font-size: 28px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.sg-foot { text-align: center; font-size: 12px; color: #94a3b8; padding: 8px 16px 28px; }
@media (min-width: 720px) {
    .sg-doc { padding: 40px 48px; }
    .sg-pad { height: 220px; }
}
.sg-note { margin-top: 4px; padding: 10px 12px; border-radius: 8px; background: #f8fafc; border: 1px solid #e2e8f0; }

/* ---- 계약자 페이지(/my, ADR-033) ---- */
a.sg-brand { color: #fff; text-decoration: none; }
.sg-head-user { display: inline-flex; align-items: center; gap: 10px; }
.sg-inline { display: inline; margin: 0; }
.sg-head-btn { background: transparent; border: 1px solid #334155; color: #e2e8f0; border-radius: 8px; padding: 5px 10px; font-size: 12.5px; cursor: pointer; }
.sg-ok { margin: 12px 0 0; padding: 10px 12px; border-radius: 10px; background: #f0fdf4; color: #166534; font-size: 13.5px; font-weight: 600; line-height: 1.5; }
.sg-mt { margin-top: 14px; }
.sg-btn-light { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.sg-input-text { font-size: 16px; letter-spacing: 0; }
.sg-rrn { display: flex; align-items: center; gap: 8px; }
.sg-rrn .sg-input { flex: 1 1 0; min-width: 0; font-size: 18px; letter-spacing: .08em; }
.sg-rrn-dash { font-size: 20px; color: #64748b; }
.sg-list { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.sg-item { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px; border: 1px solid #e2e8f0; border-radius: 12px; color: inherit; text-decoration: none; }
a.sg-item:active, .sg-item a:active { background: #f8fafc; }
.sg-item-main { display: flex; flex-direction: column; gap: 3px; min-width: 0; color: inherit; text-decoration: none; font-size: 15px; }
.sg-item-sub { font-size: 12.5px; color: #64748b; }
.sg-badge { flex: none; border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 700; text-decoration: none; }
.sg-badge-todo { background: #0f172a; color: #fff; }
.sg-badge-done { background: #dcfce7; color: #15803d; }
.sg-me { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.sg-me > div { flex: 1 1 auto; min-width: 0; word-break: keep-all; overflow-wrap: anywhere; }
.sg-me .sg-btn { flex: none; width: auto; white-space: nowrap; height: 40px; padding: 0 16px; font-size: 14px; }   /* 좁은 화면에서 버튼이 눌려 글자가 세로로 서지 않게 */
.sg-back { margin: 0 0 10px; }
.sg-form .sg-btn-light { margin-top: 0; }

/* ---- 카카오 로그인(ADR-034 · 036 카카오 전용) ---- */
.sg-btn-kakao { gap: 8px; background: #FEE500; color: rgba(0, 0, 0, .85); }
.sg-kakao-icon { width: 20px; height: 20px; fill: #000; }
.sg-ok-top { margin: 0 0 16px; }

/* 자가 가입 — 개인정보 수집·이용 안내(ADR-035) */
.sg-consent { padding: 12px 14px; border-radius: 12px; background: #f8fafc; border: 1px solid #e2e8f0; display: grid; gap: 6px; }
.sg-consent-title { margin: 0; font-size: 13.5px; font-weight: 700; color: #0f172a; }
.sg-consent-list { margin: 0; padding-left: 18px; font-size: 13px; color: #334155; line-height: 1.6; }
.sg-consent-list b { margin-right: 6px; color: #0f172a; }

/* 주소 검색(카카오 우편번호) — 기본주소 + [주소 검색] 한 줄, 아래 상세주소 */
.sg-addr { display: flex; flex-direction: column; gap: 8px; }
.sg-addr-row { display: flex; gap: 8px; }
.sg-addr-row .sg-input { flex: 1 1 auto; min-width: 0; background: #f8fafc; cursor: pointer; }
.sg-addr-btn { flex: none; width: auto; margin-top: 0; padding: 0 14px; white-space: nowrap; }
.sg-addr-layer { position: fixed; inset: 0; z-index: 1000; background: rgba(15, 23, 42, .55); display: flex; align-items: center; justify-content: center; padding: 16px; }
.sg-addr-box { position: relative; width: 100%; max-width: 480px; height: min(560px, 85vh); background: #fff; border-radius: 12px; overflow: hidden; }
.sg-addr-close { position: absolute; top: 6px; right: 8px; z-index: 2; border: 0; background: #fff; font-size: 22px; line-height: 1; padding: 4px 8px; border-radius: 6px; cursor: pointer; }

/* 가입 화면 [취소] — 가입하기 아래 보조 버튼(링크 모양 대신) */
.sg-btn-cancel { width: 100%; box-sizing: border-box; display: flex; align-items: center; justify-content: center; text-decoration: none; margin-top: 8px; }

/* 뒤로가기 — 링크 글자 대신 둥근 버튼 */
.sg-back-btn { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 14px 0 8px; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0; color: #0f172a; font-size: 14px; font-weight: 600; text-decoration: none; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.sg-back-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.sg-back-btn:hover { background: #f8fafc; }
/* 작은 보조 버튼(서명 다시 쓰기 등) */
.sg-chip-btn { height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid #e2e8f0; background: #fff; color: #334155; font-size: 13px; font-weight: 600; cursor: pointer; }
.sg-chip-btn:hover { background: #f1f5f9; }
/* 휴대폰이 숫자를 전화번호 링크로 바꿔도 본문처럼 보이게(사업자번호 등) */
a[href^="tel:"], a[x-apple-data-detectors] { color: inherit !important; text-decoration: none !important; pointer-events: none; }
