/* ==========================================================================
   운세야 놀자 (fortune.chatgpts.kr) - Global Stylesheet
   ========================================================================== */

:root {
  --bg-primary: #F8F5FF;
  --bg-secondary: #FFF7ED;
  --main-color: #6D28D9;
  --main-hover: #5B21B6;
  --main-light: #EDE9FE;
  --main-subtle: #F3EEFF;
  --point-color: #F59E0B;
  --point-hover: #D97706;
  --point-light: #FEF3C7;
  --text-main: #1F2937;
  --text-muted: #4B5563;
  --text-light: #6B7280;
  --card-bg: #FFFFFF;
  --border-color: #E5E7EB;
  --border-subtle: #F0EBF8;
  --shadow-sm: 0 2px 8px rgba(109, 40, 217, 0.05);
  --shadow-md: 0 4px 16px rgba(109, 40, 217, 0.08);
  --shadow-lg: 0 10px 25px rgba(109, 40, 217, 0.12);
  --radius-sm: 10px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-full: 9999px;
  --font-display: 'Jua', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-body: 'Gowun Dodum', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  min-height: 100%;
  font-family: var(--font-body);
  color: var(--text-main);
  background-color: var(--bg-primary);
  background-image: 
    radial-gradient(circle at 10% 20%, rgba(237, 233, 254, 0.6) 0%, transparent 40%),
    radial-gradient(circle at 90% 80%, rgba(254, 243, 199, 0.5) 0%, transparent 40%),
    linear-gradient(180deg, #F8F5FF 0%, #FFF7ED 100%);
  background-attachment: fixed;
  line-height: 1.6;
  word-break: keep-all;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font-family: inherit;
  cursor: pointer;
  border: none;
  background: none;
}

/* 래퍼 컨테이너 */
.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 18px 60px 18px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ==========================================================================
   헤더 & 네비게이션
   ========================================================================== */
.site-head {
  padding: 18px 0 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: 20px;
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--main-color);
  letter-spacing: -0.5px;
  transition: transform 0.2s ease;
}

.brand-logo:hover {
  transform: scale(1.02);
}

.brand-logo .brand-icon {
  font-size: 26px;
  display: inline-block;
  animation: floatOrb 3s ease-in-out infinite;
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-3px) rotate(5deg); }
}

.brand-logo .dot {
  color: var(--point-color);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* 패밀리 서비스 드롭다운 */
.family-nav-wrap {
  position: relative;
}

.family-btn {
  font-size: 13px;
  padding: 6px 12px;
  border-radius: var(--radius-full);
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.family-btn:hover {
  border-color: var(--main-color);
  color: var(--main-color);
}

.family-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  right: 0;
  background: var(--card-bg);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--border-subtle);
  min-width: 170px;
  padding: 8px 6px;
  z-index: 100;
  display: none;
}

.family-dropdown.show {
  display: block;
  animation: fadeInDown 0.2s ease-out;
}

@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-6px); }
  to { opacity: 1; transform: translateY(0); }
}

.family-dropdown a {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  font-size: 13px;
  border-radius: var(--radius-sm);
  color: var(--text-main);
  transition: background 0.15s;
}

.family-dropdown a:hover {
  background: var(--main-light);
  color: var(--main-color);
}

/* 상단 메인 메뉴바 (가로 스크롤 가능) */
.nav-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 8px;
  margin-bottom: 24px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.nav-scroll::-webkit-scrollbar {
  display: none;
}

.nav-chip {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 14px;
  font-family: var(--font-display);
  background: var(--card-bg);
  color: var(--text-muted);
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  box-shadow: var(--shadow-sm);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-chip:hover {
  border-color: var(--main-color);
  color: var(--main-color);
  transform: translateY(-1px);
}

.nav-chip.active {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.25);
}

/* ==========================================================================
   히어로 & 인트로 섹션
   ========================================================================== */
.hero-sec {
  text-align: center;
  padding: 10px 0 24px;
}

.today-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--point-light);
  color: #92400E;
  font-size: 13px;
  font-weight: 600;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  margin-bottom: 12px;
  border: 1px solid rgba(245, 158, 11, 0.2);
}

.hero-title {
  font-family: var(--font-display);
  font-size: 28px;
  line-height: 1.35;
  color: var(--text-main);
  margin-bottom: 8px;
  letter-spacing: -0.5px;
}

.hero-title span {
  color: var(--main-color);
}

.hero-sub {
  font-size: 15px;
  color: var(--text-muted);
  max-width: 480px;
  margin: 0 auto;
}

/* 오늘의 한마디 미니 배너 */
.daily-quote-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #FAF5FF 100%);
  border: 1px solid var(--main-light);
  border-radius: var(--radius-md);
  padding: 14px 18px;
  margin-bottom: 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: var(--shadow-sm);
}

.daily-quote-banner .quote-icon {
  font-size: 24px;
  flex-shrink: 0;
}

.daily-quote-banner .quote-text {
  font-size: 14px;
  color: var(--text-main);
  line-height: 1.45;
}

.daily-quote-banner .quote-author {
  display: block;
  font-size: 12px;
  color: var(--main-color);
  font-weight: 600;
  margin-top: 2px;
}

/* ==========================================================================
   애드센스 광고 슬롯 (.ad-slot) - 마인드테스트 방식 클린 슬롯
   ========================================================================== */
.ad-slot,
.ad-placeholder {
  margin: 20px 0;
  min-height: 1px;
  text-align: center;
  clear: both;
}

.ad-placeholder span {
  display: none;
}

/* ==========================================================================
/* ==========================================================================
   메인 인덱스: 마인드테스트 스타일 카드 그리드 & 뷰 스위처
   ========================================================================== */
.lede {
  margin: 0 0 20px;
  text-align: center;
  color: var(--text-muted);
  font-size: 15px;
}

/* 뷰 전환 컨트롤러 (3x2 그리드 / 카드 목록) */
.view-switch-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0 0 18px;
}

.view-switcher {
  display: inline-flex;
  align-items: center;
  background: #ede9fe;
  padding: 3px;
  border-radius: var(--radius-full);
  box-shadow: inset 0 1px 3px rgba(109, 40, 217, 0.08);
}

.view-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.view-btn .btn-icon {
  font-size: 14px;
  line-height: 1;
}

.view-btn:hover {
  color: var(--main-color);
}

.view-btn.active {
  background: #ffffff;
  color: var(--main-color);
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.12);
}

/* 카드 목록 (기본 리스트 뷰) */
.card-list {
  display: grid;
  gap: 14px;
  margin: 0 0 26px;
  padding: 0;
  list-style: none;
}

.card-list li {
  list-style: none;
}

.card {
  display: block;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 20px 20px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 10px rgba(109, 40, 217, 0.05);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.1);
  border-color: var(--c-dark, var(--main-color));
}

.card:active {
  transform: scale(0.99);
}

.card .emoji {
  font-size: 38px;
  line-height: 1;
  display: block;
  margin-bottom: 8px;
  transition: transform 0.2s ease;
}

.card:hover .emoji {
  transform: scale(1.1);
}

.card h2 {
  margin: 0 0 6px;
  font-size: 19px;
  font-family: var(--font-display);
  color: var(--text-main);
  letter-spacing: -0.02em;
}

.card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.card .meta {
  display: inline-block;
  margin-top: 12px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--c-soft, var(--main-light));
  color: var(--c-dark, var(--main-color));
  font-size: 12px;
  font-weight: 600;
}

/* 카드별 고유 컬러 테마 */
.card[data-card="today"] { --c-soft: #fef3c7; --c-dark: #b45309; }
.card[data-card="zodiac"] { --c-soft: #eff6ff; --c-dark: #1d4ed8; }
.card[data-card="star"] { --c-soft: #f5f3ff; --c-dark: #6d28d9; }
.card[data-card="tarot"] { --c-soft: #e0e7ff; --c-dark: #4338ca; }
.card[data-card="love"] { --c-soft: #ffe4e6; --c-dark: #e11d48; }
.card[data-card="locker"] { --c-soft: #ecfdf5; --c-dark: #047857; }

/* 3x2 그리드 뷰 (첫 화면에 6개 모두 쏙 들어오는 배치) */
.card-list.view-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}

.card-list.view-grid li {
  display: flex;
}

.card-list.view-grid .card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  padding: 16px 8px 14px;
  min-height: 122px;
  border-radius: 18px;
  border: 1px solid var(--border-color);
  background: var(--card-bg);
  box-shadow: 0 2px 8px rgba(109, 40, 217, 0.04);
}

.card-list.view-grid .card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.12);
  border-color: var(--c-dark, var(--main-color));
}

.card-list.view-grid .card:active {
  transform: scale(0.97);
}

.card-list.view-grid .card .emoji {
  font-size: 32px;
  line-height: 1;
  margin-bottom: 6px;
  display: block;
  filter: drop-shadow(0 2px 4px rgba(109, 40, 217, 0.08));
}

.card-list.view-grid .card:hover .emoji {
  transform: scale(1.15);
}

.card-list.view-grid .card h2 {
  font-size: 14.5px;
  font-weight: 700;
  font-family: var(--font-display);
  color: var(--text-main);
  margin: 0 0 4px;
  letter-spacing: -0.02em;
  line-height: 1.3;
}

.card-list.view-grid .card p {
  display: none; /* 그리드 뷰에서는 한눈에 보이도록 숨김 */
}

.card-list.view-grid .card .meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
}

/* 모바일 뷰 최적화 (iPhone SE 375px에서도 3열 깔끔 노출) */
@media (max-width: 480px) {
  .site-head {
    padding: 12px 0;
    margin-bottom: 14px;
  }
  .brand-logo {
    font-size: 20px;
    gap: 5px;
  }
  .brand-logo .brand-icon {
    font-size: 22px;
  }
  .header-right {
    gap: 6px;
  }
  .family-btn {
    font-size: 12px;
    padding: 5px 8px;
  }
  #header-auth-btn #auth-status-text {
    display: none;
  }
  .card-list.view-grid {
    gap: 8px;
  }
  .card-list.view-grid .card {
    padding: 12px 4px 10px;
    min-height: 104px;
    border-radius: 14px;
  }
  .card-list.view-grid .card .emoji {
    font-size: 26px;
    margin-bottom: 4px;
  }
  .card-list.view-grid .card h2 {
    font-size: 12.5px;
    margin-bottom: 2px;
  }
  .card-list.view-grid .card .meta {
    font-size: 10px;
    padding: 2px 6px;
  }
}

/* ==========================================================================
   서브 페이지 공통 헤더 & 컨트롤
   ========================================================================== */
.page-header {
  text-align: center;
  margin-bottom: 22px;
}

.page-title {
  font-family: var(--font-display);
  font-size: 25px;
  color: var(--text-main);
  margin-bottom: 6px;
}

.page-desc {
  font-size: 14.5px;
  color: var(--text-muted);
}

/* ==========================================================================
   선택기 그리드 (띠 & 별자리 & 연애 탭)
   ========================================================================== */
/* 12띠 / 별자리 선택 그리드 */
.selector-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .selector-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }
}

.select-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 6px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  transition: all 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.select-btn .btn-icon {
  font-size: 24px;
  transition: transform 0.2s;
}

.select-btn .btn-label {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-main);
}

.select-btn .btn-sub {
  font-size: 11px;
  color: var(--text-light);
}

.select-btn:hover {
  border-color: var(--main-color);
  transform: translateY(-2px);
}

.select-btn.active {
  background: var(--main-color);
  border-color: var(--main-color);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

.select-btn.active .btn-label,
.select-btn.active .btn-sub {
  color: #fff;
}

.select-btn.active .btn-icon {
  transform: scale(1.15);
}

/* 연애 상태 탭 (솔로/썸/연애중/이별후) */
.status-tabs {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-bottom: 24px;
}

.status-tab-btn {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px 8px;
  text-align: center;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.status-tab-btn .tab-emoji {
  font-size: 22px;
  display: block;
  margin-bottom: 4px;
}

.status-tab-btn .tab-title {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-main);
}

.status-tab-btn:hover {
  border-color: var(--main-color);
  transform: translateY(-2px);
}

.status-tab-btn.active {
  background: var(--main-color);
  border-color: var(--main-color);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.3);
}

.status-tab-btn.active .tab-title {
  color: #fff;
}

/* ==========================================================================
   운세 결과 카드 (포춘 카드 디자인)
   ========================================================================== */
.fortune-result-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  padding: 24px 20px;
  margin-bottom: 24px;
  position: relative;
  overflow: hidden;
  animation: cardFadeUp 0.35s ease-out;
}

@keyframes cardFadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

.result-header {
  border-bottom: 1px solid var(--border-subtle);
  padding-bottom: 16px;
  margin-bottom: 20px;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.result-target-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--main-color);
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-date-chip {
  font-size: 12px;
  color: var(--text-light);
  background: #F3F4F6;
  padding: 4px 10px;
  border-radius: var(--radius-full);
}

/* 키워드 하이라이트 배너 */
.keyword-badge-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--main-subtle);
  border-radius: var(--radius-md);
  padding: 12px 16px;
  margin-bottom: 20px;
}

.keyword-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--main-color);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.keyword-value {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--main-color);
}

/* 운세 섹션 블록들 */
.result-sections {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-bottom: 24px;
}

.result-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #FAFAFA;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  border-left: 3px solid var(--main-color);
}

.result-row.highlight {
  background: #FFFBEB;
  border-left-color: var(--point-color);
}

.row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 6px;
}

.row-label .row-icon {
  font-size: 15px;
}

.row-content {
  font-size: 14.5px;
  color: var(--text-main);
  line-height: 1.5;
}

/* 행운의 요소 (색상, 숫자) */
.lucky-pill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}

.lucky-pill {
  background: #F9FAFB;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.color-dot {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #FFFFFF;
  box-shadow: 0 0 4px rgba(0,0,0,0.2);
  flex-shrink: 0;
}

.lucky-pill-title {
  font-size: 12px;
  color: var(--text-light);
}

.lucky-pill-val {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--text-main);
}

/* 오늘의 한마디 / 조언 카드 */
.advice-quote-box {
  background: linear-gradient(135deg, #FAF5FF 0%, #FFFBEB 100%);
  border: 1px dashed rgba(109, 40, 217, 0.3);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  margin-top: 10px;
}

.advice-quote-box p {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--main-color);
  line-height: 1.45;
}

/* ==========================================================================
   타로 페이지 (3D 플립 카드 & 덱 애니메이션)
   ========================================================================== */
.tarot-stage {
  text-align: center;
  padding: 10px 0 24px;
}

.tarot-instruction {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* 카드 덱 */
.tarot-deck {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  margin: 15px 0 32px;
  perspective: 1200px;
}

.tarot-card-slot {
  width: 116px;
  height: 186px;
  perspective: 1200px;
  cursor: pointer;
  transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
  user-select: none;
  -webkit-tap-highlight-color: transparent;
}

@media (max-width: 480px) {
  .tarot-deck {
    gap: 10px;
  }
  .tarot-card-slot {
    width: 96px;
    height: 154px;
  }
}

/* 마우스 호버 시 살짝 솟아오름 */
.tarot-card-slot:not(.selected):not(.unselected):hover {
  transform: translateY(-12px) scale(1.04);
}

/* 1장 선택 시: 선택된 카드는 강조 솟구침, 나머지는 페이드아웃 */
.tarot-card-slot.selected {
  transform: translateY(-16px) scale(1.08);
  z-index: 10;
  cursor: default;
}

.tarot-card-slot.unselected {
  opacity: 0.25;
  filter: grayscale(0.5) blur(0.5px);
  transform: scale(0.92);
  pointer-events: none;
  cursor: default;
  transition: all 0.5s ease;
}

.tarot-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.85s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  transform-style: preserve-3d;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
  border-radius: 16px;
}

.tarot-card-slot.selected .tarot-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 15px 35px rgba(109, 40, 217, 0.35), 0 0 25px rgba(245, 158, 11, 0.45);
}

.tarot-front, .tarot-back {
  position: absolute;
  width: 100%;
  height: 100%;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  padding: 12px 10px;
  box-sizing: border-box;
  overflow: hidden;
}

/* 타로 카드 뒷면: 신비로운 딥 나이트 + 골드 기하학 프레임 */
.tarot-back {
  background: radial-gradient(circle at 50% 35%, #431407 0%, #1e1b4b 60%, #09090b 100%);
  border: 2px solid #F59E0B;
  box-shadow: inset 0 0 14px rgba(245, 158, 11, 0.3);
  color: #FEF3C7;
}

.tarot-back::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px dashed rgba(245, 158, 11, 0.6);
  border-radius: 11px;
  pointer-events: none;
}

.tarot-back-star {
  font-size: 34px;
  margin-top: auto;
  margin-bottom: auto;
  filter: drop-shadow(0 0 8px #F59E0B);
  animation: tarotGlow 2.4s ease-in-out infinite alternate;
}

@keyframes tarotGlow {
  from { transform: scale(0.95); filter: drop-shadow(0 0 4px #F59E0B); }
  to { transform: scale(1.08); filter: drop-shadow(0 0 14px #FCD34D); }
}

.tarot-back-footer {
  font-size: 10px;
  color: #FCD34D;
  letter-spacing: 2px;
  font-weight: 700;
  opacity: 0.8;
  text-transform: uppercase;
}

/* 타로 카드 앞면: 앤틱 크림 골드 프레임 */
.tarot-front {
  background: linear-gradient(180deg, #FFFDF8 0%, #FFFBEB 100%);
  border: 2px solid #D97706;
  box-shadow: inset 0 0 12px rgba(217, 119, 6, 0.15);
  transform: rotateY(180deg);
  color: #1F2937;
}

.tarot-front::before {
  content: '';
  position: absolute;
  top: 5px;
  left: 5px;
  right: 5px;
  bottom: 5px;
  border: 1px solid rgba(217, 119, 6, 0.35);
  border-radius: 11px;
  pointer-events: none;
}

.tarot-front .front-num {
  font-size: 11px;
  font-weight: 800;
  color: #B45309;
  letter-spacing: 0.5px;
  margin-top: 2px;
}

.tarot-front .front-icon {
  font-size: 42px;
  margin: auto 0;
  filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.15));
}

@media (max-width: 480px) {
  .tarot-front .front-icon {
    font-size: 36px;
  }
}

.tarot-front .front-name {
  font-family: var(--font-display);
  font-size: 13.5px;
  font-weight: 800;
  color: #6D28D9;
  background: rgba(109, 40, 217, 0.08);
  padding: 3px 8px;
  border-radius: 6px;
  margin-bottom: 2px;
  white-space: nowrap;
}

.tarot-single-draw-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--main-color);
  color: #fff;
  font-family: var(--font-display);
  font-size: 16px;
  padding: 12px 28px;
  border-radius: var(--radius-full);
  box-shadow: 0 4px 14px rgba(109, 40, 217, 0.35);
  transition: all 0.2s;
}

.tarot-single-draw-btn:hover {
  background: var(--main-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(109, 40, 217, 0.45);
}

/* 타로 결과 카드 */
.tarot-detail-display {
  display: none;
  animation: cardFadeUp 0.4s ease-out;
}

.tarot-detail-display.show {
  display: block;
}

/* ==========================================================================
   액션 버튼 그룹 (다시보기, 공유하기, 타 운세 바로가기)
   ========================================================================== */
.action-btn-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 28px;
}

.btn-primary {
  flex: 1;
  min-width: 140px;
  padding: 13px 18px;
  background: var(--main-color);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 15px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.25);
  transition: all 0.2s;
}

.btn-primary:hover {
  background: var(--main-hover);
  transform: translateY(-2px);
}

.btn-secondary {
  flex: 1;
  min-width: 140px;
  padding: 13px 18px;
  background: #FFFFFF;
  color: var(--main-color);
  border: 1px solid var(--main-light);
  font-family: var(--font-display);
  font-size: 15px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  box-shadow: var(--shadow-sm);
  transition: all 0.2s;
}

.btn-secondary:hover {
  border-color: var(--main-color);
  background: var(--main-subtle);
  transform: translateY(-2px);
}

/* 12띠 전체보기 아코디언/그리드 모드 */
.all-zodiac-list {
  display: none;
  flex-direction: column;
  gap: 12px;
  margin-top: 20px;
}

.all-zodiac-list.show {
  display: flex;
}

.mini-fortune-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 14px 16px;
  box-shadow: var(--shadow-sm);
}

.mini-fortune-card h4 {
  font-family: var(--font-display);
  font-size: 15px;
  color: var(--main-color);
  margin-bottom: 4px;
}

.mini-fortune-card p {
  font-size: 13.5px;
  color: var(--text-main);
  line-height: 1.45;
}

/* ==========================================================================
   관련 콘텐츠 & 패밀리 사이트 섹션
   ========================================================================== */
.related-section {
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
}

.section-label {
  font-family: var(--font-display);
  font-size: 17px;
  color: var(--text-main);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.related-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (max-width: 480px) {
  .related-grid {
    grid-template-columns: 1fr;
  }
}

.related-card {
  background: #FFFFFF;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  transition: all 0.2s;
  box-shadow: var(--shadow-sm);
}

.related-card:hover {
  transform: translateY(-2px);
  border-color: var(--main-color);
}

.related-card .rc-icon {
  font-size: 22px;
  flex-shrink: 0;
}

.related-card .rc-title {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--text-main);
}

.related-card .rc-desc {
  font-size: 11.5px;
  color: var(--text-light);
}

/* 다른 놀자 배너 */
.nolja-family-banner {
  background: linear-gradient(135deg, #FAF5FF 0%, #FEF3C7 100%);
  border-radius: var(--radius-md);
  padding: 16px;
  margin-bottom: 24px;
  border: 1px solid rgba(109, 40, 217, 0.15);
}

.nolja-family-banner h3 {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--main-color);
  margin-bottom: 8px;
}

.nolja-family-banner p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.45;
  margin-bottom: 12px;
}

.family-link-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.family-chip-link {
  font-size: 12.5px;
  background: #FFFFFF;
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-color);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: all 0.15s;
}

.family-chip-link:hover {
  background: var(--main-color);
  color: #fff;
  border-color: var(--main-color);
}

/* ==========================================================================
   푸터 & 필수 안내문
   ========================================================================== */
.site-foot {
  margin-top: auto;
  padding-top: 24px;
  border-top: 1px solid var(--border-subtle);
  color: var(--text-light);
  font-size: 12.5px;
  line-height: 1.6;
}

.disclaimer-box {
  background: #F9FAFB;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 14px;
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.55;
}

.disclaimer-box strong {
  color: var(--text-main);
  display: block;
  margin-bottom: 4px;
}

.footer-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-bottom: 12px;
}

.footer-nav-links a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.footer-nav-links a:hover {
  color: var(--main-color);
}

.footer-copy {
  text-align: center;
  font-size: 11.5px;
  color: var(--text-light);
}

/* ==========================================================================
   토스트 알림
   ========================================================================== */
.toast-msg {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(100px);
  background: rgba(31, 41, 55, 0.95);
  color: #FFFFFF;
  padding: 10px 20px;
  border-radius: var(--radius-full);
  font-size: 13.5px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  z-index: 9999;
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
  pointer-events: none;
}

.toast-msg.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

/* ==========================================================================
   오늘의 운세: 미니 질문 입력 카드 (인터랙션 강화)
   ========================================================================== */
.fortune-input-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin-bottom: 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.3s ease;
}

.input-card-title {
  font-family: var(--font-display);
  font-size: 19px;
  color: var(--text-main);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.input-card-desc {
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 18px;
  line-height: 1.45;
}

.input-field-group {
  margin-bottom: 16px;
}

.input-field-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 6px;
}

.fortune-input-control {
  width: 100%;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-color);
  font-family: inherit;
  font-size: 14px;
  background: #FFFFFF;
  color: var(--text-main);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.fortune-input-control:focus {
  outline: none;
  border-color: var(--main-color);
  box-shadow: 0 0 0 3px rgba(109, 40, 217, 0.12);
}

.option-pill-group {
  display: flex !important;
  flex-wrap: wrap !important;
  gap: 8px !important;
}

.option-pill {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
  padding: 8px 15px !important;
  border-radius: 9999px !important;
  border: 1.5px solid #D1D5DB !important;
  background: #FFFFFF !important;
  color: #374151 !important;
  font-family: inherit !important;
  font-size: 13.5px !important;
  font-weight: 600 !important;
  cursor: pointer !important;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05) !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  -webkit-tap-highlight-color: transparent !important;
}

.option-pill:hover {
  border-color: #6D28D9 !important;
  color: #6D28D9 !important;
  background: #F3EEFF !important;
  transform: translateY(-1px) !important;
}

.option-pill.active {
  background: #6D28D9 !important;
  color: #FFFFFF !important;
  border-color: #6D28D9 !important;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.3) !important;
  font-weight: 700 !important;
}

.focus-highlight-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  background: var(--point-light);
  color: #92400E;
  font-size: 12px;
  font-weight: 700;
  margin-bottom: 12px;
}

/* ==========================================================================
   띠별 운세: 출생연도(나이) 선택 칩 및 연령별 맞춤 운세
   ========================================================================== */
.zodiac-year-selector-wrap {
  background: var(--bg-soft, #f8f6fb);
  border: 1px solid var(--border-subtle, #ede9fe);
  border-radius: var(--radius-md, 16px);
  padding: 16px 18px;
  margin-bottom: 22px;
}

.year-selector-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13.5px;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.year-selector-label strong {
  color: var(--text-main);
  font-weight: 700;
}

.year-selector-label .label-sub {
  font-size: 12px;
  color: var(--main-color, #6D28D9);
  margin-left: auto;
}

.year-pill-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.year-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 7px 13px;
  border-radius: var(--radius-full, 9999px);
  border: 1.5px solid #d1d5db;
  background: #ffffff;
  color: #374151;
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  -webkit-tap-highlight-color: transparent;
}

.year-pill:hover {
  border-color: #6D28D9;
  color: #6D28D9;
  background: #f5f3ff;
  transform: translateY(-1px);
}

.year-pill.active {
  background: #6D28D9;
  color: #ffffff;
  border-color: #6D28D9;
  box-shadow: 0 3px 10px rgba(109, 40, 217, 0.28);
  font-weight: 700;
}

.age-badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  background: #fef3c7;
  color: #92400e;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  margin-left: 8px;
}
