/* 운세 신청 사이트 공통 — 50대 이상 모바일 우선. 본문 19px, 버튼 60px 이상, 명도 대비 7:1 근처. */
:root {
  /* 브랜드 색 기본값(복주머니). 브랜드별 값은 /assets/theme/<브랜드>.css 가 덮어쓴다. */
  --primary: #b4121b;
  --primary-dark: #8c0d14;
  --primary-soft: #fbe9e4;
  --accent: #c9962b;
  --accent-light: #f6dc95;
  --bg: #fff8ec;
  --paper: #ffffff;
  --ink: #241510;
  --muted: #55433a;
  --line: #7a6253;
  --line-soft: #e6d6c3;
  --error: #b00020;
  --focus: #1756b8;
  --radius: 14px;
  --serif: 'Gowun Batang', 'Nanum Myeongjo', 'AppleMyungjo', serif;
  color-scheme: light;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', 'Malgun Gothic', sans-serif;
  font-size: 19px;
  line-height: 1.65;
  word-break: keep-all;
  overflow-wrap: anywhere;
  padding-bottom: 96px;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary-dark); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

[hidden] { display: none !important; }

/* 상단 */
.topbar {
  position: sticky; top: 0; z-index: 10;
  background: var(--primary);
  border-bottom: 3px solid var(--accent);
  padding: 10px 16px;
}
.logo { display: inline-flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; font-weight: 800; font-size: 21px; }
.logo img { border-radius: 50%; background: #fff; }

main { max-width: 560px; margin: 0 auto; }
main:focus { outline: none; }

/* 첫 화면 */
.hero {
  text-align: center;
  padding: 22px 16px 28px;
  background: radial-gradient(circle at 50% 30%, #fffdf6 0%, var(--bg) 70%);
}
.hero-kicker {
  display: inline-block; margin: 0 0 8px; padding: 4px 16px;
  border: 2px solid var(--accent); border-radius: 999px;
  color: var(--primary-dark); font-weight: 800; font-size: 18px; background: #fff;
}
.hero h1 { font-family: var(--serif); font-size: 32px; line-height: 1.35; margin: 8px 0 12px; color: var(--primary-dark); }
.hero-img { width: 200px; border-radius: 50%; border: 4px solid var(--accent-light); box-shadow: 0 8px 24px rgba(140, 13, 20, .18); }
.hero-lead { font-size: 20px; margin: 16px 0; }
.price-box { margin: 8px auto 20px; padding: 14px 16px; background: #fff; border: 2px solid var(--accent); border-radius: var(--radius); max-width: 360px; }
.sale-label { display: inline-block; background: var(--primary); color: #fff; font-weight: 800; padding: 2px 12px; border-radius: 8px; font-size: 17px; }
.price { margin: 6px 0 0; font-size: 20px; }
.price del { color: var(--muted); }
.price strong { font-size: 34px; color: var(--primary-dark); margin-left: 6px; }
.hero-note { font-size: 17px; color: var(--muted); margin: 14px 0 0; }

/* 공통 블록 */
.block { padding: 32px 16px; border-top: 1px solid var(--line-soft); }
.block h2 { font-family: var(--serif); font-size: 27px; color: var(--primary-dark); margin: 0 0 16px; }

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 14px; align-items: flex-start; background: #fff; border-radius: var(--radius); padding: 16px; border: 1px solid var(--line-soft); }
.step-no { flex: none; width: 40px; height: 40px; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 21px; }
.steps strong, .contents strong { display: block; font-size: 20px; }
.steps span:not(.step-no), .contents span:not(.ci) { display: block; color: var(--muted); font-size: 17px; }

.contents { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.contents li { display: flex; gap: 14px; align-items: center; background: #fff; border-radius: var(--radius); padding: 14px 16px; border-left: 5px solid var(--accent); }
.ci { font-size: 30px; flex: none; }

.fun-note { margin: 18px 0 0; padding: 12px 14px; background: #fff; border: 1px dashed var(--line); border-radius: 10px; font-size: 17px; color: var(--muted); }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 64px; padding: 12px 20px;
  border-radius: var(--radius); border: 2px solid transparent;
  font: inherit; font-size: 22px; font-weight: 800; text-decoration: none; cursor: pointer;
  touch-action: manipulation;
}
.btn-block { display: flex; width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 0 var(--primary-dark); }
.btn-primary:active { transform: translateY(2px); box-shadow: 0 2px 0 var(--primary-dark); }
.btn-primary[disabled] { background: #8a6d65; box-shadow: none; cursor: wait; }
.btn-outline { background: #fff; color: var(--primary-dark); border-color: var(--primary); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); margin-top: 16px; }

/* 신청서 */
.apply { background: #fff; }
.apply-sub { margin: -8px 0 20px; color: var(--muted); }
.field { border: 0; margin: 0 0 28px; padding: 0; min-width: 0; }
.label { display: block; font-weight: 800; font-size: 21px; margin-bottom: 10px; padding: 0; }
.hint { color: var(--muted); font-size: 17px; margin: 8px 0 0; }
.input {
  width: 100%; min-height: 62px; padding: 12px 16px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  font: inherit; font-size: 23px; color: var(--ink);
}
.input::placeholder { color: #8f7c70; }
.input:focus { border-color: var(--focus); outline: 3px solid rgba(23, 86, 184, .25); outline-offset: 0; }
.field.has-error .input { border-color: var(--error); }
.field-error { color: var(--error); font-weight: 700; margin: 8px 0 0; font-size: 18px; }
.field-error:empty { display: none; }

.choices { display: grid; gap: 10px; }
.cols-2 { grid-template-columns: 1fr 1fr; }
.cols-3 { grid-template-columns: repeat(3, 1fr); }
.stack { grid-template-columns: 1fr; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.choice span {
  display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center;
  min-height: 62px; padding: 8px 6px;
  border: 2px solid var(--line); border-radius: 12px; background: #fff;
  font-size: 21px; font-weight: 700; line-height: 1.25;
}
.choice small { display: block; font-size: 16px; font-weight: 600; color: var(--muted); }
.choice-wide span { align-items: flex-start; text-align: left; padding: 12px 16px 12px 52px; position: relative; }
.choice-wide span::before {
  content: ''; position: absolute; left: 16px; top: 50%; width: 24px; height: 24px; margin-top: -12px;
  border: 2px solid var(--line); border-radius: 50%; background: #fff;
}
.choice input:checked + span { background: var(--primary); border-color: var(--primary-dark); color: #fff; }
.choice input:checked + span small { color: #fff3e6; }
.choice input:checked + span::after { content: '✓'; position: absolute; top: 4px; right: 10px; font-size: 18px; }
.choice-wide input:checked + span::before { border-color: #fff; background: radial-gradient(circle, #fff 0 45%, transparent 50%); }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.field.has-error .choice span { border-color: var(--error); }

.date-row { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 8px; }
.date-part { display: flex; align-items: center; gap: 4px; }
.date-part .input { text-align: center; padding: 12px 4px; min-width: 0; }
.date-part span { flex: none; font-size: 20px; font-weight: 700; }
.birth-echo { margin: 8px 0 0; font-weight: 700; color: var(--primary-dark); min-height: 0; }
.birth-echo:empty { display: none; }

.time-picker { margin-top: 14px; padding: 14px; border-radius: 12px; background: var(--bg); }
.hour-grid { grid-template-columns: repeat(4, 1fr); margin-top: 12px; }
.hour-grid .choice span { font-size: 19px; min-height: 56px; }
.hour-grid .choice small { font-size: 14px; }
.hour-grid .choice input:checked + span::after { content: none; }
.minute-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.minute-row .input { width: 96px; text-align: center; flex: none; }
.minute-row span { font-weight: 700; }
.minute-row small { font-weight: 500; color: var(--muted); font-size: 16px; }

.agree { background: var(--bg); border-radius: var(--radius); padding: 16px; }
.check { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-weight: 700; }
.check input { flex: none; width: 30px; height: 30px; margin: 2px 0 0; accent-color: var(--primary); }
.check-all { font-size: 21px; padding-bottom: 14px; border-bottom: 2px solid var(--line-soft); }
.agree-list { display: grid; gap: 14px; margin-top: 14px; }
.agree-item details { margin: 6px 0 0 42px; }
details summary { cursor: pointer; color: var(--primary-dark); font-weight: 700; padding: 6px 0; text-decoration: underline; }
details p, details li { font-size: 17px; }
.plain { margin: 8px 0; padding-left: 22px; }
.plain li { margin: 4px 0; }

.legal-table { width: 100%; border-collapse: collapse; font-size: 16px; background: #fff; margin: 8px 0; }
.legal-table th, .legal-table td { border: 1px solid var(--line-soft); padding: 8px; text-align: left; vertical-align: top; }
.legal-table th { background: var(--primary-soft); white-space: nowrap; }

.error-summary { background: #fdecee; border: 2px solid var(--error); color: var(--error); border-radius: 12px; padding: 12px 14px; margin-bottom: 20px; font-weight: 700; }

.btn-submit { margin-top: 8px; font-size: 24px; min-height: 70px; }
.submit-note { text-align: center; color: var(--muted); font-size: 17px; margin: 12px 0 0; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* 자주 묻는 질문 */
.faq details { background: #fff; border-radius: 12px; padding: 8px 16px; margin-bottom: 10px; border: 1px solid var(--line-soft); }
.faq summary { font-size: 19px; text-decoration: none; color: var(--ink); }
.faq summary::marker { color: var(--primary); }

/* 접수 완료 */
.done { border-top: 0; }
.done-head { text-align: center; margin-bottom: 16px; }
.done-head img { border-radius: 50%; border: 3px solid var(--accent-light); }
.done-head h1 { font-family: var(--serif); color: var(--primary-dark); font-size: 30px; margin: 8px 0 4px; }
.done-head p { margin: 0; font-size: 20px; }
.done-summary { background: #fff; border-radius: var(--radius); border: 1px solid var(--line-soft); padding: 8px 16px; margin: 0 0 18px; }
.done-summary div { display: flex; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line-soft); }
.done-summary div:last-child { border-bottom: 0; }
.done-summary dt { color: var(--muted); flex: none; }
.done-summary dd { margin: 0; font-weight: 700; text-align: right; }
.pay-card { background: #fff; border-radius: var(--radius); border: 2px solid var(--line-soft); padding: 18px 16px; margin-bottom: 16px; }
.pay-card.primary { border-color: var(--primary); box-shadow: 0 4px 16px rgba(140, 13, 20, .12); }
.pay-card.primary .when-secondary, .pay-card:not(.primary) .when-primary { display: none; }
.pay-card h2 { font-size: 23px; margin-bottom: 12px; }
.pay-card .other-label { display: block; font-size: 16px; color: var(--muted); font-family: inherit; font-weight: 600; }
.account { background: var(--bg); border: 2px solid var(--accent); border-radius: 12px; padding: 14px; text-align: center; margin-bottom: 12px; }
.account p { margin: 0; }
.account-bank { font-size: 20px; font-weight: 700; }
.account-no { font-size: 27px; font-weight: 800; letter-spacing: .5px; color: var(--primary-dark); margin: 4px 0 !important; }
.account-holder { color: var(--muted); margin-bottom: 12px !important; }

/* 아래 고정 신청 버튼 */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: rgba(255, 248, 236, .97); border-top: 2px solid var(--accent);
  transition: transform .2s ease;
}
.sticky-cta .btn { max-width: 528px; margin: 0 auto; }
.sticky-cta.is-hidden { transform: translateY(110%); }
.sticky-price { background: #fff; color: var(--primary-dark); border-radius: 8px; padding: 0 8px; font-size: 19px; }

/* 하단 */
.site-footer { max-width: 560px; margin: 0 auto; padding: 28px 16px 24px; border-top: 3px solid var(--accent); font-size: 16px; color: var(--muted); }
.footer-note { background: #fff; border-radius: 10px; padding: 12px 14px; color: var(--ink); font-size: 17px; margin: 0 0 16px; }
.footer-links { display: flex; gap: 20px; margin-bottom: 14px; }
.footer-links a { color: var(--ink); font-size: 17px; }
.biz { margin: 0; display: grid; gap: 4px; }
.biz div { display: flex; gap: 8px; }
.biz dt { flex: none; min-width: 7.5em; font-weight: 700; }
.biz dd { margin: 0; }
.footer-small { margin: 10px 0 0; font-size: 15px; }
.footer-small a { color: var(--muted); }

/* 약관·방침 */
.legal { padding: 24px 16px 40px; }
.legal h1 { font-family: var(--serif); color: var(--primary-dark); font-size: 28px; margin: 0 0 8px; }
.legal h2 { font-size: 21px; margin: 28px 0 8px; color: var(--ink); font-family: inherit; }
.legal p, .legal li { font-size: 18px; }
.legal .meta { color: var(--muted); font-size: 16px; }
.legal .callout { background: #fff; border-left: 5px solid var(--primary); padding: 12px 14px; border-radius: 8px; }

@media (min-width: 600px) {
  .hero h1 { font-size: 38px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sticky-cta { transition: none; }
}

.nowrap { white-space: nowrap; }

/* 접수 완료 — 입금 정보 */
.pay-info { margin: 0 0 16px; }
.pay-info div { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.pay-info div:last-child { border-bottom: 0; }
.pay-info dt { flex: none; color: var(--muted); }
.pay-info dd { margin: 0; font-weight: 800; text-align: right; font-size: 21px; }
.pay-info .pay-amount { color: var(--primary-dark); font-size: 26px; }
.pay-info .pay-account { flex-direction: column; align-items: stretch; gap: 4px; background: var(--bg); border: 2px solid var(--accent); border-radius: 12px; padding: 12px 14px; margin: 6px 0; }
.pay-info .pay-account dd { text-align: left; font-size: clamp(20px, 6.4vw, 27px); letter-spacing: .3px; color: var(--primary-dark); white-space: nowrap; }
.btn-copy { font-size: 23px; }
.sms-note { margin: 14px 0 0; font-weight: 700; text-align: center; }
.done-notes { margin: 0 0 18px; }
.optional { font-weight: 600; color: var(--muted); font-size: 18px; }
.support-line { margin: 10px 0 0; }
.done-details { background: #fff; border-radius: 12px; border: 1px solid var(--line-soft); padding: 6px 16px; margin-bottom: 4px; }
.done-details .done-summary { border: 0; padding: 0; margin: 4px 0 8px; }

/* 입금 안내 다시 보기 · 계좌번호 길게 눌러 복사 */
.revisit { padding: 14px 16px 0; }
.revisit .btn { font-size: 21px; }
.select-all { -webkit-user-select: all; user-select: all; -webkit-touch-callout: default; }
.copy-hint { margin: 10px 0 0; text-align: center; font-weight: 800; color: var(--primary-dark); font-size: 19px; }
.tel-link { font-weight: 800; color: var(--ink); font-size: 21px; }

/* 가격 안내(취소선 없이 사실대로) */
.sale-label:empty, .price-note:empty { display: none; }
.price-note { margin: 6px 0 0; font-size: 17px; font-weight: 700; color: var(--primary-dark); }
.price-table { margin: 10px auto 0; border-collapse: collapse; font-size: 18px; }
.price-table th, .price-table td { padding: 4px 12px; border-bottom: 1px solid var(--line-soft); }
.price-table th { text-align: left; color: var(--muted); font-weight: 600; }
.price-table td { text-align: right; font-weight: 800; }

/* 가족 함께 신청(할배 덕담) */
.family { background: var(--primary-soft); border-radius: var(--radius); padding: 16px; }
.family > .label { margin: 0 0 6px; }
.family-list { list-style: none; margin: 14px 0; padding: 0; display: grid; gap: 12px; }
.family-list:empty { display: none; }
.family-item { background: #fff; border: 2px solid var(--line-soft); border-radius: 12px; padding: 14px; }
.family-item.has-error { border-color: var(--error); }
.family-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.family-title { font-size: 20px; color: var(--primary-dark); }
.family-summary { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.family-summary-text { margin: 0; font-weight: 700; font-size: 18px; line-height: 1.45; }
.family-actions { display: flex; gap: 6px; flex: none; }
.sub-field { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
.sub-field .label { font-size: 19px; margin-bottom: 8px; }
.cols-4 { grid-template-columns: repeat(4, 1fr); }
.cols-4 .choice span { font-size: 18px; min-height: 56px; padding: 6px 2px; }
.small-btn { font: inherit; font-size: 17px; font-weight: 700; min-height: 44px; padding: 6px 14px; border: 2px solid var(--line); background: #fff; color: var(--ink); border-radius: 10px; cursor: pointer; }
.small-btn.danger { border-color: var(--error); color: var(--error); }
.btn-add { font-size: 21px; border-style: dashed; }
.btn-add[hidden] { display: none; }
.price-live { margin: 12px 0 0; text-align: center; font-weight: 800; font-size: 20px; color: var(--primary-dark); }
.price-live:empty { display: none; }
.price-rule { margin: 6px 0 0; font-weight: 700; }
.done-people { margin: 6px 0 0 !important; font-weight: 700; color: var(--primary-dark); }
.done-people:empty { display: none; }
.cols-4 .choice input:checked + span::after { content: none; }

.support p { margin: 0 0 12px; }
