:root {
  --navy: #001A5F;
  --accent: #48109E;
  --accent-dark: #360481;
  --violet: #9A5BE0;
  --tint: #F3ECFC;
  --pale: #F5F8FC;
  --chip: #E6ECF7;
  --line: #E3E8F1;
  --body: #33415C;
  --muted: #6B7690;
  --err: #C62828;
  --ok: #2E7D5B;
  --paper: #FFFEFB;
  --ink: #1B2E8A;
  --head: "Plus Jakarta Sans", "Noto Sans KR", "Apple SD Gothic Neo", sans-serif;
  --sans: "Noto Sans KR", "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --shadow: 0 10px 30px rgba(0, 26, 95, .08), 0 2px 6px rgba(0, 26, 95, .05);
  color-scheme: light;
}
#letterPage * { box-sizing: border-box; }
#letterPage { -webkit-text-size-adjust: 100%; }
#letterPage { margin: 0; background: var(--pale); color: var(--body); font-family: var(--sans); font-size: 16px; line-height: 1.6; word-break: keep-all; }
#letterPage a { color: inherit; }
#letterPage :focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }
#letterPage h1, #letterPage h2, #letterPage h3 { font-family: var(--head); color: var(--navy); margin: 0; letter-spacing: -0.02em; text-wrap: balance; }
#letterPage h1 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; line-height: 1.3; }
#letterPage h2 { font-size: 21px; font-weight: 800; line-height: 1.4; }
#letterPage h3 { font-size: 16px; font-weight: 700; }
#letterPage .grad { background: linear-gradient(90deg, var(--navy), var(--violet)); -webkit-background-clip: text; background-clip: text; color: transparent; }
#letterPage .note { background: #FFF7DD; border-bottom: 1px solid #F0DFA6; font-size: 13px; color: #6B5310; text-align: center; padding: 8px 16px; }
#letterPage .top { background: #FFFFFF; border-bottom: 1px solid var(--line); padding: 14px max(16px, env(safe-area-inset-right)) 14px max(16px, env(safe-area-inset-left)); }
#letterPage .top .in { max-width: 1100px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
#letterPage .top a.back { text-decoration: none; font-weight: 700; color: var(--navy); font-size: 15px; }
#letterPage .top .brand { font-family: var(--head); font-weight: 800; color: var(--accent); font-size: 15px; }
#letterPage .page { max-width: 1100px; margin: 0 auto; padding: 36px max(16px, env(safe-area-inset-right)) 80px max(16px, env(safe-area-inset-left)); }
#letterPage .intro { display: flex; flex-direction: column; gap: 10px; margin-bottom: 26px; }
#letterPage .intro p { margin: 0; color: var(--muted); }
#letterPage .chip { display: inline-flex; align-self: flex-start; font-family: var(--head); font-size: 13px; font-weight: 700; color: var(--navy); background: var(--chip); border: 1px solid #D5DEEF; border-radius: 999px; padding: 4px 13px; }
#letterPage .card { background: #FFFFFF; border-radius: 16px; box-shadow: var(--shadow); padding: 28px; }
#letterPage .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
#letterPage .full { grid-column: 1 / -1; }
#letterPage .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
#letterPage .field > label, #letterPage .lbl { font-weight: 700; color: var(--navy); font-size: 14px; }
#letterPage .req { color: var(--accent); margin-left: 2px; }
#letterPage .help { font-size: 13px; color: var(--muted); margin: 0; }
#letterPage input[type=text], #letterPage input[type=tel], #letterPage input[type=email], #letterPage input[type=number], #letterPage input[type=date], #letterPage select, #letterPage textarea {
  font: inherit; color: var(--body); background: #FFFFFF; border: 1.5px solid var(--line); border-radius: 10px; padding: 11px 13px; width: 100%; min-width: 0;
}
#letterPage textarea { min-height: 150px; resize: vertical; line-height: 1.7; }
#letterPage input:focus, #letterPage select:focus, #letterPage textarea:focus { border-color: var(--accent); outline: none; box-shadow: 0 0 0 3px rgba(72,16,158,.12); }
#letterPage .bad input, #letterPage .bad select, #letterPage .bad textarea { border-color: var(--err); }
#letterPage .errmsg { color: var(--err); font-size: 13px; display: none; }
#letterPage .bad .errmsg { display: block; }
#letterPage .row { display: flex; gap: 8px; }
#letterPage .row > input { flex: 1; }
#letterPage .pills { display: flex; flex-wrap: wrap; gap: 8px; }
#letterPage .pills label { cursor: pointer; }
#letterPage .pills input { position: absolute; opacity: 0; pointer-events: none; }
#letterPage .pills span { display: inline-block; border: 1.5px solid var(--line); border-radius: 999px; padding: 8px 15px; font-size: 14px; background: #FFFFFF; color: var(--body); }
#letterPage .pills input:checked + span { background: var(--accent); border-color: var(--accent); color: #FFFFFF; font-weight: 700; }
#letterPage .pills input:focus-visible + span { outline: 3px solid var(--violet); outline-offset: 2px; }
#letterPage .agree { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
#letterPage .agree input { width: 20px; height: 20px; accent-color: var(--accent); flex-shrink: 0; margin-top: 2px; }
#letterPage .agree details { margin-top: 6px; font-size: 13px; color: var(--muted); }
#letterPage .btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-family: var(--head); font-weight: 700; font-size: 15px; padding: 13px 28px; border-radius: 999px; border: 2px solid var(--accent); background: var(--accent); color: #FFFFFF; text-decoration: none; cursor: pointer; }
#letterPage .btn:hover { background: var(--accent-dark); border-color: var(--accent-dark); }
#letterPage .btn.outline { background: #FFFFFF; color: var(--navy); border-color: var(--navy); }
#letterPage .btn.outline:hover { background: var(--pale); }
#letterPage .btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
#letterPage .btn:disabled { opacity: .45; cursor: not-allowed; }
#letterPage .actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
#letterPage .done { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 14px; padding: 48px 24px; }
#letterPage .done .ok { width: 64px; height: 64px; border-radius: 50%; background: var(--tint); color: var(--accent); font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
#letterPage .done p { margin: 0; color: var(--muted); max-width: 520px; }
#letterPage .timeline { list-style: none; padding: 0; margin: 10px 0 0; text-align: left; display: flex; flex-direction: column; gap: 10px; max-width: 460px; width: 100%; }
#letterPage .timeline li { display: flex; gap: 12px; align-items: flex-start; }
#letterPage .timeline b { width: 26px; height: 26px; border-radius: 50%; background: var(--accent); color: #FFFFFF; font-size: 13px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
#letterPage .hidden { display: none !important; }
@media (max-width: 720px) {
#letterPage .grid2 { grid-template-columns: 1fr; }
#letterPage .card { padding: 20px; }
}
#letterPage { width: 100vw; position: relative; left: 50%; margin-left: -50vw; overflow-x: clip; text-align: left; }
#letterPage *, #letterPage *::before, #letterPage *::after { box-sizing: border-box; }

/* 자사몰 안에서는 상단 메뉴가 있으니 페이지 자체 머리줄은 숨김 */
#letterPage > header.top { display: none !important; }
#letterPage > .in:has(> a.back) { display: none !important; }

/* 자사몰 공통 CSS의 * {font-family} 를 이 페이지 안에서만 무력화 → 부모 글꼴 상속 */
#letterPage * { font-family: inherit; }

/* 모바일 글자 크기 — 자사몰 다른 화면과 통일(섹션 제목 22 · 소제목 16 · 본문 14 · 작은 글씨 12) */
@media (max-width: 700px) {
  #letterPage { font-size: 14px; }
  #letterPage .brand-h1 { font-size: 34px !important; }
  #letterPage .tagline { font-size: 17px !important; }
  #letterPage h1:not(.brand-h1) { font-size: 23px !important; line-height: 1.3 !important; }
  #letterPage h2 { font-size: 22px !important; line-height: 1.3 !important; }
  #letterPage h3 { font-size: 16px !important; line-height: 1.35 !important; }
  #letterPage p, #letterPage li, #letterPage td, #letterPage th, #letterPage summary, #letterPage label, #letterPage input, #letterPage select, #letterPage textarea, #letterPage .lead, #letterPage .desc { font-size: 14px !important; }
  #letterPage .chip, #letterPage small, #letterPage .fine, #letterPage .mini span, #letterPage .help, #letterPage .errmsg, #letterPage figcaption { font-size: 12px !important; }
  #letterPage .btn { font-size: 14px !important; }
  #letterPage .price b { font-size: 18px !important; }
  #letterPage .tier .p { font-size: 20px !important; }
}
