/* 공개 소개와 예시 감정서. 바탕과 글꼴, 머리글, 안내는 introduction.css를 그대로 씁니다. */
[hidden] { display: none !important; }
/* 줄바꿈: 낱말 중간에서 끊지 않고, 제목은 줄 길이를 고르게, 본문은 마지막 줄에 한두 글자만 남지 않게 합니다. */
h1, h2, h3, .point-copy p, .ask { text-wrap: balance; }
.answer p, .quote, .note p, .invite-cta p, .guide details p { text-wrap: pretty; }
.nb, .when { white-space: nowrap; }
.go::after { content: "→"; font: 19px/1 system-ui, sans-serif; }

.lead { display: grid; align-content: center; min-height: min(72svh, 620px); padding-block: 12px 44px; }
.lead h1 { font-size: clamp(46px, 13vw, 104px); line-height: 1.06; letter-spacing: -.075em; }
.lead-sub { margin-top: 20px; color: var(--text); font-size: clamp(15px, 4vw, 19px); line-height: 1.6; }
/* 두 문장을 한 줄씩 둡니다. 화면이 좁아도 문장 가운데서 끊기지 않습니다. */
.lead-sub span { display: block; white-space: nowrap; }
.lead-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 22px; margin-top: 28px; }
.lead .primary { min-height: 52px; padding-inline: 20px; font-size: 16px; }
.more { display: inline-flex; align-items: center; min-height: 44px; font-size: 15px; font-weight: 600; text-decoration: underline; text-underline-offset: .35em; }

.points { display: grid; }
.point { position: relative; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1fr); gap: 22px clamp(30px, 6vw, 78px); padding-block: 40px 48px; }
.point::before { content: ""; position: absolute; inset: 0 0 auto; height: 1px; background: var(--rule); }
.no { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.point h3 { margin-top: 10px; font-size: clamp(27px, 7.4vw, 52px); line-height: 1.18; letter-spacing: -.065em; }
.point-copy p:last-child { margin-top: 12px; max-width: 24em; color: var(--text); font-size: 15px; line-height: 1.7; }
.demo { align-self: start; padding: 20px; background: #141413; border-radius: 4px; }
.source { margin-top: 14px; font-size: 12px; color: #77766f; }

/* 01. 같은 물음에 답한 두 풀이를 한 자리에서 바꿔 봅니다. */
.ask { font-size: 20px; font-weight: 600; letter-spacing: -.04em; }
/* 고르지 않아도 두 풀이가 위아래로 바로 보입니다. 흔한 쪽은 흐리게, 우리 쪽은 밝은 바탕으로 둡니다. */
.demo--versus { padding: 20px 0 0; background: none; }
.demo--versus .ask { padding-inline: 2px; }
.answer { margin-top: 12px; padding: 18px 20px; border-radius: 4px; }
.answer--dull { box-shadow: inset 0 0 0 1px var(--rule); }
.answer--ours { background: var(--paper); color: #121210; }
.tag { margin-bottom: 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.answer--ours .tag { color: #121210; }
.answer--ours .source { color: #5f5e59; }
.answer--ours .when { text-decoration-color: #121210; }
.answer p:not(.source, .tag) { font-size: 16px; line-height: 1.8; }
.answer p:not(.tag) + p:not(.source) { margin-top: 10px; }
.answer--dull p:not(.source, .tag) { color: #8b8a86; }
.when { font-weight: 600; text-decoration: underline; text-underline-offset: .23em; text-decoration-color: #8b8a86; }
.flags { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 0; padding: 0; list-style: none; }
.flags li { padding: 4px 10px; border-radius: 99px; font-size: 12px; white-space: nowrap; }
.answer--dull .flags li { color: #8b8a86; box-shadow: inset 0 0 0 1px var(--rule); }
.answer--ours .flags li { background: #121210; color: var(--paper); font-weight: 600; }

/* 02. 문장을 누르면 근거가 그 아래에 열립니다. */
.why summary { display: block; min-height: 0; cursor: pointer; }
.why summary::after, .why[open] summary::after { content: none; }
.why .line { font-size: 17px; line-height: 1.75; text-decoration: underline; text-underline-offset: .23em; text-decoration-color: #8b8a86; }
.why .cue { margin-top: 6px; }
.why .note { margin-top: 6px; padding: 16px 0 0; background: none; border-top: 1px solid var(--rule); }
.years { display: grid; gap: 8px; margin: 0 0 14px; padding: 0; list-style: none; }
.years li { display: grid; grid-template-columns: 3.2em minmax(0, 1fr) 5.2em; gap: 12px; align-items: center; font-variant-numeric: tabular-nums; }
.years b { font-weight: 500; font-size: 15px; color: var(--muted); }
.years i { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--muted) calc(var(--lv) * 20%), var(--rule) 0); }
.years em { font-style: normal; font-size: 12px; color: var(--muted); white-space: nowrap; }
.years [data-pick] b, .years [data-pick] em { color: var(--paper); font-weight: 600; }
.years [data-pick] i { background: linear-gradient(90deg, var(--paper) calc(var(--lv) * 20%), var(--rule) 0); }
[data-level="5"] { --lv: 5; } [data-level="4"] { --lv: 4; } [data-level="3"] { --lv: 3; } [data-level="2"] { --lv: 2; } [data-level="1"] { --lv: 1; }

/* 03. 달마다의 운을 막대로 놓고 본문이 말한 달을 밝힙니다. */
.quote { font-size: 16px; line-height: 1.8; }
.quote mark { background: none; color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: .23em; text-decoration-color: #8b8a86; }
.months { display: grid; grid-template-columns: repeat(10, minmax(0, 1fr)); gap: 4px; align-items: end; height: 96px; margin: 20px 0 0; padding: 0; list-style: none; }
.months li { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; }
.months i { align-self: end; height: calc(var(--lv) * 19%); background: #55544f; border-radius: 2px 2px 0 0; }
.months span { font-size: 11px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.months [data-pick] i { background: var(--paper); }
.months [data-pick] span { color: var(--paper); font-weight: 600; }

/* 04. 예시 사주 여덟 글자와 검증 수치입니다. */
.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; max-width: 340px; }
.glyph { display: grid; place-items: center; height: clamp(50px, 14vw, 66px); background: var(--tile, #1f1f1d); border-radius: 3px; font: 700 clamp(28px, 7.6vw, 38px)/1 'Noto Serif KR', serif; }
.facts, .sent { margin: 0; }
.facts { display: flex; gap: 36px; margin-top: 18px; }
.facts dt, .sent dt { font-size: 13px; color: var(--muted); }
.facts dd { margin: 0; font-size: 30px; line-height: 1.3; font-variant-numeric: tabular-nums; }
.facts small { margin-left: 2px; font-size: 13px; color: var(--muted); }

/* 05. 기기에 두는 값과 보내는 값을 나눠 적습니다. */
.sent { display: grid; gap: 18px; }
.sent div { display: flex; flex-wrap: wrap; gap: 6px; }
.sent dt { width: 100%; margin-bottom: 2px; }
.sent dd { margin: 0; padding: 6px 12px; border-radius: 99px; font-size: 14px; white-space: nowrap; box-shadow: inset 0 0 0 1px #45443f; }
.sent div:first-child dd { background: var(--paper); color: #121210; font-weight: 600; box-shadow: none; }

/* 예시 감정서로 가는 연결. 칸 전체가 눌리고 화살표가 따라 움직입니다. */
.sample-link { position: relative; display: grid; gap: 10px; padding-block: 40px 46px; }
.sample-link::before { content: ""; position: absolute; left: var(--gutter); right: var(--gutter); top: 0; height: 1px; background: var(--rule); }
.sample-kicker { font-size: 13px; color: var(--muted); }
.sample-title { font-size: clamp(29px, 7.6vw, 52px); font-weight: 600; line-height: 1.18; letter-spacing: -.065em; text-wrap: balance; }
.sample-title::after { content: " →"; font: 400 .8em/1 system-ui, sans-serif; white-space: nowrap; }
.sample-meta { max-width: 26em; font-size: 15px; line-height: 1.7; color: var(--text); text-wrap: pretty; }
.sample-link:hover .sample-title, .sample-link:focus-visible .sample-title { text-decoration: underline; text-underline-offset: .18em; text-decoration-thickness: 2px; }
.sample-more { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: -26px; padding-bottom: 40px; }
.sample-more a { display: inline-flex; align-items: center; min-height: 44px; font-size: 17px; font-weight: 600; text-decoration: underline; text-underline-offset: .3em; }
.guide details p + p { margin-top: -10px; }
/* 답에서 먼저 읽을 대목에만 흐린 밑줄을 둡니다. */
.guide u { text-decoration: underline; text-decoration-color: #6b6a66; text-decoration-thickness: 1px; text-underline-offset: .28em; color: var(--paper); }

/* 마지막 구역은 색을 뒤집어 페이지를 크게 닫습니다. */
.finale { margin-top: 12px; padding-block: clamp(56px, 12vw, 120px); background: var(--paper); color: var(--bg, #121210); }
.finale-kicker { font-size: 13px; font-weight: 600; }
.finale h2 { margin-top: 12px; font-size: clamp(40px, 11.4vw, 92px); line-height: 1.08; letter-spacing: -.075em; }
.steps { display: grid; gap: 0; max-width: 520px; margin: 30px 0 0; padding: 0; list-style: none; border-top: 1px solid currentColor; }
.steps li { display: grid; grid-template-columns: 2em minmax(0, 1fr); align-items: center; min-height: 54px; border-bottom: 1px solid color-mix(in srgb, currentColor 28%, transparent); font-size: 16px; }
.steps b { font-weight: 600; font-variant-numeric: tabular-nums; }
.finale-go { display: flex; align-items: center; justify-content: space-between; width: 100%; max-width: 520px; min-height: 64px; margin-top: 28px; padding-inline: 22px; background: var(--bg, #121210); color: var(--paper); border-radius: 3px; font-size: 19px; font-weight: 600; }
.finale-note { margin-top: 14px; font-size: 13px; opacity: .68; }
.finale + .guide::before { content: none; }

/* 첫 화면을 지나면 신청 단추를 엄지가 닿는 아래쪽에 붙여 둡니다. 신청 구역이 보이면 뗍니다. */
.dock { position: fixed; z-index: 3; inset: auto 0 0; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px var(--gutter) max(10px, env(safe-area-inset-bottom)); background: #0d0d0c; border-top: 1px solid var(--rule); }
.dock p { font-size: 14px; color: var(--text); }
body:has(.dock:not([hidden])) main { padding-bottom: 76px; }

@media (max-width: 760px) {
  .point { grid-template-columns: 1fr; padding-block: 34px 40px; }
}
@media (min-width: 761px) {
  .point-copy { position: sticky; top: 28px; align-self: start; }
}

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .lead h1, .lead-sub, .lead-actions { animation: rise 420ms cubic-bezier(.2, .7, .2, 1) both; }
  .lead-sub { animation-delay: 70ms; }
  .lead-actions { animation-delay: 140ms; }
  .dock { animation: rise 220ms ease-out both; }
  /* 근거는 높이가 자라면서 열립니다. 지원하지 않는 브라우저에서는 바로 열립니다. */
  @supports (interpolate-size: allow-keywords) {
    .why { interpolate-size: allow-keywords; }
    .why::details-content { block-size: 0; overflow: clip; transition: block-size 260ms cubic-bezier(.2, .7, .2, 1), content-visibility 260ms allow-discrete; }
    .why[open]::details-content { block-size: auto; }
  }
  /* 대목이 화면에 들어올 때 한 번 올라오고, 막대는 그때 자랍니다. */
  @supports (animation-timeline: view()) {
    /* 글은 숨기지 않고 자리만 조금 올립니다. 움직임이 멈춰도 내용이 보입니다. */
    .point-copy, .demo { animation: lift linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
    .months i { transform-origin: bottom; animation: grow linear both; animation-timeline: view(); animation-range: entry 10% entry 80%; }
  }
  @keyframes rise { from { opacity: 0; translate: 0 10px; } }
  @keyframes lift { from { translate: 0 16px; } }
  @keyframes grow { from { scale: 1 .25; } }
}

.guide a.inline { text-decoration: underline; text-underline-offset: .28em; white-space: nowrap; }
