/* =========================================================
   보라뚜비사주 — 모바일 퍼스트 스타일
   ========================================================= */
:root {
  --bg: #faf7f2;
  --surface: #ffffff;
  --surface-2: #f3eee6;
  --ink: #1d1b1a;
  --ink-2: #4a4542;
  --muted: #8a827b;
  --line: #e9e2d8;
  --seal: #6d4fd6;          /* 브랜드 보라 */
  --seal-soft: #f1ecff;
  --navy: #1f2a44;

  /* 오행 */
  --wood: #2f8f4e;  --wood-bg: #e7f4ec;
  --fire: #d6402b;  --fire-bg: #fcebe7;
  --earth: #c08a1e; --earth-bg: #faf1dc;
  --metal: #7b8794; --metal-bg: #eef1f4;
  --water: #24407a; --water-bg: #e6ecf7;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(29, 27, 26, .04), 0 6px 20px rgba(29, 27, 26, .06);
  --tabbar-h: 64px;
  --max: 720px;

  --font: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  --serif: "Gowun Batang", "Noto Serif KR", "Batang", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  letter-spacing: -0.01em;
  word-break: keep-all;
  padding-bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
.serif { font-family: var(--serif); }
.container { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(250, 247, 242, .88);
  backdrop-filter: saturate(160%) blur(12px);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.site-header .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.logo { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 18px; }
.logo-seal {
  width: 28px; height: 28px; border-radius: 7px;
  background: var(--seal); color: #fff;
  display: grid; place-items: center;
  font-family: var(--serif); font-size: 17px; font-weight: 700;
  box-shadow: inset 0 0 0 2px rgba(255,255,255,.25);
}
.nav-desktop { display: none; gap: 4px; }
.nav-desktop a { padding: 8px 12px; border-radius: 999px; font-size: 15px; color: var(--ink-2); font-weight: 500; }
.nav-desktop a:hover, .nav-desktop a[aria-current="page"] { background: var(--surface-2); color: var(--ink); }

/* ---------- Bottom tab bar (mobile) ---------- */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 60;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(255,255,255,.96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, 1fr);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  font-size: 11px; font-weight: 600; color: var(--muted);
}
.tabbar svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.tabbar a[aria-current="page"] { color: var(--ink); }
.tabbar a[aria-current="page"] svg { stroke: var(--seal); }

@media (min-width: 860px) {
  body { padding-bottom: 0; }
  .tabbar { display: none; }
  .nav-desktop { display: flex; }
}

/* ---------- Hero ---------- */
.hero { padding: 28px 0 8px; text-align: center; }
.hero-badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--seal-soft); color: var(--seal);
  font-size: 13px; font-weight: 700;
}
.hero h1 { font-family: var(--serif); font-size: clamp(28px, 7.4vw, 42px); font-weight: 700; margin: 14px 0 10px; }
.hero h1 em { font-style: normal; color: var(--seal); }
.hero p { color: var(--ink-2); font-size: 15px; }

/* ---------- Card ---------- */
.card {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 14px; }
.section { margin: 28px 0; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 12px; }
.section-head h2 { font-size: 19px; font-weight: 800; }
.section-head a { font-size: 14px; color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--seal); text-transform: uppercase; }

/* ---------- Form ---------- */
.saju-form { margin-top: 20px; text-align: left; }
.field { margin-bottom: 16px; }
.field > label, .field-label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 8px; color: var(--ink-2); }
.input, .select {
  width: 100%; height: 50px; padding: 0 14px;
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  background: #fff; font-size: 16px; /* 16px 미만이면 iOS 자동 확대 */
  appearance: none; -webkit-appearance: none;
  transition: border-color .15s, box-shadow .15s;
}
.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'%3E%3Cpath d='M1 1.5l5 5 5-5' stroke='%238a827b' stroke-width='1.8' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; padding-right: 34px;
}
.input:focus, .select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(29,27,26,.08); }
.row { display: grid; gap: 8px; }
.row-3 { grid-template-columns: 1.3fr 1fr 1fr; }
.row-2 { grid-template-columns: 1fr 1fr; }

.segmented { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--surface-2); padding: 4px; border-radius: 12px; gap: 4px; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented label { height: 44px; display: grid; place-items: center; border-radius: 9px; font-weight: 600; font-size: 15px; color: var(--muted); cursor: pointer; transition: all .15s; }
.segmented input:checked + label { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.segmented input:focus-visible + label { outline: 2px solid var(--ink); }

.check { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-2); margin-top: 10px; cursor: pointer; user-select: none; }
.check input { width: 20px; height: 20px; accent-color: var(--seal); }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 54px; padding: 0 22px; border-radius: 14px; border: 0;
  font-size: 17px; font-weight: 700; cursor: pointer;
  transition: transform .08s, background .15s;
}
.btn:active { transform: scale(.98); }
.btn-primary { width: 100%; background: var(--ink); color: #fff; }
.btn-primary:hover { background: #000; }
.btn-seal { background: var(--seal); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink); }
.btn-sm { height: 44px; font-size: 15px; border-radius: 11px; padding: 0 16px; }
.trust { display: flex; justify-content: center; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.trust span::before { content: "✓ "; color: var(--wood); font-weight: 700; }

/* ---------- Menu grid ---------- */
.menu-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.menu-item {
  position: relative; display: flex; flex-direction: column; justify-content: space-between;
  min-height: 118px; padding: 16px; border-radius: var(--radius);
  background: var(--surface); box-shadow: var(--shadow);
  transition: transform .15s;
}
.menu-item:active { transform: scale(.98); }
.menu-item .mi-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.menu-item strong { font-size: 16px; display: block; margin-top: 10px; }
.menu-item small { color: var(--muted); font-size: 13px; }
.menu-item .tag { position: absolute; top: 14px; right: 14px; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; background: var(--seal); color: #fff; }
.menu-item .tag.soon { background: var(--surface-2); color: var(--muted); }
.menu-item.wide { grid-column: span 2; flex-direction: row; align-items: center; min-height: 0; gap: 14px; }
.menu-item.wide strong { margin-top: 0; }
@media (min-width: 640px) { .menu-grid { grid-template-columns: repeat(4, 1fr); } .menu-item.wide { grid-column: span 4; } }

/* 2027 시즌 배너 */
.season {
  display: flex; align-items: center; gap: 16px;
  padding: 20px; border-radius: var(--radius);
  background: linear-gradient(135deg, #2a1712 0%, #5a1f14 55%, #a3321d 100%);
  color: #fff; overflow: hidden; position: relative;
}
.season::after {
  content: "丁未"; position: absolute; right: -6px; bottom: -22px;
  font-family: var(--serif); font-size: 92px; font-weight: 700; opacity: .12; letter-spacing: -4px;
}
.season .s-text { position: relative; z-index: 1; }
.season small { opacity: .75; font-size: 13px; }
.season strong { display: block; font-size: 19px; margin: 2px 0 8px; font-family: var(--serif); }
.season .btn { height: 38px; font-size: 14px; background: #fff; color: #5a1f14; }

/* ---------- Today list ---------- */
.zodiac-strip { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.zodiac-chip { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 0; border-radius: 12px; background: var(--surface); box-shadow: var(--shadow); font-size: 12px; font-weight: 600; }
.zodiac-chip .z-emoji { font-size: 24px; line-height: 1; }
.zodiac-chip .z-score { font-size: 11px; color: var(--seal); letter-spacing: 1px; }

.fortune-item { border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); margin-bottom: 10px; overflow: hidden; scroll-margin-top: 70px; }
.fortune-item summary { list-style: none; display: flex; align-items: center; gap: 12px; padding: 14px 16px; cursor: pointer; }
.fortune-item summary::-webkit-details-marker { display: none; }
.fortune-item .z-emoji { font-size: 30px; width: 44px; height: 44px; display: grid; place-items: center; background: var(--surface-2); border-radius: 12px; }
.fortune-item .f-title { flex: 1; min-width: 0; }
.fortune-item .f-title strong { display: block; font-size: 16px; }
.fortune-item .f-title small { color: var(--muted); font-size: 12.5px; }
.stars { color: var(--seal); letter-spacing: 1px; font-size: 14px; white-space: nowrap; }
.stars .off { color: var(--line); }
.fortune-item .f-body { padding: 0 16px 18px; border-top: 1px dashed var(--line); padding-top: 14px; }
.f-body p { color: var(--ink-2); font-size: 15px; }
.f-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.f-meta div { background: var(--surface-2); border-radius: 10px; padding: 8px; text-align: center; }
.f-meta small { display: block; font-size: 11px; color: var(--muted); }
.f-meta b { font-size: 14px; }
.f-rows { margin-top: 12px; display: grid; gap: 6px; }
.f-rows div { display: flex; gap: 10px; font-size: 14px; }
.f-rows dt { font-weight: 700; flex: 0 0 38px; color: var(--ink); }
.f-rows dd { margin: 0; color: var(--ink-2); }

/* ---------- Article list ---------- */
.article-list { display: grid; gap: 10px; }
.article-card { display: flex; gap: 14px; align-items: center; padding: 14px; background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); }
.article-card .thumb { flex: 0 0 64px; height: 64px; border-radius: 12px; display: grid; place-items: center; font-family: var(--serif); font-size: 26px; font-weight: 700; }
.article-card strong { font-size: 15.5px; display: block; line-height: 1.4; }
.article-card small { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }

/* ---------- Result ---------- */
.result-hero { text-align: center; padding: 26px 20px; }
.result-hero .who { font-size: 14px; color: var(--muted); }
.result-hero .dm-char {
  width: 88px; height: 88px; margin: 14px auto 12px; border-radius: 24px;
  display: grid; place-items: center; font-family: var(--serif); font-size: 50px; font-weight: 700;
}
.result-hero h1 { font-family: var(--serif); font-size: 24px; }
.result-hero h1 em { font-style: normal; }
.tags { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; margin-top: 12px; }
.tags span { font-size: 13px; padding: 4px 10px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); font-weight: 600; }
.result-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; text-align: center; }
.pillar-head { font-size: 12px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.pillar-god { font-size: 11.5px; color: var(--ink-2); font-weight: 600; min-height: 18px; }
.glyph {
  aspect-ratio: 1 / 1; border-radius: 14px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--serif); font-size: clamp(30px, 9vw, 40px); font-weight: 700; line-height: 1;
}
.glyph small { font-family: var(--font); font-size: 11px; font-weight: 600; margin-top: 5px; opacity: .85; }
.glyph.empty { background: var(--surface-2); color: var(--muted); font-size: 22px; }
.glyph.is-day { box-shadow: inset 0 0 0 2px currentColor; }
.el-wood  { background: var(--wood-bg);  color: var(--wood); }
.el-fire  { background: var(--fire-bg);  color: var(--fire); }
.el-earth { background: var(--earth-bg); color: var(--earth); }
.el-metal { background: var(--metal-bg); color: var(--metal); }
.el-water { background: var(--water-bg); color: var(--water); }
.pillar-note { font-size: 12.5px; color: var(--muted); margin-top: 12px; text-align: center; }

.bars { display: grid; gap: 10px; }
.bar { display: grid; grid-template-columns: 48px 1fr 34px; align-items: center; gap: 10px; font-size: 14px; }
.bar .label { font-weight: 700; display: flex; align-items: center; gap: 6px; }
.bar .label i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.bar .track { display: block; height: 12px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar .fill { display: block; height: 100%; border-radius: 999px; width: 0; transition: width .9s cubic-bezier(.2,.8,.2,1); }
.bar .num { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

.prose h2 { font-size: 19px; font-weight: 800; margin: 0 0 10px; }
.prose h3 { font-size: 16px; font-weight: 800; margin: 18px 0 6px; }
.prose p { color: var(--ink-2); margin-bottom: 10px; }
.prose p:last-child { margin-bottom: 0; }
.prose ul { padding-left: 20px; color: var(--ink-2); margin: 6px 0 10px; }
.prose li { margin-bottom: 4px; }
.pill { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 999px; margin-right: 4px; }

.callout { padding: 14px 16px; border-radius: 12px; background: var(--surface-2); font-size: 14.5px; color: var(--ink-2); }
.callout b { color: var(--ink); }
.score-ring { display: flex; align-items: center; gap: 14px; margin-bottom: 12px; }
.score-ring .num { font-family: var(--serif); font-size: 40px; font-weight: 700; color: var(--seal); line-height: 1; }
.score-ring small { color: var(--muted); font-size: 13px; }

/* ---------- Ad slot ---------- */
.ad-slot {
  min-height: 250px; margin: 22px 0; border-radius: 12px;
  border: 1px dashed #d8cfc2; background: repeating-linear-gradient(45deg, #f6f1ea, #f6f1ea 10px, #f3ede5 10px, #f3ede5 20px);
  display: grid; place-items: center; color: #b3a99c; font-size: 12px; letter-spacing: .1em;
}
.ad-slot.ad-banner { min-height: 100px; }
/* 승인 전 배포 시: body.ads-off .ad-slot { display:none } */
body.ads-off .ad-slot { display: none; }

/* ---------- Article page ---------- */
.article-head { padding: 24px 0 8px; }
.article-head h1 { font-family: var(--serif); font-size: clamp(26px, 6.6vw, 36px); margin: 8px 0 12px; }
.article-head .meta { font-size: 13px; color: var(--muted); }
.article-body { font-size: 17px; line-height: 1.85; }
.article-body h2 { font-size: 21px; margin: 36px 0 12px; font-weight: 800; }
.article-body h3 { font-size: 18px; margin: 24px 0 8px; font-weight: 800; }
.article-body p { margin-bottom: 16px; color: #2f2b29; }
.article-body ul, .article-body ol { padding-left: 22px; margin-bottom: 16px; }
.article-body li { margin-bottom: 6px; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 15px; margin: 8px 0 20px; background: #fff; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); }
.article-body th, .article-body td { padding: 10px 8px; border-bottom: 1px solid var(--line); text-align: center; }
.article-body th { background: var(--surface-2); font-weight: 700; }
.article-body blockquote { margin: 20px 0; padding: 14px 18px; border-left: 4px solid var(--seal); background: var(--seal-soft); border-radius: 0 12px 12px 0; color: var(--ink-2); }
.toc { background: var(--surface); border-radius: 12px; padding: 14px 18px; box-shadow: var(--shadow); margin: 18px 0 24px; font-size: 15px; }
.toc ol { margin: 6px 0 0; padding-left: 20px; }
.toc a { color: var(--ink-2); }
.breadcrumb { font-size: 13px; color: var(--muted); padding-top: 16px; }
.breadcrumb a:hover { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { margin-top: 48px; padding: 28px 0 32px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-bottom: 12px; }
.site-footer nav a { color: var(--ink-2); font-weight: 600; }
.site-footer .disclaimer { margin-top: 8px; font-size: 12px; }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 20px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px);
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 999px; font-size: 14px; font-weight: 600;
  opacity: 0; pointer-events: none; transition: all .25s; z-index: 100;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.fade-in { animation: fadeIn .5s ease both; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* ---------- 계산 기준 / 결과 하단 ---------- */
.basis { margin-top: 14px; font-size: 13.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 12px; padding: 0 14px; }
.basis summary { cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none; display: flex; justify-content: space-between; }
.basis summary::-webkit-details-marker { display: none; }
.basis summary::after { content: "＋"; color: var(--muted); }
.basis[open] summary::after { content: "−"; }
.basis ul { margin: 0; padding: 0 0 12px 18px; }
.basis li { margin-bottom: 4px; }
.result-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 8px 0 14px; }
.result-foot .btn { font-size: 14px; padding: 0 10px; }
.select:disabled, .input:disabled { background: var(--surface-2); color: var(--muted); }
/* 오늘운세 펼침 아이콘 */
.fortune-item summary::after { content: ""; width: 8px; height: 8px; border-right: 2px solid var(--muted); border-bottom: 2px solid var(--muted); transform: rotate(45deg); margin: 0 4px 4px 2px; transition: transform .2s; flex: none; }
.fortune-item[open] summary::after { transform: rotate(-135deg); margin-bottom: -4px; }
/* 터치 영역 44px 확보 */
.check { min-height: 44px; margin-top: 2px; }
.section-head a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 2px 0 12px; }
.site-footer nav a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer nav { gap: 0 16px; }

/* ---------- 종합 분석 ---------- */
.summary-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 16px; }
.summary-row div { background: var(--surface-2); border-radius: 12px; padding: 10px 4px; }
.summary-row small { display: block; font-size: 11.5px; color: var(--muted); }
.summary-row b { font-size: 14.5px; }
.rel-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 14px; }
.rel-chip { font-size: 12.5px; font-weight: 700; padding: 4px 10px; border-radius: 999px; }
.rel-chip.pos { background: var(--wood-bg); color: var(--wood); }
.rel-chip.neg { background: var(--fire-bg); color: var(--fire); }
.pos-t { color: var(--wood); }
.neg-t { color: var(--fire); }
.muted { color: var(--muted); font-size: 13px; }
.callout.warn { background: var(--seal-soft); margin-top: 12px; }
.prose .callout { margin: 12px 0; }
.card > .callout { margin-top: 14px; }

.gauge { position: relative; height: 10px; border-radius: 999px; margin: 8px 0 6px;
  background: linear-gradient(90deg, #9bb4e0 0%, #c9d7ee 30%, #e9e2d8 50%, #f2c3b6 70%, #e0806a 100%); }
.g-mark { position: absolute; top: 50%; width: 20px; height: 20px; border-radius: 50%; background: #fff; border: 3px solid var(--ink); transform: translate(-50%, -50%); box-shadow: var(--shadow); }
.gauge-labels { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-bottom: 10px; }
.yong-row { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.yong-row .pill { font-size: 13px; padding: 5px 11px; margin: 0; }
.tips { list-style: none; padding: 12px 14px !important; background: var(--surface-2); border-radius: 12px; font-size: 14.5px; }
.tips li { margin-bottom: 4px; }
.rel-list { padding-left: 18px !important; }
.rel-list li { margin-bottom: 8px; font-size: 14.5px; }
.prose .bars { margin-top: 8px; }

/* ---------- 대운 ---------- */
.dw-scroll { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x proximity; -webkit-overflow-scrolling: touch; scrollbar-width: thin; }
.dw-card { position: relative; flex: 0 0 64px; scroll-snap-align: center; display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 10px 0 8px; border: 1.5px solid var(--line); border-radius: 14px; background: #fff; cursor: pointer; }
.dw-card.is-cur { border-color: var(--seal); box-shadow: 0 0 0 3px var(--seal-soft); }
.dw-age { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.dw-g { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; font-family: var(--serif); font-size: 20px; font-weight: 700; }
.dw-bar { width: 8px; height: 48px; background: var(--surface-2); border-radius: 99px; display: flex; align-items: flex-end; overflow: hidden; margin-top: 4px; }
.dw-bar span { width: 100%; background: var(--seal); border-radius: 99px; }
.dw-score { font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.dw-now { position: absolute; top: -9px; font-size: 10px; font-weight: 800; background: var(--seal); color: #fff; padding: 1px 7px; border-radius: 99px; }
.dw-list { margin-top: 12px; display: grid; gap: 8px; }
.dw-detail { border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; background: #fff; }
.dw-detail summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 52px; font-size: 14.5px; }
.dw-detail summary::-webkit-details-marker { display: none; }
.dw-detail summary small { color: var(--muted); font-size: 12px; margin-left: 4px; }
.dw-detail .prose { padding: 4px 0 14px; border-top: 1px dashed var(--line); padding-top: 12px; }
.dw-detail .prose p { font-size: 15px; }
.tag-god { background: var(--surface-2); color: var(--ink-2); }
.grade { flex: none; font-size: 12px; font-weight: 800; padding: 4px 9px; border-radius: 99px; white-space: nowrap; }
.g5 { background: #e3f3e8; color: #23733f; } .g4 { background: #eef6e6; color: #4d7a1f; } .g3 { background: var(--surface-2); color: var(--ink-2); }
.g2 { background: #fdf0e1; color: #a5600f; } .g1 { background: var(--fire-bg); color: var(--fire); }

/* ---------- 연도별 ---------- */
.yr-list { display: grid; gap: 6px; }
.yr-row { display: grid; grid-template-columns: 44px 40px 1fr 30px; align-items: center; gap: 8px; font-size: 14px; padding: 6px 8px; border-radius: 10px; }
.yr-row.is-cur { background: var(--seal-soft); }
.yr-y { font-weight: 700; font-variant-numeric: tabular-nums; }
.yr-p { font-family: var(--serif); color: var(--ink-2); }
.yr-s { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.mini-track { display: block; height: 10px; background: var(--surface-2); border-radius: 99px; overflow: hidden; }
.mini-track span { display: block; height: 100%; border-radius: 99px; background: var(--muted); }
.mini-track.g5 span, .mini-track.g4 span { background: var(--wood); }
.mini-track.g3 span { background: var(--earth); }
.mini-track.g2 span, .mini-track.g1 span { background: var(--fire); }
.mini-track.g5, .mini-track.g4, .mini-track.g3, .mini-track.g2, .mini-track.g1 { background: var(--surface-2); padding: 0; }

/* ---------- 12운성·신살 행 / 대운 카드 한글 표기 / 점수 범례 ---------- */
.pillar-sub { font-size: 11.5px; color: var(--muted); font-weight: 600; line-height: 1.35; padding-top: 2px; }
.pillar-legend { font-size: 12px; color: var(--muted); margin-top: 8px; text-align: center; }
.dw-card { flex: 0 0 70px; }
.dw-g { width: 46px; height: 46px; flex-direction: row; gap: 2px; display: flex; align-items: center; justify-content: center; }
.dw-g b { font-family: var(--font); font-size: 21px; font-weight: 800; line-height: 1; }
.dw-g small { font-family: var(--serif); font-size: 11px; font-weight: 700; opacity: .7; align-self: flex-end; margin-bottom: 7px; }
.dw-stage { font-size: 10.5px; color: var(--muted); font-weight: 700; }
.dw-bar { position: relative; width: 10px; height: 56px; }
.dw-bar .dw-mid { position: absolute; left: -5px; right: -5px; top: 50%; border-top: 1.5px dashed #b9afa3; z-index: 1; }
.dw-bar.g5 span, .dw-bar.g4 span { background: var(--wood); }
.dw-bar.g3 span { background: var(--earth); }
.dw-bar.g2 span, .dw-bar.g1 span { background: var(--fire); }
.dw-bar.g1, .dw-bar.g2, .dw-bar.g3, .dw-bar.g4, .dw-bar.g5 { background: var(--surface-2); padding: 0; color: inherit; }
.dw-grade { font-size: 10.5px; font-weight: 800; color: var(--ink-2); }
.score-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; color: var(--ink-2); background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.score-legend span:last-child { flex-basis: 100%; color: var(--muted); }
.lg-bar { display: inline-block; width: 8px; height: 14px; border-radius: 4px; background: linear-gradient(var(--wood), var(--fire)); vertical-align: -2px; }
.lg-mid { display: inline-block; width: 16px; border-top: 1.5px dashed #b9afa3; vertical-align: middle; }
.half-row { display: grid; gap: 8px; background: var(--surface-2); border-radius: 10px; padding: 10px 12px; margin: 8px 0 10px; }
.half-row div { display: grid; grid-template-columns: 1fr 46px; align-items: center; gap: 4px 8px; }
.half-row small { grid-column: 1 / -1; font-size: 12.5px; color: var(--ink-2); }
.half-row b { font-size: 13px; text-align: right; }
.yr-row { grid-template-columns: 44px 62px 1fr 38px; }
.yr-p small { font-size: 11px; color: var(--muted); margin-left: 3px; }
.dw-g { width: 46px; height: 54px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; }
.dw-g small { align-self: center; margin: 0; font-size: 11.5px; line-height: 1; }
.dw-g b { font-size: 22px; }

/* ---------- 원국표 한글+한자 ---------- */
.glyph .g-main { display: flex; align-items: baseline; gap: 2px; }
.glyph .g-main b { font-family: var(--font); font-size: clamp(28px, 8.4vw, 36px); font-weight: 800; line-height: 1; }
.glyph .g-main i { font-style: normal; font-family: var(--serif); font-size: clamp(13px, 3.6vw, 16px); font-weight: 700; opacity: .75; }
.dw-g { flex-direction: row !important; align-items: baseline !important; gap: 1px !important; }
.dw-g small { align-self: auto !important; margin: 0 !important; }

/* ---------- 용신 카드 ---------- */
.yong-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin: 6px 0 12px; }
.yg { border-radius: 12px; padding: 10px 6px; text-align: center; border: 1.5px solid var(--line); background: #fff; }
.yg small { display: block; font-size: 11.5px; color: var(--muted); font-weight: 700; }
.yg b { display: inline-block; margin: 6px 0 4px; font-size: 16px; padding: 2px 10px; border-radius: 999px; }
.yg span { display: block; font-size: 11px; color: var(--muted); }
.yg-good { border-color: #cfe7d6; background: #f6fbf7; }
.yg-bad { border-color: #f3cdc4; background: #fdf6f4; }
.yg-bad small { color: var(--fire); }

/* ---------- 성격·영역 ---------- */
.trait-list { list-style: none; padding: 0 !important; }
.trait-list li { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: 15px; }
.trait-list li:last-child { border-bottom: 0; }
.trait-list b { display: block; font-size: 13px; color: var(--seal); margin-bottom: 2px; }
.dmn-h { font-weight: 800; font-size: 14px; margin: 12px 0 4px !important; }
.dmn-list { list-style: none; padding: 0 !important; margin: 0 0 6px !important; }
.dmn-list li { font-size: 14.5px; margin-bottom: 8px; line-height: 1.55; }
.dmn { display: inline-block; font-size: 12.5px; font-weight: 800; padding: 2px 9px; border-radius: 999px; margin-right: 4px; }
.dmn.lv1 { background: #fdf0e1; color: #a5600f; }
.dmn.lv2 { background: var(--fire-bg); color: var(--fire); }
.dmn.up { background: var(--wood-bg); color: var(--wood); }

/* ---------- 연도별 태그 ---------- */
.yr-tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px; padding-left: 52px; margin-top: -2px; }
.tr { font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); }
.tr-good { background: #e3f3e8; color: #23733f; }
.tr-bad { background: var(--fire-bg); color: var(--fire); }
.tr-up { background: var(--wood-bg); color: var(--wood); }
.yr-y small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 600; margin-top: -2px; }

/* ---------- 저장·공유 ---------- */
.share-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.share-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 76px; border: 0; border-radius: 14px; font-size: 13.5px; font-weight: 700; cursor: pointer; color: var(--ink); }
.share-btn span { font-size: 24px; line-height: 1; }
.share-btn.kakao { background: #fee500; color: #191919; }
.share-btn.insta { background: linear-gradient(135deg, #fdf0e1, #fbe4ef); }
.share-btn.pdf { background: var(--surface-2); }
.share-btn:disabled { opacity: .7; cursor: progress; }
.share-panel { scroll-margin-top: 70px; }
/* 캡처용 복제본: 화면 밖에서 고정 폭으로 렌더 */
.capture-box { position: fixed; left: -10000px; top: 0; width: 680px; padding: 16px; background: var(--bg); }
.capture-box .card { box-shadow: none; border: 1px solid var(--line); }
.capture-box .card + .card, .capture-box > * + * { margin-top: 12px; }
.capture-box .dw-scroll { flex-wrap: wrap; overflow: visible; }
.capture-head { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 16px; padding: 4px 0 8px; }
.capture-head .logo-seal { width: 24px; height: 24px; font-size: 14px; border-radius: 6px; }
.capture-foot { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0 4px; }
.capture-box .glyph.is-day { box-shadow: none; border: 2.5px solid currentColor; }

/* =========================================================
   PC 레이아웃 (같은 HTML, 화면 폭 1024px 이상에서만)
   ========================================================= */
.hero-points { display: none; }
.result-grid { display: block; }
.capture-box .result-grid, .capture-box .result-side { display: block; position: static; }
.capture-box .result-side > * + *, .capture-box .result-main > * + * { margin-top: 12px; }

@media (min-width: 1024px) {
  :root { --max: 1120px; }
  .container { padding: 0 32px; }
  .container-read { max-width: 1040px; }
  .site-header .container { height: 64px; }
  .logo { font-size: 20px; }

  /* 홈·사주 입력: 2단 히어로 */
  .hero-split { display: grid; grid-template-columns: minmax(0, 1fr) 460px; gap: 56px; align-items: center; text-align: left; padding: 56px 0 24px; }
  .hero-split h1 { font-size: 52px; }
  .hero-split .saju-form { margin-top: 0; }
  .hero-points { display: grid; gap: 12px; list-style: none; padding: 0; margin: 28px 0 0; }
  .hero-points li { position: relative; padding-left: 30px; font-size: 16px; color: var(--ink-2); }
  .hero-points li::before { content: "✓"; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%; background: var(--seal-soft); color: var(--seal); font-size: 12px; font-weight: 800; display: grid; place-items: center; }
  .hero-points b { color: var(--ink); }

  .zodiac-strip { grid-template-columns: repeat(12, 1fr); }
  .article-list { grid-template-columns: 1fr 1fr; }
  .section { margin: 40px 0; }
  .section-head h2 { font-size: 22px; }

  /* 결과: 왼쪽 요약·원국 고정, 오른쪽 분석 (광고는 오른쪽 본문 흐름에만) */
  #result { padding-top: 28px !important; }
  .result-grid { display: grid; grid-template-columns: 400px minmax(0, 1fr); gap: 28px; align-items: start; }
  .result-side { position: sticky; top: 84px; display: grid; gap: 14px; max-height: calc(100vh - 100px); overflow: auto; scrollbar-width: thin; }
  .result-side .card + .card, .result-main .card + .card { margin-top: 0; }
  .result-main { display: grid; gap: 16px; min-width: 0; }
  .result-main .ad-slot { margin: 4px 0; }
  .result-main .section { margin: 8px 0; }
  .glyph .g-main b { font-size: 34px; }
  .card { padding: 24px 26px; }
  .prose h3 { font-size: 17px; margin-top: 22px; }

  /* 대운: 스크롤 대신 10개를 한 줄에 */
  .dw-scroll { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); overflow: visible; }
  .dw-card { flex: none; }
  .yr-row { grid-template-columns: 60px 80px 1fr 46px; }
  .share-grid .share-btn { min-height: 64px; flex-direction: row; gap: 8px; font-size: 15px; }

  /* 오늘의 운세: 3단 */
  #today-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; align-items: start; }
  #today-list .fortune-item { margin-bottom: 0; }

  /* 칼럼: 본문 + 오른쪽 목차 */
  .article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 240px; gap: 40px; align-items: start; }
  .article-grid .toc { grid-column: 2; grid-row: 1; position: sticky; top: 88px; margin: 0; }
  .article-grid .article-body { grid-column: 1; grid-row: 1; max-width: 720px; }
  .article-head h1 { font-size: 40px; }

  .site-footer .container { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 24px; }
  .site-footer nav { margin-bottom: 0; }
}
@media (min-width: 1280px) {
  .result-grid { grid-template-columns: 420px minmax(0, 1fr); gap: 36px; }
}
/* 대운 글자: 박스 정중앙 정렬 (한자는 한글 오른쪽 아래에 작게) */
.dw-g { display: flex !important; flex-direction: row !important; align-items: center !important; justify-content: center !important; gap: 1px !important; }
.dw-g b { line-height: 1; }
.dw-g small { align-self: center !important; line-height: 1; transform: translateY(4px); margin: 0 !important; }

/* ---------- 경험 보정 ---------- */
.calib { border: 1.5px solid #e9d8b8; background: linear-gradient(180deg, #fffaf0, #fff); }
.calib-body summary { cursor: pointer; font-weight: 700; color: var(--seal); list-style: none; min-height: 32px; }
.calib-body summary::-webkit-details-marker { display: none; }
.calib-q { border: 0; padding: 0; margin: 0 0 14px; }
.calib-q legend { font-size: 15px; font-weight: 700; margin-bottom: 8px; line-height: 1.5; }
.calib-opts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.calib-opts label { position: relative; }
.calib-opts input { position: absolute; opacity: 0; }
.calib-opts span { display: grid; place-items: center; min-height: 44px; border-radius: 10px; background: var(--surface-2); font-size: 13.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; text-align: center; padding: 0 4px; }
.calib-opts input:checked + span { background: var(--ink); color: #fff; }
.calib-opts input:focus-visible + span { outline: 2px solid var(--seal); }
.calib-status { margin-bottom: 10px; background: #f3f7ef; }
.calib-tag { display: inline-block; font-size: 11px; font-weight: 800; padding: 2px 8px; border-radius: 999px; background: var(--water-bg); color: var(--water); margin-right: 6px; vertical-align: 2px; }
.calib-tag.y { background: var(--seal-soft); color: var(--seal); }

/* ---------- 시주 확인 ---------- */
.hourcheck { border: 1.5px solid #c9d7ee; background: linear-gradient(180deg, #f6f9fe, #fff); }
.hourcheck > p { font-size: 15px; color: var(--ink-2); }
.hc-prob { display: grid; gap: 8px; margin: 6px 0 6px; }
.hc-prob div { display: grid; grid-template-columns: 1fr 90px 40px; align-items: center; gap: 8px; font-size: 14px; }
.hc-prob .mini-track span { background: var(--water); }
.hc-prob b { text-align: right; }
.hc-table-wrap { overflow-x: auto; margin: 12px 0 10px; }
.hc-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.hc-table th, .hc-table td { padding: 9px 6px; border-bottom: 1px solid var(--line); text-align: center; vertical-align: middle; }
.hc-table thead th { font-size: 14.5px; }
.hc-table thead th small { display: block; font-size: 11px; color: var(--muted); font-weight: 600; }
.hc-table tbody th { font-size: 12.5px; color: var(--muted); font-weight: 700; white-space: nowrap; text-align: left; }
.hc-table .on { background: #eef3fb; }
.hc-table .pill { margin: 0; }
.hc-flow { display: flex; flex-wrap: wrap; gap: 3px; justify-content: center; }
.hc-dw { display: inline-flex; flex-direction: column; align-items: center; min-width: 26px; padding: 2px 3px; border-radius: 6px; font-size: 10px; color: var(--muted); background: var(--surface-2); line-height: 1.2; }
.hc-dw b { font-size: 12px; color: var(--ink); }
.hc-dw.g4 b, .hc-dw.g5 b { color: var(--wood); }
.hc-dw.g1 b, .hc-dw.g2 b { color: var(--fire); }
.hc-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.hc-actions .btn { font-size: 13.5px; padding: 0 8px; }
.hc-badge { display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 700; color: var(--water); background: var(--water-bg); padding: 4px 10px; border-radius: 999px; }
/* 5단계 + 섞임/모름: 휴대폰에서 3칸 × 2줄 */
.calib-opts.o6 { grid-template-columns: repeat(3, 1fr); }
.calib-opts.o6 span { min-height: 42px; font-size: 13px; line-height: 1.3; }
.calib-follow { margin: 10px 0 0 4px; padding: 10px 0 0 12px; border-left: 3px solid #e9d8b8; }
.calib-follow > .hint { margin-bottom: 8px; }
.calib-q.sub legend { font-size: 14px; }
@media (min-width: 1024px) { .calib-opts.o6 { grid-template-columns: repeat(6, 1fr); } }

/* ---------- 보라뚜비사주 로고 ---------- */
.logo-mark { width: 30px; height: 30px; border-radius: 8px; display: block; }
.callout.warn { background: var(--fire-bg); }
.hero h1 em { color: var(--seal); }
/* 대운 점수 근거 · 핵심 연도 */
.dw-basis { display: grid; gap: 6px; margin: 2px 0 10px; }
.dw-basis div { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 8px 10px; }
.dw-basis small { grid-column: 1 / -1; font-size: 11.5px; color: var(--muted); }
.dw-basis b { font-size: 14px; }
.dw-basis span { font-size: 13px; font-weight: 700; text-align: right; }
.key-years li { background: #fff; border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; }
.key-years .tr { margin-left: 4px; }
/* ---------- 결과 상단 요약 · 오늘 운세 ---------- */
.life-summary { border: 1.5px solid #ddd3fb; background: linear-gradient(180deg, #f8f5ff, #fff); }
.sum-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.sum-list li { display: grid; gap: 2px; }
.sum-list span { font-size: 12px; font-weight: 800; color: var(--seal); }
.sum-list p { font-size: 15px; color: var(--ink); line-height: 1.55; }
.sum-list em { font-style: normal; font-size: 12.5px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.jump a { font-size: 13px; font-weight: 700; padding: 8px 12px; min-height: 36px; display: inline-flex; align-items: center; border-radius: 999px; background: #fff; border: 1px solid var(--line); color: var(--ink-2); }
.today-list { list-style: none; padding: 0; margin: 8px 0 10px; display: grid; gap: 8px; }
.today-list li { font-size: 15px; color: var(--ink-2); }
.today-list b { display: block; font-size: 12.5px; color: var(--seal); }
[id^="h-"] { scroll-margin-top: 76px; }
.me-banner { margin-top: 14px; padding: 14px 16px; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); border: 1.5px solid #ddd3fb; display: grid; gap: 10px; }
.me-banner > span { font-size: 15px; }
.me-banner div { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
@media (min-width: 1024px) { .me-banner { grid-template-columns: 1fr auto; align-items: center; margin-top: 24px; } .me-banner div { grid-template-columns: auto auto; } }
