/* ==========================================================================
   사주·손금·관상 셀프 해석 도우미 통합 마스터 스타일시트 (style.css)
   표준 지침: 전 기기 1컬럼 중앙 정렬 (max-width: 800px) & 모던 프리미엄 디자인
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Pretendard:wght@400;500;600;700;800;900&display=swap');

:root {
  /* 브랜드 테마 컬러: 딥 미드나이트 인디고 & 황금빛 앰버 (전통과 현대의 조화) */
  --primary: #1e1b4b;          /* 깊은 인디고 네이비 */
  --primary-light: #3730a3;    /* 인디고 블루 */
  --primary-glow: #6366f1;     /* 하이라이트 바이올렛 */
  --primary-bg: #eef2ff;       /* 소프트 인디고 배경 */
  
  --accent: #b45309;           /* 앤틱 골드/브라운 */
  --accent-light: #f59e0b;     /* 밝은 황금 앰버 */
  --accent-bg: #fffbeb;        /* 골드 틴트 배경 */
  
  --emerald: #065f46;          /* 비취/목(木) 상징 */
  --emerald-bg: #ecfdf5;
  --crimson: #991b1b;          /* 주작/화(火) 상징 */
  --crimson-bg: #fef2f2;
  --slate-dark: #0f172a;       /* 흑요석/수(水) 상징 */
  
  --text-main: #0f172a;        /* 최고 대비 본문 */
  --text-sub: #334155;         /* 부본문 진한 슬레이트 */
  --text-muted: #64748b;       /* 보조 설명 슬레이트 */
  
  --bg-main: #f8fafc;          /* 슬레이트 배경 */
  --bg-card: #ffffff;          /* 카드 순백 */
  --border-color: #cbd5e1;     /* 명확한 2px 테두리 기준 */
  --border-subtle: #e2e8f0;    /* 1px 보조선 */
  
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 24px;
  
  --shadow-sm: 0 1px 3px rgba(15, 23, 42, 0.06);
  --shadow-card: 0 4px 14px rgba(15, 23, 42, 0.06), 0 1px 3px rgba(15, 23, 42, 0.04);
  --shadow-hover: 0 12px 28px rgba(15, 23, 42, 0.12);
  --shadow-glow: 0 0 20px rgba(245, 158, 11, 0.35);
}

/* --- 전역 리셋 & 모바일 가독성 공식 (4.1절) --- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  word-break: keep-all;       /* 한국어 단어 단위 줄바꿈 전역 적용 */
  overflow-wrap: break-word;   /* 긴 영문/URL 예외 처리 */
}

html {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-main);
  background-color: var(--bg-main);
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

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

/* 접근성 건너뛰기 링크 */
.skip-link {
  position: absolute;
  top: -60px;
  left: 20px;
  background: var(--accent-light);
  color: #000;
  padding: 10px 16px;
  border-radius: var(--radius-sm);
  font-weight: 700;
  z-index: 9999;
  transition: top 0.2s ease;
}
.skip-link:focus {
  top: 15px;
}

/* --- 상단 글로벌 헤더 & 메뉴 줄바꿈 방지 공식 (5절) --- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(15, 23, 42, 0.94);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(245, 158, 11, 0.25);
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.site-header .header-inner {
  max-width: 1420px;           /* 헤더 전용 확장 컨테이너 */
  margin: 0 auto;
  padding: 0 20px;
  height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;         /* 로고 쪼개짐 원천 금지 */
  flex-shrink: 0;
  text-decoration: none;
}

.site-logo-icon {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #312e81, #1e1b4b);
  border: 1.5px solid var(--accent-light);
  border-radius: 10px;
  box-shadow: 0 0 12px rgba(245, 158, 11, 0.4);
  font-size: 1.2rem;
}

.site-logo-text {
  display: flex;
  flex-direction: column;
}

.site-logo-title {
  font-size: 1.12rem;
  font-weight: 900;
  color: #ffffff;
  letter-spacing: -0.5px;
}

.site-logo-title span {
  color: var(--accent-light);
}

.site-logo-sub {
  font-size: 0.68rem;
  font-weight: 600;
  color: #94a3b8;
  letter-spacing: 0.5px;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: nowrap;           /* 상단 메뉴 줄바꿈 절대 방지 */
  flex-shrink: 0;
}

.nav-link {
  font-size: 0.88rem;
  font-weight: 700;
  color: #e2e8f0;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  white-space: nowrap;         /* 메뉴명 쪼개짐 방지 */
  flex-shrink: 0;
  transition: all 0.2s ease;
}

.nav-link:hover, .nav-link.active {
  color: #ffffff;
  background: rgba(245, 158, 11, 0.18);
  border: 1px solid rgba(245, 158, 11, 0.4);
}

.nav-cta-btn {
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #0f172a !important;
  font-weight: 800;
  padding: 7px 14px;
  border-radius: 20px;
  box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

.nav-cta-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.6);
}

/* 모바일 햄버거 버튼 (1060px 이하 표시) */
.mobile-menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  padding: 8px;
  border-radius: var(--radius-sm);
  background: rgba(255, 255, 255, 0.08);
}

.mobile-menu-btn span {
  display: block;
  width: 100%;
  height: 2.5px;
  background: #ffffff;
  border-radius: 2px;
  transition: all 0.25s ease;
}

/* 모바일 전용 슬라이드 드로어 메뉴 */
.mobile-drawer {
  position: fixed;
  top: 68px;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(15, 23, 42, 0.98);
  backdrop-filter: blur(16px);
  z-index: 99;
  padding: 24px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  overflow-y: auto;
  transform: translateY(-100%);
  opacity: 0;
  pointer-events: none;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s ease;
}

.mobile-drawer.is-open {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.drawer-nav-group {
  margin-bottom: 14px;
}

.drawer-group-title {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--accent-light);
  letter-spacing: 1px;
  margin-bottom: 8px;
  padding-left: 6px;
}

.drawer-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  color: #f1f5f9;
  font-size: 0.98rem;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  margin-bottom: 6px;
}

.drawer-link:active {
  background: rgba(245, 158, 11, 0.2);
}

@media (max-width: 1060px) {
  .main-nav { display: none !important; }
  .mobile-menu-btn { display: flex !important; }
}

/* --- 메인 컨테이너 규격: 1컬럼 중앙 정렬 표준 (3.1절) --- */
.container {
  width: 100%;
  max-width: 820px;            /* 권장 760px ~ 840px 엄격 준수 */
  margin: 0 auto;              /* 정중앙 정렬 */
  padding: 24px 20px 60px;
  flex: 1;
}

/* --- 히어로 타이틀 & 모바일 2줄 분리 패턴 (4.2절) --- */
.hero-section {
  text-align: center;
  margin: 12px 0 28px;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1e40af;
  padding: 6px 14px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 800;
  margin-bottom: 14px;
}

.hero-badge.gold {
  background: #fffbeb;
  border-color: #fde68a;
  color: #b45309;
}

.hero-title {
  font-size: 2.15rem;
  font-weight: 900;
  line-height: 1.35;
  color: var(--primary);
  margin-bottom: 12px;
  letter-spacing: -0.8px;
}

.hero-title-line {
  display: inline-block;
  white-space: nowrap;
}

.accent-text {
  color: var(--accent);
  position: relative;
  display: inline-block;
}

.hero-desc {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--text-sub);
  max-width: 680px;
  margin: 0 auto 16px;
}

@media (max-width: 540px) {
  .hero-title {
    font-size: 1.55rem;        /* 360px 모바일 화면 최적화 */
    line-height: 1.35;
  }
  .hero-title-line {
    display: block !important;
    white-space: nowrap !important;
  }
  .hero-desc {
    font-size: 0.95rem;
  }
}

/* --- AI 검색 최적화 두괄식 요약 박스 (.geo-summary-box) (12.1절) --- */
.geo-summary-box {
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  border-left: 5px solid #16a34a;
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin: 20px 0 28px 0;
  box-shadow: var(--shadow-sm);
}

.geo-summary-box .summary-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 800;
  color: #166534;
  margin-bottom: 10px;
}

.geo-summary-box .summary-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.geo-summary-box .summary-list li {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #1f2937;
  position: relative;
  padding-left: 18px;
}

.geo-summary-box .summary-list li::before {
  content: "•";
  position: absolute;
  left: 4px;
  color: #16a34a;
  font-weight: 900;
  font-size: 1.1rem;
}

/* --- 전 기기 1컬럼 단일 열 레이아웃 컨테이너 (3.1절) --- */
.calc-single-column-container,
.calc-responsive-grid {
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;      /* PC, 모바일 모두 수직 1열 배치 */
  gap: 24px;
}

/* 입력/체크 카드 규격 */
.calc-form-card,
.calc-result-card,
.content-card {
  width: 100%;
  max-width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 30px;
  box-shadow: var(--shadow-card);
}

@media (max-width: 768px) {
  .calc-form-card,
  .calc-result-card,
  .content-card {
    padding: 20px 18px;
  }
}

/* 카드 상단 배너 */
.card-header-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1.5px solid var(--border-subtle);
}

.card-header-banner h2,
.card-header-banner h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  display: flex;
  align-items: center;
  gap: 8px;
}

.card-badge-pill {
  font-size: 0.76rem;
  font-weight: 700;
  background: var(--primary-bg);
  color: var(--primary-light);
  padding: 4px 10px;
  border-radius: 12px;
}

/* --- 폼 UX 극대화 요소 (15절) --- */
.form-group {
  margin-bottom: 22px;
}

.form-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-main);
  margin-bottom: 8px;
}

.form-hint {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* 2px 뚜렷한 테두리 & 포커스 글로우 (15.1절) */
.form-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-control {
  width: 100%;
  height: 52px;
  padding: 0 54px 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-main);
  background: #ffffff;
  border: 2px solid var(--border-color);  /* 시인성 높은 2px 테두리 */
  border-radius: var(--radius-md);
  outline: none;
  transition: all 0.2s ease;
}

.input-control:focus {
  border-color: #4338ca;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

/* 고정 단위 접미사 (15.2절) */
.input-unit {
  position: absolute;
  right: 18px;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-muted);
  pointer-events: none;
}

/* 실시간 한글 금액 변환 배지 (15.3절) */
.korean-currency-badge {
  display: inline-block;
  margin-top: 8px;
  padding: 4px 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #1e40af;
}

/* 원클릭 퀵 조정 칩 버튼 (15.4절) */
.quick-adjust-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.chip-btn {
  padding: 6px 12px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--primary-light);
  background: #f1f5f9;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  transition: all 0.15s ease;
}

.chip-btn:hover {
  background: var(--primary-bg);
  border-color: var(--primary-glow);
  color: var(--primary);
}

.chip-btn.reset-chip {
  color: #dc2626;
  border-color: #fecaca;
  background: #fef2f2;
}

/* 선택형 버튼 그리드 (라디오/체크 대체) */
.selection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 10px;
}

.select-card-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 14px 10px;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: var(--radius-md);
  text-align: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.select-card-btn:hover {
  border-color: var(--accent-light);
  background: #fffdf5;
  transform: translateY(-2px);
}

.select-card-btn.active {
  border-color: #4338ca;
  background: #eef2ff;
  box-shadow: 0 0 0 3px rgba(67, 56, 202, 0.15);
}

.select-card-btn .card-char {
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--primary);
  margin-bottom: 2px;
}

.select-card-btn .card-subtext {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

/* 카운터 스텝형 버튼 (오행 개수 등) */
.counter-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 18px;
  background: #f8fafc;
  border: 1.5px solid var(--border-subtle);
  border-radius: var(--radius-md);
  margin-bottom: 10px;
}

.counter-meta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.element-tag {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  font-weight: 900;
  font-size: 1.1rem;
  color: #fff;
}

.element-tag.wood  { background: #059669; } /* 목(木) 녹색 */
.element-tag.fire  { background: #dc2626; } /* 화(火) 적색 */
.element-tag.earth { background: #d97706; } /* 토(土) 황색 */
.element-tag.metal { background: #64748b; } /* 금(金) 백/은회색 */
.element-tag.water { background: #1e293b; } /* 수(水) 흑/암청색 */

.counter-name {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--text-main);
}

.counter-desc {
  font-size: 0.78rem;
  color: var(--text-muted);
}

.counter-controls {
  display: flex;
  align-items: center;
  gap: 12px;
}

.counter-btn {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  background: #ffffff;
  border: 2px solid var(--border-color);
  border-radius: 8px;
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  transition: all 0.15s ease;
}

.counter-btn:hover {
  background: var(--primary-bg);
  border-color: var(--primary-glow);
  color: var(--primary);
}

.counter-val {
  min-width: 32px;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--primary);
}

/* --- 폼 하단 '결과 확인' 대형 액션 버튼 (3.2절) --- */
.result-action-box {
  text-align: center;
  margin: 26px 0 10px;
  padding-top: 18px;
  border-top: 2px dashed #cbd5e1;
}

.btn-view-result {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  max-width: 460px;
  height: 56px;
  padding: 0 24px;
  background: linear-gradient(135deg, #1e1b4b, #3730a3);
  color: #ffffff;
  font-size: 1.12rem;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 1px solid rgba(245, 158, 11, 0.4);
  box-shadow: 0 6px 18px rgba(30, 27, 75, 0.25);
  transition: all 0.25s ease;
}

.btn-view-result:hover {
  transform: translateY(-2px);
  background: linear-gradient(135deg, #312e81, #4338ca);
  box-shadow: 0 10px 25px rgba(30, 27, 75, 0.35);
  border-color: var(--accent-light);
}

.btn-view-result .arrow-icon {
  font-size: 1.25rem;
  transition: transform 0.2s ease;
}

.btn-view-result:hover .arrow-icon {
  transform: translateY(3px);
}

.result-action-tip {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* --- 결과 영역 시각적 구분자 (3.2절 3규칙) --- */
.result-column-wrapper {
  scroll-margin-top: 85px;     /* 상단 고정 헤더에 안 가려지도록 안전 마진 */
}

.mobile-result-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 10px 0 18px;
  padding: 8px 16px;
  background: #f1f5f9;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--text-muted);
}

.result-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  background: linear-gradient(135deg, #0f172a, #1e1b4b);
  border-left: 5px solid var(--accent-light);
  border-radius: 12px;
  color: #ffffff;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

.result-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-header-title h3 {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
}

.result-header-badge {
  font-size: 0.74rem;
  font-weight: 800;
  background: rgba(245, 158, 11, 0.25);
  color: #fde68a;
  border: 1px solid rgba(245, 158, 11, 0.5);
  padding: 4px 10px;
  border-radius: 12px;
}

/* 결과 카드 도달 시 펄스 강조 애니메이션 */
.highlight-pulse {
  animation: pulse-ring 1.2s cubic-bezier(0.24, 0, 0.38, 1);
}

@keyframes pulse-ring {
  0% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0.7);
  }
  70% {
    box-shadow: 0 0 0 16px rgba(245, 158, 11, 0);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(245, 158, 11, 0);
  }
}

/* 핵심 결과 수치 및 텍스트 */
.result-stat-banner {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 22px 20px;
  text-align: center;
  margin-bottom: 20px;
}

.result-stat-label {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 6px;
}

.result-stat-value {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  font-weight: 900;
  color: var(--primary);
  line-height: 1.25;
  margin-bottom: 6px;
}

.result-stat-desc {
  font-size: 0.95rem;
  color: var(--text-sub);
  line-height: 1.6;
}

/* 결과 세부 카드 리스트 */
.result-detail-box {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  margin-bottom: 14px;
}

.result-detail-box h4 {
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.result-detail-box p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-sub);
}

/* --- URL 결과 공유 배너 (.share-banner-box) (7.1절) --- */
.share-banner-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fffbeb;
  border: 2px dashed #f59e0b;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin: 22px 0;
}

.share-banner-content strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #92400e;
  margin-bottom: 4px;
}

.share-banner-content p {
  font-size: 0.82rem;
  color: #b45309;
  line-height: 1.45;
}

.btn-share-url {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 18px;
  background: linear-gradient(135deg, #d97706, #f59e0b);
  color: #ffffff;
  font-size: 0.88rem;
  font-weight: 800;
  border-radius: 8px;
  white-space: nowrap;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(217, 119, 6, 0.3);
  transition: all 0.2s ease;
}

.btn-share-url:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(217, 119, 6, 0.4);
}

@media (max-width: 600px) {
  .share-banner-box {
    flex-direction: column;
    text-align: center;
  }
  .btn-share-url {
    width: 100%;
    justify-content: center;
  }
}

/* --- 상태별 알림 박스 (3.3절) --- */
.notice-box {
  padding: 18px 20px;
  border: 1px solid;
  border-left-width: 5px;
  border-radius: 12px;
  margin: 20px 0;
  font-size: 0.94rem;
  line-height: 1.65;
}

.notice-box strong {
  display: block;
  font-size: 1.02rem;
  margin-bottom: 6px;
}

.notice-box-info {
  background: #eff6ff;
  border-color: #93c5fd;
  color: #1e3a8a;
}
.notice-box-info strong { color: #1e40af; }

.notice-box-warning {
  background: #fffbeb;
  border-color: #f59e0b;
  color: #92400e;
}
.notice-box-warning strong { color: #b45309; }

.notice-box-danger {
  background: #fef2f2;
  border-color: #ef4444;
  color: #991b1b;
}
.notice-box-danger strong { color: #b91c1c; }

.notice-box-success {
  background: #ecfdf5;
  border-color: #059669;
  color: #065f46;
}
.notice-box-success strong { color: #047857; }

/* --- 인터랙티브 SVG 맵 (손금 & 관상 & 만세력) --- */
.svg-map-wrapper {
  background: #ffffff;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 24px;
  text-align: center;
  margin: 24px 0;
  box-shadow: var(--shadow-sm);
}

.svg-map-wrapper svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.svg-interactive-zone {
  cursor: pointer;
  transition: all 0.25s ease;
}

.svg-interactive-zone:hover {
  filter: drop-shadow(0 0 8px rgba(245, 158, 11, 0.8));
}

.svg-map-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.legend-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-main);
  background: #f1f5f9;
  padding: 6px 12px;
  border-radius: 20px;
  border: 1px solid #cbd5e1;
  text-decoration: none;
  transition: all 0.2s ease;
}

.legend-chip:hover {
  background: #eef2ff;
  border-color: var(--primary-glow);
  color: var(--primary);
  transform: translateY(-2px);
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}

/* --- 허브 카드 및 기능별 카드 그리드 (.card-stack, .feature-card) (3.3절) --- */
.card-stack {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 820px;
  margin: 20px auto;
}

.feature-card {
  --card-color: #1e1b4b;
  --card-tint: #eef2ff;
  display: block;
  padding: 24px 26px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-left: 5px solid var(--card-color);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-card);
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.feature-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-hover);
  border-color: #cbd5e1;
}

.card--saju  { --card-color: #312e81; --card-tint: #eef2ff; }
.card--palm  { --card-color: #0f766e; --card-tint: #f0fdfa; }
.card--face  { --card-color: #b45309; --card-tint: #fffbeb; }
.card--tool  { --card-color: #7c3aed; --card-tint: #f5f3ff; }

.card-top-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.card-icon-box {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--card-tint);
  color: var(--card-color);
  font-size: 1.3rem;
}

.card-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--card-color);
  letter-spacing: 0.5px;
}

.card-title {
  margin: 6px 0 8px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.35;
}

.card-desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  color: var(--text-sub);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  color: var(--card-color);
  font-weight: 800;
  font-size: 0.9rem;
}

.card-link span {
  transition: transform 0.2s ease;
}

.feature-card:hover .card-link span {
  transform: translateX(4px);
}

/* 2열 모던 타일 그리드 */
.grid-2col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin: 18px 0;
}

@media (max-width: 640px) {
  .grid-2col {
    grid-template-columns: 1fr;
  }
}

/* --- 풍부한 SEO 본문 콘텐츠 스타일링 --- */
.rich-content {
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text-sub);
}

.rich-content h2 {
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--primary);
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
}

.rich-content h3 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 24px 0 12px;
}

.rich-content p {
  margin-bottom: 18px;
}

.rich-content ul, .rich-content ol {
  margin: 0 0 20px 20px;
}

.rich-content li {
  margin-bottom: 8px;
  line-height: 1.7;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 20px 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.custom-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  background: #ffffff;
}

.custom-table th {
  background: #f1f5f9;
  padding: 14px 16px;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 2px solid var(--border-color);
  white-space: nowrap;
}

.custom-table td {
  padding: 14px 16px;
  font-size: 0.92rem;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-sub);
}

.custom-table tr:last-child td {
  border-bottom: none;
}

/* --- 연관 내부 링크 넥서스 컴포넌트 (.related-nexus-section) (14절) --- */
.related-nexus-section {
  margin: 48px 0 28px;
  padding: 32px 24px;
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  text-align: center;
}

.nexus-header {
  margin-bottom: 24px;
}

.nexus-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 800;
  color: #3730a3;
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 10px;
}

.nexus-header h2 {
  font-size: 1.4rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 6px;
}

.nexus-header p {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.nexus-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  text-align: left;
}

.nexus-card {
  display: flex;
  flex-direction: column;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 18px;
  text-decoration: none;
  color: inherit;
  transition: all 0.2s ease;
  position: relative;
}

.nexus-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
  border-color: var(--primary-glow);
}

.nexus-card-tag {
  font-size: 0.72rem;
  font-weight: 800;
  color: #3730a3;
  background: #eef2ff;
  padding: 3px 8px;
  border-radius: 6px;
  align-self: flex-start;
  margin-bottom: 10px;
}

.nexus-card-icon {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.nexus-card h4 {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
  margin-bottom: 6px;
}

.nexus-card p {
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-muted);
  flex-grow: 1;
  margin-bottom: 14px;
}

.nexus-card-link {
  font-size: 0.85rem;
  font-weight: 800;
  color: #4338ca;
  margin-top: auto;
}

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

/* --- 구글 애드센스 고수익 광고 배치 표준 (10.4절) --- */
.ad-placement {
  width: 100%;
  max-width: 820px;
  margin: 28px auto;
  padding: 14px 12px;
  box-sizing: border-box;
  text-align: center;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  /* height / max-height / overflow clipping 절대 지정 금지 */
}

.ad-placement .ad-caption {
  font-size: 0.72rem;
  color: #94a3b8;
  margin-bottom: 8px;
  letter-spacing: 1px;
}

.ad-placement ins.adsbygoogle {
  display: block;
}

@media (max-width: 768px) {
  .ad-placement {
    margin: 20px auto;
    padding: 10px 8px;
  }
}

/* --- 토스트 알림 (common.js 연동) --- */
.toast-container {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  background: rgba(15, 23, 42, 0.95);
  color: #ffffff;
  padding: 12px 22px;
  border-radius: 30px;
  font-size: 0.92rem;
  font-weight: 700;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid rgba(245, 158, 11, 0.4);
  animation: toastIn 0.3s ease forwards;
}

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

/* --- 풋터 운영자 정보 및 신뢰도 규격 (8절) --- */
.site-footer {
  background: #0f172a;
  color: #94a3b8;
  padding: 40px 20px 30px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  margin-top: auto;
}

.site-footer .footer-inner {
  max-width: 820px;
  margin: 0 auto;
  text-align: center;
}

.footer-logo {
  font-size: 1.15rem;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 12px;
}

.footer-desc {
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 20px;
}

.footer-admin-bar {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-md);
  padding: 16px 20px;
  font-size: 0.82rem;
  line-height: 1.8;
  color: #cbd5e1;
  margin-bottom: 20px;
}

.footer-admin-bar a {
  color: var(--accent-light);
  text-decoration: underline;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin-bottom: 16px;
  font-size: 0.84rem;
  font-weight: 600;
}

.footer-legal-links a {
  color: #e2e8f0;
  transition: color 0.2s ease;
}

.footer-legal-links a:hover {
  color: var(--accent-light);
}

.footer-copyright {
  font-size: 0.78rem;
  color: #64748b;
}

/* --- AEO · NEO AI 인용 최적화 박스 & FAQ 리치 스니펫 스타일 (fire-your-seo-agency) --- */
.aeo-direct-box {
  background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
  border: 1.5px solid #6366f1;
  border-left: 5px solid #4f46e5;
  border-radius: var(--radius-md);
  padding: 20px 22px;
  margin: 22px 0 28px 0;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.aeo-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #1e1b4b;
  color: #fbbf24;
  font-size: 0.78rem;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 9999px;
  margin-bottom: 10px;
  letter-spacing: -0.01em;
}

.aeo-direct-text {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.65;
  color: #0f172a;
  margin-bottom: 12px;
}

.aeo-direct-text strong {
  color: #4338ca;
  background: linear-gradient(180deg, transparent 65%, #e0e7ff 65%);
}

.aeo-fact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed #cbd5e1;
}

.aeo-fact-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-sm);
  padding: 8px 12px;
  font-size: 0.85rem;
}

.aeo-fact-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  color: #6366f1;
  margin-bottom: 2px;
}

.aeo-fact-val {
  color: #334155;
  font-weight: 600;
}

.faq-rich-box {
  margin: 36px 0 24px 0;
}

.faq-rich-title {
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.faq-rich-item {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-md);
  padding: 16px 20px;
  margin-bottom: 12px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faq-rich-item:hover {
  border-color: #cbd5e1;
  box-shadow: var(--shadow-sm);
}

.faq-rich-q {
  font-size: 0.98rem;
  font-weight: 800;
  color: #1e1b4b;
  margin-bottom: 6px;
  display: flex;
  align-items: flex-start;
  gap: 8px;
}

.faq-rich-q .q-mark {
  color: #4f46e5;
  font-weight: 900;
}

.faq-rich-a {
  font-size: 0.92rem;
  line-height: 1.7;
  color: #475569;
  padding-left: 20px;
}

/* 미디어 쿼리 세부 조정 */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ==========================================================================
   인터랙티브 사실적 해부학 SVG 맵 (손금 & 관상)
   ========================================================================== */
.svg-map-wrapper {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  margin: 28px 0;
  text-align: center;
  box-shadow: 0 4px 20px rgba(30, 27, 75, 0.05);
}

.realistic-palm-svg,
.realistic-face-svg {
  display: block;
  margin: 0 auto;
  max-width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 25px rgba(30, 27, 75, 0.08));
  user-select: none;
}

.svg-interactive-zone {
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), filter 0.2s ease;
}

.svg-interactive-zone:hover {
  filter: brightness(1.08) drop-shadow(0 4px 12px rgba(99, 102, 241, 0.35));
}

.svg-interactive-zone rect {
  transition: transform 0.2s ease, filter 0.2s ease;
}

.svg-interactive-zone:hover rect {
  filter: brightness(1.15);
}

