/* 사주 풀이 — 흰 바탕, 먹색, 가는 선. 그 사람 일간의 오행색(--theme)을 한 가지만 쓴다. */
:root {
  --ink: #1a1a1a;
  --text: #333333;
  --muted: #5c5c5c;
  --rule: #dcdcdc;
  --bg: #ffffff;
  --theme: #b8352a;
  --tint: #f9e8e5;
  --e-목: #1f6b4a; --e-화: #b8352a; --e-토: #8a5a0b; --e-금: #4a5566; --e-수: #1c2740;
  --glyph: "Noto Serif KR", "Batang", serif;  /* 명식의 한자 큰 글자에만 */
  --sans: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--sans); font-size: 16px; line-height: 1.7;
       word-break: keep-all; overflow-wrap: anywhere; /* 한국어는 낱말 단위로 줄바꿈 */ }
a { color: var(--ink); }
a:hover { color: var(--muted); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--theme); outline-offset: 2px; }
[hidden] { display: none !important; }

.head { font-weight: 800; letter-spacing: -0.02em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.measure { max-width: 46em; }
.error { color: #9b2c22; font-size: 15px; }
.topband { height: 6px; background: var(--theme); }
.wrap { max-width: 1160px; margin: 0 auto; padding-left: 24px; padding-right: 24px; }

/* 상단 바 */
.bar { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px 28px; padding-top: 18px; padding-bottom: 18px; border-bottom: 1px solid var(--ink); }
.brand { font-family: var(--sans); font-weight: 900; font-size: 19px; text-decoration: none; }
.nav { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 14px; }
.nav a { text-decoration: none; }
.nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.spend, .push { margin-left: auto; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; cursor: pointer; min-height: 44px; }
.btn-primary { background: var(--ink); color: #ffffff; border: 0; border-radius: 2px; padding: 12px 26px; font-weight: 700; cursor: pointer; min-height: 44px; }
.btn-primary:hover { background: #3a3a3a; }
.btn-primary:disabled { background: #9a9a9a; cursor: not-allowed; }
.row-between { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.row-end { display: flex; justify-content: flex-end; align-items: center; gap: 20px; margin-top: 20px; }

/* 입력 */
.input-layout { display: flex; flex-wrap: wrap; gap: 48px 96px; padding-top: 56px; padding-bottom: 80px; }
.input-intro { flex: 1 1 320px; max-width: 400px; }
.input-intro h1 { margin: 0; font-weight: 900; font-size: 36px; line-height: 1.35; letter-spacing: -0.02em; }
.input-intro p { color: var(--text); line-height: 1.85; margin: 18px 0 0; }
.birth-form { flex: 999 1 480px; min-width: 0; max-width: 520px; display: flex; flex-direction: column; gap: 30px; }
.field { display: flex; flex-direction: column; gap: 10px; border: 0; margin: 0; padding: 0; min-width: 0; }
.field > label, .field > legend { font-weight: 700; font-size: 15px; padding: 0; margin-bottom: 0; }
.hint { font-weight: 400; font-size: 14px; color: var(--muted); }

/* 칸: 옅은 회색 바탕의 둥근 상자, 누르면 테두리가 그 사람 색으로 */
.box { height: 54px; width: 100%; border: 1.5px solid transparent; border-radius: 12px; background: #f3f2ef; padding: 0 16px;
       font-size: 17px; transition: border-color .15s, background-color .15s; }
.box:hover { background: #eeece8; }
.box:focus { outline: none; border-color: var(--ink); background: var(--bg); }
.box[aria-invalid] { border-color: #9b2c22; background: #fbefed; }
.box:disabled { opacity: .45; cursor: not-allowed; }
.box::placeholder { color: #a3a09a; }
.box.big { height: 64px; font-size: 26px; font-weight: 500; letter-spacing: .04em; font-variant-numeric: tabular-nums; }
select.box { appearance: none; cursor: pointer; padding-right: 44px;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
select.box:focus { background-color: var(--bg); }

/* 눌러서 고르는 버튼 묶음 (양력/음력, 여자/남자) */
.seg { display: flex; gap: 4px; padding: 4px; border-radius: 14px; background: #f3f2ef; }
.seg label { flex: 1 1 0; position: relative; cursor: pointer; }
.seg input, .chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg span { display: flex; align-items: center; justify-content: center; min-height: 46px; border-radius: 10px; font-size: 16px;
            color: var(--muted); transition: background-color .15s, color .15s; white-space: nowrap; }
.seg label:hover span { color: var(--ink); }
.seg input:checked + span { background: var(--bg); color: var(--ink); font-weight: 700; box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg input:focus-visible + span, .chip input:focus-visible + span { outline: 2px solid var(--theme); outline-offset: 2px; }

.time-row { display: flex; gap: 10px; }
.time-row .box { flex: 1 1 auto; min-width: 0; }
.chip { flex: 0 0 auto; position: relative; cursor: pointer; }
.chip span { display: flex; align-items: center; height: 64px; padding: 0 22px; border-radius: 12px; border: 1.5px solid var(--rule);
             font-size: 16px; color: var(--muted); transition: all .15s; white-space: nowrap; }
.chip:hover span { border-color: var(--muted); color: var(--ink); }
.chip input:checked + span { background: var(--ink); border-color: var(--ink); color: #ffffff; font-weight: 700; }

.readout { margin: -2px 0 0 4px; min-height: 1.6em; font-size: 15px; color: var(--muted); }
.readout.bad { color: #9b2c22; }

.check { display: flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; font-weight: 400; font-size: 15px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); }
.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.two > label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); font-weight: 400; }
.more { border-top: 1px solid var(--rule); padding-top: 14px; }
.more summary { cursor: pointer; font-size: 15px; min-height: 32px; color: var(--muted); }
.birth-form .btn-primary { height: 60px; border-radius: 12px; font-size: 18px; }

/* 접속 코드 (--lan) */
.gate { max-width: 440px; padding-top: 56px; padding-bottom: 80px; }
.gate h1 { margin: 0 0 12px; font-size: 28px; line-height: 1.35; }
.gate .birth-form { margin-top: 28px; gap: 14px; }
.gate .box.big { text-align: center; letter-spacing: 0.4em; font-size: 30px; }

/* 결과: 첫 화면 */
.hero { display: flex; flex-wrap: wrap; gap: 40px 64px; padding: 56px 0 48px; border-bottom: 1px solid var(--rule); }
.hero-text { flex: 1 1 420px; min-width: 0; }
.hero-text > p:first-child { margin: 0 0 20px; font-size: 14px; }
.hero h1 { margin: 0; font-weight: 900; font-size: 44px; line-height: 1.3; letter-spacing: -0.02em; }
.hero-image { margin: 14px 0 0; font-size: 18px; font-weight: 700; color: var(--theme); }
.lead { margin: 18px 0 0; max-width: 31em; font-size: 17px; line-height: 1.85; }
.hero-table { flex: 0 1 460px; min-width: 0; }
table { border-collapse: collapse; }
.pillar-mini { width: 100%; text-align: center; }
.pillar-mini caption { caption-side: bottom; padding-top: 10px; font-size: 13px; color: var(--muted); text-align: left; }
.pillar-mini th { font-size: 13px; font-weight: 500; color: var(--muted); padding: 0 0 8px; border-bottom: 1px solid var(--ink); }
.pillar-mini td { padding: 4px 0; font-family: var(--glyph); font-weight: 900; font-size: 56px; line-height: 1.15; }
.pillar-mini td.me, .pillar-tiny td.me { background: var(--tint); }
.notes { list-style: none; margin: 16px 0 0; padding: 0; font-size: 14px; color: var(--muted); }
.notes li { padding: 2px 0; }

/* 섹션 공통 */
.sec { padding-top: 72px; }
.sec h2 { margin: 0 0 8px; font-weight: 900; font-size: 26px; }
.sec-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; margin-bottom: 20px; }
.sec-head h2, .sec-head p { margin: 0; }
.split { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.split > * { flex: 1 1 380px; min-width: 0; }
.split.wide-right > :last-child { flex: 999 1 560px; }
.scroll-x { overflow-x: auto; }

/* 여덟 글자 표 */
.pillars-layout { display: flex; flex-wrap: wrap; gap: 32px 48px; align-items: flex-start; }
.pillars-layout > .scroll-x { flex: 999 1 560px; min-width: 0; }
.pillars { width: 100%; min-width: 540px; text-align: center; }
.pillars thead th { padding: 0 0 8px; border-bottom: 1px solid var(--ink); font-weight: 500; font-size: 14px; }
.pillars thead th span { display: block; font-size: 12px; color: var(--muted); font-weight: 400; }
.pillars tbody th { text-align: left; font-size: 13px; font-weight: 500; color: var(--muted); width: 88px; }
.pillars tbody td, .pillars tbody th { border-bottom: 1px solid var(--rule); }
.pillars tbody tr.last td, .pillars tbody tr.last th { border-bottom: 1px solid var(--ink); }
.pillars td { padding: 6px; }
.pillars td.hidden { font-family: var(--glyph); font-size: 17px; letter-spacing: 0.15em; padding: 10px 0; }
.cell { width: 100%; min-height: 44px; display: flex; flex-direction: column; align-items: center; padding: 8px 4px; border: 0; border-radius: 0; background: transparent; cursor: pointer; }
.cell:hover { background: #f5f5f5; }
.cell[aria-pressed="true"] { background: var(--tint); box-shadow: inset 0 -3px 0 var(--theme); }
.cell .g { font-family: var(--glyph); font-weight: 900; font-size: 38px; line-height: 1.2; }
.cell .p { font-size: 13px; font-weight: 500; }
.cell .t { font-size: 11px; color: var(--muted); }
.explain { flex: 1 1 300px; min-width: 0; border-top: 3px solid var(--theme); padding-top: 18px; }
.explain p { margin: 0; }
.explain-head { display: flex; align-items: baseline; gap: 12px; margin: 6px 0 14px !important; }
.explain-head .glyph { font-family: var(--glyph); font-weight: 900; font-size: 48px; line-height: 1; }
.explain-head .head { font-weight: 700; font-size: 20px; }
[data-slot="sel-body"] { line-height: 1.85; }

/* 오행색 글자 */
.e-목 { color: var(--e-목); } .e-화 { color: var(--e-화); } .e-토 { color: var(--e-토); } .e-금 { color: var(--e-금); } .e-수 { color: var(--e-수); }

/* 오행 막대 */
.elements { width: 100%; margin-top: 20px; }
.elements tr { border-bottom: 1px solid var(--rule); }
.elements th { text-align: left; padding: 10px 0; width: 92px; font-weight: 500; }
.elements td { padding: 10px 0; }
.elements td.n { width: 32px; text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.bar-fill { display: block; height: 14px; width: var(--w, 0); min-width: 2px; background: var(--c, var(--ink)); }

/* 관계 */
.relations { margin: 20px 0 0; }
.relations > div { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.relations dt { font-weight: 500; line-height: 1.75; }
.relations dd { margin: 4px 0 0; font-size: 13px; color: var(--muted); }
.relations .where { font-size: 13px; color: var(--muted); display: block; }

/* 대운 */
.daewoon { width: 100%; min-width: 1000px; text-align: center; table-layout: fixed; margin-top: 22px; }
.daewoon td { padding: 2px 4px; }
.daewoon tr:first-child td { border-top: 1px solid var(--ink); padding-top: 10px; font-size: 13px; }
.daewoon tr:first-child td span { display: block; color: var(--muted); }
.daewoon tr:nth-child(2) td { font-family: var(--glyph); font-weight: 900; font-size: 26px; }
.daewoon tr:last-child td { border-bottom: 1px solid var(--ink); padding-bottom: 12px; font-size: 13px; }
.daewoon tr:last-child td strong { display: block; font-weight: 700; font-size: 13px; line-height: 1.5; }
.daewoon tr:last-child td span { display: block; color: var(--muted); font-size: 11px; margin-top: 2px; }
.daewoon td.now { background: var(--tint); }
.daewoon tr:first-child td.now { box-shadow: inset 0 3px 0 var(--theme); }

/* 올해 */
.year-head { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 16px; }
.year-nav { display: flex; gap: 16px; font-size: 14px; }
[data-slot="year-paras"] p { margin: 0 0 14px; line-height: 1.85; }
.months { width: 100%; min-width: 540px; font-size: 14px; }
.months thead tr { border-bottom: 1px solid var(--ink); text-align: left; color: var(--muted); }
.months th { font-weight: 500; padding: 0 0 8px; text-align: left; }
.months td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--rule); }
.months td:first-child { font-variant-numeric: tabular-nums; width: 64px; }
.months td.gz { font-family: var(--glyph); font-weight: 700; font-size: 16px; width: 72px; }
.months .note { display: block; }
.months .sub { display: block; font-size: 11px; color: var(--muted); }
.months tr.now td { border-top: 2px solid var(--ink); border-bottom: 2px solid var(--ink); background: var(--tint); }

/* 풀이 받기 */
.ai { margin-top: 80px; padding-top: 40px; border-top: 1px solid var(--ink); }
.topics { width: 100%; margin-top: 18px; }
.topics tr { border-top: 1px solid var(--rule); }
.topics tr:last-child { border-bottom: 1px solid var(--rule); }
.topics th { text-align: left; padding: 12px 0; font-weight: 700; width: 96px; }
.topics td { padding: 8px 0 8px 8px; }
.topics td.desc { color: var(--muted); font-size: 14px; }
.topics td.cost { text-align: right; font-size: 13px; color: var(--muted); white-space: nowrap; }
.topics td.act { text-align: right; width: 88px; }
.ask-box { display: flex; flex-direction: column; gap: 10px; }
.ask-box label { font-weight: 700; font-size: 18px; }
.ask-box textarea { border: 1px solid var(--ink); border-radius: 2px; padding: 12px; font-size: 16px; resize: vertical; width: 100%; }
.ask-box p { margin: 4px 0 0; }

.foot { margin-top: 56px; padding: 16px 0 72px; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; font-size: 13px; color: var(--muted); }
.foot .link { margin-left: auto; color: var(--ink); min-height: 0; }
.foot .full { flex-basis: 100%; }

/* 리포트·질문 */
.report-layout { display: flex; flex-wrap: wrap; gap: 48px 72px; padding-top: 48px; padding-bottom: 96px; }
.article, .thread { flex: 999 1 560px; min-width: 0; max-width: 700px; }
.article .kicker { margin: 0; font-size: 14px; color: var(--muted); }
.article h1 { margin: 10px 0 32px; font-family: var(--sans); font-weight: 900; font-size: 36px; line-height: 1.35; letter-spacing: -0.02em; }
.md { counter-reset: chapter; }
.md h2 { font-family: var(--sans); font-weight: 700; font-size: 23px; margin: 48px 0 14px; padding-top: 20px; border-top: 1px solid var(--rule); }
.md h2::before { counter-increment: chapter; content: counter(chapter, decimal-leading-zero); display: block; font-family: var(--sans); font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--theme); margin-bottom: 6px; }
.md .footnote h2::before { content: none; }
.booklet-head { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 24px; padding: 18px 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); margin-bottom: 8px; }
.booklet-head p { margin: 0; }
.booklet-head .strong { font-weight: 700; font-size: 18px; }
.colophon { margin-top: 40px; font-size: 13px; color: var(--muted); }
.md h3 { font-family: var(--sans); font-weight: 700; font-size: 19px; margin: 28px 0 10px; }
.md p, .md li { line-height: 1.95; }
.md ul, .md ol { padding-left: 22px; }
.md table { width: 100%; margin: 16px 0; font-size: 14px; }
.md th, .md td { border-bottom: 1px solid var(--rule); padding: 8px 8px 8px 0; text-align: left; vertical-align: top; }
.md thead th { border-bottom: 1px solid var(--ink); color: var(--muted); font-weight: 500; }
.md blockquote { margin: 0 0 24px; padding-left: 18px; border-left: 3px solid var(--theme); font-family: var(--sans); font-size: 18px; }
.md hr { border: 0; border-top: 1px solid var(--rule); margin: 32px 0; }
.md sup a { text-decoration: none; color: var(--theme); font-weight: 700; font-size: 12px; padding: 0 1px; }
.md .footnote { margin-top: 48px; padding-top: 12px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--text); }
.md .footnote hr { display: none; }
.md .footnote p { line-height: 1.7; margin: 0; }
.md .footnote-backref { text-decoration: none; color: var(--muted); }
.side { flex: 1 1 260px; min-width: 0; }
.side-title { margin: 0 0 10px; font-size: 14px; font-weight: 700; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
.side p, .side ol { margin: 0 0 32px; line-height: 1.85; color: var(--text); }
.side ol { padding-left: 18px; }
.side ol a { text-decoration: none; }
/* 풀이 페이지: 장 하나가 한 페이지 */
.page > h2 { font-family: var(--sans); font-weight: 700; font-size: 30px; line-height: 1.4; letter-spacing: -0.01em; margin: 6px 0 28px; }
.page .md h2 { font-size: 23px; margin-top: 56px; }
.page .md h2::before { content: none; }
.page .md > p:first-child { font-family: var(--sans); font-size: 19px; line-height: 1.85; color: var(--ink); }
.page-head { display: flex; align-items: center; gap: 16px; margin-top: 28px; }
.page-head .no { font-size: 13px; font-weight: 700; letter-spacing: 0.12em; color: var(--theme); }
.page-head .progress { flex: 1; height: 2px; background: var(--rule); }
.page-head .progress span { display: block; height: 100%; background: var(--theme); }
.page-notes { margin: 48px 0 0; padding: 14px 0 0 22px; border-top: 1px solid var(--ink); font-size: 14px; color: var(--text); }
.page-notes p { margin: 0; line-height: 1.7; }
.page-notes .footnote-backref { text-decoration: none; color: var(--muted); }
.pager { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 16px; margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--ink); }
.pager a { display: flex; flex-direction: column; gap: 2px; text-decoration: none; min-height: 44px; }
.pager a span { font-size: 13px; color: var(--muted); }
.pager a strong { font-family: var(--sans); font-size: 17px; line-height: 1.45; }
.pager a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.pager .next { text-align: right; align-items: flex-end; }
.pager .count { font-size: 13px; color: var(--muted); padding-bottom: 4px; }
.cover-art { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 0 0 28px; }
.cover .booklet-head { margin-bottom: 40px; }
.contents-title { font-size: 14px; font-weight: 700; margin: 0 0 4px; }
.contents { list-style: none; margin: 0; padding: 0; }
.contents li { border-bottom: 1px solid var(--rule); }
.contents a { display: flex; gap: 18px; align-items: baseline; padding: 12px 0; text-decoration: none; font-family: var(--sans); font-size: 18px; line-height: 1.5; min-height: 44px; }
.contents a:hover { color: var(--theme); }
.contents .no { font-family: var(--sans); font-size: 13px; font-weight: 700; color: var(--theme); letter-spacing: 0.08em; flex: none; }
.side .toc { padding-left: 0; list-style: none; }
.side .toc a { display: block; padding: 5px 0; line-height: 1.5; color: var(--muted); }
.side .toc a:hover { color: var(--ink); }
.side .toc a[aria-current="page"] { color: var(--ink); font-weight: 700; }

/* 그림과 도표 */
.fig { margin: 0 0 36px; }
.fig figcaption { display: flex; flex-direction: column; gap: 2px; margin-top: 12px; font-size: 14px; line-height: 1.7; color: var(--text); }
.fig figcaption strong { font-family: var(--sans); font-size: 17px; color: var(--ink); }
.fig .art { background: var(--tint); }
.fig .art svg { display: block; width: 100%; height: auto; }
.page > .fig.portrait { display: grid; grid-template-columns: minmax(0, 200px) 1fr; gap: 24px; align-items: end; }
.cover-art .fig { margin: 0; }
.diagram { padding: 24px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.diagram svg { display: block; width: 100%; max-width: 380px; margin: 0 auto; }
.diagram .w-name { font-family: var(--sans); font-weight: 700; font-size: 16px; }
.diagram .w-count, .diagram .w-me { font-size: 13px; font-weight: 700; }
.dw-strip { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.dw-strip li { border: 1px solid var(--rule); padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; }
.dw-strip .when { font-size: 12px; color: var(--muted); }
.dw-strip strong { font-family: var(--sans); font-size: 15px; line-height: 1.45; font-weight: 700; }
.dw-strip li.now { background: var(--theme); border-color: var(--theme); color: #ffffff; }
.dw-strip li.now .when { color: rgba(255, 255, 255, 0.8); }
.dw-strip .tag { font-size: 12px; font-weight: 700; }
.month-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.month-grid li { border: 1px solid var(--rule); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; min-height: 104px; }
.month-grid .m { font-size: 13px; font-weight: 700; }
.month-grid .theme { font-family: var(--sans); font-size: 15px; line-height: 1.45; flex: 1; }
.month-grid .sig { font-size: 12px; color: var(--muted); }
.month-grid .sig-smooth { background: var(--tint); border-color: var(--tint); }
.month-grid .sig-rough { border-color: var(--theme); }
.month-grid .sig-rough .sig { color: var(--theme); font-weight: 700; }
.month-grid .sig-peak { background: var(--theme); border-color: var(--theme); color: #ffffff; }
.month-grid .sig-peak .sig { color: #ffffff; font-weight: 700; }
.month-grid li.now { outline: 2px solid var(--ink); outline-offset: -2px; }

.empty-state { padding: 24px 0; }
.empty-state p { line-height: 1.85; }

.qa { padding-bottom: 32px; margin-bottom: 28px; border-bottom: 1px solid var(--rule); }
.qa > h2 { margin: 0 0 16px; font-family: var(--sans); font-weight: 700; font-size: 22px; line-height: 1.5; }
.qa .meta { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.pillar-tiny { text-align: center; font-family: var(--glyph); font-weight: 900; font-size: 26px; line-height: 1.25; margin-bottom: 8px; }
.pillar-tiny td { padding: 2px 10px; }
.suggest { list-style: none; margin: 0 0 24px; padding: 0; }
.suggest li { border-bottom: 1px solid var(--rule); }
.suggest button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 0; font-size: 15px; cursor: pointer; min-height: 44px; }
.suggest button:hover { color: var(--muted); }

/* 확인 창·진행 중 */
.confirm { border: 1px solid var(--ink); border-radius: 2px; padding: 28px 32px; max-width: 460px; width: calc(100% - 32px); }
.confirm::backdrop { background: rgba(0, 0, 0, 0.35); }
.confirm h2 { margin: 0 0 12px; font-weight: 900; font-size: 22px; }
.confirm p { margin: 0 0 8px; line-height: 1.8; }
.busy { position: fixed; inset: 0; background: rgba(255, 255, 255, 0.94); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; z-index: 10; }
.busy .head { font-size: 24px; font-weight: 700; margin: 0; }
.busy p { margin: 0; }
.busy .head::after { content: ""; display: inline-block; width: 1.4em; text-align: left; animation: dots 1.4s steps(4) infinite; }
@keyframes dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

@media (max-width: 640px) {
  .wrap { padding-left: 18px; padding-right: 18px; }
  /* 상단 바: 1줄 = 이름 + 다른 사람 보기, 2줄 = 옆으로 미는 메뉴 */
  .bar { flex-wrap: wrap; align-items: center; gap: 0 12px; padding-top: 12px; padding-bottom: 0; }
  .bar > a.small:last-child { margin-left: auto; }
  .bar > .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; margin: 6px -18px 0; padding: 0 18px;
                scrollbar-width: none; white-space: nowrap; }
  .bar > .nav::-webkit-scrollbar { display: none; }
  .bar > .nav a { display: flex; align-items: center; min-height: 44px; font-size: 15px; }
  .bar > .spend { display: none; }
  .bar:not(:has(.nav)) { padding-bottom: 12px; }
  .hero { padding: 32px 0 36px; }
  .hero h1 { font-size: 28px; line-height: 1.35; }
  .pillar-mini td { font-size: 44px; }
  /* 여덟 글자 표: 옆으로 밀지 않고 한 화면에 */
  .pillars { min-width: 0; table-layout: fixed; }
  .pillars tbody th { width: 46px; font-size: 12px; }
  .pillars thead th { font-size: 13px; }
  .pillars td { padding: 4px 1px; }
  .cell { padding: 8px 0; }
  .cell .g { font-size: 32px; }
  .cell .p { font-size: 12px; letter-spacing: -0.02em; }
  .pillars td.hidden { font-size: 15px; letter-spacing: 0.05em; }
  .daewoon { min-width: 720px; }
  .months { min-width: 0; }
  .months td.gz { width: 52px; }
  .input-layout { gap: 28px; padding-top: 28px; padding-bottom: 56px; }
  .input-intro h1 { font-size: 26px; }
  .input-intro p { font-size: 15px; line-height: 1.75; margin-top: 12px; }
  .two { grid-template-columns: 1fr; }
  .relations > div { grid-template-columns: 1fr; }
  .topics td.desc { display: none; }
  .spend { margin-left: 0; flex-basis: 100%; }
  .page > h2 { font-size: 25px; }
  .page .md p, .page .md li { font-size: 17px; line-height: 1.85; }
  .page .md h3 { font-size: 19px; margin-top: 32px; }
  .page .fig svg { max-width: 300px; margin: 0 auto; display: block; }
  .side .toc { display: none; }  /* 휴대폰에서는 아래 이전·다음으로 넘긴다 */
  .page > .fig.portrait { grid-template-columns: 120px 1fr; gap: 16px; }
  .cover-art { gap: 12px; }
  .month-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pager { grid-template-columns: 1fr 1fr; }
  .pager .count { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .busy .head::after { animation: none; content: "..."; }
}
