/* ==========================================================
   base.css — 레이아웃·컴포넌트 (테마 변수만 참조)
   ========================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Pretendard", "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { max-width: 100%; display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1120px, 100% - 40px); margin: 0 auto; }
@media (max-width: 640px) { .wrap { width: min(1120px, 100% - 32px); } }

/* ---------- 별 배경 ---------- */
.stars {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 12% 18%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 78% 12%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1px 1px at 33% 62%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1px 1px at 88% 48%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1.5px 1.5px at 55% 85%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1px 1px at 8% 90%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1px 1px at 64% 30%, var(--star-color) 60%, transparent 61%),
    radial-gradient(1px 1px at 42% 8%, var(--star-color) 60%, transparent 61%);
  opacity: .35;
  animation: twinkle 6s ease-in-out infinite alternate;
}
@keyframes twinkle { from { opacity: .22; } to { opacity: .45; } }

/* ---------- 헤더 / 네비 ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--bg) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.site-header .row { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; font-size: 20px; white-space: nowrap; flex-shrink: 0; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad-btn); box-shadow: 0 0 18px var(--glow);
  position: relative;
}
.logo .mark::after {
  content: ""; position: absolute; inset: 5px; border-radius: 50%;
  background: var(--bg); transform: translateX(3px);
}
.nav-tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none; }
.nav-tabs::-webkit-scrollbar { display: none; }
.nav-tabs button {
  background: transparent; border: 0; padding: 8px 14px; border-radius: 999px;
  color: var(--text-2); font-weight: 600; white-space: nowrap; font-size: 14px;
  transition: background .2s, color .2s;
}
.nav-tabs button:hover { color: var(--text); }
.nav-tabs button.is-active { background: var(--surface-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.header-cta { display: none !important; }
@media (min-width: 900px) { .header-cta { display: inline-flex !important; } }

/* ---------- 버튼 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 24px; border-radius: 14px; border: 0; font-weight: 700; font-size: 15px;
  transition: transform .15s ease, box-shadow .2s ease, filter .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn-primary { background: var(--grad-btn); color: var(--accent-ink); box-shadow: 0 10px 30px -10px var(--glow); }
.btn-primary:hover { filter: brightness(1.06); box-shadow: 0 14px 34px -10px var(--glow); }
.btn-ghost { background: transparent; color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.btn-ghost:hover { background: var(--surface); }
.btn-sm { padding: 10px 16px; font-size: 14px; border-radius: 11px; }
.btn-lg { padding: 18px 30px; font-size: 17px; border-radius: 16px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* ---------- 히어로 ---------- */
.hero { background: var(--grad-hero); padding: 72px 0 40px; position: relative; overflow: hidden; }
.hero::after {
  content: ""; position: absolute; left: 50%; bottom: -1px; transform: translateX(-50%);
  width: 120%; height: 60px; background: linear-gradient(to bottom, transparent, var(--bg));
}
.hero .eyebrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; border-radius: 999px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text-2);
  font-size: 13px; font-weight: 600; margin-bottom: 18px;
}
.hero .eyebrow i { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.hero h1 { font-size: clamp(30px, 5vw, 52px); line-height: 1.15; letter-spacing: -.03em; margin: 0 0 16px; font-weight: 800; }
.hero h1 em { font-style: normal; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero p { color: var(--text-2); font-size: clamp(15px, 1.6vw, 18px); margin: 0 0 28px; max-width: 560px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .stats { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.hero .stats div b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.hero .stats div span { color: var(--text-3); font-size: 13px; }

/* ---------- 섹션 공통 ---------- */
.section { padding: 56px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; }
.section-head h2 { font-size: clamp(22px, 3vw, 30px); letter-spacing: -.02em; margin: 0; font-weight: 800; }
.section-head p { margin: 6px 0 0; color: var(--text-2); font-size: 15px; }
.section-head .more { color: var(--text-2); font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ---------- 상품 카드 ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 18px; }
.product-card {
  position: relative; display: flex; flex-direction: column;
  background: var(--surface); border-radius: 22px; overflow: hidden;
  box-shadow: inset 0 0 0 1px var(--line), 0 20px 50px -30px rgba(0,0,0,.8);
  transition: transform .25s ease, box-shadow .25s ease;
  cursor: pointer;
}
.product-card:hover { transform: translateY(-4px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 30px 60px -30px var(--glow); }
.product-card.is-hidden { display: none; }
.product-card .thumb {
  aspect-ratio: 4 / 5; position: relative; z-index: 0; overflow: hidden;
  background: var(--grad-card), var(--surface-2);
}
.product-card .thumb img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; transition: transform .6s ease; }
.product-card:hover .thumb img { transform: scale(1.04); }
/* 이미지 없을 때 플레이스홀더 실루엣 */
.product-card .thumb .ph {
  position: absolute; inset: 0; display: grid; place-items: center;
  background:
    radial-gradient(160px 160px at 50% 30%, var(--glow-soft), transparent 70%),
    radial-gradient(60px 60px at 50% 38%, color-mix(in srgb, var(--accent) 45%, transparent), transparent 70%);
}
.product-card .thumb .ph svg { width: 56%; opacity: .55; }
.product-card .thumb::after {
  content: ""; position: absolute; z-index: 2; inset: auto 0 0 0; height: 55%;
  background: linear-gradient(to top, var(--surface) 10%, transparent);
}
.product-card .badge {
  position: absolute; top: 12px; left: 12px; z-index: 3;
  padding: 5px 10px; border-radius: 999px; font-size: 12px; font-weight: 700;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(6px);
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text);
}
.product-card .badge.hot { background: var(--grad-btn); color: var(--accent-ink); box-shadow: none; }
.product-card .body { padding: 0 18px 18px; margin-top: -40px; position: relative; z-index: 1; }
.product-card .who { font-size: 12px; color: var(--text-2); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.product-card .who i { width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.product-card h3 { font-size: 20px; margin: 4px 0 6px; font-weight: 800; letter-spacing: -.02em; }
.product-card .desc { color: var(--text-2); font-size: 14px; margin: 0 0 14px; min-height: 2.9em; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.product-card .meta { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-card .rating { font-size: 13px; color: var(--text-2); display: inline-flex; align-items: center; gap: 4px; }
.product-card .rating b { color: var(--gold); }
.product-card .price { font-weight: 800; letter-spacing: -.02em; }
.product-card .price s { color: var(--text-3); font-weight: 500; font-size: 13px; margin-right: 6px; }
.product-card .price .sale { color: var(--accent-2); font-size: 12px; margin-left: 4px; font-weight: 700; }
.product-card .cta { margin-top: 14px; }

/* ---------- 가로 스와이프 (모바일) ---------- */
@media (max-width: 640px) {
  .card-grid.swipe {
    display: flex; overflow-x: auto; gap: 14px; padding: 4px 16px 18px;
    margin: 0 -16px; scroll-snap-type: x mandatory; scrollbar-width: none;
  }
  .card-grid.swipe::-webkit-scrollbar { display: none; }
  .card-grid.swipe .product-card { flex: 0 0 78%; scroll-snap-align: center; }
}

/* ---------- 신뢰 배지 ---------- */
.trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 14px; }
.trust > div {
  padding: 18px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line);
  display: flex; gap: 14px; align-items: flex-start;
}
.trust .ic { width: 40px; height: 40px; border-radius: 12px; flex: 0 0 auto; display: grid; place-items: center; background: var(--surface-2); color: var(--accent); }
.trust b { display: block; font-size: 15px; margin-bottom: 2px; }
.trust span { color: var(--text-2); font-size: 13px; }

/* ---------- 후기 ---------- */
.reviews { background: var(--bg-2); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.review-track {
  display: flex; gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 4px 0 18px;
  scrollbar-width: none;
}
.review-track::-webkit-scrollbar { display: none; }
.review {
  flex: 0 0 min(340px, 84vw); scroll-snap-align: start;
  background: var(--surface); border-radius: 20px; padding: 20px;
  box-shadow: inset 0 0 0 1px var(--line);
  display: flex; flex-direction: column; gap: 10px;
}
.review .top { display: flex; justify-content: space-between; align-items: center; }
.review .stars-row { color: var(--gold); letter-spacing: 2px; font-size: 14px; }
.review .tag { font-size: 12px; padding: 4px 9px; border-radius: 999px; background: var(--surface-2); color: var(--text-2); font-weight: 600; }
.review p { margin: 0; font-size: 15px; color: var(--text); flex: 1; }
.review .who { color: var(--text-3); font-size: 13px; }
.review-nav { display: flex; gap: 8px; }
.review-nav button {
  width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line-strong); color: var(--text); display: grid; place-items: center;
}
@media (max-width: 640px) { .review-nav { display: none; } }
.sample-note { font-size: 12px; color: var(--text-3); margin-top: 6px; }

/* ---------- 이용 방법 ---------- */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); gap: 14px; counter-reset: step; }
.steps div { padding: 22px 20px; border-radius: 18px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.steps div::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  display: block; font-weight: 800; font-size: 13px; color: var(--accent); margin-bottom: 10px; letter-spacing: .1em;
}
.steps b { display: block; font-size: 16px; margin-bottom: 4px; }
.steps span { color: var(--text-2); font-size: 14px; }

/* ---------- FAQ ---------- */
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  list-style: none; cursor: pointer; padding: 18px 0; font-weight: 700; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--text-3); font-size: 20px; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 18px; color: var(--text-2); font-size: 15px; }

/* ---------- 푸터 ---------- */
.site-footer { padding: 44px 0 90px; color: var(--text-3); font-size: 13px; border-top: 1px solid var(--line); }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px; margin-bottom: 26px; }
@media (max-width: 760px) { .site-footer .cols { grid-template-columns: 1fr; } }
.site-footer h4 { color: var(--text-2); font-size: 13px; margin: 0 0 10px; font-weight: 700; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.site-footer a:hover { color: var(--text); }
.site-footer .biz { line-height: 1.8; }
.site-footer .todo { color: var(--gold); font-weight: 600; }
.kakao-btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px;
  background: #FEE500; color: #191919; font-weight: 700; font-size: 13px;
}
.site-footer .legal { display: flex; gap: 14px; flex-wrap: wrap; padding-top: 18px; border-top: 1px solid var(--line); }

/* ---------- 모바일 하단 고정 CTA ---------- */
.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: color-mix(in srgb, var(--bg) 85%, transparent); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  display: none;
}
@media (max-width: 640px) { .sticky-cta { display: block; } }

/* ==========================================================
   플로우 페이지 (인트로 → 입력 → 질문 → 마법진 → 결제)
   ========================================================== */
.flow { min-height: 100vh; display: flex; flex-direction: column; background: var(--grad-hero); }
.flow-top { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; }
.flow-top .back { background: transparent; border: 0; color: var(--text-2); font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.progress { height: 3px; background: var(--line); border-radius: 999px; overflow: hidden; margin: 0 16px; }
.progress i { display: block; height: 100%; width: 0; background: var(--grad-btn); transition: width .4s ease; }
.stage { flex: 1; display: flex; flex-direction: column; width: min(560px, 100%); margin: 0 auto; padding: 20px 20px 40px; }
.stage[hidden] { display: none; }
.fade-in { animation: fadeUp .5s ease both; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* 인트로 장면 */
.scene { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; position: relative; min-height: 60vh; }
.scene .art {
  position: absolute; inset: 0; z-index: 0; border-radius: 26px; overflow: hidden;
  background: radial-gradient(400px 300px at 50% 40%, var(--glow-soft), transparent 70%), var(--surface);
  box-shadow: inset 0 0 0 1px var(--line);
}
.scene .art img, .scene .art video { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.scene .art video.vid { z-index: 2; opacity: 0; transition: opacity .6s ease; background: transparent; }
.scene .art video.vid.is-on { opacity: 1; }
.scene .art video::-webkit-media-controls { display: none !important; }
.scene .art .ph { position: absolute; inset: 0; display: grid; place-items: center; }
.scene .art .ph svg { width: 45%; opacity: .5; }
.scene .art::after { content: ""; position: absolute; z-index: 2; inset: auto 0 0 0; height: 60%; background: linear-gradient(to top, var(--bg) 20%, transparent); }
.scene .art .float { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.bubble {
  position: relative; z-index: 1; margin: 0 6px 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(10px);
  border-radius: 20px; padding: 20px 20px 18px; box-shadow: inset 0 0 0 1px var(--line-strong), 0 20px 40px -20px rgba(0,0,0,.8);
}
.bubble .name { font-size: 13px; font-weight: 800; color: var(--accent); margin-bottom: 6px; }
.bubble .line { font-size: 17px; line-height: 1.6; min-height: 3.2em; }
.bubble .line .caret { display: inline-block; width: 2px; height: 1em; background: var(--accent); vertical-align: -2px; margin-left: 2px; animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
.bubble .next { display: flex; justify-content: flex-end; margin-top: 10px; color: var(--text-2); font-size: 13px; }
.bubble .next span { animation: nudge 1.2s ease-in-out infinite; }
@keyframes nudge { 0%,100% { transform: translateX(0);} 50% { transform: translateX(4px);} }
.skip { align-self: center; margin-top: 8px; background: transparent; border: 0; color: var(--text-3); font-size: 13px; text-decoration: underline; }

/* 폼 */
.form-card { background: var(--surface); border-radius: 24px; padding: 24px 20px; box-shadow: inset 0 0 0 1px var(--line); }
.form-card h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.02em; }
.form-card .sub { color: var(--text-2); margin: 0 0 20px; font-size: 14px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.field .hint { font-size: 12px; color: var(--text-3); margin-top: 6px; }
.input, select.input {
  width: 100%; padding: 14px 14px; border-radius: 14px; border: 0; background: var(--surface-2);
  color: var(--text); font-size: 16px; box-shadow: inset 0 0 0 1px var(--line);
  transition: box-shadow .2s;
  appearance: none; -webkit-appearance: none;
}
.input:focus { outline: none; box-shadow: inset 0 0 0 1.5px var(--accent); }
.input:disabled { opacity: .45; }
.birth-input { letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.input.is-error { box-shadow: inset 0 0 0 1.5px var(--danger); }
.input::placeholder { color: var(--text-3); }
.row-3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 8px; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 8px; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg label {
  display: flex; align-items: center; justify-content: center; padding: 13px; border-radius: 14px;
  background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); font-weight: 700; font-size: 15px;
  color: var(--text-2); cursor: pointer; transition: all .2s; margin: 0;
}
.seg input:checked + label { background: var(--grad-btn); color: var(--accent-ink); box-shadow: 0 8px 24px -10px var(--glow); }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--text-2); cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.error-msg { color: var(--danger); font-size: 13px; margin-top: 6px; display: none; }
.error-msg.show { display: block; }
.partner-divider { display: flex; align-items: center; gap: 12px; margin: 22px 0 16px; color: var(--text-3); font-size: 13px; font-weight: 700; }
.partner-divider::before, .partner-divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* 질문 카드 (선택지) */
.q-title { font-size: 22px; font-weight: 800; letter-spacing: -.02em; margin: 6px 0 4px; }
.q-sub { color: var(--text-2); font-size: 14px; margin: 0 0 20px; }
.choices { display: grid; gap: 10px; }
.choice {
  text-align: left; padding: 16px 18px; border-radius: 16px; border: 0; background: var(--surface);
  box-shadow: inset 0 0 0 1px var(--line); font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 12px;
  transition: all .18s;
}
.choice .emo { font-size: 20px; width: 28px; text-align: center; }
.choice:hover { box-shadow: inset 0 0 0 1px var(--line-strong); background: var(--surface-2); }
.choice.is-selected { background: var(--surface-2); box-shadow: inset 0 0 0 1.5px var(--accent), 0 10px 30px -18px var(--glow); }

/* 마법진 클라이맥스 */
.climax { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 22px; padding: 30px 0; }
.circle-wrap { position: relative; width: min(300px, 70vw); aspect-ratio: 1; }
.circle-wrap .ring {
  position: absolute; inset: 0; border-radius: 50%;
  background: var(--grad-circle);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 2px));
  animation: spin 9s linear infinite; filter: drop-shadow(0 0 12px var(--glow));
}
.circle-wrap .ring.r2 { inset: 14%; animation-duration: 6s; animation-direction: reverse; opacity: .85; }
.circle-wrap .ring.r3 { inset: 30%; animation-duration: 4s; opacity: .7; }
.circle-wrap svg.glyphs { position: absolute; inset: 6%; width: 88%; height: 88%; animation: spin 20s linear infinite reverse; opacity: .9; }
.circle-wrap svg.glyphs text { fill: var(--text-2); font-size: 11px; letter-spacing: 3px; }
.circle-wrap .core {
  position: absolute; inset: 38%; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--accent) 80%, #fff) 0%, var(--accent) 45%, transparent 72%);
  animation: pulse 1.8s ease-in-out infinite; filter: blur(1px);
}
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { transform: scale(.85); opacity: .75; } 50% { transform: scale(1.1); opacity: 1; } }
.climax h2 { margin: 0; font-size: 22px; letter-spacing: -.02em; }
.climax .status { color: var(--text-2); font-size: 15px; min-height: 1.6em; }
.climax .status .dot::after { content: ""; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }
.climax .bar { width: min(280px, 70vw); height: 4px; background: var(--line); border-radius: 999px; overflow: hidden; }
.climax .bar i { display: block; height: 100%; width: 0; background: var(--grad-btn); transition: width .6s ease; }

/* 결제 화면 */
.summary { background: var(--surface); border-radius: 20px; padding: 18px; box-shadow: inset 0 0 0 1px var(--line); margin-bottom: 16px; }
.summary .top { display: flex; gap: 14px; align-items: center; }
.summary .avatar { position: relative; z-index: 0; width: 56px; height: 56px; border-radius: 16px; background: var(--surface-2); overflow: hidden; flex: 0 0 auto; box-shadow: inset 0 0 0 1px var(--line); display: grid; place-items: center; }
.summary .avatar img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.summary .avatar svg { width: 60%; opacity: .6; }
.summary .ttl { font-weight: 800; font-size: 17px; }
.summary .who { color: var(--text-2); font-size: 13px; }
.summary .pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-top: 14px; }
.summary .pillars div { text-align: center; background: var(--surface-2); border-radius: 12px; padding: 10px 4px; }
.summary .pillars small { display: block; color: var(--text-3); font-size: 11px; }
.summary .pillars b { font-size: 16px; }
.contents-title { margin-top: 16px; font-size: 13px; font-weight: 800; color: var(--text-2); }
.preview { margin-top: 14px; padding: 16px; border-radius: 16px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.preview-head { display: flex; align-items: center; gap: 8px; font-size: 15px; margin-bottom: 8px; }
.tag-free { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 999px; background: var(--grad-btn); color: var(--accent-ink); }
.preview-kv { display: flex; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text-2); margin-bottom: 12px; }
.wuxing { display: grid; gap: 6px; margin-bottom: 12px; }
.wx-row { display: grid; grid-template-columns: 46px 1fr 18px; align-items: center; gap: 8px; font-size: 12px; color: var(--text-2); }
.wx-track { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.wx-track i { display: block; height: 100%; border-radius: 999px; transition: width .6s ease; }
.wx-목 { background: #5ec98a; } .wx-화 { background: #ff7a6b; } .wx-토 { background: #e6b85c; } .wx-금 { background: #d7dde8; } .wx-수 { background: #6aa6ff; }
.wx-n { text-align: right; font-variant-numeric: tabular-nums; }
.preview-text { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text); }
.preview-more { margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line-strong); font-size: 13px; color: var(--accent); font-weight: 700; }
.summary .contents { margin-top: 8px; display: grid; gap: 6px; font-size: 14px; color: var(--text-2); }
.summary .contents li { list-style: none; display: flex; gap: 8px; align-items: center; }
.summary .contents li::before { content: "✓"; color: var(--accent); font-weight: 800; }
.summary .contents ul { margin: 0; padding: 0; }
.price-box { display: flex; align-items: end; justify-content: space-between; gap: 12px; padding: 16px 18px; border-radius: 18px; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line-strong); margin-bottom: 16px; }
.price-box .label { color: var(--text-2); font-size: 13px; }
.price-box .orig { color: var(--text-3); text-decoration: line-through; font-size: 14px; }
.price-box .now { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.price-box .off { color: var(--accent-2); font-weight: 800; font-size: 14px; }
.timer { display: inline-flex; gap: 6px; align-items: center; font-size: 13px; color: var(--gold); font-weight: 700; margin-bottom: 14px; }
.timer b { font-variant-numeric: tabular-nums; }
.secure { display: flex; gap: 14px; justify-content: center; color: var(--text-3); font-size: 12px; margin-top: 14px; flex-wrap: wrap; }
.pay-note { margin-top: 12px; padding: 12px 14px; border-radius: 12px; background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold); font-size: 13px; box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 30%, transparent); }

/* 완료 화면 */
.done { text-align: center; padding: 30px 0; }
.done .ic { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; background: var(--grad-btn); display: grid; place-items: center; color: var(--accent-ink); font-size: 32px; font-weight: 800; box-shadow: 0 0 40px var(--glow); }
.done h2 { margin: 0 0 8px; }
.done p { color: var(--text-2); }

/* 테마 스위치 (미리보기용 — 배포 시 제거 가능) */
.theme-switch {
  position: fixed; right: 14px; bottom: 14px; z-index: 60; display: flex; gap: 6px;
  padding: 6px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), 0 10px 30px -10px rgba(0,0,0,.7);
}
@media (max-width: 640px) { .theme-switch { bottom: 78px; } }
.theme-switch button { width: 30px; height: 30px; border-radius: 50%; border: 0; box-shadow: 0 0 0 2px transparent; }
.theme-switch button.is-on { box-shadow: 0 0 0 2px var(--text); }
.theme-switch .b { background: linear-gradient(135deg,#6a8dff,#3fd0e8); }
.theme-switch .p { background: linear-gradient(135deg,#a874ff,#ff7ad9); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* ---------- 재미로 보는 무료 사주 ---------- */
.free-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.free-card {
  position: relative; display: flex; flex-direction: column; gap: 8px; padding: 22px 20px 18px; border-radius: 22px;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); color: var(--text); text-decoration: none;
  transition: transform .2s, box-shadow .2s, background .2s; overflow: hidden;
}
.free-card::before { content: ""; position: absolute; inset: 0; background: var(--grad-card); opacity: 0; transition: opacity .2s; pointer-events: none; }
.free-card:hover { transform: translateY(-3px); box-shadow: inset 0 0 0 1px var(--line-strong), 0 18px 40px -22px var(--glow); background: var(--surface-2); }
.free-card:hover::before { opacity: 1; }
.free-card .emo { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; font-size: 24px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line); }
.free-card h3 { margin: 6px 0 0; font-size: 18px; letter-spacing: -.02em; display: flex; align-items: center; gap: 8px; }
.free-card p { margin: 0; color: var(--text-2); font-size: 14px; line-height: 1.55; flex: 1; }
.free-card .go { margin-top: 6px; color: var(--accent); font-weight: 800; font-size: 14px; }
.free-card .go::after { content: " →"; }
.hero .free-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 18px; color: var(--text-2); font-size: 14px; font-weight: 600; }
.hero .free-link b { color: var(--gold); }
.hero .free-link:hover { color: var(--text); }

/* free.html */
.fr-tabs { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px 18px; padding: 0 4px; }
.fr-tabs::-webkit-scrollbar { display: none; }
.fr-tabs a { flex: 0 0 auto; padding: 9px 14px; border-radius: 999px; font-size: 13px; font-weight: 700; color: var(--text-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); white-space: nowrap; }
.fr-tabs a.is-active { background: var(--grad-btn); color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--glow); }
.fr-head { text-align: center; margin: 4px 0 22px; }
.fr-emo { width: 64px; height: 64px; margin: 0 auto 12px; border-radius: 20px; display: grid; place-items: center; font-size: 32px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-strong), 0 0 30px -8px var(--glow); }
.fr-head h1 { margin: 0; font-size: 26px; letter-spacing: -.02em; display: inline-flex; align-items: center; gap: 8px; }
.fr-head p { margin: 8px 0 0; color: var(--text-2); font-size: 14px; }
.fr-note { color: var(--text-3); font-size: 12px; line-height: 1.5; margin: 14px 0 0; }
.fr-loading { display: grid; place-items: center; gap: 18px; padding: 70px 0; color: var(--text-2); font-size: 15px; }
.fr-loading .orb { width: 64px; height: 64px; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--accent) 80%, #fff) 0%, var(--accent) 45%, transparent 72%); animation: pulse 1.4s ease-in-out infinite; filter: blur(1px); }

.fr-result .result { background: var(--surface); border-radius: 24px; padding: 24px 20px; box-shadow: inset 0 0 0 1px var(--line); }
.res-head { text-align: center; padding-bottom: 18px; margin-bottom: 16px; border-bottom: 1px dashed var(--line-strong); }
.res-head .eyebrow-t { display: inline-block; font-size: 12px; font-weight: 700; color: var(--text-3); letter-spacing: .02em; }
.res-head h2 { margin: 10px 0 0; font-size: 21px; letter-spacing: -.02em; line-height: 1.35; word-break: keep-all; }
.res-head .score, .res-head .grade { display: inline-flex; flex-direction: column; align-items: center; margin-top: 14px; }
.res-head .score b { font-size: 56px; line-height: 1; font-weight: 800; letter-spacing: -.04em; background: var(--grad-btn); -webkit-background-clip: text; background-clip: text; color: transparent; }
.res-head .score span, .res-head .grade span { font-size: 12px; color: var(--text-2); margin-top: 6px; font-weight: 700; }
.res-head .grade b { width: 88px; height: 88px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; font-weight: 800; color: var(--accent-ink); background: var(--grad-btn); box-shadow: 0 0 40px var(--glow); }
.res-body { margin: 0; font-size: 15px; line-height: 1.75; color: var(--text); word-break: keep-all; }
.sub-h { margin: 22px 0 10px; font-size: 14px; font-weight: 800; color: var(--accent); }
.lucky { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 16px; }
.lucky div { text-align: center; background: var(--surface-2); border-radius: 14px; padding: 12px 6px; box-shadow: inset 0 0 0 1px var(--line); }
.lucky span { display: block; font-size: 11px; color: var(--text-3); margin-bottom: 4px; }
.lucky b { font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; justify-content: center; }
.chip { padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-2); box-shadow: inset 0 0 0 1px var(--line); }
.chip.gold { color: var(--gold); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 10%, transparent); }
.chip.warn { color: var(--danger); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--danger) 45%, transparent); }
.past { display: flex; gap: 14px; align-items: center; background: var(--bg-2); border-radius: 16px; padding: 14px; box-shadow: inset 0 0 0 1px var(--line); }
.past-glyph { flex: 0 0 auto; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; font-size: 28px; font-weight: 800; color: var(--gold); background: var(--surface-2); font-family: "Noto Serif KR", serif; }
.past p { margin: 0; font-size: 14px; line-height: 1.65; color: var(--text-2); word-break: keep-all; }
.past p b { color: var(--text); }
.fr-pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.fr-pillar { text-align: center; background: var(--surface-2); border-radius: 12px; padding: 10px 4px; box-shadow: inset 0 0 0 1px var(--line); }
.fr-pillar .pl { display: block; font-size: 11px; color: var(--text-3); }
.fr-pillar .pg { display: block; font-size: 11px; color: var(--accent); font-weight: 700; margin: 2px 0 4px; }
.fr-pillar b { display: block; font-size: 20px; letter-spacing: .05em; }
.fr-pillar small { display: block; font-size: 11px; color: var(--text-2); margin-top: 2px; }
.cta-box { margin-top: 26px; padding: 18px; border-radius: 20px; background: var(--bg-2); box-shadow: inset 0 0 0 1px var(--line-strong); }
.cta-eyebrow { margin: 0 0 12px; text-align: center; font-size: 13px; font-weight: 800; color: var(--gold); }
.cta-prod { display: flex; gap: 14px; align-items: center; margin-bottom: 14px; }
.cta-thumb { flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; overflow: hidden; background: var(--surface-2); box-shadow: inset 0 0 0 1px var(--line); }
.cta-thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.cta-prod .cta-who { font-size: 12px; color: var(--accent); font-weight: 700; }
.cta-prod b { display: block; font-size: 16px; margin: 2px 0; }
.cta-prod span { display: block; font-size: 13px; color: var(--text-2); line-height: 1.45; word-break: keep-all; }
.cta-others { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 16px; margin-top: 12px; }
.cta-others a { font-size: 13px; color: var(--text-2); font-weight: 600; }
.cta-others a:hover { color: var(--text); }
.fr-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
@media (max-width: 640px) {
  .free-card { display: grid; grid-template-columns: 44px 1fr; grid-template-rows: auto auto; column-gap: 14px; row-gap: 2px; padding: 16px; align-items: center; }
  .free-card .emo { width: 44px; height: 44px; font-size: 22px; grid-row: 1 / span 3; }
  .free-card h3 { margin: 0; font-size: 16px; }
  .free-card p { font-size: 13px; }
  .free-card .go { margin-top: 2px; font-size: 13px; }
  .fr-actions .btn { padding: 12px 10px; font-size: 14px; }
}
