/* 월안재 사이트. 2026-10 전면 개편.
 * 세계: 밤하늘 서재. 첫 화면은 밤(남색)이고 본문은 새벽빛 종이(미색). 금은 도사의 색이라 눈·버튼·한 줄 선에만.
 * 서체: 본문 Noto Sans KR. 명조(Noto Serif KR)는 큰 제목 한 줄과 도사의 말에만, 책과 같은 세계라서.
 * 모서리: 카드·그림 12, 입력·버튼 8, 칩 4. 분야 탭은 밑줄.
 * 움직임: 올려놓을 때 2px 떠오름, 누를 때 1px 눌림, 탭 밑줄 이동. 자동으로 움직이는 것은 없다. */

:root {
  --bg: #f7f4ec; --paper: #ffffff; --ink: #1b1d2a; --ink-2: #4a4e63; --ink-3: #7b7f96;
  --line: #e3ddd0; --line-2: #ece7dc;
  --accent: #2d3470; --accent-ink: #232a5e; --accent-soft: #e9e9f4;
  --soft: #f1ede3;
  --gold: #c9a45c; --gold-ink: #7a5a1c; --gold-soft: #f3e8cf;
  --night: #12152b; --night-2: #1c2043; --on-night: #f6f1e7; --on-night-2: #b9bcd6; --night-line: rgba(246, 241, 231, .14);
  --wood: #2f7d4f; --fire: #c0392b; --earth: #a9780f; --metal: #66707c; --water: #1f5f8b;
  --wood-n: #8fd3a4; --fire-n: #ff9c8f; --earth-n: #f0c75a; --metal-n: #b8c2cc; --water-n: #86c3ea;
  --good: #1d6f3a; --bad: #b4232c;
  --r-card: 12px; --r-ctl: 8px; --r-chip: 4px;
  --shadow: 0 1px 2px rgba(27, 29, 42, .05), 0 14px 36px -18px rgba(27, 29, 42, .22);
  --serif: "Noto Serif KR", "Apple SD Gothic Neo", serif; --sans: "Noto Sans KR", -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #0f1122; --paper: #181b33; --ink: #eceaf4; --ink-2: #b9bbd0; --ink-3: #8a8ea8;
    --line: #2a2e52; --line-2: #222646;
    --accent: #aab3ff; --accent-ink: #c3caff; --accent-soft: #242952;
    --soft: #151833;
    --gold: #c9a45c; --gold-ink: #e9d6a6; --gold-soft: #35304a;
    --night: #0a0c1b; --night-2: #151833; --on-night: #f6f1e7; --on-night-2: #b9bcd6;
    --wood: #8fd3a4; --fire: #ff9c8f; --earth: #f0c75a; --metal: #b8c2cc; --water: #86c3ea;
    --good: #7fd69a; --bad: #f08a91;
    --shadow: none;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #0f1122; --paper: #181b33; --ink: #eceaf4; --ink-2: #b9bbd0; --ink-3: #8a8ea8;
  --line: #2a2e52; --line-2: #222646;
  --accent: #aab3ff; --accent-ink: #c3caff; --accent-soft: #242952;
  --soft: #151833;
  --gold: #c9a45c; --gold-ink: #e9d6a6; --gold-soft: #35304a;
  --night: #0a0c1b; --night-2: #151833; --on-night: #f6f1e7; --on-night-2: #b9bcd6;
  --wood: #8fd3a4; --fire: #ff9c8f; --earth: #f0c75a; --metal: #b8c2cc; --water: #86c3ea;
  --good: #7fd69a; --bad: #f08a91;
  --shadow: none;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.75; word-break: keep-all; overflow-wrap: anywhere; overflow-x: clip; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.wrap { max-width: 900px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }
/* 가로로 꽉 차는 띠 (.wrap 안에서 쓴다) */
.band, .foot { margin-inline: calc(50% - 50vw); padding-inline: calc(50vw - 50%); }

/* ---------- 히어로: 밤 ---------- */
.hero { position: relative; background: radial-gradient(110% 80% at 80% 10%, #2a3170 0%, #171a3a 48%, var(--night) 100%); color: var(--on-night); overflow: hidden; }
.hero .stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero .wrap { position: relative; }
.brandbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 64px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 21px; letter-spacing: .02em; color: var(--on-night); text-decoration: none; display: inline-flex; align-items: center; gap: 9px; }
.brand i { width: 28px; height: 28px; border: 1.5px solid var(--gold); border-radius: 50%; display: inline-grid; place-items: center; font-style: normal; color: var(--gold); font-size: 13px; }
.nav { display: flex; gap: 22px; font-size: 14px; }
.nav a { color: var(--on-night-2); text-decoration: none; white-space: nowrap; padding: 4px 0; border-bottom: 1px solid transparent; transition: color .15s ease, border-color .15s ease; }
.nav a:hover { color: var(--on-night); border-color: var(--gold); }
@media (max-width: 680px) { .nav { display: none; } }
.hero-row { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 24px; align-items: end; padding: 40px 0 0; }
.hero-copy { padding-bottom: 44px; }
.display { font-family: var(--serif); font-weight: 900; font-size: clamp(34px, 5vw, 56px); line-height: 1.18; letter-spacing: -.01em; margin: 0 0 14px; color: var(--on-night); text-wrap: balance; }
.display em { font-style: normal; color: var(--gold); }
.hero-by { margin: 0 0 26px; font-size: 14px; letter-spacing: .3em; color: var(--on-night-2); }
.hero-by::before { content: ""; display: inline-block; width: 28px; border-top: 1px solid var(--gold); vertical-align: middle; margin-right: 10px; }
.hero .actions { margin: 0; }
.hero-fig { margin: 0; align-self: end; }
.hero-dosa { display: block; width: 300px; max-width: 100%; height: auto; -webkit-mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 52%, transparent 97%); mask-image: radial-gradient(ellipse 72% 78% at 50% 48%, #000 52%, transparent 97%); }
@media (max-width: 680px) {
  .hero-row { grid-template-columns: 1fr; gap: 0; padding-top: 10px; }
  .hero-fig { order: -1; justify-self: end; margin-right: -16px; }
  .hero-dosa { width: 200px; max-width: 54vw; }
  .hero-copy { padding-bottom: 32px; margin-top: -40px; }
  .hero .actions .btn { flex: 1 1 auto; }
}
/* 열 인장 띠 */
.seals { display: grid; grid-template-columns: repeat(10, 1fr); gap: 6px; padding-block: 18px 22px; border-top: 1px solid var(--night-line); position: relative; }
.seals a { display: flex; flex-direction: column; align-items: center; gap: 6px; text-decoration: none; color: var(--on-night-2); font-size: 11px; letter-spacing: .02em; transition: transform .15s ease, color .15s ease; }
.seals a i { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--gold); display: grid; place-items: center; font-family: var(--serif); font-style: normal; font-weight: 700; font-size: 19px; color: var(--on-night); background: rgba(246, 241, 231, .04); transition: background-color .15s ease; }
.seals a:hover { color: var(--on-night); transform: translateY(-2px); }
.seals a:hover i { background: rgba(201, 164, 92, .18); }
@media (max-width: 680px) { .seals { display: flex; overflow-x: auto; gap: 14px; padding-inline: 16px; scrollbar-width: none; } .seals::-webkit-scrollbar { display: none; } .seals a { flex: none; min-width: 56px; } }

/* ---------- 공통 ---------- */
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; font: inherit; font-size: 15px; font-weight: 700; padding: 12px 20px; border-radius: var(--r-ctl); border: 1px solid var(--line); background: var(--paper); color: var(--ink); cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease; }
.btn:hover { border-color: var(--ink-3); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn.primary:hover { background: var(--accent-ink); border-color: var(--accent-ink); }
.btn.gold { background: var(--gold); color: #12152b; border-color: var(--gold); }
.btn.gold:hover { background: #d9b46a; border-color: #d9b46a; box-shadow: 0 8px 24px -10px rgba(201, 164, 92, .7); }
.btn.ghost { background: transparent; color: var(--on-night); border-color: rgba(246, 241, 231, .4); }
.btn.ghost:hover { background: rgba(246, 241, 231, .08); border-color: rgba(246, 241, 231, .7); }
.btn.disabled { opacity: .55; pointer-events: none; }
.linkbtn { font: inherit; font-size: 13px; background: none; border: 0; color: var(--ink-2); cursor: pointer; padding: 0; text-decoration: underline; }

h2.sec { font-size: clamp(24px, 3.2vw, 30px); font-weight: 900; letter-spacing: -.02em; line-height: 1.25; margin: 80px 0 8px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; text-wrap: balance; }
h2.sec::before { content: ""; display: block; width: 100%; height: 1px; background: var(--gold); margin-bottom: 18px; }
h2.sec small { font-size: 12px; font-weight: 700; letter-spacing: .08em; color: var(--gold-ink); background: var(--gold-soft); padding: 3px 9px; border-radius: var(--r-chip); }
.sec-sub { margin: 0 0 20px; font-size: 16px; max-width: 60ch; }
h2 { font-size: 19px; font-weight: 700; letter-spacing: -.01em; margin: 0 0 10px; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.ref { font-size: 11px; font-weight: 700; color: var(--ink-3); background: var(--soft); border: 1px solid var(--line-2); padding: 1px 7px; border-radius: var(--r-chip); }
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--gold-ink); }
.lead { color: var(--ink-2); margin: 0; max-width: 60ch; }
.sub { color: var(--ink-2); margin: 0 0 12px; font-size: 14.5px; }
.note, .small { font-size: 13px; color: var(--ink-3); margin: 10px 0 0; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 20px 18px; margin: 16px 0; }
.block { padding: 26px 0 8px; border-top: 1px solid var(--line-2); }
.block:first-child { border-top: 0; padding-top: 8px; }
.error { border-color: var(--bad); color: var(--bad); }

/* 네 가지 약속: 두 칸 격자, 선으로만 */
.how { list-style: none; margin: 0; padding: 36px 0 0; display: grid; grid-template-columns: 1fr 1fr; gap: 0 40px; }
.how li { padding: 18px 0; border-bottom: 1px solid var(--line); }
.how li b { display: block; font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.how li span { color: var(--ink-2); font-size: 15px; }
@media (max-width: 600px) { .how { grid-template-columns: 1fr; padding-top: 20px; } .how li { padding: 14px 0; } }

/* ---------- 고민 하나: 줄 목록 ---------- */
.asks { display: grid; grid-template-columns: 1fr; margin: 0 0 6px; border-top: 1px solid var(--line); }
.ask { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.6fr) auto; gap: 6px 22px; align-items: baseline; padding: 18px 8px 18px 0; border-bottom: 1px solid var(--line); text-decoration: none; color: var(--ink-2); font-size: 14.5px; position: relative; transition: transform .15s ease, background-color .15s ease; }
.ask b { color: var(--ink); font-size: 17px; font-weight: 700; }
.ask i { font-style: normal; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--ink-3); white-space: nowrap; padding-right: 22px; }
.ask i::after { content: "›"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%); font-size: 22px; color: var(--gold); transition: transform .15s ease; }
.ask:hover, .ask.on { transform: translateX(4px); }
.ask:hover i::after, .ask.on i::after { transform: translate(4px, -50%); }
.ask.on b { color: var(--accent-ink); }
@media (max-width: 640px) { .ask { grid-template-columns: 1fr; gap: 2px; padding-right: 26px; } }
.ask-banner { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--gold-soft); color: var(--gold-ink); padding: 8px 12px; border-radius: var(--r-ctl); margin-bottom: 14px; font-size: 14px; }
.ask-answer { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); }
.ask-answer .kicker { margin-bottom: 4px; }
.ask-big { font-size: 17px; }
.ask-next { background: var(--soft); border-left: 3px solid var(--accent); padding: 8px 12px; font-size: 14px; border-radius: 0 var(--r-ctl) var(--r-ctl) 0; }

/* ---------- 입력 폼 ---------- */
.say { display: flex; gap: 10px; align-items: flex-start; margin: 12px 0; }
.say img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; flex: none; border: 1.5px solid var(--gold); }
.say p { margin: 0; font-family: var(--serif); font-size: 16.5px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-chip) var(--r-card) var(--r-card) var(--r-card); padding: 10px 14px; line-height: 1.7; }
.say.intro { margin: 0 0 18px; }
.tabs { display: flex; gap: 2px; margin: 14px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { font: inherit; font-size: 15px; font-weight: 700; padding: 10px 14px 12px; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; background: none; color: var(--ink-3); cursor: pointer; white-space: nowrap; transition: color .15s ease, border-color .15s ease; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected="true"] { color: var(--ink); border-bottom-color: var(--gold); }
.tabnote { margin: 8px 0 0; min-height: 1em; }
.form.card { margin-top: 12px; box-shadow: var(--shadow); }
.form .grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
@media (max-width: 560px) { .form .grid { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-size: 13px; font-weight: 700; color: var(--ink-2); padding: 0; }
.field small { font-weight: 400; color: var(--ink-3); }
input[type=text], input[type=number], select { font: inherit; font-size: 16px; padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--r-ctl); background: var(--paper); color: var(--ink); width: 100%; min-width: 0; transition: border-color .15s ease; }
input:hover, select:hover { border-color: var(--ink-3); }
input::placeholder { color: var(--ink-3); }
input:focus, select:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.row3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; align-items: center; }
.row2 { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 4px; }
.seg { display: flex; gap: 8px; flex-wrap: wrap; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; }
.seg span { display: inline-block; padding: 9px 18px; border: 1px solid var(--line); border-radius: var(--r-ctl); cursor: pointer; transition: background-color .15s ease, border-color .15s ease; }
.seg span:hover { border-color: var(--ink-3); }
.seg input:checked + span { background: var(--accent); color: #fff; border-color: var(--accent); }
.seg input:focus-visible + span { outline: 2px solid var(--gold); outline-offset: 1px; }
.chk { display: flex; align-items: center; gap: 6px; font-size: 14px; white-space: nowrap; }
.partner { border: 1px dashed var(--gold); border-radius: var(--r-ctl); padding: 10px 14px 14px; margin: 16px 0 0; }
.partner legend { font-size: 13px; font-weight: 700; color: var(--gold-ink); padding: 0 6px; }
.more { margin-top: 16px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.more summary { cursor: pointer; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.more summary small { font-weight: 400; color: var(--ink-3); margin-left: 6px; }
.more[open] summary { margin-bottom: 12px; }

/* ---------- 결과: 명식 (밤 판) ---------- */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin: 8px 0 12px; padding: 14px; background: var(--night); border-radius: var(--r-card); }
.pillar { text-align: center; border: 1px solid var(--night-line); border-radius: var(--r-ctl); padding: 10px 4px 12px; background: rgba(246, 241, 231, .03); color: var(--on-night); }
.pillar.day { border-color: var(--gold); box-shadow: inset 0 0 0 1px var(--gold); background: rgba(201, 164, 92, .08); }
.pillar .lab { font-size: 11px; letter-spacing: .08em; color: var(--on-night-2); }
.pillar .g { font-family: var(--serif); font-size: 34px; font-weight: 900; line-height: 1.15; margin-top: 6px; letter-spacing: -.02em; }
.pillar .h { font-family: var(--sans); font-size: 12px; color: var(--on-night-2); font-weight: 400; letter-spacing: 0; }
.pillar .t { font-family: var(--sans); font-size: 11.5px; font-weight: 700; margin-top: 2px; letter-spacing: 0; }
.pillar .g + .g { border-top: 1px dashed var(--night-line); margin-top: 8px; padding-top: 8px; }
.pillars .e-목 { color: var(--wood-n); } .pillars .e-화 { color: var(--fire-n); } .pillars .e-토 { color: var(--earth-n); } .pillars .e-금 { color: var(--metal-n); } .pillars .e-수 { color: var(--water-n); }
.e-목 { color: var(--wood); } .e-화 { color: var(--fire); } .e-토 { color: var(--earth); } .e-금 { color: var(--metal); } .e-수 { color: var(--water); }
@media (max-width: 420px) { .pillars { gap: 4px; padding: 10px; } .pillar .g { font-size: 28px; } }
.bars { display: grid; gap: 7px; margin-bottom: 14px; max-width: 520px; }
.bar { display: grid; grid-template-columns: 56px 1fr 30px; align-items: center; gap: 8px; font-size: 14px; }
.bar .track { height: 8px; background: var(--soft); border-radius: 4px; overflow: hidden; }
.bar .fill { height: 100%; border-radius: 4px; }
.bar .n { text-align: right; font-variant-numeric: tabular-nums; }
.f-목 { background: var(--wood); } .f-화 { background: var(--fire); } .f-토 { background: var(--earth); } .f-금 { background: var(--metal); } .f-수 { background: var(--water); }
.prose { max-width: 66ch; }
.prose p { margin: 0 0 8px; }
.prose ul { margin: 0 0 8px; padding-left: 1.3em; }
.tablewrap { overflow-x: auto; margin: 6px 0 12px; }
table { border-collapse: collapse; width: 100%; font-size: 14px; }
th, td { border-bottom: 1px solid var(--line-2); padding: 9px 8px; text-align: left; vertical-align: top; font-variant-numeric: tabular-nums; }
th { font-size: 12px; letter-spacing: .04em; color: var(--ink-3); font-weight: 700; white-space: nowrap; border-bottom-color: var(--line); }
td.c { text-align: center; }
.good { color: var(--good); font-weight: 700; } .bad { color: var(--bad); font-weight: 700; }
.warn { font-size: 13px; color: var(--ink-2); background: var(--soft); padding: 10px 12px; border-radius: var(--r-ctl); margin: 10px 0 0; max-width: 66ch; }
.summary blockquote { margin: 0; padding: 16px 18px; font-family: var(--serif); background: var(--gold-soft); border-left: 3px solid var(--gold); border-radius: 0 var(--r-ctl) var(--r-ctl) 0; font-size: 16.5px; line-height: 1.9; max-width: 66ch; }
.disclaimer { font-size: 13px; color: var(--ink-3); margin: 28px 0 8px; max-width: 66ch; }

/* 월안도사의 풀이 */
.dosa { border-top: 3px solid var(--gold); box-shadow: var(--shadow); }
.dosa-sec { padding: 16px 0; border-top: 1px dashed var(--line); }
.dosa-sec:first-of-type { border-top: 0; padding-top: 4px; }
.dosa-sec h3 { font-size: 17px; font-weight: 700; margin: 0 0 8px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.dosa-sec h3 i { font-style: normal; width: 24px; height: 24px; border-radius: 50%; background: var(--night); color: var(--gold); font-size: 12px; display: grid; place-items: center; }
.yy { display: flex; height: 32px; border-radius: var(--r-ctl); overflow: hidden; font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.yy span { display: grid; place-items: center; min-width: 44px; }
.yy .y { background: #f2c96b; color: #5a3d00; }
.yy .n { background: var(--night-2); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-ctl); padding: 5px 10px; background: var(--paper); }
.chip b { margin-right: 5px; }
.chip.dim { opacity: .75; }

/* ---------- 유료 잠금 (freeAll 이면 쓰이지 않음) ---------- */
.premium { position: relative; }
body:not(.unlocked) .premium { max-height: 420px; overflow: hidden; pointer-events: none; user-select: none; }
body:not(.unlocked) .premium::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to bottom, transparent 0%, var(--bg) 85%); }
body:not(.unlocked) .premium .block, body:not(.unlocked) .premium .card { filter: blur(3px); }
body.unlocked .paywall { display: none; }
body.demo .paywall { display: block; }
.paywall { border-color: var(--gold); text-align: center; padding: 26px 18px; }
.paywall h2 { justify-content: center; font-size: 20px; }
.paywall p { color: var(--ink-2); max-width: 52ch; margin: 6px auto; }
.paywall .actions { justify-content: center; }
.price b { font-size: 26px; font-weight: 900; letter-spacing: -.02em; }
.price small { color: var(--ink-3); }
.unlock { margin: 16px auto 0; text-align: left; max-width: 420px; }
.unlock label { font-size: 13px; font-weight: 700; color: var(--ink-2); }
.unlock input { font-family: ui-monospace, Menlo, monospace; letter-spacing: .04em; text-transform: uppercase; }
.demo-note { background: var(--accent-soft); color: var(--accent-ink); padding: 10px 14px; border-radius: var(--r-ctl); font-size: 14px; }
.premium-card { border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: 26px 0 8px; margin: 0; background: transparent; }

/* ---------- 도사에게 묻기: 밤의 띠 ---------- */
.band { background: var(--night); color: var(--on-night); padding-block: 56px 64px; margin-top: 80px; }
.band h2.sec { margin-top: 0; color: var(--on-night); }
.band h2.sec::before { background: var(--gold); }
.askdosa { display: grid; grid-template-columns: 200px 1fr; gap: 32px; align-items: center; }
.askdosa img { width: 200px; height: auto; border-radius: var(--r-card); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8); }
.askdosa .say-q { font-family: var(--serif); font-size: clamp(18px, 2.4vw, 22px); line-height: 1.65; margin: 0 0 14px; color: var(--on-night); text-wrap: balance; }
.askdosa ul { margin: 0 0 16px; padding-left: 18px; font-size: 15px; color: var(--on-night-2); }
.askdosa .price b { color: var(--on-night); } .askdosa .price small { color: var(--on-night-2); }
@media (max-width: 600px) { .askdosa { grid-template-columns: 1fr; gap: 20px; } .askdosa img { width: 150px; } .band { padding-block: 44px 52px; } }

/* ---------- 책 ---------- */
.ebook { display: grid; grid-template-columns: 220px 1fr; gap: 36px; align-items: start; margin-top: 24px; }
@media (max-width: 600px) { .ebook { grid-template-columns: 1fr; gap: 20px; } .ebook-cover { justify-self: center; } }
.ebook-cover { padding: 12px 0; }
.ebook-cover img { width: 100%; max-width: 220px; height: auto; display: block; border-radius: 3px; box-shadow: 0 24px 50px -22px rgba(18, 21, 43, .6), 0 2px 6px rgba(18, 21, 43, .15); transform: rotate(-2deg); transition: transform .25s ease; }
.ebook-cover img:hover { transform: rotate(0); }
.ebook ul { padding-left: 1.2em; font-size: 15px; margin: 8px 0 14px; }
.ebook p:first-child { margin-top: 0; }
.consult { margin-top: 24px; }

/* ---------- FAQ · 푸터 ---------- */
.faq { max-width: 720px; }
.faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.faq details:first-child { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16.5px; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--gold); font-weight: 400; font-size: 20px; line-height: 1; transition: transform .15s ease; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq p { margin: 10px 0 2px; color: var(--ink-2); font-size: 15px; max-width: 66ch; }
.foot { background: var(--night); color: var(--on-night-2); margin-top: 80px; padding-block: 36px 48px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.foot a { color: var(--on-night); }
.biz { font-size: 12px; }

/* ---------- 자미두수 명반 ---------- */
.zgrid { display: grid; grid-template-columns: repeat(4, 1fr); grid-template-rows: repeat(4, minmax(110px, auto)); gap: 4px; margin-top: 8px; }
.zc { font: inherit; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 6px; border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--soft); color: var(--ink); cursor: pointer; min-width: 0; transition: border-color .15s ease; }
.zc:hover { border-color: var(--ink-3); }
.zc.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--paper); }
.zc.dec { outline: 2px dashed var(--accent); outline-offset: -3px; }
.zh { display: flex; gap: 4px; align-items: baseline; flex-wrap: wrap; font-size: 12.5px; }
.zh i { font-style: normal; font-size: 10.5px; color: #fff; background: var(--accent); border-radius: var(--r-chip); padding: 0 4px; }
.zh em { font-style: normal; margin-left: auto; color: var(--ink-3); font-size: 11.5px; }
.zm { display: flex; flex-wrap: wrap; gap: 2px 6px; font-weight: 700; font-size: 13.5px; }
.zn { display: flex; flex-wrap: wrap; gap: 1px 5px; font-size: 11.5px; color: var(--ink-2); }
.zd { margin-top: auto; font-size: 11px; color: var(--ink-3); }
.st small { font-size: 9.5px; color: var(--ink-3); margin-left: 1px; font-weight: 400; }
.mut { display: inline-block; font-size: 10px; font-weight: 700; color: #fff; background: var(--fire); border-radius: var(--r-chip); padding: 0 3px; margin-left: 2px; }
.mut.dec { background: var(--water); }
.zcenter { grid-row: 2 / 4; grid-column: 2 / 4; display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 10px; font-size: 13px; border: 1px solid var(--line); border-radius: var(--r-chip); background: var(--paper); }
.zcenter b { font-size: 14px; }
.zcenter .decline { color: var(--water); font-weight: 700; }
.zdetail ul { padding-left: 1.2em; margin: 6px 0; }
@media (max-width: 560px) { .zgrid { grid-template-rows: repeat(4, minmax(96px, auto)); gap: 2px; } .zc { padding: 4px; } .zm { font-size: 12px; } .zn { font-size: 10.5px; } .zh { font-size: 11px; } .zcenter { font-size: 11.5px; padding: 6px; } }

/* ---------- 타로 ---------- */
.tq { margin: 12px 0 4px; }
.tgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 10px; margin: 10px 0; }
.tcard { background: var(--paper); border: 1px solid var(--line); border-radius: var(--r-card); padding: 14px 16px; transition: transform .15s ease, box-shadow .15s ease; }
.tcard:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tcard.rev { border-style: dashed; }
.tpos { font-size: 12px; font-weight: 700; letter-spacing: .04em; color: var(--gold-ink); display: flex; flex-direction: column; }
.tpos small { font-weight: 400; color: var(--ink-3); letter-spacing: 0; }
.tname { font-family: var(--serif); font-size: 18px; font-weight: 700; margin: 6px 0 4px; }
.tname small { font-family: var(--sans); font-size: 11.5px; font-weight: 400; color: var(--ink-3); }
.tname span.good, .tname span.bad { font-family: var(--sans); font-size: 11.5px; }
.tn { display: inline-block; min-width: 22px; text-align: center; font-size: 12px; background: var(--accent-soft); color: var(--accent-ink); border-radius: var(--r-chip); margin-right: 6px; }
.tk { font-weight: 700; margin: 4px 0; }
.tcard p { margin: 4px 0; }

/* ---------- 공유 카드 ---------- */
.carddlg { border: 0; border-radius: var(--r-card); padding: 14px; background: var(--paper); color: var(--ink); max-width: 420px; width: calc(100% - 32px); }
.carddlg::backdrop { background: rgba(10, 12, 30, .65); }
.carddlg canvas { width: 100%; height: auto; border-radius: var(--r-ctl); display: block; }
.carddlg .actions { justify-content: center; }
.carddlg p { text-align: center; }

@media print {
  body { background: #fff; }
  .hero, .how, .asks, .ask-banner, .partner, .say.intro, .tabs, .tabnote, .form, .actions, .foot, .warn, .band, .ebook, .consult, .faq, .paywall, .demo-note, .carddlg, #cardOpen, h2.sec { display: none; }
  .card, .block { border: 0; padding: 0 0 10px; break-inside: avoid; }
  .pillars { background: #fff; padding: 0; } .pillar { color: #000; border-color: #999; }
  body:not(.unlocked) .premium { max-height: none; overflow: visible; }
  body:not(.unlocked) .premium .block, body:not(.unlocked) .premium .card { filter: none; }
  body:not(.unlocked) .premium::after { display: none; }
}

/* 결과 본문은 카드 대신 줄로 나눈다. 도사의 말·질문 답·잠금·오류만 카드로 남긴다 (JS가 만드는 카드도 같은 규칙). */
#result .card:not(.dosa):not(.ask-answer):not(.paywall):not(.error), #tOut .card:not(.error) { background: transparent; border: 0; border-top: 1px solid var(--line-2); border-radius: 0; padding: 26px 0 8px; margin: 0; }
#result > [data-panel] > .card:first-child:not(.dosa):not(.ask-answer), #result > [data-panel] > .card.ask-answer + .card, #result > [data-panel] > .card[hidden] + .card { border-top: 0; padding-top: 8px; }
#result .card.dosa, #result .card.ask-answer, #result .card.paywall { margin: 18px 0; }
