/* =======================================================
 * 명운당 · 정통 사주 분석 사이트 스타일
 * 디자인 컨셉: 한지 위의 금박 — 깊은 미드나잇 + 금빛 + 주사색
 * 폰트: Nanum Myeongjo · Gowun Batang · Noto Serif KR (모두 OFL)
 * ======================================================= */

/* ===== CSS Reset / Base ===== */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; background: none; border: 0; cursor: pointer; color: inherit; }
a { color: inherit; text-decoration: none; }
input, select, textarea { font: inherit; }

/* ===== Design Tokens ===== */
:root {
  /* Colors - 전통 한국 팔레트 */
  --bg-0: #0b0a10;          /* 가장 깊은 미드나잇 */
  --bg-1: #14111a;          /* 본문 배경 */
  --bg-2: #1d1826;          /* 카드 배경 */
  --bg-3: #26202e;          /* 호버/강조 배경 */
  --line: #2f2838;          /* 경계선 */
  --line-strong: #4a3f5a;

  --gold: #c9a961;          /* 금박 */
  --gold-bright: #e4c786;   /* 밝은 금 */
  --gold-deep: #8a6d33;     /* 깊은 금 */
  --gold-shadow: rgba(201,169,97,0.15);

  --cinnabar: #a8321e;      /* 주사색 (인장·단청) */
  --cinnabar-light: #c74b36;

  --jade: #6b8a72;          /* 청자 옥색 */
  --paper: #f5eddc;         /* 한지 */
  --paper-dim: #e8dcc2;

  --text-1: #f0e8d8;        /* 본문 — 한지색 */
  --text-2: #c8bfa8;        /* 보조 */
  --text-3: #8a8275;        /* 약한 */
  --text-dim: #5a5548;

  /* Typography */
  --font-display: 'Nanum Myeongjo', 'Noto Serif KR', serif;
  --font-body: 'Noto Serif KR', 'Gowun Batang', serif;
  --font-accent: 'Gowun Batang', 'Nanum Myeongjo', serif;
  --font-latin: 'Cormorant Garamond', 'Times New Roman', serif;

  /* Spacing */
  --wrap-max: 1240px;
  --space-xs: 0.5rem;
  --space-sm: 1rem;
  --space-md: 2rem;
  --space-lg: 4rem;
  --space-xl: 6rem;
  --space-2xl: 9rem;

  --radius: 2px;
  --radius-lg: 6px;

  --ease: cubic-bezier(.23,.6,.25,1);
  --ease-out: cubic-bezier(.16,.84,.3,1);
}

/* ===== Base ===== */
body {
  background: var(--bg-0);
  color: var(--text-1);
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.75;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* 배경에 미세한 한지 질감 */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 10%, rgba(201,169,97,0.04), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(168,50,30,0.03), transparent 50%);
  pointer-events: none;
  z-index: 0;
}

.wrap { max-width: var(--wrap-max); margin: 0 auto; padding: 0 24px; }

em { font-style: normal; color: var(--gold-bright); font-family: var(--font-display); }
strong { color: var(--paper); font-weight: 600; }
s { color: var(--text-dim); }

/* ===== Skip link (a11y) ===== */
.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--gold); color: var(--bg-0);
  padding: 12px 16px; z-index: 9999; font-weight: 700;
}
.skip-link:focus { left: 16px; top: 16px; }

/* =======================================================
   상단 공지 bar
   ======================================================= */
.notice-bar {
  background: linear-gradient(90deg, var(--cinnabar), #7a2416);
  color: var(--paper);
  font-size: 13px;
  padding: 10px 0;
  text-align: center;
  letter-spacing: 0.01em;
  position: relative;
  z-index: 10;
}
.notice-bar .wrap { display: flex; justify-content: center; align-items: center; gap: 10px; }
.notice-bar strong { color: var(--gold-bright); font-weight: 700; }
.notice-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--gold-bright);
  box-shadow: 0 0 0 0 rgba(228,199,134,0.6);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(228,199,134,0.6); }
  70% { box-shadow: 0 0 0 8px rgba(228,199,134,0); }
  100% { box-shadow: 0 0 0 0 rgba(228,199,134,0); }
}

/* =======================================================
   Header / Nav
   ======================================================= */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(11, 10, 16, 0.88);
  backdrop-filter: saturate(140%) blur(14px);
  -webkit-backdrop-filter: saturate(140%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.nav-wrap {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 18px; padding-bottom: 18px;
  gap: 24px;
}
.brand {
  display: flex; align-items: center; gap: 12px;
  color: var(--gold-bright);
  transition: color 0.3s var(--ease);
}
.brand:hover { color: var(--gold-bright); }
.brand-mark { width: 36px; height: 36px; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-hanja {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 22px;
  letter-spacing: 0.1em;
  color: var(--gold-bright);
}
.brand-han {
  font-family: var(--font-accent);
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-2);
  margin-top: 3px;
}

.primary-nav {
  display: flex; gap: 32px;
  font-family: var(--font-accent);
  font-size: 15px;
  letter-spacing: 0.02em;
}
.primary-nav a {
  color: var(--text-2);
  position: relative;
  transition: color 0.3s var(--ease);
  padding: 4px 0;
}
.primary-nav a:hover,
.primary-nav a:focus-visible { color: var(--gold-bright); }
.primary-nav a::after {
  content: ''; position: absolute; left: 0; bottom: -3px;
  width: 100%; height: 1px;
  background: var(--gold);
  transform: scaleX(0); transform-origin: left;
  transition: transform 0.35s var(--ease-out);
}
.primary-nav a:hover::after { transform: scaleX(1); }

.menu-toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.menu-toggle span {
  width: 22px; height: 1px; background: var(--gold-bright);
  transition: transform 0.3s var(--ease);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

.mobile-menu {
  display: none;
  flex-direction: column;
  padding: 16px 24px 24px;
  border-top: 1px solid var(--line);
  font-family: var(--font-accent);
}
.mobile-menu a { padding: 12px 0; color: var(--text-2); border-bottom: 1px solid var(--line); }
.mobile-menu a:last-child { border-bottom: 0; }

/* =======================================================
   Buttons
   ======================================================= */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-accent);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 14px 26px;
  border-radius: var(--radius);
  transition: all 0.35s var(--ease-out);
  border: 1px solid transparent;
  position: relative;
  overflow: hidden;
  white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; transition: transform 0.35s var(--ease-out); }
.btn-sm { padding: 10px 18px; font-size: 13px; }
.btn-lg { padding: 17px 32px; font-size: 15px; }
.btn-block { width: 100%; }

.btn-primary {
  background: linear-gradient(180deg, var(--gold-bright), var(--gold));
  color: var(--bg-0);
  box-shadow: 0 1px 0 rgba(255,255,255,0.25) inset, 0 10px 30px -10px rgba(201,169,97,0.4);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #f0d599, var(--gold-bright));
  transform: translateY(-1px);
  box-shadow: 0 1px 0 rgba(255,255,255,0.3) inset, 0 18px 40px -10px rgba(201,169,97,0.55);
}
.btn-primary:hover svg { transform: translateX(4px); }

.btn-ghost {
  background: transparent;
  color: var(--text-1);
  border-color: var(--line-strong);
}
.btn-ghost:hover {
  border-color: var(--gold);
  color: var(--gold-bright);
  background: var(--gold-shadow);
}

.nav-cta { margin-left: auto; }

/* =======================================================
   Section head (공통)
   ======================================================= */
.section-head { max-width: 760px; margin-bottom: 3rem; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }
.section-kicker {
  display: inline-block;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.25em;
  color: var(--gold);
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}
.section-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3.3rem);
  line-height: 1.2;
  letter-spacing: -0.02em;
  color: var(--paper);
}
.section-lead {
  margin-top: 1.3rem;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.8;
}

/* =======================================================
   HERO
   ======================================================= */
.hero {
  position: relative;
  padding: clamp(4rem, 10vw, 8rem) 0 clamp(4rem, 9vw, 7rem);
  overflow: hidden;
  min-height: 82vh;
  background: var(--bg-0);
  color: var(--text-1);
}
.hero-bg { position: absolute; inset: 0; pointer-events: none; z-index: 0; }

/* 별자리 점 장식 */
.constellation {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 15% 20%, var(--gold) 1px, transparent 1.5px),
    radial-gradient(circle at 85% 15%, var(--gold-bright) 1px, transparent 1.5px),
    radial-gradient(circle at 25% 75%, var(--gold) 1px, transparent 1.5px),
    radial-gradient(circle at 70% 85%, var(--gold-bright) 1px, transparent 1.5px),
    radial-gradient(circle at 95% 55%, var(--gold) 1px, transparent 1.5px),
    radial-gradient(circle at 5% 55%, var(--gold-bright) 1px, transparent 1.5px);
  background-size: 100% 100%;
  opacity: 0.35;
  animation: twinkle 8s ease-in-out infinite;
}
@keyframes twinkle {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.15; }
}

.hero-hanja {
  position: absolute;
  font-family: var(--font-display);
  font-weight: 800;
  color: var(--gold);
  opacity: 0.05;
  font-size: clamp(20rem, 44vw, 38rem);
  line-height: 0.8;
  top: -5%; left: -8%;
  user-select: none;
}
.hero-hanja.two {
  top: auto; left: auto;
  bottom: -15%; right: -5%;
  opacity: 0.04;
  color: var(--cinnabar-light);
}

.hero-wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 4rem;
  align-items: center;
}

.eyebrow {
  display: inline-flex; align-items: center; gap: 14px;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.35em;
  color: var(--gold);
  margin-bottom: 2rem;
  text-transform: uppercase;
}
.eyebrow .line {
  display: inline-block; width: 28px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}

.hero-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2.5rem, 5.8vw, 4.8rem);
  line-height: 1.1;
  letter-spacing: -0.025em;
  color: var(--paper);
  margin-bottom: 1.8rem;
}
.hero-title .line-1,
.hero-title .line-2,
.hero-title .line-3 { display: block; opacity: 0; transform: translateY(20px); animation: riseIn 1.1s var(--ease-out) forwards; }
.hero-title .line-1 { animation-delay: 0.1s; }
.hero-title .line-2 { animation-delay: 0.3s; font-weight: 400; }
.hero-title .line-2 em {
  font-weight: 800;
  background: linear-gradient(135deg, var(--gold-bright), var(--gold), var(--gold-bright));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.hero-title .line-3 { animation-delay: 0.5s; color: var(--text-2); font-weight: 400; font-size: 0.72em; }

@keyframes riseIn {
  to { opacity: 1; transform: translateY(0); }
}

.hero-lead {
  max-width: 540px;
  color: var(--text-2);
  font-size: 17px;
  line-height: 1.9;
  margin-bottom: 2.3rem;
  opacity: 0;
  animation: riseIn 1.1s 0.6s var(--ease-out) forwards;
}
.hero-lead strong { color: var(--paper); font-weight: 600; }

.hero-actions {
  display: flex; gap: 14px; flex-wrap: wrap;
  opacity: 0; animation: riseIn 1.1s 0.7s var(--ease-out) forwards;
}

.trust-row {
  list-style: none;
  display: flex; gap: clamp(1.5rem, 4vw, 3rem);
  margin-top: 3rem;
  padding-top: 2.3rem;
  border-top: 1px solid var(--line);
  opacity: 0; animation: riseIn 1.1s 0.85s var(--ease-out) forwards;
}
.trust-row li { display: flex; flex-direction: column; }
.trust-row strong {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--text-3);
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 4px;
}
.trust-row span {
  font-family: var(--font-display);
  font-size: 28px;
  font-weight: 700;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
}
.trust-row span em { font-style: normal; color: var(--gold); }
.trust-row span small { font-size: 14px; color: var(--text-3); font-weight: 400; }

/* Hero visual */
.hero-visual {
  opacity: 0;
  animation: fadeScale 1.6s 0.5s var(--ease-out) forwards;
}
@keyframes fadeScale {
  from { opacity: 0; transform: scale(0.92) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}
.bagua {
  width: 100%; max-width: 500px; margin: 0 auto;
  animation: rotateSlow 90s linear infinite;
}
@keyframes rotateSlow {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}
.bagua .taegeuk { animation: counterRotate 90s linear infinite; transform-origin: 200px 200px; }
@keyframes counterRotate {
  from { transform: rotate(0); }
  to { transform: rotate(-360deg); }
}

.scroll-hint {
  position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  font-family: var(--font-latin);
  font-size: 10px; letter-spacing: 0.4em;
  color: var(--text-3);
  text-transform: uppercase;
}
.scroll-line {
  width: 1px; height: 40px;
  background: linear-gradient(180deg, var(--gold), transparent);
  position: relative;
  overflow: hidden;
}
.scroll-line::after {
  content: ''; position: absolute; top: -40px; left: 0;
  width: 1px; height: 40px;
  background: var(--gold-bright);
  animation: scrollDown 2s ease-in-out infinite;
}
@keyframes scrollDown {
  0% { top: -40px; }
  100% { top: 40px; }
}

/* =======================================================
   Calculator
   ======================================================= */
.calculator {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1));
  position: relative; z-index: 1;
}

.calc-grid {
  display: grid; grid-template-columns: 1fr 1.2fr; gap: 3rem;
  background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 4rem);
  position: relative;
  overflow: hidden;
}
.calc-grid::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold), transparent);
}
.calc-grid::after {
  content: ''; position: absolute;
  top: 20px; right: 20px;
  width: 60px; height: 60px;
  border: 1px solid var(--gold);
  opacity: 0.15;
  pointer-events: none;
}

.saju-form fieldset { border: 0; }
.saju-form legend {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--gold-bright);
  margin-bottom: 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.form-row { margin-bottom: 1.4rem; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1.4rem; }
.form-row-2 .form-row { margin-bottom: 0; }

.form-row label {
  display: block;
  font-family: var(--font-accent);
  font-size: 13px;
  color: var(--text-2);
  letter-spacing: 0.02em;
  margin-bottom: 8px;
  font-weight: 700;
}

.form-row input,
.form-row select {
  width: 100%;
  background: var(--bg-0);
  border: 1px solid var(--line);
  color: var(--text-1);
  padding: 13px 14px;
  font-family: var(--font-body);
  font-size: 15px;
  border-radius: var(--radius);
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
  appearance: none;
  -webkit-appearance: none;
}
.form-row input:focus,
.form-row select:focus {
  outline: 0;
  border-color: var(--gold);
  background: #0f0d15;
  box-shadow: 0 0 0 3px var(--gold-shadow);
}
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8' fill='none'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23c9a961' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.form-row small { display: block; color: var(--text-3); font-size: 12px; margin-top: 6px; }

.radio-group { display: flex; gap: 10px; }
.radio {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 13px 0;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  cursor: pointer;
  font-family: var(--font-accent);
  font-size: 15px;
  transition: all 0.25s var(--ease);
}
.radio input { position: absolute; opacity: 0; pointer-events: none; }
.radio:hover { border-color: var(--gold-deep); }
.radio:has(input:checked) {
  background: var(--gold-shadow);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.form-note {
  display: flex; align-items: center; gap: 8px;
  margin-top: 1.2rem;
  font-size: 13px;
  color: var(--text-3);
}
.icon-lock { width: 14px; height: 14px; }

/* 결과 영역 */
.saju-result {
  background: linear-gradient(180deg, #0a0810, var(--bg-0));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem;
  min-height: 500px;
  position: relative;
  overflow: hidden;
}
.saju-result::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid var(--gold);
  opacity: 0.12;
  pointer-events: none;
}

.result-placeholder {
  height: 100%; min-height: 450px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1.5rem;
  color: var(--text-3);
  text-align: center;
  font-family: var(--font-accent);
  font-size: 15px;
  line-height: 1.9;
}
.empty-mark { width: 120px; height: 120px; color: var(--gold); opacity: 0.4; }

/* 결과 컨텐츠 */
.result-content { opacity: 0; animation: fadeUp 0.8s var(--ease-out) forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }

.result-title {
  font-family: var(--font-display);
  font-size: 22px;
  color: var(--gold-bright);
  margin-bottom: 0.3rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.result-sub { font-size: 13px; color: var(--text-3); margin-bottom: 2rem; }

/* 4주 출력 */
.pillars {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin-bottom: 2rem;
}
.pillar {
  background: var(--bg-2);
  border: 1px solid var(--line);
  text-align: center;
  padding: 16px 6px;
  position: relative;
}
.pillar-label {
  font-family: var(--font-latin);
  font-size: 10px;
  letter-spacing: 0.3em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.pillar-label .ko { color: var(--gold-deep); display: block; margin-top: 2px; font-family: var(--font-accent); font-size: 11px; letter-spacing: 0.15em; }
.pillar-stem, .pillar-branch {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  line-height: 1.1;
  display: block;
  margin: 2px 0;
}
.pillar-stem { color: var(--gold-bright); }
.pillar-branch { color: var(--paper); }
.pillar-ko { font-size: 11px; color: var(--text-3); margin-top: 8px; line-height: 1.4; }
.pillar-element {
  display: inline-block;
  margin-top: 8px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  color: var(--text-2);
  letter-spacing: 0.1em;
}

/* 오행 차트 */
.elements-block { margin-bottom: 1.8rem; }
.elements-title { font-family: var(--font-display); font-size: 16px; color: var(--paper); margin-bottom: 1rem; }
.elements-bars { display: flex; flex-direction: column; gap: 8px; }
.elem-bar {
  display: grid; grid-template-columns: 44px 1fr 36px; align-items: center; gap: 10px;
  font-family: var(--font-accent); font-size: 13px;
}
.elem-bar .name { color: var(--text-2); font-weight: 700; }
.elem-bar .track {
  height: 6px; background: var(--bg-2); border-radius: 4px; overflow: hidden; position: relative;
}
.elem-bar .fill {
  height: 100%; background: var(--gold); border-radius: 4px;
  width: 0; transition: width 1s var(--ease-out);
}
.elem-bar[data-elem="목"] .fill { background: #4a8a5e; }
.elem-bar[data-elem="화"] .fill { background: #c9502e; }
.elem-bar[data-elem="토"] .fill { background: #a88250; }
.elem-bar[data-elem="금"] .fill { background: #c9a961; }
.elem-bar[data-elem="수"] .fill { background: #3a6b8a; }
.elem-bar .val { text-align: right; color: var(--text-3); font-variant-numeric: tabular-nums; }

/* 해석 텍스트 */
.interpret-block { margin-bottom: 1.4rem; padding-bottom: 1.4rem; border-bottom: 1px dashed var(--line); }
.interpret-block:last-child { border-bottom: 0; margin-bottom: 0; }
.interpret-label {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.3em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.5rem;
  display: flex; align-items: center; gap: 8px;
}
.interpret-label::before {
  content: ''; display: inline-block; width: 6px; height: 6px;
  background: var(--gold); transform: rotate(45deg);
}
.interpret-text { font-family: var(--font-body); font-size: 14.5px; line-height: 1.85; color: var(--text-1); }
.interpret-text strong { color: var(--gold-bright); font-weight: 700; }

/* 업셀 박스 */
.upsell {
  margin-top: 2rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(201,169,97,0.08), rgba(168,50,30,0.06));
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius);
  text-align: center;
}
.upsell h4 {
  font-family: var(--font-display);
  font-size: 18px;
  color: var(--gold-bright);
  margin-bottom: 0.5rem;
}
.upsell p { font-size: 14px; color: var(--text-2); margin-bottom: 1.2rem; line-height: 1.7; }

/* =======================================================
   Method
   ======================================================= */
.method { padding: clamp(5rem, 10vw, 8rem) 0; background: var(--bg-0); position: relative; z-index: 1; }
.method-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
.method-card {
  background: var(--bg-0);
  padding: 2.5rem;
  transition: background 0.35s var(--ease);
  position: relative;
}
.method-card:hover { background: var(--bg-1); }
.method-num {
  font-family: var(--font-display);
  font-size: 48px;
  color: var(--gold-deep);
  line-height: 1;
  margin-bottom: 1.2rem;
  opacity: 0.7;
}
.method-card h3 {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  color: var(--paper);
  margin-bottom: 0.8rem;
}
.method-card p { color: var(--text-2); font-size: 15px; line-height: 1.85; }

/* =======================================================
   Master
   ======================================================= */
.master {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1));
  position: relative; z-index: 1;
}
.master-wrap {
  display: grid;
  grid-template-columns: 360px 1fr;
  gap: 4rem;
  align-items: center;
}
.master-portrait { position: relative; }
.portrait-frame {
  position: relative;
  padding: 14px;
  background:
    linear-gradient(135deg, var(--gold-bright), var(--gold-deep)) padding-box,
    linear-gradient(135deg, var(--gold-bright), var(--gold-deep)) border-box;
  border: 2px solid transparent;
}
.portrait-frame::before {
  content: ''; position: absolute; inset: 5px;
  border: 1px solid rgba(201,169,97,0.5);
  pointer-events: none;
}
.portrait-svg { width: 100%; display: block; }
.portrait-stamp {
  position: absolute; bottom: -20px; right: -20px;
  width: 78px; height: 78px;
  background: var(--cinnabar);
  display: flex; align-items: center; justify-content: center;
  transform: rotate(8deg);
  box-shadow: 0 8px 22px rgba(0,0,0,0.5);
  border: 2px solid var(--cinnabar-light);
}
.portrait-stamp span {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  color: var(--paper);
  letter-spacing: -0.05em;
}

.master-intro { color: var(--text-2); font-size: 17px; line-height: 1.9; margin-top: 1.5rem; }
.master-intro strong { color: var(--paper); font-weight: 600; }

.credentials {
  list-style: none;
  margin: 1.8rem 0;
  padding: 1.5rem 1.8rem;
  background: var(--bg-2);
  border-left: 2px solid var(--gold);
}
.credentials li {
  color: var(--text-2);
  font-size: 14.5px;
  line-height: 2;
  display: flex; align-items: baseline; gap: 10px;
}
.cred-dot { color: var(--gold); }

.master-quote {
  margin-top: 2rem;
  padding: 1.8rem 0;
  border-top: 1px solid var(--line);
}
.master-quote p {
  font-family: var(--font-accent);
  font-size: 19px;
  line-height: 1.8;
  color: var(--paper);
  font-style: italic;
}
.master-quote cite {
  display: block;
  margin-top: 1rem;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 13px;
  letter-spacing: 0.15em;
  color: var(--gold);
}

/* =======================================================
   Services / Pricing
   ======================================================= */
.services {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--bg-0);
  position: relative; z-index: 1;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  margin-top: 2rem;
}

.pricing-card {
  position: relative;
  background: var(--bg-1);
  border: 1px solid var(--line);
  padding: 2.5rem 2rem;
  display: flex; flex-direction: column;
  transition: all 0.4s var(--ease-out);
}
.pricing-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold-deep);
  box-shadow: 0 24px 60px -24px rgba(201,169,97,0.2);
}

.pricing-card.featured {
  background: linear-gradient(180deg, #1a1521, var(--bg-1));
  border: 1px solid var(--gold);
  box-shadow: 0 20px 50px -20px rgba(201,169,97,0.35);
  transform: scale(1.03);
  z-index: 2;
}
.pricing-card.featured::before {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  border: 1px solid rgba(201,169,97,0.3);
  margin: 6px;
}
.pricing-card.featured:hover { transform: scale(1.04) translateY(-4px); }

.best-badge {
  position: absolute; top: -13px; left: 50%; transform: translateX(-50%);
  background: linear-gradient(90deg, var(--cinnabar), var(--cinnabar-light));
  color: var(--paper);
  font-family: var(--font-accent);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  padding: 7px 16px;
  white-space: nowrap;
  border: 1px solid var(--cinnabar-light);
}

.pricing-head { padding-bottom: 1.5rem; border-bottom: 1px solid var(--line); margin-bottom: 1.5rem; }
.pricing-head h3 {
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 800;
  color: var(--paper);
  margin-bottom: 0.3rem;
}
.pricing-head p { font-size: 13px; color: var(--text-3); font-family: var(--font-accent); }

.pricing-price {
  display: flex; align-items: baseline; gap: 4px;
  margin-bottom: 1.8rem;
  font-family: var(--font-display);
}
.pricing-price .won { font-size: 18px; color: var(--text-2); }
.pricing-price .amount {
  font-size: 42px;
  font-weight: 800;
  color: var(--gold-bright);
  letter-spacing: -0.02em;
}
.pricing-price .was {
  margin-left: 8px;
  font-size: 16px;
  color: var(--text-dim);
  text-decoration: line-through;
  font-weight: 400;
}

.pricing-features {
  list-style: none;
  flex: 1;
  margin-bottom: 1.8rem;
}
.pricing-features li {
  position: relative;
  padding: 10px 0 10px 26px;
  font-size: 14px;
  color: var(--text-1);
  line-height: 1.6;
  border-bottom: 1px dashed var(--line);
}
.pricing-features li::before {
  content: ''; position: absolute; left: 0; top: 15px;
  width: 14px; height: 14px;
  border: 1px solid var(--gold);
  background:
    linear-gradient(45deg, transparent 45%, var(--gold) 45%, var(--gold) 55%, transparent 55%),
    linear-gradient(-45deg, transparent 45%, var(--gold) 45%, var(--gold) 55%, transparent 55%);
}
.pricing-features li.off { color: var(--text-dim); }
.pricing-features li.off::before {
  background: none;
  border-color: var(--line);
}
.pricing-features li:last-child { border-bottom: 0; }

/* Guarantee */
.guarantee {
  margin-top: 3rem;
  display: flex; align-items: center; gap: 1.5rem;
  padding: 1.8rem 2rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-left: 3px solid var(--gold);
}
.guarantee svg { flex-shrink: 0; width: 48px; height: 48px; color: var(--gold); }
.guarantee h4 { font-family: var(--font-display); font-size: 18px; color: var(--paper); margin-bottom: 0.3rem; }
.guarantee p { font-size: 14px; color: var(--text-2); line-height: 1.7; }

/* =======================================================
   Reviews
   ======================================================= */
.reviews {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--bg-1);
  position: relative; z-index: 1;
}
.rating-big {
  margin-top: 1.5rem;
  display: inline-flex; align-items: baseline; gap: 12px;
  padding: 12px 24px;
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.rating-big .stars { color: var(--gold); font-size: 22px; letter-spacing: 2px; }
.rating-big .rating-num { font-family: var(--font-display); font-size: 26px; font-weight: 800; color: var(--gold-bright); }
.rating-big .rating-count { font-size: 13px; color: var(--text-3); }

.reviews-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}
.review-card {
  background: var(--bg-0);
  border: 1px solid var(--line);
  padding: 2rem;
  position: relative;
  transition: border-color 0.3s var(--ease);
}
.review-card:hover { border-color: var(--gold-deep); }
.review-stars { color: var(--gold); margin-bottom: 1rem; letter-spacing: 2px; font-size: 14px; }
.review-card blockquote {
  font-family: var(--font-accent);
  font-size: 15.5px;
  line-height: 1.85;
  color: var(--text-1);
  margin-bottom: 1.5rem;
  position: relative;
  padding-left: 0;
}
.review-card blockquote::before {
  content: '"';
  position: absolute; top: -30px; left: -8px;
  font-family: var(--font-display);
  font-size: 80px;
  color: var(--gold);
  opacity: 0.25;
  line-height: 1;
}
.review-card figcaption { display: flex; align-items: center; gap: 12px; padding-top: 1.2rem; border-top: 1px solid var(--line); }
.avatar {
  width: 38px; height: 38px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold), var(--gold-deep));
  color: var(--bg-0);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
}
.review-card figcaption strong { display: block; color: var(--paper); font-size: 14px; margin-bottom: 2px; }
.review-card figcaption small { color: var(--text-3); font-size: 12px; }

/* =======================================================
   Consult CTA
   ======================================================= */
.consult-cta {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: var(--bg-0);
  position: relative;
}
.consult-inner {
  background: linear-gradient(135deg, #1c1428, #140c1c);
  border: 1px solid var(--gold-deep);
  padding: clamp(2.5rem, 6vw, 4.5rem);
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 3rem;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.consult-inner::before {
  content: ''; position: absolute; inset: 8px;
  border: 1px solid rgba(201,169,97,0.2);
  pointer-events: none;
}
.consult-text .section-title { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
.consult-text p { margin-top: 1.5rem; color: var(--text-2); font-size: 16px; line-height: 1.85; }

.consult-countdown {
  display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin: 2rem 0 1.8rem;
  max-width: 480px;
}
.consult-countdown > div {
  background: var(--bg-0);
  border: 1px solid var(--line);
  padding: 14px 10px;
  text-align: center;
}
.consult-countdown strong {
  display: block;
  font-family: var(--font-display);
  font-size: 30px;
  color: var(--gold-bright);
  font-weight: 800;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.consult-countdown small {
  display: block;
  font-family: var(--font-latin);
  font-size: 11px;
  letter-spacing: 0.25em;
  color: var(--text-3);
  text-transform: uppercase;
  margin-top: 4px;
}

.consult-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.consult-deco {
  position: relative;
  aspect-ratio: 1;
  display: flex; align-items: center; justify-content: center;
}
.deco-char {
  font-family: var(--font-display);
  font-size: clamp(10rem, 22vw, 18rem);
  font-weight: 800;
  color: var(--gold);
  opacity: 0.15;
  line-height: 1;
}

/* =======================================================
   FAQ
   ======================================================= */
.faq {
  padding: clamp(5rem, 10vw, 8rem) 0;
  background: linear-gradient(180deg, var(--bg-0), var(--bg-1));
  position: relative; z-index: 1;
}
.faq-list { max-width: 860px; margin: 0 auto; }
.faq-item {
  border-bottom: 1px solid var(--line);
  transition: all 0.3s var(--ease);
}
.faq-item summary {
  list-style: none;
  padding: 1.6rem 0;
  display: flex; justify-content: space-between; align-items: center; gap: 2rem;
  cursor: pointer;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  color: var(--paper);
  transition: color 0.3s var(--ease);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary:hover { color: var(--gold-bright); }

.faq-toggle {
  flex-shrink: 0;
  position: relative;
  width: 22px; height: 22px;
}
.faq-toggle::before,
.faq-toggle::after {
  content: ''; position: absolute; top: 50%; left: 0;
  width: 100%; height: 1px;
  background: var(--gold);
  transform-origin: center;
}
.faq-toggle::after { transform: rotate(90deg); transition: transform 0.35s var(--ease); }
.faq-item[open] .faq-toggle::after { transform: rotate(0deg); }

.faq-body {
  padding: 0 0 1.6rem 0;
  color: var(--text-2);
  font-size: 15px;
  line-height: 1.9;
  max-width: 740px;
}
.faq-body strong { color: var(--paper); }

/* =======================================================
   Footer
   ======================================================= */
.site-footer {
  background: #07060b;
  border-top: 1px solid var(--line);
  padding: 4rem 0 0;
  position: relative; z-index: 1;
}
.footer-wrap {
  display: grid;
  grid-template-columns: 1.3fr 2fr;
  gap: 3rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid var(--line);
}
.footer-brand p {
  margin-top: 1rem;
  max-width: 320px;
  color: var(--text-3);
  font-family: var(--font-accent);
  font-size: 14px;
  line-height: 1.85;
}
.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}
.footer-cols h4 {
  font-family: var(--font-display);
  font-size: 14px;
  letter-spacing: 0.1em;
  color: var(--gold);
  margin-bottom: 1.2rem;
}
.footer-cols ul { list-style: none; }
.footer-cols li {
  padding: 5px 0;
  color: var(--text-3);
  font-size: 13.5px;
  line-height: 1.85;
}
.footer-cols a { transition: color 0.25s var(--ease); }
.footer-cols a:hover { color: var(--gold-bright); }

.footer-bottom { padding: 1.8rem 0; }
.footer-bottom .wrap {
  display: flex; justify-content: space-between; gap: 2rem; flex-wrap: wrap;
}
.footer-bottom small { color: var(--text-dim); font-size: 12px; }

/* =======================================================
   To Top
   ======================================================= */
.to-top {
  position: fixed; right: 24px; bottom: 24px; z-index: 50;
  width: 46px; height: 46px;
  background: var(--bg-2);
  border: 1px solid var(--gold-deep);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  color: var(--gold-bright);
  opacity: 0; transform: translateY(10px);
  transition: all 0.35s var(--ease);
}
.to-top.visible { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--gold-shadow); border-color: var(--gold); }
.to-top svg { width: 18px; height: 18px; }

/* =======================================================
   Responsive
   ======================================================= */
@media (max-width: 1024px) {
  .hero-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .hero-visual { max-width: 440px; margin: 0 auto; }
  .calc-grid { grid-template-columns: 1fr; gap: 2.5rem; }
  .master-wrap { grid-template-columns: 1fr; gap: 3rem; }
  .master-portrait { max-width: 300px; margin: 0 auto; }
  .pricing-grid { grid-template-columns: 1fr; gap: 1.2rem; }
  .pricing-card.featured { transform: none; }
  .pricing-card.featured:hover { transform: translateY(-4px); }
  .reviews-grid { grid-template-columns: 1fr 1fr; }
  .consult-inner { grid-template-columns: 1fr; }
  .consult-deco { display: none; }
  .footer-wrap { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
  .primary-nav,
  .nav-cta { display: none; }
  .menu-toggle { display: flex; }
  .mobile-menu[data-open="true"] { display: flex; }

  .notice-bar { font-size: 12px; padding: 8px 0; }
  .notice-bar .wrap { flex-wrap: wrap; }

  .hero { padding-top: 3rem; min-height: auto; }
  .hero-title { font-size: 2.4rem; }
  .trust-row { flex-wrap: wrap; gap: 1.2rem 2rem; }

  .form-row-2 { grid-template-columns: 1fr; }
  .calc-grid { padding: 1.8rem; }

  .method-grid { grid-template-columns: 1fr; }
  .reviews-grid { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .pillars { grid-template-columns: repeat(4, 1fr); gap: 3px; }
  .pillar { padding: 12px 4px; }
  .pillar-stem, .pillar-branch { font-size: 24px; }

  .guarantee { flex-direction: column; text-align: center; gap: 1rem; }

  .scroll-hint { display: none; }
}

@media (max-width: 480px) {
  .hero-title { font-size: 2rem; }
  .section-title { font-size: 1.7rem; }
  .footer-cols { grid-template-columns: 1fr; }
  .consult-countdown { gap: 4px; }
  .consult-countdown strong { font-size: 22px; }
}

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


/* =====================================================================
 * 단일 상품 주문 폼 · 토스 결제 UI
 * ===================================================================== */

.single-product {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  max-width: 1020px;
  margin: 0 auto;
  align-items: start;
}
@media (max-width: 880px) {
  .single-product { grid-template-columns: 1fr; gap: 1.5rem; }
}

/* 상품 카드 */
.product-card {
  background: var(--bg-1);
  border: 1px solid var(--gold-deep);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
  position: relative;
  overflow: hidden;
}
.product-card::before {
  content: '命';
  position: absolute; right: -30px; bottom: -40px;
  font-family: var(--font-display);
  font-size: 240px; font-weight: 800;
  color: var(--gold); opacity: 0.04;
  pointer-events: none;
}
.product-ribbon {
  display: inline-block;
  background: linear-gradient(135deg, var(--cinnabar), #8a2616);
  color: var(--paper);
  font-family: var(--font-latin); font-style: italic;
  font-size: 12px; letter-spacing: 0.2em;
  padding: 6px 16px;
  border-radius: 3px;
  margin-bottom: 1rem;
}
.product-head h3 {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  color: var(--paper);
  margin: 0 0 0.4rem;
}
.product-head p {
  color: var(--text-2); font-size: 14px;
  margin: 0 0 1.5rem;
}
.pricing-price {
  font-family: var(--font-display);
  color: var(--gold-bright);
  margin: 1rem 0 0.3rem;
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
}
.pricing-price .won {
  font-size: 22px; vertical-align: 18px; margin-right: 4px;
}
.pricing-price .amount {
  font-size: 56px; font-weight: 800; letter-spacing: -0.02em;
}
.pricing-price .price-original {
  display: block;
  width: 100%;
  font-size: 18px;
  color: var(--text-3);
  font-family: var(--font-latin);
  font-weight: 400;
  margin-bottom: 0.3rem;
}
.pricing-price .price-original s {
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: var(--cinnabar-light);
  letter-spacing: 0.02em;
}
.pricing-price .price-sale-tag {
  display: inline-block;
  padding: 4px 12px;
  background: linear-gradient(135deg, var(--cinnabar), var(--cinnabar-light));
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 800;
  border-radius: 3px;
  letter-spacing: 0.1em;
  vertical-align: 18px;
  box-shadow: 0 2px 6px rgba(168,50,30,0.35);
}
.os-discount {
  display: block;
  color: var(--cinnabar-light);
  font-size: 11.5px;
  font-weight: 500;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.product-tax {
  color: var(--text-3); font-size: 12px;
  margin: 0 0 1.5rem;
}
.pricing-features {
  list-style: none; padding: 0; margin: 0 0 1.5rem;
}
.pricing-features li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--line);
  font-size: 14px;
  color: var(--text-1);
  display: flex; align-items: flex-start; gap: 12px;
  line-height: 1.6;
}
.pricing-features li::before {
  content: '✓';
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  /* 이전 absolute 규칙 리셋 */
  position: static;
  left: auto;
  top: auto;
  width: auto;
  height: auto;
  background: none;
  border: none;
  display: inline-block;
  min-width: 14px;
  text-align: center;
}
.pricing-features li strong {
  color: var(--gold-bright);
}
.product-notice {
  display: flex; gap: 8px; align-items: flex-start;
  background: rgba(168,50,30,0.08);
  border-left: 3px solid var(--cinnabar);
  padding: 0.8rem 1rem;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
  margin: 0;
  border-radius: 0 3px 3px 0;
}
.icon-info {
  width: 16px; height: 16px;
  color: var(--cinnabar-light);
  flex-shrink: 0;
  margin-top: 2px;
}

/* 주문 폼 */
.order-form {
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.8rem;
}
.order-form fieldset {
  border: 0; padding: 0; margin: 0;
}
.order-form legend {
  font-family: var(--font-display);
  font-size: 16px;
  color: var(--gold-bright);
  padding-bottom: 0.8rem;
  margin-bottom: 1.2rem;
  border-bottom: 1px solid var(--line);
  width: 100%;
}
.form-row { margin-bottom: 1rem; }
.form-row label {
  display: block;
  font-size: 13px; font-weight: 700;
  color: var(--text-2);
  margin-bottom: 0.4rem;
  letter-spacing: 0.02em;
}
.form-row small {
  display: block;
  color: var(--text-3);
  font-size: 11.5px;
  margin-top: 4px;
  line-height: 1.5;
}
.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="email"],
.form-row select {
  width: 100%;
  padding: 11px 14px;
  background: var(--bg-0);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14.5px;
  transition: border-color 0.2s, box-shadow 0.2s;
  appearance: none;
  box-sizing: border-box;
}
.form-row select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6' fill='none' stroke='%23c9a961' stroke-width='1.5'%3E%3Cpath d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 10px;
  padding-right: 36px;
}
.form-row input:focus,
.form-row select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px rgba(201,169,97,0.15);
}
.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
.form-row-2 .form-row { margin-bottom: 0; }
@media (max-width: 500px) {
  .form-row-2 { grid-template-columns: 1fr; }
}

.radio-group {
  display: flex; gap: 8px;
}
.radio {
  flex: 1;
  display: flex; align-items: center; justify-content: center;
  padding: 11px 12px;
  background: var(--bg-0);
  border: 1px solid var(--line-2);
  border-radius: var(--radius);
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  transition: all 0.2s;
}
.radio input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.radio:has(input:checked) {
  background: rgba(201,169,97,0.1);
  border-color: var(--gold);
  color: var(--gold-bright);
}

.order-summary {
  background: var(--bg-0);
  border: 1px solid var(--line);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: var(--radius);
}
.os-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.3rem 0;
  font-size: 14.5px;
}
.os-row strong { color: var(--paper); font-weight: 700; }
.os-total {
  padding-top: 0.7rem; margin-top: 0.3rem;
  border-top: 1px solid var(--line);
  font-size: 15px;
}
.os-total strong {
  color: var(--gold-bright);
  font-size: 22px;
  font-family: var(--font-display);
}

.checkbox-line {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 1.2rem;
  cursor: pointer;
}
.checkbox-line input {
  margin-top: 3px;
  accent-color: var(--gold);
}
.checkbox-line a {
  color: var(--gold);
  border-bottom: 1px solid var(--gold-deep);
}

.payment-methods {
  margin-top: 1rem;
  text-align: center;
}
.payment-methods small {
  display: block;
  color: var(--text-3);
  font-size: 11px;
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}
.pm-logos {
  display: flex; justify-content: center; flex-wrap: wrap;
  gap: 6px;
}
.pm-logos span {
  font-size: 11px;
  color: var(--text-2);
  padding: 4px 10px;
  background: var(--bg-0);
  border: 1px solid var(--line);
  border-radius: 3px;
}

.form-note {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px;
  color: var(--text-3);
  margin: 1rem 0 0;
}
.icon-lock {
  width: 14px; height: 14px;
  color: var(--gold);
  flex-shrink: 0;
}

.alert-box {
  background: rgba(168,50,30,0.15);
  border: 1px solid var(--cinnabar);
  color: var(--paper);
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 1.2rem;
  font-size: 14px;
}


/* =====================================================================
 * 결제 성공 · 실패 페이지
 * ===================================================================== */

.success-page {
  padding: 4rem 0;
  min-height: 60vh;
}
.status-card {
  max-width: 560px;
  margin: 0 auto 2rem;
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 3rem 2rem;
  text-align: center;
}
.status-card.success { border-color: var(--gold-deep); }
.status-card.error { border-color: var(--cinnabar); }
.status-card h1 {
  font-family: var(--font-display);
  font-size: 24px;
  color: var(--paper);
  margin: 1rem 0 0.5rem;
}
.status-card p {
  color: var(--text-2);
  margin: 0.4rem 0;
}
.status-card .small {
  font-size: 13px;
  color: var(--text-3);
}
.status-card code {
  font-family: 'Courier New', monospace;
  background: var(--bg-0);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--gold);
  font-size: 13px;
}
.status-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 60px; height: 60px;
  border-radius: 50%;
  font-size: 30px;
  font-weight: 700;
}
.status-card.success .status-icon {
  background: rgba(201,169,97,0.15);
  color: var(--gold-bright);
  border: 2px solid var(--gold);
}
.status-card.error .status-icon {
  background: rgba(168,50,30,0.15);
  color: var(--cinnabar-light);
  border: 2px solid var(--cinnabar);
}
.loader-circle {
  display: flex; justify-content: center;
  margin-bottom: 1rem;
}
.spinner {
  width: 60px; height: 60px;
  color: var(--gold);
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.status-actions {
  display: flex; justify-content: center; gap: 12px;
  margin-top: 1.5rem; flex-wrap: wrap;
}

.report-actions {
  max-width: 900px; margin: 3rem auto 0;
  display: flex; justify-content: center; gap: 12px; flex-wrap: wrap;
}


/* =====================================================================
 * 사주 리포트 본문 (크림 종이 위의 전통 리포트)
 * ===================================================================== */

.rp-report {
  max-width: 920px;
  margin: 2rem auto;
  background: var(--paper);
  color: #2a251a;
  padding: 0;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.4);
  font-family: var(--font-body);
  line-height: 1.7;
}

/* 표지 */
.rp-cover {
  padding: clamp(3rem, 6vw, 5rem) clamp(2rem, 5vw, 4rem);
  text-align: center;
  position: relative;
  background:
    radial-gradient(circle at top, rgba(138,111,52,0.06), transparent 60%),
    radial-gradient(circle at bottom, rgba(168,50,30,0.04), transparent 60%);
  border-bottom: 4px double #8a6f34;
  page-break-after: always;
}
.rp-cover::before {
  content: '命';
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 400px; font-weight: 800;
  color: #8a6f34; opacity: 0.04;
  pointer-events: none;
}
.rp-cover-inner {
  position: relative;
  z-index: 1;
}
.rp-cover-brand {
  font-family: var(--font-display);
  font-weight: 800; letter-spacing: 0.2em;
  font-size: 16px;
  color: #a8321e;
  margin-bottom: 2rem;
}
.rp-cover-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 42px);
  font-weight: 800;
  color: #2a251a;
  margin: 0.5rem 0;
  line-height: 1.3;
}
.rp-cover-subtitle {
  font-family: var(--font-latin);
  font-style: italic;
  letter-spacing: 0.25em;
  font-size: 14px;
  color: #8a6f34;
  margin: 0;
}
.rp-cover-divider {
  color: #a8321e;
  margin: 2rem 0;
  letter-spacing: 1em;
}
.rp-cover-meta p {
  font-size: 15.5px;
  color: #2a251a;
  margin: 0.4rem 0;
}
.rp-cover-meta strong {
  color: #a8321e;
  font-size: 18px;
}
.rp-cover-hanja {
  font-family: var(--font-display);
  color: #8a6f34 !important;
  letter-spacing: 0.1em;
  font-size: 14px !important;
  margin-top: 1rem !important;
}
.rp-cover-sig {
  margin: 2.5rem 0 1.5rem;
}
.rp-cover-sig p {
  font-size: 13px;
  color: #6f5a30;
  font-style: italic;
  margin: 0.2rem 0;
}
.rp-cover-date {
  font-family: var(--font-latin);
  font-style: italic;
  color: #8a6f34;
  font-size: 13px;
  margin-top: 1rem;
}

/* 목차 */
.rp-toc {
  padding: clamp(2rem, 4vw, 3rem);
  page-break-after: always;
}
.rp-toc-title {
  font-family: var(--font-display);
  font-size: 24px;
  color: #a8321e;
  text-align: center;
  margin: 0 0 2rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #8a6f34;
}
.rp-toc-list {
  list-style: none;
  padding: 0; margin: 0;
  counter-reset: toc;
  columns: 1;
}
.rp-toc-list li {
  padding: 0.6rem 0;
  border-bottom: 1px dotted #c4b08a;
  font-size: 14px;
  color: #3a3320;
  display: flex;
  align-items: baseline;
  gap: 10px;
}
.rp-toc-num {
  color: #a8321e;
  font-weight: 700;
  font-family: var(--font-latin);
  flex-shrink: 0;
}
.rp-toc-p {
  margin-left: auto;
  color: #8a6f34;
  font-size: 12px;
  font-style: italic;
}

/* 각 페이지 공통 */
.rp-page {
  padding: clamp(2rem, 4vw, 3rem);
  border-bottom: 1px solid #c4b08a;
  page-break-inside: avoid;
  page-break-after: always;
}
.rp-page:last-of-type { page-break-after: auto; }
.rp-page-head {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #8a6f34;
  margin-bottom: 1.5rem;
  position: relative;
}
.rp-page-num {
  font-family: var(--font-display);
  font-size: 36px;
  color: #a8321e;
  font-weight: 800;
  width: 56px;
  text-align: center;
  border-right: 1px solid #c4b08a;
  padding-right: 1rem;
  flex-shrink: 0;
}
.rp-page-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #2a251a;
  margin: 0;
  line-height: 1.3;
}
.rp-page-en {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 12px;
  letter-spacing: 0.25em;
  color: #8a6f34;
}
.rp-page-no {
  margin-left: auto;
  font-family: var(--font-latin);
  font-style: italic;
  color: #8a6f34;
  font-size: 13px;
  flex-shrink: 0;
}

/* 본문 요소 */
.rp-h4 {
  font-family: var(--font-display);
  font-size: 17px;
  color: #a8321e;
  margin: 1.5rem 0 0.8rem;
  padding-bottom: 0.3rem;
  border-bottom: 1px dotted #c4b08a;
}
.rp-lead {
  font-size: 15.5px;
  line-height: 1.85;
  color: #2a251a;
}
.rp-lead strong { color: #a8321e; font-weight: 700; }
.rp-lead-quote {
  font-family: var(--font-display);
  font-size: 18px;
  color: #a8321e;
  font-style: italic;
  border-left: 3px solid #a8321e;
  padding-left: 1rem;
  margin: 1rem 0;
}
.rp-text {
  font-size: 14.5px;
  line-height: 1.9;
  color: #3a3320;
  margin: 0.8rem 0;
}
.rp-text strong {
  color: #a8321e;
  font-weight: 700;
}
.rp-note {
  font-size: 12.5px;
  color: #6f5a30;
  font-style: italic;
  margin: 1rem 0;
}
.rp-bullets {
  list-style: none;
  padding: 0; margin: 1rem 0;
}
.rp-bullets li {
  padding: 0.5rem 0 0.5rem 1.2rem;
  position: relative;
  font-size: 14px;
  color: #3a3320;
  line-height: 1.75;
  border-bottom: 1px dotted #d6c8a8;
}
.rp-bullets li::before {
  content: '◆';
  position: absolute;
  left: 0;
  color: #a8321e;
  font-size: 10px;
}
.rp-bullets li strong { color: #a8321e; }

/* 4주 팔자 */
.rp-pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin: 1.5rem 0;
}
.rp-pillar {
  border: 1px solid #8a6f34;
  padding: 14px 8px;
  text-align: center;
  background: rgba(201,169,97,0.06);
  border-radius: 2px;
}
.rp-pillar-label {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 10px;
  letter-spacing: 0.2em;
  color: #8a6f34;
}
.rp-pillar-label span {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 11px;
  color: #6f5a30;
}
.rp-pillar-stem {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 38px;
  color: #a8321e;
  margin: 8px 0 4px;
  line-height: 1;
}
.rp-pillar-branch {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 32px;
  color: #2a251a;
  margin: 0;
  line-height: 1;
}
.rp-pillar-ko { font-size: 11px; color: #6f5a30; margin-top: 6px; }
.rp-pillar-elem {
  display: inline-block;
  margin-top: 6px;
  padding: 2px 8px;
  border: 1px solid #c4b08a;
  border-radius: 999px;
  font-size: 10px;
  color: #6f5a30;
}
.rp-pillar-role {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 10px;
  color: #8a6f34;
  margin-top: 6px;
}
@media (max-width: 640px) {
  .rp-pillars { gap: 4px; }
  .rp-pillar { padding: 10px 4px; }
  .rp-pillar-stem { font-size: 28px; }
  .rp-pillar-branch { font-size: 24px; }
}

/* 그리드 · 카드 */
.rp-grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 1rem 0;
}
.rp-grid-2-lg {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}
.rp-grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 8px;
  margin: 1rem 0;
}
.rp-card {
  background: rgba(138,111,52,0.08);
  padding: 10px 12px;
  border-left: 3px solid #a8321e;
  border-radius: 0 2px 2px 0;
}
.rp-card h4 {
  font-family: var(--font-display);
  font-size: 12px;
  color: #a8321e;
  margin: 0 0 4px;
  font-weight: 800;
}
.rp-card p { margin: 0; font-size: 13px; color: #3a3320; }
.rp-card-lg {
  background: rgba(138,111,52,0.08);
  padding: 1.2rem;
  border-left: 4px solid #a8321e;
  border-radius: 0 2px 2px 0;
}
.rp-card-lg h4 {
  font-family: var(--font-display);
  font-size: 14px;
  color: #a8321e;
  margin: 0 0 0.5rem;
  font-weight: 800;
}
.rp-card-lg p {
  margin: 0;
  font-size: 14px;
  line-height: 1.75;
  color: #3a3320;
}
.rp-card-lg small {
  display: block;
  font-size: 11px;
  color: #8a6f34;
  font-style: italic;
  margin-top: 6px;
}
.rp-attr {
  background: rgba(138,111,52,0.08);
  padding: 10px 12px;
  border-top: 2px solid #c4b08a;
  text-align: center;
}
.rp-attr-label {
  display: block;
  font-size: 11px;
  color: #8a6f34;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rp-attr strong {
  font-family: var(--font-display);
  font-size: 14px;
  color: #2a251a;
  font-weight: 800;
}

/* 오행 바 */
.rp-elems {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 1rem 0;
}
.rp-elem-row {
  display: grid;
  grid-template-columns: 60px 1fr;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
.rp-elem-name {
  font-family: var(--font-display);
  font-weight: 700;
  color: #3a3320;
  font-size: 15px;
  text-align: center;
  line-height: 1.2;
}
.rp-elem-name small {
  display: block;
  font-family: var(--font-body);
  font-weight: normal;
  font-size: 10px;
  color: #8a6f34;
  margin-top: 2px;
}
.rp-elem-bar-wrap {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.rp-elem-bar {
  height: 10px;
  background: rgba(138,111,52,0.15);
  border-radius: 5px;
  overflow: hidden;
}
.rp-elem-fill {
  height: 100%;
  border-radius: 5px;
  transition: width 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.rp-elem-row[data-elem="목"] .rp-elem-fill { background: linear-gradient(90deg, #4a8a5e, #6bab7d); }
.rp-elem-row[data-elem="화"] .rp-elem-fill { background: linear-gradient(90deg, #c9502e, #e8754f); }
.rp-elem-row[data-elem="토"] .rp-elem-fill { background: linear-gradient(90deg, #a88250, #c49966); }
.rp-elem-row[data-elem="금"] .rp-elem-fill { background: linear-gradient(90deg, #c9a961, #e4c876); }
.rp-elem-row[data-elem="수"] .rp-elem-fill { background: linear-gradient(90deg, #3a6b8a, #548bb2); }
.rp-elem-val {
  font-size: 12px;
  color: #6f5a30;
  font-family: var(--font-latin);
  font-style: italic;
}

/* 음양 */
.rp-yy-bar {
  display: flex;
  height: 44px;
  border: 1px solid #8a6f34;
  border-radius: 4px;
  overflow: hidden;
  margin: 1rem 0;
}
.rp-yy-yang {
  background: linear-gradient(90deg, #e4c876, #c9a961);
  color: #2a251a;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}
.rp-yy-yin {
  background: linear-gradient(90deg, #3a3550, #1c1928);
  color: var(--paper);
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
}

/* 신강 통계 */
.rp-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 1rem 0;
}
.rp-stats > div {
  background: rgba(138,111,52,0.08);
  padding: 1rem;
  text-align: center;
  border-top: 3px solid #c4b08a;
  border-radius: 0 0 3px 3px;
}
.rp-stats span {
  display: block;
  font-size: 11px;
  color: #8a6f34;
  letter-spacing: 0.05em;
  margin-bottom: 4px;
}
.rp-stats strong {
  font-family: var(--font-display);
  font-size: 22px;
  color: #2a251a;
  font-weight: 800;
}
.rp-stat-result { border-top-color: #a8321e !important; }
.rp-stat-result strong { color: #a8321e; }

/* 콜아웃 */
.rp-callout {
  background: rgba(168,50,30,0.08);
  border: 1px dashed #a8321e;
  padding: 1rem 1.2rem;
  margin: 1rem 0;
  font-size: 13.5px;
  color: #3a3320;
  line-height: 1.8;
  border-radius: 3px;
}
.rp-callout strong { color: #a8321e; }

/* 용신 카드 */
.rp-yong-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  margin: 1.5rem 0;
}
.rp-yong-card {
  background: rgba(201,169,97,0.1);
  border: 1px solid #c4b08a;
  padding: 1rem 1.2rem;
  border-radius: 3px;
}
.rp-yong-card header {
  display: flex; align-items: baseline; gap: 8px;
  margin-bottom: 0.5rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid #c4b08a;
}
.rp-yong-rank {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 11px;
  color: #8a6f34;
  letter-spacing: 0.1em;
}
.rp-yong-card header strong {
  font-family: var(--font-display);
  font-size: 18px;
  color: #a8321e;
  font-weight: 800;
  margin-left: auto;
}
.rp-yong-card p {
  font-size: 12.5px;
  color: #3a3320;
  margin: 0.2rem 0;
}

/* 대운 카드 */
.rp-daeun-card {
  background: rgba(138,111,52,0.08);
  border: 1px solid #c4b08a;
  border-left: 4px solid #a8321e;
  padding: 1.2rem 1.4rem;
  margin: 1rem 0;
  border-radius: 0 3px 3px 0;
}
.rp-daeun-card header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.8rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid #c4b08a;
}
.rp-daeun-card header h4 {
  font-family: var(--font-display);
  font-size: 15px;
  color: #a8321e;
  margin: 0;
  font-weight: 800;
}
.rp-daeun-han {
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 800;
  color: #2a251a;
  line-height: 1;
}
.rp-daeun-card p {
  margin: 0.3rem 0;
  font-size: 13.5px;
  color: #3a3320;
}
.rp-daeun-card p strong { color: #a8321e; }
.rp-daeun-text {
  font-size: 13.5px;
  line-height: 1.8;
  color: #3a3320;
  margin-top: 0.6rem !important;
}

/* 테이블 */
.rp-table-wrap { overflow-x: auto; margin: 1rem 0; }
.rp-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.rp-table th {
  background: rgba(138,111,52,0.15);
  text-align: left;
  padding: 10px 12px;
  font-family: var(--font-display);
  color: #2a251a;
  font-size: 13px;
  border-bottom: 2px solid #8a6f34;
  font-weight: 800;
}
.rp-table td {
  padding: 9px 12px;
  border-bottom: 1px solid #d6c8a8;
  color: #3a3320;
}
.rp-table tr.rp-current {
  background: rgba(168,50,30,0.08);
}
.rp-table tr.rp-current td {
  color: #a8321e;
  font-weight: 700;
}

/* 하이라이트 */
.rp-highlight {
  background: linear-gradient(135deg, rgba(201,169,97,0.15), rgba(168,50,30,0.08));
  border: 1px solid #8a6f34;
  padding: 1.5rem;
  margin: 1.5rem 0;
  border-radius: 4px;
}
.rp-highlight h4 {
  font-family: var(--font-display);
  font-size: 17px;
  color: #a8321e;
  margin: 0 0 0.5rem;
  font-weight: 800;
}
.rp-highlight p {
  font-size: 14.5px;
  color: #3a3320;
  margin: 0;
}

/* 편지 */
.rp-letter {
  background: rgba(201,169,97,0.05);
  padding: 2rem 2.2rem;
  border: 1px solid #c4b08a;
  margin: 1.5rem 0;
  font-family: var(--font-accent);
  border-radius: 3px;
  position: relative;
}
.rp-letter::before,
.rp-letter::after {
  content: '';
  position: absolute;
  width: 20px; height: 20px;
  border: 2px solid #a8321e;
}
.rp-letter::before { top: 8px; left: 8px; border-right: 0; border-bottom: 0; }
.rp-letter::after { bottom: 8px; right: 8px; border-left: 0; border-top: 0; }
.rp-letter p {
  font-size: 14.5px;
  line-height: 2;
  color: #2a251a;
  margin: 0.8rem 0;
}
.rp-letter p strong { color: #a8321e; }
.rp-letter-salutation {
  font-family: var(--font-display);
  font-size: 17px !important;
  font-weight: 700;
  color: #a8321e !important;
  margin-bottom: 1.5rem !important;
}
.rp-letter-sign {
  text-align: right;
  margin-top: 2rem !important;
  font-style: italic;
  color: #8a6f34 !important;
}
.rp-letter-sign strong {
  font-family: var(--font-display);
  font-style: normal;
  font-size: 18px;
  letter-spacing: 0.15em;
}

/* 종결 인장 */
.rp-end-seal {
  text-align: center;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 3px double #8a6f34;
}
.rp-seal-circle {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 80px; height: 80px;
  border: 3px solid #a8321e;
  background: #a8321e;
  color: var(--paper);
  font-family: var(--font-display);
  font-size: 42px; font-weight: 800;
  margin-bottom: 1rem;
  transform: rotate(-5deg);
  border-radius: 4px;
}
.rp-end-seal p {
  font-family: var(--font-latin);
  font-style: italic;
  color: #8a6f34;
  font-size: 13px;
  margin: 0;
}

/* ══════════════════════════════════════════════════════════════════
 * 확장 리포트 추가 클래스 · 가시성 보장 CSS
 * 다크 테마 사이트 내부에서 크림 한지 배경 페이지의 글자 보장
 * ══════════════════════════════════════════════════════════════════ */

/* ① 전역 안전망 — .rp-report 내부 모든 요소에 어두운 색상 기본 적용 */
.rp-report,
.rp-report * {
  color: #2a251a;
}
.rp-report p,
.rp-report li,
.rp-report td,
.rp-report th,
.rp-report div,
.rp-report span,
.rp-report h1,
.rp-report h2,
.rp-report h3,
.rp-report h4,
.rp-report h5 {
  color: inherit;
}
/* 이미 색상이 지정된 요소는 유지 (원래 선언 복원) */
.rp-report .rp-lead strong,
.rp-report .rp-bullets li strong,
.rp-report .rp-stat-result strong,
.rp-report .rp-callout strong,
.rp-report .rp-daeun-card p strong,
.rp-report .rp-letter p strong,
.rp-report .rp-page-title,
.rp-report .rp-cover-title { color: #a8321e; }
.rp-report .rp-text { color: #3a3320; }
.rp-report .rp-text strong { color: #a8321e; font-weight: 700; }
.rp-report .rp-page-en,
.rp-report .rp-pillar-ko,
.rp-report .rp-cover-hanja { color: #8a6f34; }

/* ② 페이지 구조 */
.rp-page-body { color: #2a251a; }
.rp-page-title-wrap { display: flex; flex-direction: column; gap: 4px; }

/* ③ 표지 */
.rp-cover-stamp {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 800;
  color: #a8321e;
  letter-spacing: 0.2em;
}
.rp-cover-han {
  font-family: var(--font-display);
  font-size: 14px; letter-spacing: 0.3em;
  color: #8a6f34;
  margin-top: 6px;
}
.rp-cover-line {
  width: 80px; height: 2px;
  background: #8a6f34;
  margin: 1.5rem auto;
}
.rp-cover-sub {
  font-family: var(--font-latin);
  font-style: italic; letter-spacing: 0.25em;
  font-size: 13px; color: #8a6f34;
  margin: 0.5rem 0 0;
}
.rp-cover-details {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin: 2rem auto;
  max-width: 560px;
  text-align: left;
}
.rp-cover-details > div {
  display: flex;
  justify-content: space-between;
  padding: 0.7rem 1rem;
  background: rgba(138,111,52,0.06);
  border-left: 3px solid #a8321e;
  border-radius: 0 3px 3px 0;
}
.rp-cover-details span {
  color: #8a6f34; font-size: 13px;
  font-family: var(--font-accent);
}
.rp-cover-details strong {
  color: #2a251a; font-weight: 700;
  font-size: 14.5px;
}
.rp-cover-sig {
  margin-top: 2.5rem;
  padding: 1.2rem;
  border-top: 1px solid #c4b08a;
  border-bottom: 1px solid #c4b08a;
}
.rp-cover-sig p {
  font-size: 12.5px; color: #6f5a30;
  line-height: 1.75; margin: 0.2rem 0;
  font-style: italic;
}
.rp-cover-issued {
  margin-top: 2rem;
  font-size: 12px; color: #8a6f34;
  letter-spacing: 0.15em;
}

/* ④ 일간 카드 */
.rp-day-master-card {
  display: flex; align-items: center;
  gap: 1.5rem;
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(168,50,30,0.05), rgba(138,111,52,0.05));
  border: 1px solid #c4b08a;
  border-radius: 6px;
  margin: 1rem 0 1.5rem;
}
.rp-dm-han {
  font-family: var(--font-display);
  font-size: 72px; font-weight: 800;
  color: #a8321e;
  line-height: 1; flex-shrink: 0;
}
.rp-dm-info { flex: 1; }
.rp-dm-info h3 {
  font-family: var(--font-display);
  font-size: 24px; font-weight: 700;
  color: #2a251a;
  margin: 0 0 0.4rem;
}
.rp-dm-symbol {
  font-size: 13px; color: #6f5a30;
  font-style: italic; margin: 0;
  line-height: 1.7;
}

/* ⑤ 강점·약점 박스 */
.rp-strengths,
.rp-weaknesses {
  padding: 1rem 1.2rem;
  border-radius: 4px;
  border-top: 3px solid;
}
.rp-strengths {
  background: rgba(107,138,114,0.08);
  border-top-color: #6b8a72;
}
.rp-weaknesses {
  background: rgba(168,50,30,0.05);
  border-top-color: #a8321e;
}
.rp-strengths h4,
.rp-weaknesses h4 {
  font-family: var(--font-display);
  font-size: 14px; margin: 0 0 0.5rem;
  border-bottom: none; padding-bottom: 0;
}
.rp-strengths h4 { color: #4a6b52; }
.rp-weaknesses h4 { color: #a8321e; }
.rp-strengths p,
.rp-weaknesses p {
  font-size: 13.5px; line-height: 1.75;
  color: #3a3320; margin: 0;
}

/* ⑥ 기본 격자 (2열/3열) */
.rp-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.rp-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0;
}
.rp-card {
  padding: 1rem;
  background: rgba(138,111,52,0.05);
  border: 1px solid #d4c5a3;
  border-radius: 4px;
}
.rp-card h4 {
  font-size: 13.5px; margin: 0 0 0.5rem;
  color: #a8321e;
  border-bottom: none; padding-bottom: 0;
}
.rp-card-note {
  margin-top: 0.5rem; padding-top: 0.5rem;
  border-top: 1px dotted #c4b08a;
  font-size: 12px; color: #6f5a30;
  font-style: italic;
}
.rp-attr {
  text-align: center; padding: 0.8rem;
  background: rgba(201,169,97,0.06);
  border-radius: 4px;
}
.rp-attr-label {
  display: block;
  font-size: 11px; color: #8a6f34;
  letter-spacing: 0.1em;
  margin-bottom: 4px;
}
.rp-attr strong {
  color: #2a251a; font-size: 14px;
  font-weight: 700;
}

/* ⑦ 오행 차트 */
.rp-elem-chart { margin: 1rem 0; }
.rp-elem-raw {
  font-size: 11.5px; color: #8a6f34;
  padding-left: 4px;
}

/* ⑧ 음양·용신 구역 */
.rp-yy-visual { margin: 1rem 0; }
.rp-yongsin-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1rem 0;
}
.rp-yongsin-main-card,
.rp-yongsin-sub-card {
  padding: 1.2rem 1rem;
  text-align: center;
  border-radius: 4px;
}
.rp-yongsin-main-card {
  background: linear-gradient(135deg, #a8321e, #8a261a);
  color: #f5eddc;
  box-shadow: 0 4px 12px rgba(168,50,30,0.25);
}
.rp-yongsin-sub-card {
  background: linear-gradient(135deg, #c9a961, #8a6d33);
  color: #2a251a;
}
.rp-yongsin-main-card .rp-ys-label,
.rp-yongsin-main-card .rp-ys-name,
.rp-yongsin-main-card .rp-ys-virtue {
  color: #f5eddc;
}
.rp-yongsin-sub-card .rp-ys-label,
.rp-yongsin-sub-card .rp-ys-name,
.rp-yongsin-sub-card .rp-ys-virtue {
  color: #2a251a;
}
.rp-ys-label {
  font-size: 11px;
  letter-spacing: 0.25em;
  opacity: 0.9; margin-bottom: 6px;
}
.rp-ys-name {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  margin: 0.3rem 0;
  line-height: 1;
}
.rp-ys-virtue {
  font-size: 12.5px; line-height: 1.6;
  opacity: 0.95; margin: 0.5rem 0 0;
}

/* ⑨ 격국 박스 */
.rp-gyeok-box {
  padding: 1.5rem;
  background: linear-gradient(135deg, rgba(168,50,30,0.06), rgba(201,169,97,0.06));
  border: 2px solid #c4b08a;
  border-radius: 6px;
  text-align: center;
  margin: 1rem 0 1.5rem;
}
.rp-gyeok-name {
  font-family: var(--font-display);
  font-size: 32px; font-weight: 800;
  color: #a8321e;
  margin-bottom: 0.7rem;
  letter-spacing: 0.05em;
}
.rp-gyeok-desc {
  font-size: 14px; color: #3a3320;
  line-height: 1.8;
  margin: 0;
}

/* ⑩ 리스트 */
.rp-list {
  margin: 0.8rem 0;
  padding-left: 1.2rem;
}
.rp-list li {
  font-size: 14px; line-height: 1.85;
  color: #3a3320;
  margin: 0.5rem 0;
}
.rp-list li strong { color: #a8321e; }
.rp-list-ol { list-style: decimal; }

/* ⑪ 공망 강조 */
.rp-gm-big {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  color: #a8321e;
  text-align: center;
  letter-spacing: 0.1em;
  margin: 0.5rem 0;
}
.rp-highlight {
  padding: 1.2rem;
  background: rgba(201,169,97,0.08);
  border-left: 4px solid #a8321e;
  margin: 1rem 0;
  border-radius: 0 4px 4px 0;
}
.rp-highlight h4 {
  margin-top: 0;
  border-bottom: none;
  padding-bottom: 0;
}

/* ⑫ 현재 대운 하이라이트 */
.rp-current {
  background: linear-gradient(90deg, rgba(168,50,30,0.1), transparent) !important;
  border-left: 4px solid #a8321e;
}
.rp-daeun-card.rp-current {
  background: linear-gradient(135deg, rgba(168,50,30,0.08), rgba(201,169,97,0.08)) !important;
  border: 2px solid #a8321e;
}

/* ⑬ 대운 카드 상세 */
.rp-daeun-text {
  font-size: 13.5px; line-height: 1.85;
  color: #3a3320;
  margin: 0.5rem 0;
}
.rp-daeun-text strong { color: #a8321e; font-weight: 700; }
.rp-daeun-han {
  font-family: var(--font-display);
  font-size: 28px; font-weight: 800;
  color: #a8321e;
  letter-spacing: 0.05em;
}

/* ⑭ 월별 카드 */
.rp-month-card {
  padding: 1rem 1.2rem;
  border: 1px solid #c4b08a;
  border-radius: 4px;
  margin-bottom: 1rem;
  background: rgba(245,237,220,0.4);
}
.rp-month-card header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding-bottom: 0.6rem;
  margin-bottom: 0.6rem;
  border-bottom: 1px dotted #c4b08a;
}
.rp-month-card header h4 {
  margin: 0; border-bottom: none;
  padding-bottom: 0;
  font-size: 15px; color: #2a251a;
}
.rp-month-card .rp-note {
  font-size: 12px; color: #6f5a30;
  margin: 0.3rem 0 0;
  font-style: italic;
}
.rp-month-card .rp-note strong { color: #a8321e; }
.rp-month-tone-box {
  padding: 4px 10px;
  background: #a8321e;
  color: #f5eddc;
  border-radius: 12px;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-month-deep {
  font-size: 13px; line-height: 1.85;
  color: #3a3320;
  background: rgba(138,111,52,0.04);
  padding: 0.7rem;
  border-radius: 3px;
}

/* ⑮ 행운 요소 격자 */
.rp-lucky-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.8rem;
  margin: 1rem 0 1.5rem;
}
.rp-lucky-item {
  text-align: center;
  padding: 1rem 0.6rem;
  background: linear-gradient(135deg, rgba(168,50,30,0.05), rgba(201,169,97,0.05));
  border: 1px solid #c4b08a;
  border-radius: 4px;
}
.rp-lucky-item span {
  display: block;
  font-size: 11px; color: #8a6f34;
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.rp-lucky-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 18px;
  color: #a8321e;
  font-weight: 700;
}

/* ⑯ 주의 박스 */
.rp-note-box {
  padding: 0.9rem 1.1rem;
  background: rgba(107,138,114,0.08);
  border-left: 3px solid #6b8a72;
  border-radius: 0 4px 4px 0;
  margin: 1rem 0;
  font-size: 12.5px;
  line-height: 1.75;
  color: #3a3320;
  font-style: italic;
}
.rp-note-box strong {
  color: #4a6b52;
  font-style: normal;
}

/* ⑰ 콜아웃 */
.rp-callout {
  padding: 1rem 1.2rem;
  background: rgba(201,169,97,0.1);
  border: 1px solid #c4b08a;
  border-left: 4px solid #a8321e;
  border-radius: 0 4px 4px 0;
  margin: 1rem 0;
  font-size: 13.5px;
  line-height: 2;
  color: #3a3320;
}

/* ⑱ 기둥 라벨 */
.rp-pillar-lbl {
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: #8a6f34;
  margin-bottom: 8px;
  text-align: center;
}
.rp-pillar-lbl span {
  display: block;
  font-family: var(--font-display);
  font-style: normal;
  font-size: 10px;
  color: #a8321e;
  letter-spacing: 0.1em;
  margin-top: 2px;
}

/* ⑲ 목차 */
.rp-toc-list {
  list-style: none;
  padding: 0;
  margin: 2rem 0;
  counter-reset: toc;
}
.rp-toc-list li {
  display: flex;
  align-items: baseline;
  padding: 0.6rem 0;
  border-bottom: 1px dotted #c4b08a;
  font-size: 14.5px;
  color: #2a251a;
}
.rp-toc-num {
  font-family: var(--font-display);
  font-weight: 700;
  color: #a8321e;
  width: 50px;
  flex-shrink: 0;
}
.rp-toc-p {
  margin-left: auto;
  font-family: var(--font-latin);
  font-style: italic;
  color: #8a6f34;
  font-size: 12.5px;
}

/* ⑳ 편지 (총평) */
.rp-letter {
  padding: 2rem 1.5rem;
  background: rgba(245,237,220,0.6);
  border: 1px solid #c4b08a;
  border-radius: 4px;
  line-height: 2;
  font-size: 14.5px;
  color: #2a251a;
}
.rp-letter p { margin: 1rem 0; }
.rp-letter-salutation {
  font-family: var(--font-display);
  font-size: 17px;
  color: #a8321e;
  font-weight: 700;
  margin-bottom: 1.5rem !important;
}
.rp-letter-sign {
  text-align: right;
  margin-top: 2rem !important;
  font-family: var(--font-display);
  color: #2a251a;
}
.rp-letter-sign strong { color: #a8321e; }

/* ㉑ 인감 */
.rp-end-seal {
  text-align: center;
  margin-top: 2.5rem;
  padding-top: 2rem;
  border-top: 1px dotted #c4b08a;
}
.rp-seal-circle {
  display: inline-block;
  width: 70px; height: 70px;
  border: 2.5px solid #a8321e;
  border-radius: 50%;
  line-height: 66px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 800;
  color: #a8321e;
  background: rgba(168,50,30,0.05);
  margin-bottom: 1rem;
}
.rp-end-seal p {
  font-size: 12.5px;
  color: #8a6f34;
  margin: 0.3rem 0;
  font-style: italic;
}

/* ㉒ 기둥 추가 스타일 */
.rp-pillar-elem {
  font-size: 10.5px;
  color: #8a6f34;
  text-align: center;
  margin-top: 2px;
}
.rp-pillar-role {
  font-size: 10px;
  color: #6f5a30;
  text-align: center;
  margin-top: 6px;
  line-height: 1.45;
  padding-top: 6px;
  border-top: 1px dotted #c4b08a;
}

/* ═══════════════════════════════════════════════════════════════════
 * 프린트 (PDF 저장용) — A4 최적화, 색상 보존, 페이지 수 최소화
 * ═══════════════════════════════════════════════════════════════════ */
@media print {
  /* A4 페이지 설정 — 여백을 넉넉히 해서 잘림 방지 */
  @page {
    size: A4;
    margin: 16mm 16mm 18mm 16mm;
  }

  /* 색상·배경 강제 출력 (크롬·엣지) */
  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
    color-adjust: exact !important;
  }

  html, body {
    background: white !important;
    color: #1a1612 !important;
    font-size: 9.8pt !important;
    line-height: 1.55 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
  }

  /* 화면 전용 요소 숨김 */
  .no-print,
  .site-header,
  .notice-bar,
  .status-card,
  .status-box,
  .pdf-guide-box,
  .report-actions,
  .report-actions-box,
  .site-footer,
  #print-btn,
  #print-btn-header,
  .floating-pdf-btn,
  #section-loading,
  #status-section,
  #to-top {
    display: none !important;
  }

  main, .success-page {
    padding: 0 !important;
    margin: 0 !important;
  }

  /* 리포트 컨테이너 */
  .rp-report {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
    box-shadow: none !important;
    background: white !important;
    border-radius: 0 !important;
    color: #1a1612 !important;
  }

  .rp-report,
  .rp-report * {
    color: #1a1612 !important;
  }

  /* 각 섹션 = 1 프린트 페이지 */
  .rp-page,
  .rp-cover,
  .rp-toc {
    page-break-before: always !important;
    page-break-after: auto !important;
    page-break-inside: auto !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
    background: white !important;
    min-height: auto !important;
    max-height: none !important;
    height: auto !important;
  }
  .rp-page:first-of-type,
  .rp-cover:first-of-type {
    page-break-before: auto !important;
  }

  /* 표지 배경·글자 */
  .rp-cover {
    background: #f9f3e4 !important;
    padding: 20mm 12mm !important;
    text-align: center !important;
  }
  .rp-cover-stamp, .rp-cover-title, .rp-cover-details strong,
  .rp-gyeok-name, .rp-dm-han, .rp-letter-salutation,
  .rp-page-title, .rp-page-num, .rp-ys-name {
    color: #a8321e !important;
  }
  .rp-cover-han, .rp-cover-sub, .rp-cover-hanja,
  .rp-cover-details span, .rp-cover-issued,
  .rp-page-en, .rp-pillar-ko, .rp-dm-symbol,
  .rp-note-box, .rp-month-card .rp-note,
  .rp-end-seal p, .rp-toc-p {
    color: #6f5a30 !important;
  }
  .rp-text, .rp-lead, .rp-list li,
  .rp-daeun-text, .rp-month-deep,
  .rp-strengths p, .rp-weaknesses p,
  .rp-letter p, .rp-card p {
    color: #2a251a !important;
  }
  .rp-text strong, .rp-lead strong, .rp-list li strong,
  .rp-daeun-text strong, .rp-letter p strong,
  .rp-stat-result strong, .rp-callout strong {
    color: #a8321e !important;
    font-weight: 700 !important;
  }

  /* 제목 */
  .rp-page-title {
    font-size: 14pt !important;
    margin: 0 0 4mm 0 !important;
    padding-bottom: 2mm !important;
    border-bottom: 1.5pt solid #8a6f34 !important;
  }
  .rp-h4 {
    font-size: 11pt !important;
    color: #a8321e !important;
    margin: 3mm 0 2mm 0 !important;
    padding-bottom: 1mm !important;
    border-bottom: 0.5pt dotted #c4b08a !important;
  }
  .rp-h3 {
    font-size: 11pt !important;
    margin: 2mm 0 1mm 0 !important;
    color: #1a1612 !important;
  }

  /* 본문 */
  .rp-text, .rp-body-text {
    font-size: 9.5pt !important;
    line-height: 1.6 !important;
    margin: 1mm 0 !important;
  }
  .rp-lead {
    font-size: 10pt !important;
    line-height: 1.7 !important;
  }
  .rp-list li {
    font-size: 9.5pt !important;
    line-height: 1.5 !important;
    padding: 0.8mm 0 0.8mm 4mm !important;
    margin: 0 !important;
  }

  /* 오행 차트 보존 */
  .rp-elem-bar-wrap, .rp-elem-bar {
    background: #e0d5b8 !important;
    border-radius: 2pt !important;
  }
  .rp-elem-fill[data-elem="목"], .rp-elem-row[data-elem="목"] .rp-elem-fill {
    background: #6b8a72 !important;
  }
  .rp-elem-fill[data-elem="화"], .rp-elem-row[data-elem="화"] .rp-elem-fill {
    background: #c74b36 !important;
  }
  .rp-elem-fill[data-elem="토"], .rp-elem-row[data-elem="토"] .rp-elem-fill {
    background: #c9a961 !important;
  }
  .rp-elem-fill[data-elem="금"], .rp-elem-row[data-elem="금"] .rp-elem-fill {
    background: #b0b0b0 !important;
  }
  .rp-elem-fill[data-elem="수"], .rp-elem-row[data-elem="수"] .rp-elem-fill {
    background: #4a6b9c !important;
  }

  /* 음양 바 */
  .rp-yy-yang {
    background: #c9a961 !important;
    color: #2a251a !important;
  }
  .rp-yy-yin {
    background: #3a3550 !important;
    color: #f5eddc !important;
  }

  /* 용신 카드 */
  .rp-yongsin-main-card {
    background: #a8321e !important;
    color: #f5eddc !important;
  }
  .rp-yongsin-main-card * {
    color: #f5eddc !important;
  }
  .rp-yongsin-sub-card {
    background: #c9a961 !important;
    color: #2a251a !important;
  }
  .rp-month-tone-box {
    background: #a8321e !important;
    color: #f5eddc !important;
  }

  /* 박스 요소들 */
  .rp-day-master-card, .rp-gyeok-box, .rp-highlight,
  .rp-callout, .rp-note-box, .rp-daeun-card,
  .rp-month-card, .rp-letter, .rp-card, .rp-lucky-item {
    background: #f9f3e4 !important;
    border: 0.3pt solid #c4b08a !important;
    padding: 2mm 3mm !important;
    margin: 1mm 0 !important;
    page-break-inside: avoid !important;
  }

  /* 명식 기둥 */
  .rp-pillars {
    display: grid !important;
    grid-template-columns: repeat(4, 1fr) !important;
    gap: 2mm !important;
    margin: 2mm 0 !important;
  }
  .rp-pillar {
    background: #f9f3e4 !important;
    border: 0.3pt solid #c4b08a !important;
    padding: 2mm !important;
    text-align: center !important;
    page-break-inside: avoid !important;
  }
  .rp-pillar-stem, .rp-pillar-branch {
    font-size: 18pt !important;
    color: #a8321e !important;
    line-height: 1.1 !important;
  }

  /* 테이블 */
  .rp-table {
    font-size: 9pt !important;
    border-collapse: collapse !important;
    width: 100% !important;
  }
  .rp-table th, .rp-table td {
    border: 0.3pt solid #c4b08a !important;
    padding: 1.5mm 2mm !important;
    color: #2a251a !important;
  }
  .rp-table th {
    background: #e8dcc2 !important;
    color: #1a1612 !important;
  }
  .rp-table .rp-current td {
    background: #fff0e0 !important;
  }

  /* 인감 */
  .rp-seal-circle {
    border: 1pt solid #a8321e !important;
    color: #a8321e !important;
    background: #fff0e0 !important;
  }

  /* 페이지 break 방지 */
  .rp-page-head,
  .rp-h3,
  .rp-h4 {
    page-break-after: avoid !important;
  }
  .rp-pillars,
  .rp-table-wrap,
  .rp-daeun-card,
  .rp-month-card,
  .rp-highlight,
  .rp-callout,
  .rp-note-box,
  .rp-gyeok-box,
  .rp-day-master-card,
  .rp-letter,
  .rp-end-seal {
    page-break-inside: avoid !important;
  }

  /* 링크 밑줄 제거 */
  a {
    color: #a8321e !important;
    text-decoration: none !important;
  }

  /* 이미지·SVG 스케일 조정 */
  svg {
    max-width: 100% !important;
  }
}



/* =======================================================
   Consult CTA — urgency countdown enhancement
   ======================================================= */
.consult-urgency {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin-bottom: 1rem;
}
.urgency-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 7px 14px;
  border-radius: 999px;
  background: linear-gradient(180deg, #f0d599, var(--gold));
  color: var(--bg-0);
  font-family: var(--font-accent);
  font-weight: 800;
  font-size: 13px;
  letter-spacing: 0.06em;
  box-shadow: 0 0 0 0 rgba(240, 213, 153, 0.35);
  animation: urgencyPulse 1.6s infinite;
}
.urgency-note {
  color: var(--gold-bright);
  font-size: 13px;
  letter-spacing: 0.01em;
}
.consult-countdown-wrap {
  margin: 2rem 0 1.8rem;
  max-width: 620px;
}
.countdown-caption {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 0.8rem;
  color: var(--paper);
  font-family: var(--font-accent);
  font-size: 13px;
  letter-spacing: 0.08em;
}
.countdown-caption::before {
  content: '●';
  color: var(--cinnabar-light);
  animation: blinkDot 1s infinite;
}
.countdown-helper {
  margin-top: 0.85rem;
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.7;
}
.consult-countdown {
  display: grid;
  grid-template-columns: repeat(4, minmax(88px, 1fr));
  gap: 12px;
  margin: 0;
  max-width: 560px;
}
.consult-countdown > div {
  background: linear-gradient(180deg, rgba(8, 7, 14, 0.98), rgba(3, 3, 7, 0.98));
  border: 1px solid rgba(201, 169, 97, 0.28);
  padding: 18px 10px;
  min-height: 132px;
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 18px 30px -20px rgba(0,0,0,0.8);
  position: relative;
  overflow: hidden;
}
.consult-countdown > div::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.03), transparent 42%);
  pointer-events: none;
}
.consult-countdown strong {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 3.4rem);
  line-height: 1;
  color: var(--gold-bright);
  font-weight: 800;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
  text-shadow: 0 0 20px rgba(201, 169, 97, 0.18);
}
.consult-countdown small {
  display: block;
  font-family: var(--font-accent);
  font-size: 12px;
  letter-spacing: 0.12em;
  color: var(--text-2);
  text-transform: uppercase;
  margin-top: 12px;
}
.consult-countdown .cd-fast {
  border-color: rgba(228, 199, 134, 0.55);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03), 0 0 30px rgba(201,169,97,0.12);
}
.consult-countdown .cd-fast strong {
  color: #ffe5a5;
}
.consult-countdown.is-soon > div {
  border-color: rgba(228, 199, 134, 0.72);
  box-shadow: 0 0 0 1px rgba(228, 199, 134, 0.08), 0 0 26px rgba(201,169,97,0.12);
}
.consult-countdown.is-critical > div {
  border-color: rgba(199, 75, 54, 0.8);
  background: linear-gradient(180deg, rgba(40, 12, 12, 0.96), rgba(11, 6, 10, 0.98));
}
.consult-countdown.is-critical strong {
  color: #ffd7c5;
  text-shadow: 0 0 20px rgba(199, 75, 54, 0.25);
}
.consult-countdown.is-critical .cd-fast {
  animation: criticalFlash 0.8s infinite;
}
@keyframes urgencyPulse {
  0% { box-shadow: 0 0 0 0 rgba(240, 213, 153, 0.35); }
  70% { box-shadow: 0 0 0 10px rgba(240, 213, 153, 0); }
  100% { box-shadow: 0 0 0 0 rgba(240, 213, 153, 0); }
}
@keyframes blinkDot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}
@keyframes criticalFlash {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(199, 75, 54, 0.28); }
  50% { transform: scale(1.02); box-shadow: 0 0 0 8px rgba(199, 75, 54, 0); }
}
@media (max-width: 900px) {
  .consult-countdown { max-width: 100%; }
}
@media (max-width: 640px) {
  .consult-countdown {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
  }
  .consult-countdown > div {
    min-height: 104px;
    padding: 14px 8px;
  }
  .consult-countdown strong {
    font-size: 2rem;
  }
  .consult-countdown small {
    font-size: 10px;
    letter-spacing: 0.06em;
  }
  .urgency-note,
  .countdown-helper {
    font-size: 12px;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * SEO 랜딩 페이지 전용 (사주/사주팔자/사주풀이 등)
 * 홈 디자인과 동일한 다크 테마 · 금빛 포인트 유지
 * ══════════════════════════════════════════════════════════════════ */

.page-seo {
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
}

.seo-main {
  background: var(--bg-0);
  position: relative;
  padding: 2.5rem 0 4rem;
}
.seo-main::before {
  content: '';
  position: absolute; inset: 0;
  background:
    radial-gradient(ellipse at 20% 10%, rgba(201,169,97,0.04), transparent 50%),
    radial-gradient(ellipse at 80% 90%, rgba(168,50,30,0.03), transparent 50%);
  pointer-events: none;
}
.seo-article {
  position: relative;
  z-index: 1;
}
.seo-article > .wrap {
  max-width: 880px;
}

/* 빵부스러기 */
.breadcrumb {
  margin-bottom: 2rem;
}
.breadcrumb-list {
  list-style: none;
  padding: 0; margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-size: 13px;
  color: var(--text-3);
  font-family: var(--font-accent);
}
.breadcrumb-list li {
  display: flex;
  align-items: center;
}
.breadcrumb-list li + li::before {
  content: '›';
  margin-right: 0.5rem;
  color: var(--gold-deep);
}
.breadcrumb-list a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dotted transparent;
  transition: border 0.2s;
}
.breadcrumb-list a:hover {
  border-bottom-color: var(--gold);
}
.breadcrumb-list li[aria-current="page"] {
  color: var(--text-2);
}

/* 페이지 헤더 */
.seo-article-head {
  text-align: center;
  padding: 2rem 0 3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 3rem;
}
.seo-article-head .section-kicker {
  display: inline-block;
  font-family: var(--font-latin);
  font-style: italic;
  letter-spacing: 0.3em;
  color: var(--gold);
  font-size: 12px;
  margin-bottom: 1.2rem;
  text-transform: uppercase;
}
.seo-h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--paper);
  margin: 0;
}

/* 본문 */
.seo-article-body {
  font-family: var(--font-body);
  line-height: 1.9;
  color: var(--text-1);
  font-size: 16.5px;
}

.content-intro {
  margin-bottom: 3rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px dotted var(--line);
}
.content-lead {
  font-size: 17px;
  line-height: 2;
  color: var(--text-1);
  margin: 0 0 1.2rem;
}
.content-lead strong {
  color: var(--gold-bright);
  font-weight: 700;
}

.content-section {
  margin-bottom: 2.8rem;
}
.content-section h2 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.3rem, 2.5vw, 1.65rem);
  color: var(--paper);
  margin: 0 0 1.2rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold-deep);
  letter-spacing: -0.01em;
}
.content-section p {
  color: var(--text-1);
  line-height: 2;
  margin: 0 0 1rem;
}
.content-section p strong {
  color: var(--gold-bright);
  font-weight: 700;
}
.content-section a {
  color: var(--gold);
  text-decoration: none;
  border-bottom: 1px dotted var(--gold-deep);
}
.content-section a:hover {
  border-bottom-style: solid;
}

.content-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 1.5rem;
}
.content-list li {
  position: relative;
  padding: 0.6rem 0 0.6rem 1.8rem;
  line-height: 1.85;
  color: var(--text-1);
  border-bottom: 1px dotted var(--line);
}
.content-list li:last-child {
  border-bottom: 0;
}
.content-list li::before {
  content: '◆';
  position: absolute;
  left: 0.3rem;
  top: 0.6rem;
  color: var(--gold-deep);
  font-size: 11px;
  line-height: 2;
}
.content-list li strong {
  color: var(--gold-bright);
  font-weight: 700;
}
ol.content-list {
  counter-reset: seo-ol;
}
ol.content-list li::before {
  content: counter(seo-ol, decimal-leading-zero);
  counter-increment: seo-ol;
  font-family: var(--font-latin);
  font-style: italic;
  color: var(--gold);
  font-size: 13px;
  top: 0.85rem;
  left: 0;
  width: 1.5rem;
}

/* 중간 CTA */
.cta-inline {
  margin: 3rem 0 2rem;
  padding: 2.5rem 2rem;
  background: linear-gradient(135deg, rgba(168,50,30,0.12), rgba(201,169,97,0.08));
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-inline::before {
  content: '運';
  position: absolute;
  right: -20px;
  bottom: -50px;
  font-family: var(--font-display);
  font-size: 180px;
  color: var(--gold);
  opacity: 0.06;
  line-height: 1;
  pointer-events: none;
}
.cta-inline-inner {
  position: relative;
  z-index: 1;
}
.cta-inline h3 {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--paper);
  margin: 0 0 0.7rem;
  font-weight: 700;
}
.cta-inline p {
  color: var(--text-2);
  font-size: 15px;
  margin: 0 0 1.5rem;
}
.cta-inline p s {
  color: var(--text-3);
  text-decoration-color: var(--cinnabar-light);
}
.cta-inline p strong {
  color: var(--gold-bright);
  font-size: 17px;
  font-weight: 800;
  margin-left: 0.3rem;
}

/* 관련 글 섹션 */
.related-section {
  margin-top: 4rem;
  padding-top: 3rem;
  border-top: 1px solid var(--line);
}
.related-section .section-title.center {
  text-align: center;
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3vw, 1.8rem);
  color: var(--paper);
  margin-bottom: 2rem;
  font-weight: 700;
}
.related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.2rem;
}
.related-card {
  display: block;
  padding: 1.4rem 1.3rem 1.2rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  text-decoration: none;
  color: var(--text-1);
  transition: transform 0.25s var(--ease-out), border-color 0.25s, box-shadow 0.25s;
  position: relative;
  overflow: hidden;
}
.related-card:hover {
  transform: translateY(-3px);
  border-color: var(--gold-deep);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.related-topic {
  display: inline-block;
  font-family: var(--font-latin);
  font-style: italic;
  font-size: 11px;
  letter-spacing: 0.2em;
  color: var(--gold);
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}
.related-card h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  color: var(--paper);
  margin: 0 0 0.6rem;
  font-weight: 700;
  line-height: 1.4;
}
.related-card p {
  font-size: 13px;
  line-height: 1.7;
  color: var(--text-3);
  margin: 0 0 1rem;
}
.related-arrow {
  display: inline-block;
  font-size: 12.5px;
  color: var(--gold);
  font-family: var(--font-accent);
}

/* 네비게이션 active */
.primary-nav a.nav-active,
.mobile-menu a.nav-active {
  color: var(--gold-bright);
}
.primary-nav a.nav-active::after {
  width: 100%;
}

/* 반응형 */
@media (max-width: 768px) {
  .seo-article > .wrap {
    padding: 0 1.2rem;
  }
  .seo-article-head {
    padding: 1rem 0 2rem;
    margin-bottom: 2rem;
  }
  .content-section h2 {
    font-size: 1.25rem;
  }
  .seo-article-body {
    font-size: 15.5px;
  }
  .cta-inline {
    padding: 1.8rem 1.2rem;
  }
  .cta-inline h3 {
    font-size: 1.15rem;
  }
  .related-grid {
    grid-template-columns: 1fr;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * 홈페이지 SEO 허브 (사주 백과 가이드)
 * ══════════════════════════════════════════════════════════════════ */
.seo-hub {
  padding: clamp(4rem, 8vw, 6rem) 0;
  background: var(--bg-1);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}
.seo-hub::before {
  content: '命';
  position: absolute;
  right: -80px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: clamp(20rem, 30vw, 32rem);
  color: var(--gold);
  opacity: 0.03;
  pointer-events: none;
  line-height: 0.8;
}
.seo-hub .section-head {
  margin-bottom: 3rem;
}
.seo-hub .section-sub {
  color: var(--text-2);
  font-size: 15.5px;
  max-width: 620px;
  margin: 1rem auto 0;
  line-height: 1.85;
}
.hub-columns {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  position: relative;
  z-index: 1;
}
.hub-col {
  padding: 2rem 1.5rem;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 6px;
  position: relative;
  transition: border-color 0.25s, transform 0.25s;
}
.hub-col:hover {
  border-color: var(--gold-deep);
  transform: translateY(-2px);
}
.hub-col-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--gold-bright);
  margin: 0 0 1.2rem;
  padding-bottom: 0.8rem;
  border-bottom: 2px solid var(--gold-deep);
  letter-spacing: -0.01em;
}
.hub-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.hub-list li {
  border-bottom: 1px dotted var(--line);
}
.hub-list li:last-child {
  border-bottom: 0;
}
.hub-list a {
  display: block;
  padding: 0.8rem 0;
  color: var(--text-1);
  text-decoration: none;
  font-size: 14.5px;
  line-height: 1.6;
  transition: color 0.2s, padding 0.2s;
  position: relative;
  padding-left: 1rem;
}
.hub-list a::before {
  content: '◇';
  position: absolute;
  left: 0;
  top: 0.85rem;
  color: var(--gold-deep);
  font-size: 10px;
  transition: color 0.2s, transform 0.2s;
}
.hub-list a:hover {
  color: var(--paper);
  padding-left: 1.2rem;
}
.hub-list a:hover::before {
  color: var(--gold);
  transform: scale(1.2);
}
.hub-list a strong {
  color: var(--gold-bright);
  font-weight: 700;
  margin-right: 0.3rem;
}

@media (max-width: 900px) {
  .hub-columns {
    grid-template-columns: 1fr;
    gap: 1.2rem;
  }
  .hub-col {
    padding: 1.5rem 1.2rem;
  }
}

/* ══════════════════════════════════════════════════════════════════
 * PDF 저장 안내 박스 (success.html)
 * ══════════════════════════════════════════════════════════════════ */
.pdf-guide {
  margin-top: 1.8rem;
  padding: 1.5rem 1.8rem;
  background: linear-gradient(135deg, rgba(168,50,30,0.08), rgba(201,169,97,0.08));
  border: 1px solid var(--gold-deep);
  border-radius: 6px;
  text-align: left;
}
.pdf-guide h3 {
  font-family: var(--font-display);
  color: var(--gold-bright);
  font-size: 1.1rem;
  margin: 0 0 1rem;
  font-weight: 700;
}
.pdf-guide ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
  color: var(--text-1);
}
.pdf-guide ol li {
  margin: 0.5rem 0;
  line-height: 1.7;
  font-size: 14.5px;
}
.pdf-guide ol li strong {
  color: var(--gold-bright);
}
.pdf-guide kbd {
  display: inline-block;
  padding: 2px 8px;
  background: var(--bg-3);
  border: 1px solid var(--gold-deep);
  border-radius: 3px;
  font-family: monospace;
  font-size: 12px;
  color: var(--gold-bright);
  box-shadow: 0 1px 0 var(--bg-0);
}
.pdf-tip {
  margin: 0.8rem 0 1.2rem;
  padding: 0.6rem 0.9rem;
  background: rgba(107,138,114,0.1);
  border-left: 3px solid #6b8a72;
  border-radius: 0 4px 4px 0;
  font-size: 13.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.pdf-tip strong {
  color: var(--paper);
}
.pdf-save-btn {
  width: 100%;
  justify-content: center;
  padding: 0.9rem 1.5rem !important;
  font-size: 15px !important;
  font-weight: 700;
}

/* 플로팅 PDF 버튼 (스크롤 중에도 보임) */
.floating-pdf-btn {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 72px;
  height: 72px;
  background: linear-gradient(135deg, var(--cinnabar), var(--cinnabar-light));
  color: var(--paper);
  border: 2px solid var(--gold);
  border-radius: 50%;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(168,50,30,0.4), 0 0 0 4px rgba(168,50,30,0.1);
  z-index: 100;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
  font-family: var(--font-latin);
  letter-spacing: 0.1em;
}
.floating-pdf-btn:hover {
  transform: translateY(-3px) scale(1.05);
  box-shadow: 0 10px 28px rgba(168,50,30,0.5), 0 0 0 6px rgba(168,50,30,0.15);
}
.floating-pdf-btn svg {
  display: block;
  margin-bottom: 2px;
}
.floating-pdf-btn span {
  font-size: 11px;
  font-weight: 700;
  color: var(--paper);
}

@media (max-width: 600px) {
  .pdf-guide {
    padding: 1.2rem 1rem;
  }
  .pdf-guide h3 {
    font-size: 1rem;
  }
  .pdf-guide ol li {
    font-size: 13.5px;
  }
  .floating-pdf-btn {
    bottom: 1rem;
    right: 1rem;
    width: 60px;
    height: 60px;
  }
  .floating-pdf-btn span {
    font-size: 10px;
  }
}

/* 프린트 시 (PDF 저장 시) 숨기기 */
@media print {
  .floating-pdf-btn,
  .pdf-guide,
  .status-card.success.no-print {
    display: none !important;
  }
}
