/* ============================================================
   Soft Cosmic — 사주 & 점법 도서관
   다크 그라디언트 + 글래스모피즘 + 별 반짝임
   ============================================================ */

@import url('https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/static/pretendard-dynamic-subset.min.css');
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@400;700&display=swap');

:root {
  /* 배경 */
  --bg-start: #050507;
  --bg-mid:   #0B0E1A;
  --bg-end:   #211018;

  /* 메인 컬러 */
  --purple:        #7C4DBC;
  --purple-light:  #9d6ed0;
  --purple-soft:   #b189db;
  --pink:          #E8A0BF;
  --pink-soft:     #f3c2d6;
  --gold:          #F5D76E;
  --gold-soft:     #f8e49a;

  /* 텍스트 */
  --text:      #F0EBF8;
  --text-soft: #d8d0ec;
  --text-dim:  rgba(240, 235, 248, 0.62);
  --text-mute: rgba(240, 235, 248, 0.42);

  /* 카드/보더 (글래스모피즘) */
  --card-bg:        rgba(255, 255, 255, 0.05);
  --card-bg-strong: rgba(255, 255, 255, 0.08);
  --card-border:    rgba(255, 255, 255, 0.12);
  --card-border-strong: rgba(232, 160, 191, 0.35);

  /* 의미 컬러 */
  --error:    #FF8FA3;
  --reversed: #E8A0BF;
  --good:     #9DE0AD;

  /* 호환용 이전 변수 매핑 (JS 또는 잔여 코드 호환) */
  --bg:           var(--bg-start);
  --bg-card:      var(--card-bg);
  --bg-card-soft: var(--card-bg-strong);
  --accent:       var(--purple);
  --accent-soft:  var(--pink);
  --border:       var(--card-border);

  /* 그라디언트 프리셋 */
  --grad-button: linear-gradient(135deg, #7C4DBC 0%, #E8A0BF 100%);
  --grad-button-hover: linear-gradient(135deg, #8d5fd0 0%, #f0b6cd 100%);
  --grad-card-hover: linear-gradient(135deg, rgba(124,77,188,0.18), rgba(232,160,191,0.12));
}

/* light-theme 클래스는 호환을 위해 남기되, 다크 테마 통일 */
body.light-theme { /* 다크 테마와 동일 */ }

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Pretendard', 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.7;
  background: linear-gradient(160deg, var(--bg-start) 0%, var(--bg-mid) 50%, var(--bg-end) 100%);
  background-attachment: fixed;
  position: relative;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ── 별 반짝임 배경 (CSS 별 + twinkle 애니메이션) ── */
body::before,
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background-repeat: repeat;
  background-size: 320px 320px;
}
body::before {
  background-image:
    radial-gradient(1.5px 1.5px at 20px 30px, rgba(255,255,255,0.85), transparent 50%),
    radial-gradient(1px 1px at 80px 120px, rgba(245,215,110,0.7), transparent 50%),
    radial-gradient(1.5px 1.5px at 180px 60px, rgba(232,160,191,0.8), transparent 50%),
    radial-gradient(1px 1px at 240px 220px, rgba(255,255,255,0.6), transparent 50%),
    radial-gradient(1.5px 1.5px at 60px 260px, rgba(177,137,219,0.85), transparent 50%),
    radial-gradient(1px 1px at 290px 90px, rgba(255,255,255,0.7), transparent 50%);
  animation: twinkle 5s ease-in-out infinite;
}
body::after {
  background-image:
    radial-gradient(1px 1px at 50px 80px, rgba(255,255,255,0.55), transparent 50%),
    radial-gradient(1.5px 1.5px at 140px 200px, rgba(245,215,110,0.55), transparent 50%),
    radial-gradient(1px 1px at 220px 40px, rgba(255,255,255,0.45), transparent 50%),
    radial-gradient(1px 1px at 300px 280px, rgba(232,160,191,0.5), transparent 50%),
    radial-gradient(1.5px 1.5px at 100px 160px, rgba(255,255,255,0.4), transparent 50%);
  background-size: 360px 360px;
  background-position: 40px 20px;
  animation: twinkle 7s ease-in-out infinite reverse;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1;    }
}

/* 본문이 별 위로 올라오도록 */
main, nav, footer, .site-nav, .site-footer { position: relative; z-index: 1; }

/* ============================================================
   레이아웃
   ============================================================ */
.container {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 18px 80px;
}

/* ── 상단 네비게이션 ── */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  background: rgba(15, 10, 30, 0.55);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  padding: 0;
}
/* nav 직접 자식 nav-logo (내부 페이지) — 메인과 동일한 max-width/margin 적용 */
.site-nav > .nav-logo {
  display: flex;
  max-width: 720px;
  margin: 0 auto;
  padding: 14px 0;
}
.site-nav-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 16px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  min-height: 52px;
}
.site-nav-inner .site-logo { min-width: 0; flex: 1 1 auto; }
.site-nav-inner #auth-nav-area { margin-left: 0 !important; flex: 0 0 auto; }
.site-nav-inner .language-selector {
  position: relative;
  transform: none;
  flex: 0 0 auto;
  margin-left: auto;
  margin-right: 4px;
}
.site-nav:not(:has(.site-nav-inner)) .language-selector {
  position: absolute;
  top: 50%;
  right: max(16px, calc((100vw - 720px) / 2));
  transform: translateY(-50%);
}
.language-selector {
  position: relative;
  z-index: 80;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: center;
  height: 38px;
  min-height: 38px;
  margin-top: 0;
}
.site-nav:not(:has(.site-nav-inner)) .language-selector {
  position: absolute;
  top: 50%;
  right: max(16px, calc((100vw - 720px) / 2));
  transform: translateY(-50%);
}
.language-select {
  appearance: none;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1.5px solid rgba(201,168,245,0.35);
  outline: 0;
  background: rgba(255,255,255,0.05);
  color: #e8d5ff;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  width: 52px;
  margin: 0;
  height: 100%;
  padding: 0;
  border-radius: 20px;
  text-align: center;
  box-shadow: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
}
.language-current {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  text-align: center;
  line-height: 1;
}
.language-selector::after {
  content: none;
}
.language-select:hover,
.language-selector.open .language-select {
  background: rgba(124,77,188,0.25);
  border-color: rgba(201,168,245,0.7);
}
.language-menu {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  right: auto;
  transform: translateX(-50%);
  width: 92px;
  max-width: 92px;
  padding: 6px;
  border: 1px solid rgba(201,168,245,0.32);
  border-radius: 16px;
  background: linear-gradient(180deg, rgba(30,16,64,0.98), rgba(15,10,30,0.98));
  box-shadow: 0 18px 38px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  overflow: hidden;
}
.language-selector.open .language-menu { display: grid; gap: 3px; }
.language-option {
  width: 100%;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: rgba(248,241,255,0.88);
  padding: 9px 13px;
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  line-height: 1;
  text-align: center;
  cursor: pointer;
}
.language-option:hover,
.language-option.active {
  background: linear-gradient(135deg, rgba(124,77,188,0.78), rgba(232,160,191,0.26));
  color: #fff;
}
@media (max-width: 520px) {
  .site-nav-inner { padding: 9px 10px; gap: 4px; min-height: 58px; }
  .site-nav-inner .site-logo { gap: 7px; }
  .site-nav-inner .logo-icon-img { width: 34px; height: 34px; border-radius: 10px; }
  .site-nav-inner .logo-title { font-size: 14px; max-width: 118px; overflow: hidden; text-overflow: ellipsis; }
  .site-nav-inner .logo-sub { font-size: 8px; letter-spacing: 0.14em; }
  .site-nav > .nav-logo { padding-left: 14px; padding-right: 112px; }
  .site-nav:not(:has(.site-nav-inner)) .language-selector { right: 10px; }
  .language-selector { height: 34px; min-height: 34px; align-self: center; }
  .site-nav-inner .language-selector { margin-left: auto; margin-right: 3px; }
  .language-select { width: 46px; height: 100%; padding: 0; font-size: 12px; }
  .language-menu { top: calc(100% + 8px); left: 50%; right: auto; transform: translateX(-50%); width: 84px; max-width: 84px; }
  .language-option { padding: 9px 10px; font-size: 12px; }
}
.site-logo,
.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  position: relative;
  padding: 14px 0;
}

/* 아이콘 래퍼 */
.site-logo .logo-icon,
.nav-logo .logo-icon {
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, #7C4DBC 0%, #E8A0BF 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 0 12px rgba(124,77,188,0.55), 0 0 24px rgba(232,160,191,0.2);
  flex-shrink: 0;
  transition: box-shadow 0.25s, transform 0.25s;
}

/* 로고 이미지 아이콘 */
.site-logo .logo-icon-img,
.nav-logo .logo-icon-img {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 2px 12px rgba(200,134,10,0.35), 0 0 20px rgba(180,100,200,0.2);
  transition: box-shadow 0.25s, transform 0.25s;
}
.site-logo:hover .logo-icon-img,
.nav-logo:hover .logo-icon-img {
  box-shadow: 0 4px 20px rgba(200,134,10,0.55), 0 0 32px rgba(180,100,200,0.35);
  transform: scale(1.08) rotate(-4deg);
}

/* 텍스트 영역 */
.site-logo .logo-text,
.nav-logo .logo-text {
  display: flex;
  flex-direction: column;
  gap: 0px;
  line-height: 1;
}
.site-logo .logo-title,
.nav-logo .logo-title {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: linear-gradient(135deg, #f3c2d6 0%, #b189db 50%, #F5D76E 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  white-space: nowrap;
}
.site-logo .logo-sub,
.nav-logo .logo-sub {
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  color: rgba(240,235,248,0.38);
  text-transform: uppercase;
  white-space: nowrap;
  margin-top: 2px;
}

/* 호버 */
.site-logo:hover .logo-icon,
.nav-logo:hover .logo-icon {
  box-shadow: 0 0 20px rgba(124,77,188,0.8), 0 0 40px rgba(232,160,191,0.35);
  transform: scale(1.08) rotate(-4deg);
}
.site-logo:hover .logo-title,
.nav-logo:hover .logo-title {
  background: linear-gradient(135deg, #F5D76E 0%, #E8A0BF 50%, #b189db 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* 구버전 호환 */
.site-logo .logo-mark {
  display: none;
}
.site-nav-links {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav-links a {
  font-size: 13px;
  color: var(--text-soft);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.15s;
}
.site-nav-links a:hover { color: var(--pink); }

@media (max-width: 480px) {
  .site-nav-links { gap: 12px; }
  .site-nav-links a { font-size: 12px; }
}

/* ── 푸터 ── */
.site-footer {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 28px 18px 36px;
  text-align: center;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.7;
}
.site-footer .footer-row {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 8px;
  flex-wrap: wrap;
}
.site-footer .footer-row a {
  color: var(--text-dim);
  text-decoration: none;
}
.site-footer .footer-row a:hover { color: var(--pink); }
.site-footer .footer-copy { opacity: 0.7; }

/* ============================================================
   타이포그래피 / 헤더
   ============================================================ */
header {
  text-align: center;
  margin-bottom: 28px;
  padding-top: 8px;
}

h1 {
  font-size: 26px;
  font-weight: 800;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  background: linear-gradient(135deg, var(--pink) 0%, var(--gold) 60%, var(--purple-light) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.25;
}

h2 {
  font-size: 18px;
  font-weight: 700;
  margin: 0 0 16px;
  color: var(--pink);
  letter-spacing: 0.01em;
}

h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 8px; }

.tagline {
  margin: 0;
  color: var(--text-soft);
  font-size: 14px;
  font-weight: 500;
}
.page-guide {
  margin: 12px auto 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.7;
  max-width: 480px;
}

/* ============================================================
   카드 — 글래스모피즘
   ============================================================ */
.card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px 20px;
  margin-bottom: 18px;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  box-shadow:
    0 4px 24px rgba(0,0,0,0.25),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.free-area {
  border-color: var(--card-border-strong);
  background: linear-gradient(135deg, rgba(232,160,191,0.10), rgba(124,77,188,0.10));
  box-shadow:
    0 4px 28px rgba(232,160,191,0.18),
    inset 0 1px 0 rgba(255,255,255,0.08);
}

/* ============================================================
   폼 요소
   ============================================================ */
label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 10px;
  letter-spacing: 0.01em;
  font-weight: 500;
}

input[type="text"],
input[type="email"],
input[type="date"],
select,
textarea {
  width: 100%;
  background: rgba(255,255,255,0.06);
  color: var(--text);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  padding: 14px 16px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
  transition: border-color 0.18s, box-shadow 0.18s, background 0.18s;
}
input[type="text"]::placeholder,
input[type="email"]::placeholder,
textarea::placeholder {
  color: var(--text-mute);
}
input[type="text"]:focus,
input[type="email"]:focus,
input[type="date"]:focus,
select:focus,
textarea:focus {
  border-color: var(--purple-light);
  background: rgba(255,255,255,0.09);
  box-shadow: 0 0 0 4px rgba(124,77,188,0.18);
}
input[type="date"] { color-scheme: dark; }
textarea { resize: vertical; }

input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--purple-light);
  margin-right: 6px;
}

/* ============================================================
   버튼 — 그라디언트 + glow hover
   ============================================================ */
button {
  margin-top: 16px;
  width: 100%;
  padding: 16px 22px;
  background: var(--grad-button);
  color: #fff;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: 0.02em;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: transform 0.15s, box-shadow 0.2s, opacity 0.15s;
  box-shadow:
    0 4px 16px rgba(124,77,188,0.35),
    inset 0 1px 0 rgba(255,255,255,0.18);
}
button:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow:
    0 6px 24px rgba(232,160,191,0.5),
    0 0 32px rgba(124,77,188,0.4),
    inset 0 1px 0 rgba(255,255,255,0.25);
  background: var(--grad-button-hover);
}
button:active:not(:disabled) { transform: translateY(0); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.error {
  margin-top: 12px;
  color: var(--error);
  font-size: 13px;
  font-weight: 500;
}

/* 작은/보조 버튼 (다시 보기 등) */
.actions { text-align: center; margin-top: 8px; }
.actions button {
  max-width: 240px;
  margin: 0 auto;
  background: transparent;
  color: var(--pink-soft);
  border: 1.5px solid rgba(232,160,191,0.4);
  box-shadow: none;
  font-weight: 700;
}
.actions button:hover:not(:disabled) {
  background: rgba(232,160,191,0.10);
  border-color: var(--pink);
  box-shadow: 0 0 16px rgba(232,160,191,0.25);
  transform: translateY(-1px);
}

/* ============================================================
   로딩 — 별 모양 회전
   ============================================================ */
.drawing-text {
  text-align: center;
  color: var(--text-soft);
  font-size: 14px;
  margin: 0;
  letter-spacing: 0.01em;
}
.star-spinner {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: block;
  color: var(--gold);
  filter: drop-shadow(0 0 12px rgba(245,215,110,0.55));
  animation: starSpin 2.2s linear infinite, starPulse 1.4s ease-in-out infinite;
}
@keyframes starSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes starPulse {
  0%, 100% { opacity: 0.6; }
  50%      { opacity: 1;   }
}

/* ============================================================
   뒤로가기 / 작은 링크
   ============================================================ */
.back-link {
  display: inline-block;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  margin-bottom: 14px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--pink); }

/* ============================================================
   메인 페이지 — 카드 그리드
   ============================================================ */
.home-header {
  text-align: center;
  margin-bottom: 36px;
  padding: 16px 0 8px;
  animation: heroFadeIn 0.8s ease;
}
@keyframes heroFadeIn {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
.home-header h1 {
  font-size: 30px;
  margin-bottom: 10px;
}

.choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 32px;
}
.choice-grid-five { grid-template-columns: repeat(3, 1fr); }
.choice-grid-two { grid-template-columns: 1fr 1fr; }

.choice-card {
  position: relative;
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 18px;
  padding: 26px 18px 22px;
  text-align: center;
  text-decoration: none;
  color: inherit;
  backdrop-filter: blur(14px) saturate(140%);
  -webkit-backdrop-filter: blur(14px) saturate(140%);
  transition: transform 0.25s cubic-bezier(0.34, 1.4, 0.5, 1),
              box-shadow 0.25s, border-color 0.25s, background 0.25s;
  overflow: hidden;
}
.choice-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--grad-card-hover);
  opacity: 0;
  transition: opacity 0.25s;
  pointer-events: none;
}
.choice-card:hover {
  transform: translateY(-6px);
  border-color: var(--card-border-strong);
  box-shadow:
    0 12px 32px rgba(124,77,188,0.3),
    0 0 24px rgba(232,160,191,0.18);
}
.choice-card:hover::before { opacity: 1; }

.choice-card > * { position: relative; z-index: 1; }

.choice-symbol {
  font-size: 28px;
  color: var(--gold);
  letter-spacing: 0.18em;
  margin-bottom: 14px;
  text-shadow: 0 0 14px rgba(245,215,110,0.45);
}
.choice-card h2 {
  font-size: 18px;
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 800;
}
.choice-when {
  font-size: 12px;
  color: var(--pink);
  margin: 0 0 8px;
  line-height: 1.55;
}
.choice-desc {
  font-size: 13px;
  color: var(--text-soft);
  margin: 0 0 10px;
  line-height: 1.65;
}
.choice-note {
  font-size: 11px;
  color: var(--text-dim);
  margin: 0 0 4px;
}
.choice-origin {
  font-size: 11px;
  color: var(--purple-soft);
  margin: 10px 0 0;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.08);
  letter-spacing: 0.04em;
}

/* 무료 체험 뱃지 */
.choice-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: linear-gradient(135deg, var(--gold), #f0b85a);
  color: #2a1a05;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  box-shadow: 0 2px 8px rgba(245,215,110,0.4);
}

/* 사주 카드 강조 */
.choice-card-featured {
  border-color: rgba(245,215,110,0.35);
  background: linear-gradient(135deg, rgba(245,215,110,0.06), rgba(232,160,191,0.08));
}
.choice-card-featured:hover {
  border-color: var(--gold);
  box-shadow:
    0 12px 36px rgba(245,215,110,0.25),
    0 0 28px rgba(232,160,191,0.22);
}

/* 섹션 구분선 */
.section-divider {
  display: flex;
  align-items: center;
  margin: 10px 0 18px;
  gap: 14px;
}
.section-divider::before,
.section-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(232,160,191,0.4), transparent);
}
.section-divider-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--pink);
  letter-spacing: 0.12em;
  white-space: nowrap;
  text-transform: uppercase;
}

/* 소셜 프루프 */
.social-proof {
  margin: 36px 0 0;
  padding: 0 16px;
}
.social-proof-stats {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 20px;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  overflow: hidden;
}
.social-proof-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  flex: 1;
  padding: 20px 12px;
  transition: background 0.2s;
}
.social-proof-stat:hover {
  background: rgba(124,77,188,0.08);
}
.social-proof-divider {
  width: 1px;
  height: 48px;
  background: rgba(255,255,255,0.08);
  flex-shrink: 0;
}
.social-proof-icon {
  font-size: 20px;
  line-height: 1;
  margin-bottom: 2px;
}
.social-proof-num {
  font-size: 26px;
  font-weight: 900;
  line-height: 1;
  background: linear-gradient(135deg, var(--gold), var(--pink));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  letter-spacing: -0.5px;
  white-space: nowrap;
}
.social-proof-unit {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0;
}
.social-proof-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.03em;
  white-space: nowrap;
}
.social-proof-text {
  margin: 8px 0 0;
  font-size: 12px;
  color: var(--text-soft);
  line-height: 1.6;
}

.home-footer {
  text-align: center;
  font-size: 12px;
  color: var(--text-mute);
  margin-top: 28px;
  line-height: 1.7;
}

@media (max-width: 780px) {
  .choice-grid-five { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .container { padding: 16px 14px 60px; }
  .home-header h1 { font-size: 26px; }
  .choice-grid { gap: 12px; }
  .choice-card { padding: 22px 14px 18px; }
  .choice-symbol { font-size: 24px; }
  .choice-card h2 { font-size: 16px; }
  .social-proof-stat { padding: 16px 6px; }
  .social-proof-num { font-size: 22px; }
  .social-proof-icon { font-size: 17px; }
  .social-proof-label { font-size: 10px; }
}
@media (max-width: 380px) {
  .choice-grid-five { grid-template-columns: 1fr; }
}

/* ============================================================
   생년월일 입력 (date-picker) — 더 큰 탭 영역
   ============================================================ */
.date-picker {
  display: flex;
  gap: 6px;
  align-items: center;
}
.date-picker select {
  flex: 1;
  min-width: 0;
  padding: 14px 26px 14px 10px;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,160,191,0.7) 50%),
    linear-gradient(135deg, rgba(232,160,191,0.7) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
}
.date-picker .dp-year   { flex: 1.4; }
.date-picker .dp-month  { flex: 0.85; }
.date-picker .dp-day    { flex: 0.85; }
.date-picker .dp-unit {
  font-size: 12px;
  color: var(--text-dim);
  flex-shrink: 0;
  margin: 0 2px 0 -2px;
}

.hour-picker { margin-top: 12px; }
.time-picker {
  display: flex;
  gap: 6px;
  align-items: center;
}

.birth-profile-extra {
  margin-top: 14px;
}

.birth-profile-extra .compact-group {
  margin-top: 12px;
}

.birth-profile-extra .unknown-time,
.birth-profile-extra .leap-option {
  margin-top: 8px;
  display: inline-flex;
}

.birth-profile-extra .input-hint {
  margin: 6px 0 0;
  color: var(--text-dim);
  font-size: 0.86rem;
}

.time-picker select {
  flex: 1;
  padding: 14px 26px 14px 10px;
  text-align: center;
  text-align-last: center;
  appearance: none;
  -webkit-appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(232,160,191,0.7) 50%),
    linear-gradient(135deg, rgba(232,160,191,0.7) 50%, transparent 50%);
  background-position:
    calc(100% - 14px) 50%,
    calc(100% - 9px) 50%;
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  background-color: rgba(255,255,255,0.06);
  border: 1.5px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  color: var(--text);
}

/* 라디오 토글 (양력/음력, 성별) */
.cal-toggle {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}
.cal-toggle-option {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.04);
  border: 1.5px solid rgba(255,255,255,0.08);
  border-radius: 10px;
  font-size: 14px;
  color: var(--text-soft);
  cursor: pointer;
  margin-bottom: 0;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.cal-toggle-option:has(input:checked) {
  border-color: var(--purple-light);
  background: rgba(124,77,188,0.18);
  color: var(--text);
  font-weight: 600;
}
.cal-toggle-option input[type="radio"] { margin-right: 4px; }

.note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--text-dim);
  line-height: 1.6;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border-left: 2px solid rgba(232,160,191,0.4);
}

/* ============================================================
   룬 점 — 카드 뽑기 & 결과
   ============================================================ */
.drawing-stage {
  display: flex;
  justify-content: center;
  gap: 16px;
  margin-bottom: 20px;
}
.rune-back {
  width: 72px;
  height: 110px;
  background: linear-gradient(135deg, #2a1a55, #1a0f3a);
  border: 1.5px solid rgba(245,215,110,0.5);
  border-radius: 10px;
  box-shadow: 0 0 16px rgba(124,77,188,0.4), inset 0 1px 0 rgba(255,255,255,0.06);
  animation: flip 1.4s ease-in-out infinite;
}
.rune-back:nth-child(2) { animation-delay: 0.15s; }
.rune-back:nth-child(3) { animation-delay: 0.30s; }

.rune-flipping {
  width: 72px;
  height: 110px;
  border-radius: 10px;
  animation: runeFlipOut 0.4s ease forwards;
}
@keyframes runeFlipOut {
  0%   { transform: rotateY(0deg);  opacity: 1;   }
  100% { transform: rotateY(90deg); opacity: 0.3; }
}

.rune-stone {
  width: 72px;
  min-width: 72px;
  height: 110px;
  background: radial-gradient(ellipse at 40% 30%, #4a3a78, #2a1a55 60%, #1a0f3a);
  border: 1.5px solid rgba(245,215,110,0.5);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: hidden;
  flex-shrink: 0;
  box-sizing: border-box;
}
.stone-symbol {
  font-size: 24px;
  color: #F5D76E;
  text-shadow: 0 0 10px rgba(245,215,110,0.8);
  line-height: 1;
  display: block;
  text-align: center;
}
.stone-symbol.stone-reversed {
  transform: rotate(180deg);
}
.stone-name {
  font-size: 10px;
  font-weight: 600;
  color: rgba(255,255,255,0.85);
  text-align: center;
  width: 100%;
  padding: 0 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}
.stone-dir {
  font-size: 9px;
  font-weight: 700;
  border-radius: 99px;
  padding: 1px 5px;
  background: rgba(126,232,162,0.15);
  color: #7ee8a2;
  display: block;
}
.stone-dir.stone-dir-rev {
  background: rgba(255,120,120,0.15);
  color: #ff9090;
}

.input-nav .nav-btn { min-width: 90px; }
.input-nav .nav-btn.submit-btn { min-width: 140px; }
.input-counter {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 600;
}

@media (max-width: 540px) {
  .input-dot label { display: none; }
  .input-indicator { padding: 10px 8px; }
  .input-line { margin-bottom: 0; }
}

/* ============================================================
   사주 페이지
   ============================================================ */
.saju-stage {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
}
.saju-pillar-back {
  width: 50px;
  height: 100px;
  background: linear-gradient(180deg, #3a2a68, #1f1140);
  border: 1.5px solid var(--gold);
  border-radius: 6px;
  box-shadow: 0 0 16px rgba(245,215,110,0.3);
  animation: pillar-pulse 1.6s ease-in-out infinite;
}
.saju-pillar-back:nth-child(2) { animation-delay: 0.12s; }
.saju-pillar-back:nth-child(3) { animation-delay: 0.24s; }
.saju-pillar-back:nth-child(4) { animation-delay: 0.36s; }
@keyframes pillar-pulse {
  0%, 100% { transform: scaleY(1);    opacity: 0.6; }
  50%      { transform: scaleY(1.05); opacity: 1;   }
}

.birth-info {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
  text-align: center;
}

.saju-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}
.saju-grid:has(.saju-pillar:nth-child(3):last-child) {
  grid-template-columns: repeat(3, 1fr);
}
.saju-pillar {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 8px;
  text-align: center;
}
.saju-pillar.day-pillar {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink) inset, 0 0 18px rgba(232,160,191,0.18);
  background: rgba(232,160,191,0.06);
}
.pillar-label {
  font-size: 11px;
  color: var(--text-dim);
  margin-bottom: 8px;
  letter-spacing: 0.04em;
}
.pillar-chinese {
  font-size: 22px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.1;
}
.pillar-korean {
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
}
.pillar-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin: 3px 0;
  padding: 0 4px;
}
.pillar-gan-zhi { font-weight: 600; color: var(--text-soft); }
.pillar-gan-zhi small { color: var(--text-dim); font-weight: 400; }
.pillar-element {
  color: var(--text-soft);
  font-size: 10px;
  padding: 1px 6px;
  border-radius: 8px;
  background: rgba(255,255,255,0.06);
}
.pillar-animal {
  margin-top: 8px;
  font-size: 11px;
  color: var(--text-dim);
}

.day-gan-callout {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: linear-gradient(135deg, rgba(245,215,110,0.10), rgba(232,160,191,0.08));
  border: 1px solid rgba(245,215,110,0.35);
  border-radius: 12px;
  margin-bottom: 18px;
}
.dgc-label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
}
.dgc-value {
  font-size: 22px;
  color: var(--gold);
  font-weight: 700;
  text-shadow: 0 0 12px rgba(245,215,110,0.3);
}
.dgc-element {
  margin-left: auto;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  color: #fff;
  font-weight: 700;
}

.elements-title {
  font-size: 13px;
  color: var(--text-dim);
  margin: 12px 0 8px;
  letter-spacing: 0.04em;
}
.elements-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.element-row {
  display: grid;
  grid-template-columns: 28px 1fr 28px;
  gap: 10px;
  align-items: center;
  font-size: 12px;
}
.element-name { color: var(--text-soft); text-align: center; }
.element-track {
  height: 8px;
  background: rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
}
.element-fill {
  height: 100%;
  transition: width 0.5s ease;
}
.element-count { text-align: right; color: var(--text-dim); }

/* ── 사주 분석 ── */
.analysis-guide {
  padding: 14px 16px;
  margin: 0 0 12px;
  border: 1px solid rgba(245,215,110,0.26);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(245,215,110,0.10), rgba(124,77,188,0.10));
}
.analysis-guide-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--gold);
  margin-bottom: 6px;
}
.analysis-guide-desc {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-soft);
  margin-bottom: 12px;
}
.analysis-guide-desc strong { color: var(--text); }
.analysis-term-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
}
.analysis-term {
  display: block;
  padding: 9px 10px;
  border-radius: 11px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.analysis-term b {
  display: block;
  color: var(--pink);
  font-size: 12px;
  margin-bottom: 3px;
}
.analysis-term em {
  display: block;
  font-style: normal;
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}
.analysis-callout {
  padding: 12px 16px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  margin-bottom: 10px;
  font-size: 14px;
  line-height: 1.7;
  color: var(--text-soft);
}
.analysis-callout strong { color: var(--pink); }
.analysis-callout.yongshin {
  border-color: rgba(245,215,110,0.4);
  background: linear-gradient(135deg, rgba(245,215,110,0.08), rgba(232,160,191,0.05));
}
.analysis-reason {
  display: block;
  margin-top: 6px;
  padding-top: 6px;
  border-top: 1px dashed rgba(255,255,255,0.10);
  font-size: 12px;
  color: var(--text-dim);
}
.easy-label {
  font-size: 11px;
  color: var(--gold-soft);
  letter-spacing: 0.06em;
  font-weight: 800;
  margin-bottom: 2px;
}
.easy-meaning {
  margin-top: 5px;
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.65;
}
.analysis-sub-title {
  font-size: 14px;
  color: var(--pink);
  margin: 16px 0 8px;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.interactions-list, .stars-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.interaction-tag, .star-tag {
  padding: 10px 14px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-soft);
}
.int-type {
  display: inline-block;
  padding: 1px 8px;
  border-radius: 6px;
  font-size: 10px;
  background: rgba(124,77,188,0.22);
  color: var(--purple-soft);
  margin-right: 4px;
}
.int-type-good { background: rgba(157,224,173,0.18); color: var(--good); }
.int-type-bad  { background: rgba(232,160,191,0.20); color: var(--pink); }
.int-pos, .star-pos { font-size: 11px; color: var(--text-dim); }
.int-desc, .star-desc { font-size: 12px; color: var(--text-dim); }
.twelve-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.twelve-tag {
  display: inline-block;
  padding: 6px 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  font-size: 13px;
  color: var(--text-soft);
}

.pillar-sipsin {
  font-size: 10px;
  color: var(--gold-soft);
  padding: 2px 6px;
  border-radius: 8px;
  background: rgba(245,215,110,0.16);
  margin: 2px auto 4px;
  display: inline-block;
  letter-spacing: 0.02em;
}
.pillar-sipsin-zhi {
  font-size: 9px;
  color: var(--text-dim);
  margin: 1px 0 4px;
}

/* 대운 */
.daeun-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.daeun-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.daeun-age { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.daeun-ganzhi { font-size: 16px; color: var(--text); font-weight: 700; }
.daeun-korean { font-size: 11px; color: var(--text-dim); margin: 2px 0; }
.daeun-elements { font-size: 10px; font-weight: 600; }
.daeun-elements span { margin: 0 2px; }
.daeun-current {
  border-color: var(--pink);
  box-shadow: 0 0 0 1px var(--pink) inset, 0 0 14px rgba(232,160,191,0.25);
  background: rgba(232,160,191,0.08);
}

@media (max-width: 540px) {
  .saju-grid { grid-template-columns: repeat(2, 1fr); }
  .daeun-grid { grid-template-columns: repeat(3, 1fr); }
  .analysis-callout { padding: 10px 12px; font-size: 13px; }
  .analysis-guide { padding: 12px; }
  .analysis-term-grid { grid-template-columns: 1fr; }
  .interaction-tag, .star-tag { padding: 8px 10px; font-size: 12px; }
  .twelve-list { gap: 6px; }
  .twelve-tag { padding: 5px 8px; font-size: 12px; }
  .months-grid { grid-template-columns: repeat(3, 1fr); }
}

.saju-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.saju-section {
  position: relative;
  padding: 0;
  overflow: hidden;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-left: 3px solid var(--purple-light);
}
.saju-section .section-title {
  font-size: 16px;
  color: #fff;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  margin: 0;
  padding: 12px 20px;
  border-bottom: none;
  letter-spacing: 0.04em;
  font-weight: 700;
}
.saju-section .section-body {
  padding: 20px 20px 16px;
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.9;
  color: var(--text-soft);
}
.section-easy-summary {
  margin: 0 20px 22px;
  padding: 14px 16px;
  border-radius: 14px;
  border: 1px solid rgba(245,215,110,0.28);
  background: linear-gradient(135deg, rgba(245,215,110,0.13), rgba(232,160,191,0.08));
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}
.section-easy-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--gold);
}
.section-easy-label::before {
  content: '💡';
  font-size: 13px;
}
.section-easy-text {
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.75;
  color: var(--text);
}
.section-easy-text .kw {
  color: var(--gold);
  font-weight: 800;
}
.saju-section.first-section {
  border-left-color: var(--pink);
}
.saju-section.first-section .section-title {
  background: linear-gradient(90deg, var(--pink), var(--gold));
  color: #2a1530;
}

/* 키워드 강조 */
.section-body .kw {
  background: linear-gradient(180deg, transparent 60%, rgba(245,215,110,0.35) 60%);
  font-weight: 700;
  color: var(--text);
  padding: 0 2px;
}

/* ============================================================
   재회 사주 리포트
   ============================================================ */
.form-section-title {
  font-size: 14px;
  color: var(--pink);
  margin: 12px 0 10px;
  letter-spacing: 0.06em;
  font-weight: 700;
}
.form-divider {
  border: none;
  border-top: 1px dashed var(--card-border);
  margin: 24px 0 18px;
}

.reunion-stage {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 24px;
  margin-bottom: 20px;
  height: 80px;
}
.reunion-orb {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  animation: reunion-orbit 1.6s ease-in-out infinite;
}
.reunion-orb-1 {
  background: radial-gradient(circle, var(--gold-soft), var(--gold));
  box-shadow: 0 0 18px rgba(245,215,110,0.6);
}
.reunion-orb-2 {
  background: radial-gradient(circle, var(--pink-soft), var(--purple));
  box-shadow: 0 0 18px rgba(232,160,191,0.6);
  animation-delay: 0.4s;
}
@keyframes reunion-orbit {
  0%, 100% { transform: translateX(0);    }
  50%      { transform: translateX(20px); }
}

.reunion-pair {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 14px;
  align-items: stretch;
  margin-bottom: 18px;
}
.reunion-side {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 16px;
  text-align: center;
}
.reunion-label {
  font-size: 12px;
  color: var(--text-dim);
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.reunion-saju {
  font-size: 18px;
  color: var(--text);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin-bottom: 10px;
}
.reunion-dayGan {
  font-size: 13px;
  color: var(--text-soft);
}
.reunion-dayGan .dayGan-element {
  display: inline-block;
  margin-left: 6px;
  padding: 2px 10px;
  border-radius: 10px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}
.reunion-arrow {
  display: flex;
  align-items: center;
  font-size: 24px;
  color: var(--pink);
}

.relation-callout {
  padding: 16px 18px;
  background: linear-gradient(135deg, rgba(245,215,110,0.12), rgba(124,77,188,0.14));
  border: 1px solid rgba(245,215,110,0.35);
  border-radius: 12px;
}
.relation-type {
  font-size: 16px;
  color: var(--pink);
  font-weight: 700;
  margin-bottom: 6px;
}
.relation-desc {
  font-size: 14px;
  color: var(--text-soft);
  line-height: 1.7;
}

.months-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px;
}
.month-card {
  background: rgba(255,255,255,0.04);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 6px;
  text-align: center;
}
.month-label { font-size: 11px; color: var(--text-dim); margin-bottom: 4px; }
.month-ganzhi {
  font-size: 16px;
  color: var(--text);
  font-weight: 700;
  line-height: 1.2;
}
.month-korean { font-size: 11px; color: var(--text-dim); margin: 4px 0; }
.month-element {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 11px;
  color: #fff;
  font-weight: 700;
}

@media (max-width: 540px) {
  .reunion-pair { grid-template-columns: 1fr; }
  .reunion-arrow { justify-content: center; transform: rotate(90deg); margin: 4px auto; }
  .months-grid { grid-template-columns: repeat(3, 1fr); }
}

/* 오행 분포 차트 영역 */
.elements-wrap {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 24px;
  align-items: center;
}
.elements-chart {
  max-width: 260px;
  margin: 0 auto;
}
@media (max-width: 540px) {
  .elements-wrap { grid-template-columns: 1fr; gap: 12px; }
}

.reunion-radar-wrap {
  max-width: 340px;
  margin: 12px auto 8px;
}
.radar-legend {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--text-soft);
}
.legend-item { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}
.legend-dot.user-dot    { background: var(--gold); }
.legend-dot.partner-dot { background: var(--pink); }

.months-flow-wrap {
  height: 120px;
  margin: 8px 0 16px;
}
.card-sub {
  margin: -6px 0 14px;
  font-size: 13px;
  color: var(--text-dim);
}

.relation-diagram { margin-top: 14px; text-align: center; }
.relation-svg { width: 100%; max-width: 340px; height: auto; }

/* ============================================================
   결과 5단계 페이지
   ============================================================ */
/* 입력 단계 인디케이터 (재회 사주 등) */
.input-indicator {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  margin-bottom: 22px;
  padding: 14px 8px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.input-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}
.input-dot span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.input-dot label {
  font-size: 11px;
  color: var(--text-dim);
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 0;
}
.input-dot.active span {
  background: var(--grad-button);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(124,77,188,0.25);
}
.input-dot.active label { color: var(--pink); font-weight: 700; }
.input-dot.done span { background: var(--pink); color: #fff; }
.input-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 0 4px 18px;
  min-width: 24px;
}

.step-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 22px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.step-dot {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
}
.step-dot span {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255,255,255,0.08);
  color: var(--text-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 14px;
  transition: all 0.2s;
}
.step-dot label {
  font-size: 11px;
  color: var(--text-dim);
  cursor: pointer;
  letter-spacing: 0.02em;
  text-align: center;
  white-space: nowrap;
  margin-bottom: 0;
}
.step-dot.active span {
  background: var(--grad-button);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(124,77,188,0.25);
}
.step-dot.active label { color: var(--pink); font-weight: 700; }
.step-dot.done span { background: var(--pink); color: #fff; }
.step-dot.done label { color: var(--text); }
.step-line {
  flex: 1;
  height: 2px;
  background: rgba(255,255,255,0.08);
  margin: 0 4px 18px;
}

.step-page { animation: stepFadeIn 0.25s ease; }
@keyframes stepFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0);    }
}

.step-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 18px 0 12px;
  padding: 12px 14px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.nav-btn {
  background: var(--grad-button);
  color: #fff;
  border: none;
  border-radius: 10px;
  padding: 11px 18px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  min-width: 90px;
  width: auto;
  margin: 0;
  box-shadow: 0 4px 14px rgba(124,77,188,0.3);
}
.nav-btn:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232,160,191,0.4);
}
.nav-btn:disabled {
  background: rgba(255,255,255,0.08);
  color: var(--text-mute);
  cursor: not-allowed;
  box-shadow: none;
}
.step-counter {
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 600;
}

/* ============================================================
   이메일 수집
   ============================================================ */
.email-collect {
  margin-top: 24px;
  padding: 26px 22px 22px;
  text-align: center;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(232,160,191,0.18), transparent 70%),
    var(--card-bg);
  border: 1px solid var(--card-border-strong);
  border-radius: 16px;
  position: relative;
  overflow: hidden;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.email-collect-icon {
  display: block;
  width: 46px;
  height: 36px;
  margin: 0 auto 12px;
  color: var(--pink);
  opacity: 0.85;
}
.email-collect-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--pink);
  margin: 0 0 4px;
  letter-spacing: 0.02em;
}
.email-collect-desc {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0 0 16px;
  line-height: 1.5;
}
.email-collect-field {
  display: flex;
  align-items: center;
  background: rgba(255,255,255,0.06);
  border: 1.5px solid var(--card-border);
  border-radius: 12px;
  padding: 0 4px 0 0;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.email-collect-field:focus-within {
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(124,77,188,0.18);
}
.email-collect-at {
  flex-shrink: 0;
  width: 42px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  color: var(--pink);
  opacity: 0.75;
  border-right: 1px solid var(--card-border);
  margin-right: 2px;
}
.email-collect-field input[type="email"] {
  flex: 1;
  min-width: 0;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 13px 10px;
  font-family: inherit;
  font-size: 15px;
  outline: none;
}
.email-collect-field input[type="email"]::placeholder {
  color: var(--text-mute);
}
.email-collect-foot {
  margin: 12px 0 0;
  font-size: 11px;
  color: var(--text-mute);
  line-height: 1.5;
}
.email-collect--result { margin-top: 20px; }
.email-collect-btn {
  display: inline-block;
  margin-top: 14px;
  padding: 12px 32px;
  width: auto;
  background: var(--grad-button);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  box-shadow: 0 4px 14px rgba(124,77,188,0.35);
}
.email-collect-btn:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232,160,191,0.45);
}
.email-collect-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none; }

/* ============================================================
   추가 질문 채팅
   ============================================================ */
.followup-card h2 { margin-bottom: 6px; }
.followup-chat {
  max-height: 400px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 14px;
}
.chat-bubble {
  padding: 12px 16px;
  border-radius: 16px;
  font-size: 14px;
  line-height: 1.75;
  max-width: 88%;
  white-space: pre-wrap;
  word-break: break-word;
}
.chat-q {
  align-self: flex-end;
  background: var(--grad-button);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 2px 12px rgba(124,77,188,0.3);
}
.chat-a {
  align-self: flex-start;
  background: rgba(255,255,255,0.06);
  border: 1px solid var(--card-border);
  color: var(--text-soft);
  border-bottom-left-radius: 4px;
}
.chat-loading { color: var(--text-dim); font-style: italic; }
.chat-error { color: var(--error); }
.followup-input-wrap {
  display: flex;
  gap: 8px;
  align-items: flex-end;
}
.followup-input-wrap textarea {
  flex: 1;
  min-height: 44px;
  resize: none;
}
.followup-send-btn {
  flex-shrink: 0;
  padding: 12px 18px;
  width: auto;
  background: var(--grad-button);
  color: #fff;
  border: none;
  border-radius: 12px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s, box-shadow 0.2s;
  margin: 0;
  box-shadow: 0 4px 14px rgba(124,77,188,0.3);
}
.followup-send-btn:hover:not(:disabled) {
  opacity: 0.94;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(232,160,191,0.4);
}
.followup-send-btn:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

@media (max-width: 540px) {
  .step-dot label { display: none; }
  .step-indicator { padding: 12px 4px; }
}

/* ============================================================
   스크롤 페이드인
   ============================================================ */
.fade-in-on-scroll {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-on-scroll.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ============================================================
   모바일 최적화 (375px 우선)
   ============================================================ */
@media (max-width: 480px) {
  h1 { font-size: 23px; }
  h2 { font-size: 16px; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .saju-section .section-body { padding: 16px 16px 12px; font-size: 14.5px; }
  .section-easy-summary { margin: 0 16px 18px; padding: 12px 13px; }
  .section-easy-text { font-size: 13.5px; }
  .saju-section .section-title { padding: 11px 16px; font-size: 15px; }
  button { padding: 15px 18px; font-size: 15px; }
  input[type="text"], input[type="email"], input[type="date"], select, textarea {
    padding: 13px 14px; font-size: 15px;
  }
  .interpretation-text { font-size: 14.5px; }
  .relation-callout { padding: 14px 14px; }
  .relation-type { font-size: 15px; }
  .relation-desc { font-size: 13.5px; }
}

/* 작은 폰 (320~374px) */
@media (max-width: 374px) {
  .container { padding: 14px 12px 56px; }
  h1 { font-size: 21px; }
  .choice-symbol { font-size: 22px; }
  .saju-grid { grid-template-columns: repeat(2, 1fr); }
  .date-picker { gap: 4px; }
  .date-picker .dp-unit { font-size: 11px; }
}

/* ============================================================
   캐릭터 이미지 — Floating / Glow / 별빛 파티클 / Tilt
   ============================================================ */
@keyframes floating {
  0%, 100% { transform: translateY(0px); }
  50%      { transform: translateY(-18px); }
}

@keyframes glowPulse {
  0%, 100% {
    filter:
      drop-shadow(0 0 20px rgba(124, 77, 188, 0.5))
      drop-shadow(0 0 40px rgba(232, 160, 191, 0.3));
  }
  50% {
    filter:
      drop-shadow(0 0 35px rgba(124, 77, 188, 0.9))
      drop-shadow(0 0 60px rgba(232, 160, 191, 0.6));
  }
}

@keyframes starTwinkle {
  0%, 100% { opacity: 0; transform: scale(0.5) rotate(0deg); }
  50%      { opacity: 1; transform: scale(1.2) rotate(180deg); }
}









.choice-card:hover 



.page-character {
  width: 180px;
  height: 180px;
  object-fit: cover;
  border-radius: 50%;
  margin: 0 auto 16px;
  display: block;
}

@media (max-width: 480px) {
  
  .page-character { width: 140px; height: 140px; }
}

/* ============================================================
   Lottie 애니메이션 래퍼
   ============================================================ */

.lottie-wrap 

.choice-card:hover 

@keyframes floatSlow {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}

/* ============================================================
   히어로 섹션 (전면 리뉴얼)
   ============================================================ */
.hero-section {
  position: relative;
  min-height: 60vh;
  overflow: hidden;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 -14px 28px;
  border-radius: 28px;
  isolation: isolate;
}



.hero-video-bg {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.6s ease;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
}
.hero-video-bg.loaded {
  opacity: 0.8;
}

.hero-inner {
  position: relative;
  z-index: 1;
}

.hero-section 

.hero-title {
  font-size: 34px;
  font-weight: 900;
  letter-spacing: -0.01em;
  line-height: 1.25;
  margin: 14px 0 12px;
  background: linear-gradient(135deg, #FFF6E6 0%, #F8E49A 35%, #F3C2D6 70%, #C9A8FF 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  filter: drop-shadow(0 2px 12px rgba(0, 0, 0, 0.65)) drop-shadow(0 4px 24px rgba(245, 215, 110, 0.25));
}

.hero-subtitle {
  font-size: 14px;
  color: var(--text-soft);
  margin: 0 auto 22px;
  max-width: 420px;
  line-height: 1.6;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.75), 0 1px 3px rgba(0, 0, 0, 0.6);
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 28px;
  border-radius: 999px;
  background: linear-gradient(135deg, #7C4DBC 0%, #E8A0BF 60%, #F5D76E 110%);
  color: #1a0e35;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  letter-spacing: -0.005em;
  box-shadow:
    0 12px 30px rgba(124, 77, 188, 0.45),
    0 0 24px rgba(232, 160, 191, 0.3),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  position: relative;
  overflow: hidden;
}
.hero-cta::before {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(110deg, transparent, rgba(255,255,255,0.55), transparent);
  transform: skewX(-20deg);
  animation: ctaShine 3s ease-in-out infinite;
}
@keyframes ctaShine {
  0%   { left: -120%; }
  60%  { left: 130%; }
  100% { left: 130%; }
}
.hero-cta:hover {
  transform: translateY(-3px);
  box-shadow:
    0 16px 38px rgba(124, 77, 188, 0.6),
    0 0 36px rgba(232, 160, 191, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.hero-cta-arrow {
  display: inline-block;
  transition: transform 0.2s ease;
}
.hero-cta:hover .hero-cta-arrow { transform: translateX(4px); }

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 18px;
  font-size: 12px;
  color: var(--text-dim);
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.7);
}
.hero-meta-item { white-space: nowrap; }
.hero-meta-dot { opacity: 0.5; }

/* ============================================================
   카드 강화 — Lottie 포함, 글래스모피즘 +
   ============================================================ */
.choice-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow:
    0 6px 18px rgba(15, 10, 30, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}
.choice-card:hover {
  border-color: rgba(245, 215, 110, 0.5);
  box-shadow:
    0 18px 42px rgba(124, 77, 188, 0.4),
    0 0 30px rgba(232, 160, 191, 0.28),
    0 0 0 1px rgba(245, 215, 110, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.12);
}
.choice-card-featured {
  background:
    linear-gradient(180deg, rgba(245, 215, 110, 0.10), rgba(232, 160, 191, 0.06)),
    linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border-color: rgba(245, 215, 110, 0.4);
}

@media (max-width: 480px) {
  .hero-section { margin: 4px -10px 20px; padding: 18px 14px 18px; border-radius: 22px; min-height: calc(100svh - 58px) !important; height: calc(100svh - 58px) !important; max-height: 760px; box-sizing: border-box; }
  .hero-inner { max-width: 100%; }
  .hero-title { font-size: 26px; margin: 10px 0 10px; }
  .hero-subtitle { font-size: 13px; max-width: 300px; margin-bottom: 18px; line-height: 1.45; }
  .hero-cta { padding: 12px 22px; font-size: 14px; max-width: 88vw; white-space: nowrap; }
  .hero-meta { gap: 5px 8px; margin-top: 16px; font-size: 12px; }
}
@media (max-width: 374px) {
  .hero-title { font-size: 22px; }
  
}

.page-header-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  margin-bottom: 24px;
  min-height: 280px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1E1040 0%, #2d1060 50%, #1a0830 100%);
}
.page-header-video {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.page-header-video.loaded {
  opacity: 0.7;
}
.page-header-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 40px 20px;
  background: linear-gradient(to bottom, rgba(15,10,30,0.3), rgba(15,10,30,0.7));
  width: 100%;
}
.card-video-bg {
  position: absolute; top: 0; left: 0;
  width: 100%; height: 100%;
  object-fit: cover; opacity: 0.45;
  z-index: 0; border-radius: inherit; pointer-events: none;
}
.choice-card { position: relative; overflow: hidden; }
.choice-card > *:not(.card-video-bg) { position: relative; z-index: 1; }


/* hero-section 상단 동영상 overflow 버그 수정 */
.hero-section {
  isolation: isolate;
}

/* 모바일 대응 */
@media (max-width: 480px) {
  
  
}

/* ── 모바일 히어로 overflow 버그 수정 ── */
.container { overflow-x: hidden; }
.hero-section { overflow: hidden; isolation: isolate; }
.hero-section .hero-video-bg { 
  position: absolute; top:0; left:0; 
  width:100%; height:100%; 
  object-fit:cover; z-index:0; 
}

/* ── 카드 이미지 크게, 텍스트 간결하게 ── */




/* 텍스트 간결하게: 필요없는 항목 숨김 */








.choice-badge {
  font-size: 11px;
  padding: 3px 10px;
}

/* 모바일에서 카드 2열 유지 */
@media (max-width: 480px) {
  .choice-grid-two { 
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
  }
  .choice-grid-five { 
    grid-template-columns: 1fr 1fr; 
    gap: 10px;
  }
  
  
  
}
/* ── 카드: 동영상 상단 + 텍스트 하단 분리 ── */
.choice-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 0 !important;
  position: relative;
}

.card-video-wrap {
  width: 100%;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
  border-radius: 12px 12px 0 0;
  position: relative;
  background: var(--bg-card-soft);
}

.card-video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.card-body {
  padding: 14px 16px 16px;
  background: var(--bg-card);
  border-radius: 0 0 12px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.card-body h2 {
  font-size: 17px;
  margin: 0 0 2px;
  color: var(--accent-soft);
  font-weight: 700;
}

.card-body .choice-badge {
  position: static;
  display: inline-block;
  align-self: flex-start;
  font-size: 11px;
  padding: 2px 8px;
  margin-bottom: 4px;
}

.card-body .choice-when {
  font-size: 12px;
  color: var(--text);
  margin: 0;
  line-height: 1.5;
  font-style: italic;
}

.card-body .choice-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.5;
}

.card-body .choice-origin {
  font-size: 11px;
  color: var(--text-dim);
  opacity: 0.7;
  margin: 4px 0 0;
}

.card-body .choice-note { display: none; }

/* 모바일 */
@media (max-width: 600px) {
  .card-video-wrap { aspect-ratio: 16/9; }
  .card-body { padding: 12px 14px; }
  .card-body h2 { font-size: 15px; }
}

/* ── 카테고리 섹션 ── */
.cat-section {
  margin-bottom: 48px;
}

.cat-header {
  padding: 0 4px 16px;
}

.cat-tag {
  display: inline-block;
  background: rgba(232,160,191,0.15);
  color: #E8A0BF;
  border: 1px solid rgba(232,160,191,0.3);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
  letter-spacing: 0.05em;
}

.cat-title {
  font-size: 22px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 6px;
  line-height: 1.3;
}

.cat-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
  line-height: 1.6;
}

/* 캐러셀 공통 */
.carousel-track {
  display: flex;
  gap: 12px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0 12px;
  margin: 0 -20px;
  padding-left: 20px;
  padding-right: 20px;
}
.carousel-track::-webkit-scrollbar { display: none; }

.carousel-card {
  flex: 0 0 55vw;
  max-width: 180px;
  scroll-snap-align: start;
  border-radius: 18px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 3/4;
  display: block;
  text-decoration: none;
  box-shadow: 0 8px 32px rgba(0,0,0,0.45);
  transition: transform 0.2s ease;
  background: linear-gradient(135deg, #1E1040 0%, #2d1060 50%, #1a0830 100%);
}

.carousel-card-featured {
  flex: 0 0 63vw;
  max-width: 198px;
}

.carousel-card:hover { transform: translateY(-4px); }

.carousel-video {
  width: 100%; height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0; left: 0;
  z-index: 0;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.carousel-video.loaded {
  opacity: 1;
}

.carousel-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  z-index: 1;
  padding: 48px 18px 20px;
  background: linear-gradient(to top, rgba(0,0,0,0.88) 0%, rgba(0,0,0,0.2) 70%, transparent 100%);
}

.carousel-badge {
  display: inline-block;
  background: rgba(245,215,110,0.2);
  color: #F5D76E;
  border: 1px solid rgba(245,215,110,0.4);
  font-size: 10px;
  font-weight: 700;
  padding: 3px 9px;
  border-radius: 20px;
  margin-bottom: 7px;
  letter-spacing: 0.03em;
}

.carousel-card-featured .carousel-badge {
  background: rgba(232,160,191,0.25);
  color: #E8A0BF;
  border-color: rgba(232,160,191,0.5);
}

.carousel-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 5px;
  line-height: 1.2;
  text-shadow: 0 2px 8px rgba(0,0,0,0.5);
}

.carousel-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.8);
  margin: 0;
  line-height: 1.5;
}

@media (min-width: 600px) {
  .carousel-card { flex: 0 0 180px; }
  .carousel-card-featured { flex: 0 0 198px; }
  .cat-title { font-size: 26px; }
}

/* ── 캐러셀 화살표 버튼 ── */
.carousel-wrap {
  position: relative;
}
.carousel-btn {
  display: none; /* 모바일에선 숨김 */
}
@media (min-width: 768px) {
  .carousel-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: calc(50% - 18px); /* translateY 대신 고정값 — hover 영향 없음 */
    z-index: 20;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: rgba(30, 10, 60, 0.82);
    backdrop-filter: blur(8px);
    color: #e8c8ff;
    font-size: 20px;
    line-height: 36px;
    padding: 0;
    cursor: pointer;
    transition: opacity 0.2s, background 0.2s;
    box-shadow: 0 2px 16px rgba(0,0,0,0.5);
    opacity: 0.7;
    pointer-events: auto;
    /* transform 속성 일절 사용 안 함 */
  }
  .carousel-btn:hover {
    background: rgba(120, 40, 180, 0.92);
    opacity: 1;
  }
  .carousel-btn.carousel-btn-hidden {
    opacity: 0;
    pointer-events: none;
  }
  .carousel-btn-left  { left: 8px; }
  .carousel-btn-right { right: 8px; }
}

/* ── 풀이 결과 가독성 스타일 ─────────────────────────────── */
.intro-text {
  font-size: 1.05rem;
  line-height: 1.85;
  color: rgba(255,255,255,0.92);
  margin-bottom: 1.2rem;
  font-style: italic;
  opacity: 1;
}

.interpretation-text {
  font-size: 0.97rem;
  line-height: 1.9;
  color: rgba(255,255,255,0.88);
}

/* AI 상세풀이 카드 섹션 */
.interpretation-text .reading-section-card {
  position: relative;
  overflow: hidden;
  margin: 0 0 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  border-left: 3px solid var(--purple-light);
  background: linear-gradient(135deg, rgba(124,77,188,0.15), rgba(232,160,191,0.07));
  box-shadow: 0 12px 34px rgba(0,0,0,0.18), inset 0 1px 0 rgba(255,255,255,0.05);
}
.interpretation-text .reading-section-card:first-child {
  border-left-color: var(--pink);
}
.interpretation-text .reading-section-card:first-child .r-heading {
  background: linear-gradient(90deg, var(--pink), var(--gold));
  color: #2a1530;
}
.interpretation-text .reading-section-body {
  padding: 18px 18px 16px;
}

/* 단락 */
.interpretation-text .r-para {
  margin-bottom: 1rem;
  padding: 0;
}
.interpretation-text > .r-para {
  margin: 0 0 14px;
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.045);
}
.interpretation-text .r-para:last-child,
.interpretation-text .reading-section-body .r-para:last-child {
  margin-bottom: 0;
}

/* ## 소제목 — 카드 제목 */
.interpretation-text .r-heading {
  font-size: 1rem;
  font-weight: 800;
  color: #fff;
  margin: 0;
  padding: 12px 18px;
  background: linear-gradient(90deg, var(--purple), var(--pink));
  border-left: none;
  border-radius: 0;
  letter-spacing: 0.03em;
  display: block;
}
.interpretation-text > .r-heading {
  margin: 0 0 12px;
  border-radius: 12px;
}

/* 강조(**bold**) */
.r-bold,
.interpretation-text .r-bold,
.section-body .r-bold {
  font-weight: 800;
  color: #e8c8ff;
  background: linear-gradient(180deg, transparent 58%, rgba(232,160,191,0.24) 58%);
  padding: 0 2px;
  border-radius: 3px;
}

/* 구분선(---) */
.interpretation-text .r-divider {
  border: none;
  border-top: 1px solid rgba(255,255,255,0.1);
  margin: 1.4rem 0;
}

/* 모바일 */
@media (max-width: 480px) {
  .interpretation-text { font-size: 0.93rem; line-height: 1.85; }
  .interpretation-text .r-heading { font-size: 0.97rem; padding: 11px 15px; }
  .interpretation-text .reading-section-body { padding: 15px 15px 14px; }
  .interpretation-text > .r-para { padding: 14px 15px; }
}


/* ── 결제 잠금 오버레이 ── */
#lock-overlay {
  margin: 32px 0 0;
  display: flex;
  justify-content: center;
}

.lock-box {
  background: linear-gradient(135deg, rgba(124,77,188,0.18), rgba(232,160,191,0.10));
  border: 1.5px solid rgba(232,160,191,0.35);
  border-radius: 20px;
  padding: 36px 28px 32px;
  text-align: center;
  max-width: 420px;
  width: 100%;
  backdrop-filter: blur(8px);
}

.lock-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.lock-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin: 0 0 10px;
}

.lock-desc {
  font-size: 14px;
  color: rgba(255,255,255,0.72);
  line-height: 1.7;
  margin: 0 0 22px;
}

.lock-pay-btn {
  display: inline-block;
  background: linear-gradient(135deg, #7C4DBC, #E8A0BF);
  color: #fff;
  border: none;
  border-radius: 50px;
  padding: 14px 32px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 6px 24px rgba(124,77,188,0.45);
  width: 100%;
  margin-bottom: 12px;
}

.lock-pay-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px rgba(124,77,188,0.6);
}

.lock-note {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin: 0;
}

/* ============================================================
   룬 결과 섹션
   ============================================================ */

.rune-result-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 40px;
}
.rune-result-wrap[hidden] {
  display: none !important;
}

/* 섹션 블록 */
.rune-section-block {
  background: var(--card-bg, rgba(20,12,45,0.82));
  border: 1px solid var(--card-border, rgba(124,77,188,0.22));
  border-radius: 18px;
  padding: 22px 20px;
  margin-bottom: 14px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.rune-section-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.07);
}
.rune-section-icon {
  font-size: 16px;
  color: #F5D76E;
  line-height: 1;
  flex-shrink: 0;
}
.rune-section-label {
  font-size: 15px;
  font-weight: 700;
  color: rgba(255,255,255,0.88);
  margin: 0;
}
.rune-intro-body {
  font-size: 16px;
  font-weight: 500;
  color: rgba(255,255,255,0.9);
  line-height: 1.75;
  margin: 0;
}

/* ── 룬 카드 그리드 ── */
.runes-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.rune-card {
  background: linear-gradient(175deg, #1c1044 0%, #100930 100%);
  border: 1px solid rgba(124,77,188,0.35);
  border-radius: 16px;
  padding: 18px 12px 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  position: relative;
  overflow: hidden;
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease;
  box-shadow: 0 4px 20px rgba(0,0,0,0.3);
  cursor: default;
}

/* 상단 퍼플 글로우 라인 */
.rune-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, rgba(124,77,188,0.8), transparent);
}

.rune-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245,215,110,0.4);
  box-shadow: 0 12px 32px rgba(124,77,188,0.4);
}

/* 포지션 라벨 */
.rune-card-pos {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: #E8A0BF;
  background: rgba(232,160,191,0.12);
  border: 1px solid rgba(232,160,191,0.25);
  border-radius: 99px;
  padding: 3px 10px;
  margin-bottom: 14px;
  text-align: center;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* 룬 심볼 원 */
.rune-card-stone {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  background: radial-gradient(ellipse at 38% 30%, #3a2b6e, #1a0e44 70%);
  border: 1.5px solid rgba(245,215,110,0.5);
  box-shadow:
    0 0 0 5px rgba(124,77,188,0.12),
    0 0 20px rgba(124,77,188,0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  flex-shrink: 0;
  transition: box-shadow 0.22s ease, border-color 0.22s ease;
}

.rune-card:hover .rune-card-stone {
  border-color: rgba(245,215,110,0.8);
  box-shadow:
    0 0 0 5px rgba(245,215,110,0.1),
    0 0 28px rgba(245,215,110,0.35);
}

.rune-card-sym {
  font-size: 32px;
  line-height: 1;
  color: #F5D76E;
  text-shadow:
    0 0 8px rgba(245,215,110,0.9),
    0 0 20px rgba(245,215,110,0.4);
}
.rune-card-sym--rev {
  display: inline-block;
  transform: rotate(180deg);
}

/* 이름 */
.rune-card-name {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 3px;
  text-align: center;
  letter-spacing: 0.02em;
}
.rune-card-korean {
  font-size: 12px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 10px;
  text-align: center;
}

/* 방향 뱃지 */
.rune-card-dir {
  font-size: 10px;
  font-weight: 700;
  border-radius: 99px;
  padding: 3px 10px;
  margin-bottom: 12px;
}
.rune-card-dir.is-up {
  background: rgba(126,232,162,0.12);
  color: #7ee8a2;
  border: 1px solid rgba(126,232,162,0.25);
}
.rune-card-dir.is-rev {
  background: rgba(255,110,110,0.12);
  color: #ff9090;
  border: 1px solid rgba(255,110,110,0.25);
}

/* 키워드 */
.rune-card-keywords {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  text-align: center;
  line-height: 1.6;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.07);
  width: 100%;
}

/* ── 모바일: 3열 → 1열 세로 ── */
@media (max-width: 560px) {
  .runes-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  /* 모바일: 심볼 왼쪽 + 텍스트 오른쪽 가로 레이아웃 */
  .rune-card {
    flex-direction: row;
    align-items: flex-start;
    padding: 14px 14px 12px;
    gap: 14px;
    flex-wrap: wrap;
  }

  /* 포지션 라벨: 전체 너비 차지 */
  .rune-card-pos {
    width: 100%;
    margin-bottom: 8px;
    order: -1;
    text-align: left;
  }

  /* 심볼 원: 고정 크기 왼쪽 */
  .rune-card-stone {
    width: 56px;
    height: 56px;
    flex-shrink: 0;
    margin-bottom: 0;
    order: 1;
  }
  .rune-card-sym { font-size: 26px; }

  /* 나머지 텍스트: 오른쪽에 세로로 */
  .rune-card-name,
  .rune-card-korean,
  .rune-card-dir {
    text-align: left;
    order: 2;
    flex-basis: calc(100% - 70px);
  }
  .rune-card-name  { font-size: 15px; margin-bottom: 2px; width: calc(100% - 70px); }
  .rune-card-korean { font-size: 12px; margin-bottom: 4px; width: calc(100% - 70px); }
  .rune-card-dir   { margin-bottom: 0; width: calc(100% - 70px); }

  /* 키워드: 심볼 아래 전체 너비 */
  .rune-card-keywords {
    order: 3;
    width: 100%;
    text-align: left;
    border-top: 1px solid rgba(255,255,255,0.07);
    padding-top: 8px;
    margin-top: 6px;
    font-size: 11px;
  }
}

/* ============================================================
   노른 결과 룬 카드 — 텍스트 나열 대신 시각 카드형 UI
   ============================================================ */
.norn-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.norn-card {
  position: relative;
  overflow: hidden;
  min-height: 270px;
  padding: 18px 16px 16px;
  border-radius: 20px;
  background:
    radial-gradient(circle at 50% 18%, rgba(245, 215, 110, 0.16), transparent 27%),
    linear-gradient(160deg, rgba(43, 22, 86, 0.95), rgba(18, 9, 48, 0.96));
  border: 1px solid rgba(232, 160, 191, 0.24);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.32),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.norn-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, transparent 0 34%, rgba(255, 255, 255, 0.07) 42%, transparent 52%),
    radial-gradient(circle at 15% 85%, rgba(124, 77, 188, 0.22), transparent 30%);
  pointer-events: none;
}

.norn-card::after {
  content: '';
  position: absolute;
  top: 14px;
  bottom: 14px;
  left: 50%;
  width: 1px;
  background: linear-gradient(to bottom, transparent, rgba(245, 215, 110, 0.34), transparent);
  opacity: 0.45;
  pointer-events: none;
}

.norn-card:hover {
  transform: translateY(-5px);
  border-color: rgba(245, 215, 110, 0.45);
  box-shadow:
    0 18px 42px rgba(0, 0, 0, 0.42),
    0 0 30px rgba(124, 77, 188, 0.22);
}

.norn-card-top,
.norn-rune-title,
.norn-card .orientation,
.norn-card .keywords,
.norn-divider {
  position: relative;
  z-index: 1;
}

.norn-card-top {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  width: 100%;
}

.norn-orb {
  width: 86px;
  height: 86px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at 34% 26%, rgba(255, 255, 255, 0.35), transparent 18%),
    radial-gradient(circle, rgba(52, 34, 96, 0.98), rgba(16, 8, 44, 0.98));
  border: 1.5px solid rgba(245, 215, 110, 0.6);
  box-shadow:
    0 0 0 7px rgba(124, 77, 188, 0.16),
    0 0 26px rgba(245, 215, 110, 0.24),
    inset 0 0 18px rgba(0, 0, 0, 0.35);
}

.norn-orb.is-reversed .norn-rune-symbol {
  transform: rotate(180deg);
}

.norn-rune-symbol {
  display: inline-block;
  color: #F5D76E;
  font-size: 42px;
  line-height: 1;
  text-shadow:
    0 0 10px rgba(245, 215, 110, 0.9),
    0 0 24px rgba(245, 215, 110, 0.38);
}

.norn-time {
  display: flex;
  flex-direction: column;
  gap: 5px;
  align-items: center;
}

.norn-name {
  color: #E8A0BF;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.norn-en {
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  font-weight: 700;
}

.norn-phase {
  color: rgba(255, 255, 255, 0.72);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(232, 160, 191, 0.10);
  border: 1px solid rgba(232, 160, 191, 0.16);
}

.norn-divider {
  width: 100%;
  height: 1px;
  margin: 16px 0 14px;
  background: linear-gradient(90deg, transparent, rgba(245, 215, 110, 0.32), transparent);
}

.norn-rune-title {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 7px;
  flex-wrap: wrap;
  margin-bottom: 10px;
}

.norn-card .rune-name {
  color: #fff;
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0.02em;
}

.norn-card .rune-korean {
  color: rgba(255, 255, 255, 0.58);
  font-size: 13px;
  font-weight: 700;
}

.norn-card .orientation {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 76px;
  padding: 5px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  margin-bottom: 13px;
}

.norn-card .orientation.upright {
  color: #7ee8a2;
  background: rgba(126, 232, 162, 0.12);
  border: 1px solid rgba(126, 232, 162, 0.26);
}

.norn-card .orientation.reversed {
  color: #ffb0b0;
  background: rgba(255, 110, 110, 0.12);
  border: 1px solid rgba(255, 110, 110, 0.27);
}

.norn-card .keywords {
  width: 100%;
  color: rgba(255, 255, 255, 0.74);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.55;
  padding: 11px 12px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.055);
  border: 1px solid rgba(255, 255, 255, 0.075);
}

@media (max-width: 720px) {
  .norn-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .norn-card {
    min-height: 0;
    padding: 16px 15px;
    align-items: stretch;
  }

  .norn-card-top {
    flex-direction: row;
    text-align: left;
    align-items: center;
  }

  .norn-orb {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
  }

  .norn-rune-symbol {
    font-size: 34px;
  }

  .norn-time {
    align-items: flex-start;
  }
}


/* ── Kabbalah result visibility ── */
.kabbalah-result-card {
  position: relative;
  overflow: hidden;
  border-color: rgba(245, 215, 110, 0.24);
  background:
    radial-gradient(circle at 18% 18%, rgba(245,215,110,0.10), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(232,160,191,0.12), transparent 30%),
    linear-gradient(135deg, rgba(32,18,62,0.96), rgba(23,12,48,0.96));
}
.kab-result-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}
.kab-result-head h2 { margin: 4px 0 6px; }
.eyebrow {
  margin: 0;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.kab-result-sub {
  margin: 0;
  color: rgba(255,255,255,0.68);
  line-height: 1.65;
  font-size: 0.95rem;
}
.kab-visual-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.72fr) minmax(0, 1.28fr);
  gap: 20px;
  align-items: stretch;
}
.kab-tree-figure {
  margin: 0;
  min-height: 360px;
  border: 1px solid rgba(245,215,110,0.20);
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.04);
  box-shadow: inset 0 0 35px rgba(245,215,110,0.08), 0 18px 45px rgba(0,0,0,0.24);
}
.kab-tree-figure img {
  width: 100%;
  height: 100%;
  min-height: 360px;
  object-fit: cover;
  display: block;
}
.kab-pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}
.kab-side {
  position: relative;
  padding: 20px 20px 18px;
  border: 1px solid rgba(255,255,255,0.13);
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.035));
  box-shadow: 0 14px 34px rgba(0,0,0,0.18);
}
.kab-side::before {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  border-radius: 20px 0 0 20px;
  background: linear-gradient(180deg, var(--gold), var(--pink));
}
.kab-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: rgba(245,215,110,0.12);
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 800;
}
.kab-hebrew {
  float: right;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  margin-left: 14px;
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.8rem;
  font-weight: 800;
  background: radial-gradient(circle, rgba(245,215,110,0.20), rgba(124,77,188,0.13));
  border: 1px solid rgba(245,215,110,0.26);
  box-shadow: 0 0 24px rgba(245,215,110,0.16);
}
.kab-name {
  color: #fff;
  font-size: 1.28rem;
  font-weight: 850;
  letter-spacing: -0.01em;
  margin: 2px 0 5px;
}
.kab-korean {
  color: #e8c8ff;
  font-size: 0.98rem;
  font-weight: 750;
  margin-bottom: 9px;
}
.kab-number {
  display: inline-flex;
  align-items: center;
  margin: 3px 0 12px;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(124,77,188,0.26);
  color: rgba(255,255,255,0.88);
  font-size: 0.88rem;
  font-weight: 800;
}
.kab-meaning {
  clear: both;
  color: rgba(255,255,255,0.78);
  line-height: 1.75;
  font-size: 0.95rem;
}
.kabbalah-result-card + .card .interpretation-text .r-heading {
  background: linear-gradient(90deg, rgba(245,215,110,0.16), rgba(232,160,191,0.08));
  border-left-color: var(--gold);
  color: var(--gold);
}
.kabbalah-result-card + .card .interpretation-text .r-para {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255,255,255,0.035);
  border: 1px solid rgba(255,255,255,0.06);
}
@media (max-width: 760px) {
  .kab-visual-layout { grid-template-columns: 1fr; }
  .kab-tree-figure { min-height: 300px; max-height: 420px; }
  .kab-tree-figure img { min-height: 300px; max-height: 420px; }
  .kab-side { padding: 18px 16px 16px; }
  .kab-hebrew { width: 50px; height: 50px; font-size: 1.55rem; }
}


/* ── Yukhyo coin toss + hexagram visibility restore ── */
.yukhyo-drawing-card {
  position: relative;
  overflow: hidden;
  min-height: 420px;
  display: grid;
  place-items: center;
  gap: 12px;
  border-color: rgba(245, 215, 110, 0.24);
  background:
    radial-gradient(circle at 50% 12%, rgba(245,215,110,0.14), transparent 28%),
    radial-gradient(circle at 20% 82%, rgba(232,160,191,0.12), transparent 30%),
    linear-gradient(145deg, rgba(34,18,67,0.98), rgba(18,9,43,0.98));
}
.yukhyo-drawing-card::before {
  content: '☰  ☱  ☲  ☳  ☴  ☵  ☶  ☷';
  position: absolute;
  inset: 28px 0 auto;
  text-align: center;
  color: rgba(245,215,110,0.10);
  font-size: clamp(1.2rem, 4vw, 2.4rem);
  letter-spacing: 0.35em;
  pointer-events: none;
}
.toss-area {
  position: relative;
  width: min(460px, 86vw);
  height: 210px;
  display: grid;
  place-items: center;
  perspective: 900px;
}
.toss-coins {
  position: absolute;
  inset: 10px 0 auto;
  height: 130px;
  display: flex;
  justify-content: center;
  gap: 24px;
  z-index: 2;
}
.toss-coin {
  position: relative;
  width: 62px;
  height: 62px;
  transform-style: preserve-3d;
  filter: drop-shadow(0 12px 22px rgba(0,0,0,0.35));
  transition: transform 0.45s ease, opacity 0.25s ease;
}
.tc-front, .tc-back {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.32);
  font-weight: 900;
  color: #2b1a0d;
  backface-visibility: hidden;
}
.tc-front {
  background: radial-gradient(circle at 35% 28%, #fff8c8 0 15%, #f5d76e 42%, #b87824 100%);
}
.tc-back {
  transform: rotateY(180deg);
  background: radial-gradient(circle at 35% 28%, #ffe9f3 0 15%, #e8a0bf 45%, #8c3d66 100%);
}
.toss-coin.tc-show-back { transform: rotateY(180deg); }
.toss-coin.tc-flying:nth-child(1) { animation: coinFlyA 1.1s cubic-bezier(.2,.8,.2,1) both; }
.toss-coin.tc-flying:nth-child(2) { animation: coinFlyB 1.1s cubic-bezier(.2,.8,.2,1) both; }
.toss-coin.tc-flying:nth-child(3) { animation: coinFlyC 1.1s cubic-bezier(.2,.8,.2,1) both; }
.toss-coin.tc-landed:nth-child(1) { transform: translate(-42px, 74px) rotateY(0deg) rotateZ(-10deg); }
.toss-coin.tc-landed:nth-child(2) { transform: translate(0, 82px) rotateY(0deg) rotateZ(8deg); }
.toss-coin.tc-landed:nth-child(3) { transform: translate(42px, 74px) rotateY(0deg) rotateZ(13deg); }
.toss-coin.tc-landed.tc-show-back:nth-child(1) { transform: translate(-42px, 74px) rotateY(180deg) rotateZ(-10deg); }
.toss-coin.tc-landed.tc-show-back:nth-child(2) { transform: translate(0, 82px) rotateY(180deg) rotateZ(8deg); }
.toss-coin.tc-landed.tc-show-back:nth-child(3) { transform: translate(42px, 74px) rotateY(180deg) rotateZ(13deg); }
.toss-hand {
  position: absolute;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 4.3rem;
  z-index: 3;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,0.42));
}
.toss-hand.toss-throw { animation: handThrow 1.05s cubic-bezier(.2,.8,.2,1) both; }
.toss-result {
  min-height: 28px;
  padding: 6px 14px;
  border-radius: 999px;
  color: var(--gold);
  font-weight: 850;
  background: rgba(245,215,110,0.10);
  border: 1px solid rgba(245,215,110,0.20);
}
.hex-build {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(260px, 70vw);
  min-height: 132px;
  padding: 12px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.045);
  border: 1px solid rgba(255,255,255,0.08);
}
.hex-build-line {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  height: 14px;
  border-radius: 999px;
  animation: hexLineIn .35s ease both;
}
.hex-build-bar {
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #fff0a8);
  box-shadow: 0 0 14px rgba(245,215,110,0.34);
}
.hex-build-bar.yang { width: 170px; }
.hex-build-bar.yin-l, .hex-build-bar.yin-r { width: 70px; }
.hex-build-gap { width: 22px; }
.yukhyo-card-head { margin-bottom: 18px; }
.yukhyo-card-head h2 { margin: 4px 0 6px; }
.yukhyo-card-sub { margin: 0; color: rgba(255,255,255,0.68); line-height: 1.65; }
.yukhyo-hex-card {
  overflow: hidden;
  border-color: rgba(245,215,110,0.22);
  background:
    radial-gradient(circle at 12% 20%, rgba(245,215,110,0.10), transparent 30%),
    linear-gradient(145deg, rgba(34,18,67,0.96), rgba(20,10,46,0.96));
}
.hexagram-pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}
.hexagram-pair.static-only { grid-template-columns: minmax(0, 1fr); }
.hexagram-pair.static-only .hexagram-arrow,
.hexagram-pair.static-only .hexagram-block:nth-of-type(2) { display: none; }
.hexagram-block {
  padding: 20px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.075), rgba(255,255,255,0.035));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 16px 38px rgba(0,0,0,0.22);
}
.hex-label {
  display: inline-flex;
  padding: 6px 12px;
  margin-bottom: 16px;
  border-radius: 999px;
  color: var(--gold);
  font-weight: 850;
  background: rgba(245,215,110,0.12);
  border: 1px solid rgba(245,215,110,0.18);
}
.hex-lines {
  display: flex;
  flex-direction: column;
  gap: 9px;
  align-items: center;
  justify-content: center;
  min-height: 150px;
  margin: 6px 0 16px;
  padding: 14px;
  border-radius: 18px;
  background: rgba(10,6,24,0.35);
}
.hex-row {
  display: grid;
  grid-template-columns: 40px 1fr;
  gap: 10px;
  align-items: center;
  width: min(240px, 100%);
}
.hex-pos { color: rgba(255,255,255,0.58); font-size: 0.78rem; font-weight: 800; }
.hex-line {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--gold), #fff0a8);
  box-shadow: 0 0 13px rgba(245,215,110,0.28);
}
.hex-line.yin {
  background: transparent;
  box-shadow: none;
}
.hex-line.yin::before, .hex-line.yin::after {
  content: '';
  position: absolute;
  top: 0;
  width: 42%;
  height: 12px;
  border-radius: 999px;
  background: linear-gradient(90deg, #e8a0bf, #ffd6e6);
  box-shadow: 0 0 13px rgba(232,160,191,0.24);
}
.hex-line.yin::before { left: 0; }
.hex-line.yin::after { right: 0; }
.hex-line.changing { outline: 2px solid rgba(232,160,191,0.65); outline-offset: 3px; }
.hex-info {
  text-align: center;
  display: grid;
  gap: 7px;
}
.hex-number { color: var(--gold); font-weight: 900; font-size: 0.92rem; }
.hex-chinese { color: #fff; font-size: 1.35rem; font-weight: 900; }
.hex-fullname { color: #e8c8ff; font-weight: 850; line-height: 1.45; }
.hex-summary { color: rgba(255,255,255,0.72); line-height: 1.65; font-size: 0.94rem; }
.hexagram-arrow {
  align-self: center;
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--gold);
  font-size: 1.6rem;
  font-weight: 900;
  background: rgba(245,215,110,0.12);
  border: 1px solid rgba(245,215,110,0.22);
}
.changing-info {
  margin-top: 16px;
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(232,160,191,0.08);
  border: 1px solid rgba(232,160,191,0.16);
}
.changing-title { color: #ffc8dd; font-weight: 900; margin-bottom: 8px; }
.changing-list { margin: 8px 0 0; padding-left: 22px; color: rgba(255,255,255,0.82); line-height: 1.8; }
.changing-note { margin: 8px 0 0; color: rgba(255,255,255,0.74); line-height: 1.7; }
@keyframes handThrow {
  0% { transform: translateX(-50%) translateY(0) scale(1); }
  30% { transform: translateX(-50%) translateY(-26px) scale(1.08) rotate(-5deg); }
  62% { transform: translateX(-50%) translateY(8px) scale(0.96) rotate(4deg); }
  100% { transform: translateX(-50%) translateY(0) scale(1); }
}
@keyframes coinFlyA {
  0% { transform: translate(0, 88px) rotateY(0) scale(.65); opacity: .25; }
  58% { transform: translate(-76px, -18px) rotateY(720deg) rotateZ(-20deg) scale(1.05); opacity: 1; }
  100% { transform: translate(-42px, 74px) rotateY(1080deg) rotateZ(-10deg); opacity: 1; }
}
@keyframes coinFlyB {
  0% { transform: translate(0, 88px) rotateY(0) scale(.65); opacity: .25; }
  58% { transform: translate(0, -36px) rotateY(760deg) rotateZ(18deg) scale(1.07); opacity: 1; }
  100% { transform: translate(0, 82px) rotateY(1080deg) rotateZ(8deg); opacity: 1; }
}
@keyframes coinFlyC {
  0% { transform: translate(0, 88px) rotateY(0) scale(.65); opacity: .25; }
  58% { transform: translate(76px, -18px) rotateY(700deg) rotateZ(22deg) scale(1.05); opacity: 1; }
  100% { transform: translate(42px, 74px) rotateY(1080deg) rotateZ(13deg); opacity: 1; }
}
@keyframes hexLineIn {
  from { opacity: 0; transform: translateY(8px) scaleX(.7); }
  to { opacity: 1; transform: translateY(0) scaleX(1); }
}
@media (max-width: 760px) {
  .yukhyo-drawing-card { min-height: 390px; }
  .toss-area { height: 190px; }
  .toss-coin { width: 54px; height: 54px; }
  .toss-coins { gap: 16px; }
  .toss-hand { font-size: 3.7rem; }
  .hexagram-pair { grid-template-columns: 1fr; }
  .hexagram-arrow { margin: 0 auto; transform: rotate(90deg); }
  .hexagram-block { padding: 18px 14px; }
  .hex-row { width: min(220px, 100%); grid-template-columns: 34px 1fr; }
}
