/* 콕사주 v2 「하늘 명부청」 — 남색 · 백자 · 인주 빨강 · 금(소량) */
:root {
  --navy: #1C2A44;
  --navy-2: #22324F;
  --navy-3: #2B3D60;
  --paper: #ECEEE9;
  --paper-2: #F5F6F2;
  --ink: #1D2331;
  --ink-soft: #4C5466;
  --ink-faint: #858C99;
  --seal: #C23B33;
  --seal-dark: #A72F28;
  --gold: #B8954A;
  --gold-soft: rgba(184, 149, 74, 0.45);
  --sky: #8FB7E0;
  --line: #D6D9D1;
  --radius: 6px;
  --serif: "Hahmlet", "AppleMyungjo", "Nanum Myeongjo", "Noto Serif KR", serif;
  --sans: Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  /* 한지 질감: 아주 옅은 섬유 노이즈 */
  --hanji: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.35 0 0 0 0 0.33 0 0 0 0 0.28 0 0 0 0.07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--navy); }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: radial-gradient(120% 60% at 50% 0%, var(--navy-3) 0%, var(--navy) 60%) no-repeat, var(--navy);
  min-height: 100vh;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
a { color: var(--seal); }
h1, h2, h3, .serif { font-family: var(--serif); letter-spacing: -0.01em; }

/* 상단: AI 캐릭터 고지(모든 화면) + 로고 */
.ai-strip { background: #121C30; color: #C9CFDA; font-size: 11.5px; text-align: center; padding: 6px 12px; letter-spacing: 0.01em; }
.ai-strip b { color: #E7D3A6; font-weight: 700; }
.masthead { background: var(--paper) var(--hanji); border-bottom: 1px solid var(--gold-soft); }
.masthead .in { max-width: 520px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; justify-content: space-between; }
.masthead img { height: 34px; width: auto; display: block; }
.masthead nav a { font-size: 13px; color: var(--navy); text-decoration: none; font-weight: 700; border: 1px solid var(--navy); border-radius: 999px; padding: 5px 12px; }

.wrap { max-width: 520px; margin: 0 auto; padding: 18px 16px 40px; }

/* 히어로(남색 바탕) */
.hero { color: #EEF0F4; position: relative; padding: 4px 0 6px; }
.hero .who { display: grid; grid-template-columns: 132px 1fr; gap: 14px; align-items: end; }
.hero .portrait { width: 132px; aspect-ratio: 132 / 176; object-fit: cover; object-position: 50% 8%; border-radius: 66px 66px 8px 8px; border: 1px solid var(--gold); box-shadow: 0 0 0 4px rgba(184, 149, 74, 0.15); display: block; background: var(--navy-2); }
.bubble { position: relative; background: var(--paper) var(--hanji); color: var(--navy); border-radius: 14px; padding: 10px 14px; font-family: var(--serif); font-weight: 600; font-size: 16px; margin-bottom: 16px; }
.bubble::after { content: ""; position: absolute; left: -7px; bottom: 16px; border: 8px solid transparent; border-right-color: var(--paper); border-left: 0; }
.bubble small { display: block; font-family: var(--sans); font-weight: 500; font-size: 11.5px; color: var(--ink-soft); }
.hero h1 { font-size: 27px; line-height: 1.38; font-weight: 900; margin: 18px 0 8px; color: #F4F1E8; }
.hero h1 em { font-style: normal; color: #E7C987; }
.hero .lead { color: #BFC6D4; font-size: 14.5px; margin: 0 0 18px; }
.kicker { font-family: var(--serif); color: var(--gold); font-size: 13px; letter-spacing: 0.12em; }

/* 명부 페이지(백자 한지 + 가는 금선) */
.panel, .page {
  background: var(--paper) var(--hanji);
  border-radius: var(--radius);
  padding: 20px 16px;
  margin: 0 0 14px;
  position: relative;
  box-shadow: 0 10px 30px rgba(5, 10, 25, 0.35);
}
.panel::before, .page::before { content: ""; position: absolute; inset: 6px; border: 1px solid var(--gold-soft); border-radius: 3px; pointer-events: none; }
.panel > *, .page > * { position: relative; }
.panel h2, .page h2 { font-size: 19px; font-weight: 900; color: var(--navy); margin: 0 0 10px; }
.panel h2 .sub { font-family: var(--sans); font-weight: 500; font-size: 13px; color: var(--ink-faint); }
.lead { color: var(--ink-soft); margin: 0 0 14px; font-size: 15px; }
.fine { font-size: 13px; color: var(--ink-soft); }
.fine p { margin: 0 0 8px; }

/* 폼 */
.field { margin-bottom: 14px; }
.field > label, .field > .label, .sec-wrap .label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; color: var(--navy); }
.field .hint, .hint { font-size: 12.5px; color: var(--ink-faint); margin-top: 4px; font-weight: 400; }
input[type=text], input[type=tel], input[type=email], input[type=time], input[type=number], select {
  width: 100%; font: inherit; font-size: 16px; color: var(--ink);
  padding: 12px; border: 1px solid #C9CDC4; border-radius: 4px; background: #FBFBF8;
  appearance: none; -webkit-appearance: none; min-height: 48px;
}
select { background-image: linear-gradient(45deg, transparent 50%, var(--ink-faint) 50%), linear-gradient(135deg, var(--ink-faint) 50%, transparent 50%);
  background-position: calc(100% - 18px) 21px, calc(100% - 13px) 21px; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 30px; }
input:focus, select:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(28, 42, 68, 0.15); }
.row { display: flex; gap: 8px; }
.row > * { flex: 1; min-width: 0; }
.row .w-year { flex: 1.3; }
.seg { display: flex; background: #DFE2DA; border-radius: 4px; padding: 3px; gap: 3px; }
.seg label { flex: 1; text-align: center; padding: 10px 0; border-radius: 3px; font-weight: 600; font-size: 15px; color: var(--ink-soft); cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label:has(input:checked) { background: var(--navy); color: #F2EFE6; }
.check { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; color: var(--ink-soft); margin-top: 8px; cursor: pointer; }
.field > label.check { display: flex; font-weight: 500; font-size: 14px; margin-bottom: 0; color: var(--ink-soft); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--navy); flex: none; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.error { color: var(--seal); font-size: 13.5px; margin: 6px 0 0; }

/* 버튼 */
.btn { display: block; width: 100%; border: 0; border-radius: 4px; font: inherit; font-weight: 700; font-size: 17px;
  padding: 16px; text-align: center; text-decoration: none; cursor: pointer; letter-spacing: 0.01em; }
.btn-cta { background: var(--seal); color: #FFF8F2; box-shadow: 0 6px 18px rgba(194, 59, 51, 0.35); font-family: var(--serif); font-weight: 900; }
.btn-cta:active { background: var(--seal-dark); }
.btn-line { background: transparent; color: var(--navy); border: 1px solid var(--navy); }
.btn-blue, .btn-navy { background: var(--navy); color: #F2EFE6; }
.btn[disabled], .btn.disabled { background: #A9AEB6; color: #F4F4F4; box-shadow: none; pointer-events: none; }
.btn small { display: block; font-family: var(--sans); font-weight: 500; font-size: 12.5px; opacity: 0.85; }
.btns { display: grid; gap: 10px; }
.btns.two { grid-template-columns: 1fr 1fr; }
.privacy-note { font-size: 12.5px; color: var(--ink-soft); text-align: center; margin: 10px 0 0; }

/* 결과 */
.result-head { color: #EEF0F4; text-align: center; margin: 2px 0 12px; }
.result-head .kicker { display: block; margin-bottom: 2px; }
.result-head h1 { font-size: 21px; font-weight: 900; margin: 0; color: #F4F1E8; }
.card-preview { display: block; width: auto; max-width: 100%; height: min(587px, calc(100svh - 360px)); min-height: 300px; margin: 0 auto 12px; border-radius: 4px; box-shadow: 0 14px 36px rgba(0, 0, 0, 0.45); aspect-ratio: 9 / 16; background: var(--navy-2); }
.has-notice .card-preview { height: min(587px, calc(100svh - 430px)); }
.save-row .btn { padding: 13px; font-size: 15.5px; }
.save-row .btn-line { color: #EEF0F4; border-color: rgba(238, 240, 244, 0.6); }
.nick-check { justify-content: center; color: #C3C9D6 !important; margin-bottom: 16px; }
.notice { background: #F5EBD3; color: #6B4E12; border-radius: 4px; padding: 9px 12px; font-size: 13px; margin: 0 0 10px; border-left: 3px solid var(--gold); }
.says { display: grid; grid-template-columns: 56px 1fr; gap: 12px; align-items: start; }
.says img { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: 50% 15%; border: 1px solid var(--gold); }
.says .name { font-family: var(--serif); font-weight: 900; color: var(--navy); font-size: 14px; }
.says .name span { font-family: var(--sans); font-weight: 500; color: var(--ink-faint); font-size: 12px; margin-left: 4px; }
.lines p { margin: 0 0 6px; padding-left: 12px; position: relative; }
.lines p::before { content: ""; position: absolute; left: 0; top: 0.72em; width: 5px; height: 5px; background: var(--seal); border-radius: 1px; }
.myeong-line { font-family: var(--serif); font-weight: 900; font-size: 22px; line-height: 1.4; color: var(--navy); margin: 0 0 8px; }
.sal-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sal-list li { border: 1px solid var(--line); border-radius: 4px; padding: 10px 12px; background: rgba(255, 255, 255, 0.45); }
.sal-list .nm { font-family: var(--serif); font-weight: 900; color: var(--seal); }
.sal-list .sh { font-weight: 700; color: var(--navy); margin-left: 6px; }
.sal-list .wh { display: block; font-size: 12px; color: var(--ink-faint); }
.basis { font-size: 12px; color: var(--ink-faint); margin: 10px 0 0; }
.on-navy .basis, .basis.on-navy { color: #9AA3B5; }

.months { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.month { background: rgba(255, 255, 255, 0.5); border: 1px solid var(--line); border-radius: 3px; padding: 9px 6px; text-align: center; min-height: 98px; position: relative; overflow: hidden; }
.month .m { font-family: var(--serif); font-size: 13px; font-weight: 900; color: var(--navy); }
.month .mk { display: inline-grid; place-items: center; width: 26px; height: 26px; margin: 4px auto 2px; border: 1.5px solid var(--seal); color: var(--seal); font-family: var(--serif); font-weight: 900; font-size: 13px; border-radius: 3px; }
.month .l { font-size: 12px; line-height: 1.35; color: var(--ink); }
.month.open { background: #FFFDF6; border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold-soft); }
.month.locked { background: #1E2535; border-color: #1E2535; color: #59627A; }
.month.locked .m { color: #7E879C; }
.month.locked .ink { position: absolute; inset: 30px 10px 12px; background: radial-gradient(60% 55% at 50% 50%, #0E121B 0%, #161C2A 70%, transparent 100%); filter: blur(2px); }
.month.locked .q { position: relative; font-family: var(--serif); color: #8E7448; font-size: 12px; margin-top: 30px; letter-spacing: 0.2em; }

.seo-cut { background: var(--navy-2); border: 1px solid rgba(184, 149, 74, 0.35); border-radius: var(--radius); padding: 14px; margin: 4px 0 14px; color: #E6E8EE; }
.seo-cut .says .name { color: #F0E2BF; }
.seo-cut .says p { margin: 2px 0 0; font-family: var(--serif); font-weight: 600; font-size: 16px; }
.seo-cut .btns { margin-top: 12px; }
.seo-cut .btn-line { color: #EEF0F4; border-color: rgba(238, 240, 244, 0.55); }

.price-cta { position: sticky; bottom: 0; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: linear-gradient(180deg, rgba(28, 42, 68, 0), var(--navy) 35%); z-index: 5; }
#result .price-cta { margin-top: 4px; }

/* 상품 */
.list { padding-left: 0; list-style: none; margin: 0; }
.list li { padding: 9px 0 9px 22px; position: relative; border-bottom: 1px dashed #CBCFC5; }
.list li:last-child { border-bottom: 0; }
.list li::before { content: ""; position: absolute; left: 3px; top: 17px; width: 8px; height: 8px; background: var(--seal); transform: rotate(45deg); }
.price { font-family: var(--serif); font-size: 30px; font-weight: 900; color: #F4F1E8; margin: 4px 0 14px; }
.panel .price { color: var(--navy); }
.samples { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.samples figure { margin: 0; }
.samples img { width: 100%; border-radius: 3px; border: 1px solid var(--line); background: #fff; display: block; }
.samples figcaption { font-size: 12px; color: var(--ink-faint); text-align: center; margin-top: 4px; }
.product-hero { display: grid; grid-template-columns: 1fr 104px; gap: 12px; align-items: end; color: #EEF0F4; }
.product-hero img { width: 104px; aspect-ratio: 104 / 140; object-fit: cover; object-position: 50% 10%; border-radius: 52px 52px 6px 6px; border: 1px solid var(--gold); }
.product-hero h1 { font-size: 26px; font-weight: 900; line-height: 1.35; margin: 6px 0 4px; color: #F4F1E8; }
.product-hero p { margin: 0; color: #BFC6D4; font-size: 14px; }

/* 주문·결제 */
.person { border: 1px solid #CBCFC5; border-radius: 4px; padding: 14px 12px 4px; margin-bottom: 12px; background: rgba(255, 255, 255, 0.35); }
.person h3 { margin: 0 0 10px; font-size: 16px; color: var(--navy); }
.agree { background: rgba(255, 255, 255, 0.5); border: 1px solid var(--line); border-radius: 4px; padding: 12px; font-size: 13.5px; margin-bottom: 10px; }
.agree details summary { cursor: pointer; color: var(--ink-soft); font-size: 13px; margin-top: 4px; }
.agree table { width: 100%; border-collapse: collapse; font-size: 12.5px; margin-top: 6px; }
.agree td, .agree th { border: 1px solid var(--line); padding: 5px 6px; text-align: left; vertical-align: top; }
.order-id { font-family: var(--serif); font-size: 26px; font-weight: 900; letter-spacing: 0.05em; text-align: center; color: var(--navy); background: #FFFDF6; border: 1px solid var(--gold); border-radius: 3px; padding: 12px; margin: 6px 0 4px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; }
.steps li { counter-increment: s; position: relative; padding: 4px 0 10px 34px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 3px; width: 24px; height: 24px; border-radius: 3px; background: var(--navy); color: #F2EFE6; font-size: 13px; font-weight: 700; display: grid; place-items: center; font-family: var(--serif); }
.copy { background: none; border: 1px solid #C2C6BD; border-radius: 3px; padding: 4px 10px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink-soft); }
.refund-short { font-size: 12px; line-height: 1.5; color: var(--ink-soft); margin: 8px 2px 0; }
.refund-short b { color: var(--navy); margin-right: 4px; }
.refund-short .how { display: block; margin-top: 2px; }
.price-cta .refund-short { background: var(--paper) var(--hanji); border-radius: 3px; padding: 6px 8px; margin-top: 6px; }
.memo-must { background: #F5EBD3; color: #6B4E12; border-radius: 3px; padding: 10px 12px; font-size: 13.5px; margin: 0 0 10px; border-left: 3px solid var(--gold); }
.page-title { color: #F4F1E8; font-size: 24px; font-weight: 900; margin: 4px 0 6px; }
.page-lead { color: #BFC6D4; font-size: 14px; margin: 0 0 14px; }

/* 문서 */
.doc h1 { font-size: 24px; color: #F4F1E8; }
.doc h2 { font-size: 17px; margin-top: 22px; }
.doc p, .doc li { font-size: 14.5px; color: var(--ink-soft); }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; }
.doc th, .doc td { border-bottom: 1px solid var(--line); padding: 9px 6px; text-align: left; vertical-align: top; }
.doc th { width: 38%; color: var(--navy); font-weight: 700; }
.blank { color: var(--seal); font-weight: 600; }

.foot { max-width: 520px; margin: 0 auto; padding: 22px 16px 40px; font-size: 12px; color: #8F98AB; }
.foot nav { margin-bottom: 8px; }
.foot a { color: #C9CFDA; text-decoration: none; }
.foot p { margin: 0 0 6px; }
.foot .ai { color: #E7D3A6; }
.hidden { display: none !important; }

@media (min-width: 760px) {
  .wrap { padding-top: 28px; }
  .hero h1 { font-size: 32px; }
  .hero .who { grid-template-columns: 170px 1fr; }
  .hero .portrait { width: 170px; border-radius: 85px 85px 8px 8px; }
}
