/* 사주골드 신청 화면(2026-11-26 사용자 'UI 디자인 개선해 줘'): 그림의 남색·금빛에 맞춘 색, 제목은 명조체,
   그림 위 이름 → 세 가지 장점 → 단계 표시 → 사주 고르기 → 입력 → 아래에 붙는 신청 줄 */
:root { --ink:#1b2233; --navy:#16213a; --navy2:#22304f; --gold:#c9a24a; --gold2:#e9cf8a; --paper:#f7f4ec; --card:#fffdf8; --line:#e2dccb; --muted:#6c7080; --red:#b3402a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 숨긴 칸(윤달·보호자 동의)이 아래 규칙 때문에 다시 보이지 않게 */
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 "Pretendard", "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif; word-break: keep-all; }
.wrap { max-width: 560px; margin: 0 auto; padding: 0 16px 120px; }
h1, h2 { font-family: "Noto Serif KR", "Nanum Myeongjo", serif; }

/* 그림 위에 이름과 소개 */
.hero { position: relative; margin: 0 -16px; overflow: hidden; background: var(--navy); }
.hero img { display: block; width: 100%; height: auto; min-height: 230px; object-fit: cover; object-position: 78% center; }
.hero::after { content: ''; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(12,17,30,.88) 0%, rgba(12,17,30,.62) 38%, rgba(12,17,30,0) 68%), linear-gradient(0deg, rgba(12,17,30,.55), rgba(12,17,30,0) 45%); }
.hero-text { position: absolute; left: 20px; bottom: 20px; z-index: 1; max-width: 62%; color: #fff; }
.hero-text h1 { margin: 0; font-size: 34px; line-height: 1.15; letter-spacing: .06em; color: var(--gold2); }
.hero-text p { margin: 8px 0 0; font-size: 15px; line-height: 1.5; color: #f1ecdf; }
@media (min-width: 592px) { .hero { margin: 16px 0 0; border-radius: 20px; } }

/* 세 가지 장점 */
.points { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 14px 0 0; padding: 0; }
.points li { padding: 10px 6px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); text-align: center; font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.points b { display: block; margin-bottom: 2px; font-size: 14px; color: var(--navy); }
.points svg { display: block; margin: 0 auto 6px; color: var(--gold); }

/* 단계 표시 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; margin: 16px 0 4px; padding: 0; counter-reset: s; }
.steps li { counter-increment: s; padding-top: 10px; border-top: 4px solid var(--line); font-size: 12.5px; color: var(--muted); text-align: center; }
.steps li::before { content: counter(s) '. '; }
.steps li.on { border-top-color: var(--gold); color: var(--navy); font-weight: 700; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 20px 16px; margin: 14px 0; box-shadow: 0 1px 2px rgba(22,33,58,.04), 0 8px 24px rgba(22,33,58,.05); }
.card h2 { margin: 0 0 14px; font-size: 20px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.card h2 ~ h2 { margin-top: 26px; padding-top: 20px; border-top: 1px dashed var(--line); }
.num { display: inline-flex; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; border-radius: 50%; background: var(--navy); color: var(--gold2); font: 700 14px/1 system-ui, sans-serif; }

/* 사주 고르기: 한 줄에 하나, 왼쪽에 장 수 */
.products { display: grid; gap: 10px; }
.product { position: relative; display: grid; grid-template-columns: 64px 1fr auto; grid-template-areas: "pages name price" "pages note price" "pages sample price"; column-gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px 12px 12px; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.product .pages { grid-area: pages; align-self: stretch; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; background: var(--navy); color: #dfe4f0; font-style: normal; font-size: 12px; font-weight: 700; line-height: 1.2; }
.product .pages i { font-style: normal; font: 700 24px/1.1 "Noto Serif KR", serif; color: var(--gold2); }
.product b { grid-area: name; font-size: 16.5px; line-height: 1.35; }
.product small { grid-area: note; color: var(--muted); font-size: 13.5px; line-height: 1.4; }
.product a { grid-area: sample; justify-self: start; margin-top: 4px; font-size: 13.5px; color: var(--navy2); text-underline-offset: 3px; }
.product span { grid-area: price; font-weight: 800; font-size: 17px; color: var(--red); white-space: nowrap; text-align: right; }
.product span s { display: block; font-weight: 500; font-size: 13px; color: #9a9da8; }
.sale { margin-left: auto; padding: 3px 10px; border-radius: 999px; background: var(--red); color: #fff; font: 700 13px/1.4 system-ui, sans-serif; font-style: normal; }
.product .best { position: absolute; top: -9px; right: 12px; padding: 2px 9px; border-radius: 999px; background: var(--gold); color: #2a2206; font-size: 12px; font-weight: 700; text-decoration: none; }
.product:hover { border-color: #c9c1a8; }
.product[aria-pressed=true] { border-color: var(--navy); background: #f3f5fa; box-shadow: 0 0 0 1.5px var(--navy) inset; }
.product[aria-pressed=true]::after { content: '✓'; position: absolute; left: 6px; top: 6px; width: 20px; height: 20px; border-radius: 50%; background: var(--gold); color: #2a2206; font: 700 13px/20px system-ui, sans-serif; text-align: center; }

label { display: block; margin: 12px 0 0; font-weight: 600; font-size: 15px; }
input[type=number], input[type=tel], input[type=email], input:not([type]) { display: block; width: 100%; margin-top: 6px; padding: 13px 12px; font: inherit; font-size: 17px; border: 1.5px solid #d3ccb8; border-radius: 12px; background: #fff; color: inherit; }
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(34,48,79,.14); }
input::placeholder { color: #b0ab9c; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; align-items: end; }
.seg { display: inline-flex; margin: 4px 8px 4px 0; padding: 3px; border-radius: 999px; background: #ece7d8; }
.seg label { margin: 0; }
.seg input { position: absolute; opacity: 0; }
.seg span { display: block; min-width: 64px; padding: 9px 18px; border-radius: 999px; text-align: center; cursor: pointer; color: var(--muted); font-weight: 600; }
.seg input:checked + span { background: var(--navy); color: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.check input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--navy); }
.row3 .check { align-self: center; margin-top: 26px; }
.hint { margin: 8px 0 0; color: var(--muted); font-size: 14px; }
.must { color: var(--red); font-weight: 700; }
.error { margin: 14px 0 0; padding: 12px 14px; background: #fdecea; border: 1px solid #e6a79d; border-radius: 12px; color: #8a2a1c; font-weight: 600; }
.cta { display: block; width: 100%; margin-top: 16px; padding: 16px; border: 0; border-radius: 14px; background: linear-gradient(#ecd08a, #cfa23c); color: #2a2206; font: 800 18px/1.2 inherit; cursor: pointer; box-shadow: 0 2px 0 #a8802a, 0 8px 18px rgba(201,162,74,.28); }
.cta:active { transform: translateY(1px); box-shadow: 0 1px 0 #a8802a; }
.cta:disabled { opacity: .6; }
.small { padding: 8px 14px; border: 1px solid #d3ccb8; border-radius: 999px; background: #fff; color: inherit; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; }

/* 입금 안내 */
.deposit dl { display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; margin: 0 0 12px; padding: 14px; border-radius: 14px; background: #f3f5fa; }
.deposit dt { color: var(--muted); font-size: 14px; } .deposit dd { margin: 0; font-weight: 700; }
#dep-bank { display: block; color: var(--red); font-size: 18px; }
#copy { margin-top: 6px; }
.code { letter-spacing: .14em; color: var(--red); font-size: 18px; }
.notice { margin: 12px 0; padding: 12px 14px; border: 1px solid var(--gold2); border-left: 4px solid var(--gold); border-radius: 10px; background: #fffaf0; }
.soon { display: block; margin-top: 4px; font-size: 20px; color: var(--red); }
.card.notice { border-left-width: 4px; }
.card.notice h2 { font-size: 17px; margin-bottom: 6px; }
.card.notice p { margin: 6px 0; }
#again { margin-top: 12px; }

/* 아래에 붙는 신청 줄 */
.bar { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; display: flex; align-items: center; gap: 12px; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: rgba(22,33,58,.97); color: #fff; box-shadow: 0 -6px 20px rgba(0,0,0,.18); }
.bar[hidden] { display: none; }
.bar p { flex: 1; min-width: 0; margin: 0; line-height: 1.3; }
.bar small { display: block; font-size: 12px; color: #aab3c8; }
.bar b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 15px; }
.bar .cta { width: auto; margin: 0; padding: 13px 18px; font-size: 16px; white-space: nowrap; box-shadow: none; }
@media (min-width: 592px) { .bar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 16px 16px 0 0; } }

.foot { margin-top: 26px; padding-top: 16px; border-top: 1px solid var(--line); color: #8a8d99; font-size: 13px; }
.foot p { margin: 6px 0; }
