/* 동양풍 테마: 책력(冊曆) 종이 위에 먹과 주사로 짠 사주 이야기책.
   색은 :root 변수만 바꾸면 돼요. 이 테마 처음 판(밤 먹빛·낮 한지)의 색과 글꼴을 그대로 이어 써요.
   브라우저가 어두운 화면 모드여도 종이 한 가지로 보여요(color-scheme: light).
   휴대폰 모양을 먼저 적고, 넓은 화면(@media)은 맨 아래에 모았어요. 그러데이션·그림자·흐림은 쓰지 않아요. */
:root {
  color-scheme: light;
  --paper: #ece2cd;      /* 책력 종이(바탕) */
  --paper-2: #e2d6bb;    /* 한 톤 짙은 종이 */
  --paper-3: #d6c7a6;
  --sheet: #f7f1e3;      /* 밝은 지면 */
  --ink: #1f1914;        /* 먹 */
  --ink-2: #5d5246;
  --ink-3: #6e6253;
  --rule-soft: #cdbd9c;  /* 옅은 괘선 */
  --night: #172033;      /* 밤 하늘 */
  --night-2: #22304a;
  --night-text: #ede5d3;
  --night-sub: #b8ad98;
  --moon: #c9a65e;       /* 금빛 */
  --seal: #b5382a;       /* 주사(인주) */
  --seal-2: #962c20;
  --seal-soft: #f3ddd2;
  --link: #8f2c20;
  --el-wood: #4f8a5f; --el-fire: #c4503b; --el-earth: #b8913f; --el-metal: #a9a49a; --el-water: #3c5a86;
  /* 오행 글자색(종이 위에서 읽히게 한 톤 짙게) */
  --tx-wood: #3d6e4b; --tx-fire: #a83f2c; --tx-earth: #85661f; --tx-metal: #6b665d; --tx-water: #2f4a72;
  --title: "Song Myung", "Nanum Myeongjo", serif;
  --body: "Gowun Batang", "Nanum Myeongjo", serif;
  --hanja: "Nanum Myeongjo", "Song Myung", serif;
  --ui: "Gowun Dodum", "Gowun Batang", sans-serif;
  --brush: "East Sea Dokdo", "Nanum Brush Script", "Song Myung", cursive;
  --hand: "Nanum Brush Script", "Gowun Batang", cursive;
  --wrap: 1200px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body {
  margin: 0; min-height: 100vh; background: var(--paper); color: var(--ink);
  font-family: var(--body); font-size: 16.5px; line-height: 1.75; word-break: keep-all; overflow-wrap: break-word;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ol, ul, dl, dd, figure { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
:focus-visible { outline: 2px solid var(--seal); outline-offset: 3px; }
.booting { min-height: 60vh; display: grid; place-items: center; font-family: var(--title); color: var(--ink-3); letter-spacing: .2em; }
.calli { font-family: var(--brush); font-weight: 400; letter-spacing: .02em; line-height: 1; }
.small { font-family: var(--ui); font-size: 13px; line-height: 1.65; color: var(--ink-3); }
.em { color: var(--seal); font-weight: 700; }

/* 샘플 사이트 띠 */
.demo-bar { position: relative; z-index: 60; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px 14px; padding: 7px 14px; background: var(--ink); color: var(--night-sub); font-family: var(--ui); font-size: 13px; }
.demo-bar span { letter-spacing: .1em; }
.demo-bar a { padding: 2px 10px; border: 1px solid rgba(201, 166, 94, .5); }
.demo-bar a[aria-current] { background: var(--moon); color: var(--ink); border-color: var(--moon); }
.demo-bar a.back { border: 0; color: var(--moon); text-decoration: underline; text-underline-offset: 3px; }

/* 단추·글 링크: 주사 도장색 단추 하나, 먹선 단추 하나 */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; background: var(--seal); color: #fff7ea; font-family: var(--ui); font-size: 16px; font-weight: 700; border-radius: 2px; text-align: center; line-height: 1.35; transition: background-color .15s; }
.btn:hover { background: var(--seal-2); }
.btn.wide { display: flex; width: 100%; }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.btn.ghost:hover { background: var(--paper-2); }
.btn.light { background: var(--night-text); color: var(--night); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:active:not(:disabled) { transform: translateY(1px); }
.link { display: inline-block; padding: 6px 2px; font-family: var(--ui); font-size: 14.5px; color: var(--link); text-decoration: underline; text-underline-offset: 4px; }
.link:disabled { opacity: .5; }

/* 제목 줄 */
.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); font-family: var(--title); font-size: 22px; font-weight: 400; line-height: 1.35; }
.sec-head small { font-family: var(--ui); font-size: 13px; color: var(--ink-3); text-align: right; }
.side-head { margin-bottom: 8px; padding-bottom: 6px; border-bottom: 1px solid var(--rule-soft); font-family: var(--ui); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink-3); }

/* 위 막대 */
.topbar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 2px solid var(--ink); }
.topbar-in { display: flex; align-items: center; gap: 12px; max-width: var(--wrap); margin: 0 auto; padding: 10px 16px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--title); font-size: 20px; letter-spacing: .04em; white-space: nowrap; }
.seal-mark { display: inline-grid; place-items: center; width: 30px; height: 30px; flex: none; background: var(--seal); color: #f6ead2; font-family: var(--hanja); font-weight: 800; font-size: 16px; line-height: 1; border-radius: 3px; transform: rotate(-5deg); box-shadow: inset 0 0 0 2px rgba(246, 234, 210, .35); }
.menu { display: none; }
.top-btn { margin-left: auto; padding: 8px 14px; font-family: var(--ui); font-size: 14px; font-weight: 700; color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; white-space: nowrap; }
.top-btn:hover { background: var(--ink); color: var(--paper); }

/* ── 상점: 이달 책력 ── */
.al-spread { display: grid; gap: 0; padding: 18px 14px 0; }
.al-page { padding: 16px 12px 14px; background: var(--sheet); border: 1px solid var(--ink); position: relative; }
.al-head { display: grid; gap: 4px; padding-bottom: 12px; margin-bottom: 10px; border-bottom: 1px solid var(--ink); }
.al-kicker { font-family: var(--ui); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--seal); }
.al-title { display: flex; align-items: baseline; gap: 6px; font-weight: 400; line-height: 1; }
.al-title b { font-family: var(--hanja); font-weight: 800; font-size: 64px; color: var(--ink); }
.al-title span { font-family: var(--title); font-size: 26px; }
.al-title small { margin-left: auto; font-family: var(--title); font-size: 18px; color: var(--ink-2); }
.al-terms { display: flex; flex-wrap: wrap; gap: 2px 14px; font-family: var(--ui); font-size: 13.5px; color: var(--ink-2); }
.al-terms b { color: var(--seal); }
.al-nav { display: flex; gap: 8px; margin-top: 6px; }
.al-nav button, .month-nav button:not(.link), .day-nav button:not(.link) { padding: 6px 12px; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; font-family: var(--ui); font-size: 14px; font-weight: 700; }
.al-key { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 10px; font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
.al-key i { display: inline-block; width: 11px; height: 11px; margin-right: 5px; vertical-align: -1px; }
.al-key .k-term { background: var(--seal); }
.al-key .k-son { border-radius: 50%; background: var(--el-wood); }
.al-key .k-today { border: 2px solid var(--ink); }
.al-key .k-good { background: var(--seal-soft); border: 1px solid var(--seal); }
.al-side { padding: 0; }

/* 책력 날짜판(상점·좋은 날 택일이 같이 써요) */
.ag-wait { padding: 20px 0; font-family: var(--title); color: var(--ink-3); text-align: center; }
.ag-head, .ag-body { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); }
.ag-head { border-bottom: 1px solid var(--rule-soft); }
.ag-wd { padding: 2px 0 4px; text-align: center; font-family: var(--ui); font-size: 12px; font-weight: 700; color: var(--ink-2); }
.ag-wd.sun { color: var(--seal); }
.ag-wd.sat { color: var(--el-water); }
.ag-day { position: relative; display: grid; justify-items: center; align-content: start; gap: 0; min-height: 60px; padding: 4px 1px 4px; border-bottom: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft); text-align: center; line-height: 1.2; }
.ag-body > :nth-child(7n) { border-right: 0; }
.ag-day b { font-family: var(--title); font-weight: 400; font-size: 17px; line-height: 1.25; }
.ag-day.sun b { color: var(--seal); }
.ag-gz { font-family: var(--hanja); font-size: 11px; color: var(--ink-3); white-space: nowrap; }
.ag-term, .ag-lunar { margin-top: 2px; font-style: normal; font-family: var(--ui); font-size: 10.5px; white-space: nowrap; }
.ag-term { padding: 0 3px; background: var(--seal); color: #fff7ea; }
.ag-lunar { color: var(--ink-3); }
.ag-son { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--el-wood); }
.ag-day.today { box-shadow: inset 0 0 0 2px var(--ink); }
.ag-day.pick { background: var(--paper-2); box-shadow: inset 0 0 0 2px var(--seal); }
.ag-day.today.pick { box-shadow: inset 0 0 0 2px var(--ink), inset 0 0 0 4px var(--seal); }
.ag-day.good { background: var(--seal-soft); }
.ag-day.good b { color: var(--seal); font-weight: 700; }
.ag-day.dim { opacity: .45; }
.ag-day:hover { background: var(--paper-2); }

/* 고른 날 풀이 */
.day-panel { display: grid; gap: 6px; padding: 18px 2px 4px; }
.dp-kicker { font-family: var(--ui); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--seal); }
.dp-date { font-family: var(--title); font-size: 24px; line-height: 1.35; }
.dp-gz { font-family: var(--ui); font-size: 14px; color: var(--ink-2); }
.dp-gz b { margin-right: 8px; font-family: var(--hanja); font-weight: 800; font-size: 20px; color: var(--ink); }
.dp-rows { display: grid; margin: 6px 0 2px; border-top: 1px solid var(--ink); }
.dp-rows > div { display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: 15px; line-height: 1.6; }
.dp-rows dt { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--ink-3); }
.dp-daily { display: flex; align-items: baseline; gap: 10px; margin-top: 4px; padding: 8px 12px; border: 1px solid var(--seal); }
.dp-daily span { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--seal); }
.dp-daily b { font-family: var(--title); font-weight: 400; font-size: 34px; line-height: 1; color: var(--seal); }
.dp-daily em { font-style: normal; font-family: var(--title); }
.dp-free { font-family: var(--ui); font-size: 13.5px; color: var(--ink-2); }
.dp-actions { display: grid; gap: 4px; justify-items: start; margin-top: 10px; }
.dp-actions .btn { width: 100%; }

/* 때로 묶은 책장 */
.store { display: grid; gap: 0; padding: 0 14px; }
.when-nav { padding-top: 30px; }
.when-nav ol { display: flex; flex-wrap: wrap; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink); }
.when-nav li { flex: 1 1 auto; }
.when-nav button { display: flex; flex-direction: column; align-items: center; width: 100%; padding: 8px 6px; font-family: var(--title); font-size: 15px; line-height: 1.3; }
.when-nav li + li button { border-left: 1px solid var(--rule-soft); }
.when-nav button small { font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); }
.when-nav button:hover { background: var(--paper-2); }
.shelf-group { padding-top: 28px; scroll-margin-top: 74px; }
.shelf-list { display: grid; border-top: 1px solid var(--rule-soft); }
.shelf-list > li { border-bottom: 1px solid var(--rule-soft); }
.book { display: grid; grid-template-columns: 80px minmax(0, 1fr); gap: 14px; align-items: center; padding: 12px 0; }
.book-cover, .ol-cover { position: relative; display: block; aspect-ratio: 3 / 4; overflow: hidden; background: var(--night); border: 1px solid var(--ink); }
.mini-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.book-narrator { position: absolute; bottom: 0; right: 0; width: 88%; }
.book-badge { position: absolute; top: 4px; left: 4px; padding: 2px 5px; background: var(--seal); color: #fff7ea; font: 700 10.5px/1.25 var(--ui); font-style: normal; }
.book-text { display: grid; gap: 1px; justify-items: start; }
.book-title { font-family: var(--title); font-size: 20px; font-weight: 400; line-height: 1.35; }
.book-sub { font-size: 14px; color: var(--ink-2); }
.book-quote { display: none; }
.book-price { margin-top: 4px; font-family: var(--ui); font-size: 14.5px; font-weight: 700; font-style: normal; color: var(--seal); }
.book:hover .book-title { text-decoration: underline; text-underline-offset: 4px; }

/* 이야기꾼 */
.narrators { padding: 40px 14px 0; }
.narrators ul { display: grid; gap: 14px; }
.narrators li { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; align-items: center; }
.face, .speech-face, .ask-face, .letter-face { display: block; overflow: hidden; border-radius: 50%; background: var(--paper-2); border: 1px solid var(--ink); }
.face { width: 64px; height: 64px; }
.face .narrator-art, .speech-face .narrator-art, .ask-face .narrator-art, .letter-face .narrator-art { width: 130%; margin: -6% 0 0 -15%; }
.nar-text { display: grid; }
.nar-text b { font-family: var(--title); font-weight: 400; font-size: 18px; }
.nar-text em { font-style: normal; font-family: var(--ui); font-size: 13px; color: var(--seal); }
.nar-text span { font-size: 14px; color: var(--ink-2); }
.narrator-art { display: block; width: 100%; height: auto; }

/* 맨 아래 */
.foot { margin-top: 56px; background: var(--paper-2); border-top: 2px solid var(--ink); }
.foot-in { display: grid; gap: 18px; max-width: var(--wrap); margin: 0 auto; padding: 28px 16px calc(40px + env(safe-area-inset-bottom)); font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.foot-brand { display: grid; gap: 8px; justify-items: start; }
.foot-brand .brand { font-size: 17px; color: var(--ink); }
.foot-brand .seal-mark { width: 26px; height: 26px; font-size: 14px; }
.foot-legal { display: grid; gap: 8px; justify-items: start; }
.legal-foot { display: grid; gap: 6px; }
.legal-links { display: flex; flex-wrap: wrap; gap: 2px 14px; }
.legal-links a { color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; }
.legal-links b { color: var(--ink); }
.biz { display: flex; flex-wrap: wrap; gap: 0 10px; font-size: 12px; line-height: 1.7; color: var(--ink-3); }
.biz span { overflow-wrap: anywhere; }

/* ── 이야기 표지: 표제가 먼저, 그림은 그 아래 ── */
.view-landing { padding-bottom: 76px; }
.land { display: grid; gap: 0; }
.land-head { display: grid; gap: 10px; padding: 22px 16px 0; }
.crumb { display: none; }
.lh-when { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-family: var(--ui); font-size: 13.5px; color: var(--ink-2); }
.when-tag { padding: 1px 9px; background: var(--ink); color: var(--paper); font-family: var(--ui); font-size: 12.5px; font-weight: 700; }
.lh-title { font-size: clamp(60px, 17vw, 96px); color: var(--ink); }
.lh-quote { font-size: 17px; line-height: 1.65; color: var(--ink-2); }
.when-ruler { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 6px; border-top: 2px solid var(--ink); }
.when-ruler li { position: relative; padding: 10px 2px 2px; text-align: center; font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
.when-ruler li::before { content: ""; position: absolute; top: -2px; left: 50%; width: 1px; height: 8px; background: var(--ink); }
.when-ruler li.on { color: var(--seal); font-weight: 700; }
.when-ruler li.on::before { width: 12px; height: 12px; top: -7px; margin-left: -6px; border-radius: 50%; background: var(--seal); }
.land-buy { display: none; }
.land-main { padding: 22px 16px 0; }
.land-sec { padding-top: 34px; }
.land-sec .webtoon { margin-top: 4px; }
.toc { display: grid; border-top: 1px solid var(--rule-soft); }
.toc li { display: grid; grid-template-columns: 34px minmax(0, 1fr); align-items: baseline; padding: 9px 2px; border-bottom: 1px solid var(--rule-soft); font-family: var(--title); font-size: 17px; line-height: 1.5; }
.toc .no { font-family: var(--hanja); font-weight: 700; color: var(--seal); }
.price-box ul { display: grid; gap: 6px; font-size: 15.5px; line-height: 1.65; }
.price-box li { position: relative; padding-left: 16px; }
.price-box li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: var(--seal); font-size: 9px; }
.price-box .small { margin-top: 12px; }
.price-box .sec-head small { font-family: var(--title); font-size: 19px; color: var(--seal); }
.other-list { display: grid; border-top: 1px solid var(--rule-soft); }
.other-list li { border-bottom: 1px solid var(--rule-soft); }
.other-list a { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 10px 0; }
.ol-text { display: grid; }
.ol-text b { font-family: var(--title); font-weight: 400; font-size: 17px; line-height: 1.4; }
.ol-text span { font-size: 13.5px; color: var(--ink-2); }
.other-list em { font-family: var(--ui); font-size: 14px; font-weight: 700; font-style: normal; color: var(--seal); white-space: nowrap; }
.other-list a:hover b { text-decoration: underline; text-underline-offset: 4px; }
.sticky-cta { position: fixed; z-index: 45; left: 0; right: 0; bottom: 0; display: flex; gap: 14px; align-items: center; padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); background: var(--paper); border-top: 2px solid var(--ink); }
.cta-price { font-family: var(--title); font-size: 18px; color: var(--seal); white-space: nowrap; }
.sticky-cta .btn { flex: 1; }
.badge { position: absolute; z-index: 3; top: 12px; left: 12px; padding: 3px 8px; background: var(--seal); color: #fff7ea; font: 700 12px/1.3 var(--ui); letter-spacing: .06em; }

/* 이야기꾼 말 */
.speech { display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 14px; align-items: start; }
.speech-face { width: 72px; height: 72px; }
.speech-bubble { position: relative; padding: 12px 16px 14px; background: var(--sheet); border: 1px solid var(--ink); border-radius: 14px; }
.speech-bubble::before { content: ""; position: absolute; left: -7px; top: 24px; width: 12px; height: 12px; background: var(--sheet); border-left: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); }
.speech-bubble b { display: block; font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--seal); }
.speech-bubble p { font-size: 17px; line-height: 1.7; }

/* ── 풀이 ── */
.read-bar { position: sticky; top: 0; z-index: 40; background: var(--paper); border-bottom: 2px solid var(--ink); }
.read-bar-in { display: flex; align-items: center; gap: 10px; max-width: 1180px; margin: 0 auto; padding: 8px 14px; min-height: 54px; }
.read-bar .brand { display: none; }
.back-link { padding: 2px 8px 4px 0; font-size: 28px; line-height: 1; color: var(--ink); }
.read-title { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 10px; flex: 1; min-width: 0; }
.read-title b { font-family: var(--title); font-weight: 400; font-size: 18px; }
.read-who { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.toc-drop { position: relative; }
.toc-drop summary { list-style: none; padding: 6px 12px; font-family: var(--ui); font-size: 14px; font-weight: 700; color: var(--ink); border: 1px solid var(--ink); border-radius: 2px; cursor: pointer; }
.toc-drop summary::-webkit-details-marker { display: none; }
.toc-drop[open] summary { background: var(--ink); color: var(--paper); }
.toc-drop .toc-list { position: absolute; z-index: 50; right: 0; top: calc(100% + 10px); width: min(300px, calc(100vw - 28px)); padding: 6px 14px; background: var(--sheet); border: 1px solid var(--ink); border-top: 4px solid var(--seal); }
.progress { position: absolute; left: 0; right: 0; bottom: -2px; height: 3px; }
.progress i { display: block; height: 100%; width: 0; background: var(--seal); }
.toc-list { display: grid; }
.toc-list button { display: grid; grid-template-columns: 30px minmax(0, 1fr); width: 100%; padding: 8px 2px; text-align: left; font-family: var(--title); font-size: 16px; line-height: 1.45; color: var(--ink-2); border-bottom: 1px solid var(--rule-soft); }
.toc-list li:last-child button { border-bottom: 0; }
.toc-list .no { font-family: var(--hanja); font-weight: 700; color: var(--seal); }
.toc-list button[aria-current] { color: var(--ink); background: var(--paper-2); }
.toc-list button:hover { color: var(--ink); }

.read { padding: 16px 14px 0; }
.read-left { display: none; }
.read-main { max-width: 720px; margin: 0 auto; }
.read-end { display: grid; gap: 18px; padding-top: 34px; }
.end-actions { display: grid; }
.end-others { padding-top: 12px; }
.paid-note { max-width: 720px; margin: 14px auto 0; padding: 12px 14px; background: var(--sheet); border: 1px solid var(--ink); border-top: 4px solid var(--seal); font-family: var(--ui); font-size: 14.5px; line-height: 1.6; }
.pn-row { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 6px; }
.pn-row code { padding: 2px 6px; background: var(--paper-2); font-size: 14px; overflow-wrap: anywhere; }

/* 풀이 머리: 제목 + 지금 지나는 때(대운·올해·이달·오늘) */
.read-head { display: grid; gap: 6px; padding: 6px 0 4px; }
.rh-kicker { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--seal); }
.rh-title { font-size: clamp(56px, 16vw, 84px); color: var(--ink); }
.rh-who { font-family: var(--ui); font-size: 14px; color: var(--ink-2); }
.now-band { margin-top: 12px; border: 1px solid var(--ink); background: var(--sheet); }
.nb-title { padding: 6px 12px; border-bottom: 1px solid var(--ink); font-family: var(--ui); font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2); }
.now-band ol { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.now-band li { display: grid; justify-items: center; align-content: start; gap: 2px; padding: 10px 4px 12px; text-align: center; }
.now-band li + li { border-left: 1px solid var(--rule-soft); }
.nb-label { font-family: var(--ui); font-size: 12px; font-weight: 700; color: var(--seal); }
.nb-gz { font-family: var(--hanja); font-weight: 800; font-size: 30px; line-height: 1.2; }
.nb-sub { font-family: var(--ui); font-size: 11.5px; line-height: 1.45; color: var(--ink-3); }
.nb-ten { font-family: var(--title); font-size: 14px; color: var(--ink-2); }

/* 장(章) 제목: 주사 도장 숫자 + 먹 제목 */
.chap { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--ink); scroll-margin-top: 72px; }
.chap-no { display: grid; place-items: center; width: 38px; height: 38px; background: var(--seal); color: #fff7ea; font-family: var(--hanja); font-weight: 800; font-size: 19px; line-height: 1; border-radius: 3px; }
.chap-title { font-family: var(--title); font-size: 23px; font-weight: 400; line-height: 1.35; }
.webtoon .chap:first-of-type { margin-top: 6px; }

/* 컷: 먹선 한 줄 + 주사 꺾쇠 두 모서리 */
.webtoon { display: grid; gap: 22px; }
.cut { position: relative; margin: 0; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); overflow: hidden; }
.cut::before, .cut::after { content: ""; position: absolute; z-index: 4; width: 16px; height: 16px; pointer-events: none; }
.cut::before { top: 4px; left: 4px; border-top: 2px solid var(--seal); border-left: 2px solid var(--seal); }
.cut::after { right: 4px; bottom: 4px; border-right: 2px solid var(--seal); border-bottom: 2px solid var(--seal); }
.cut.paper-bg, .cut.ink-bg, .cut.big-hanja { padding: 20px 18px; }
.cut.ink-bg { background: var(--night); color: var(--night-text); }
.cut.ink-bg::before, .cut.ink-bg::after { border-color: var(--moon); }
.cut.paper-bg.has-panel, .cut.ink-bg.has-panel { padding: 0; }
.panel { position: relative; display: flex; flex-direction: column; min-height: 330px; padding: 16px; isolation: isolate; background: var(--night); color: var(--night-text); }
.panel.no-scene { background: var(--paper-2); color: var(--ink); min-height: 0; }
.panel:not(.has-speaker) { min-height: 210px; }
.cut-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
.narration { position: relative; z-index: 1; align-self: flex-start; max-width: 92%; padding: 8px 12px; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); font-size: 15px; line-height: 1.65; }
.paper-bg > .narration, .ink-bg > .narration { max-width: none; margin-bottom: 14px; padding: 0 0 8px; background: none; border: 0; border-bottom: 1px solid currentColor; font-family: var(--title); font-size: 17px; letter-spacing: .02em; color: inherit; }
.ink-bg > .narration { color: var(--moon); }
/* 휴대폰: 말풍선은 그림 위 한 줄 너비, 이야기꾼은 아래 한쪽 */
.speaker { position: relative; z-index: 1; display: grid; grid-template-columns: 44% minmax(0, 1fr); grid-template-areas: "bubble bubble" "art ."; align-items: end; margin: auto -16px -16px; padding-top: 14px; }
.speaker-art { grid-area: art; display: block; align-self: end; }
.bubble { grid-area: bubble; position: relative; margin: 0 16px 14px; padding: 12px 15px; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); border-radius: 16px; font-size: 16px; line-height: 1.7; }
.bubble::before { content: ""; position: absolute; left: 22%; bottom: -7px; width: 12px; height: 12px; background: var(--sheet); border-right: 1px solid var(--ink); border-bottom: 1px solid var(--ink); transform: rotate(45deg); }
.flip .speaker { grid-template-areas: "bubble bubble" ". art"; grid-template-columns: minmax(0, 1fr) 44%; }
.flip .bubble::before { left: auto; right: 22%; }
.has-panel > .prop { padding: 18px 16px 20px; border-top: 1px solid var(--ink); }
.prop { position: relative; z-index: 1; }
.prop-text { font-size: 16px; line-height: 1.75; }
.prop-text.light { text-align: center; margin-bottom: 4px; }
.gutter { padding: 2px 12px; text-align: center; font-family: var(--title); font-size: 16px; line-height: 1.7; color: var(--ink-2); }
.sample-mark { position: absolute; z-index: 3; top: 12px; right: 12px; padding: 3px 8px; background: var(--seal); color: #fff7ea; font: 700 11px/1.3 var(--ui); letter-spacing: .1em; }
.cut.locked .panel { min-height: 250px; }
.lock-veil { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; padding: 20px; background: rgba(23, 32, 51, .9); color: var(--night-text); text-align: center; }
.lock-veil p { font-family: var(--title); font-size: 18px; }
.lock-seal { width: 56px; }
.big-hanja { background: var(--night); color: var(--night-text); text-align: center; }
.cut.big-hanja { padding: 34px 16px 30px; }
.cut.big-hanja::before, .cut.big-hanja::after { border-color: var(--moon); }
.huge-hanja { display: grid; justify-items: center; font-family: var(--hanja); font-weight: 800; font-size: clamp(100px, 30vw, 146px); line-height: 1.08; }
.huge-cap { margin-top: 8px; font-family: var(--title); font-size: 17px; letter-spacing: .08em; color: var(--moon); }

/* 스크롤 따라 나타나기: 글은 처음부터 보이고 살짝 내려앉기만 해요 */
.reveal { transition: transform .6s ease-out; }
.reveal:not(.in).fx-up { transform: translateY(10px); }
.reveal:not(.in).fx-left { transform: translateX(-10px); }
.reveal:not(.in).fx-zoom { transform: scale(1.01); }
.reveal.in { transform: none; }

/* 장면 움직임 */
.twinkle { animation: twinkle 3.4s ease-in-out infinite; }
.flicker { animation: flicker 2.6s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.glow { animation: glow 5s ease-in-out infinite; }
.petal { animation: fall 9s linear infinite; }
.petal.p1 { animation-duration: 11s; animation-delay: -3s; }
.petal.p2 { animation-duration: 13s; animation-delay: -6s; }
.petal.p3 { animation-duration: 10s; animation-delay: -8s; }
.thread { stroke-dasharray: 420; stroke-dashoffset: 420; animation: draw 3s ease forwards; }
.stick { animation: lift 3s ease-in-out infinite; transform-box: fill-box; }
@keyframes twinkle { 50% { opacity: .2; } }
@keyframes flicker { 0%, 100% { opacity: 1; } 45% { opacity: .82; } 55% { opacity: .95; } }
@keyframes glow { 50% { opacity: .65; } }
@keyframes fall { from { transform: translate(0, -40px) rotate(0deg); } to { transform: translate(-60px, 520px) rotate(320deg); } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes lift { 50% { transform: translateY(-16px); } }

/* 대운 연표 */
.lifeline { display: grid; border-top: 1px solid var(--ink); }
.lifeline li { position: relative; display: grid; grid-template-columns: 64px 52px minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 12px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--rule-soft); }
.lifeline li.now { background: var(--seal-soft); box-shadow: inset 3px 0 0 var(--seal); }
.ll-age { grid-row: 1; grid-column: 1; font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.ll-age b { font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--ink); }
.ll-years { grid-row: 2; grid-column: 1; font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.ll-gz { grid-row: 1 / span 2; grid-column: 2; width: 46px; }
.ll-ten { grid-row: 1 / span 2; grid-column: 3; display: grid; font-size: 14.5px; line-height: 1.5; color: var(--ink-2); }
.ll-ten b { font-family: var(--title); font-weight: 400; font-size: 17px; color: var(--ink); }
.lifeline em { position: absolute; top: 8px; right: 6px; padding: 1px 7px; background: var(--seal); color: #fff7ea; font: 700 11.5px/1.5 var(--ui); font-style: normal; }

/* 올해 열두 달(월운) */
.twelve { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule-soft); }
.twelve li { position: relative; display: grid; grid-template-columns: auto minmax(0, 1fr); grid-template-rows: auto auto; gap: 0 10px; align-items: start; padding: 10px 8px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); scroll-margin-top: 80px; }
.twelve li.now { background: var(--seal-soft); box-shadow: inset 0 0 0 2px var(--seal); }
.tw-month { grid-column: 1 / -1; display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 6px; }
.tw-month b { font-family: var(--title); font-weight: 400; font-size: 19px; }
.tw-month em { font-style: normal; font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.tw-gz { grid-row: 2; font-family: var(--hanja); font-weight: 800; font-size: 22px; line-height: 1.3; }
.tw-ten { grid-row: 2; display: grid; font-family: var(--ui); font-size: 12.5px; line-height: 1.45; color: var(--ink-2); }
.tw-ten b { font-family: var(--title); font-weight: 400; font-size: 15px; color: var(--ink); }
.tw-now { grid-column: 1 / -1; justify-self: start; margin-top: 4px; padding: 0 6px; background: var(--seal); color: #fff7ea; font: 700 11px/1.6 var(--ui); font-style: normal; }

/* 네 기둥 표: 글자 색과 밑줄이 오행 */
.ptable { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); max-width: 440px; margin: 0 auto; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); }
.pt-col { display: grid; justify-items: center; align-content: start; gap: 4px; padding: 0 3px 10px; border-left: 1px solid var(--rule-soft); }
.pt-col:first-child { border-left: 0; }
.pt-col.me { background: var(--seal-soft); box-shadow: inset 0 3px 0 var(--seal); }
.pt-head { display: grid; justify-items: center; width: 100%; padding: 6px 0 5px; border-bottom: 1px solid var(--ink); font-family: var(--ui); font-size: 12px; line-height: 1.35; color: var(--ink-2); }
.pt-head b { font-family: var(--hanja); font-weight: 800; font-size: 17px; color: var(--ink); }
.pt-ten { min-height: 20px; font-family: var(--ui); font-size: 12px; line-height: 1.6; color: var(--ink-2); white-space: nowrap; }
.gz { display: block; width: 100%; padding: 2px 0 4px; text-align: center; font-family: var(--hanja); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--ink); border-bottom: 4px solid var(--rule-soft); }
.gz + .gz { margin-top: 2px; }
.gz.el-wood { color: var(--tx-wood); border-bottom-color: var(--el-wood); }
.gz.el-fire { color: var(--tx-fire); border-bottom-color: var(--el-fire); }
.gz.el-earth { color: var(--tx-earth); border-bottom-color: var(--el-earth); }
.gz.el-metal { color: var(--tx-metal); border-bottom-color: var(--el-metal); }
.gz.el-water { color: var(--tx-water); border-bottom-color: var(--el-water); }
.unknown .gz { color: var(--ink-3); border-bottom-style: dashed; }
.pt-name { font-family: var(--title); font-size: 15px; }
.pt-stage { width: 100%; padding-top: 4px; border-top: 1px dashed var(--rule-soft); text-align: center; font-family: var(--ui); font-size: 12px; color: var(--ink-3); }
.pt-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 14px; max-width: 440px; margin: 10px auto 0; font-family: var(--ui); font-size: 12.5px; color: var(--ink-2); }
.pt-key i { margin-right: 4px; padding-bottom: 1px; font-style: normal; font-family: var(--hanja); font-weight: 800; border-bottom: 3px solid; }
.pt-key .el-wood { color: var(--tx-wood); border-color: var(--el-wood); }
.pt-key .el-fire { color: var(--tx-fire); border-color: var(--el-fire); }
.pt-key .el-earth { color: var(--tx-earth); border-color: var(--el-earth); }
.pt-key .el-metal { color: var(--tx-metal); border-color: var(--el-metal); }
.pt-key .el-water { color: var(--tx-water); border-color: var(--el-water); }
.pt-legend { max-width: 440px; margin: 6px auto 0; font-family: var(--ui); font-size: 12.5px; line-height: 1.6; color: var(--ink-3); text-align: center; }
.ptable.mini { width: 100%; max-width: none; margin: 0; }
.ptable.mini .pt-head { font-size: 11px; padding: 4px 0 3px; }
.ptable.mini .pt-head b { font-size: 14px; }
.ptable.mini .gz { font-size: 22px; border-bottom-width: 3px; }
.ptable.mini .pt-ten { font-size: 11px; min-height: 16px; }
.ptable.mini .pt-col { gap: 3px; padding-bottom: 6px; }

/* 다섯 기운 먹물 */
.washes { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; align-items: end; padding: 6px 0; }
.wash { --p: 0; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 6px; min-width: 0; }
.wash-ink { display: grid; place-items: center; width: calc(26px + var(--p) * .8px); max-width: 100%; aspect-ratio: 1; border-radius: 50%; }
.wash-ink b { font-family: var(--hanja); font-weight: 800; font-size: 16px; color: #fff; }
.wash-wood .wash-ink { background: var(--el-wood); }
.wash-fire .wash-ink { background: var(--el-fire); }
.wash-earth .wash-ink { background: var(--el-earth); }
.wash-metal .wash-ink { background: var(--el-metal); }
.wash-water .wash-ink { background: var(--el-water); }
.wash-metal .wash-ink b { color: var(--ink); }
.wash.empty .wash-ink { background: none; border: 1.5px dashed var(--ink-3); }
.wash.empty .wash-ink b { color: var(--ink-3); }
.wash figcaption { font-family: var(--ui); font-size: 12.5px; white-space: nowrap; color: var(--ink-2); }

/* 표·목록 */
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; text-align: center; }
.facts div { padding: 10px 4px; border: 1px solid var(--rule-soft); background: var(--paper); }
.facts dt { font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
.facts dd { font-family: var(--title); font-size: 18px; }
.facts-cut .small { margin-top: 10px; }
.talisman-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.talisman { padding: 5px 12px 6px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-family: var(--title); font-size: 15px; line-height: 1.5; }
.talisman.good { background: #e3ecdf; color: #2f5d3b; border-color: var(--el-wood); }
.talisman.warn { background: var(--seal-soft); color: #8e2a20; border-color: var(--seal); }
.ink-bg .talisman { background: rgba(237, 229, 211, .08); color: var(--night-text); border-color: rgba(237, 229, 211, .5); }
.ink-bg .talisman.good { color: #a9d6b2; border-color: #6fae7e; }
.ink-bg .talisman.warn { color: #ffb4a8; border-color: #e07a6c; }
.talisman-key { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; margin: 10px 0 12px; font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
.talisman-key i { display: inline-block; width: 10px; height: 10px; margin-right: 4px; border: 1px solid; vertical-align: -1px; }
.talisman-key i.good { background: #e3ecdf; border-color: var(--el-wood); }
.talisman-key i.warn { background: var(--seal-soft); border-color: var(--seal); }
.talisman-cap { margin: 14px 0 8px; text-align: center; font-family: var(--ui); font-size: 12.5px; font-weight: 700; letter-spacing: .16em; color: var(--moon); }
.ink-bg .small { color: var(--night-sub); text-align: center; margin-top: 10px; }
.seal-svg { display: block; width: 100%; height: auto; }
.years { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.years li { display: grid; justify-items: center; padding: 8px 4px; border: 1px solid rgba(237, 229, 211, .25); }
.years li.this { border-color: var(--moon); background: rgba(201, 166, 94, .14); }
.years span { font-family: var(--ui); font-size: 12.5px; color: var(--night-sub); }
.years b { font-family: var(--hanja); font-weight: 800; font-size: 22px; }
.years em { font-style: normal; font-family: var(--ui); font-size: 12px; text-align: center; }
.f-favorable { color: #9fd3a8; } .f-unfavorable { color: #ffa898; } .f-neutral, .f-mixed { color: var(--night-sub); }
.window-years { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.window-years li { padding: 6px 14px; border: 2px solid var(--seal); color: var(--seal); font-family: var(--title); font-size: 19px; transform: rotate(-2deg); }
.window-years li:nth-child(2) { transform: rotate(2deg); }

/* 자미두수 명반 */
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(4, minmax(78px, auto)); background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); }
.board.compact { grid-template-rows: repeat(4, minmax(62px, auto)); }
.gung { position: relative; display: grid; align-content: start; gap: 1px; min-width: 0; padding: 5px 5px 6px; border: .5px solid var(--rule-soft); }
.gung.life { box-shadow: inset 0 0 0 2px var(--seal); }
.gung.body { box-shadow: inset 0 0 0 2px var(--night-2); }
.gung.year { background: #f1e2bf; }
.g-name { font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); }
.g-branch { position: absolute; top: 4px; right: 5px; font-family: var(--hanja); font-size: 13px; color: var(--ink-3); }
.g-major { font-family: var(--title); font-weight: 400; font-size: 14px; line-height: 1.3; }
.g-aux { font-family: var(--ui); font-size: 11px; line-height: 1.35; color: var(--ink-3); }
.g-tr { display: flex; flex-wrap: wrap; gap: 2px; }
.g-tr i { padding: 1px 4px; background: var(--seal); color: #fff7ea; font: 700 10.5px/1.25 var(--ui); font-style: normal; }
.board-center { grid-column: 2 / 4; grid-row: 2 / 4; display: grid; place-content: center; justify-items: center; gap: 2px; background: var(--night); color: var(--night-text); text-align: center; font-family: var(--ui); font-size: 13px; }
.board-center b { font-family: var(--title); font-weight: 400; font-size: 22px; color: var(--moon); }
.board-legend { margin-top: 10px; font-family: var(--ui); font-size: 12.5px; line-height: 1.7; color: var(--ink-3); }
.board-legend i { display: inline-block; width: 11px; height: 11px; margin: 0 4px 0 8px; vertical-align: -1px; border: 2px solid; }
.board-legend i:first-child { margin-left: 0; }
.board-legend .lg-life { border-color: var(--seal); }
.board-legend .lg-body { border-color: var(--night-2); }
.board-legend .lg-year { background: #f1e2bf; border: 1px solid var(--rule-soft); }
.tr-list { display: grid; gap: 8px; }
.tr-list li { display: grid; grid-template-columns: 40px auto minmax(0, 1fr); gap: 0 10px; align-items: center; padding: 8px 10px; border: 1px solid var(--rule-soft); background: var(--paper); }
.tr-seal { grid-row: span 2; display: grid; place-items: center; width: 36px; height: 36px; background: var(--seal); color: #fff7ea; font-family: var(--hanja); font-weight: 800; font-size: 18px; border-radius: 3px; }
.tr-list b { font-family: var(--title); font-weight: 400; font-size: 17px; }
.tr-list li > span:last-of-type { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.tr-list em { grid-column: 2 / -1; font-style: normal; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }

/* 궁합 */
.seals-meet { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 8px; max-width: 420px; margin: 0 auto; padding: 8px 0; }
.meet-seal { position: relative; z-index: 1; display: grid; justify-items: center; gap: 6px; font-family: var(--title); font-size: 16px; }
.meet-seal .seal-svg { width: 84px; }
.meet-seal.left { animation: meet-left 1.2s ease both; }
.meet-seal.right { animation: meet-right 1.2s ease both; }
.red-thread { position: absolute; left: 18%; top: 22%; width: 64%; height: 60px; z-index: 0; }
.red-thread path { stroke-dasharray: 260; stroke-dashoffset: 260; animation: draw 2.2s .6s ease forwards; }
.meet-score { position: relative; z-index: 1; display: grid; justify-items: center; padding: 4px 10px; background: var(--sheet); }
.meet-score b { font-family: var(--title); font-weight: 400; font-size: 52px; line-height: 1; color: var(--seal); }
.meet-score span { font-family: var(--hand); font-size: 22px; color: var(--seal); }
@keyframes meet-left { from { transform: translateX(-24px); opacity: 0; } }
@keyframes meet-right { from { transform: translateX(24px); opacity: 0; } }
.match-items { display: grid; gap: 16px; }
.match-items li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 10px; align-items: center; }
.match-items li > span:first-child { font-family: var(--title); font-size: 16.5px; }
.match-items .line { grid-column: 1 / -1; grid-row: 2; height: 6px; background: var(--paper-3); }
.line-fill { display: block; height: 100%; width: 0; background: var(--seal); transition: width .8s ease; }
.match-items b { grid-row: 1; grid-column: 2; font-family: var(--ui); font-size: 14px; font-weight: 700; }
.match-items p { grid-column: 1 / -1; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); }

/* 오늘의 점괘 산가지 */
.slip { display: grid; justify-items: center; gap: 4px; max-width: 300px; margin: 14px auto 0; padding: 18px 18px 22px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-top: 6px solid var(--seal); text-align: center; transform: rotate(-1deg); }
.slip-date { font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
.slip-score { font-family: var(--title); font-weight: 400; font-size: 64px; line-height: 1; color: var(--seal); }
.slip-band { font-family: var(--hand); font-size: 24px; color: var(--seal); }
.slip-msg { font-size: 15px; line-height: 1.7; }
.factors { display: grid; gap: 6px; }
.factors li { display: flex; justify-content: space-between; gap: 10px; padding-bottom: 6px; border-bottom: 1px dashed var(--rule-soft); font-size: 15px; line-height: 1.65; }
.factors b { font-family: var(--ui); white-space: nowrap; }
.plus { color: #2f6b43; } .minus { color: var(--seal); }

/* 택일·날짜 넘기기 */
.act-chips { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-bottom: 14px; }
.act-chips button { padding: 6px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-family: var(--title); font-size: 15px; border-radius: 2px; }
.act-chips button[aria-pressed="true"] { background: var(--seal); color: #fff7ea; border-color: var(--seal); }
.month-nav, .day-nav { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 12px; margin-bottom: 12px; }
.month-nav b, .day-label { font-family: var(--title); font-weight: 400; font-size: 18px; }
.good-days { display: grid; border-top: 1px solid var(--ink); }
.good-days button { display: grid; width: 100%; padding: 8px 2px; text-align: left; border-bottom: 1px solid var(--rule-soft); }
.good-days b { font-family: var(--title); font-weight: 400; font-size: 16.5px; color: var(--seal); }
.good-days span { font-family: var(--ui); font-size: 13px; color: var(--ink-2); }
.good-days button:hover { background: var(--paper-2); }
.almanac li { display: grid; grid-template-columns: 46px 46px minmax(0, 1fr) auto; gap: 8px; align-items: center; padding: 7px 4px; border-bottom: 1px solid var(--rule-soft); font-size: 14px; }
.almanac li.good { background: var(--seal-soft); }
.almanac li.dim { opacity: .5; }
.almanac li.today { box-shadow: inset 0 0 0 1.5px var(--seal); }
.al-date { display: flex; align-items: baseline; gap: 4px; }
.al-date b { font-family: var(--title); font-weight: 400; font-size: 20px; }
.al-date em { font-style: normal; font-family: var(--ui); font-size: 12px; color: var(--ink-3); }
.al-gz { font-family: var(--hanja); font-weight: 700; font-size: 16px; }
.al-note { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--ui); font-size: 12.5px; line-height: 1.6; color: var(--ink-2); }
.al-note i { font-style: normal; padding: 0 6px; border: 1px solid currentColor; }
.al-note .term { color: var(--seal); } .al-note .son { color: #2f6b43; } .al-note .fit { color: var(--seal); font-weight: 700; }
.al-lunar { font-family: var(--ui); font-size: 12px; color: var(--ink-3); white-space: nowrap; }

/* 생일 칸: 해·달 고르기 + 날짜판 + 시진·성별 */
.bf { display: grid; gap: 4px; }
.bf-row { display: grid; gap: 6px; padding: 10px 0; border-bottom: 1px dashed var(--rule-soft); }
.bf-label { font-family: var(--title); font-size: 15px; color: var(--ink); }
.bf-label small { margin-left: 6px; font-family: var(--ui); font-size: 12px; color: var(--ink-3); }
.bf-ctrl { display: grid; gap: 8px; min-width: 0; }
.bf-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.pick-select {
  -webkit-appearance: none; appearance: none; min-height: 40px; padding: 4px 28px 4px 10px; background-color: var(--sheet); color: var(--ink);
  border: 1px solid var(--ink); border-radius: 2px; font-family: var(--body); font-size: 16px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%231f1914' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 9px center; background-size: 10px 7px;
}
.pick-select.wide { width: 100%; }
.pick-select:focus { outline: none; border-color: var(--seal); box-shadow: inset 0 0 0 1px var(--seal); }
.pick-select[aria-invalid="true"] { border-color: var(--seal); background-color: var(--seal-soft); }
.dg-wrap { min-width: 0; }
.dg { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule-soft); }
.dg.lunar { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.dg-wd { padding: 3px 0; text-align: center; font-family: var(--ui); font-size: 11.5px; font-weight: 700; color: var(--ink-3); border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.dg-wd.sun { color: var(--seal); }
.dg-blank { border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.dg-day { position: relative; display: grid; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); cursor: pointer; }
.dg-day input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.dg-day span { display: grid; place-items: center; min-height: 36px; font-family: var(--title); font-size: 16px; }
.dg-day.sun span { color: var(--seal); }
.dg-day:hover span { background: var(--paper-2); }
.dg-day input:checked + span { background: var(--seal); color: #fff7ea; }
.dg-day input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: -3px; }
.dg-empty, .dg-note { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.dg-note { margin-top: 4px; }
.picks { display: flex; flex-wrap: wrap; gap: 6px; }
.pick { position: relative; }
.pick input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
label.pick span { display: inline-grid; place-items: center; min-width: 64px; min-height: 40px; padding: 0 16px; border: 1px solid var(--ink); border-radius: 2px; font-family: var(--title); font-size: 16px; color: var(--ink); background: var(--sheet); }
.pick input:checked + span { background: var(--ink); color: var(--paper); }
.pick input:focus-visible + span { outline: 2px solid var(--seal); outline-offset: 2px; }
.line-input { width: 100%; min-height: 40px; padding: 4px 2px; background: transparent; border: 0; border-bottom: 1px solid var(--ink); border-radius: 0; color: var(--ink); font-family: var(--body); font-size: 17px; }
.line-input:focus { outline: none; border-bottom: 2px solid var(--seal); }
.line-input::placeholder { color: #8b7f6f; }
.partner .btn { justify-self: start; margin-top: 10px; }
.form-error { font-family: var(--ui); font-size: 14.5px; font-weight: 700; line-height: 1.6; color: var(--seal); }
.paper-note { font-family: var(--ui); font-size: 12.5px; line-height: 1.65; color: var(--ink-3); }
.paper-note a, .co-links a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }

/* 판(입력·확인·결제 확인): 휴대폰은 아래에서 올라와요 */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(23, 32, 51, .62); animation: fade .25s ease; }
.sheet { position: fixed; z-index: 90; left: 0; right: 0; bottom: 0; max-height: 92vh; overflow-y: auto; overscroll-behavior: contain; animation: rise .3s ease-out; }
@keyframes rise { from { transform: translateY(40px); opacity: 0; } }
@keyframes fade { from { opacity: 0; } }
.sheet-card { display: grid; gap: 14px; padding: 22px 18px calc(22px + env(safe-area-inset-bottom)); background: var(--paper); color: var(--ink); border-top: 4px solid var(--seal); }
.scroll-title { font-family: var(--title); font-size: 19px; line-height: 1.45; text-align: center; letter-spacing: .03em; }
.sheet-actions { display: grid; gap: 6px; justify-items: center; }
.sheet-actions .btn { min-width: 220px; }
.link.close { justify-self: center; color: var(--ink-2); }
.sheet-card.confirm .speech-bubble p { font-size: 17px; }

/* 두루마리(내 생일 적기) */
.scroll { position: relative; display: grid; gap: 0; padding: 10px 0 0; }
.rod { position: relative; z-index: 2; display: block; height: 14px; margin: 0 6px; border-radius: 7px; background: #4a2f1b; }
.rod::before, .rod::after { content: ""; position: absolute; top: -3px; width: 14px; height: 20px; border-radius: 4px; background: #c2a15a; }
.rod::before { left: -4px; } .rod::after { right: -4px; }
.paper { display: grid; gap: 4px; margin: -3px 14px; padding: 20px 16px calc(18px + env(safe-area-inset-bottom)); background: var(--sheet); color: var(--ink); border-left: 1px solid var(--rule-soft); border-right: 1px solid var(--rule-soft); }
.ask { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px 0 12px; border-bottom: 1px dashed var(--rule-soft); }
.ask-face { width: 52px; height: 52px; }
.ask-line { font-size: 15.5px; line-height: 1.65; }
.ask-line b { display: block; font-family: var(--ui); font-size: 12.5px; font-weight: 700; color: var(--seal); }
.stamp-row { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 16px; align-items: center; padding-top: 14px; }
.stamp { width: 84px; height: 84px; border-radius: 8px; background: var(--seal); color: #fff7ea; font-family: var(--title); font-size: 22px; transform: rotate(-5deg); box-shadow: inset 0 0 0 4px var(--sheet), inset 0 0 0 6px var(--seal); transition: transform .15s; }
.stamp:active { transform: rotate(-5deg) scale(.95); }
.stamp:disabled { opacity: .6; }

/* 샘플 사이트: 서신 고르기 */
.envelopes { display: grid; gap: 14px; }
.envelope { position: relative; display: grid; gap: 2px; justify-items: start; padding: 30px 18px 16px; text-align: left; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); }
.env-flap { position: absolute; top: 0; left: 0; right: 0; height: 22px; background: var(--paper-2); border-bottom: 1px solid var(--rule-soft); }
.env-seal { position: absolute; top: 8px; right: 14px; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--seal); color: #fff7ea; font-family: var(--hanja); font-weight: 800; }
.envelope b { font-family: var(--title); font-weight: 400; font-size: 19px; }
.envelope span { font-family: var(--ui); font-size: 13.5px; color: var(--ink-3); }
.envelope em { font-style: normal; font-family: var(--hand); font-size: 20px; color: var(--seal); }
.envelope.mini { padding: 22px 16px 12px; }
.envelope.own { border-style: dashed; border-color: var(--seal); }
.gate-link { display: block; margin-top: 10px; text-align: center; }

/* 결제 전 확인 판 */
.co-main, .co-side { display: grid; gap: 14px; align-content: start; }
.co-book { display: grid; grid-template-columns: 52px minmax(0, 1fr); gap: 12px; align-items: center; }
.co-book > span:last-child { display: grid; }
.co-book b { font-family: var(--title); font-weight: 400; font-size: 19px; }
.co-book > span:last-child > span { font-size: 14px; color: var(--ink-2); }
.co-rows { display: grid; border-top: 1px solid var(--ink); }
.co-rows > div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--rule-soft); }
.co-rows dt { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--ink-3); }
.co-rows dd { font-size: 15px; line-height: 1.65; }
.co-rows .co-price { font-family: var(--title); font-size: 22px; line-height: 1.3; color: var(--seal); }
.co-head { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--ink-2); }
.co-refund { display: grid; gap: 4px; font-family: var(--ui); font-size: 13.5px; line-height: 1.65; color: var(--ink-2); }
.co-refund li { position: relative; padding-left: 14px; }
.co-refund li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: var(--seal); font-size: 8px; }
.co-agree { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; padding: 12px; background: var(--sheet); border: 1px solid var(--ink); font-family: var(--ui); font-size: 15px; font-weight: 700; line-height: 1.55; cursor: pointer; }
.co-agree input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--seal); }
.co-links { display: flex; flex-wrap: wrap; gap: 4px 14px; font-family: var(--ui); font-size: 13px; }
.co-note { text-align: center; }
.co-code { display: grid; gap: 8px; padding-top: 12px; border-top: 1px dashed var(--rule-soft); }
.pf { display: grid; gap: 4px; font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.pf input { padding: 8px 2px; background: transparent; border: 0; border-bottom: 1px solid var(--ink); color: var(--ink); font-size: 16px; letter-spacing: .04em; }
.co-code input { text-transform: uppercase; }
.co-code input::placeholder { text-transform: none; letter-spacing: 0; }
.co-orders { display: flex; flex-wrap: wrap; gap: 4px 10px; }
.co-orders .link { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }
.sheet-card.restore .sheet-actions { grid-auto-flow: column; justify-content: center; gap: 16px; }

/* 새 소식 판(다시 온 손님) */
.sheet-card.promo { gap: 0; padding: 0 0 calc(10px + env(safe-area-inset-bottom)); }
.cover { position: relative; overflow: hidden; isolation: isolate; background: var(--night); }
.cover-scene { position: absolute; inset: 0; width: 100%; height: 100%; display: block; z-index: -1; }
.cover-narrator { position: absolute; bottom: 0; right: 8%; width: 30%; }
.cover-text { display: none; }
.promo-cover { aspect-ratio: 16 / 9; max-height: 34vh; width: calc(100% - 36px); margin: 0 18px; border: 1px solid var(--ink); }
.promo-body { display: grid; gap: 8px; padding: 20px 18px 14px; }
.promo-go { padding: 14px 18px 0; }
.promo-label { justify-self: start; padding: 2px 9px; background: var(--seal); color: #fff7ea; font: 700 12px/1.5 var(--ui); }
.sheet-card.promo .calli { font-size: 54px; color: var(--seal); }
.promo-body > p:not(.promo-label) { color: var(--ink-2); }
.promo-foot { display: flex; justify-content: space-between; margin-top: 12px; padding: 10px 18px 0; border-top: 1px solid var(--rule-soft); font-family: var(--ui); font-size: 13.5px; color: var(--ink-3); }

/* 앱 안 브라우저 결제 안내(core.js payHere). 브라우저 기본 dialog 창이라 맨 위에 떠요. */
.inapp { width: min(92vw, 400px); max-height: 88vh; overflow-y: auto; padding: 24px 18px 12px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); border-top: 4px solid var(--seal); }
.inapp::backdrop { background: rgba(23, 32, 51, .62); }
.inapp h2 { padding-right: 34px; font-family: var(--title); font-weight: 400; font-size: 21px; line-height: 1.35; }
.inapp p { margin-top: 10px; color: var(--ink-2); font-size: 15px; line-height: 1.65; }
.inapp .inapp-note { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.inapp-main { display: grid; place-items: center; width: 100%; min-height: 50px; margin-top: 16px; background: var(--seal); color: #fff7ea; font-family: var(--ui); font-size: 16px; font-weight: 700; border-radius: 2px; }
.inapp-sub { display: block; margin: 6px auto 0; padding: 10px; color: var(--ink-2); font-family: var(--ui); font-size: 14.5px; text-decoration: underline; text-underline-offset: 3px; }
.inapp-close { position: absolute; top: 12px; right: 12px; width: 36px; height: 36px; color: var(--ink-2); font-size: 22px; line-height: 1; }

/* 직장운 시기 */
.ws-card { display: grid; justify-items: center; gap: 8px; padding: 4px 0 10px; text-align: center; }
.ws-card .calli { font-size: 54px; color: var(--seal); }
.ws-card p { font-size: 16px; line-height: 1.7; }
.ws-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.ws-cols > div { padding: 8px 12px; border: 1px solid var(--rule-soft); background: var(--paper); }
.ws-cols span { font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--ink-3); }
.ws-cols li { position: relative; padding-left: 14px; font-size: 14.5px; line-height: 1.6; }
.ws-cols li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: var(--seal); font-size: 8px; }
.facts.ws-facts { grid-template-columns: minmax(0, 1fr); max-width: 220px; margin: 12px auto 6px; }
.cm-list, .rm-list { display: grid; }
.cm-list > li, .rm-list > li { display: grid; grid-template-columns: 58px 40px minmax(0, 1fr); gap: 4px 8px; align-items: center; padding: 9px 4px; border-bottom: 1px solid var(--rule-soft); scroll-margin-top: 80px; }
.rm-list > li { grid-template-columns: 58px 22px minmax(0, 1fr); }
.cm-list > li.cm-year, .rm-list > li.cm-year { display: block; padding: 14px 4px 4px; border-bottom: 1px solid var(--ink); font-family: var(--ui); font-size: 13px; font-weight: 700; letter-spacing: .12em; color: var(--ink-2); }
.cm-list > li.now, .rm-list > li.now { box-shadow: inset 0 0 0 1.5px var(--seal); }
.cm-list > li.quiet { color: var(--ink-3); }
.cm-date { display: grid; line-height: 1.25; }
.cm-date b { font-family: var(--title); font-weight: 400; font-size: 19px; }
.cm-date em { font-style: normal; font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.cm-gz { font-family: var(--hanja); font-weight: 700; font-size: 16px; }
.cm-tags { display: flex; flex-wrap: wrap; gap: 4px; font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.mt { padding: 0 7px; border: 1px solid currentColor; font-style: normal; font-family: var(--ui); font-size: 12.5px; line-height: 1.7; white-space: nowrap; }
.mt-move { color: var(--el-water); } .mt-paper { color: #2f6b43; } .mt-rival { color: var(--seal); } .mt-exit { color: #6a4a8a; }
.mt-now { background: var(--seal); border-color: var(--seal); color: #fff7ea; }
.mt-star { color: #7a5a12; background: #f3e6c4; }
.mt-aux { color: #7a5a2f; border-style: dashed; }
.cm-legend { display: grid; gap: 12px; margin-top: 16px; padding-top: 12px; border-top: 1px dashed var(--rule-soft); }
.cm-legend dt { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-family: var(--ui); font-size: 13.5px; }
.cm-legend dd { margin-top: 2px; font-size: 15px; line-height: 1.7; }
.cm-legend ~ .small, .cm-list ~ .small { margin-top: 8px; }
.cy-list, .ry-list { display: grid; gap: 12px; }
.cy-list > li, .ry-list > li { display: grid; gap: 8px; padding: 12px; border: 1px solid rgba(237, 229, 211, .25); }
.cy-list > li.this, .ry-list > li.this { border-color: var(--moon); }
.cy-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.cy-head > b { font-family: var(--title); font-weight: 400; font-size: 21px; }
.cy-gz { font-family: var(--hanja); font-weight: 700; font-size: 17px; color: var(--moon); }
.cy-agree { margin-left: auto; padding: 1px 8px; background: var(--seal); color: #fff7ea; font-style: normal; font-family: var(--ui); font-size: 12px; }
.cy-counts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 4px; }
.cy-counts li { display: grid; justify-items: center; padding: 4px 2px; border: 1px solid rgba(237, 229, 211, .16); color: var(--night-sub); }
.cy-counts li.on { color: var(--night-text); border-color: rgba(201, 166, 94, .6); }
.cy-counts span { font-family: var(--ui); font-size: 11.5px; white-space: nowrap; }
.cy-counts b { font-family: var(--title); font-weight: 400; font-size: 20px; line-height: 1.25; }
.cy-lead, .cy-warn { font-size: 15px; line-height: 1.7; }
.cy-lead em, .cy-warn em { display: block; font-style: normal; font-family: var(--ui); font-size: 13px; font-weight: 700; color: var(--moon); }
.cy-warn em { color: #ffa898; }
.ru-signals { display: grid; gap: 10px; }
.ru-signals li { display: grid; gap: 2px; padding-bottom: 10px; border-bottom: 1px dashed var(--rule-soft); }
.ru-signals li:last-child { padding-bottom: 0; border-bottom: 0; }
.ink-bg .ru-signals li { border-color: rgba(237, 229, 211, .2); }
.ru-signals b { font-family: var(--title); font-weight: 400; font-size: 16px; }
.ru-signals p { font-size: 15px; line-height: 1.7; }
.sig-tag { justify-self: start; padding: 0 7px; border: 1px solid currentColor; font-family: var(--ui); font-size: 11.5px; line-height: 1.7; color: var(--ink-3); }
.sig-reunion, .sig-base { color: var(--seal); } .sig-contact { color: var(--el-water); } .sig-conflict, .sig-ended { color: #8a4a1e; }
.ink-bg .sig-tag { color: var(--night-sub); } .ink-bg .sig-reunion, .ink-bg .sig-base { color: #ffa898; }
small.term { font-family: var(--ui); font-size: 12px; font-weight: 400; letter-spacing: 0; color: var(--ink-3); }
.ink-bg small.term { color: var(--night-sub); }
.next-decade { margin-top: 12px; }

/* 열두 달 한눈에(직장운·재회운) */
.mstrip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule-soft); }
.mstrip button { display: grid; justify-items: center; align-content: start; gap: 2px; width: 100%; min-height: 76px; padding: 6px 2px 8px; border-right: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); text-align: center; }
.ms-month { display: grid; justify-items: center; line-height: 1.2; }
.ms-month small { font-family: var(--ui); font-size: 10.5px; color: var(--ink-3); }
.ms-month b { font-family: var(--title); font-weight: 400; font-size: 17px; }
.mstrip i { font-style: normal; font-family: var(--ui); font-size: 11.5px; line-height: 1.4; color: var(--ink-2); }
.mstrip button.quiet { color: var(--ink-3); }
.mstrip button.on i { color: var(--ink); font-weight: 700; }
.mstrip button.g-peak { background: var(--seal-soft); }
.mstrip button.g-peak i { color: var(--seal); font-size: 18px; }
.mstrip button.g-mixed i { color: var(--ink); font-size: 18px; }
.mstrip button.g-quiet i { color: var(--ink-3); font-size: 18px; }
.mstrip button.now { box-shadow: inset 0 0 0 2px var(--ink); }
.mstrip button:hover { background: var(--paper-2); }

/* 재회운·직장운 결론과 잠긴 차례 */
.cut.conclusion .prop { display: grid; gap: 14px; }
.cc-line { font-family: var(--title); font-size: 18px; line-height: 1.65; }
.cc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); border-top: 1px solid var(--ink); }
.cc-grid > div { padding: 10px 2px 12px; border-bottom: 1px solid var(--rule-soft); }
.cc-grid dt { margin-bottom: 4px; font-family: var(--ui); font-size: 13px; font-weight: 700; letter-spacing: .06em; color: var(--ink-3); }
.cc-grid dd p { display: grid; padding: 4px 0; }
.cc-grid dd p + p { border-top: 1px dashed var(--rule-soft); }
.cc-grid dd b { font-family: var(--title); font-weight: 400; font-size: 20px; color: var(--seal); }
.cc-grid dd span { font-size: 15px; line-height: 1.6; }
.locked-toc .prop { display: grid; gap: 14px; }
.teaser-line { font-family: var(--title); font-size: 18px; line-height: 1.65; text-align: center; }
.locked-toc .btn { max-width: 360px; justify-self: center; }
.locked-toc .small { text-align: center; }
.reunion-again { display: grid; justify-items: center; }

/* 재회운 등급: ● 신호가 강한 · ◐ 신호가 약한 · ○ 조용한 */
.grade-note { margin-bottom: 8px; padding: 10px 12px; background: var(--seal-soft); border: 1px solid rgba(181, 56, 42, .4); font-family: var(--ui); font-size: 13.5px; line-height: 1.7; }
.grade-note b { font-size: 15px; color: var(--seal); }
.grade-note b.g-mixed { color: var(--ink); }
.grade-note b.g-quiet { color: var(--ink-3); }
.grade-mark { font-size: 17px; line-height: 1; text-align: center; color: var(--ink-3); }
.rm-list > li.g-peak { background: var(--seal-soft); }
.rm-list > li.g-peak .grade-mark { color: var(--seal); }
.rm-list > li.g-mixed .grade-mark { color: var(--ink); }
.rm-sum, .ry-stage { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-family: var(--ui); font-size: 13px; }
.rm-grade { font-weight: 700; }
.g-peak .rm-grade { color: var(--seal); }
.g-quiet .rm-grade { color: var(--ink-3); }
.rm-who { font-family: var(--title); font-size: 14.5px; }
.rm-mark { padding: 0 6px; border: 1px solid var(--rule-soft); font-style: normal; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.rm-lead, .rm-more { grid-column: 1 / -1; }
.rm-lead { padding: 2px 2px 0; font-size: 15px; line-height: 1.7; }
.rm-more summary { padding: 2px; font-family: var(--ui); font-size: 13px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.rm-more .ru-signals { margin-top: 8px; }
.grade-badge { display: inline-flex; align-items: baseline; gap: 5px; margin-left: auto; line-height: 1.2; }
.grade-badge b { font-size: 17px; font-weight: 400; }
.grade-badge small { font-family: var(--ui); font-size: 12px; white-space: nowrap; }
.ink-bg .grade-badge.g-peak { color: #ffa898; }
.ink-bg .grade-badge.g-quiet { color: var(--night-sub); }
.ry-list > li.g-peak { border-color: #e07a6c; }
.ry-stage { color: var(--night-sub); }
.ink-bg .rm-who { color: var(--night-text); }
.ink-bg .rm-mark { border-color: rgba(237, 229, 211, .3); color: var(--night-sub); }
.ink-bg .rm-more summary { color: var(--night-sub); }
.sustain-num { display: flex; justify-content: center; align-items: baseline; gap: 6px; font-family: var(--title); }
.sustain-num b { font-weight: 400; font-size: 56px; line-height: 1; color: var(--moon); }
.sustain-num span { font-size: 20px; color: var(--night-sub); }
.sustain { display: grid; gap: 8px; margin: 10px 0; }
.sustain li { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px; align-items: center; font-size: 15px; line-height: 1.6; color: var(--night-sub); }
.sustain li.met { color: var(--night-text); }
.sustain li span { padding: 0 8px; border: 1px solid currentColor; font-family: var(--ui); font-size: 12.5px; white-space: nowrap; }
.sustain li.met span { background: var(--seal); border-color: var(--seal); color: #fff7ea; }
.bk-seals { display: grid; grid-template-columns: repeat(3, minmax(0, 76px)); justify-content: center; gap: 14px; }
.bk-seals figure { display: grid; justify-items: center; gap: 4px; }
.bk-seals figcaption { font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); white-space: nowrap; }
.facts.bk-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 12px 0; }
.bk-facts dd { font-size: 16px; }
.ru-cautions { display: grid; gap: 10px; }
.ru-cautions li { position: relative; padding-left: 14px; font-size: 15px; line-height: 1.7; }
.ru-cautions li::before { content: "◆"; position: absolute; left: 0; top: 1px; color: #e07a6c; font-size: 9px; }
.ru-cautions li.strong { color: #ffd0c8; }
.ru-cautions b { font-family: var(--title); font-weight: 400; color: var(--moon); }

/* 서신 상담 */
.letter-desk { display: grid; gap: 16px; }
.letter-desk:empty { display: none; }
.letter { position: relative; display: grid; gap: 8px; padding: 18px 18px 16px; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); }
.letter.mine { margin-left: 14%; background: #f1e9d8; }
.letter.theirs { margin-right: 6%; padding-top: 28px; }
.letter-face { position: absolute; top: -18px; right: 10px; width: 54px; height: 54px; }
.letter .to { font-family: var(--title); font-size: 14.5px; color: var(--ink-2); }
.letter p { font-size: 16px; line-height: 1.75; }
.letter .from { justify-self: end; font-family: var(--hand); font-size: 21px; color: var(--seal); }
.letter.writing { font-family: var(--title); color: var(--ink-3); }
.sample-tag { justify-self: start; padding: 1px 8px; border: 1px dashed var(--ink-3); font-family: var(--ui); font-size: 11.5px; color: var(--ink-3); }
.slips-head { margin-top: 4px; text-align: center; font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
.slips { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.slips button { padding: 8px 14px; background: var(--paper); color: var(--ink); border: 1px solid var(--ink); font-family: var(--title); font-size: 15px; line-height: 1.5; text-align: left; }
.slips button:hover { background: var(--paper-2); }
.letter-form { display: grid; gap: 10px; }
.letter-label { font-family: var(--title); font-size: 16px; }
.letter-form textarea { width: 100%; padding: 12px; background: var(--sheet); color: var(--ink); border: 1px solid var(--ink); border-radius: 0; resize: vertical; font-family: var(--body); font-size: 16px; line-height: 1.75; }
.letter-form .btn { justify-self: start; min-width: 140px; }
.letter-quota { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }

.toast { position: fixed; z-index: 100; left: 50%; bottom: calc(92px + env(safe-area-inset-bottom)); transform: translateX(-50%); width: max-content; max-width: min(92vw, 440px); padding: 11px 16px; background: var(--ink); color: var(--paper); font-family: var(--ui); font-size: 14.5px; line-height: 1.55; border-radius: 2px; }

/* ── 화면 크기별 ─────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .reveal, .reveal:not(.in) { transform: none; transition: none; }
  .twinkle, .flicker, .glow, .petal, .thread, .stick, .meet-seal, .red-thread path { animation: none !important; }
  .red-thread path, .thread { stroke-dashoffset: 0; }
}

/* 태블릿: 휴대폰 판을 가운데 읽기 폭으로 */
@media (min-width: 600px) {
  .al-spread, .store, .narrators, .land-head, .land-main { width: min(100%, 720px); margin-left: auto; margin-right: auto; }
  .narrators ul { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .narrators li { grid-template-columns: 1fr; justify-items: start; }
  .twelve { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mstrip { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .ag-day { min-height: 72px; }
  .ag-gz { font-size: 12.5px; }
  .read { padding-top: 22px; }
}

/* PC: 상점은 왼쪽 책력 + 오른쪽 고른 날, 표지는 왼쪽 표제 + 오른쪽 그림·본문, 풀이는 왼쪽 열두 달 자·차례 + 가운데 본문 */
@media (min-width: 1024px) {
  body { font-size: 17px; }
  .topbar-in { min-height: 66px; padding: 10px 24px; gap: 20px; }
  .brand { font-size: 22px; }
  .menu { display: flex; align-items: center; gap: 2px; margin-left: 18px; }
  .menu a { padding: 8px 12px 7px; font-family: var(--ui); font-size: 15px; color: var(--ink-2); border-bottom: 2px solid transparent; }
  .menu a:hover { color: var(--ink); }
  .menu a[aria-current] { color: var(--ink); font-weight: 700; border-bottom-color: var(--seal); }
  .top-btn { padding: 9px 16px; }

  /* 상점: 이달 책력 한 장 */
  .al-spread { display: flex; align-items: flex-start; gap: 40px; width: auto; max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 0; }
  .al-page { flex: 0 0 62%; padding: 22px 24px 18px; }
  .al-head { grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 6px 24px; }
  .al-kicker { grid-column: 1 / -1; }
  .al-title b { font-size: 92px; }
  .al-title span { font-size: 30px; }
  .al-title small { margin-left: 8px; }
  .al-terms { flex-direction: column; align-items: flex-end; gap: 2px; font-size: 14.5px; text-align: right; }
  .al-nav { grid-column: 1 / -1; justify-content: flex-end; margin-top: 0; }
  .ag-day { min-height: 86px; padding: 6px 2px; }
  .ag-day b { font-size: 21px; }
  .ag-gz { font-size: 13.5px; }
  .ag-term, .ag-lunar { font-size: 11.5px; }
  .al-side { flex: 1; min-width: 0; position: sticky; top: 92px; }
  .day-panel { padding: 0; gap: 8px; }
  .dp-date { font-size: 30px; }
  .dp-actions .btn { min-height: 52px; font-size: 17px; }

  /* 책장: 때마다 한 줄(왼쪽 때 이름, 오른쪽 그 때의 이야기들) */
  .store { display: block; width: auto; max-width: var(--wrap); margin: 0 auto; padding: 56px 24px 0; }
  .when-nav { display: none; }
  .shelf { border-top: 2px solid var(--ink); }
  .shelf-group { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 0 36px; padding: 24px 0; border-bottom: 1px solid var(--rule-soft); }
  .shelf-group .sec-head { display: grid; align-content: start; gap: 6px; margin: 0; padding: 0; border: 0; }
  .shelf-group .sec-head span { font-size: 26px; }
  .shelf-group .sec-head small { font-size: 13.5px; text-align: left; }
  .shelf-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px; border: 0; }
  .shelf-list > li { border: 0; }
  .book { grid-template-columns: 96px minmax(0, 1fr); gap: 14px; align-items: start; padding: 0; }
  .book-title { font-size: 21px; }
  .book-quote { display: block; margin-top: 4px; font-size: 14px; line-height: 1.6; color: var(--ink-3); }
  .book-price { margin-top: 6px; font-size: 15px; }

  .narrators { width: auto; max-width: var(--wrap); margin: 0 auto; padding: 40px 24px 0; }
  .narrators ul { gap: 24px; }
  .narrators li { grid-template-columns: 80px minmax(0, 1fr); align-items: center; }
  .face { width: 80px; height: 80px; }

  .foot-in { grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 24px 60px; padding: 36px 24px 44px; }
  .foot-legal { justify-items: end; text-align: right; }
  .legal-links, .biz { justify-content: flex-end; }

  /* 표지: 왼쪽 표제·때 자·값(따라 내려옴) + 오른쪽 그림과 본문 */
  .view-landing { padding-bottom: 0; }
  .land { display: flex; align-items: flex-start; gap: 56px; max-width: var(--wrap); margin: 0 auto; padding: 36px 24px 0; }
  .land-head { flex: 0 0 380px; position: sticky; top: 92px; width: auto; margin: 0; padding: 0; gap: 12px; }
  .crumb { display: flex; flex-wrap: wrap; gap: 8px; font-family: var(--ui); font-size: 13.5px; color: var(--ink-3); }
  .crumb a { text-decoration: underline; text-underline-offset: 3px; }
  .lh-title { font-size: 92px; }
  .land-buy { display: grid; gap: 10px; padding-top: 18px; }
  .lb-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding-bottom: 8px; border-bottom: 1px solid var(--ink); }
  .lb-price span { font-family: var(--ui); font-size: 13px; color: var(--ink-3); }
  .lb-price b { font-family: var(--title); font-weight: 400; font-size: 24px; color: var(--seal); text-align: right; }
  .land-buy .btn { min-height: 54px; font-size: 17px; }
  .land-main { flex: 1; min-width: 0; width: auto; max-width: 720px; margin: 0; padding: 0; }
  .speech { grid-template-columns: 84px minmax(0, 1fr); gap: 18px; }
  .speech-face { width: 84px; height: 84px; }
  .speech-bubble p { font-size: 18px; }
  .land-sec { padding-top: 44px; }
  .sticky-cta { display: none; }

  /* 풀이: 왼쪽 열두 달 자·차례·이야기 주인 + 가운데 본문 */
  .read-bar-in { padding: 8px 24px; min-height: 62px; gap: 16px; }
  .read-bar .brand { display: inline-flex; margin-right: 12px; }
  .read-title b { font-size: 20px; }
  .toc-drop { display: none; }
  .read { display: flex; align-items: flex-start; gap: 48px; max-width: 1180px; margin: 0 auto; padding: 34px 24px 0; }
  .read-left { display: grid; gap: 26px; flex: 0 0 280px; position: sticky; top: 86px; max-height: calc(100vh - 100px); overflow-y: auto; scrollbar-width: thin; padding-right: 4px; }
  .read-main { flex: 1; min-width: 0; max-width: 760px; margin: 0; }
  .paid-note { margin: 18px auto 0; }
  .ruler ol { display: grid; border-top: 1px solid var(--ink); }
  .ruler button { display: grid; grid-template-columns: 40px 34px minmax(0, 1fr); align-items: baseline; gap: 6px; width: 100%; padding: 6px 4px; text-align: left; border-bottom: 1px solid var(--rule-soft); }
  .rl-label { font-family: var(--title); font-size: 15.5px; }
  .rl-mark { font-family: var(--hanja); font-weight: 700; font-size: 14px; color: var(--ink-2); white-space: nowrap; }
  .rl-note { font-family: var(--ui); font-size: 12.5px; color: var(--ink-3); }
  .ruler button[aria-current] { background: var(--seal-soft); box-shadow: inset 3px 0 0 var(--seal); }
  .ruler button.g-peak .rl-mark { color: var(--seal); }
  .ruler button:hover { background: var(--paper-2); }
  .who { display: grid; gap: 10px; }
  .who-name { font-family: var(--title); font-weight: 400; font-size: 20px; }
  .who-rows { display: grid; font-family: var(--ui); font-size: 13px; }
  .who-rows div { display: grid; grid-template-columns: 62px minmax(0, 1fr); gap: 6px; padding: 5px 0; border-bottom: 1px solid var(--rule-soft); }
  .who-rows dt { color: var(--ink-3); }
  .who .link { justify-self: start; font-size: 13.5px; }
  .keep { display: grid; gap: 8px; }
  .keep .btn { min-height: 46px; font-size: 15px; }

  /* 컷: 그림은 왼쪽, 말은 오른쪽 */
  .webtoon { gap: 26px; }
  .chap { margin-top: 22px; }
  .chap-title { font-size: 25px; }
  .rh-title { font-size: 92px; }
  .nb-gz { font-size: 38px; }
  .nb-sub { font-size: 12.5px; }
  .panel.has-speaker { display: grid; grid-template-columns: 250px minmax(0, 1fr); grid-template-rows: auto 1fr; min-height: 300px; padding: 0; background: var(--paper-2); color: var(--ink); }
  .panel.has-speaker > .cut-scene { inset: 0 auto 0 0; width: 250px; }
  .panel.has-speaker > .narration { grid-column: 2; grid-row: 1; max-width: none; margin: 24px 26px 0; padding: 0 0 10px; background: none; border: 0; border-bottom: 1px solid var(--rule-soft); font-size: 15.5px; color: var(--ink-2); }
  .panel.has-speaker .speaker { display: contents; }
  .panel.has-speaker .speaker-art { grid-column: 1; grid-row: 1 / span 2; width: 214px; margin: 0 auto; }
  .panel.has-speaker .bubble { grid-column: 2; grid-row: 2; align-self: center; margin: 22px 28px 26px 30px; font-size: 17px; }
  .panel.has-speaker .bubble::before { left: -7px; right: auto; bottom: auto; top: 50%; margin-top: -6px; border-right: 0; border-left: 1px solid var(--ink); }
  .flip .panel.has-speaker { grid-template-columns: minmax(0, 1fr) 250px; }
  .flip .panel.has-speaker > .cut-scene { left: auto; right: 0; }
  .flip .panel.has-speaker .speaker-art { grid-column: 2; }
  .flip .panel.has-speaker > .narration, .flip .panel.has-speaker .bubble { grid-column: 1; }
  .flip .panel.has-speaker .bubble { margin: 22px 30px 26px 28px; }
  .flip .panel.has-speaker .bubble::before { left: auto; right: -7px; border-left: 0; border-bottom: 0; border-right: 1px solid var(--ink); border-top: 1px solid var(--ink); }
  .panel.has-speaker > .sample-mark, .panel.has-speaker > .badge { left: 12px; right: auto; }
  .panel:not(.has-speaker) { min-height: 240px; }
  .has-panel > .prop { padding: 22px 26px 24px; }
  .cut.paper-bg, .cut.ink-bg { padding: 24px 26px; }
  .cut.paper-bg.has-panel, .cut.ink-bg.has-panel { padding: 0; }
  .board { grid-template-rows: repeat(4, minmax(92px, auto)); }
  .g-major { font-size: 15.5px; }
  .gz { font-size: 46px; }
  .twelve { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .mstrip { grid-template-columns: repeat(6, minmax(0, 1fr)); }

  /* 판: 가운데 떠요 */
  .sheet { left: 50%; right: auto; top: 50%; bottom: auto; width: min(640px, calc(100vw - 48px)); max-height: 90vh; transform: translate(-50%, -50%); animation: pop .26s ease-out; }
  @keyframes pop { from { opacity: 0; transform: translate(-50%, calc(-50% + 16px)); } }
  .sheet-card { padding: 28px 30px 26px; border: 1px solid var(--ink); border-top: 4px solid var(--seal); }
  .sheet-checkout { width: min(940px, calc(100vw - 48px)); }
  .sheet-card.checkout { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 36px; align-items: start; padding: 30px 34px; }
  .sheet-card.checkout .scroll-title { text-align: left; font-size: 22px; }
  .sheet-card.checkout .co-side { padding-left: 34px; border-left: 1px solid var(--rule-soft); }
  .sheet-card.promo { padding: 0 0 12px; }
  .sheet-input { width: min(720px, calc(100vw - 48px)); }
  .scroll { padding-top: 0; }
  .paper { margin: -3px 16px; padding: 24px 32px 22px; }
  .bf-row { grid-template-columns: 120px minmax(0, 1fr); align-items: start; gap: 16px; }
  .bf-label { padding-top: 8px; }
  .bf-label small { display: block; margin: 2px 0 0; }
  .dg-day span { min-height: 34px; }
  .toast { bottom: 32px; }
}

/* 넓은 PC: 책장 한 줄에 세 권 */
@media (min-width: 1280px) {
  .shelf-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* 칠한 그림: 장면은 칸을 덮고, 이야기꾼은 몸 그림을 써요. 얼굴 동그라미 칸에서는 얼굴 그림만 보여요 */
img.scene { object-fit: cover; }
.nar-pic { display: contents; }
.narrator-face { display: none; }
:is(.face, .speech-face, .ask-face, .letter-face) .narrator-art { display: none; }
:is(.face, .speech-face, .ask-face, .letter-face) .narrator-face { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 작은 표지(책장·다른 이야기·결제 판)는 장면 그림이 보이게 인물을 줄여 오른쪽 아래에 앉혀요 */
.book-narrator { width: 64%; right: -4%; }
/* 상점 맨 위 그림 띠: 휴대폰은 그림 아래에 글, 넓은 화면은 그림 왼쪽 여백에 글 */
.ori-hero { position: relative; background: var(--sheet); border-bottom: 1px solid var(--ink); }
.oh-pic { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.oh-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.oh-cast { position: absolute; left: 3%; bottom: 0; height: 66%; display: flex; align-items: flex-end; }
.oh-cast .nar-pic .narrator-art { height: 100%; width: auto; }
.oh-cast .nar-pic + .nar-pic .narrator-art { margin-left: -9%; }
.oh-text { padding: 18px 18px 22px; }
.oh-kicker { font: 700 13px/1.4 var(--ui); color: var(--seal); letter-spacing: .04em; }
.oh-title { margin-top: 6px; font: 400 30px/1.28 var(--title); color: var(--ink); word-break: keep-all; }
.oh-sub { margin-top: 10px; font: 400 15px/1.65 var(--body); color: var(--ink-2); word-break: keep-all; text-wrap: balance; }
.oh-text .btn { margin-top: 16px; }
@media (min-width: 900px) {
  .ori-hero { max-width: calc(var(--wrap) - 48px); margin: 28px auto 0; border: 1px solid var(--ink); aspect-ratio: 16 / 6; }
  .oh-pic { position: absolute; inset: 0; aspect-ratio: auto; }
  .oh-bg { object-position: center 58%; }
  .oh-cast { left: 41%; height: 62%; }
  .oh-text { position: relative; z-index: 1; max-width: 40%; padding: 46px 0 0 48px; }
  .oh-title { font-size: 42px; }
}
/* 넓은 화면 컷: 칠한 장면을 컷 전체에 깔고, 인물은 왼쪽(뒤집힌 컷은 오른쪽)에, 글은 종이 상자에 얹어요 */
@media (min-width: 1024px) {
  .panel.has-speaker > .cut-scene, .flip .panel.has-speaker > .cut-scene { inset: 0; left: 0; right: 0; width: 100%; }
  .panel.has-speaker > .narration { background: var(--sheet); border: 1px solid var(--ink); padding: 10px 14px; }
}
