/* =========================================================
   설명 페이지 공통 디자인 (zodiac / ddi / numerology / stone-flower / tarot)
   색은 index.html 과 같은 값을 써요.
   ========================================================= */
:root {
  --night: #15122b;
  --night2: #221c45;
  --paper: #fffdf8;
  --ink: #1d1a2e;
  --body: #3d3950;
  --muted: #8b869a;
  --line: #ece8df;
  --chip: #f4f1ea;
  --accent: #6a4cff;
  --accent-soft: #b8a8ff;
  --gold: #d6b25e;
  --radius: 20px;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; background: var(--night); scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Pretendard", "Malgun Gothic", "Noto Sans KR", sans-serif;
  color: var(--ink);
  background-color: var(--night);
  background-image:
    radial-gradient(1px 1px at 12% 8%, rgba(255,255,255,.5), transparent 60%),
    radial-gradient(1px 1px at 82% 5%, rgba(255,255,255,.4), transparent 60%),
    radial-gradient(1.5px 1.5px at 90% 18%, rgba(255,255,255,.3), transparent 60%),
    radial-gradient(600px 380px at 50% -80px, #3a2d7a 0%, transparent 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
  line-height: 1.7;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }

/* ---------- 상단 고정 바 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 5;
  background: rgba(21, 18, 43, .88);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.topbar .row { max-width: 640px; margin: 0 auto; padding: 10px 16px 0; display: flex; justify-content: space-between; align-items: center; }
.topbar .back { color: rgba(255,255,255,.8); text-decoration: none; font-size: 14px; font-weight: 600; padding: 4px 0; }
.topbar .brand { color: var(--gold); text-decoration: none; font-size: 12px; font-weight: 700; letter-spacing: .5px; }
.tabs { max-width: 640px; margin: 0 auto; display: flex; gap: 6px; overflow-x: auto; padding: 10px 16px 10px; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs a {
  flex-shrink: 0; text-decoration: none; font-size: 13px; font-weight: 600;
  color: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 99px;
  border: 1px solid rgba(255,255,255,.14);
}
.tabs a.on { background: var(--paper); color: var(--ink); border-color: var(--paper); }

/* ---------- 본문 ---------- */
.wrap { max-width: 640px; margin: 0 auto; padding: 0 16px 40px; }

.hero { text-align: center; color: #fff; padding: 36px 4px 26px; }
.hero .eyebrow { font-size: 12px; letter-spacing: 3px; color: var(--gold); font-weight: 600; }
.hero h1 { font-size: 27px; line-height: 1.35; margin-top: 12px; letter-spacing: -0.8px; font-weight: 800; }
.hero p { color: rgba(255,255,255,.65); margin-top: 10px; font-size: 14.5px; line-height: 1.65; }

.paper { background: var(--paper); border-radius: var(--radius); padding: 24px 20px; }
.paper + .paper { margin-top: 12px; }

.intro h2 { font-size: 18px; font-weight: 800; letter-spacing: -0.4px; margin: 26px 0 8px; }
.intro h2:first-child { margin-top: 0; }
.intro p { font-size: 15px; color: var(--body); margin-top: 8px; }
.intro p b { color: var(--ink); }

/* 쉬운 설명 박스 */
.easy {
  background: var(--chip); border-radius: 14px; padding: 14px 16px; margin-top: 10px;
  font-size: 15px; color: var(--ink);
}
.easy::before { content: "쉽게 말하면 💡"; display: block; font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 4px; }

/* 표 */
.tbl { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl th { font-size: 12px; color: var(--muted); font-weight: 700; }
.tbl td:first-child { font-weight: 700; white-space: nowrap; }

.facts { list-style: none; margin-top: 10px; }
.facts li { position: relative; padding: 8px 0 8px 22px; font-size: 14.5px; color: var(--body); border-bottom: 1px solid var(--line); }
.facts li:last-child { border-bottom: 0; }
.facts li::before { content: "✦"; position: absolute; left: 2px; top: 8px; color: var(--gold); font-size: 12px; }

/* 바로가기 칩 */
.jump-title { color: rgba(255,255,255,.7); font-size: 13px; font-weight: 700; margin: 28px 2px 10px; }
.jump { display: flex; flex-wrap: wrap; gap: 6px; }
.jump a {
  text-decoration: none; font-size: 13.5px; font-weight: 600; color: #fff;
  padding: 7px 12px; border-radius: 99px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12);
}

/* ---------- 항목 카드 ---------- */
.entries { margin-top: 16px; }
.entry { background: var(--paper); border-radius: var(--radius); padding: 22px 20px; margin-top: 12px; scroll-margin-top: 104px; transition: box-shadow .3s; }
.entry:target { box-shadow: 0 0 0 3px var(--accent), 0 10px 40px rgba(106,76,255,.35); }
.e-head { display: flex; gap: 14px; align-items: center; }
.e-ic {
  width: 52px; height: 52px; border-radius: 14px; background: var(--chip); flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; color: var(--accent);
}
.e-head h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.5px; line-height: 1.3; }
.e-head h3 small { font-size: 13px; color: var(--muted); font-weight: 600; margin-left: 4px; letter-spacing: 0; }
.e-meta { font-size: 13px; color: var(--muted); margin-top: 2px; line-height: 1.5; }
.mine {
  display: none; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent);
  padding: 3px 8px; border-radius: 99px; margin-left: 6px; vertical-align: 3px; letter-spacing: 0;
}
.entry:target .mine { display: inline-block; }
.e-one { margin-top: 14px; font-size: 16px; font-weight: 800; color: var(--accent); letter-spacing: -0.3px; }
.entry p.e-desc { margin-top: 6px; font-size: 15px; color: var(--body); }
.e-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 14px; }
.e-grid div { background: var(--chip); border-radius: 12px; padding: 10px 12px; }
.e-grid div.wide { grid-column: 1 / -1; }
.e-grid dt { font-size: 11.5px; color: var(--muted); font-weight: 700; }
.e-grid dd { font-size: 14px; font-weight: 600; margin-top: 2px; line-height: 1.5; }

/* ---------- 하단 ---------- */
.cta { text-align: center; margin-top: 28px; }
.cta a {
  display: inline-block; text-decoration: none; background: var(--accent); color: #fff;
  font-weight: 700; font-size: 16px; padding: 15px 28px; border-radius: 14px;
}
.ad-slot { margin: 20px 0 0; text-align: center; }
.ad-slot:empty { display: none; }
footer { text-align: center; color: rgba(255,255,255,.45); font-size: 12px; margin-top: 32px; line-height: 1.8; padding: 0 16px 32px; }
footer nav { margin-bottom: 8px; }
footer nav a { color: rgba(255,255,255,.65); text-decoration: none; margin: 0 6px; }

@media (max-width: 360px) {
  .e-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 24px; }
}

/* ---------- 소개 / 개인정보처리방침 / 문의 ---------- */
footer nav.legal a { color: rgba(255,255,255,.5); margin: 0 2px; }
.doc a { color: var(--accent); font-weight: 600; text-decoration: none; }
.doc a:hover { text-decoration: underline; }
.doc code { font-size: 13px; background: var(--chip); padding: 1px 6px; border-radius: 6px; }
.doc .small { font-size: 13px; color: var(--muted); margin-top: 18px; }
.doc .tbl td:first-child { white-space: normal; min-width: 72px; }
.doc .contact-line { margin-top: 10px; font-size: 15px; }
