/* 염라네 사주장부 테마: 기분 좋은 크림 종이 + 먹 + 염라 빨강(포인트) + 불꽃 주황 + 민트.
   style.css 위에 덮어쓴다. 캐릭터 이미지는 /img/yeomra.png (배경 투명). */
:root {
  --bg: #fff6ea;
  --surface: #fffdf8;
  --surface-2: #fff4e4;
  --ink: #2a211d;
  --ink-2: #54473f;
  --ink-3: #7a6b60;
  --line: #f0e2cc;
  --line-2: #e2cfb1;
  --gold: #b9772a;
  --gold-2: #e9b44c;
  --seal: #e2483b;      /* 염라 빨강: 포인트에만 */
  --flame: #ff8a3d;
  --mint: #7fd3b9;
  --mint-ink: #2f8f74;
  --night: #2b211d;
  --night-2: #3a2d27;
  --r-lg: 26px; --r-md: 18px; --r-sm: 12px;
  --disp: 'Gowun Batang', 'Noto Serif KR', serif;
  --shadow: 0 2px 0 rgba(42, 33, 29, .06), 0 18px 40px -22px rgba(120, 60, 20, .35);
}
body { background: var(--bg); }
.top { background: rgba(255, 246, 234, .86); border-bottom-color: transparent; }
.brand { font-family: var(--disp); font-weight: 700; }
.brand-name { display: flex; flex-direction: column; line-height: 1.15; }
.brand-sub { font: 500 10.5px var(--sans); color: var(--ink-3); letter-spacing: 0; }
.seal { border-radius: 9px; transform: rotate(-6deg); background: var(--seal); }

/* ---------- 첫 화면: 염라가 맞이하는 무대 ---------- */
.ym-hero { position: relative; max-width: 760px; margin: 18px auto 0; padding: 30px 22px 34px; border-radius: 34px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 105%, #ffd9a8 0%, #ffe9c9 38%, #fff6ea 75%); text-align: center; isolation: isolate; }
.ym-hero::before { content: ''; position: absolute; inset: auto -10% -40% -10%; height: 70%; z-index: -1;
  background: radial-gradient(closest-side, rgba(255, 138, 61, .28), rgba(255, 138, 61, 0)); animation: ym-glow 3.6s ease-in-out infinite; }
.ym-stage { position: relative; display: flex; justify-content: center; align-items: flex-end; height: 300px; }
.ym-char { width: 230px; height: auto; filter: drop-shadow(0 18px 18px rgba(120, 60, 20, .22)); animation: ym-hop 2.4s cubic-bezier(.45, 0, .3, 1) infinite; transform-origin: 50% 100%; }
.ym-shadow { position: absolute; bottom: 4px; left: 50%; width: 150px; height: 18px; margin-left: -75px; border-radius: 50%; background: rgba(120, 60, 20, .18);
  animation: ym-shadow 2.4s cubic-bezier(.45, 0, .3, 1) infinite; }
.ym-bubble { position: absolute; top: 6px; right: max(4px, calc(50% - 250px)); max-width: 190px; padding: 12px 16px; border-radius: 20px 20px 20px 6px;
  background: var(--ink); color: #fff6ea; font: 600 15px/1.45 var(--sans); text-align: left; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px) scale(.94); animation: ym-pop .6s .5s cubic-bezier(.2, 1.4, .4, 1) forwards; }
.ym-spark { position: absolute; width: 8px; height: 8px; border-radius: 50%; background: var(--gold-2); opacity: 0; animation: ym-spark 3.2s ease-in-out infinite; }
.ym-hero h1 { margin-top: 18px; font-family: var(--disp); font-weight: 700; font-size: clamp(27px, 6.4vw, 40px); line-height: 1.38; }
.ym-hero h1 em { font-style: normal; color: var(--seal); }
.ym-hero .lead { color: var(--ink-2); }
.ym-start { display: inline-flex; align-items: center; gap: 10px; margin-top: 22px; height: 56px; padding: 0 28px; border: 0; border-radius: 999px;
  background: var(--seal); color: #fff; font: 700 17px var(--sans); text-decoration: none; box-shadow: 0 5px 0 #a8291f; transition: transform .15s, box-shadow .15s; }
.ym-start:hover { transform: translateY(-2px); box-shadow: 0 7px 0 #a8291f; }
.ym-start:active { transform: translateY(3px); box-shadow: 0 2px 0 #a8291f; }
.ym-badges { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.ym-badges span { padding: 7px 13px; border-radius: 999px; background: rgba(255, 255, 255, .7); border: 1px solid var(--line); font-size: 13px; color: var(--ink-2); }

/* 첫 화면 영상: 한 번 재생하고 마지막 장면에서 멈춘 뒤 말풍선과 제목이 떠오른다 */
.ym-film { position: relative; margin: -30px -22px 0; aspect-ratio: 16 / 9; overflow: hidden;
  /* 영상 티가 나지 않게: 테두리 없이 아래쪽이 크림색 바탕으로 스며든다 (넓은 화면에서는 양옆도) */
  -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 74%, transparent); mask-image: linear-gradient(transparent, #000 7%, #000 74%, transparent); }
.ym-film video { display: block; width: 100%; height: 100%; object-fit: cover; }
/* 염라 말풍선: 미리 그린 한지 틀 한 장 + 고운바탕 글씨. 꼬리 끝(--tx, --ty, 영상 기준 %)을 염라 얼굴 옆에 맞추고,
   크기는 글씨를 따라가서 휴대폰에서도 12px 아래로 내려가지 않는다. 영상 재생 시간에 맞춰 motion.js가 .on을 붙인다. */
.ym-film { container-type: inline-size; }
.yb { position: absolute; z-index: 2; margin: 0; width: var(--w); aspect-ratio: var(--ar); background: 0 0 / 100% 100% no-repeat; color: var(--ink);
  left: max(3cqw, calc(var(--tx) * 1cqw - var(--tipx) * var(--w))); top: max(1.5cqw, calc(var(--ty) * .5625cqw - var(--tipy) * var(--w) * var(--hw)));
  opacity: 0; visibility: hidden; transform-origin: 94% 90%; }
.yb.one { --w: max(12cqw, 70px); --ar: 507 / 420; --hw: .828; --tipx: .925; --tipy: .883; --tx: 33; --ty: 24; background-image: url(/media/say-1.webp); font-size: calc(var(--w) * .2); }
.yb.two { --w: max(18cqw, 104px); --ar: 780 / 510; --hw: .654; --tipx: .946; --tipy: .894; --tx: 21; --ty: 26; background-image: url(/media/say-2.webp); font-size: calc(var(--w) * .122); }
.yb .txt { position: absolute; left: 9%; right: 8%; top: 9%; height: 62%; display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
  font: 700 1em/1.12 var(--disp); letter-spacing: -.02em; }
.yb .l { display: block; white-space: nowrap; }
.yb .seal { position: absolute; left: -3%; top: -6%; width: 1.15em; aspect-ratio: 1; background: var(--seal); color: #fff3e6; border-radius: 3px; display: grid; place-items: center;
  font: 900 .62em 'Noto Serif KR', serif; transform: rotate(-9deg); }
.yb.on { visibility: visible; animation: yb-in .5s cubic-bezier(.2, 1.4, .4, 1) both; }
.yb.on .seal { animation: yb-seal .35s .9s cubic-bezier(.3, 1.6, .5, 1) both; }
.yb .ch { display: inline-block; opacity: 0; filter: blur(2px); transform: translateY(.08em) scale(1.15); }
.yb.on .ch { animation: yb-ink .3s ease-out forwards; animation-delay: calc(.3s + var(--i) * 65ms); }
@keyframes yb-in { 0% { opacity: 0; transform: scale(.4) rotate(-6deg) } 60% { opacity: 1; transform: scale(1.06) rotate(1.5deg) } 100% { opacity: 1; transform: none } }
@keyframes yb-ink { to { opacity: 1; filter: none; transform: none } }
@keyframes yb-seal { from { opacity: 0; transform: rotate(-9deg) scale(2.2) } to { opacity: 1; transform: rotate(-9deg) scale(1) } }
/* 자동 재생이 막히면 마지막 장면을 정지 이미지로 보여 준다 */
.ym-f-close { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; pointer-events: none; }
.ym-film.still .ym-f-close { opacity: 1; }
.ym-film-ctrl { position: absolute; top: 10px; right: 10px; z-index: 3; display: flex; gap: 6px; }
.ym-film-ctrl button { width: 32px; height: 32px; border: 0; border-radius: 50%; display: grid; place-items: center; color: #fff6ea; background: rgba(42, 33, 29, .32); opacity: .75; }
.ym-film-ctrl button svg { width: 15px; height: 15px; }
.ym-film-ctrl button[aria-pressed="true"] .off, .ym-film-ctrl button[aria-pressed="false"] .on { display: none; }
.ym-hero .ym-after { opacity: 0; transform: translateY(18px); transition: opacity .8s ease, transform .8s cubic-bezier(.2, .7, .2, 1); }
.ym-hero.ready .ym-after { opacity: 1; transform: none; }
.ym-hero.ready .ym-after:nth-of-type(2) { transition-delay: .15s; }
/* 휴대폰: 카드 테두리 없이 화면 끝까지 */
@media (max-width: 799px) { .ym-hero { margin-top: 0; border-radius: 0 0 34px 34px; overflow: visible; } .ym-hero::before { inset: auto 0 -40% 0; }
  .ym-film { margin: -30px calc(50% - 50vw) 0; } }
@media (min-width: 800px) { .ym-film { -webkit-mask-image: linear-gradient(transparent, #000 7%, #000 74%, transparent), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in; mask-image: linear-gradient(transparent, #000 7%, #000 74%, transparent), linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-composite: intersect; } }
@media (prefers-reduced-motion: reduce) { .ym-hero .ym-after { opacity: 1; transform: none; } .yb.on, .yb.on .ch, .yb.on .seal { animation: none; opacity: 1; filter: none; transform: none; } .yb.on .seal { transform: rotate(-9deg); } }

/* ---------- 서고 배경: 영상 속 그 서고가 페이지 뒤에 고정으로 깔린다 ---------- */
html, body { overflow-x: clip; }
body { background: #2b1d15; }
.page-bg { position: fixed; inset: 0; z-index: -1; background: url(/media/bg-wide.webp) center / cover no-repeat; }
.page-bg::after { content: ''; position: absolute; inset: 0; background: radial-gradient(120% 80% at 50% 30%, rgba(30, 18, 10, .25), rgba(30, 18, 10, .62)); }
@media (max-aspect-ratio: 4/5) { .page-bg { background-image: url(/media/bg-tall.webp); } }
.top { background: rgba(43, 29, 21, .55); backdrop-filter: blur(12px); border-bottom: 0; }
.top .brand-name, .top a, .top button { color: #fff3e0; }
.top .brand-sub { color: rgba(255, 243, 224, .7); }
.site-foot { color: rgba(255, 243, 224, .7); }
/* 첫 화면: 카드 없이 서고 위에 바로 */
.ym-hero { background: transparent; }
.ym-hero::before { background: radial-gradient(closest-side, rgba(255, 160, 80, .22), rgba(255, 138, 61, 0)); }
.ym-hero h1 { color: #fff3e0; text-shadow: 0 2px 14px rgba(0, 0, 0, .45); }
.ym-hero h1 em { color: #ff8f6e; }
.ym-hero .lead { color: rgba(255, 243, 224, .86); text-shadow: 0 1px 8px rgba(0, 0, 0, .5); }
.ym-badges span { background: rgba(43, 29, 21, .5); border-color: rgba(255, 243, 224, .2); color: #fff3e0; }

/* ---------- 큰 두루마리: 나무 축(금장 마개·붉은 술) 두 개 사이에 한지가 펼쳐진다 ---------- */
/* 축 이미지는 왼쪽 마개 / 늘어나는 가운데 / 오른쪽 마개 세 조각. 높이 --rh, 축 몸통은 위에서 0~33% (그 아래는 술). */
.roll { --rh: clamp(110px, 30vw, 170px); --cap: calc(var(--rh) * .495); position: relative; max-width: 760px; margin: 40px auto 0; }
.rod { position: relative; z-index: 4; display: flex; height: var(--rh); margin: 0 calc(var(--cap) * -.62); pointer-events: none;
  filter: drop-shadow(0 10px 12px rgba(20, 10, 4, .45)); }
.rod i { display: block; height: 100%; background: 0 0 / 100% 100% no-repeat; }
.rod i:nth-child(1) { width: var(--cap); background-image: url(/media/rod-l.webp); }
.rod i:nth-child(2) { flex: 1; background-image: url(/media/rod-m.webp); }
.rod i:nth-child(3) { width: var(--cap); background-image: url(/media/rod-r.webp); }
.roll > .rod:first-child { margin-bottom: calc(var(--rh) * -.83); }     /* 종이 윗변이 축 몸통 가운데에 물린다 */
.roll > .rod:last-child { margin-top: calc(var(--rh) * -.17); transition: margin-top 1.5s cubic-bezier(.55, .05, .2, 1); }
.roll-paper { position: relative; overflow: clip; transition: max-height 1.5s cubic-bezier(.55, .05, .2, 1); }
.roll.closed .roll-paper { max-height: 0; }
.roll.closed > .rod:last-child { margin-top: calc(var(--rh) * .02); }  /* 닫혀 있으면 두 축이 살짝 어긋나게 겹쳐 굵은 한 뭉치로 (위 축의 -.83과 더해진다) */
/* 닫힌 두루마리에 묶인 이름표 + 펼치기 */
.roll-open { position: absolute; z-index: 6; left: 50%; top: calc(var(--rh) * .2); transform: translateX(-50%) rotate(-2deg); display: grid; justify-items: center; gap: 2px;
  padding: 12px 22px 10px; border: 0; border-radius: 4px; background: #fbf3e2 url(/media/hanji.webp);
  box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .5), inset 0 0 0 1.5px #c8372d, inset 0 0 0 4px #fbf3e2, inset 0 0 0 5px rgba(200, 55, 45, .55);
  cursor: pointer; transition: opacity .4s, transform .4s; animation: ym-tag 2.4s ease-in-out infinite; }
.roll-tag { font: 700 clamp(17px, 4.6vw, 22px) var(--disp); color: var(--ink); letter-spacing: .08em; }
.roll-hint { font: 600 12px var(--sans); color: #c8372d; letter-spacing: .14em; }
.roll:not(.closed) .roll-open { opacity: 0; pointer-events: none; animation: none; }
@keyframes ym-tag { 0%, 100% { transform: translateX(-50%) rotate(-2deg) } 50% { transform: translateX(-50%) rotate(1deg) translateY(-3px) } }

/* ---------- 종이(신청서) ---------- */
.scroll { position: relative; margin: 0; border: 0; border-radius: 0; box-shadow: none;
  background: linear-gradient(90deg, rgba(120, 80, 40, .16), transparent 3%, transparent 97%, rgba(120, 80, 40, .16)), #fbf3e2 url(/media/hanji.webp);
  outline: 1.5px solid #c8372d; outline-offset: -14px; }
.scroll::after { content: ''; position: absolute; inset: 19px; border: 1px solid rgba(200, 55, 45, .55); pointer-events: none; }
.scroll-head { position: relative; padding: calc(var(--rh) * .3 + 22px) 30px 8px; text-align: center; }
.scroll-kicker { margin: 0; font: 600 13px var(--sans); letter-spacing: .3em; color: #c8372d; }
.scroll-title { margin: 6px 0 0; font: 700 clamp(26px, 6.8vw, 34px) var(--disp); letter-spacing: .06em; color: var(--ink); }
.scroll-seal { position: absolute; top: calc(var(--rh) * .3 + 8px); right: 34px; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 6px; background: #c8372d; color: #fff3e6;
  font: 900 21px 'Noto Serif KR', serif; transform: rotate(8deg); box-shadow: inset 0 0 0 2px rgba(255, 243, 230, .35); }
.scroll-guide { display: flex; align-items: center; gap: 10px; max-width: 420px; margin: 18px auto 0; text-align: left; }
.scroll-guide img { flex: none; width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink); }
.scroll-guide p { position: relative; margin: 0; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fffaf0; font: 700 15px/1.45 var(--disp); }
.scroll-guide p::before { content: ''; position: absolute; left: -8px; top: 50%; width: 12px; height: 12px; margin-top: -6px; background: #fffaf0;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.scroll .q { position: relative; background: transparent; border-top: 0; margin: 0 24px; padding-left: clamp(12px, 4vw, 30px); padding-right: clamp(12px, 4vw, 30px);
  background-image: linear-gradient(90deg, rgba(42, 33, 29, .35) 50%, transparent 0); background-size: 10px 1.5px; background-repeat: repeat-x; background-position: 0 0; }
.scroll .q:first-of-type { background-image: none; }
.scroll .q-no { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1.5px solid var(--ink); border-radius: 50%; font: 900 17px 'Noto Serif KR', serif; color: var(--ink); }
.scroll .q-head h2 { font-family: var(--disp); font-weight: 700; }
.scroll .q-head::after { content: '確'; position: absolute; top: 26px; right: 4px; width: 38px; height: 38px; display: grid; place-items: center; border: 2.5px solid #c8372d; border-radius: 50%;
  color: #c8372d; font: 900 18px 'Noto Serif KR', serif; opacity: 0; transform: rotate(-14deg) scale(2); pointer-events: none; }
.scroll .q.done .q-head::after { animation: ym-stamp .38s cubic-bezier(.3, 1.5, .5, 1) forwards; }
.scroll .q-head .link-btn { margin-right: 44px; }
@keyframes ym-stamp { 0% { opacity: 0; transform: rotate(-14deg) scale(2) } 70% { opacity: .95; transform: rotate(-14deg) scale(.92) } 100% { opacity: .9; transform: rotate(-14deg) scale(1) } }
.scroll .choice button, .scroll .chips button, .scroll .hours button, .scroll .toggle, .scroll .text-in, .scroll .search input, .scroll .typed input { background: rgba(255, 252, 244, .7); border-color: rgba(42, 33, 29, .3); border-radius: 12px; }
.scroll .toggle button { background: transparent; }
.scroll .choice button[aria-pressed="true"], .scroll .chips button[aria-pressed="true"], .scroll .hours button[aria-pressed="true"], .scroll .toggle button[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff; }
.scroll .chips button { border-radius: 999px; }
.scroll .sect { background: rgba(255, 252, 244, .7); border-radius: 12px; }
.scroll .dock { margin: 0 14px; padding-bottom: calc(22px + var(--rh) * .2); background: #fff7e8 url(/media/hanji.webp); color: var(--ink); border-top: 1.5px solid var(--ink); border-radius: 0; box-shadow: 0 -12px 24px -18px rgba(60, 30, 10, .5); }
.scroll .dock-label { color: #c8372d; }
.scroll .dock-sub { color: var(--ink-2); }
.cta { border-radius: 999px !important; background: var(--seal) !important; color: #fff !important; box-shadow: 0 5px 0 #a8291f; font-family: var(--disp) !important; letter-spacing: .04em; }
.cta:disabled { background: #d9c9b4 !important; box-shadow: none; opacity: 1 !important; color: #fff !important; }
/* 내고 나면: 큰 도장 쾅 → 두루마리가 다시 말린다 (motion.js) */
.scroll.sealed::after { content: "閻"; position: fixed; inset: auto; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; display: grid; place-items: center; border: 0; border-radius: 14px;
  background: #c8372d; color: #fff3e6; font: 900 64px 'Noto Serif KR', serif; z-index: 50; animation: ym-bigstamp .45s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes ym-bigstamp { from { opacity: 0; transform: rotate(-10deg) scale(2.4) } to { opacity: .95; transform: rotate(-10deg) scale(1) } }
@media (max-width: 640px) { .roll { margin-left: calc(var(--cap) * .55); margin-right: calc(var(--cap) * .55); } .scroll .q { margin: 0 16px; } .scroll-head { padding-left: 22px; padding-right: 22px; } .scroll-seal { right: 26px; width: 34px; height: 34px; font-size: 18px; } }
@media (prefers-reduced-motion: reduce) { .roll-paper, .roll > .rod:last-child { transition: none; } .roll-open { animation: none; } .scroll .q.done .q-head::after { animation: none; opacity: .9; transform: rotate(-14deg); } }

/* ---------- 첫 화면 2: 제목이 먼저, 영상은 족자(비단 표구 + 나무 축)에 걸려 있다 ---------- */
.ym-hero { max-width: 1100px; padding: 34px 16px 30px; }
.ym-title { text-align: center; }
.ym-kicker { margin: 0; font: 700 13px var(--sans); letter-spacing: .42em; color: var(--gold-2); text-shadow: 0 1px 6px rgba(0, 0, 0, .5); }
.ym-brand { display: inline-flex; align-items: center; gap: .28em; margin: 10px 0 0; font: 700 clamp(46px, 13vw, 84px)/1 var(--disp); letter-spacing: .04em; color: #fff3e0;
  text-shadow: 0 3px 0 rgba(90, 40, 15, .55), 0 6px 24px rgba(0, 0, 0, .5); }
.ym-brand-seal { display: inline-grid; place-items: center; width: .82em; height: .82em; border-radius: .14em; background: var(--seal); color: #fff3e6; font: 900 .5em 'Noto Serif KR', serif;
  transform: rotate(-7deg); box-shadow: inset 0 0 0 .05em rgba(255, 243, 230, .35), 0 4px 12px rgba(0, 0, 0, .4); }
.ym-sub { margin: 12px 0 0; font: 700 clamp(18px, 4.6vw, 26px) var(--disp); letter-spacing: .2em; color: #ffd9a8; text-shadow: 0 2px 10px rgba(0, 0, 0, .55); }
.ym-sub::before, .ym-sub::after { content: ''; display: inline-block; width: 1.6em; height: 1px; margin: 0 .6em; vertical-align: middle; background: rgba(255, 217, 168, .6); }
.ym-title .lead { max-width: 560px; margin: 16px auto 0; font-size: clamp(15px, 3.8vw, 18px); line-height: 1.7; }
.ym-title .lead em { font-style: normal; color: #ffb08f; }
.ym-free { margin: 26px 0 0; font: 700 clamp(16px, 4.2vw, 19px) var(--disp); color: #fff3e0; text-shadow: 0 2px 10px rgba(0, 0, 0, .5); }
.ym-hero .ym-start { margin-top: 14px; }

.ym-frame { --rh: clamp(66px, 13vw, 116px); --cap: calc(var(--rh) * .495); position: relative; max-width: 1000px; margin: 30px auto 0; }
.ym-frame > .rod:first-child { margin-bottom: calc(var(--rh) * -.83); }
.ym-frame > .rod:last-child { margin-top: calc(var(--rh) * -.17); }
/* 비단 표구: 짙은 붉은 비단 + 금실 무늬 + 안쪽 금테 */
.ym-mount { position: relative; padding: calc(var(--rh) * .17 + clamp(12px, 2.6vw, 26px)) clamp(10px, 2.6vw, 26px) calc(var(--rh) * .17 + clamp(12px, 2.6vw, 26px));
  background: radial-gradient(circle at 25% 25%, rgba(233, 180, 76, .22) 0 1.5px, transparent 2.5px) 0 0 / 18px 18px,
    radial-gradient(circle at 75% 75%, rgba(233, 180, 76, .16) 0 1.5px, transparent 2.5px) 0 0 / 18px 18px,
    linear-gradient(90deg, rgba(0, 0, 0, .25), transparent 6%, transparent 94%, rgba(0, 0, 0, .25)), linear-gradient(#7d221b, #5a1612);
  box-shadow: 0 24px 50px -20px rgba(0, 0, 0, .7), inset 0 0 0 1.5px rgba(233, 180, 76, .55); }
.ym-mount .ym-film { margin: 0; -webkit-mask-image: none; mask-image: none; border-radius: 2px; box-shadow: 0 0 0 2px #c99a3c, 0 0 0 5px #3b0f0b, 0 0 0 6.5px rgba(233, 180, 76, .6); }
@media (max-width: 799px) { .ym-hero { padding: 26px 8px 30px; } .ym-frame { --rh: 58px; margin-left: calc(var(--cap) * .45); margin-right: calc(var(--cap) * .45); }
  .ym-mount { padding: calc(var(--rh) * .17 + 9px) 7px calc(var(--rh) * .17 + 9px); } .ym-mount .ym-film { margin: 0; } }

/* ---------- 염라 한마디 (입력지 안: 모름을 골랐을 때 등) ---------- */
.say { display: flex; align-items: center; gap: 10px; margin-top: 14px; }
.say[hidden] { display: none; }
.say img { flex: none; width: 44px; height: 44px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink); }
.say p { position: relative; margin: 0; padding: 9px 13px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fffaf0; font: 700 14.5px/1.45 var(--disp); color: var(--ink);
  animation: ym-say .35s cubic-bezier(.2, 1.4, .4, 1) both; }
.say p::before { content: ''; position: absolute; left: -7px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; background: #fffaf0; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
@keyframes ym-say { from { opacity: 0; transform: scale(.85) } to { opacity: 1; transform: none } }
.picked:empty { display: none; }

/* ---------- 장부 찾는 중 (로딩): 서고에서 띠 먹방울들이 장부를 나르고, 염라가 한 줄씩 알려 주고, 장부에 여덟 글자 자리가 채워진 뒤 閻 도장 ---------- */
.ym-load { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; padding: 24px 16px;
  color: #fff3e0; text-align: center; opacity: 0; transition: opacity .4s ease; overflow: hidden; }
.ym-load.on { opacity: 1; }
.ld-bg { position: absolute; inset: -20px; z-index: -1; background: url(/media/bg-wide.webp) center / cover no-repeat; filter: blur(6px) brightness(.55); }
@media (max-aspect-ratio: 4/5) { .ld-bg { background-image: url(/media/bg-tall.webp); } }
/* 염라 한마디 */
.ld-say { display: flex; align-items: center; gap: 12px; max-width: 420px; width: 100%; }
.ld-say img { flex: none; width: 74px; height: 74px; border-radius: 50%; box-shadow: 0 0 0 3px #fbf3e2, 0 0 0 5px var(--ink), 0 8px 18px rgba(0, 0, 0, .45); }
.ld-title { position: relative; flex: 1; margin: 0; padding: 13px 16px; border: 2px solid var(--ink); border-radius: 16px; background: #fbf3e2 url(/media/hanji.webp);
  color: var(--ink); font: 700 clamp(16.5px, 4.4vw, 19px)/1.5 var(--disp); text-align: left; white-space: pre-line; min-height: 3em; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.ld-title::before { content: ''; position: absolute; left: -10px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; background: #fbf3e2;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.ld-title.pop { animation: ym-say .35s cubic-bezier(.2, 1.4, .4, 1); }
.ld-sub { margin: 0; font-size: 15px; color: #f2dcbf; min-height: 1.5em; text-shadow: 0 1px 6px rgba(0, 0, 0, .6); }
/* 장부 한 장: 오른쪽부터 年 月 日 時, 칸마다 먹이 번지며 채워진다 */
.ld-ledger { position: relative; width: min(330px, 86vw); padding: 18px 18px 20px; background: #fbf3e2 url(/media/hanji.webp); color: var(--ink);
  outline: 1.5px solid #c8372d; outline-offset: -8px; box-shadow: 0 16px 36px rgba(0, 0, 0, .5); transform: rotate(-1.2deg); }
.ld-ledger h3 { margin: 0 0 12px; font: 700 15px var(--disp); letter-spacing: .3em; color: #c8372d; }
.ld-cols { display: flex; flex-direction: row-reverse; justify-content: center; gap: 10px; }
.ld-col { display: grid; gap: 6px; justify-items: center; }
.ld-col b { font: 900 13px 'Noto Serif KR', serif; color: var(--ink-2); }
.ld-col i { width: 52px; height: 52px; display: grid; place-items: center; border: 1.5px solid rgba(42, 33, 29, .45); border-radius: 8px; font: 900 26px 'Noto Serif KR', serif; font-style: normal;
  color: transparent; background: rgba(255, 252, 244, .6); position: relative; overflow: hidden; }
.ld-col i::after { content: ''; position: absolute; inset: 30%; border-radius: 50%; background: var(--ink); opacity: 0; transform: scale(.2); }
.ld-ledger .fill i::after { animation: ld-ink .6s ease-out forwards; animation-delay: calc(var(--k) * 110ms); }
@keyframes ld-ink { 0% { opacity: 0; transform: scale(.2) } 50% { opacity: .9; transform: scale(1.3) } 100% { opacity: .82; transform: scale(1) } }
.ld-seal { position: absolute; right: -14px; bottom: -14px; width: 66px; height: 66px; display: grid; place-items: center; border-radius: 10px; background: #c8372d; color: #fff3e6;
  font: 900 36px 'Noto Serif KR', serif; opacity: 0; transform: rotate(-12deg) scale(2.4); box-shadow: 0 6px 14px rgba(0, 0, 0, .4); }
.ld-ledger.stamped .ld-seal { animation: ld-seal .45s cubic-bezier(.3, 1.5, .5, 1) forwards; }
@keyframes ld-seal { to { opacity: .96; transform: rotate(-12deg) scale(1) } }
/* 띠 먹방울 행렬: 장부를 찾으러 서고를 가로질러 콩콩 뛰어간다 */
.ld-parade { position: relative; width: 100%; max-width: 560px; height: 78px; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ld-track { position: absolute; left: 0; bottom: 0; display: flex; gap: 10px; width: max-content; animation: ld-walk 9s linear infinite; }
.ld-track img { width: 64px; height: 64px; animation: ld-bounce .5s ease-in-out infinite alternate; animation-delay: calc(var(--k) * -90ms); filter: drop-shadow(0 6px 6px rgba(0, 0, 0, .45)); }
@keyframes ld-walk { from { transform: translateX(-50%) } to { transform: translateX(0) } }
@keyframes ld-bounce { from { transform: translateY(0) } to { transform: translateY(-9px) } }
/* 진행 */
.ym-load-bar { width: min(320px, 80vw); height: 7px; border-radius: 7px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.ym-load-bar i { display: block; height: 100%; width: 0; border-radius: 7px; background: linear-gradient(90deg, var(--seal), var(--flame), var(--gold-2)); transition: width .9s ease; }
.ym-steps { display: flex; gap: 18px; margin: 0; padding: 0; list-style: none; font-size: 13.5px; color: #bfa58c; }
.ym-steps li { display: flex; flex-direction: column; align-items: center; gap: 6px; transition: color .3s; }
.ym-steps li b { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; border: 1.5px solid currentColor; font: 700 13px var(--sans); transition: all .3s; }
.ym-steps li.now, .ym-steps li.done { color: var(--gold-2); }
.ym-steps li.done b { background: var(--gold-2); color: #2b211d; border-color: var(--gold-2); }
@media (max-height: 700px) { .ld-parade { height: 64px; } .ld-track img { width: 52px; height: 52px; } .ld-col i { width: 44px; height: 44px; } .ym-load { gap: 12px; } }
@media (prefers-reduced-motion: reduce) { .ld-track, .ld-track img { animation: none; } }

/* ---------- 스크롤 연출 ---------- */
.ym-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.ym-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--seal), var(--flame), var(--gold-2)); }
.rv { opacity: 0; transform: translateY(26px); filter: blur(6px); transition: opacity .9s ease, transform .9s cubic-bezier(.2, .7, .2, 1), filter .9s ease; }
.rv.in { opacity: 1; transform: none; filter: none; }
.ln { display: inline; opacity: 0; filter: blur(5px); transition: opacity .8s ease, filter .8s ease; transition-delay: calc(var(--i, 0) * 110ms + 120ms); }
.in .ln, .ln.in { opacity: 1; filter: none; }
.rv-pop { opacity: 0; transform: scale(.9); transition: opacity .6s ease, transform .7s cubic-bezier(.2, 1.4, .4, 1); }
.rv-pop.in { opacity: 1; transform: none; }

@keyframes ym-hop { 0%, 100% { transform: translateY(0) rotate(-2deg) } 45% { transform: translateY(-16px) rotate(2deg) } 55% { transform: translateY(-16px) rotate(2deg) } }
@keyframes ym-shadow { 0%, 100% { transform: scaleX(1); opacity: 1 } 50% { transform: scaleX(.72); opacity: .55 } }
@keyframes ym-glow { 0%, 100% { opacity: .7 } 50% { opacity: 1 } }
@keyframes ym-pop { to { opacity: 1; transform: none } }
@keyframes ym-stamp { 0% { opacity: 0; transform: scale(2.4) rotate(-16deg) } 60% { opacity: 1; transform: scale(.9) rotate(-8deg) } 100% { opacity: 1; transform: scale(1) rotate(-8deg) } }
@keyframes ym-spark { 0% { opacity: 0; transform: translateY(0) scale(.6) } 30% { opacity: .9 } 100% { opacity: 0; transform: translateY(-70px) scale(1.1) } }

/* 인쇄·PDF와 동작 줄이기 설정에서는 연출을 끈다 */
@media (prefers-reduced-motion: reduce) {
  .rv, .ln, .rv-pop { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .ym-char, .ym-shadow, .ym-hero::before, .ym-spark { animation: none !important; }
}
@media print {
  .rv, .ln, .rv-pop { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
  .ym-progress, .ym-load { display: none !important; }
}
html.pm .rv, html.pm .ln, html.pm .rv-pop { opacity: 1 !important; transform: none !important; filter: none !important; transition: none !important; }
.scroll .q-head { flex-wrap: wrap; row-gap: 6px; padding-right: 44px; }
.scroll .q-head h2 { white-space: nowrap; }
.scroll .q-head .link-btn { margin-right: 0; }

/* ---------- 글씨와 버튼을 전체적으로 한 단계 크게 (휴대폰에서도 시원하게) ---------- */
.ym-free { font-size: clamp(20px, 5.4vw, 26px); line-height: 1.5; }
.ym-hero .ym-start { height: 64px; padding: 0 40px; font-size: clamp(19px, 5vw, 22px); }
.ym-badges span { padding: 9px 16px; font-size: 15px; }
.roll-hint { font-size: 14px; }
.scroll-kicker { font-size: 14.5px; }
.scroll-guide img { width: 60px; height: 60px; }
.scroll-guide p { font-size: 17px; padding: 12px 16px; }
.scroll .q-no { width: 40px; height: 40px; font-size: 20px; }
.scroll .q-head h2 { font-size: 24px; }
.scroll .q-head .q-hint, .scroll .q-head .link-btn { font-size: 15px; }
.scroll .choice button { padding: 20px; font-size: 20px; }
.scroll .chips button { padding: 11px 20px; font-size: 17px; }
.scroll .toggle button { padding: 11px 22px; font-size: 16.5px; }
.scroll .text-in, .scroll .search input, .scroll .typed input { padding: 16px 18px; font-size: 17.5px; }
.scroll .hours img { width: 48px; height: 48px; }
.scroll .hours .t { font-size: 17.5px; }
.scroll .hours .n { font-size: 14px; }
.scroll .hours .unknown { font-size: 17px; padding: 15px; }
.scroll .picked { font-size: 15.5px; }
.say img { width: 52px; height: 52px; }
.say p { font-size: 16.5px; padding: 11px 15px; }
.scroll .dock-label { font-size: 13.5px; }
.scroll .dock-main { font-size: clamp(21px, 5.6vw, 26px); }
.scroll .dock-sub { font-size: 16px; }
.scroll .cta { padding: 19px 34px; font-size: 21px; }
.ym-brand { font-size: clamp(58px, 16vw, 92px); }
.ym-sub { font-size: clamp(20px, 5.4vw, 28px); }
.ym-title .lead { font-size: clamp(16.5px, 4.4vw, 19px); }
.ym-kicker { font-size: 14.5px; }
/* 휴대폰: 종이를 넓게 쓰고, 지역 버튼은 3칸 격자 */
@media (max-width: 640px) {
  .roll { margin-left: calc(var(--cap) * .3); margin-right: calc(var(--cap) * .3); }
  .scroll { outline-offset: -9px; }
  .scroll::after { inset: 13px; }
  .scroll .q { margin: 0 8px; padding-left: 12px; padding-right: 12px; }
  .scroll .dock { margin: 0 8px; }
  .scroll .chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .scroll .chips button { padding: 11px 4px; }
}

/* ---------- 결과 장부: 같은 두루마리 한 장 위에 결과가 이어진다 ---------- */
#result { padding-top: 18px; }
.result-roll { max-width: 880px; margin-top: 12px; }
.result-roll .ledger { padding: calc(var(--rh) * .2 + 18px) 0 calc(var(--rh) * .12 + 26px); }
/* 카드 테두리·그림자를 걷어 내고, 장과 장 사이는 먹 점선 + 가운데 붉은 마름모로 나눈다 */
.ledger > article.card, .ledger > .card { background: transparent; border: 0; border-radius: 0; box-shadow: none; margin: 0; padding: 34px clamp(20px, 5.5vw, 54px); }
.ledger > article.card + article.card, .ledger > .toolbar + article.card { position: relative;
  background-image: linear-gradient(90deg, rgba(42, 33, 29, .32) 50%, transparent 0); background-size: 10px 1.5px; background-repeat: repeat-x; background-position: 0 0; }
.ledger > article.card + article.card::before, .ledger > .toolbar + article.card::before { content: ''; position: absolute; left: 50%; top: -6px; width: 11px; height: 11px; margin-left: -5.5px; background: #c8372d; transform: rotate(45deg);
  box-shadow: 0 0 0 4px #fbf3e2; }
.ledger .toolbar { margin: 0 clamp(20px, 5.5vw, 54px) 4px; justify-content: flex-end; }
.ledger .toolbar button { background: rgba(255, 252, 244, .8); border: 1.5px solid rgba(42, 33, 29, .35); border-radius: 999px; color: var(--ink); }
/* 아래 축: 읽는 동안 화면 아래에 붙어 따라오다가, 종이 끝에 오면 그 자리에 내려앉는다. 종이가 축으로 말려 들어가는 그늘. */
.result-roll { --rh: clamp(76px, 15vw, 128px); }
.rod-follow { position: sticky; bottom: 0; }
.rod-follow::before { content: ''; position: absolute; left: calc(var(--cap) * .62); right: calc(var(--cap) * .62); bottom: 100%; height: 26px; margin-bottom: calc(var(--rh) * -.18);
  background: linear-gradient(transparent, rgba(80, 45, 15, .28)); pointer-events: none; }
@media (max-width: 640px) { .result-roll .ledger > article.card { padding: 28px 16px; } }
@media print { .rod, .rod-follow::before { display: none !important; } .ledger { outline: 0 !important; background: none !important; } .ledger::after { display: none; } }
/* PDF·인쇄: 서고 배경 없이 흰 종이 */
html.pm .page-bg { display: none; } html.pm body { background: #fff; }
@media print { .page-bg { display: none !important; } body { background: #fff !important; } }
.yb.two.say1 { --tx: 33; --ty: 24; }
/* 영상 아래 한마디: 염라 얼굴 + 말풍선 */
.ym-free { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 26px auto 0; max-width: 560px; text-shadow: none; }
.ym-free img { flex: none; width: clamp(60px, 15vw, 76px); height: auto; border-radius: 50%; box-shadow: 0 0 0 3px #fbf3e2, 0 0 0 5px var(--ink), 0 8px 18px rgba(0, 0, 0, .45); }
.ym-free p { position: relative; margin: 0; padding: 14px 18px; border: 2px solid var(--ink); border-radius: 18px; background: #fbf3e2 url(/media/hanji.webp);
  color: var(--ink); font: 700 clamp(16px, 4.3vw, 21px)/1.45 var(--disp); text-align: left; box-shadow: 0 8px 18px rgba(0, 0, 0, .35); }
.ym-free p::before { content: ''; position: absolute; left: -10px; top: 50%; width: 16px; height: 16px; margin-top: -8px; background: #fbf3e2;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.ym-free p span { white-space: nowrap; }
@media (max-width: 640px) { .ym-free { gap: 10px; padding: 0 4px; } .ym-free p { padding: 12px 14px; font-size: 16.5px; } }
/* 시간 칸: 띠 먹방울을 크게, 시각은 그 아래 */
.scroll .hours button { padding: 10px 4px 12px; gap: 0; }
.scroll .hours img { width: 76px; height: 76px; margin: 0 0 6px; }
.scroll .hours .t { font-size: 15.5px; line-height: 1.25; }
.scroll .hours .n { font-size: 13.5px; margin-top: 2px; }
@media (min-width: 641px) { .scroll .hours img { width: 88px; height: 88px; } }
/* 신청서 도입부: 염라 + 말풍선, 붉은 빛이 도는 종이 상자 위에 */
.scroll-intro { display: flex; align-items: center; gap: 14px; max-width: 560px; margin: 20px auto 4px; padding: 18px 16px; border-radius: 20px; text-align: left;
  background: linear-gradient(160deg, #f8e2c6, #f2cfa8); box-shadow: inset 0 0 0 1.5px rgba(200, 55, 45, .45), inset 0 0 0 5px #f8e2c6, inset 0 0 0 6px rgba(200, 55, 45, .25); }
.scroll-intro img { flex: none; width: clamp(68px, 19vw, 92px); height: auto; border-radius: 50%; box-shadow: 0 0 0 3px #fbf3e2, 0 0 0 5px var(--ink), 0 6px 14px rgba(90, 40, 15, .3); }
.scroll-intro-say { position: relative; flex: 1; padding: 13px 15px; border: 2px solid var(--ink); border-radius: 16px; background: #fffaf0; }
.scroll-intro-say::before { content: ''; position: absolute; left: -10px; top: 50%; width: 15px; height: 15px; margin-top: -7.5px; background: #fffaf0;
  border-left: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); }
.scroll-intro-say p { margin: 0; font: 700 clamp(15.5px, 4.1vw, 18px)/1.55 var(--disp); color: var(--ink); word-break: keep-all; }
.scroll-intro-say p + p { margin-top: 6px; }
.scroll-intro-say b { color: #c8372d; }
@media (max-width: 640px) { .scroll-intro { margin-left: 8px; margin-right: 8px; padding: 14px 12px; gap: 10px; } }
@media (max-width: 640px) {
  .scroll-intro { flex-direction: column; gap: 14px; padding: 18px 14px 16px; }
  .scroll-intro-say { width: 100%; box-sizing: border-box; text-align: center; }
  .scroll-intro-say::before { left: 50%; top: -10px; margin: 0 0 0 -7.5px; border-left: 2px solid var(--ink); border-bottom: 0; border-top: 2px solid var(--ink); }
}
/* 성별(달·해 먹방울)과 '시를 몰라요'(갸웃 먹방울) 그림 */
.scroll .choice button { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 10px 16px; }
.scroll .choice button img { width: 76px; height: 76px; }
.scroll .hours .unknown { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 8px 14px; }
.scroll .hours .unknown img { width: 64px; height: 64px; margin: 0; }
/* 성별: 빈 한지 피켓을 든 먹방울 + 먹으로 쓴 男·女 (글자는 웹에서 얹어 늘 또렷하게) */
.scroll .choice .sign { position: relative; display: block; width: 132px; height: 132px; margin: -6px 0 -4px; }
.scroll .choice .sign img { width: 100%; height: 100%; }
.scroll .choice .sign i { position: absolute; left: 22%; right: 23%; top: 1%; height: 41%; display: grid; place-items: center;
  font: 900 40px/1 "Noto Serif KR", serif; font-style: normal; color: #2a211d; transform: rotate(-3deg); }
.scroll .choice button[aria-pressed="true"] .sign i { color: #2a211d; }
/* 名·性·生·地·時 동그라미 안 글자를 정확히 가운데로 (명조 한자는 기본 줄높이에서 아래로 처진다) */
.scroll .q-no { line-height: 1; padding: 0 0 1px; box-sizing: border-box; flex: none; }
.scroll .choice { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scroll .choice .sign { width: min(132px, 100%); height: auto; aspect-ratio: 1; }
/* 성별 버튼: 피켓 먹방울은 칸 한가운데, 그 아래 큰 글씨 */
.scroll .choice button { justify-content: center; align-items: center; gap: 8px; padding: 14px 8px 16px; }
.scroll .choice .sign { margin: 0 auto; }
.scroll .choice button b { display: block; font: 700 23px/1.2 var(--disp); letter-spacing: .06em; }
/* 입력 칸 사이 여유 */
.scroll .q { padding-top: 44px; padding-bottom: 44px; }
.scroll .q-head { margin-bottom: 26px; }
.scroll .row, .scroll .wheels, .scroll .search, .scroll .typed { margin-top: 22px; }
.scroll .chips { gap: 10px; }
.scroll .picked { margin-top: 16px; }
/* 염라 한마디: 위아래 칸과 띄우고, 줄 간격 넉넉하게 */
.scroll .say { margin: 24px 0; }
.scroll .say p { line-height: 1.7; letter-spacing: .01em; padding: 12px 16px; }
.scroll .hours { gap: 10px; margin-top: 0; }
@media (max-width: 640px) { .scroll .q { padding-top: 38px; padding-bottom: 38px; } }
/* 결과가 오면 먹 번짐이 걷히고 그 사람의 여덟 글자가 적힌다 */
.ld-ledger.got .ld-col i { color: var(--ink); transition: color .5s ease; transition-delay: calc(var(--k) * 90ms + .25s); }
.ld-ledger.got .ld-col i::after { animation: ld-ink-out .5s ease forwards; animation-delay: calc(var(--k) * 90ms); }
@keyframes ld-ink-out { from { opacity: .82; transform: scale(1) } to { opacity: 0; transform: scale(2.2) } }
/* 칸 제목 줄 정리: 1줄 = 한자 동그라미 + 제목 (+ 오른쪽 確 도장 자리), 2줄 = 도움말·직접 입력 */
.scroll .q-head { display: flex; flex-wrap: wrap; align-items: center; column-gap: 14px; row-gap: 12px; padding-right: 56px; margin-bottom: 30px; }
.scroll .q-head h2 { margin: 0; line-height: 1.3; }
.scroll .q-head:has(.link-btn) h2 { flex: 1 0 calc(100% - 64px); }        /* 직접 입력이 있는 칸은 도움말 줄을 따로 */
.scroll .q-head:has(.link-btn) .q-hint { margin-left: 54px; }
.scroll .q-head .link-btn { margin-left: auto; margin-right: 0; }
/* 確 도장은 제목 줄 높이에 맞춘다 */
.scroll .q-head::after { top: 46px; right: 10px; }
@media (max-width: 640px) { .scroll .q-head::after { top: 40px; right: 6px; } .scroll .q-head .q-hint { margin-left: 0; } }
/* 염라 한마디: 제목과 시간 칸 사이를 넉넉히 */
.scroll .q-head + .say, .scroll .say { margin: 10px 0 38px; }
.scroll .search + .picked + .say, .scroll .picked + .say { margin-top: 26px; }
/* 결과 장부: 아래 축은 따라오지 않고 종이 끝에만 (읽는 내용을 가리지 않게) */
.rod-follow { position: relative; bottom: auto; }
.rod-follow::before { display: none; }
/* 일주 먹방울: 띠 탈 + 천간 모자 (60갑자) */
.emblem .em-pillar { position: relative; z-index: 3; width: 158px; height: 158px; margin: 14px 0 0; filter: drop-shadow(0 8px 10px rgba(90, 50, 20, .22)); }

/* ---------- 로딩: 장부 칸이 진행 표시 (年 → 月 → 日 → 時 기둥 순서로 먹이 번진다) ---------- */
.ld-ledger .ld-col i::after { animation: none; }
.ld-ledger[data-step="0"] .ld-col:nth-child(-n+1) i::after,
.ld-ledger[data-step="1"] .ld-col:nth-child(-n+2) i::after,
.ld-ledger[data-step="2"] .ld-col:nth-child(-n+3) i::after,
.ld-ledger[data-step="3"] .ld-col:nth-child(-n+4) i::after,
.ld-ledger[data-step="4"] .ld-col i::after { animation: ld-ink .6s ease-out forwards; }
.ld-ledger .ld-col i:nth-of-type(2)::after { animation-delay: .25s; }
.ld-ledger.got .ld-col i::after { animation: ld-ink-out .5s ease forwards; animation-delay: calc(var(--k) * 90ms); }

/* ---------- 로딩: 먹방울들의 수다는 말 대신 행동으로 (6초 한 바퀴) ---------- */
/* 쥐: 책장에 올라가 장부를 낑낑 뽑다가 엉덩방아 / 소: 장부 더미를 이고 휘청이다 깔림, 뿅 하고 다시 등장
   토끼: 장부 먼지를 후 불다가 에취 / 호랑이: 도장 어디 갔지 두리번 → 원숭이가 뿅 나타나 쾅 */
.ld-stage { --T: 6s; position: relative; width: 340px; max-width: 92vw; height: 150px; margin-top: 2px; }
.ld-stage .ac { position: absolute; bottom: 0; width: 66px; height: 66px; filter: drop-shadow(0 5px 5px rgba(0, 0, 0, .45)); transform-origin: 50% 100%; }
.ld-stage::after { content: ''; position: absolute; left: -8px; right: -8px; bottom: -3px; height: 6px; border-radius: 3px; background: linear-gradient(#6b3f22, #4a2a16); }
.ld-stage .bk { display: block; width: 30px; height: 22px; border-radius: 3px; background: linear-gradient(90deg, #22314f, #34477a 60%, #22314f); box-shadow: inset 0 0 0 1.5px #c99a3c, 0 2px 3px rgba(0, 0, 0, .4); }
/* 책장 */
.ld-shelf { position: absolute; left: 0; bottom: 0; width: 104px; height: 128px; border: 5px solid #6b3f22; border-bottom: 0; border-radius: 4px 4px 0 0;
  background: repeating-linear-gradient(90deg, #2a3a5e 0 9px, #3b2a52 9px 16px, #5a2a22 16px 23px, #1f2d48 23px 31px) 0 6px / 100% 50px no-repeat,
              repeating-linear-gradient(90deg, #3b2a52 0 8px, #22314f 8px 17px, #6a3a20 17px 23px, #2a3a5e 23px 31px) 0 70px / 100% 50px no-repeat, #3a2416; }
.ld-shelf i { position: absolute; left: -5px; right: -5px; height: 6px; background: #7c4a28; }
.ld-shelf i:nth-child(1) { top: 56px; } .ld-shelf i:nth-child(2) { top: 120px; }
/* 쥐 */
.ld-stage .a-rat { left: 2px; animation: g-rat var(--T) ease-in-out infinite; }
@keyframes g-rat {
  0% { transform: translate(0, 0) } 6% { transform: translate(14px, -30px) rotate(6deg) } 10% { transform: translate(20px, -66px) }
  13%, 19% { transform: translate(20px, -66px) rotate(-4deg) } 16% { transform: translate(17px, -66px) rotate(-12deg) }   /* 낑낑 */
  22% { transform: translate(34px, -30px) rotate(18deg) } 25% { transform: translate(44px, 0) rotate(-24deg) scaleY(.86) }   /* 엉덩방아 */
  32% { transform: translate(44px, 0) rotate(-24deg) scaleY(.86) } 38%, 100% { transform: translate(0, 0) } }
.ld-stage .bk-pull { position: absolute; left: 60px; bottom: 74px; transform-origin: 50% 50%; animation: g-pull var(--T) ease-in-out infinite; }
@keyframes g-pull { 0%, 12% { transform: translate(0, 0) scaleX(.35); opacity: 0 } 13% { opacity: 1 }
  19% { transform: translate(-6px, 0) scaleX(1) } 24% { transform: translate(40px, -10px) rotate(160deg) } 28% { transform: translate(52px, 72px) rotate(350deg) }
  31%, 45% { transform: translate(52px, 72px) rotate(360deg); opacity: 1 } 50%, 100% { transform: translate(52px, 72px) rotate(360deg); opacity: 0 } }
/* 소 */
.ld-stage .a-ox { left: 128px; animation: g-ox var(--T) ease-in-out infinite; }
.ld-stage .stack { position: absolute; left: 145px; bottom: 62px; display: grid; gap: 1px; animation: g-stack var(--T) ease-in-out infinite; transform-origin: 50% 100%; z-index: 2; }
.ld-stage .stack .bk { width: 34px; height: 13px; }
@keyframes g-ox { 0%, 30% { transform: none } 34% { transform: rotate(-6deg) } 38% { transform: rotate(7deg) } 42% { transform: rotate(-5deg) }
  46% { transform: scaleY(.55) scaleX(1.12) } 54% { transform: scaleY(.55) scaleX(1.12) } 58% { transform: translateY(-22px) scaleY(1.1) } 62%, 100% { transform: none } }
@keyframes g-stack { 0%, 30% { transform: none } 34% { transform: rotate(-12deg) translateX(-4px) } 38% { transform: rotate(14deg) translateX(5px) }
  42% { transform: rotate(-8deg) } 46% { transform: translate(0, 46px) rotate(4deg) } 54% { transform: translate(0, 46px) rotate(4deg) }
  57% { transform: translate(-30px, 48px) rotate(-30deg); opacity: 1 } 62% { transform: translate(-30px, 48px) rotate(-30deg); opacity: 0 }
  70% { transform: translateY(-30px); opacity: 0 } 76%, 100% { transform: none; opacity: 1 } }
/* 토끼 */
.ld-stage .a-rab { left: 204px; animation: g-rab var(--T) ease-in-out infinite; }
.ld-stage .bk-rab { position: absolute; left: 216px; bottom: 14px; z-index: 2; }
.ld-stage .dust { position: absolute; left: 206px; bottom: 40px; width: 50px; height: 40px; z-index: 3; }
.ld-stage .dust i { position: absolute; width: 16px; height: 16px; border-radius: 50%; background: rgba(220, 205, 185, .85); opacity: 0; animation: g-dust var(--T) ease-out infinite; }
.ld-stage .ld-stage .dust i:nth-child(1) { left: 10px; top: 14px; } .ld-stage .dust i:nth-child(2) { left: 24px; top: 4px; animation-delay: .08s; } .ld-stage .dust i:nth-child(3) { left: 30px; top: 18px; animation-delay: .16s; }
@keyframes g-dust { 0%, 54% { opacity: 0; transform: scale(.3) } 58% { opacity: .95; transform: scale(1) } 66% { opacity: .6; transform: scale(1.8) translateY(-10px) } 72%, 100% { opacity: 0; transform: scale(2.4) translateY(-16px) } }
@keyframes g-rab { 0%, 52% { transform: none } 56% { transform: translateY(-3px) scaleY(1.05) } 60% { transform: translateY(-3px) scaleY(1.05) }
  63% { transform: translate(-3px, 0) rotate(-3deg) scaleY(.92) } 66% { transform: translate(-12px, -10px) rotate(-22deg) } 70% { transform: translate(-4px, 0) rotate(4deg) } 74%, 100% { transform: none } }
/* 호랑이 + 원숭이 */
.ld-stage .a-tig { left: 272px; animation: g-tig var(--T) ease-in-out infinite; }
@keyframes g-tig { 0%, 68% { transform: none } 71% { transform: scaleX(-1) } 75% { transform: none } 78% { transform: scaleX(-1) } 81% { transform: none }
  88% { transform: translateY(-14px) } 92%, 100% { transform: none } }
.ld-stage .ld-q { position: absolute; left: 298px; bottom: 70px; font: 900 26px 'Noto Serif KR', serif; color: #e2483b; opacity: 0; text-shadow: 0 2px 4px rgba(0, 0, 0, .5); animation: g-q var(--T) ease infinite; }
@keyframes g-q { 0%, 70% { opacity: 0; transform: scale(.4) } 73% { opacity: 1; transform: scale(1.2) } 76%, 82% { opacity: 1; transform: scale(1) } 85%, 100% { opacity: 0 } }
.ld-stage .a-mon { left: 230px; animation: g-mon var(--T) ease-in-out infinite; opacity: 0; }
@keyframes g-mon { 0%, 81% { opacity: 0; transform: translateY(40px) scale(.6) } 84% { opacity: 1; transform: translateY(-14px) scale(1.05) } 87%, 96% { opacity: 1; transform: none } 100% { opacity: 0; transform: translateY(20px) } }
.ld-stage .seal-cube { position: absolute; left: 252px; bottom: 58px; width: 22px; height: 22px; border-radius: 3px; background: #c8372d; box-shadow: inset 0 -4px 0 rgba(0, 0, 0, .25); opacity: 0; animation: g-seal var(--T) ease-in infinite; z-index: 3; }
@keyframes g-seal { 0%, 83% { opacity: 0 } 86% { opacity: 1; transform: none } 90% { transform: translate(18px, -16px) rotate(20deg) } 93% { transform: translate(28px, 44px) } 96% { opacity: 1; transform: translate(28px, 44px) } 100% { opacity: 0 } }
.ld-stage .seal-mark { position: absolute; left: 276px; bottom: 6px; width: 24px; height: 24px; display: grid; place-items: center; border: 2px solid #c8372d; border-radius: 4px; color: #c8372d;
  font: 900 13px 'Noto Serif KR', serif; background: rgba(255, 245, 230, .9); opacity: 0; animation: g-mark var(--T) ease infinite; }
@keyframes g-mark { 0%, 93% { opacity: 0; transform: scale(1.6) } 95%, 99% { opacity: 1; transform: scale(1) rotate(-8deg) } 100% { opacity: 0 } }
@media (prefers-reduced-motion: reduce) { .ld-stage * { animation: none !important; } }
/* 먹 번짐은 작고 붓끝처럼 */
.ld-col i::after { inset: 34% 30% 32% 32%; border-radius: 48% 52% 40% 60% / 55% 45% 58% 42%; filter: blur(.4px); }
/* 일주 카드 공유 버튼 */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.share-row button { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 999px; border: 1.5px solid rgba(42, 33, 29, .35); background: rgba(255, 252, 244, .85);
  color: var(--ink); font: 700 15px var(--sans); cursor: pointer; }
.share-row button:hover { border-color: var(--ink); }
.share-row .kakao { background: #fee500; border-color: #fee500; color: #191919; }
/* 염라사주 네 글자 도장: 로고 */
.top .seal-logo { width: 40px; height: 40px; flex: none; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .35)); }
.ym-brand img.ym-brand-seal { width: .9em; height: .9em; background: none; box-shadow: none; transform: none; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .45)); }
.share-row .insta { background: linear-gradient(45deg, #f9ce34, #ee2a7b 55%, #6228d7); border-color: transparent; color: #fff; }
/* 결과 맨 끝: 장부 보관하기 */
.ledger .toolbar.keep { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px; margin: 0; padding: 30px clamp(20px, 5.5vw, 54px) 10px;
  background-image: linear-gradient(90deg, rgba(42, 33, 29, .32) 50%, transparent 0); background-size: 10px 1.5px; background-repeat: repeat-x; }
.ledger .toolbar.keep p { flex-basis: 100%; margin: 0 0 4px; text-align: center; font: 700 16px var(--disp); color: var(--ink-2); }
.toast { display: block; text-align: center; font-size: 14px; color: var(--ink-2); min-height: 0; }
.toast:not(:empty) { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 60; padding: 10px 18px; border-radius: 999px; background: rgba(42, 33, 29, .92); color: #fff3e0; max-width: 90vw; }

/* ---------- 결과 첫 장: 저장 카드와 같은 일주 카드를 크게, 공유 버튼, 그 아래로 풀이 ---------- */
.hero.cover { display: block; text-align: center; }
.ilju-card { position: relative; width: min(100%, 460px); margin: 0 auto; padding: 22px 22px 28px; background: #fbf3e2 url(/media/hanji.webp);
  outline: 3px solid #c8372d; outline-offset: -8px; box-shadow: inset 0 0 0 15px #fbf3e2, inset 0 0 0 16px rgba(200, 55, 45, .55), 0 14px 30px -12px rgba(60, 30, 10, .45); }
.ic-head { display: flex; align-items: center; gap: 10px; margin: 6px 0 0 6px; font: 700 clamp(13px, 3.6vw, 16px) var(--disp); color: #c8372d; text-align: left; }
.ic-head img { flex: none; width: clamp(44px, 12vw, 58px); height: auto; }
.ic-whom { margin: 16px 0 0; font: 700 clamp(17px, 4.6vw, 20px) var(--disp); color: #54473f; }
.ic-pillar { display: block; width: 76%; height: auto; margin: 4px auto 0; filter: drop-shadow(0 10px 12px rgba(90, 50, 20, .22)); }
.ic-ko { margin: 4px 0 0; font: 700 clamp(40px, 11vw, 52px)/1.1 var(--disp); color: #2a211d; letter-spacing: -.01em; }
.ic-han { margin: 4px 0 0; font: 700 clamp(26px, 7vw, 34px)/1.1 var(--disp); color: #7a6b60; }
.ic-line { margin: 10px 0 0; font: 700 clamp(17px, 4.6vw, 21px) var(--disp); color: #54473f; }
.hero.cover .share-row { justify-content: center; margin: 18px 0 26px; }
.hero.cover > div:last-child { max-width: 620px; margin: 0 auto; }
@media print { .ilju-card { width: 300px; } .hero.cover { break-inside: avoid; } }

/* ---------- 무료 결과 끝: 두루마리를 펼친 염라 + 말풍선 (결제 상자 위) ---------- */
.ym-end { margin: 0 0 64px; }
.ym-end > img { display: block; width: 100%; height: auto; border-radius: 6px; box-shadow: 0 0 0 2px #c99a3c, 0 14px 30px -12px rgba(60, 30, 10, .5); }
.ym-end figcaption { display: flex; align-items: center; gap: 12px; max-width: 560px; margin: 36px auto 0; text-align: left; }
.ym-end figcaption img { flex: none; width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink); }
.ym-end figcaption p { position: relative; margin: 0; padding: 12px 16px; border: 1.5px solid var(--ink); border-radius: 16px; background: #fffaf0;
  font: 700 clamp(15px, 4vw, 17px)/1.6 var(--disp); color: var(--ink); }
.ym-end figcaption p::before { content: ''; position: absolute; left: -8px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; background: #fffaf0;
  border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
/* 이야기 끝 한 줄: 결제 재촉 대신 염라가 어디에 더 적어 뒀는지 따옴표로 조용히 */
.sf-bridge { margin: 34px 0 0; padding: 18px 22px 16px; border: 0; border-radius: 12px; background: rgba(255, 252, 244, .55); box-shadow: inset 0 0 0 1px rgba(42, 33, 29, .12); }
.sf-bridge p { margin: 0; font: 700 clamp(15px, 4vw, 16.5px)/1.8 var(--disp); color: var(--ink-2); }
.sf-bridge a { color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.sf-bridge cite { display: block; margin-top: 8px; text-align: right; font: 700 13px var(--disp); font-style: normal; color: #c8372d; letter-spacing: .2em; }
.sf-bridge cite::before { content: '— '; letter-spacing: 0; }

/* ---------- 무료 이야기: 숨 쉴 틈 (항목·줄 사이를 넉넉하게) ---------- */
.story-free { padding: 40px 34px 44px; }
.sf-hook > p { line-height: 2; }
.sf-sec { margin-top: 56px; padding-top: 44px; }
.sf-sec h3 { margin: 0 0 22px; font-size: 22px; }
.sf-sec > p { line-height: 2; margin: 0 0 22px; }
.sf-scene { margin: 28px 0; padding: 20px 22px 18px; }
.sf-scene .say { margin: 0 0 14px; }
.sf-scene .say p { font-size: 15.5px; }
.sf-scene ul { line-height: 2.1; }
.sf-scene li + li { margin-top: 4px; }
.sf-need, .sf-now { margin-bottom: 18px; }
.sf-kuk { margin: 18px 0 22px; }
.story-free .dist { margin: 14px 0 26px; }
@media (max-width: 720px) { .story-free { padding: 30px 18px 34px; } .sf-sec { margin-top: 46px; padding-top: 36px; } }

/* ---------- 결과 첫 장 등장: 일주 카드가 날아와 탁 박히고 → 도장 쾅 → 먹방울 폴짝 → 글자 ---------- */
.hero.cover.rv { opacity: 1; transform: none; filter: none; transition: none; }
.hero.cover.rv:not(.in) .ilju-card, .hero.cover.rv:not(.in) .share-row { opacity: 0; }
.hero.cover.in .ilju-card { animation: ic-slam .6s cubic-bezier(.5, 0, .75, .3) .35s both; }
.hero.cover.in { animation: ic-shake .4s ease .95s; }
.hero.cover.in .ic-head img { animation: ic-stamp .42s cubic-bezier(.3, 1.6, .5, 1) 1.25s both; }
.hero.cover.in .ic-pillar { animation: ic-hop .65s cubic-bezier(.3, 1.4, .5, 1) 1.45s both; }
.hero.cover.in .ic-head span, .hero.cover.in .ic-whom { animation: ic-up .5s ease 1.3s both; }
.hero.cover.in .ic-ko { animation: ic-up .55s ease 1.75s both; }
.hero.cover.in .ic-han { animation: ic-up .55s ease 1.9s both; }
.hero.cover.in .ic-line { animation: ic-up .55s ease 2.05s both; }
.hero.cover.in .share-row { animation: ic-up .6s ease 2.3s both; }
@keyframes ic-slam { 0% { opacity: 0; transform: translateY(-90px) scale(1.7) rotate(-10deg); } 70% { opacity: 1; } 100% { opacity: 1; transform: none; } }
@keyframes ic-shake { 0%, 100% { transform: none; } 20% { transform: translate(0, 5px); } 45% { transform: translate(-3px, -2px); } 70% { transform: translate(2px, 1px); } }
@keyframes ic-stamp { 0% { opacity: 0; transform: scale(3) rotate(-25deg); } 100% { opacity: 1; transform: none; } }
@keyframes ic-hop { 0% { opacity: 0; transform: translateY(26px) scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes ic-up { 0% { opacity: 0; transform: translateY(12px); } 100% { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) {   .hero.cover *, .hero.cover { animation: none !important; opacity: 1 !important; } }
html.pm .hero.cover *, html.pm .hero.cover { animation: none !important; opacity: 1 !important; }

/* ---------- 스크롤 손맛: 스크롤하는 만큼 그려지고 박히고 채워진다 (지원 브라우저만. 아니면 기존 등장 효과 그대로) ---------- */
.scroll-cue { margin: 0 0 30px; font: 700 14px var(--disp); color: var(--ink-3); letter-spacing: .08em; }
.scroll-cue i { display: block; width: 14px; height: 14px; margin: 8px auto 0; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); animation: cue-bob 1.4s ease-in-out infinite; }
@keyframes cue-bob { 50% { transform: translateY(6px) rotate(45deg); } }
.sf-sec h3 { position: relative; display: inline-block; }
.sf-sec h3::after { content: ''; position: absolute; left: -4px; right: -8px; bottom: -6px; height: 7px; border-radius: 6px 3px 7px 2px; background: rgba(200, 55, 45, .22); transform-origin: 0 50%; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    .scroll-cue { animation: sx-fade linear both; animation-timeline: scroll(root); animation-range: 0 260px; }
    /* 제목: 한자 머리글이 모여들고, 붓 밑줄이 그어진다 */
    .story-free .sf-han { animation: sx-han linear both; animation-timeline: view(); animation-range: entry 0% cover 30%; }
    .sf-sec h3::after { animation: sx-brush linear both; animation-timeline: view(); animation-range: entry 40% cover 38%; }
    .sf-hook h2 b { animation: sx-write linear both; animation-timeline: view(); animation-range: entry 20% cover 40%; }
    /* 명식표: 기둥마다 위에서 차례로 내려와 박힌다 (오른쪽 연주부터) */
    .chart .tile { animation: sx-drop linear both; animation-timeline: view(); }
    .chart > :nth-child(5n+5) .tile { animation-range: entry 0% cover 22%; }
    .chart > :nth-child(5n+4) .tile { animation-range: entry 10% cover 26%; }
    .chart > :nth-child(5n+3) .tile { animation-range: entry 20% cover 30%; }
    .chart > :nth-child(5n+2) .tile { animation-range: entry 30% cover 34%; }
    /* 오행: 도넛이 돌며 펼쳐지고, 관계도 구슬이 하나씩 놓인다 */
    .story-free .donut { animation: sx-spin linear both; animation-timeline: view(); animation-range: entry 10% cover 40%; }
    .story-free .cycle { view-timeline: --cy; }
    .story-free .cycle g { transform-box: fill-box; transform-origin: center; animation: sx-pop linear both; animation-timeline: --cy; }
    .story-free .cycle g:nth-of-type(1) { animation-range: entry 40% cover 32%; } .story-free .cycle g:nth-of-type(2) { animation-range: entry 55% cover 35%; }
    .story-free .cycle g:nth-of-type(3) { animation-range: entry 70% cover 38%; } .story-free .cycle g:nth-of-type(4) { animation-range: entry 85% cover 41%; }
    .story-free .cycle g:nth-of-type(5) { animation-range: entry 100% cover 44%; }
    .story-free .dlegend li { animation: sx-right linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
    /* 장면: 염라가 옆에서 고개를 내밀고, 기억들이 한 줄씩 들어온다 */
    .sf-scene .say { animation: sx-left linear both; animation-timeline: view(); animation-range: entry 10% cover 25%; }
    .sf-scene li { animation: sx-right linear both; animation-timeline: view(); animation-range: entry 0% cover 22%; }
    /* 필요한 기운: 도장처럼 꾹 눌러 찍힌다 */
    .sf-need span[class^="el-"] { animation: sx-stamp linear both; animation-timeline: view(); animation-range: entry 30% cover 40%; }
    /* 지금 들어선 운: 간지가 옆에서 흘러들어온다 */
    .sf-now .gzv > div { animation: sx-right linear both; animation-timeline: view(); animation-range: entry 10% cover 32%; }
    .sf-now .gzv > div + div { animation-range: entry 30% cover 40%; }
    .sf-bridge { animation: sx-rise linear both; animation-timeline: view(); animation-range: entry 0% cover 25%; }
    /* 끝 장면 그림: 스크롤하는 만큼 천천히 당겨진다 */
    .ym-end { overflow: hidden; border-radius: 6px; }
    .ym-end > img { animation: sx-zoom linear both; animation-timeline: view(); animation-range: entry 0% cover 60%; }
  }
}
@keyframes sx-fade { to { opacity: 0; transform: translateY(-10px); } }
@keyframes sx-han { from { opacity: 0; letter-spacing: 1.6em; } to { opacity: 1; letter-spacing: .5em; } }
@keyframes sx-brush { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes sx-write { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes sx-drop { from { opacity: 0; transform: translateY(-34px) scale(1.25); } 70% { opacity: 1; transform: translateY(3px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes sx-spin { from { opacity: 0; transform: rotate(-150deg) scale(.55); } to { opacity: 1; transform: none; } }
@keyframes sx-pop { from { opacity: 0; transform: scale(0); } 70% { opacity: 1; transform: scale(1.15); } to { opacity: 1; transform: none; } }
@keyframes sx-right { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes sx-left { from { opacity: 0; transform: translateX(-40px); } to { opacity: 1; transform: none; } }
@keyframes sx-stamp { from { opacity: 0; transform: scale(2.4) rotate(-14deg); } 75% { opacity: 1; transform: scale(.94) rotate(0); } to { opacity: 1; transform: none; } }
@keyframes sx-rise { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes sx-zoom { from { transform: scale(1.22); } to { transform: none; } }

/* ---------- 오행·십성 분포: 칸이 좁으면 도넛 위, 범례 아래 (등급 칩이 밖으로 넘치지 않게) ---------- */
.dist { container-type: inline-size; }
@container (max-width: 440px) {
  .dwrap, .dual .dwrap { grid-template-columns: 1fr; justify-items: center; gap: 14px; }
  .dwrap > .donut { max-width: 170px; }
  .dlegend { width: 100%; max-width: 330px; }
}

/* ---------- 문장: 블록 한 줄씩. 스크롤로 그 줄이 올라올 때 하나씩 떠오른다 ---------- */
.ln { display: block; }
@supports (animation-timeline: view()) {
  @media (prefers-reduced-motion: no-preference) {
    html:not(.pm) .sf-sec.rv, html:not(.pm) .sf-hook.rv { opacity: 1; transform: none; filter: none; transition: none; }
    html:not(.pm) .ln { opacity: 1; filter: none; transition: none; animation: sx-line linear both; animation-timeline: view(); animation-range: entry 60% cover 22%; }
    html:not(.pm) .sf-sec > p:not([data-ln]), html:not(.pm) .sf-hook > p:not([data-ln]), html:not(.pm) .sf-kuk { animation: sx-line linear both; animation-timeline: view(); animation-range: entry 40% cover 22%; }
  }
}
@keyframes sx-line { from { opacity: 0; filter: blur(6px); transform: translateY(14px); } to { opacity: 1; filter: none; transform: none; } }

/* ---------- 오행 움짤: 화면에 들어오면 저절로 木→火→土→金→水 조각이 하나씩 채워지고 염라가 한마디씩 (스크롤과 무관, 다시 보기 가능) ---------- */
.pin-stage { display: flex; flex-direction: column; gap: 18px; }
.pin-say { display: flex; align-items: center; gap: 12px; max-width: 520px; width: 100%; margin: 0 auto; }
.pin-say img { flex: none; width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink); }
.pin-say > div { position: relative; flex: 1; display: grid; min-height: 3.6em; padding: 10px 14px; border: 1.5px solid var(--ink); border-radius: 14px; background: #fffaf0; }
.pin-say > div::before { content: ''; position: absolute; left: -7px; top: 50%; width: 11px; height: 11px; margin-top: -5.5px; background: #fffaf0; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.pin-say p { grid-area: 1 / 1; align-self: center; margin: 0; font: 700 clamp(15px, 4vw, 17px)/1.5 var(--disp); color: var(--ink); opacity: 0; }
.pin-say p b { color: var(--el-ink); margin-right: 4px; }
.pin-say p.end { opacity: 1; }
.pin-again { display: none; justify-self: end; grid-area: 2 / 1; margin: 6px 0 0; padding: 2px 10px; border: 1px solid rgba(42, 33, 29, .3); border-radius: 999px; background: transparent; font: 700 12.5px var(--disp); color: var(--ink-3); cursor: pointer; }
/* JS가 준비(armed)하면 처음엔 비워 두고, 화면에 들어오면(play) 순서대로 */
.pin.armed .seg, .pin.armed .pin-say p.end, .pin.armed .pin-again { opacity: 0; }
.pin.armed .pin-again { display: inline-block; }
.pin.armed .dlegend li { opacity: .45; }
.pin.armed .pin-say p.start { opacity: 1; }
.pin.play .pin-say p.start { animation: pin-out .4s ease .2s both; }
.pin.play .seg { transform-box: view-box; transform-origin: 70px 70px; animation: pin-seg .6s cubic-bezier(.3, 1.3, .5, 1) var(--d) both; }
.pin.play .dlegend li { animation: pin-li 2s ease var(--d) both; border-radius: 8px; }
.pin.play .pin-say p:not(.start):not(.end) { animation: pin-say 2s ease var(--d) both; }
.pin.play .pin-say p.end { animation: pin-in .5s ease 10.6s both; }
.pin.play .pin-again { animation: pin-in .5s ease 11.1s both; }
.pin .el-木 { --d: .6s; } .pin .el-火 { --d: 2.6s; } .pin .el-土 { --d: 4.6s; } .pin .el-金 { --d: 6.6s; } .pin .el-水 { --d: 8.6s; } /* 기운마다 2초 */
@keyframes pin-seg { 0% { opacity: 0; transform: rotate(-30deg) scale(.6); } 100% { opacity: 1; transform: none; } }
@keyframes pin-li { 0% { opacity: .45; background: transparent; } 10%, 88% { opacity: 1; background: rgba(233, 180, 76, .22); } 100% { opacity: 1; background: transparent; } }
@keyframes pin-say { 0% { opacity: 0; transform: translateY(8px); } 10%, 90% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(-8px); } }
@keyframes pin-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes pin-out { to { opacity: 0; transform: translateY(-8px); } }
.pin .donut, .pin .dlegend li { animation: none; } /* 스크롤 연출(sx-) 대신 움짤로만 */

/* ---------- 이야기 글 먹 색: 오행은 그 색으로 굵게 + 작은 한자, 십성 뜻풀이는 형광 밑줄 + 한자 꼬리표 ---------- */
.ink { font-weight: 800; color: var(--el-ink); }
.ink.el-金 { color: #6f6a61; }
.sg { background: linear-gradient(transparent 60%, rgba(233, 180, 76, .32) 0); padding: 0 1px; }
.sg i { margin-left: 3px; font: 700 .68em var(--serif); font-style: normal; color: var(--ink-3); letter-spacing: .04em; vertical-align: 1px; }
.cnt { font-weight: 800; color: var(--ink); }
b.em { font-weight: 800; color: var(--seal); }

/* 오행 글자: 한글 아래 가운데에 큰 한자를 그 색으로 (줄 높이 안에서) */
.ic-han span { color: var(--el-ink); }
.ic-han .el-金 { color: #6f6a61; }
/* 오행 움짤 염라 얼굴: 기운 등급마다 표정이 바뀐다 */
.pin-face { position: relative; flex: none; width: 52px; height: 52px; }
.pin-say .pin-face img { position: absolute; inset: 0; }
.pin-face img + img { opacity: 0; }
/* 다음 얼굴이 위에 덮이며 바뀐다(앞 얼굴은 사라지지 않아 사이에 기본 얼굴이 비치지 않음). 끝나면 모두 걷혀 기본 얼굴로 */
.pin.play .pin-face img + img { animation: pin-face-in .25s ease var(--d) both, pin-face-off .3s ease 10.6s forwards; }
@keyframes pin-face-in { from { opacity: 0; } to { opacity: 1; } }
@keyframes pin-face-off { to { opacity: 0; } }

/* 한자: 한글을 먼저, 그 아래 가운데에 한자 (간지·오행 글자는 오행 색) */
/* 어두운 상자(이 장 핵심) 안에서는 한자·오행 글자를 밝은 먹으로 */


/* ---------- 읽는 법: 염라 칠판 (2.5초마다 한 장, 원국표 위에 붙어 따라온다) ---------- */
.guide.gboard { position: sticky; top: 76px; z-index: 6; display: flex; align-items: center; gap: 10px; margin: 0 0 16px; padding: 0; background: none; border: 0; }
.guide.gboard[hidden] { display: none; }
.gb-face { flex: none; width: 56px; height: 56px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink), 0 6px 14px rgba(0, 0, 0, .3); }
.gb-board { position: relative; flex: 1; padding: 12px 16px 8px; border: 6px solid #8a5a32; border-radius: 8px; color: #f4f1e6; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .3), 0 10px 22px -8px rgba(0, 0, 0, .5);
  background: radial-gradient(circle at 30% 20%, rgba(255, 255, 255, .06), transparent 60%), repeating-linear-gradient(-12deg, rgba(255, 255, 255, .025) 0 2px, transparent 2px 9px), #2f4a3a; }
.gb-board::before { content: ''; position: absolute; left: -14px; top: 50%; margin-top: -7px; border: 7px solid transparent; border-right-color: #8a5a32; border-left: 0; }
.gb-text { margin: 0; min-height: 3.2em; font: 700 clamp(15px, 4vw, 17px)/1.6 var(--disp); white-space: pre-line; text-shadow: 0 0 1px rgba(255, 255, 255, .4); }
.gb-text.pop { animation: gb-chalk .45s ease both; }
@keyframes gb-chalk { from { opacity: 0; clip-path: inset(0 100% 0 0); } to { opacity: 1; clip-path: inset(0 0 0 0); } }
.gb-ctrl { display: flex; align-items: center; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.gb-ctrl button { width: 26px; height: 26px; padding: 0; border: 1px solid rgba(244, 241, 230, .35); border-radius: 50%; background: transparent; color: #f4f1e6; font: 700 14px/1 var(--sans); cursor: pointer; }
.gb-dots { display: flex; gap: 4px; margin: 0 4px; } .gb-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(244, 241, 230, .3); } .gb-dots i.on { background: #f4d27a; }
/* 원국표 짚기: 기둥 = 세로 네모, 천간·지지 = 가로 네모 */
.chart > div { transition: background .3s, box-shadow .3s; }
.chart[data-gs="all"] { outline: 2.5px solid #c8372d; outline-offset: 4px; border-radius: 6px; }
.chart[data-gs="year"] .c-year, .chart[data-gs="month"] .c-month, .chart[data-gs="day"] .c-day, .chart[data-gs="hour"] .c-hour { background: rgba(233, 180, 76, .16); box-shadow: inset 2.5px 0 0 #c8372d, inset -2.5px 0 0 #c8372d; }
.chart[data-gs="year"] .ch.c-year, .chart[data-gs="month"] .ch.c-month, .chart[data-gs="day"] .ch.c-day, .chart[data-gs="hour"] .ch.c-hour { box-shadow: inset 2.5px 0 0 #c8372d, inset -2.5px 0 0 #c8372d, inset 0 2.5px 0 #c8372d; }
.chart[data-gs="year"] .r-last.c-year, .chart[data-gs="month"] .r-last.c-month, .chart[data-gs="day"] .r-last.c-day, .chart[data-gs="hour"] .r-last.c-hour { box-shadow: inset 2.5px 0 0 #c8372d, inset -2.5px 0 0 #c8372d, inset 0 -2.5px 0 #c8372d; }
.chart[data-gs="day"] .r-gan.c-day .tile { animation: gb-glow 1s ease-in-out infinite alternate; }
.chart[data-gs="rows"] .r-gan, .chart[data-gs="rows"] .r-ji { background: rgba(233, 180, 76, .16); }
.chart[data-gs="rows"] .r-gan { box-shadow: inset 0 2.5px 0 #c8372d; } .chart[data-gs="rows"] .r-ji { box-shadow: inset 0 -2.5px 0 #c8372d; }
.chart[data-gs="rows"] .rh.r-gan, .chart[data-gs="rows"] .rh.r-ji { color: #c8372d; font-weight: 800; }
.chart[data-gs="color"] .tile { animation: gb-wig .5s ease-in-out 2; }
.chart[data-gs="tap"] .tile { animation: gb-hop .6s ease-in-out infinite alternate; }
.chart[data-gs="tap"] .c-day .tile { animation-delay: .15s; } .chart[data-gs="tap"] .c-month .tile { animation-delay: .3s; } .chart[data-gs="tap"] .c-year .tile { animation-delay: .45s; }
@keyframes gb-glow { to { box-shadow: 0 0 0 4px rgba(233, 180, 76, .55), 0 0 18px rgba(233, 180, 76, .7); } }
@keyframes gb-wig { 25% { transform: rotate(-6deg) scale(1.06); } 75% { transform: rotate(6deg) scale(1.06); } }
@keyframes gb-hop { to { transform: translateY(-5px); } }
@media (prefers-reduced-motion: reduce) { .chart[data-gs] .tile, .gb-text.pop { animation: none !important; } }

/* 대운표 '한글로 보기': 한자 자리를 한글이 큼직하게 채운다 */
.hangul .gzv .hg { font: 800 19px/1 var(--sans); margin: 0; }
.hangul .fig-luck .gzv .hg, .hangul .yc-head .gzv .hg { font-size: 15px; }
/* 읽는 법: 짚는 자리 말고는 흐리게 (잘 보이게) */
.chart[data-gs="year"] > div:not(.c-year):not(.rh), .chart[data-gs="month"] > div:not(.c-month):not(.rh),
.chart[data-gs="day"] > div:not(.c-day):not(.rh), .chart[data-gs="hour"] > div:not(.c-hour):not(.rh),
.chart[data-gs="rows"] > div:not(.r-gan):not(.r-ji) { opacity: .28; filter: grayscale(.8); }
.chart > div { transition: background .3s, box-shadow .3s, opacity .35s, filter .35s; }

/* 염라 얼굴 아래 이름표: 빨간 도장 같은 '염라' (어디서든 브랜드를 기억하게) */
.yname { position: relative; display: inline-flex; flex-direction: column; align-items: center; gap: 5px; flex: none; }
.yname::after, .pin-face::after { content: '염라'; padding: 1px 7px 2px; border-radius: 4px; background: #c8372d; color: #fff3e6; font: 800 11px/1.3 var(--disp); letter-spacing: .18em; text-indent: .18em; white-space: nowrap; box-shadow: 0 2px 4px rgba(0, 0, 0, .2); }
.pin-face::after { position: absolute; left: 50%; top: calc(100% + 5px); transform: translateX(-50%); }
.pin-say { padding-bottom: 14px; }


/* 읽는 법 '세로로 읽기': 그 기둥 위아래만 또렷, 아래에 '병자년' 이름표 */
.chart[data-gs="read"] > div:not(.r-gan):not(.r-ji) { opacity: .28; filter: grayscale(.8); }
.chart[data-gs="read"] .r-gan:not(.rh), .chart[data-gs="read"] .r-ji:not(.rh) { opacity: .35; filter: grayscale(.6); }
.chart[data-pv="year"] .c-year.r-gan, .chart[data-pv="year"] .c-year.r-ji, .chart[data-pv="month"] .c-month.r-gan, .chart[data-pv="month"] .c-month.r-ji,
.chart[data-pv="day"] .c-day.r-gan, .chart[data-pv="day"] .c-day.r-ji, .chart[data-pv="hour"] .c-hour.r-gan, .chart[data-pv="hour"] .c-hour.r-ji { opacity: 1; filter: none; background: rgba(233, 180, 76, .18); }
.chart[data-pv="year"] .c-year.r-gan, .chart[data-pv="month"] .c-month.r-gan, .chart[data-pv="day"] .c-day.r-gan, .chart[data-pv="hour"] .c-hour.r-gan { box-shadow: inset 2.5px 0 0 #c8372d, inset -2.5px 0 0 #c8372d, inset 0 2.5px 0 #c8372d; }
.chart[data-pv="year"] .c-year.r-ji, .chart[data-pv="month"] .c-month.r-ji, .chart[data-pv="day"] .c-day.r-ji, .chart[data-pv="hour"] .c-hour.r-ji { position: relative; box-shadow: inset 2.5px 0 0 #c8372d, inset -2.5px 0 0 #c8372d, inset 0 -2.5px 0 #c8372d; }
.chart[data-pv="year"] .c-year.r-ji::after, .chart[data-pv="month"] .c-month.r-ji::after, .chart[data-pv="day"] .c-day.r-ji::after, .chart[data-pv="hour"] .c-hour.r-ji::after {
  content: attr(data-read); position: absolute; left: 50%; bottom: -14px; transform: translateX(-50%); z-index: 2; padding: 2px 8px; border-radius: 999px; background: #c8372d; color: #fff3e6;
  font: 800 13px/1.4 var(--disp); white-space: nowrap; animation: gb-tag .3s cubic-bezier(.3, 1.5, .5, 1) both; }
@keyframes gb-tag { from { opacity: 0; transform: translate(-50%, 6px) scale(.7); } to { opacity: 1; transform: translateX(-50%); } }
.gb-board { min-width: 0; }
@media (max-width: 480px) { .gb-ctrl { gap: 4px; } .gb-ctrl button { width: 24px; height: 24px; font-size: 12px; } .gb-dots { gap: 3px; margin: 0 2px; } .gb-dots i { width: 5px; height: 5px; } .gb-board { padding: 10px 12px 7px; } }
/* 세로 읽기 이름표: 타일 아래 한글(병·진)과 같은 크기로 */
.chart[data-pv] .r-ji::after { font-size: 15px; padding: 3px 10px; bottom: -16px; }
@media (max-width: 720px) { .chart[data-pv] .r-ji::after { font-size: 13.5px; padding: 2px 8px; } }

/* PDF·인쇄: 스크롤·등장 연출은 모두 끄고 완성된 모습 그대로 */
html.pm *, html.pm *::before, html.pm *::after { animation: none !important; transition: none !important; }
@media print { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* 이야기·풀이 속 염라 말풍선 */
.sf-say { margin: 22px 0 14px; }
.sf-say p { font-size: clamp(15px, 4vw, 16.5px); }
.story-free .power { margin: 4px 0 22px; }
.story-free .special { margin: 14px 0 22px; }
.story-free .ys-terms { margin: 10px 0 0; }
.pl-say { margin: 18px 0 22px; }
/* 유료: 무료로 본 첫 장은 접어 둔다 */
.first-page > summary { cursor: pointer; list-style: none; font: 700 18px var(--disp); color: var(--ink); }
.first-page > summary::-webkit-details-marker { display: none; }
.first-page > summary::before { content: '▸ '; color: #c8372d; } .first-page[open] > summary::before { content: '▾ '; }
.first-page > summary small { margin-left: 6px; font: 500 13px var(--sans); color: var(--ink-3); }
.first-page[open] > summary { margin-bottom: 14px; }
.first-page > .story-free { padding: 0; box-shadow: none; background: none; border: 0; }
.fig-oh .dist { margin: 0; }

/* PDF: 가변·CFF 글꼴(프리텐다드·노토)은 PDF에 그림 조각(Type3)으로 들어가 보는 앱에 따라 깨진다 → 트루타입 나눔 글꼴로 */
/* 한자는 나눔고딕 트루타입에서 한자만 잘라 직접 둔다(무료 OFL 글꼴. 구글 나눔명조엔 한자가 없음). PDF에서만 쓴다 */
@font-face { font-family: 'PDF Hanja'; src: url(/fonts/hanja-400.woff) format('woff'); font-weight: 100 600; unicode-range: U+4E00-9FFF, U+F900-FAFF; font-display: block; }
@font-face { font-family: 'PDF Hanja'; src: url(/fonts/hanja-700.woff) format('woff'); font-weight: 700 900; unicode-range: U+4E00-9FFF, U+F900-FAFF; font-display: block; }
html.pm { --sans: 'PDF Hanja', 'Nanum Gothic', 'Malgun Gothic', sans-serif; --serif: 'PDF Hanja', 'Nanum Myeongjo', serif; --disp: 'Gowun Batang', 'PDF Hanja', 'Nanum Myeongjo', serif; }
html.pm body { font-family: var(--sans); }

/* PDF 쪽마다 한지 바탕 + 붉은 겹테 + 오른쪽 아래 염라사주 도장 (fixed 요소는 인쇄하면 쪽마다 되풀이된다) */
html.pm body::before { content: ''; position: fixed; inset: 0; z-index: -1; background: #fbf3e2 url(/media/hanji.webp);
  box-shadow: inset 0 0 0 1.6mm #fbf3e2, inset 0 0 0 2.2mm #c8372d, inset 0 0 0 3.2mm #fbf3e2, inset 0 0 0 3.5mm rgba(200, 55, 45, .55); }
html.pm body::after { content: ''; position: fixed; right: 6mm; bottom: 6mm; z-index: -1; width: 14mm; height: 14mm; background: url(/media/seal-256.webp) center / contain no-repeat; opacity: .85; }
html.pm .card, html.pm .reading-card { background-color: rgba(255, 252, 244, .82); }

/* ---------- 한자 표기: 한글 뒤 괄호 '무토(戊土)' (간지·오행 글자는 오행 색) ---------- */
.hj small, .ink small { font-size: .95em; font-family: var(--serif); letter-spacing: 0; }
.hj small { color: var(--ink-3); font-weight: 600; } .hj small i { font-style: normal; color: var(--el-ink); } .hj small i.el-金 { color: #6f6a61; }
.ink small { color: inherit; font-weight: 700; }
.recap .hj small, .recap .hj small i, .recap .ink { color: color-mix(in srgb, var(--el, #e9dccb) 70%, #fff); }
.recap .hj small i.el-水, .recap .ink.el-水 { color: #9fb4d8; }

/* ---------- 글자 크기: 무료 이야기·유료 본문 한 단계 크게 ---------- */
.story-free .sf-sec > p, .story-free .sf-hook > p, .story-free .sf-scene li, .story-free .sf-kuk { font-size: 17.5px; }
.reading { font-size: 17.5px; }
.reading p.basis { font-size: 15.5px; }
.concept p { font-size: 16px; }
@media (max-width: 720px) { .story-free .sf-sec > p, .story-free .sf-hook > p, .story-free .sf-scene li, .story-free .sf-kuk, .reading { font-size: 16.5px; } }

/* ---------- 소제목 첫 문장(결론) 형광 밑줄 ---------- */
mark.lead { background: linear-gradient(transparent 58%, rgba(233, 180, 76, .38) 0); color: inherit; font-weight: 700; padding: 0 1px; }

/* ---------- 자리를 짚는 작은 원국표 ---------- */
.mini-chart { display: inline-flex; gap: 4px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: rgba(255, 252, 244, .8); }
.mini-chart > div { display: grid; gap: 3px; justify-items: center; }
.mini-chart small { font-size: 11px; color: var(--ink-3); }
.mini-chart > div > span { opacity: .28; filter: grayscale(.85); }
.mini-chart > div > span.on { opacity: 1; filter: none; }
@media (max-width: 560px) { .concept { grid-template-columns: 44px 1fr; gap: 12px; padding: 14px; } .concept svg { width: 40px; height: 40px; } }
.mini-chart span[class^="el-"] { display: grid; place-items: center; width: 30px; height: 34px; border-radius: 6px; background: var(--el); color: var(--el-fg); box-shadow: inset 0 0 0 1px var(--el-line, rgba(0,0,0,.08)); }
.mini-chart .hz { font: 700 16px/1 var(--serif); } .mini-chart .hg { display: none; }
.mini-chart span.on > span[class^="el-"] { box-shadow: 0 0 0 2px #c8372d; }
aside.spot { float: right; margin: 4px 0 10px 16px; }
@media (max-width: 560px) { aside.spot { float: none; margin: 0 0 10px; } }
section.sub::after { content: ''; display: block; clear: both; }

/* ---------- 용어 그림 상자: 염라가 설명 ---------- */
.concept .cp-by { display: inline-block; margin-left: 8px; padding: 1px 7px 2px; border-radius: 4px; background: #c8372d; color: #fff3e6; font: 800 11px/1.3 var(--disp); letter-spacing: .18em; vertical-align: 3px; }
.concept p { font-family: var(--disp); font-weight: 700; color: var(--ink); }

/* ---------- 나의 힘 네 기준: 칸마다 이유 ---------- */
.pw-why { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.pw-why li { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: rgba(255, 252, 244, .7); }
.pw-why b { font: 700 16px var(--disp); margin-right: 6px; } .pw-why small { color: var(--ink-3); font-size: 12.5px; }
.pw-why p { margin: 4px 0 0 !important; font-size: 15.5px; line-height: 1.7; }
@media (max-width: 560px) { .pw-why li { grid-template-columns: 1fr; } }

/* ---------- 세 관점: 상자 크기 같게, 급함은 ★중요 ---------- */
.sf-three > div { position: relative; width: 132px; min-height: 128px; align-content: center; }
.sf-three .urgent { position: absolute; top: -10px; left: 50%; transform: translateX(-50%); padding: 1px 8px; border-radius: 999px; background: #c8372d; color: #fff3e6; font: 800 11.5px/1.5 var(--disp); white-space: nowrap; }
@media (max-width: 560px) { .sf-three > div { width: 104px; min-height: 112px; } }

/* ---------- 오신: 글자색 대신 기호 ---------- */
.sf-osin li b { color: var(--ink) !important; }
.sf-osin .sym { font-style: normal; font-weight: 800; width: 18px; text-align: center; }
.sym.s-용신, .sym.s-희신 { color: #2f8a55; } .sym.s-한신 { color: #9a9384; } .sym.s-구신 { color: #d9822b; } .sym.s-기신 { color: #c8372d; }
.sf-osin li { grid-template-columns: 40px 20px 44px 1fr; }

/* 이 글에 나온 시기: 대운과 세운 사이 세로줄 */
.yr-strip .fig-luck > div.sep { margin-left: 10px; padding-left: 16px; border-left: 2px solid rgba(200, 55, 45, .45); }
/* 부록: 기둥 머리줄과 카드에 작은 원국표 */
p.pl-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.sal-card { position: relative; }
.sal-card > .mini-chart { align-self: center; margin-left: auto; flex: none; }
@media (max-width: 560px) { .sal-card > .mini-chart { margin: 8px 0 0; } }
@media (max-width: 560px) { .reading .sal-card { flex-wrap: wrap; } }
/* 12신살 카드: 현실에서는 / 이 기둥에서는 */
.sc-more { margin: 10px 0 0; padding: 10px 12px; border-radius: 8px; background: rgba(233, 180, 76, .1); display: grid; gap: 4px; }
.sc-more dt { font: 700 13.5px var(--disp); color: #c8372d; }
.sc-more dd { margin: 0 0 6px; font-size: 15px; line-height: 1.7; color: var(--ink-2); }
.sc-more dd:last-child { margin-bottom: 0; }

/* ---------- 용어 상자: 염라 말풍선 + 오른쪽 먹방울 그림 ---------- */
.reading .concept, .concept { display: flex; align-items: center; gap: 12px; margin: 20px 0 24px; padding: 0; border: 0; background: none; box-shadow: none; grid-template-columns: none; }
.concept > .cp-face, .concept > .yname { flex: none; }
.concept .cp-face { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 2px #fbf3e2, 0 0 0 3.5px var(--ink); }
.cp-bubble { position: relative; flex: 1; display: flex; align-items: center; gap: 14px; padding: 12px 14px 12px 18px; border: 1.5px solid var(--ink); border-radius: 16px; background: #fffaf0; }
.cp-bubble::before { content: ''; position: absolute; left: -8px; top: 50%; width: 13px; height: 13px; margin-top: -6.5px; background: #fffaf0; border-left: 1.5px solid var(--ink); border-bottom: 1.5px solid var(--ink); transform: rotate(45deg); }
.cp-bubble > div { flex: 1; min-width: 0; }
.cp-bubble b { display: block; margin: 0 0 4px; font: 700 17px var(--disp); color: #c8372d; }
.cp-bubble p { margin: 0 !important; font: 700 16px/1.65 var(--disp); color: var(--ink); }
.cp-art { flex: none; width: 112px; height: 112px; object-fit: contain; }
.cp-icon { display: grid; place-items: center; } .cp-icon svg { width: 56px; height: 56px; fill: none; stroke: var(--gold); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
@media (max-width: 560px) { .cp-bubble { flex-direction: column-reverse; align-items: stretch; text-align: left; } .cp-art { width: 120px; height: 120px; align-self: center; } .concept { align-items: flex-start; } }
/* 도움 되는 기운을 뜻하는 굵은 구절: 그 오행 색 밑줄 */
strong.uy { text-decoration: underline; text-decoration-color: var(--el-ink); text-decoration-thickness: 3px; text-underline-offset: 5px; text-decoration-skip-ink: none; }
strong.uy.el-金 { text-decoration-color: #8a857c; }

/* 신살 카드의 먹방울 그림 */
.sal-card .sc-art { width: 84px; height: 84px; flex: none; align-self: center; }
.sal-card > div { flex: 1; min-width: 0; }
@media (max-width: 560px) { .sal-card .sc-art { width: 60px; height: 60px; } }

/* 용신 상자의 '이 사주에 필요한 기운' 그림, 삼합 상자 그림, 12운성 카드 */
.cp-need { flex: none; margin: 0; text-align: center; }
.cp-need img { width: 84px; height: 84px; object-fit: contain; display: block; margin: 0 auto; }
.cp-need figcaption { font: 700 12px var(--sans); color: var(--seal); margin-top: 2px; }
.kuk-row .kuk-art { width: 96px; height: 96px; margin-left: auto; flex: none; }
@media (max-width: 560px) { .kuk-row .kuk-art { width: 72px; height: 72px; } .cp-need { align-self: center; } }

/* ===== 유료 풀이 2판 ===== */
.rp-thread { margin: 14px auto 0; max-width: 560px; padding: 12px 16px; border: 1.5px solid var(--gold-2, #c9a961); border-radius: 10px; background: #fffaf0; font: 700 16.5px/1.7 var(--disp); color: var(--ink); text-align: center; }
.rp-thread b { display: block; margin-bottom: 2px; font: 800 12px var(--sans); letter-spacing: .12em; color: var(--seal, #c8372d); }
/* 인생 지도 */
.life-map { margin: 26px 0 0; padding: 18px 16px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2, #faf3e3); }
.wrap-up dl { margin: 10px 0 12px; } .wrap-up dl div { display: flex; gap: 12px; padding: 7px 4px; border-top: 1px solid var(--line); }
.wrap-up dt { flex: 0 0 9.5em; color: var(--ink-2); font-size: 14px; } .wrap-up dd { margin: 0; font-weight: 600; }
.life-map .lm-h { margin: 0 0 4px; font: 700 19px var(--serif); text-align: center; }
.life-map .lm-lead { margin: 0 0 14px; font-size: 14px; color: var(--ink-2); text-align: center; }
.lm-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(64px, 1fr); gap: 5px; overflow-x: auto; padding: 4px 2px 8px; }
.lm-d { position: relative; display: grid; justify-items: center; gap: 3px; padding: 8px 2px 6px; border-radius: 8px; border-top: 5px solid #bdb6a8; background: #fffdf8; }
.lm-d.t-good { border-top-color: #2f8a55; } .lm-d.t-bad { border-top-color: #c8372d; }
.lm-d.past { opacity: .72; }
.lm-d.now { outline: 2.5px solid var(--gold, #b8860b); opacity: 1; }
.lm-d small { font-size: 11px; color: var(--ink-3); } .lm-d small.yr { font-size: 10px; }
.lm-d > b { font: 700 12px var(--sans); color: var(--ink-2); }
.lm-d.t-good > b { color: #23703f; } .lm-d.t-bad > b { color: #b02a22; }
.lm-d .here { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); padding: 1px 7px 2px; border-radius: 4px; background: var(--gold, #b8860b); color: #fff; font: 800 10.5px var(--sans); font-style: normal; }
.lm-d .gzv { gap: 3px; } .lm-d .gzv > div { gap: 2px; }
.lm-d .gzv > div > span { width: 32px; height: 36px; border-radius: 6px; } .lm-d .gzv .hz { font-size: 16px; } .lm-d .gzv .hg { font-size: 9.5px; } .lm-d .gzv small { font-size: 10px; }
.life-map .fig-cap .dot { display: inline-block; width: 9px; height: 9px; margin: 0 4px 0 10px; border-radius: 50%; background: #bdb6a8; }
.life-map .fig-cap .dot.good { background: #2f8a55; margin-left: 0; } .life-map .fig-cap .dot.bad { background: #c8372d; }
/* 지금의 10년 */
.fig-now { display: flex; align-items: center; justify-content: center; gap: 22px; flex-wrap: wrap; }
.fig-now .gzv > div > span { width: 46px; height: 52px; } .fig-now .gzv .hz { font-size: 23px; }
.fig-now .fn-h { margin: 0 0 6px; font: 700 15px var(--sans); }
.fig-now ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.fig-now li { padding: 6px 10px; border-left: 4px solid #bdb6a8; background: #fffdf8; border-radius: 0 6px 6px 0; font-size: 14.5px; }
.fig-now li b { margin-right: 8px; font-weight: 700; }
.fig-now li.t-good { border-left-color: #2f8a55; } .fig-now li.t-bad { border-left-color: #c8372d; }
.fig-months { grid-auto-columns: minmax(46px, 1fr); }
/* 열두 달 목록 */
.reading ul.month-list { list-style: none; padding: 0; display: grid; gap: 6px; }
.reading ul.month-list li { padding: 9px 12px; border-left: 4px solid #bdb6a8; background: var(--surface, #fffdf8); border-radius: 0 8px 8px 0; }
.reading ul.month-list li.t-good { border-left-color: #2f8a55; } .reading ul.month-list li.t-bad { border-left-color: #c8372d; }
/* 장 끝: 근거(접힘) · 염라의 한마디 */
.reading details.ch-basis { margin: 26px 0 0; padding: 10px 14px; border: 1px dashed var(--line-2, #d8cbb0); border-radius: 8px; background: transparent; }
.reading details.ch-basis summary { cursor: pointer; font: 700 13.5px var(--sans); color: var(--ink-3); }
.reading details.ch-basis p { margin: 8px 0 2px; font-size: 14px; line-height: 1.75; color: var(--ink-2); }
.reading .bridge { margin: 22px 0 6px; }
.reading .bridge p { font-size: clamp(15.5px, 4vw, 17px); }
/* 개념 상자: 이 사주에 맞춘 한 문장 */
.cp-bubble p.cp-own { margin-top: 6px !important; padding-top: 6px; border-top: 1px dashed #d8cbb0; color: #8a2b22; }
/* 장마다 붙는 신살 카드 묶음 */
.reading .sal-in { margin: 26px 0 0; }
.reading .sal-in .si-lead { margin: 0 0 10px; font-size: 14px; color: var(--ink-2); }
.reading .sal-in .si-h { margin: 0 0 4px; font: 700 15px var(--serif); color: var(--gold, #8a6d1c); }
/* 쓰는 중 */
.reading .writing { margin: 28px 0 10px; padding: 16px; border: 1.5px dashed var(--line-2, #d8cbb0); border-radius: 12px; }
.reading .writing .say { margin-top: 0; }
.reading .writing .w-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 4px 14px; font-size: 14px; color: var(--ink-3); }
.reading .writing .w-list li { display: flex; gap: 8px; align-items: baseline; }
.reading .writing .w-list span { font: 600 12px var(--sans); color: var(--gold, #8a6d1c); min-width: 44px; }
.reading .writing .w-list li.done { color: var(--ink); } .reading .writing .w-list li.done::after { content: '✓'; color: #2f8a55; font-weight: 800; }
.reading .writing .w-list li.now { color: var(--seal, #c8372d); font-weight: 700; } .reading .writing .w-list li.now::after { content: '적는 중'; font: 700 11px var(--sans); color: var(--seal, #c8372d); }
/* 결제 전: 지금 내 상황 */
.buy .ctx { margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; display: grid; gap: 8px; background: #fffdf8; }
.buy .ctx-h { margin: 0; font: 700 14px var(--sans); } .buy .ctx-h small, .buy .ctx label small { margin-left: 6px; font: 400 12px var(--sans); color: var(--ink-3); }
.buy .ctx-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; } .buy .ctx-row > span { min-width: 48px; font: 600 13px var(--sans); color: var(--ink-2); }
.buy .ctx-row button { padding: 6px 11px; border: 1px solid var(--line-2, #d8cbb0); border-radius: 999px; background: #fff; font: 600 13.5px var(--sans); color: var(--ink-2); cursor: pointer; }
.buy .ctx-row button[aria-pressed="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
html.pm .reading details.ch-basis summary { list-style: none; }

/* 신살 표: 이름에 마우스를 올리면 그림과 뜻 */
.fig-sal .has-tip { cursor: help; border-bottom: 1px dotted currentColor; }
#tip .tip-art { float: left; width: 72px; height: 72px; margin: 2px 12px 4px 0; border-radius: 8px; background: #f6efe0; object-fit: contain; }
#tip:has(.tip-art) { max-width: min(360px, calc(100vw - 32px)); min-height: 98px; }

/* 결제 동의와 하단 사업자 정보 */
.buy .agree { margin-top: 10px; display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.buy .agree p { margin: 0; } .buy .agree label { display: flex; gap: 8px; align-items: flex-start; font-weight: 400; } .buy .agree input { margin-top: 4px; flex: none; }
.site-foot .biz span { display: block; } .site-foot .biz:not(:empty) { display: block; margin-top: 8px; }
.site-foot .legal-links { display: block; margin-top: 6px; } .site-foot .legal-links a { color: inherit; }
.buy .agree input[type=tel] { max-width: 320px; }
.buy .agree label.all { padding-bottom: 6px; border-bottom: 1px solid var(--line); color: var(--ink); }
/* 결제 연결 전: 상세 풀이가 곧 열린다는 안내 상자 */
.soon-box { max-width: 460px; margin: 0 auto 8px; padding: 20px 22px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255, 255, 255, .45); text-align: center; }
.soon-box p { margin: 0; color: var(--ink-2); }
.soon-box .soon-price { display: flex; justify-content: center; align-items: center; gap: 12px; margin-bottom: 10px; color: var(--ink); }
.soon-box .soon-price b { font: 700 26px var(--serif); }
.soon-box .soon-price span { padding: 4px 10px; border-radius: 99px; background: var(--seal); color: #fff3e6; font-size: 13px; }
.sf-need.sf-help { margin-top: 22px; }
