/* =========================================================================
   사주프로그램 커스텀 페이지 (/custom/) — style.css 위에 이 페이지만의 모양
   본문 폭 900px(--container) 그대로, 색은 자개 토큰(--pearl-*) 그대로
   ========================================================================= */

/* 빈칸(아직 정하지 않은 조건 · 기간) 표시 — 채우면 이 span을 글로 바꾸면 돼요 */
.cu-blank {
  display: inline-block;
  padding: 2px 10px;
  border: 1px dashed #c9c4d2;
  border-radius: 999px;
  color: var(--ink-3);
  font-size: 12.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- 1. 첫 화면 (어두운 바탕 + 구름 산수화) ---------- */
.cu-hero {
  position: relative;
  overflow: hidden;
  padding: 156px 0 96px;
  color: #fff;
  text-align: center;
  background:
    radial-gradient(60% 50% at 50% 100%, rgba(180, 170, 255, .28), rgba(150, 220, 255, .1) 45%, transparent 70%),
    linear-gradient(rgba(10, 9, 13, .8), rgba(10, 9, 13, .8)),
    url("../img/bg-dark.webp") center top / cover no-repeat,
    #000;
}
.cu-title { font-size: 52px; font-weight: 800; line-height: 1.25; letter-spacing: -0.04em; }
.cu-title em { color: transparent; background: var(--pearl-text-dark); -webkit-background-clip: text; background-clip: text; }
.cu-sub { margin-top: 18px; font-size: 18px; line-height: 1.65; color: rgba(255, 255, 255, .75); }
.cu-actions { display: flex; justify-content: center; gap: 10px; margin-top: 32px; }
.cu-btn-ghost { border: 1px solid rgba(255, 255, 255, .35); background: transparent; color: #fff; }
.cu-btn-ghost:hover { border-color: rgba(255, 255, 255, .7); background: rgba(255, 255, 255, .06); }

/* 결과지 표지 전후 */
.cu-compare { position: relative; display: flex; justify-content: center; align-items: center; gap: 28px; margin-top: 64px; }
.cu-cover { position: relative; display: grid; justify-items: center; gap: 12px; }
.cu-cover.is-before { z-index: 2; }   /* 겹쳐 있을 때 '지금'이 위 */
.cu-cover.is-after { z-index: 1; }
.cu-cover figcaption { padding: 5px 14px; border-radius: 999px; background: rgba(255, 255, 255, .1); color: rgba(255, 255, 255, .8); font-size: 13px; font-weight: 700; }
.cu-cover.is-after figcaption { background: var(--pearl-fill); color: var(--ink); }
.cu-paper {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 236px;
  aspect-ratio: 210 / 297;
  padding: 30px 18px 16px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 24px 50px rgba(0, 0, 0, .5);
  color: var(--ink);
}
.cu-cover.is-before .cu-paper { rotate: -3deg; }
.cu-cover.is-after .cu-paper { rotate: 3deg; box-shadow: 0 24px 50px rgba(0, 0, 0, .5), 0 0 0 3px rgba(217, 201, 255, .55); }
/* 처음 들어올 때 펼쳐지는 모습 (main.js가 화면에 보이면 .is-open을 붙임 · 동작 줄이기면 처음부터 펼친 모습)
   ① 두 장이 가운데에 겹쳐 '지금'만 보임 → ② 두 장이 동시에 양옆으로 빠르게 펼쳐지며 살짝 튕겨 자리 잡음
   → ③ 이름표 · 화살표 · 아래 설명이 나타남
   --cu-dx-*: 가운데까지 거리 (main.js가 실제 자리로 계산, 없으면 기본값) */
.js-reveal .cu-compare:not(.is-open) .cu-cover.is-before { translate: var(--cu-dx-before, 209px) 0; }
.js-reveal .cu-compare:not(.is-open) .cu-cover.is-after { translate: var(--cu-dx-after, -209px) 0; }
.js-reveal .cu-compare:not(.is-open) .cu-paper { rotate: 0deg; }
.js-reveal .cu-compare:not(.is-open) .cu-cover.is-after .cu-paper { scale: .96; }   /* 보라 테두리까지 뒤에 완전히 숨게 */
.js-reveal .cu-compare:not(.is-open) .cu-cover figcaption,
.js-reveal .cu-compare:not(.is-open) .cu-foot,
.js-reveal .cu-compare:not(.is-open) .cu-arrow { opacity: 0; }
.js-reveal .cu-compare:not(.is-open) .cu-cover figcaption,
.js-reveal .cu-compare:not(.is-open) .cu-foot { translate: 0 6px; }
/* ② 두 장 동시에 양옆으로 — 빠르게 나가서 끝에서 살짝 넘쳤다 돌아옴 */
.cu-compare.is-open .cu-cover,
.cu-compare.is-open .cu-paper { transition: translate .62s cubic-bezier(.18, 1.25, .32, 1), rotate .62s cubic-bezier(.18, 1.25, .32, 1), scale .3s ease-out; }
/* ③ 펼친 뒤 글씨 */
.cu-compare.is-open .cu-cover figcaption,
.cu-compare.is-open .cu-foot { transition: opacity .35s ease .55s, translate .35s ease .55s; }
.cu-compare.is-open .cu-arrow { transition: opacity .35s ease .5s; }

.cu-mark { width: 64px; height: 64px; filter: invert(1); }   /* 흰 별 로고 → 종이 위에선 검정 */
.cu-logo-slot {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border: 2px dashed #a99ccb;
  border-radius: 50%;
  background: linear-gradient(160deg, #f3eefe, #e6f4fb);
  color: #6d5aa8;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
}
.cu-brand { margin-top: 8px; font-size: 13px; font-weight: 900; letter-spacing: .14em; }
.cu-cover.is-after .cu-brand { letter-spacing: -0.02em; font-size: 15px; color: #6d5aa8; }
.cu-avatar {   /* 실제 표지처럼 일지 띠 그림 (예시 김지현 = 임술 일주 → 개, 수 기운 색) — 그림은 프로그램과 같은 선 */
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  margin-top: auto;
  padding: 8px;
  border-radius: 50%;
  background: #e9ecf2;
}
.cu-avatar img { display: block; width: 100%; height: 100%; }
.cu-name { margin-top: 10px; font-size: 18px; font-weight: 800; }
.cu-meta { margin-top: 4px; font-size: 9.5px; color: var(--ink-3); }
.cu-meta { margin-bottom: auto; }   /* 띠 그림 · 이름 · 생년월일을 표지 아래쪽 빈자리 가운데에 */
.cu-foot { margin-top: 10px; font-size: 13.5px; font-weight: 500; color: rgba(255, 255, 255, .62); }   /* 표지 밖 아래 설명 */
.cu-cover.is-after .cu-foot { color: rgba(255, 255, 255, .85); }
.cu-arrow {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--pearl-fill);
  box-shadow: 0 8px 20px rgba(0, 0, 0, .4);
  position: relative;
}
.cu-arrow::before { content: ""; position: absolute; top: 50%; left: 50%; width: 10px; height: 10px; border-top: 2.5px solid var(--ink); border-right: 2.5px solid var(--ink); translate: -65% -50%; rotate: 45deg; }

/* ---------- 2. 이런 분께 ---------- */
.cu-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cu-cards li { padding: 26px 22px; border-radius: var(--radius-l); background: var(--surface); text-align: center; }
.cu-cards h3 { font-size: 18px; font-weight: 800; letter-spacing: -0.03em; }
.cu-cards p { margin-top: 8px; font-size: 14px; line-height: 1.65; color: var(--ink-3); }

/* ---------- 3. 바뀌는 곳 ---------- */
.cu-scope { background: var(--surface); }
.cu-scope-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.cu-scope-list li { overflow: hidden; border-radius: var(--radius-l); background: #fff; box-shadow: 0 1px 0 var(--box-line); }
.cu-scope-list img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #eef0f3; }
.cu-scope-list li:first-child img { object-position: left top; }
.cu-scope-list div { padding: 18px 18px 22px; }
.cu-scope-list b { font-size: 12px; font-weight: 900; color: var(--accent); }
.cu-scope-list h3 { margin-top: 4px; font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.cu-scope-list p { margin-top: 6px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.cu-note { margin-top: 20px; font-size: 14px; color: var(--ink-3); text-align: center; }
.cu-note .cu-blank { margin-left: 6px; }

/* ---------- 4. 받는 것 ---------- */
.cu-get-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.cu-get-grid li { padding: 24px 24px 24px 64px; border: 1px solid var(--box-line); border-radius: var(--radius-l); position: relative; }
.cu-get-grid li::before {   /* 자개 체크 */
  content: "";
  position: absolute;
  top: 24px;
  left: 24px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12.5l4 4 8-9' fill='none' stroke='%2318171c' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 15px no-repeat,
    var(--pearl-fill);
}
.cu-get-grid h3 { font-size: 17px; font-weight: 800; letter-spacing: -0.03em; }
.cu-get-grid p { margin-top: 6px; font-size: 14px; line-height: 1.65; color: var(--ink-2); }

/* ---------- 5. 진행 순서 ---------- */
.cu-process { background: var(--surface); }
.cu-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; counter-reset: none; }
.cu-steps li { display: flex; flex-direction: column; align-items: flex-start; padding: 22px 20px; border-radius: var(--radius-l); background: #fff; }
.cu-steps b { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--pearl-fill); font-size: 14px; font-weight: 900; }
.cu-steps h3 { margin-top: 14px; font-size: 16px; font-weight: 800; letter-spacing: -0.03em; }
.cu-steps p { margin-top: 6px; margin-bottom: 14px; font-size: 13.5px; line-height: 1.6; color: var(--ink-2); }
.cu-steps .cu-blank { margin-top: auto; }

/* ---------- 6. 라이선스 조건 표 ---------- */
.cu-table { width: 100%; border-collapse: collapse; border-top: 2px solid var(--ink); }
.cu-table th, .cu-table td { padding: 18px 8px; border-bottom: 1px solid var(--divider); font-size: 15px; text-align: left; }
.cu-table th { width: 34%; font-weight: 700; }

/* ---------- 7. 가격 ---------- */
.cu-price { background: var(--surface); }
.cu-plans { display: grid; grid-template-columns: 1fr 1.2fr; gap: 14px; align-items: stretch; }
.cu-plan { display: flex; flex-direction: column; padding: 30px 28px; border: 1px solid var(--box-line); border-radius: var(--radius-l); background: #fff; }
.cu-plan.is-main { position: relative; border-color: transparent; background: var(--dark); color: #fff; box-shadow: 0 20px 40px rgba(40, 32, 70, .25); }
.cu-badge { align-self: flex-start; margin-bottom: 14px; padding: 4px 12px; border-radius: 999px; background: var(--pearl-fill); color: var(--ink); font-size: 12.5px; font-weight: 800; }
.cu-plan-name { font-size: 16px; font-weight: 700; color: var(--ink-2); }
.cu-plan.is-main .cu-plan-name { color: rgba(255, 255, 255, .75); }
.cu-plan-price { margin-top: 6px; font-size: 36px; font-weight: 900; letter-spacing: -0.03em; }
.cu-plan-price small { margin-left: 2px; font-size: 18px; font-weight: 700; }
.cu-plan-was { margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); }   /* 할인 중: 정가 취소선 + 행사 이름 */
.cu-plan-was s { margin-right: 4px; color: var(--ink-3); font-weight: 500; text-decoration-thickness: 1px; }
.cu-plan-was + .cu-plan-price { margin-top: 0; }
.cu-plan.is-main .cu-plan-price { color: transparent; background: var(--pearl-text-dark); -webkit-background-clip: text; background-clip: text; }
.cu-plan ul { display: grid; gap: 10px; margin: 22px 0 26px; }
.cu-plan li { position: relative; padding-left: 22px; font-size: 14.5px; color: var(--ink-2); }
.cu-plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 800; color: var(--accent); }
.cu-plan.is-main li { color: rgba(255, 255, 255, .85); }
.cu-plan.is-main li::before { color: var(--accent-on-dark); }
.cu-plan.is-main .cu-blank { border-color: rgba(255, 255, 255, .3); color: rgba(255, 255, 255, .55); }
.cu-plan .btn { margin-top: auto; justify-content: center; }
.cu-btn-line { border: 1px solid var(--box-line); background: #fff; color: var(--ink); }
.cu-btn-line:hover { border-color: #cfcbd8; }

/* ---------- 9. 마지막 버튼 ---------- */
.cu-final .checks li { color: rgba(255, 255, 255, .7); }

/* =========================================================
   모바일 (767px 이하)
   ========================================================= */
@media (max-width: 767px) {
  .cu-hero { padding: 112px 0 64px; }
  .cu-title { font-size: 31px; }
  .cu-sub { margin-top: 14px; font-size: 15.5px; }
  .cu-actions { flex-wrap: wrap; margin-top: 24px; }

  /* 표지 전후: 두 장을 작게 */
  .cu-compare { gap: 10px; margin-top: 44px; }
  .cu-paper { width: 132px; padding: 18px 10px 10px; }
  .cu-mark,
  .cu-logo-slot { width: 40px; height: 40px; }
  .cu-logo-slot { font-size: 9px; }
  .cu-brand { margin-top: 6px; font-size: 10px; }
  .cu-cover.is-after .cu-brand { font-size: 11.5px; }
  .cu-avatar { width: 38px; height: 38px; padding: 5px; }
  .cu-name { margin-top: 6px; font-size: 13.5px; }
  .cu-meta { font-size: 7.5px; }
  .cu-cover figcaption { padding: 4px 11px; font-size: 12px; }
  .cu-foot { font-size: 12px; }
  .cu-arrow { flex: none; width: 32px; height: 32px; }
  .cu-arrow::before { width: 8px; height: 8px; border-width: 2px; }

  .cu-cards,
  .cu-scope-list,
  .cu-get-grid { grid-template-columns: 1fr; }
  .cu-cards li { padding: 22px 18px; }
  .cu-get-grid li { padding: 20px 18px 20px 58px; }
  .cu-get-grid li::before { top: 20px; left: 18px; }
  .cu-steps { grid-template-columns: 1fr 1fr; gap: 10px; }
  .cu-steps li { padding: 18px 16px; }
  .cu-table th,
  .cu-table td { padding: 14px 6px; font-size: 14px; }
  .cu-plans { grid-template-columns: 1fr; }
  .cu-plan { padding: 26px 22px; }
  .cu-plan-price { font-size: 32px; }
}
