/* 사주마을 신청 화면.
   2026-11-27 사용자 '메인 상단 디자인과 전체적인 UI 구성 … 세련되게'(당시 이름에 어울리게):
   짙은 남색 바탕 + 금색 가는 선, 제목은 명조체. 윗부분(이름표·큰 제목·단추) → 숫자 세 가지 → 담기는 내용 →
   단계 표시 → 사주 고르기(대표는 큰 칸, 한 분야는 작은 칸) → 입력 → 아래에 붙는 신청 줄 */
:root { --ink:#1a2133; --navy:#0f1830; --navy2:#1c2a4c; --gold:#c6a15b; --gold2:#e8d3a0; --gold3:#9a7a36; --paper:#f8f5ee; --card:#ffffff; --line:#e7e0cf; --muted:#6b6f7d; --red:#b3402a; }
* { box-sizing: border-box; }
[hidden] { display: none !important; } /* 숨긴 칸(윤달·보호자 동의)이 아래 규칙 때문에 다시 보이지 않게 */
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
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, h3 { font-family: "Noto Serif KR", "Nanum Myeongjo", serif; }

/* 윗부분: 그림 위에 이름표·큰 제목·단추 */
.hero { position: relative; margin: 0 -16px; min-height: 440px; overflow: hidden; background: var(--navy); display: flex; }
.hero img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 76% 30%; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(15,24,48,.55) 0%, rgba(15,24,48,.12) 32%, rgba(15,24,48,.78) 68%, var(--navy) 100%), linear-gradient(90deg, rgba(15,24,48,.72) 0%, rgba(15,24,48,0) 62%); }
.hero::after { content: ''; position: absolute; inset: 10px; z-index: 2; border: 1px solid rgba(232,211,160,.38); pointer-events: none; } /* 안쪽 금색 가는 테두리 */
.hero-in { position: relative; z-index: 3; width: 100%; display: flex; flex-direction: column; padding: 30px 26px 30px; color: #fff; }
.mark { display: flex; align-items: center; gap: 8px; margin: 0 0 auto; padding-bottom: 24px; color: var(--gold2); font: 700 15px/1 "Noto Serif KR", serif; letter-spacing: .28em; }
.over { margin: 0 0 10px; color: var(--gold); font-size: 12.5px; font-weight: 700; letter-spacing: .34em; }
.hero h1 { margin: 0; font-size: 38px; font-weight: 700; line-height: 1.24; letter-spacing: -.01em; color: #fff; }
.sub { margin: 14px 0 0; color: #d9dbe4; font-size: 15px; line-height: 1.6; }
.go { display: inline-block; align-self: flex-start; margin-top: 22px; padding: 13px 26px; border: 1px solid var(--gold); border-radius: 999px; background: linear-gradient(180deg, #e3c98f, #c39c50); color: #241c05; font-weight: 800; font-size: 16px; text-decoration: none; letter-spacing: .02em; }
.go:active { transform: translateY(1px); }

/* 숫자 세 가지: 윗부분과 이어지는 남색 띠 */
.stats { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); margin: 0 -16px; padding: 4px 16px 26px; background: var(--navy); color: #b9bfd0; font-size: 12.5px; line-height: 1.45; text-align: center; }
.stats li { padding: 0 6px; border-left: 1px solid rgba(232,211,160,.22); }
.stats li:first-child { border-left: 0; }
.stats b { display: block; margin-bottom: 6px; color: var(--gold2); font: 700 30px/1 "Noto Serif KR", serif; }
.stats i { margin-left: 2px; font: 600 13px/1 "Pretendard", system-ui, sans-serif; color: var(--gold); }

/* 담기는 내용 */
.eyebrow { margin: 0 0 6px; color: var(--gold3); font-size: 12.5px; font-weight: 700; letter-spacing: .3em; }
.inside { margin: 34px 0 30px; }
.inside h2 { margin: 0 0 16px; font-size: 24px; line-height: 1.3; color: var(--navy); }
.inside ul { list-style: none; display: grid; grid-template-columns: 1fr 1fr; gap: 1px; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 16px; background: var(--line); overflow: hidden; }
.inside li { padding: 16px 14px; background: var(--card); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.inside li svg { display: block; margin-bottom: 10px; color: var(--gold3); }
.inside li b { display: block; margin-bottom: 2px; color: var(--navy); font-size: 15.5px; }
.inside .hint { margin-top: 12px; }

/* 단계 표시 */
.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); margin: 0 0 6px; padding: 0; counter-reset: s; }
.steps li { position: relative; counter-increment: s; padding-top: 34px; font-size: 12.5px; color: #9a9ca6; text-align: center; }
.steps li::before { content: counter(s); position: absolute; left: 50%; top: 0; z-index: 1; width: 24px; height: 24px; margin-left: -12px; border: 1px solid #d5cdb8; border-radius: 50%; background: var(--paper); color: #9a9ca6; font: 700 12px/22px system-ui, sans-serif; }
.steps li::after { content: ''; position: absolute; left: -50%; right: 50%; top: 12px; height: 1px; background: #d5cdb8; }
.steps li:first-child::after { display: none; }
.steps li.on { color: var(--navy); font-weight: 700; }
.steps li.on::before { border-color: #b8934a; background: linear-gradient(135deg, #f6e8bf, #d2ad5e); color: #3d2c08; }
.steps li.on::after { background: var(--gold); }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px 18px; margin: 14px 0; box-shadow: 0 10px 30px rgba(15,24,48,.06); }
.card h2 { margin: 0 0 16px; font-size: 21px; display: flex; align-items: center; gap: 10px; color: var(--navy); }
.card h2 ~ h2 { margin-top: 28px; padding-top: 22px; border-top: 1px solid var(--line); }
.num { display: inline-flex; width: 28px; height: 28px; flex: none; align-items: center; justify-content: center; border: 1px solid #b8934a; border-radius: 50%; background: linear-gradient(135deg, #f6e8bf, #d2ad5e); color: #3d2c08; font: 700 13px/1 "Noto Serif KR", serif; }

/* 사주 고르기: 대표 사주는 한 줄에 하나. 왼쪽 남색 칸에 그 사주에 맞는 금색 선 그림, 분량은 글로 */
.products { display: grid; gap: 10px; }
.product { position: relative; display: grid; grid-template-columns: 56px 1fr auto; grid-template-areas: "ico name price" "ico note price" "ico meta price"; column-gap: 14px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 16px 16px 16px 14px; font: inherit; color: inherit; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
/* 2026-11-27 사용자 '아이콘을 블랙 위주가 아니라 골드 UI': 금빛 바탕에 짙은 금갈색 선 */
.product .ico { grid-area: ico; align-self: start; display: flex; align-items: center; justify-content: center; width: 56px; height: 56px; color: #5a4212; }
.product .ico img { display: block; width: 100%; height: 100%; filter: drop-shadow(0 3px 5px rgba(140,105,35,.35)); }
.product .ico.line { border-radius: 14px; background: linear-gradient(135deg, #fbf1d3 0%, #ecd391 38%, #d2ad5e 62%, #f3e2b0 100%); box-shadow: inset 0 0 0 1px #b8934a, inset 0 0 0 3.5px rgba(255,255,255,.55), 0 4px 10px rgba(168,132,58,.22); }
.product .ico svg { width: 30px; height: 30px; }
.product b { grid-area: name; font: 700 17.5px/1.35 "Noto Serif KR", serif; color: var(--navy); }
.product small { grid-area: note; color: var(--muted); font-size: 13.5px; line-height: 1.45; }
.product .meta { grid-area: meta; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 8px; font-size: 13px; }
.product .meta em { font-style: normal; font-weight: 700; color: var(--gold3); letter-spacing: .01em; }
.product .meta em::before { content: ''; display: inline-block; width: 5px; height: 5px; margin: 0 7px 2px 0; background: var(--gold); transform: rotate(45deg); }
.product a { color: var(--muted); font-weight: 500; text-decoration: none; border-bottom: 1px solid #cfc7b2; }
.product span { grid-area: price; font-weight: 800; font-size: 17px; color: var(--navy); 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.top { border-color: var(--gold); background: linear-gradient(180deg, #fffdf6, #fff); }
.product .best { position: absolute; top: -10px; right: 14px; padding: 2px 10px; border-radius: 999px; background: linear-gradient(135deg, #f3e2b0, #cfa957); color: #3d2c08; box-shadow: 0 0 0 1px #b8934a; font-size: 11.5px; font-weight: 700; letter-spacing: .04em; text-decoration: none; }
.product:hover { border-color: var(--gold); }
.product[aria-pressed=true] { border-color: #b8934a; background: #fffcf3; box-shadow: 0 0 0 1.5px #b8934a, 0 10px 24px rgba(168,132,58,.2); }
.product[aria-pressed=true]::after { content: '✓'; position: absolute; left: -7px; top: -7px; width: 22px; height: 22px; border-radius: 50%; background: var(--gold); color: #241c05; font: 700 13px/22px system-ui, sans-serif; text-align: center; }

/* 한 분야만 보는 사주: 두 줄로 나란히 놓는 작은 칸 */
.sub-h { display: flex; align-items: baseline; gap: 8px; margin: 24px 0 10px; font-size: 16px; color: var(--navy); }
.sub-h small { font: 500 13px/1 "Pretendard", system-ui, sans-serif; color: var(--muted); }
.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product.mini { grid-template-columns: 40px 1fr; grid-template-areas: "ico name" "note note" "price meta"; column-gap: 10px; row-gap: 2px; padding: 12px; }
.product.mini .ico { width: 40px; height: 40px; align-self: center; }
.product.mini .ico.line { border-radius: 10px; }
.product.mini .ico svg { width: 21px; height: 21px; }
.product.mini b { font-size: 15px; }
.product.mini small { margin-top: 6px; font-size: 12.5px; }
.product.mini span { margin-top: 8px; text-align: left; font-size: 15.5px; }
.product.mini .meta { margin-top: 8px; justify-content: flex-end; font-size: 12px; }

label { display: block; margin: 14px 0 0; font-weight: 600; font-size: 15px; color: #2a3145; }
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: 1px solid #d8d1bd; border-radius: 12px; background: #fff; color: inherit; }
input:focus { outline: none; border-color: var(--navy); box-shadow: 0 0 0 3px rgba(198,161,91,.28); }
input::placeholder { color: #b6b1a3; }
.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: 1px solid var(--line); border-radius: 999px; background: #f3efe4; }
.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: linear-gradient(135deg, #f3e2b0, #cfa957); color: #3d2c08; box-shadow: 0 0 0 1px #b8934a; }
.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: 18px; padding: 17px; border: 1px solid var(--gold); border-radius: 14px; background: linear-gradient(180deg, #e3c98f, #c39c50); color: #241c05; font: 800 18px/1.2 inherit; letter-spacing: .01em; cursor: pointer; box-shadow: 0 10px 22px rgba(198,161,91,.3); }
.cta:active { transform: translateY(1px); box-shadow: none; }
.cta:disabled { opacity: .6; }
.small { padding: 8px 14px; border: 1px solid #d8d1bd; 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: 16px; border: 1px solid var(--line); border-radius: 14px; background: #faf8f2; }
.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: 3px 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: 3px; }
.card.notice h2 { font-size: 17px; margin-bottom: 6px; }
.card.notice p { margin: 6px 0; }
#again { margin-top: 12px; }

/* 아래에 붙는 신청 줄. 본문의 신청 단추가 보이면 내려가 숨는다(off) */
.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)); border-top: 1px solid rgba(232,211,160,.35); background: rgba(15,24,48,.97); color: #fff; box-shadow: 0 -8px 24px rgba(0,0,0,.2); transition: transform .2s; }
.bar.off { transform: translateY(110%); }
.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: var(--gold); letter-spacing: .08em; }
.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; }

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

@media (max-width: 359px) { .hero h1 { font-size: 32px; } .fields { grid-template-columns: 1fr; } .product { grid-template-columns: 48px 1fr auto; column-gap: 10px; } .product .ico { width: 48px; height: 48px; } }
/* 넓은 화면: 가운데 한 단으로 두되 윗부분은 둥근 칸으로 */
@media (min-width: 592px) {
  .wrap { padding-top: 20px; }
  .hero { margin: 0; border-radius: 22px 22px 0 0; min-height: 470px; }
  .hero::after { border-radius: 14px 14px 0 0; }
  .stats { margin: 0; border-radius: 0 0 22px 22px; }
  .bar { left: 50%; right: auto; width: 560px; transform: translateX(-50%); border-radius: 16px 16px 0 0; }
  .bar.off { transform: translate(-50%, 110%); }
}
.opt { margin-left: 4px; padding: 1px 7px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: 11.5px; font-weight: 500; }
