/* ============================================================
   Report Page — Base
   ============================================================ */
:root {
  --bg-dark: #1C1C1C;
  --bg-beige: #E8DCC8;
  --gold: #C4973B;
  --gold-hover: #D4A74B;
  --white: #FFFEF9;
  --sub-text: #999999;
  --card-bg: rgba(232,220,200,0.08);
  --card-border: rgba(196,151,59,0.2);
}

*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg-beige);
  color: #333;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

.serif {
  font-family: 'Noto Serif KR', 'Batang', 'Georgia', serif;
}

/* ============================================================
   Header
   ============================================================ */
.report-header {
  background: var(--bg-dark);
  color: var(--white);
  padding: 20px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.report-header-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.report-header-logo {
  font-size: 22px;
  font-weight: 800;
  color: var(--white);
  text-decoration: none;
  letter-spacing: 1px;
}

.report-header-logo:hover {
  color: var(--gold);
}

.report-header-back {
  font-size: 13px;
  color: var(--sub-text);
  text-decoration: none;
  transition: color 0.2s;
}

.report-header-back:hover {
  color: var(--gold);
}

.tier-badge {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 14px;
  border-radius: 20px;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.tier-badge.best {
  background: var(--gold);
  color: var(--bg-dark);
}

.tier-badge.pro {
  background: rgba(196,151,59,0.15);
  color: var(--gold);
  border: 1px solid var(--gold);
}

.tier-badge.couple {
  background: rgba(196,151,59,0.1);
  color: var(--gold);
  border: 1px solid rgba(196,151,59,0.4);
}

.tier-badge.mini {
  background: rgba(108, 99, 255, 0.15);
  color: #7B74FF;
  border: 1px solid rgba(108, 99, 255, 0.3);
}

/* MINI 섹션 레이블 */
.card-section-label {
  font-size: 11px;
  letter-spacing: 3px;
  color: var(--gold);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 8px;
  opacity: 0.8;
}

/* MINI 일간/일지 강조 블록 */
.mini-pillar-block {
  text-align: center;
  padding: 32px 24px;
  background: rgba(108,99,255,0.05);
  border: 1px solid rgba(108,99,255,0.15);
  border-radius: 12px;
  margin-bottom: 24px;
}
.mini-pillar-hanja {
  font-size: 72px;
  font-family: 'Noto Serif KR', serif;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 8px;
}
.mini-pillar-label {
  font-size: 20px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 2px;
}
.mini-pillar-sub {
  font-size: 13px;
  color: var(--sub-text);
  margin-top: 6px;
}

/* MINI 업셀 노트 */
.mini-upsell-note {
  margin-top: 20px;
  padding: 12px 16px;
  background: rgba(196,151,59,0.06);
  border-left: 3px solid var(--gold);
  border-radius: 0 8px 8px 0;
  font-size: 13px;
  color: var(--sub-text);
  line-height: 1.7;
}

/* MINI 오행 바 */
.mini-oheng-bar-wrap { display:flex; flex-direction:column; gap:10px; margin:16px 0; }
.mini-oheng-bar-item { display:flex; align-items:center; gap:12px; }
.mini-oheng-bar-label { width:28px; font-size:12px; font-weight:700; color:var(--white); }
.mini-oheng-bar-track { flex:1; background:rgba(255,255,255,0.08); border-radius:4px; height:14px; overflow:hidden; }
.mini-oheng-bar-fill { height:100%; border-radius:4px; background:var(--gold); }
.mini-oheng-bar-fill.oh-wood { background:#2E8B57; }
.mini-oheng-bar-fill.oh-fire { background:#DC143C; }
.mini-oheng-bar-fill.oh-earth { background:#DAA520; }
.mini-oheng-bar-fill.oh-metal { background:#A8A8A8; }
.mini-oheng-bar-fill.oh-water { background:#4169E1; }
.mini-oheng-bar-count { font-size:12px; color:var(--sub-text); width:20px; text-align:right; }

/* 체질 키워드 */
.mini-keyword-block {
  text-align: center;
  padding: 16px;
  background: rgba(196,151,59,0.08);
  border-radius: 8px;
  margin: 16px 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--gold);
  letter-spacing: 1px;
}

@media print {
  .mini-pillar-block { break-inside: avoid; }
  .mini-upsell-note { display: none; }
}

/* ============================================================
   Main Content
   ============================================================ */
.report-main {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 60px;
}

/* ============================================================
   COUPLE Form
   ============================================================ */
.couple-form-card {
  background: #fff;
  border: 2px solid var(--gold);
  border-radius: 16px;
  padding: 32px 28px;
  margin-bottom: 32px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.couple-form-card h3 {
  font-size: 20px;
  font-weight: 700;
  color: #2A2A2A;
  margin-bottom: 24px;
  text-align: center;
}

.couple-form-card .form-group {
  margin-bottom: 16px;
}

.couple-form-card label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
}

.couple-form-card input[type="text"],
.couple-form-card input[type="date"],
.couple-form-card select {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid #ddd;
  border-radius: 8px;
  font-size: 15px;
  font-family: inherit;
  background: #FAFAFA;
  transition: border-color 0.2s;
}

.couple-form-card input:focus,
.couple-form-card select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 2px rgba(196,151,59,0.15);
}

.couple-form-card .radio-group {
  display: flex;
  gap: 16px;
  margin-top: 4px;
}

.couple-form-card .radio-label {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  font-size: 15px;
  color: #333;
}

.couple-form-card .radio-label input[type="radio"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.couple-form-card .checkbox-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 6px;
}

.couple-form-card .checkbox-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--gold);
}

.couple-form-card .checkbox-row label {
  font-size: 13px;
  color: #888;
  margin-bottom: 0;
}

.btn-couple-start {
  width: 100%;
  padding: 14px;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 17px;
  font-weight: 700;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 2px;
  margin-top: 12px;
  transition: background 0.2s, transform 0.2s;
}

.btn-couple-start:hover {
  background: var(--gold-hover);
  transform: translateY(-2px);
}

.form-error-msg {
  color: #C23B22;
  font-size: 12px;
  margin-top: 4px;
  display: none;
}

/* ============================================================
   Report Container
   ============================================================ */
#report-container {
  /* The module's renderReport HTML goes here.
     Styles come from ../styles.css (output/styles.css) */
}

/* ============================================================
   Loading State
   ============================================================ */
.report-loading {
  text-align: center;
  padding: 80px 20px;
  color: #888;
  font-size: 16px;
}

.report-loading .spinner {
  display: inline-block;
  width: 32px;
  height: 32px;
  border: 3px solid #ddd;
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin-bottom: 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   Print / Actions Bar
   ============================================================ */
.report-actions {
  text-align: center;
  padding: 32px 0;
  display: none;
}

.btn-print {
  display: inline-block;
  background: var(--gold);
  color: var(--bg-dark);
  font-size: 16px;
  font-weight: 700;
  padding: 14px 40px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  letter-spacing: 1px;
  transition: background 0.2s, transform 0.2s;
}

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

/* ============================================================
   Footer
   ============================================================ */
.report-footer {
  background: var(--bg-dark);
  color: var(--sub-text);
  text-align: center;
  padding: 24px 16px;
  font-size: 12px;
}

.report-footer .logo {
  font-size: 18px;
  font-weight: 800;
  color: var(--white);
  margin-bottom: 4px;
}

/* ============================================================
   Mobile Responsive — Report Content Overrides
   ============================================================ */

/* -- 전역 모바일 기본 -- */
#report-container .container {
  padding: 0;
  max-width: 100%;
}

#report-container .card {
  border-radius: 8px;
  margin-bottom: 16px;
  overflow-x: hidden;
}

@media (max-width: 640px) {
  .report-header {
    padding: 14px 16px;
  }

  .report-header-logo {
    font-size: 18px;
  }

  .report-header-back {
    font-size: 12px;
  }

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

  .report-main {
    padding: 12px 0 40px;
  }

  /* 카드 패딩 축소 */
  #report-container .card {
    padding: 16px 14px;
    margin-left: 4px;
    margin-right: 4px;
    border-radius: 10px;
  }

  #report-container .card h2 {
    font-size: 17px;
  }

  #report-container .card p {
    font-size: 14px;
    line-height: 1.8;
  }

  /* 표지 페이지 — 모바일 최적화 */
  #report-container .cover-page {
    min-height: auto;
    padding: 20px 8px;
  }

  #report-container .cover-page::before {
    inset: 8px;
  }
  #report-container .cover-page::after {
    inset: 12px;
  }

  #report-container .cover-inner {
    padding: 40px 20px;
  }

  #report-container .cover-logo {
    font-size: 36px;
    letter-spacing: 3px;
  }

  #report-container .cover-institute {
    font-size: 12px;
    letter-spacing: 3px;
  }

  #report-container .cover-title {
    font-size: 22px;
  }

  #report-container .cover-client-name {
    font-size: 24px;
  }

  /* 사주 테이블 — 4열 유지, 폰트 축소 */
  #report-container .saju-table {
    gap: 6px;
    max-width: 100%;
    margin: 0 auto 16px;
  }

  #report-container .saju-col .col-title {
    font-size: 12px;
    padding: 4px;
  }

  #report-container .saju-col .gan-cell,
  #report-container .saju-col .ji-cell {
    font-size: 18px;
    padding: 10px 4px;
  }

  #report-container .saju-col .gan-cell .hanja-small,
  #report-container .saju-col .ji-cell .hanja-small {
    font-size: 11px;
  }

  #report-container .saju-col .sipsin-label {
    font-size: 10px;
    padding: 3px;
  }

  /* 대운 타임라인 — 3열 그리드 */
  #report-container .daeun-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  #report-container .daeun-card {
    flex: none;
    min-width: 0;
    padding: 8px 4px;
    font-size: 12px;
  }

  #report-container .daeun-card .age {
    font-size: 13px;
  }

  #report-container .daeun-card .ganji {
    font-size: 16px;
  }

  /* 월운 타임라인 — 3열 그리드 */
  #report-container .wolun-timeline {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
  }

  #report-container .wolun-card {
    flex: none;
    min-width: 0;
    padding: 6px 4px;
  }

  /* 세운 서머리 — 1열 */
  #report-container .seun-summary {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 16px;
  }

  /* 오행 바 */
  #report-container .oheng-bar-label {
    font-size: 12px;
  }

  #report-container .oheng-bar-outer {
    height: 18px;
  }

  /* 리포트 헤더 */
  #report-container .report-header h1 {
    font-size: 22px;
  }

  #report-container .report-header .client-name {
    font-size: 18px;
  }

  /* 궁합 관련 */
  #report-container .gunghap-persons {
    flex-direction: column;
    gap: 12px;
    align-items: center;
  }

  #report-container .compat-score-circle {
    width: 110px;
    height: 110px;
  }

  #report-container .saju-comparison {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  #report-container .oheng-comparison {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  /* COUPLE 폼 */
  .couple-form-card {
    margin: 8px;
    padding: 24px 16px;
    border-radius: 12px;
  }

  /* 인쇄 버튼 */
  .btn-print {
    width: calc(100% - 32px);
    margin: 0 16px;
    padding: 14px;
  }

  /* 목차 */
  #report-container .toc-page {
    min-height: auto;
    padding: 24px 16px;
  }

  #report-container .toc-page ol {
    padding-left: 20px;
  }

  /* 형충파해합 그리드 — 1열 */
  #report-container .hcph-grid {
    grid-template-columns: 1fr;
  }

  /* reason-block */
  #report-container .reason-block {
    padding: 10px 12px;
    font-size: 13px;
  }

  /* 테이블 오버플로 방지 */
  #report-container table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 13px;
  }
}

/* 아주 작은 화면 (360px 이하) */
@media (max-width: 360px) {
  #report-container .saju-col .gan-cell,
  #report-container .saju-col .ji-cell {
    font-size: 16px;
    padding: 8px 2px;
  }

  #report-container .daeun-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  #report-container .wolun-timeline {
    grid-template-columns: repeat(2, 1fr);
  }

  #report-container .cover-logo {
    font-size: 30px;
  }
}

/* ============================================================
   Report Share Section — 카카오톡 공유 버튼
   ============================================================ */
.report-share-section {
  margin-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.btn-kakao-share-report {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #FEE500;
  color: #191919;
  font-size: 15px;
  font-weight: 700;
  padding: 13px 28px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  width: calc(100% - 32px);
  max-width: 400px;
  justify-content: center;
  transition: background 0.15s, transform 0.15s;
  min-height: 48px;
}

.btn-kakao-share-report:hover { background: #F0D800; transform: translateY(-1px); }
.btn-kakao-share-report:active { transform: scale(0.98); }

.btn-url-copy-report {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: transparent;
  color: var(--gold);
  font-size: 14px;
  font-weight: 600;
  padding: 10px 24px;
  border: 1px solid rgba(196,151,59,0.4);
  border-radius: 8px;
  cursor: pointer;
  width: calc(100% - 32px);
  max-width: 400px;
  justify-content: center;
  min-height: 44px;
}

.btn-url-copy-report:hover { background: rgba(196,151,59,0.08); }
.btn-url-copy-report:active { transform: scale(0.98); }

.report-share-copied-msg {
  font-size: 13px;
  color: #4CAF50;
  font-weight: 600;
}

.share-desc {
  font-size: 12px;
  color: #999;
  margin-top: 2px;
}

/* ============================================================
   Paywall — 블러/잠금 오버레이
   ============================================================ */
.locked-section {
  filter: blur(8px);
  -webkit-filter: blur(8px);
  user-select: none;
  -webkit-user-select: none;
  pointer-events: none;
}

.paywall-wrapper {
  position: relative;
  overflow: hidden;
}

.paywall-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 10;
  background: rgba(232, 220, 200, 0.7);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  border-radius: 8px;
  padding: 40px 32px;
  text-align: center;
}

.paywall-overlay-lock {
  width: 40px;
  height: 40px;
  margin-bottom: 16px;
  color: var(--gold, #C4973B);
}

.paywall-overlay-title {
  font-size: 20px;
  font-weight: 700;
  color: #1C1C1C;
  margin-bottom: 10px;
  line-height: 1.4;
  font-family: 'Noto Serif KR', serif;
}

.paywall-overlay-sub {
  font-size: 14px;
  color: #666;
  margin-bottom: 20px;
  line-height: 1.6;
}

.paywall-overlay-price-wrap {
  margin-bottom: 20px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: center;
}

.paywall-overlay-price-original {
  font-size: 16px;
  color: #999;
  text-decoration: line-through;
}

.paywall-overlay-price-arrow {
  font-size: 16px;
  color: #999;
}

.paywall-overlay-price-sale {
  font-size: 28px;
  font-weight: 800;
  color: var(--gold, #C4973B);
}

.paywall-overlay-cta {
  display: inline-block;
  background: var(--gold, #C4973B);
  color: var(--bg-dark, #1C1C1C);
  font-size: 16px;
  font-weight: 700;
  padding: 16px 48px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-family: 'Noto Serif KR', serif;
  letter-spacing: 1px;
  transition: background 0.2s, transform 0.2s;
}

.paywall-overlay-cta:hover {
  background: var(--gold-hover, #D4A74B);
  transform: translateY(-2px);
}

.paywall-overlay-cta:active {
  transform: scale(0.98);
}

/* ---- Sticky Bottom CTA ---- */
.paywall-sticky-cta {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: var(--bg-dark, #1C1C1C);
  border-top: 1px solid rgba(196,151,59,0.3);
  transform: translateY(100%);
  transition: transform 0.3s ease;
  padding: 12px 20px;
}

.paywall-sticky-cta.visible {
  transform: translateY(0);
}

.paywall-sticky-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.paywall-sticky-text {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
}

.paywall-sticky-lock {
  font-size: 16px;
}

.paywall-sticky-action {
  display: flex;
  align-items: center;
  gap: 12px;
}

.paywall-sticky-price {
  font-size: 16px;
  font-weight: 800;
  color: var(--gold, #C4973B);
}

.paywall-sticky-btn {
  display: inline-block;
  background: var(--gold, #C4973B);
  color: var(--bg-dark, #1C1C1C);
  font-size: 14px;
  font-weight: 700;
  padding: 10px 24px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  white-space: nowrap;
}

.paywall-sticky-btn:hover {
  background: var(--gold-hover, #D4A74B);
  transform: translateY(-1px);
}

.paywall-sticky-btn:active {
  transform: scale(0.98);
}

/* ---- Paywall 모바일 반응형 ---- */
@media (max-width: 640px) {
  .paywall-overlay {
    padding: 24px 16px;
  }
  .paywall-overlay-title {
    font-size: 18px;
    word-break: keep-all;
  }
  .paywall-overlay-sub {
    font-size: 13px;
    word-break: keep-all;
  }
  .paywall-overlay-price-sale {
    font-size: 24px;
  }
  .paywall-overlay-cta {
    width: 100%;
    padding: 14px;
    font-size: 15px;
    min-height: 52px;
  }
  .paywall-sticky-inner {
    flex-direction: column;
    gap: 8px;
  }
  .paywall-sticky-text {
    font-size: 13px;
  }
  .paywall-sticky-action {
    width: 100%;
    justify-content: space-between;
  }
  .paywall-sticky-btn {
    flex: 1;
    min-height: 44px;
  }

  /* ① paywall sticky bar 노치(홈 인디케이터) 대응 */
  .paywall-sticky-cta {
    padding-bottom: calc(12px + env(safe-area-inset-bottom));
  }

  /* ② 주문 모달 iOS 자동확대 방지 (인라인 font-size:14px 재정의) */
  #order-name,
  #order-contact {
    font-size: 16px !important;
  }

  /* ③ couple 폼 input iOS 자동확대 방지 */
  .couple-form-card input[type="text"],
  .couple-form-card input[type="date"],
  .couple-form-card select {
    font-size: 16px;
  }

  /* ④ 닫기 버튼 터치 타깃 */
  #order-modal button[onclick="closeOrderModal()"] {
    min-width: 44px;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 8px;
    right: 8px;
  }
}

@media (max-width: 360px) {
  .paywall-overlay-title {
    font-size: 16px;
  }
  .paywall-overlay-sub {
    font-size: 12px;
  }
  .paywall-overlay {
    padding: 20px 12px;
  }
}

/* ============================================================
   Print Media
   ============================================================ */
@media print {
  .report-header,
  .report-footer,
  .report-actions,
  .report-share-section,
  .couple-form-card {
    display: none !important;
  }
  body {
    background: #fff;
  }
  .report-main {
    padding: 0;
    max-width: 100%;
  }
  /* Paywall Print 보호 */
  .locked-section {
    filter: blur(12px) !important;
    -webkit-filter: blur(12px) !important;
  }
  .paywall-overlay {
    display: flex !important;
    position: absolute !important;
  }
  .paywall-sticky-cta {
    display: none !important;
  }
  /* 신규 챕터 A/B 인쇄 잘림 방지 */
  .luck-cal-month { break-inside: avoid; }
  .takil-block { break-inside: avoid; }
  .takil-table tr { break-inside: avoid; }
  .luck-cal-cell.day-gil { color: #9a6f1f !important; }
}

/* ============================================================
   신규 챕터 A — 월별 길흉 달력 (luck-cal-)
   ============================================================ */
.luck-cal-legend {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
  align-items: center;
  margin: 6px 0 16px;
  font-size: 13px;
  color: rgba(255, 254, 249, 0.82);
}
.luck-cal-leg-item { display: inline-flex; align-items: center; gap: 6px; }
.luck-cal-dot { font-size: 13px; line-height: 1; }
.luck-cal-dot.gil { color: #C4973B; }
.luck-cal-dot.pyung { color: rgba(255, 254, 249, 0.5); }
.luck-cal-dot.hung { color: rgba(220, 100, 100, 0.9); }

.luck-cal-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.luck-cal-month {
  border: 1px solid rgba(196, 151, 59, 0.28);
  border-radius: 10px;
  padding: 12px 12px 10px;
  background: rgba(255, 255, 255, 0.02);
}
.luck-cal-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 8px;
  border-bottom: 1px solid rgba(196, 151, 59, 0.18);
  padding-bottom: 6px;
}
.luck-cal-mname { font-size: 16px; font-weight: 700; color: #C4973B; }
.luck-cal-ganji { font-size: 13px; color: rgba(255, 254, 249, 0.85); }
.luck-cal-sipsin { font-size: 12px; color: rgba(255, 254, 249, 0.6); margin-left: auto; }

.luck-cal-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 3px;
}
.luck-cal-weekdays span {
  text-align: center;
  font-size: 11px;
  color: rgba(255, 254, 249, 0.45);
  padding: 2px 0;
}
.luck-cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.luck-cal-cell {
  text-align: center;
  font-size: 12px;
  padding: 4px 0;
  border-radius: 4px;
  color: rgba(255, 254, 249, 0.72);
}
.luck-cal-cell.empty { background: transparent; }
.luck-cal-cell.day-gil { background: rgba(196, 151, 59, 0.22); color: #C4973B; font-weight: 700; }
.luck-cal-cell.day-pyung { background: rgba(255, 255, 255, 0.05); color: rgba(255, 254, 249, 0.65); }
.luck-cal-cell.day-hung { background: rgba(220, 53, 69, 0.18); color: rgba(220, 100, 100, 0.9); }
.luck-cal-cell.today { outline: 2px solid #C4973B; outline-offset: -2px; }

.luck-cal-keydays {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed rgba(196, 151, 59, 0.2);
}
.luck-cal-key {
  font-size: 12px;
  line-height: 1.55;
  margin-bottom: 4px;
  color: rgba(255, 254, 249, 0.82);
}
.luck-cal-key.gil { color: rgba(220, 190, 130, 0.95); }
.luck-cal-key.hung { color: rgba(220, 130, 130, 0.9); }
.luck-cal-key.none { color: rgba(255, 254, 249, 0.55); font-style: italic; }
.luck-cal-outro {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 254, 249, 0.7);
}

/* ============================================================
   신규 챕터 B — 택일 가이드 (takil-)
   ============================================================ */
.takil-block { margin-bottom: 26px; }
.takil-cat {
  font-size: 18px;
  color: #C4973B;
  margin: 0 0 6px;
  border-left: 3px solid #C4973B;
  padding-left: 10px;
}
.takil-principle {
  font-size: 14px;
  line-height: 1.75;
  color: rgba(255, 254, 249, 0.8);
  margin: 0 0 12px;
}
.takil-table-title {
  font-size: 14px;
  font-weight: 700;
  color: rgba(220, 190, 130, 0.95);
  margin: 12px 0 6px;
}
.takil-table-title.avoid { color: rgba(220, 130, 130, 0.9); }
.takil-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin-bottom: 8px;
}
.takil-table th,
.takil-table td {
  border: 1px solid rgba(196, 151, 59, 0.22);
  padding: 7px 9px;
  text-align: left;
  color: rgba(255, 254, 249, 0.85);
}
.takil-table th {
  background: rgba(196, 151, 59, 0.14);
  color: #C4973B;
  font-weight: 700;
}
.takil-avoid th { background: rgba(220, 53, 69, 0.12); color: rgba(220, 130, 130, 0.95); }
.takil-empty {
  font-size: 13px;
  color: rgba(255, 254, 249, 0.6);
  font-style: italic;
  margin: 6px 0 8px;
}
.takil-outro {
  margin-top: 18px;
  font-size: 14px;
  line-height: 1.7;
  color: rgba(255, 254, 249, 0.7);
}

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

/* ============================================================
   프리미엄 챕터 C — 전 생애 대운 지도 (daeun-map)
   ============================================================ */
.daeun-map {
  position: relative;
  margin: 18px 0 8px;
  padding-left: 6px;
}
.daeun-map-node {
  position: relative;
  display: flex;
  gap: 14px;
  padding: 0 0 18px 18px;
  border-left: 2px solid rgba(196, 151, 59, 0.35);
}
.daeun-map-node:last-child { border-left-color: transparent; }
.daeun-map-marker {
  position: absolute;
  left: -8px;
  top: 4px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: rgba(196, 151, 59, 0.5);
  border: 2px solid rgba(255, 254, 249, 0.6);
}
.daeun-map-now > .daeun-map-marker {
  background: #C4973B;
  box-shadow: 0 0 0 4px rgba(196, 151, 59, 0.25);
  width: 14px;
  height: 14px;
  left: -9px;
}
.daeun-map-now {
  border-left-color: #C4973B;
}
.daeun-map-body {
  flex: 1;
  background: rgba(196, 151, 59, 0.05);
  border: 1px solid rgba(196, 151, 59, 0.22);
  border-radius: 10px;
  padding: 12px 14px;
}
.daeun-map-now > .daeun-map-body {
  border-color: rgba(196, 151, 59, 0.55);
  background: rgba(196, 151, 59, 0.1);
}
.daeun-map-head {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.daeun-map-age { font-size: 15px; font-weight: 700; color: #C4973B; }
.daeun-map-year { font-size: 12px; color: #6b6b6b; }
.daeun-map-now-badge {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: #1C1C1C;
  background: #C4973B;
  padding: 2px 9px;
  border-radius: 10px;
}
.daeun-map-ganji { font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.daeun-map-sipsin { font-size: 13px; color: var(--color-text-muted, #666); margin-bottom: 6px; }
.daeun-map-phase {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 1px 8px;
  border-radius: 8px;
  margin-left: 4px;
}
.daeun-map-phase.phase-rise { background: rgba(46, 139, 87, 0.16); color: #2E8B57; }
.daeun-map-phase.phase-turn { background: rgba(220, 100, 100, 0.16); color: #C0392B; }
.daeun-map-phase.phase-build { background: rgba(140, 120, 200, 0.16); color: #6A5ACD; }
.daeun-map-title { font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.daeun-map-desc { font-size: 13.5px; line-height: 1.85; }
.daeun-map-outro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
  padding: 12px 14px;
  background: rgba(196, 151, 59, 0.07);
  border-radius: 8px;
}

/* ============================================================
   프리미엄 챕터 D — 인연의 창 연표 (inyeon-)
   ============================================================ */
.inyeon-note-time { font-size: 12.5px; color: var(--color-text-muted, #666); margin: 4px 0 10px; }
.inyeon-strong-note {
  font-size: 13.5px;
  line-height: 1.8;
  padding: 12px 14px;
  border: 1px solid rgba(196, 151, 59, 0.4);
  border-radius: 10px;
  background: rgba(196, 151, 59, 0.07);
  margin: 10px 0 16px;
}
.inyeon-timeline { display: flex; flex-direction: column; gap: 12px; margin: 14px 0 8px; }
.inyeon-node {
  display: flex;
  gap: 14px;
  align-items: stretch;
  border-radius: 10px;
  padding: 12px 14px;
  border: 1px solid rgba(196, 151, 59, 0.25);
  background: rgba(255, 255, 255, 0.02);
}
.inyeon-node.grade-strong { border-color: rgba(196, 151, 59, 0.6); background: rgba(196, 151, 59, 0.08); }
.inyeon-year {
  min-width: 62px;
  font-size: 20px;
  font-weight: 800;
  color: #C4973B;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.inyeon-age { font-size: 11px; font-weight: 500; color: #6b6b6b; margin-top: 2px; }
.inyeon-body { flex: 1; }
.inyeon-head { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; }
.inyeon-ganji { font-size: 15px; font-weight: 700; }
.inyeon-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 10px;
}
.inyeon-badge.strong { background: #C4973B; color: #1C1C1C; }
.inyeon-badge.mid { background: rgba(196, 151, 59, 0.18); color: #C4973B; border: 1px solid rgba(196, 151, 59, 0.4); }
.inyeon-desc { font-size: 13.5px; line-height: 1.8; margin-bottom: 6px; }
.inyeon-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.inyeon-tag {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 8px;
  background: rgba(196, 151, 59, 0.12);
  color: #C4973B;
}
.inyeon-empty, .inyeon-outro {
  margin-top: 12px;
  font-size: 14px;
  line-height: 1.8;
}
.inyeon-empty {
  padding: 14px;
  border-radius: 8px;
  background: rgba(196, 151, 59, 0.06);
}

/* ============================================================
   프리미엄 챕터 E — 직업 적성 랭킹 (job-)
   ============================================================ */
.job-summary {
  font-size: 14px;
  line-height: 1.8;
  padding: 12px 14px;
  border-radius: 8px;
  background: rgba(196, 151, 59, 0.07);
  margin: 12px 0 16px;
}
.job-rank-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin: 8px 0 16px;
}
.job-rank-table th {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 2px solid rgba(196, 151, 59, 0.4);
  color: #C4973B;
  font-weight: 700;
}
.job-rank-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(196, 151, 59, 0.15);
  vertical-align: top;
}
.job-rank-table tr.job-top { background: rgba(196, 151, 59, 0.08); }
.job-rank-table tr.job-top .job-rank-no { color: #C4973B; }
.job-rank-no { font-weight: 800; width: 42px; text-align: center; }
.job-rank-name { font-weight: 700; width: 34%; }
.job-rank-reason { color: var(--color-text-muted, #666); line-height: 1.7; }
.job-avoid {
  border: 1px solid rgba(220, 100, 100, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  background: rgba(220, 100, 100, 0.05);
  margin-bottom: 8px;
}
.job-avoid-title { font-size: 13px; font-weight: 700; color: #C0392B; margin-bottom: 6px; }
.job-avoid ul { margin: 0; padding-left: 18px; }
.job-avoid li { font-size: 13.5px; line-height: 1.8; }
.job-empty, .job-outro { margin-top: 12px; font-size: 14px; line-height: 1.8; }

/* ============================================================
   프리미엄 챕터 잠금 배지 (premium-locked-badge)
   ============================================================ */
.premium-locked {
  position: relative;
  min-height: 120px;
}
.premium-locked-badge {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 8px;
  padding: 28px 20px;
  margin-top: 12px;
  border: 1px solid rgba(196, 151, 59, 0.5);
  border-radius: 12px;
  background: rgba(196, 151, 59, 0.06);
}
.premium-locked-lock {
  width: 34px;
  height: 34px;
  color: var(--gold, #C4973B);
}
.premium-locked-title { font-size: 16px; font-weight: 700; color: var(--gold, #C4973B); }
.premium-locked-sub { font-size: 13px; color: var(--color-text-muted, #999); line-height: 1.7; }
.premium-locked-cta {
  margin-top: 8px;
  background: var(--gold, #C4973B);
  color: #1C1C1C;
  border: none;
  border-radius: 8px;
  padding: 11px 22px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  font-family: inherit;
}
.premium-locked-cta:hover { background: var(--gold-hover, #D4A74B); }

@media (max-width: 640px) {
  .inyeon-node { flex-direction: column; gap: 6px; }
  .inyeon-year { flex-direction: row; align-items: baseline; gap: 8px; min-width: 0; }
  .job-rank-table { font-size: 12.5px; }
  .job-rank-name { width: auto; }
}

/* 프리미엄 챕터 인쇄 잘림 방지 */
@media print {
  .premium-chapter { break-inside: auto; }
  .daeun-map-node { break-inside: avoid; }
  .inyeon-node { break-inside: avoid; }
  .job-rank-table tr { break-inside: avoid; }
  .job-avoid { break-inside: avoid; }
  .premium-locked-badge { break-inside: avoid; }
  .daeun-map-phase, .inyeon-badge, .daeun-map-now-badge,
  .inyeon-tag, .job-summary, .job-avoid, .daeun-map-body,
  .inyeon-strong-note, .premium-locked-badge {
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
}
