/* ============================================================
   BaZi Catcher · Standalone CSS
   ─────────────────────────────────────────────────────────────
   Fully independent. Self-contained variables and fonts.
============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+KR:wght@300;400;500;600;700;800;900&family=Noto+Serif+KR:wght@400;700;900&family=Inter:wght@400;500;600;700;800&family=Ma+Shan+Zheng&display=swap');

:root {
  /* accent(골드)은 유지, 글씨용 회색 변수는 까맣게 retune */
  --sj-brand: #D4A857;        /* 허니골드 accent (border/arrow/fill) */
  --sj-brand-dark: #1a1a1a;   /* 카드 제목·강조 글씨 = 까만색 */
  --sj-brand-light: #E8E2D2;  /* 중성-따뜻 border */
  --sj-brand-pale: #F4F1EA;   /* 차분한 필드/배경 톤 */
  --sj-gold: #C9B589;         /* 가라앉힌 골드 border accent */
  --sj-jade: #9CB3A0;
  --sj-sumi: #2D3748;
  --sj-warm-beige: #F5F1E8;
  --sj-soft-gray: #444444;    /* 보조 텍스트 */
  --sj-soft-coral: #C99A8E;
  --sj-ink: #1a1a1a;          /* 본문 강조 */
  --sj-ink-soft: #1a1a1a;     /* 본문 (까맣게) */
  --sj-muted: #444444;        /* 캡션 (회색 위 회색 금지) */

  /* Five Elements colors (오행) — 데이터 의미색, 유지 */
  --el-wood: #4A7C59;
  --el-fire: #C0392B;
  --el-earth: #A0826D;
  --el-metal: #B8B8B8;
  --el-water: #3D6B95;

  /* Backwards compat */
  --brand: #D4A857;
  --brand-dark: #1a1a1a;
  --brand-light: #E8E2D2;
  --brand-pale: #F4F1EA;
  --ink: #1a1a1a;
  --ink-soft: #1a1a1a;
  --muted: #444444;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Noto Sans KR', 'Inter', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: #1a1a1a;
  background: #EEF0F2;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

.container { max-width: 920px; margin: 0 auto; padding: 32px 24px; }

/* ===== Top Nav ===== */
.tool-nav {
  background: rgba(255,255,255,0.95);
  border-bottom: 1px solid var(--sj-brand-light);
  padding: 14px 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}
.tool-nav .brand-name {
  font-family: 'Noto Serif KR', serif;
  font-weight: 900;
  font-size: 18px;
  color: var(--sj-brand-dark);
  text-decoration: none;
  letter-spacing: -0.5px;
}
.tool-nav .brand-name .accent { color: var(--sj-brand); }

/* ===== Lang Toggle ===== */
.lang-toggle { display: inline-flex; gap: 4px; background: var(--sj-brand-light); padding: 4px; border-radius: 20px; }
.lang-toggle button { border: none; background: transparent; padding: 6px 14px; border-radius: 16px; font-size: 13px; font-weight: 600; color: var(--sj-soft-gray); cursor: pointer; transition: all 0.2s; }
.lang-toggle button.active { background: white; color: var(--sj-brand-dark); box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ===== Hero ===== */
.hero { text-align: center; padding: 56px 24px 36px; }
.hero .symbol { font-size: 56px; margin-bottom: 12px; display: block; }
.hero h1 { font-family: 'Noto Serif KR', serif; font-size: 34px; font-weight: 800; color: var(--sj-brand-dark); margin-bottom: 12px; letter-spacing: -0.5px; line-height: 1.25; }
.hero .subtitle { font-size: 15px; color: var(--sj-soft-gray); font-style: italic; margin-bottom: 20px; line-height: 1.6; }
.hero .meta { display: inline-flex; gap: 8px; flex-wrap: wrap; justify-content: center; font-size: 13px; color: var(--sj-muted); }
.hero .meta span { background: white; padding: 4px 10px; border-radius: 12px; border: 1px solid var(--sj-brand-light); }

/* ===== Cards ===== */
.intro-card { background: white; border-radius: 18px; padding: 32px 28px; margin: 24px 0; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.intro-card h3 { font-size: 18px; color: var(--sj-brand-dark); margin-bottom: 12px; }
.intro-card p { font-size: 17px; color: var(--sj-ink-soft); margin-bottom: 12px; }

.methodology-card { background: linear-gradient(135deg, #FAF7EE 0%, #F4ECD9 100%); border-radius: 18px; padding: 32px 28px; margin: 24px 0; border-left: 4px solid var(--sj-brand); }
.methodology-card h3 { color: var(--sj-brand-dark); font-size: 18px; margin-bottom: 14px; }
.methodology-flow { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0; align-items: center; justify-content: center; }
.flow-step { background: white; padding: 10px 12px; border-radius: 10px; font-size: 12px; min-width: 90px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,0.05); flex: 1; }
.flow-step strong { display: block; color: var(--sj-brand-dark); font-size: 14px; margin-bottom: 2px; }
.flow-step span { font-size: 13px; color: var(--sj-muted); }
.flow-arrow { color: var(--sj-brand); font-weight: 700; font-size: 16px; }

.disclaimer { background: #F4F1EA; border-left: 3px solid var(--sj-gold); padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: 14px; color: var(--sj-ink-soft); }

/* ===== Buttons ===== */
.btn-start { display: block; width: 100%; padding: 16px; background: #D4A857; color: white; border: none; border-radius: 12px; font-size: 16px; font-weight: 700; cursor: pointer; transition: all 0.2s; margin-top: 16px; }
.btn-start:hover { background: #C2963F; transform: translateY(-1px); }
.btn-start:disabled { background: var(--sj-brand-light); color: var(--sj-soft-gray); cursor: not-allowed; }
.btn-secondary { display: block; width: 100%; padding: 12px; background: white; color: var(--sj-brand-dark); border: 1px solid var(--sj-brand-light); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 10px; text-decoration: none; text-align: center; }
.btn-restart { display: block; width: 100%; padding: 12px; background: white; color: var(--sj-brand-dark); border: 1px solid var(--sj-brand-light); border-radius: 10px; font-size: 14px; font-weight: 600; cursor: pointer; margin-top: 16px; }

/* ===== Entry Form ===== */
.entry-form-card { background: #FFFFFF; border-radius: 16px; padding: 24px; margin: 16px 0; box-shadow: 0 4px 16px rgba(0,0,0,0.06); }
/* 입력 폼 헤더(entry 전용) — 차분한 노랑 톤 (intro 화면 .hero는 무영향) */
#screen-entry .hero { background: #F4F1EA; border-radius: 14px; margin-bottom: 4px; }
#screen-entry .hero .subtitle { color: #444444; }
.entry-form-card h2 { font-size: 18px; color: var(--sj-brand-dark); margin-bottom: 8px; }
.entry-form-card .form-subtitle { font-size: 14px; color: var(--sj-soft-gray); margin-bottom: 20px; }

.form-group { margin-bottom: 18px; }
.form-group label { display: block; font-size: 16px; font-weight: 500; color: #1a1a1a; margin-bottom: 6px; }
.form-group label .required { color: #DC2626; margin-left: 2px; }
.form-group input, .form-group select { width: 100%; min-height: 46px; padding: 12px 14px; border: 1.5px solid #E2E5E9; border-radius: 10px; font-size: 16px; line-height: 1.7; color: #1a1a1a; background: #F7F8FA; transition: all 0.15s; font-family: inherit; }
.form-group input:focus, .form-group select:focus { outline: none; border-color: #D4A857; background: white; box-shadow: 0 0 0 3px rgba(212,168,87,0.18); }
.form-group input.invalid { border-color: #FCA5A5; background: #FEF3F2; }
.form-group .helper-text { font-size: 13px; color: var(--sj-muted); margin-top: 4px; }
.form-group .error-text { font-size: 13px; color: #DC2626; margin-top: 4px; display: none; }
.form-group .error-text.show { display: block; }

.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.age-selector { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin-top: 4px; }
.age-option { padding: 10px; background: var(--sj-brand-pale); border: 1.5px solid transparent; border-radius: 8px; font-size: 14px; cursor: pointer; text-align: center; transition: all 0.15s; color: var(--sj-ink-soft); }
.age-option:hover { background: var(--sj-brand-light); }
.age-option.selected { background: white; border-color: var(--sj-brand); color: var(--sj-brand-dark); font-weight: 600; }

.toggle-row { display: flex; gap: 6px; margin-top: 4px; }
.toggle-btn { flex: 1; padding: 10px; background: #F7F8FA; border: 1.5px solid #E2E5E9; border-radius: 8px; font-size: 14px; cursor: pointer; text-align: center; color: #444444; font-weight: 600; }
.toggle-btn.active { background: #F4F1EA; border-color: #C9B589; color: #1a1a1a; }

.consent-block { background: #F7F8FA; border: 1px solid #E2E5E9; padding: 14px 16px; border-radius: 10px; margin: 16px 0; }
.consent-block label { display: flex; gap: 10px; align-items: flex-start; cursor: pointer; font-size: 14px; color: var(--sj-ink-soft); line-height: 1.5; }
.consent-block input[type="checkbox"] { margin-top: 2px; flex-shrink: 0; width: 16px; height: 16px; accent-color: #D4A857; cursor: pointer; }

/* ===== Hour Unknown Card — prominent UX ===== */
.hour-unknown-card {
  margin-top: 14px;
  background: #F4F1EA;
  border: 1.5px solid #C9B589;
  border-radius: 12px;
  padding: 14px 16px;
  transition: all 0.2s;
}
.hour-unknown-card:hover {
  border-color: #D4A857;
  box-shadow: 0 4px 12px rgba(212, 168, 87, 0.15);
}
.hour-unknown-label {
  display: flex !important;
  gap: 12px;
  align-items: flex-start;
  cursor: pointer;
  margin: 0 !important;
  font-weight: 400 !important;
}
.hour-unknown-label input[type="checkbox"] {
  width: 22px !important;
  height: 22px !important;
  flex-shrink: 0;
  accent-color: #D4A857;
  cursor: pointer;
  margin: 0 !important;
  margin-top: 1px !important;
  padding: 0 !important;
}
.hour-unknown-content {
  flex: 1;
}
.hour-unknown-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.hour-unknown-desc {
  font-size: 14px;
  color: #444444;
  line-height: 1.6;
  font-style: italic;
}
/* When checked — visually confirm */
.hour-unknown-card:has(input:checked) {
  background: #EDE7D6;
  border-color: #D4A857;
}
.hour-unknown-card:has(input:checked) .hour-unknown-title::after {
  content: ' ✓';
  color: #6B8E23;
  font-weight: 700;
}

/* ===== Result: 4 Pillars Display ===== */
.pillar-card-wrap {
  background: linear-gradient(135deg, #F5F1E8 0%, #FAF7EE 100%);
  border-radius: 20px;
  padding: 24px 16px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  border: 1px solid var(--sj-gold);
}
.pillar-card-wrap h3 {
  font-family: 'Noto Serif KR', serif;
  text-align: center;
  font-size: 18px;
  color: var(--sj-brand-dark);
  margin-bottom: 4px;
}
.pillar-card-wrap .subtitle {
  text-align: center;
  font-size: 13px;
  color: var(--sj-muted);
  margin-bottom: 18px;
  font-style: italic;
}

.pillars-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.pillar-col {
  background: white;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  border: 1.5px solid var(--sj-brand-light);
  position: relative;
}
.pillar-col.highlighted {
  border-color: var(--sj-gold);
  background: linear-gradient(180deg, #FFF8E7 0%, white 100%);
  box-shadow: 0 2px 8px rgba(201, 169, 97, 0.2);
}
.pillar-col .pillar-label {
  font-size: 13px;
  color: var(--sj-muted);
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.pillar-col .pillar-stem,
.pillar-col .pillar-branch {
  font-family: 'Ma Shan Zheng', 'Noto Serif KR', serif;
  font-size: 32px;
  font-weight: 900;
  line-height: 1.1;
  margin: 4px 0;
}
.pillar-col .stem-info,
.pillar-col .branch-info {
  font-size: 13px;
  color: var(--sj-soft-gray);
  margin-top: -2px;
  margin-bottom: 6px;
}

/* Element-colored stems/branches */
.elem-wood { color: var(--el-wood); }
.elem-fire { color: var(--el-fire); }
.elem-earth { color: var(--el-earth); }
.elem-metal { color: var(--el-metal); }
.elem-water { color: var(--el-water); }

.pillar-col .ten-god {
  font-size: 12px;
  color: var(--sj-brand-dark);
  background: var(--sj-brand-pale);
  padding: 2px 4px;
  border-radius: 4px;
  display: inline-block;
  margin-top: 4px;
}

.day-master-badge {
  display: inline-block;
  background: var(--sj-gold);
  color: white;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 9px;
  font-weight: 700;
  position: absolute;
  top: 4px;
  right: 4px;
}

/* ===== Five Elements Wheel ===== */
.elements-card {
  background: white;
  border-radius: 16px;
  padding: 24px 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.elements-card h3 { font-size: 18px; font-weight: 700; color: var(--sj-brand-dark); margin-bottom: 16px; }

.element-row {
  display: grid;
  grid-template-columns: 80px 1fr 50px;
  gap: 10px;
  align-items: center;
  margin-bottom: 10px;
}
.element-row .name { font-size: 14px; font-weight: 600; color: #1a1a1a; }
.element-row .name .han { font-family: 'Noto Serif KR', serif; font-size: 18px; margin-right: 4px; }
.element-row .bar-track { height: 14px; background: var(--sj-brand-pale); border-radius: 7px; overflow: hidden; }
.element-row .bar-fill { height: 100%; border-radius: 7px; transition: width 1s ease-out; }
.element-row .pct { font-size: 14px; font-weight: 700; color: var(--sj-brand-dark); text-align: right; }

/* ===== Day Master Strength ===== */
.strength-card {
  background: white;
  border-radius: 14px;
  padding: 20px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  border-left: 4px solid var(--sj-jade);
}
.strength-card h4 { font-size: 18px; color: var(--sj-brand-dark); margin-bottom: 8px; }
.strength-card .level { font-size: 22px; font-weight: 800; color: var(--sj-brand-dark); font-family: 'Noto Serif KR', serif; margin-bottom: 6px; }
.strength-card .desc { font-size: 17px; color: var(--sj-ink-soft); margin-bottom: 10px; }
.strength-card .meter { height: 12px; background: var(--sj-brand-pale); border-radius: 6px; overflow: hidden; margin: 10px 0; }
.strength-card .meter-fill { height: 100%; background: linear-gradient(90deg, var(--sj-soft-coral), var(--sj-gold), var(--sj-jade)); border-radius: 6px; transition: width 1s; }
.strength-card .legend { display: flex; justify-content: space-between; font-size: 14px; color: var(--sj-muted); margin-top: 4px; }

/* ===== Mental Wellness Section (메인) ===== */
.wellness-card {
  background: linear-gradient(135deg, #F0F6FB 0%, #DAE8F2 100%);
  border-radius: 16px;
  padding: 24px;
  margin-bottom: 16px;
  border-left: 4px solid var(--sj-brand);
}
.wellness-card h3 { color: var(--sj-brand-dark); font-size: 18px; margin-bottom: 12px; }
.wellness-card .ko-medicine-note {
  background: white;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  color: var(--sj-ink-soft);
  margin-bottom: 16px;
  border-left: 3px solid var(--sj-gold);
}

.qiqing-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
  margin: 16px 0;
}
.qiqing-cell {
  background: white;
  border-radius: 10px;
  padding: 12px 6px;
  text-align: center;
  border: 1.5px solid;
  transition: all 0.2s;
}
.qiqing-cell.elevated { transform: scale(1.05); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.qiqing-cell .han { font-family: 'Noto Serif KR', serif; font-size: 22px; font-weight: 900; }
.qiqing-cell .ko { font-size: 13px; color: var(--sj-ink); margin-top: 2px; font-weight: 600; }
.qiqing-cell .en { font-size: 13px; color: var(--sj-muted); margin-top: 1px; }
.qiqing-cell .pct { font-size: 13px; font-weight: 800; margin-top: 4px; }

.pattern-card {
  background: white;
  border-radius: 12px;
  padding: 16px;
  margin-bottom: 10px;
  border-left: 3px solid var(--sj-brand);
}
.pattern-card.elevated { border-left-color: var(--sj-soft-coral); }
.pattern-card.balanced { border-left-color: var(--sj-jade); }
.pattern-card .pattern-title { font-size: 18px; font-weight: 700; color: var(--sj-brand-dark); margin-bottom: 6px; }
.pattern-card .pattern-desc { font-size: 17px; color: var(--sj-ink-soft); line-height: 1.6; }
.pattern-card .pattern-source { font-size: 13px; color: var(--sj-muted); font-style: italic; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--sj-brand-pale); }

/* ===== Result Hero — 진노랑 그라데 제거, 차분한 톤 + 까만 글씨 ===== */
.result-hero {
  background: #F4F1EA;
  color: #1a1a1a;
  padding: 28px 20px;
  border-radius: 20px;
  text-align: center;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.result-hero .greeting { font-size: 14px; color: #444444; margin-bottom: 6px; }
.result-hero .subtitle-meta { font-size: 13px; color: #444444; margin-top: 8px; font-family: 'Inter', sans-serif; }
.result-hero h2 { font-family: 'Noto Serif KR', serif; font-size: 26px; margin-bottom: 4px; color: #1a1a1a; }

/* ===== Korean-style Additional Analysis Button (빨강 — 기능 구분, 유지) ===== */
.korean-cta-btn {
  display: flex;
  width: 100%;
  padding: 18px 20px;
  background: #FBF6F5;
  color: #1a1a1a;
  border: 1px solid #EAD7D4;
  border-left: 3px solid #B23A2E;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  margin: 16px 0;
  text-align: left;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.korean-cta-btn:hover { background: #F6ECEA; transform: translateY(-1px); }
.korean-cta-btn .left-side { display: flex; align-items: center; gap: 12px; }
.korean-cta-btn .icon { font-size: 24px; }
.korean-cta-btn .text-block { display: flex; flex-direction: column; }
.korean-cta-btn .main-text { font-size: 15px; font-weight: 700; color: #B23A2E; }
.korean-cta-btn .sub-text { font-size: 13px; font-weight: 400; color: #444444; margin-top: 2px; }

/* ===== Expert Mode Button (admin only · 먹색 — 기능 구분, 유지) ===== */
.expert-cta-btn {
  display: flex;
  width: 100%;
  padding: 14px 18px;
  background: #F7F8FA;
  color: #1a1a1a;
  border: 1px solid #E2E5E9;
  border-left: 3px solid #2D3748;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  margin: 12px 0;
  text-align: left;
  justify-content: space-between;
  align-items: center;
  transition: all 0.2s;
}
.expert-cta-btn:hover { background: #EEF0F2; }
.expert-cta-btn .left-side { display: flex; align-items: center; gap: 10px; }
.expert-cta-btn .icon { font-size: 20px; }
.expert-cta-btn .main-text { font-size: 14px; color: #1a1a1a; }
.expert-cta-btn .sub-text { font-size: 14px; color: #444444; margin-top: 1px; }

/* ===== PDF / Crisis / CTA ===== */
.btn-pdf { display: block; width: 100%; padding: 14px; background: white; color: var(--sj-brand-dark); border: 2px solid var(--sj-brand); border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; margin: 12px 0; transition: all 0.2s; }
.btn-pdf:hover { background: var(--sj-brand); color: white; }

.cta-section { background: #EDF1F4; color: #1a1a1a; padding: 24px; border-radius: 16px; border-left: 3px solid #3D6B95; text-align: center; margin: 20px 0; box-shadow: 0 4px 16px rgba(0,0,0,.06); }
.cta-section h3 { font-size: 18px; margin-bottom: 8px; color: #1a1a1a; }
.cta-section p { font-size: 15px; color: #333333; margin-bottom: 14px; }
.cta-section a { display: inline-block; padding: 12px 24px; background: #3D6B95; color: white; border-radius: 10px; font-weight: 700; font-size: 14px; text-decoration: none; transition: background 0.2s; }
.cta-section a:hover { background: #325878; }

.crisis-notice { background: #FEF3F2; border-left: 3px solid #F87171; padding: 12px 14px; border-radius: 8px; margin: 16px 0; font-size: 14px; color: var(--sj-ink-soft); }
.crisis-notice strong { color: #B91C1C; }

.trait-list { list-style: none; padding: 0; margin: 0; }
.trait-list li { padding: 8px 0; border-bottom: 1px solid var(--sj-brand-pale); font-size: 15px; color: var(--sj-ink-soft); padding-left: 20px; position: relative; }
.trait-list li:last-child { border-bottom: none; }
.trait-list li::before { content: '◆'; color: var(--sj-brand); position: absolute; left: 0; font-size: 10px; top: 12px; }

/* Screen visibility */
.screen { display: none; }
.screen.active { display: block; }

@media (max-width: 480px) {
  .hero h1 { font-size: 22px; }
  .pillar-col .pillar-stem, .pillar-col .pillar-branch { font-size: 26px; }
  .qiqing-cell .han { font-size: 18px; }
  .form-row { grid-template-columns: 1fr 1fr; }
}

/* ============================================================
   Deep Interpretation Cards (일주/격국/용신/칠정 풀 콘텐츠)
============================================================ */

.deep-interp-card {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F1E8 100%);
  border-radius: 20px;
  padding: 28px 24px;
  margin-bottom: 16px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
  border: 1px solid var(--sj-gold);
}

/* Day Master / Pattern Header */
.day-master-header,
.pattern-deep-header {
  display: flex;
  gap: 18px;
  align-items: center;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 2px solid var(--sj-brand-light);
}

.day-master-han,
.pattern-deep-han {
  font-family: 'Ma Shan Zheng', 'Noto Serif KR', serif;
  font-size: 84px;
  font-weight: 900;
  line-height: 1;
  flex-shrink: 0;
  text-align: center;
  width: 100px;
}

.pattern-deep-han {
  font-size: 64px;
  width: auto;
  color: var(--sj-brand-dark);
  padding: 0 16px;
}

.day-master-info,
.pattern-deep-info {
  flex: 1;
}

.day-master-title,
.pattern-deep-title {
  font-family: 'Noto Serif KR', serif;
  font-size: 22px;
  color: var(--sj-brand-dark);
  margin-bottom: 6px;
  font-weight: 800;
}

.day-master-archetype,
.pattern-deep-archetype {
  font-size: 15px;
  color: #9a7d3c;
  font-weight: 700;
  margin-bottom: 6px;
  font-style: italic;
}

.day-master-meta,
.pattern-deep-meta {
  font-size: 13px;
  color: var(--sj-muted);
  font-style: italic;
}

/* DM/Pattern Sections */
.dm-section {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  border-left: 3px solid var(--sj-brand);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.dm-section-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--sj-brand-dark);
  margin-bottom: 8px;
}

.dm-section-text {
  font-size: 17px;
  color: var(--sj-ink-soft);
  line-height: 1.75;
}

.dm-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

@media (max-width: 600px) {
  .dm-grid-2 { grid-template-columns: 1fr; }
  .day-master-han { font-size: 64px; width: 80px; }
  .pattern-deep-han { font-size: 48px; }
  .day-master-title, .pattern-deep-title { font-size: 18px; }
}

.dm-strengths { border-left-color: var(--sj-jade); }
.dm-challenges { border-left-color: var(--sj-soft-coral); }
.dm-wellness { border-left-color: var(--el-water); background: #F0F6FB; }
.dm-growth {
  border-left-color: var(--sj-gold);
  background: linear-gradient(135deg, #FFF8E7 0%, white 100%);
}

/* Classical Quote */
.dm-classic {
  background: linear-gradient(135deg, var(--sj-warm-beige) 0%, #FAF7EE 100%);
  padding: 18px 22px;
  border-radius: 12px;
  margin-top: 16px;
  border: 1px dashed var(--sj-gold);
  text-align: center;
}

.dm-classic-han {
  font-family: 'Noto Serif KR', serif;
  font-size: 14px;
  color: #9a7d3c;
  margin-bottom: 8px;
  letter-spacing: 0.5px;
  font-weight: 700;
}

.dm-classic-text {
  font-size: 16px;
  color: var(--sj-ink-soft);
  font-style: italic;
  line-height: 1.7;
}

/* Wellness Deep Cards (한의학 풀 콘텐츠) */
.wellness-deep-card {
  background: white;
  border-radius: 12px;
  padding: 18px 20px;
  margin-bottom: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}

.wellness-deep-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sj-brand-pale);
  flex-wrap: wrap;
  gap: 6px;
}

.wellness-deep-title {
  font-family: 'Noto Serif KR', serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--sj-brand-dark);
}

.wellness-deep-level {
  font-size: 11px;
  font-weight: 700;
  color: white;
  padding: 3px 10px;
  border-radius: 12px;
  letter-spacing: 0.5px;
}

.wellness-deep-section {
  font-size: 15px;
  font-weight: 700;
  color: var(--sj-ink);
  margin-top: 12px;
  margin-bottom: 5px;
}

.wellness-deep-text {
  font-size: 17px;
  color: var(--sj-ink-soft);
  line-height: 1.7;
}

.wellness-deep-citation {
  font-size: 13px;
  color: var(--sj-muted);
  font-style: italic;
  margin-top: 12px;
  padding-top: 8px;
  border-top: 1px dashed var(--sj-brand-light);
}

/* ============================================================
   Wellness Comprehensive Display (Mental Wellness 핵심 강화)
   A) Headline B) HBar Chart C) Cells D) Impression E) Action F) Risk
============================================================ */

/* Master Header */
.wellness-master-header {
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--sj-brand-light);
}
.wellness-master-header h3 {
  font-family: 'Noto Serif KR', serif;
  font-size: 20px;
  color: var(--sj-brand-dark);
  margin-bottom: 6px;
  font-weight: 800;
}
.wellness-master-subtitle {
  font-size: 14px;
  color: var(--sj-muted);
  font-style: italic;
  margin: 0;
}

/* (A) Headline Box */
.wellness-headline-box {
  background: linear-gradient(135deg, #FFF8E7 0%, #FAF7EE 100%);
  border-radius: 14px;
  padding: 18px;
  margin: 16px 0;
  border: 2px solid var(--sj-gold);
  position: relative;
  overflow: hidden;
}
.wellness-headline-box.high-risk {
  background: linear-gradient(135deg, #FEF3F2 0%, #FFE5E0 100%);
  border-color: var(--sj-soft-coral);
}
.wellness-headline-box.moderate-risk {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE9C2 100%);
  border-color: var(--sj-gold);
}
.wellness-headline-box.balanced-state {
  background: linear-gradient(135deg, #F0FAF1 0%, #E8F5E9 100%);
  border-color: var(--sj-jade);
  display: flex;
  align-items: center;
  gap: 16px;
}
.wellness-headline-box.balanced-state .wellness-headline-icon {
  font-size: 36px;
}
.wellness-headline-box.balanced-state .wellness-headline-content h4 {
  margin: 0 0 4px 0;
  color: #2f6e4f;
  font-size: 17px;
  font-weight: 800;
}
.wellness-headline-box.balanced-state .wellness-headline-content p {
  margin: 0;
  color: var(--sj-ink-soft);
  font-size: 15px;
}

.wellness-headline-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.wellness-headline-title .headline-icon { font-size: 22px; }
.wellness-headline-title h4 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  color: var(--sj-ink);
}

.wellness-issue-chips {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.wellness-issue-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 2px solid;
}
.chip-han {
  font-family: 'Ma Shan Zheng', 'Noto Serif KR', serif;
  font-size: 36px;
  font-weight: 900;
  flex-shrink: 0;
  line-height: 1;
}
.chip-info { flex: 1; }
.chip-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--sj-ink);
}
.chip-level {
  font-size: 14px;
  font-weight: 700;
  margin-top: 2px;
}
.wellness-headline-meta {
  font-size: 13px;
  color: var(--sj-muted);
  font-style: italic;
  text-align: center;
  padding-top: 10px;
  border-top: 1px dashed var(--sj-brand-light);
}

@media (max-width: 600px) {
  .wellness-issue-chips { grid-template-columns: 1fr; }
}

/* (B) Horizontal Bar Chart */
.hbar-container {
  background: white;
  border-radius: 12px;
  padding: 16px 18px;
  margin: 16px 0;
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.hbar-axis {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  color: var(--sj-muted);
  margin-bottom: 8px;
  padding-left: 90px;
  padding-right: 70px;
}
.hbar-row {
  display: grid;
  grid-template-columns: 90px 1fr 70px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.hbar-label {
  display: flex;
  align-items: center;
  gap: 6px;
}
.hbar-han {
  font-family: 'Ma Shan Zheng', 'Noto Serif KR', serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1;
}
.hbar-text {
  font-size: 14px;
  color: var(--sj-ink);
  font-weight: 600;
  line-height: 1.3;
}
.hbar-text small { color: var(--sj-muted); font-size: 13px; }
.hbar-track {
  position: relative;
  height: 28px;
  background: #F5F1E8;
  border-radius: 6px;
  overflow: visible;
}
.hbar-equilibrium-zone {
  position: absolute;
  left: 30%;
  width: 30%;
  top: 0;
  bottom: 0;
  background: rgba(127, 176, 105, 0.15);
  border-left: 2px dashed var(--sj-jade);
  border-right: 2px dashed var(--sj-jade);
  z-index: 0;
}
.hbar-fill {
  position: relative;
  height: 100%;
  border-radius: 6px;
  transition: width 0.6s ease;
  z-index: 1;
}
.hbar-pct-label {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 14px;
  font-weight: 700;
  color: var(--sj-ink);
  z-index: 2;
}
.hbar-badge {
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  padding: 4px 6px;
  border-radius: 10px;
  background: #F5F1E8;
  color: var(--sj-ink-soft);
}
.hbar-badge.severe-badge.elevated { background: var(--sj-soft-coral); color: white; }
.hbar-badge.moderate-badge.elevated { background: #FFB088; color: white; }
.hbar-badge.severe-badge.deficient { background: var(--sj-brand); color: white; }
.hbar-badge.moderate-badge.deficient { background: #88B0D8; color: white; }
.hbar-badge.normal-badge { background: var(--sj-jade); color: white; }
.hbar-badge.mild-badge { background: var(--sj-gold); color: white; }
.hbar-legend {
  font-size: 13px;
  color: var(--sj-muted);
  font-style: italic;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed var(--sj-brand-pale);
  text-align: center;
}

@media (max-width: 600px) {
  .hbar-row { grid-template-columns: 70px 1fr 60px; }
  .hbar-han { font-size: 22px; }
  .hbar-axis { padding-left: 70px; padding-right: 60px; }
  .hbar-text { font-size: 13px; }
}

/* Cell elevated/deficient enhancements */
.qiqing-cell.elevated {
  background: linear-gradient(135deg, #FEF3F2, #FEE2E2);
  transform: scale(1.05);
  box-shadow: 0 4px 12px rgba(231, 111, 81, 0.25);
}
.qiqing-cell.deficient {
  background: linear-gradient(135deg, #F0F6FB, #DAE8F2);
  box-shadow: 0 4px 12px rgba(91, 141, 191, 0.25);
}

/* (D) Clinical Impression */
.clinical-impression-box {
  background: white;
  border-radius: 14px;
  padding: 20px 22px;
  margin: 16px 0;
  border: 1px solid var(--sj-brand-pale);
  box-shadow: 0 4px 16px rgba(0,0,0,.06);
}
.clinical-impression-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--sj-brand-pale);
}
.clinical-impression-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--sj-brand-dark);
  font-weight: 800;
}
.clinical-impression-text {
  font-size: 17px;
  line-height: 1.85;
  color: var(--sj-ink-soft);
  margin: 0 0 10px 0;
}
.clinical-impression-text strong {
  font-weight: 800;
}
.clinical-impression-source {
  font-size: 13px;
  color: var(--sj-muted);
  font-style: italic;
  padding-top: 10px;
  border-top: 1px dashed var(--sj-brand-pale);
}

/* (E) Action Plan */
.action-plan-box {
  background: linear-gradient(135deg, #FFF8E7 0%, white 100%);
  border-radius: 14px;
  padding: 20px;
  margin: 16px 0;
  border: 2px solid var(--sj-gold);
}
.action-plan-header {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}
.action-plan-header h4 {
  margin: 0;
  font-size: 18px;
  color: var(--sj-brand-dark);
  font-weight: 800;
}
.action-cards {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.action-card {
  display: grid;
  grid-template-columns: 36px 44px 1fr;
  gap: 14px;
  align-items: center;
  background: white;
  padding: 14px 16px;
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.04);
}
.action-rank {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  color: white;
  font-weight: 900;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}
.action-icon {
  font-size: 32px;
  text-align: center;
}
.action-body { flex: 1; }
.action-title {
  margin: 0 0 4px 0;
  font-size: 16px;
  font-weight: 800;
  color: var(--sj-ink);
}
.action-desc {
  margin: 0;
  font-size: 17px;
  color: var(--sj-ink-soft);
  line-height: 1.65;
}

@media (max-width: 600px) {
  .action-card { grid-template-columns: 32px 1fr; }
  .action-icon { display: none; }
}

/* (F) Risk Panel */
.risk-panel-box {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 16px 18px;
  border-radius: 12px;
  margin: 16px 0;
}
.risk-panel-box.high-risk {
  background: linear-gradient(135deg, #FEF3F2 0%, #FFE5E0 100%);
  border: 2px solid var(--sj-soft-coral);
}
.risk-panel-box.moderate-risk {
  background: linear-gradient(135deg, #FFF8E7 0%, #FFE9C2 100%);
  border: 2px solid var(--sj-gold);
}
.risk-icon {
  font-size: 32px;
  flex-shrink: 0;
  line-height: 1;
}
.risk-content { flex: 1; }
.risk-content h5 {
  margin: 0 0 6px 0;
  font-size: 16px;
  font-weight: 800;
}
.risk-panel-box.high-risk .risk-content h5 { color: #B23A2E; }
.risk-panel-box.moderate-risk .risk-content h5 { color: #8A6300; }
.risk-content p {
  margin: 0;
  font-size: 16px;
  color: var(--sj-ink-soft);
  line-height: 1.7;
}
