/* 천율 점집 사이트 — 밤에 등불 켠 점집에 들어서는 느낌.
   대문과 점방은 css/art 의 신당 이미지, 산통과 두루마리는 CSS로 구성한다.
   색은 앱의 단청 다섯 색(삼청·양록·황·주홍·석간주)과 한지·먹을 그대로 가져왔다. */
:root {
  --night: #100E0B;         /* 밤 */
  --night-2: #17201C;       /* 등불 닿는 어둠 */
  --wood: #3A2417;          /* 나무 */
  --wood-2: #5A3A22;
  --wood-hi: #8A5A30;
  --hanji: #F3E9D2;         /* 한지 */
  --hanji-2: #E8DBBD;
  --ink: #1A211D;           /* 먹 */
  --ink-soft: #343C38;      /* 곁들이는 글 — 흐려 보여 더 짙게(2026-11-22) */
  --gold: #D9B25F;          /* 금박 */
  --gold-deep: #A9812F;
  --seal: #A43C32;          /* 인주 */
  --jade: #173F37;          /* 단청 청록 */
  --jade-hi: #2F8468;
  --samcheong: #24468C;
  --hwang: #E2A63B;
  --juhong: #C2452F;
  --flame: #FFC56B;
  /* 글꼴(2026-11-22 사용자 지시 「웹판은 연성체와 본명조로」) — 제목·간판·이름은 붓글씨 연성체, 읽는 글은 본명조.
     두 글꼴은 fonts/ 에 있다(make_site.py 가 앱의 assets/fonts 에서 복사, OFL). 연성체에 없는 한자는 본명조로 받는다.
     이름은 그대로 두었다 — --serif 가 제목(연성체), --sans 가 본문(본명조)이다. */
  --myeongjo: "Noto Serif KR", "Nanum Myeongjo", "AppleMyungjo", "Batang", serif;
  --serif: "Yeon Sung", var(--myeongjo);
  /* 읽는 글은 또렷한 고딕 프리텐다드로(2026-11-22 사용자 지시 「글자가 가늘고 흐리다 — 선명하게」). 본명조는 한자 표기에만 남긴다.
     붓글씨 연성체는 큰 제목·간판·값에만 쓰고, 작은 소제목과 문장은 프리텐다드 굵은 글씨로 — 작은 붓글씨는 뭉개져 보인다. */
  --sans: "Pretendard Variable", Pretendard, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", system-ui, sans-serif;
  --maxw: 1080px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--night); color: var(--hanji); font-family: var(--sans); font-weight: 500; font-size: 16px; line-height: 1.7; word-break: keep-all; overflow-wrap: anywhere; }
/* 연성체는 굵기가 하나뿐 — 브라우저가 억지로 굵게 그리면 획이 뭉개지므로 막는다(본명조는 400·700 이 따로 있다) */
html { font-synthesis-weight: none; }
.han { font-family: var(--myeongjo) !important; }
h1, h2, h3 { font-family: var(--serif); font-weight: 800; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
p { margin: 0; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 6px; }
.han { font-family: var(--serif); font-weight: 400; opacity: .72; margin-left: .4em; font-size: .72em; letter-spacing: .08em; }
.wrap { width: min(100% - 32px, var(--maxw)); margin: 0 auto; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── 시험 운영 띠 ─────────────────────────────── */
.demo-bar { background: var(--seal); color: #FFF7EA; text-align: center; font-size: 13.5px; padding: 7px 16px; line-height: 1.45; }
.demo-bar b { font-weight: 800; }

/* ── 머리 ──────────────────────────────────────── */
.top { position: sticky; top: 0; z-index: 30; background: color-mix(in srgb, var(--night) 88%, transparent); backdrop-filter: blur(8px); border-bottom: 1px solid rgba(217, 178, 95, .22); }
.top .wrap { display: flex; align-items: center; gap: 14px; min-height: 58px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--serif); font-weight: 800; font-size: 20px; }
.brand i { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--seal); border-radius: 5px; color: var(--seal); font-style: normal; font-size: 19px; background: rgba(164, 60, 50, .08); }
.brand small { font-size: 12px; font-weight: 400; opacity: .7; letter-spacing: .14em; }
.top nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.top nav a { text-decoration: none; padding: 8px 11px; border-radius: 8px; font-size: 14.5px; opacity: .86; white-space: nowrap; }
.top nav a:hover { background: rgba(243, 233, 210, .08); opacity: 1; }
.top nav a.go { background: var(--gold); color: #241708; font-weight: 800; opacity: 1; }
@media (max-width: 560px) { .top nav a.hide-s { display: none; } .brand small { display: none; } }

/* ── 단추 ──────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 24px; border-radius: 10px; border: 1px solid var(--gold-deep); background: linear-gradient(180deg, #E9C777, #C99A3D); color: #241708; font-weight: 800; font-size: 16.5px; text-decoration: none; box-shadow: 0 6px 18px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .45); transition: transform .15s ease, filter .15s ease; }
.btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.btn:active { transform: translateY(1px); }
.btn[disabled] { filter: grayscale(.7) brightness(.8); cursor: not-allowed; transform: none; }
.btn.ghost { background: transparent; color: var(--hanji); border-color: rgba(243, 233, 210, .4); box-shadow: none; font-weight: 600; }
.btn.ink { background: var(--jade); color: var(--hanji); border-color: #0E2A24; box-shadow: 0 4px 12px rgba(0, 0, 0, .25); }
.btn.sm { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn.wide { width: 100%; }

/* ── 한지 판 ──────────────────────────────────── */
.sheet-sec { padding: clamp(44px, 8vw, 84px) 0; position: relative; }
.sheet-sec.dark { background: linear-gradient(180deg, #131A17, #100E0B); }
.sec-head { text-align: center; margin-bottom: clamp(24px, 4vw, 40px); }
.sec-head .kicker { font-family: var(--serif); color: var(--gold); letter-spacing: .3em; font-size: 13px; }
.sec-head h2 { font-size: clamp(26px, 4.6vw, 40px); margin-top: 8px; }
.sec-head p { margin: 12px auto 0; max-width: 40em; opacity: .82; }

.hanji { background:
  radial-gradient(circle at 18% 22%, rgba(140, 104, 40, .08) 0 1px, transparent 1.5px) 0 0 / 19px 23px,
  radial-gradient(circle at 70% 64%, rgba(140, 104, 40, .07) 0 1px, transparent 1.5px) 0 0 / 29px 31px,
  linear-gradient(180deg, #F7EFDB, var(--hanji) 30%, var(--hanji-2));
  color: var(--ink); border-radius: 6px; box-shadow: 0 18px 50px rgba(0, 0, 0, .5), inset 0 0 0 1px rgba(120, 84, 30, .25); }

/* 차림표 */
.menu { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 236px), 1fr)); gap: 16px; }
.dish { position: relative; padding: 24px 20px 20px; display: flex; flex-direction: column; gap: 8px; border-top: 5px solid var(--jade); }
.dish.star { border-top-color: var(--seal); }
.dish .tag { position: absolute; top: -14px; right: 14px; background: var(--seal); color: #FFF7EA; font-size: 12px; font-weight: 800; padding: 3px 10px; border-radius: 3px; letter-spacing: .06em; }
.dish h3 { font-size: 22px; }
.dish .what { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.dish ul { margin: 4px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-soft); }
.dish li { padding-left: 16px; position: relative; }
.dish li::before { content: ""; position: absolute; left: 2px; top: .72em; width: 6px; height: 6px; border-radius: 50%; background: var(--gold-deep); }
.price { font-family: var(--serif); font-weight: 800; font-size: 26px; color: var(--seal); margin-top: 6px; }
.price small { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-left: 6px; }
.price s { font-size: 14px; color: var(--ink-soft); font-weight: 400; margin-right: 6px; }
.price.free { color: var(--jade); }

/* 보는 순서 */
.order { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 18px; counter-reset: st; }
.order li { list-style: none; counter-increment: st; padding: 20px 18px; border: 1px solid rgba(217, 178, 95, .28); border-radius: 12px; background: rgba(243, 233, 210, .04); position: relative; }
.order li::before { content: counter(st, cjk-ideographic); font-family: var(--serif); display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--gold); color: var(--gold); font-size: 20px; margin-bottom: 10px; }
.order b { display: block; font-family: var(--serif); font-size: 19px; margin-bottom: 4px; }
.order span { opacity: .82; font-size: 14.5px; }
ol.order { padding: 0; margin: 0; }

/* 약속 */
.vows { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.vow { padding: 22px 20px; }
.vow h3 { font-size: 19px; display: flex; gap: 10px; align-items: center; }
.vow h3 i { font-style: normal; display: inline-grid; place-items: center; width: 34px; height: 34px; border: 2px solid var(--seal); color: var(--seal); border-radius: 4px; font-size: 17px; flex: 0 0 auto; }
.vow p { margin-top: 8px; font-size: 14.5px; color: var(--ink-soft); }

/* 묻고 답하기 */
.faq { max-width: 780px; margin: 0 auto; }
.faq details { border-bottom: 1px solid rgba(217, 178, 95, .25); }
.faq summary { cursor: pointer; padding: 18px 34px 18px 4px; font-family: var(--serif); font-weight: 700; font-size: 18px; list-style: none; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 8px; top: 50%; transform: translateY(-50%); color: var(--gold); font-size: 24px; font-weight: 400; }
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 4px 20px; opacity: .86; font-size: 15.5px; }

.cta-band { text-align: center; padding: clamp(40px, 7vw, 70px) 16px; background: radial-gradient(70% 120% at 50% 100%, rgba(255, 176, 79, .22), transparent 70%); }
.cta-band h2 { font-size: clamp(24px, 4.4vw, 36px); }
.cta-band p { opacity: .82; margin: 10px 0 22px; }

/* 바닥 */
.foot { border-top: 1px solid rgba(217, 178, 95, .2); padding: 30px 0 46px; font-size: 13.5px; opacity: .78; }
.foot .wrap { display: grid; gap: 10px; }
/* 사업자 정보(상호·사업자등록번호·통신판매업 신고 등) — 법이 적으라는 것이라 두되, 가장 작게(2026-11-23 사용자 지시) */
#op { order: 9; margin-top: 6px; font-size: 12px; line-height: 1.6; opacity: .72; font-weight: 400; letter-spacing: 0; } /* 2026-11-23: PG 심사·전자상거래법 — 사업자 정보는 읽혀야 한다(전에는 .28·10.5px) */
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.foot nav a, .foot nav button { background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; font-size: 13.5px; }

/* ══ 점방(점 보는 방) ════════════════════════════ */
.room { min-height: 100vh; background:
  radial-gradient(90% 55% at 50% 0%, rgba(255, 176, 79, .16), transparent 70%),
  repeating-linear-gradient(90deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 120px),
  linear-gradient(180deg, #1C140D, #120E0A 60%, #0E0B08); }
.room-top { display: flex; align-items: center; gap: 12px; padding: 12px 0; }
.room-top .where { margin-left: auto; font-size: 13.5px; opacity: .7; }
.trail { display: flex; gap: 6px; margin: 4px 0 22px; padding: 0; list-style: none; overflow-x: auto; scrollbar-width: none; }
.trail::-webkit-scrollbar { display: none; }
.trail li { flex: 1 0 auto; text-align: center; font-size: 13px; padding: 7px 10px; border-radius: 999px; border: 1px solid rgba(217, 178, 95, .25); opacity: .55; white-space: nowrap; }
.trail li.on { opacity: 1; background: var(--gold); color: #241708; font-weight: 800; border-color: var(--gold); }
.trail li.done { opacity: .9; border-color: var(--gold-deep); color: var(--gold); }

/* 상 — 촛불과 향 */
.altar { position: relative; height: 104px; margin: 0 auto 6px; width: min(100%, 420px); }
.altar::after { content: ""; position: absolute; left: 6%; right: 6%; bottom: 0; height: 16px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--wood-hi), var(--wood)); box-shadow: 0 10px 20px rgba(0, 0, 0, .5); }
.candle { position: absolute; bottom: 16px; width: 14px; height: 46px; background: linear-gradient(90deg, #E9E1CF, #FFFDF4 45%, #CFC6B0); border-radius: 3px 3px 0 0; }
.candle.l { left: 18%; } .candle.r { right: 18%; }
.candle::before { content: ""; position: absolute; left: 50%; top: -24px; width: 12px; height: 24px; transform: translateX(-50%); background: radial-gradient(ellipse at 50% 78%, #FFF7D6 0 22%, var(--flame) 46%, #E0661F 78%, transparent 80%); border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%; animation: flame 1.1s ease-in-out infinite alternate; transform-origin: 50% 100%; filter: drop-shadow(0 0 14px rgba(255, 170, 70, .9)); }
.candle.r::before { animation-delay: -.5s; }
@keyframes flame { from { transform: translateX(-50%) scale(1, 1) rotate(-2deg); } to { transform: translateX(-50%) scale(.9, 1.12) rotate(3deg); } }
.censer { position: absolute; left: 50%; bottom: 16px; transform: translateX(-50%); width: 46px; height: 26px; border-radius: 6px 6px 16px 16px; background: linear-gradient(180deg, #8C7440, #4E3D1C); }
.censer::before, .censer::after { content: ""; position: absolute; left: 50%; bottom: 24px; width: 3px; height: 56px; background: linear-gradient(180deg, transparent, rgba(243, 233, 210, .5)); border-radius: 50%; filter: blur(2px); animation: smoke 4.5s ease-in-out infinite; transform-origin: 50% 100%; }
.censer::after { animation-delay: -2.2s; margin-left: 6px; }
@keyframes smoke { 0% { transform: translateX(-50%) scaleY(.4) skewX(0); opacity: 0; } 30% { opacity: .8; } 100% { transform: translateX(-50%) translateY(-22px) scaleY(1.25) skewX(14deg); opacity: 0; } }

/* 선생의 말 */
.say { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin: 8px 0 22px; }
.say .who { width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: radial-gradient(circle at 40% 34%, #2F5A4E, #10221D); border: 2px solid var(--gold-deep); font-family: var(--serif); font-size: 22px; color: var(--gold); box-shadow: 0 0 22px rgba(255, 170, 70, .24); }
.say .words { position: relative; background: rgba(243, 233, 210, .07); border: 1px solid rgba(217, 178, 95, .3); border-radius: 4px 16px 16px 16px; padding: 14px 18px; font-family: var(--serif); font-size: clamp(17px, 2.4vw, 20px); line-height: 1.65; }
.say .words small { display: block; font-family: var(--sans); font-size: 13.5px; opacity: .72; margin-top: 6px; }

.stage { display: none; animation: rise .5s ease both; }
.stage.on { display: block; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* 고르기 */
.pick { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); gap: 14px; }
.pick button { text-align: left; padding: 20px 18px 18px; border: 0; border-top: 5px solid var(--jade); display: flex; flex-direction: column; gap: 6px; transition: transform .15s ease, box-shadow .15s ease; }
.pick button:hover { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(0, 0, 0, .6), inset 0 0 0 2px var(--gold-deep); }
.pick button.star { border-top-color: var(--seal); }
.pick h3 { font-size: 21px; color: var(--ink); }
.pick .what { font-size: 14.5px; color: var(--ink-soft); flex: 1; }
.pick .price { font-size: 22px; }

/* 복채함 */
.pay { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 820px) { .pay { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); } }
.box-art { position: relative; height: 210px; display: grid; place-items: end center; }
.box { position: relative; width: min(100%, 300px); height: 132px; border-radius: 6px; background: linear-gradient(180deg, var(--wood-hi), var(--wood-2) 40%, var(--wood)); border: 3px solid #24150C; box-shadow: 0 18px 40px rgba(0, 0, 0, .6), inset 0 2px 0 rgba(255, 220, 160, .25); display: grid; place-items: center; }
.box::before { content: ""; position: absolute; top: 14px; left: 22%; right: 22%; height: 8px; border-radius: 4px; background: #0C0704; box-shadow: inset 0 2px 4px #000; }
.box b { font-family: var(--serif); color: var(--gold); font-size: 34px; letter-spacing: .3em; text-indent: .3em; margin-top: 22px; text-shadow: 0 2px 0 rgba(0, 0, 0, .5); }
.coin { position: absolute; left: 50%; top: 0; width: 44px; height: 44px; margin-left: -22px; border-radius: 50%; background: radial-gradient(circle at 36% 32%, #FFE9A8, #D7A93F 60%, #96711F); border: 2px solid #7A5A14; opacity: 0; }
.coin::after { content: ""; position: absolute; inset: 14px; background: #2B1B0D; }
.box-art.drop .coin { animation: drop 1.05s cubic-bezier(.45, 0, .8, .5) forwards; }
@keyframes drop { 0% { opacity: 1; transform: translateY(-10px) rotate(0); } 78% { opacity: 1; transform: translateY(86px) rotate(300deg); } 100% { opacity: 0; transform: translateY(100px) rotate(360deg) scale(.5); } }
.bill { padding: 22px 20px; }
.bill h3 { font-size: 20px; }
.bill dl { margin: 14px 0 0; display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; font-size: 15px; }
.bill dt { color: var(--ink-soft); } .bill dd { margin: 0; text-align: right; font-weight: 700; }
.bill .total { border-top: 2px solid var(--ink); margin-top: 12px; padding-top: 12px; display: flex; justify-content: space-between; align-items: baseline; font-family: var(--serif); font-weight: 800; font-size: 19px; }
.bill .total b { font-size: 28px; color: var(--seal); }
.agree { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0; font-size: 14px; color: var(--ink-soft); line-height: 1.55; }
.agree input { width: 22px; height: 22px; margin: 1px 0 0; flex: 0 0 auto; accent-color: var(--jade); }
.fine { font-size: 13px; color: var(--ink-soft); line-height: 1.6; margin-top: 10px; }
.msg { margin-top: 10px; font-size: 14px; color: var(--seal); font-weight: 700; min-height: 1.4em; }

/* 명첩 — 생년월일 적는 종이 */
.card-form { padding: 26px 22px 22px; max-width: 640px; margin: 0 auto; position: relative; }
.card-form::before { content: "命帖"; position: absolute; top: 14px; right: 16px; font-family: var(--serif); color: var(--seal); border: 2px solid var(--seal); padding: 2px 6px; font-size: 13px; letter-spacing: .2em; transform: rotate(4deg); opacity: .8; }
.card-form h3 { font-size: 22px; margin-bottom: 14px; }
.f { display: grid; gap: 6px; margin-bottom: 14px; min-width: 0; }
.f label, .f .lab { font-size: 13.5px; color: var(--ink-soft); font-weight: 700; }
.f input[type=text], .f select { width: 100%; min-height: 48px; border: 0; border-bottom: 2px solid var(--ink); background: rgba(255, 255, 255, .45); padding: 0 12px; font: inherit; font-size: 17px; color: var(--ink); border-radius: 4px 4px 0 0; }
.f input:focus, .f select:focus { outline: 3px solid var(--gold-deep); outline-offset: 1px; }
.row3 { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 10px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.seg { display: flex; border: 2px solid var(--ink); border-radius: 8px; overflow: hidden; }
.seg button { flex: 1 1 0; min-height: 44px; border: 0; background: transparent; color: var(--ink); font-weight: 700; font-size: 15px; padding: 0 6px; }
.seg button + button { border-left: 1px solid rgba(26, 33, 29, .3); }
.seg button[aria-pressed=true] { background: var(--ink); color: var(--hanji); }
.hint { font-size: 13.5px; color: var(--ink-soft); border-left: 3px solid var(--seal); padding: 6px 10px; background: rgba(164, 60, 50, .06); margin: -4px 0 14px; }
.hint[hidden] { display: none; }
.err { color: var(--seal); font-weight: 700; font-size: 14.5px; margin: 6px 0 10px; }
.err[hidden] { display: none; }

/* 두루마리(풀이) */
.scroll { position: relative; padding: 0; max-width: 860px; margin: 0 auto; }
.scroll::before, .scroll::after { content: ""; display: block; height: 22px; border-radius: 11px; background: linear-gradient(180deg, #7A4E2A, #3A2417 60%, #24150C); box-shadow: 0 6px 14px rgba(0, 0, 0, .55); margin: 0 -14px; position: relative; z-index: 2; }
.scroll .paper { padding: clamp(22px, 4vw, 40px) clamp(18px, 4vw, 44px); border-radius: 0; margin-top: -4px; margin-bottom: -4px; animation: unroll 1.1s ease both; transform-origin: 50% 0; }
@keyframes unroll { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
.paper h2 { font-size: clamp(24px, 4vw, 32px); text-align: center; }
.paper .who-line { text-align: center; color: var(--ink-soft); font-size: 14.5px; margin-top: 6px; }
.paper .seal-mark { display: block; width: 58px; height: 58px; margin: 14px auto 0; border: 3px solid var(--seal); color: var(--seal); border-radius: 6px; font-family: var(--serif); font-weight: 800; font-size: 28px; line-height: 52px; text-align: center; transform: rotate(-4deg); opacity: .88; }
.part { margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(120, 84, 30, .35); }
.part.hidden-part { display: none; }
.part > h3 { font-size: 21px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.part > h3 .n { font-size: 14px; color: var(--seal); letter-spacing: .14em; }
.part p { margin-top: 10px; font-size: 16.5px; line-height: 1.85; }
.part .lead { font-family: var(--serif); font-size: 18.5px; font-weight: 700; }
.note { font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; margin-top: 10px; }

.pillars { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 14px; }
.pillar { text-align: center; border: 1px solid rgba(120, 84, 30, .4); border-radius: 8px; padding: 10px 4px 12px; background: rgba(255, 255, 255, .35); min-width: 0; }
.pillar small { display: block; font-size: 12.5px; color: var(--ink-soft); }
.pillar b { display: block; font-family: var(--serif); font-size: clamp(26px, 6vw, 38px); line-height: 1.25; }
.pillar span { display: block; font-size: 13.5px; color: var(--ink-soft); }
.pillar .assume { display: inline-block; margin-top: 4px; font-size: 11.5px; color: var(--seal); border: 1px solid var(--seal); border-radius: 999px; padding: 0 7px; font-weight: 700; }

.oh { display: grid; gap: 8px; margin-top: 14px; }
.oh-row { display: grid; grid-template-columns: 58px 1fr 44px; gap: 10px; align-items: center; font-size: 14.5px; }
.oh-bar { height: 12px; border-radius: 6px; background: rgba(26, 33, 29, .12); overflow: hidden; }
.oh-bar i { display: block; height: 100%; border-radius: 6px; }
.oh-row b { font-family: var(--serif); }
.oh-row span:last-child { text-align: right; font-variant-numeric: tabular-nums; }

.ages { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.age { border: 1px solid rgba(120, 84, 30, .4); border-top: 4px solid var(--jade-hi); border-radius: 8px; padding: 14px 16px; background: rgba(255, 255, 255, .32); }
.age:nth-child(2) { border-top-color: var(--juhong); } .age:nth-child(3) { border-top-color: var(--hwang); } .age:nth-child(4) { border-top-color: var(--samcheong); }
.age.now { box-shadow: 0 0 0 2px var(--jade); }
.age h4 { margin: 0; font-family: var(--serif); font-size: 18px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.age h4 small { font-family: var(--sans); font-weight: 600; font-size: 12.5px; color: var(--ink-soft); }
.chip { display: inline-block; font-family: var(--sans); font-size: 12px; font-weight: 800; padding: 1px 9px; border-radius: 999px; border: 1px solid currentColor; }
.chip.good { color: #1F6B55; background: rgba(47, 132, 104, .1); } .chip.care { color: var(--seal); background: rgba(164, 60, 50, .08); } .chip.now { color: var(--jade); }
.age p { margin-top: 8px; font-size: 15.5px; line-height: 1.8; }

.topics { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.topic { border-left: 4px solid var(--gold-deep); padding: 4px 0 4px 14px; }
.topic h4 { margin: 0; font-family: var(--serif); font-size: 17.5px; }
.topic p { margin-top: 6px; font-size: 15.5px; }

.months { display: grid; gap: 10px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.month { border: 1px solid rgba(120, 84, 30, .4); border-top: 3px solid var(--jade-hi); border-radius: 8px; padding: 12px 14px; background: rgba(255, 255, 255, .32); }
.month.s1 { border-top-color: var(--juhong); } .month.s2 { border-top-color: var(--hwang); } .month.s3 { border-top-color: var(--samcheong); }
.month.now { box-shadow: 0 0 0 2px var(--jade); }
.month b { font-family: var(--serif); font-size: 16.5px; display: flex; gap: 8px; align-items: center; }
.month p { margin-top: 4px; font-size: 14.5px; line-height: 1.7; }

.color-tile { margin-top: 14px; border-radius: 10px; padding: 18px 20px; min-height: 110px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: 0 0 0 1px rgba(26, 33, 29, .25), 0 8px 18px rgba(26, 33, 29, .18); }
.color-tile small { font-weight: 700; letter-spacing: .12em; font-size: 12.5px; opacity: .86; }
.color-tile b { font-family: var(--serif); font-size: 30px; line-height: 1.2; }
.dots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; align-items: center; font-size: 14px; }
.dots .lab { color: var(--ink-soft); min-width: 104px; }
.dot { display: inline-flex; align-items: center; gap: 7px; padding: 3px 11px 3px 5px; border-radius: 999px; border: 1px solid rgba(120, 84, 30, .4); background: rgba(255, 255, 255, .5); font-weight: 600; }
.dot i { width: 20px; height: 20px; border-radius: 50%; box-shadow: inset 0 0 0 1px rgba(26, 33, 29, .2); }
.lists { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); margin-top: 14px; }
.lists ul { margin: 6px 0 0; padding-left: 20px; font-size: 15.5px; }
.lists h4 { margin: 0; font-family: var(--serif); font-size: 17px; }

.more-row { text-align: center; margin-top: 26px; display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.locked { margin-top: 26px; padding: 22px 20px; border: 2px dashed var(--seal); border-radius: 10px; text-align: center; background: rgba(164, 60, 50, .05); }
.locked h3 { font-size: 20px; }
.locked p { font-size: 15px; color: var(--ink-soft); margin: 8px 0 14px; }
.legal { margin-top: 30px; padding-top: 18px; border-top: 1px solid rgba(120, 84, 30, .35); font-size: 13px; color: var(--ink-soft); line-height: 1.65; }

/* 약관 창 */
.modal { position: fixed; inset: 0; z-index: 80; display: none; place-items: center; background: rgba(0, 0, 0, .66); padding: 16px; }
.modal.on { display: grid; }
.modal .panel { width: min(100%, 720px); max-height: min(86vh, 900px); overflow: auto; padding: 24px 22px; }
.modal .panel h2 { font-size: 22px; margin-bottom: 10px; }
.modal .body { font-size: 14.5px; line-height: 1.75; }
.modal .body h3, .modal .body h4 { font-size: 16.5px; margin: 16px 0 6px; }
.modal .body p, .modal .body li { margin: 6px 0; }
.modal .close { margin-top: 16px; }

/* 안내 쪽 */
.doc { max-width: 820px; margin: 0 auto; padding: clamp(24px, 5vw, 44px) clamp(18px, 4vw, 44px); }
.doc h1 { font-size: clamp(28px, 5vw, 40px); }
.doc h2 { font-size: 22px; margin-top: 30px; padding-top: 22px; border-top: 1px solid rgba(120, 84, 30, .35); }
.doc p, .doc li { font-size: 16px; line-height: 1.85; margin-top: 8px; }
.doc ul, .doc ol { padding-left: 22px; margin: 6px 0 0; }
.doc table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: 15px; }
.doc th, .doc td { border-bottom: 1px solid rgba(120, 84, 30, .35); padding: 9px 8px; text-align: left; vertical-align: top; }
.doc th { font-family: var(--serif); }
.doc td.num { text-align: right; white-space: nowrap; font-weight: 700; color: var(--seal); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media print {
  body { background: #fff; color: #000; }
  .top, .demo-bar, .trail, .altar, .say, .more-row, .foot, .room-top, .locked { display: none !important; }
  .room { background: none; }
  .scroll::before, .scroll::after { display: none; }
  .hanji { box-shadow: none; background: #fff; }
  .part.hidden-part { display: block; }
  .age, .month, .pillar { break-inside: avoid; }
}

/* ── 궁합 · 택일 · 이름 짓기 (2026-11-21) ───────────────────── */
.card-form h3.sub { margin-top: 26px; padding-top: 22px; border-top: 1px dashed rgba(120, 84, 30, .55); }
.kws { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.pair { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 10px; align-items: center; margin-top: 14px; }
.person { text-align: center; border: 1px solid rgba(120, 84, 30, .4); border-radius: 8px; padding: 12px 6px 14px; background: rgba(255, 255, 255, .35); min-width: 0; display: grid; gap: 4px; justify-items: center; }
.person small { font-size: 13px; color: var(--ink-soft); font-weight: 700; overflow-wrap: anywhere; }
.person b { font-family: var(--serif); font-size: clamp(22px, 5.4vw, 32px); line-height: 1.25; }
.person span { font-size: 13px; color: var(--ink-soft); }
.person .chip { color: var(--jade); }
.pair .mid { font-family: var(--serif); font-weight: 800; font-size: 24px; color: var(--seal); }
.score { display: flex; gap: 18px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.score .n { font-family: var(--serif); font-weight: 800; font-size: clamp(52px, 13vw, 76px); line-height: 1; color: var(--jade); }
.score .n small { font-size: 18px; margin-left: 2px; }
.score .n.care { color: var(--seal); }
.score .g { font-family: var(--serif); font-weight: 800; font-size: 22px; }
.tally { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 7px; }
.tally li { display: grid; grid-template-columns: 48px minmax(0, 1fr); gap: 10px; font-size: 15px; line-height: 1.6; }
.tally .d { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }
.tally .d.p { color: #1F6B55; } .tally .d.m { color: var(--seal); }
.gates { display: grid; gap: 12px; margin-top: 14px; }
.gate-row { border-left: 4px solid var(--jade-hi); padding: 4px 0 4px 14px; }
.gate-row.fail { border-left-color: var(--seal); }
.gate-row h4 { margin: 0; font-family: var(--serif); font-size: 17.5px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.gate-row .mk { font-family: var(--sans); font-weight: 800; }
.gate-row.fail .mk { color: var(--seal); } .gate-row.pass .mk { color: #1F6B55; }
.part .gate-row p { margin-top: 6px; font-size: 15.5px; }
.cal { margin-top: 14px; }
.cal-w, .cal-g { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-w div { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--ink-soft); padding-bottom: 2px; }
.cal-w div:first-child { color: var(--seal); }
.cal-d { min-height: 54px; min-width: 0; border: 1px solid rgba(120, 84, 30, .35); border-radius: 6px; padding: 5px 1px 4px; text-align: center; background: rgba(255, 255, 255, .35); }
.cal-d b { display: block; font-size: 16px; line-height: 1.3; }
.cal-d small { display: block; font-size: 10.5px; line-height: 1.25; font-weight: 700; letter-spacing: -.02em; }
.cal-d.plain small { color: var(--ink-soft); font-weight: 500; }
.cal-d.rest b { color: var(--seal); }
.cal-d.good { background: rgba(47, 132, 104, .2); border-color: var(--jade); }
.cal-d.best { background: var(--jade); border-color: var(--jade); color: #FFFDF7; }
.cal-d.best.rest b { color: #FFE2A8; }
.cal-d.avoid { background: rgba(164, 60, 50, .09); border-style: dashed; }
.cal-d.avoid small { color: var(--seal); }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; color: var(--ink-soft); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 14px; height: 14px; border-radius: 3px; border: 1px solid rgba(120, 84, 30, .45); background: rgba(255, 255, 255, .35); }
.cal-legend i.good { background: rgba(47, 132, 104, .2); border-color: var(--jade); }
.cal-legend i.best { background: var(--jade); border-color: var(--jade); }
.cal-legend i.avoid { background: rgba(164, 60, 50, .09); border-style: dashed; }
.cal-legend i.restmark { border: 0; background: var(--seal); border-radius: 50%; width: 10px; height: 10px; }
.age ul.why { margin: 8px 0 0; padding-left: 20px; font-size: 15px; line-height: 1.7; }
.lists ul.cols { columns: 2 220px; column-gap: 28px; }
.lists ul.cols li { break-inside: avoid; }
.names { display: grid; gap: 12px; margin-top: 14px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); align-items: start; }
.cand { border: 1px solid rgba(120, 84, 30, .4); border-top: 4px solid var(--gold-deep); border-radius: 8px; padding: 14px 16px; background: rgba(255, 255, 255, .32); min-width: 0; }
.cand .nm { font-family: var(--serif); font-weight: 800; font-size: 25px; line-height: 1.3; }
.cand .nm .han { font-size: 17px; margin-left: 10px; color: var(--ink-soft); font-weight: 600; }
.cand summary { cursor: pointer; list-style: none; }
.cand summary::-webkit-details-marker { display: none; }
.cand summary::after { content: "자세히 보기 ▾"; display: block; margin-top: 8px; font-size: 13px; font-weight: 700; color: var(--jade); }
.cand[open] summary::after { content: "접기 ▴"; }
.cand dl { margin: 12px 0 0; display: grid; gap: 4px; }
.cand dt { font-weight: 800; font-size: 13.5px; color: var(--ink-soft); margin-top: 8px; }
.cand dd { margin: 0; font-size: 14.5px; line-height: 1.7; }
.cand dd ul { margin: 0; padding-left: 18px; }
.cand dd .han { font-size: 17px; margin-right: 4px; }
@media (max-width: 420px) { .cal-d { min-height: 50px; } .cal-d small { font-size: 9.5px; } }
@media print { .cand, .gate-row, .person, .cal { break-inside: avoid; } .cand summary::after { display: none; } }

/* ── 점괘 풀이 · 귀인 · 이름 풀이 (2026-11-21) ───────────────── */
.jg { margin-top: 12px; padding-top: 10px; border-top: 1px dashed rgba(120, 84, 30, .45); }
.jg h5 { margin: 0; font-family: var(--serif); font-size: 15px; color: var(--seal); letter-spacing: .04em; }
.part .advice, .age .advice, .topic .advice { border-left: 3px solid var(--jade-hi); padding-left: 10px; color: var(--ink-soft); font-size: 15px; }
.part h4.theme { margin: 24px 0 0; font-family: var(--serif); font-size: 18.5px; padding-bottom: 6px; border-bottom: 2px solid var(--gold-deep); }
.topic h4 small { font-family: var(--sans); font-weight: 600; font-size: 12.5px; color: var(--ink-soft); margin-left: 4px; }
.lists ul.wide li { margin-bottom: 10px; line-height: 1.75; }
.lists ul.wide small { color: var(--ink-soft); font-size: 12.5px; }
.lists ul.wide .note { display: block; margin-top: 2px; }
.lists p { margin-top: 6px; font-size: 15.5px; }
.pillars.n2 { grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 300px; }
.pillars.n3 { grid-template-columns: repeat(3, minmax(0, 1fr)); max-width: 440px; }
.pillars.n5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pillar small { overflow-wrap: anywhere; }
.f .err { margin: 0; }
@media print { .topic, .jg { break-inside: avoid; } }

/* ── 점괘 그림(타로) · 부적 그림 ─────────────────────────────── */
.jg-row { display: grid; grid-template-columns: 112px 1fr; gap: 14px; align-items: start; margin-top: 8px; }
.jg-row.nopic { display: block; }
.jg-row .jg-txt > :first-child { margin-top: 0; }
.pic { display: block; padding: 0; border: 1px solid rgba(120, 84, 30, .55); border-radius: 8px; overflow: hidden; background: #1c2420; cursor: zoom-in;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .28); line-height: 0; }
.pic img { display: block; width: 100%; height: auto; aspect-ratio: 6 / 13; object-fit: cover; }
.pic:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.bs-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin: 12px 0 4px; }
.bs { margin: 0; }
.bs figcaption { margin-top: 8px; font-size: 14px; line-height: 1.55; }
.bs figcaption b { font-family: var(--serif); font-size: 15.5px; }
.bs figcaption small { opacity: .7; }
.bs figcaption span { display: block; }
.zoom { position: fixed; inset: 0; z-index: 90; overflow: auto; padding: 16px 16px 84px; background: rgba(8, 12, 10, .93); cursor: zoom-out; }
.zoom[hidden] { display: none; }
.zoom-in { min-height: 100%; display: flex; gap: 22px; align-items: center; justify-content: center; flex-wrap: wrap; }
.zoom-in > img { max-width: min(100%, 460px); max-height: calc(100vh - 110px); border-radius: 10px; box-shadow: 0 10px 40px rgba(0, 0, 0, .6); }
#zoom-close { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); min-height: 44px; padding: 8px 28px; border-radius: 999px;
  border: 1px solid var(--gold); background: #1c2420; color: #F6EEDC; font-size: 16px; font-family: var(--sans); cursor: pointer; }
.zoom-wp { cursor: auto; width: min(100%, 400px); padding: 20px 20px 16px; border-radius: 12px; background: #F5EDDA; color: #2A2418; font-size: 15px; line-height: 1.7; }
.zoom-wp[hidden] { display: none; }
.zoom-wp h3 { font-size: 21px; margin-bottom: 12px; color: #2A2418; }
.zoom-wp .btn { width: 100%; }
.wp-msg { margin: 10px 0 0; padding: 9px 12px; border-radius: 8px; background: rgba(46, 92, 74, .14); font-size: 14.5px; }
.wp-steps { margin: 14px 0 6px; padding-left: 22px; }
#wp-pc[hidden], #wp-hand[hidden] { display: none; }
.wp-steps li { margin-bottom: 8px; }
/* 좁은 화면 — 그림을 줄여 「배경화면용 그림 받기」 단추가 스크롤 없이 보이게 */
@media (max-width: 860px) {
  .zoom.has-wp .zoom-in { align-items: flex-start; gap: 14px; }
  .zoom.has-wp .zoom-in > img { max-height: 42vh; }
}

/* ── PDF 미리보기 ─────────────────────────────────────────── */
.pdfbox { position: fixed; inset: 0; z-index: 95; overflow: auto; background: #2a2f2c; }
.pdfbox[hidden] { display: none; }
body.pdf-open { overflow: hidden; }
.pdf-bar { position: sticky; top: 0; z-index: 2; display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; padding: 10px 16px;
  background: #141a17; color: #F6EEDC; border-bottom: 1px solid var(--gold-deep); }
.pdf-bar > b { font-family: var(--serif); font-weight: 400; font-size: 20px; }
.pdf-bar > span { font-size: 13px; opacity: .75; overflow-wrap: anywhere; }
.pdf-acts { margin-left: auto; display: flex; flex-wrap: wrap; gap: 8px; }
.pdf-acts[hidden] { display: none; }
.pdf-acts .btn.ghost { color: #F6EEDC; border-color: rgba(246, 238, 220, .5); }
.pdf-status, .pdf-tip { margin: 18px auto 0; width: min(92%, 720px); padding: 14px 18px; border-radius: 10px; text-align: center; color: #F6EEDC; font-size: 16px; }
.pdf-status[hidden], .pdf-tip[hidden] { display: none; }
.pdf-tip { text-align: left; background: #1f3a30; border: 1px solid rgba(201, 162, 75, .6); font-size: 15px; line-height: 1.75; }
.pdf-pages { padding: 18px 12px 40px; display: grid; gap: 16px; justify-items: center; }
.pdf-pages img { width: min(100%, 780px); height: auto; background: #fff; box-shadow: 0 6px 24px rgba(0, 0, 0, .5); }
@page pdfpage { size: A4; margin: 0; }
@media print {
  body.pdf-print > *:not(#pdfbox) { display: none !important; }
  body.pdf-print { overflow: visible !important; background: #fff !important; }
  body.pdf-print #pdfbox { position: static; overflow: visible; background: #fff; page: pdfpage; }
  body.pdf-print .pdf-bar, body.pdf-print .pdf-status, body.pdf-print .pdf-tip { display: none !important; }
  body.pdf-print .pdf-pages { display: block; padding: 0; }
  body.pdf-print .pdf-pages img { display: block; width: 100%; height: auto; box-shadow: none; break-after: page; }
  body.pdf-print .pdf-pages img:last-child { break-after: auto; }
}
@media (max-width: 640px) {
  .jg-row { grid-template-columns: 84px 1fr; gap: 11px; }
  .bs-row { grid-template-columns: repeat(2, 1fr); }
}
@media print { .zoom { display: none !important; } body:not(.pdf-print) .pdfbox { display: none !important; } .jg-row, .bs { break-inside: avoid; } .pic { box-shadow: none; } }

/* ── 글자 또렷하게(2026-11-22) — 작은 소제목·문장은 붓글씨 대신 굵은 고딕 ───── */
.part .lead, .age h4, .topic h4, .month b, .lists h4, .doc th, .oh-row b, .gate-row h4, .jg h5, .bs figcaption b,
.faq summary, .order b, .part h4.theme, .zoom-wp h3, .cand .nm small {
  font-family: var(--sans); font-weight: 700; letter-spacing: -.01em;
}
.part .lead { font-size: 17.5px; font-weight: 600; }
.paper, .paper p, .paper li { color: var(--ink); }
.paper .note, .paper .who-line, .paper small { color: var(--ink-soft); }

/* ── 작명 네 갈래(2026-11-22) ─────────────────────────────── */
.grp { display: inline-block; margin-left: 8px; padding: 1px 9px; border-radius: 999px; border: 1px solid var(--seal); color: var(--seal);
  font-family: var(--sans); font-size: 12px; font-weight: 700; letter-spacing: .02em; vertical-align: middle; }
.dish > .grp { position: absolute; top: 14px; right: 16px; margin: 0; }
.cand .uri-line { margin: 4px 0 6px; font-size: 14.5px; color: var(--ink-soft); }
.card-form textarea { width: 100%; min-height: 64px; padding: 11px 13px; border: 1px solid rgba(120, 84, 30, .5); border-radius: 8px; background: #FFFDF6;
  color: var(--ink); font: inherit; resize: vertical; }

/* ── 앱 받는 곳 · 말 고르기(2026-11-22) ───────────────────── */
.apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 8px; }
.app-link { display: grid; justify-items: center; gap: 6px; padding: 26px 16px 22px; border-radius: 14px; text-decoration: none; text-align: center;
  color: var(--hanji); background: rgba(243, 233, 210, .06); border: 1px solid rgba(217, 178, 95, .38); transition: transform .15s, border-color .15s; }
a.app-link:hover, a.app-link:focus-visible { transform: translateY(-2px); border-color: var(--gold); }
.app-link svg { color: var(--gold); }
.app-link b { font-family: var(--serif); font-weight: 400; font-size: 24px; }
.app-link span { font-size: 14.5px; opacity: .82; }
.app-link em { margin-top: 8px; padding: 6px 16px; border-radius: 999px; font-style: normal; font-size: 14px; font-weight: 700; color: #1A211D; background: var(--gold); }
.app-link.soon em { color: var(--hanji); background: transparent; border: 1px dashed rgba(243, 233, 210, .5); font-weight: 500; }
.lang { display: inline-flex; gap: 2px; margin-right: 6px; padding: 2px; border-radius: 999px; border: 1px solid rgba(217, 178, 95, .45); font-size: 13px; }
.lang a { padding: 3px 10px; border-radius: 999px; text-decoration: none; color: var(--hanji); }
.lang a[aria-current="true"] { background: var(--gold); color: #1A211D; font-weight: 700; }
.en-note { margin: 18px auto 0; width: min(92%, 720px); padding: 12px 16px; border-radius: 10px; border: 1px dashed rgba(217, 178, 95, .6); font-size: 15px; text-align: center; }
@media (max-width: 640px) { .apps { grid-template-columns: 1fr; } .app-link { grid-template-columns: 56px 1fr; justify-items: start; text-align: left; column-gap: 14px; padding: 16px; }
  .app-link svg { grid-row: span 3; align-self: center; } .app-link em { justify-self: start; margin-top: 4px; } }

/* ── 풀이의 바탕(2026-11-23) ──────────────────────────────── */
dl.basis { margin: 14px 0; display: grid; gap: 4px 0; }
dl.basis dt { margin-top: 12px; font-weight: 700; font-size: 17px; }
dl.basis dt small { margin-left: 6px; font-family: var(--myeongjo); font-weight: 400; opacity: .7; letter-spacing: .06em; }
dl.basis dd { margin: 0; padding-left: 12px; border-left: 3px solid var(--gold-deep); }

/* 신당의 먹빛 목재, 유기, 인주, 한지 */
:root {
  --night:#14201d; --night-2:#1d2924; --gold:#e2be82; --gold-deep:#9c784b;
  --seal:#993f32; --jade:#25463b; --hanji:#f5ecda; --maxw:1200px;
  --line:rgba(217,193,147,.28);
}
.wrap {width:min(calc(100% - clamp(36px,9vw,144px)),var(--maxw))}
.demo-bar {background:#402a25;color:#f1e2cd;font-size:.82rem;padding:6px 16px}
.demo-bar b {color:#f9d19e}
.top {background:#18221ff5;border-color:var(--line)}
.top .wrap {min-height:68px}
.brand {color:#f7efdd;gap:10px;font-size:1.85rem;letter-spacing:.03em;line-height:1}
.brand i {width:32px;height:35px;color:#ffdfbc;background:#9e4237;border:1px solid #bb6a53;box-shadow:inset 0 0 0 2px #9e4237,inset 0 0 0 3px #d79370;border-radius:2px;font:400 1.35rem/1 var(--myeongjo)}
.brand small {font-family:var(--myeongjo);font-size:.76rem;color:#d6bb91;opacity:1}
.top nav {gap:clamp(4px,1vw,18px)}
.top nav a {opacity:1;font-size:.91rem}
.top nav a.go {background:transparent;color:#f0cf99;border:1px solid #89724e;padding:6px 17px;border-radius:2px}
.top nav a.go:hover {background:#3b3c2f}
.top .lang {border:0;background:transparent;gap:0}
.top .lang a {font:600 .78rem/1.5 var(--sans);border:0;padding:5px;color:#cabfaf;background:transparent;border-radius:0}
.top .lang a[aria-current] {color:#f7efdc;text-decoration:underline;text-underline-offset:4px}
.btn {border-radius:3px;box-shadow:none;background:#e6c58a;border-color:#e6c58a;color:#282116;font-weight:700}
.btn.ink {background:var(--jade);border-color:var(--jade);box-shadow:none}
.btn.ghost {background:transparent}
.shrine-gate {isolation:isolate;position:relative;display:grid;align-items:center;min-height:clamp(465px,39vw,635px);overflow:hidden;background:#241d16;color:#fff2da}
.shrine-scene,.shrine-gate::after {position:absolute;inset:0;width:100%;height:100%;z-index:-2}
.shrine-scene {left:auto;width:auto;max-width:78%;object-fit:cover;object-position:55% center;mask-image:linear-gradient(90deg,transparent,#000 20%)}
.shrine-gate::after {content:"";z-index:-1;background:linear-gradient(90deg,rgba(15,19,16,.94) 0%,rgba(18,22,18,.79) 25%,rgba(17,20,16,.4) 46%,transparent 68%),linear-gradient(0deg,rgba(19,24,18,.38),transparent 28%)}
.shrine-intro {padding:50px 0 54px}
.shrine-copy {max-width:49%}
.eyeline,.sec-head .kicker {display:flex;align-items:center;gap:12px;font:600 .82rem/1.5 var(--sans);letter-spacing:.17em;color:var(--gold)}
.eyeline::before,.sec-head .kicker::before {content:"";width:28px;height:1px;background:currentColor}
.shrine-copy h1 {font-size:clamp(3.55rem,5.9vw,6.1rem);line-height:1.13;letter-spacing:-.045em;font-weight:400;margin:21px 0 16px}
.shrine-copy h1 em {font-style:normal;color:#f4d098}
.shrine-copy p {max-width:25em;font-size:clamp(1rem,1.35vw,1.15rem);line-height:1.75;color:#eee3d5}
.shrine-actions {display:flex;align-items:center;gap:24px;margin:26px 0 12px}
.shrine-actions .btn {min-height:48px;padding:0 24px}
.quiet-link {font-size:.96rem;color:#fff1da;text-decoration:underline;text-underline-offset:6px;text-decoration-color:#bda787}
.shrine-copy>small {font-size:.83rem;color:#dfd1be}
.sheet-sec {padding:clamp(46px,5.2vw,80px) 0;scroll-margin-top:65px}
.sheet-sec.dark {background:#182520}
.sec-head {text-align:left;margin-bottom:26px}
.sec-head h2 {font-weight:400;font-size:clamp(2.1rem,3.55vw,3.6rem);letter-spacing:-.04em;line-height:1.2;margin:10px 0 0}
.sec-head p {font-size:1rem;max-width:46em;margin:10px 0 0}
#menu-sec {background:linear-gradient(120deg,#1c2b25,#15211e 72%);border-top:1px solid #786347}
#menu-sec .sec-head {display:grid;grid-template-columns:auto 1fr;align-items:end;gap:4px 20px}
#menu-sec .sec-head .kicker {grid-column:1/-1}
#menu-sec .sec-head p {justify-self:end;text-align:right;font-size:.95rem}
.menu {display:block}
.reading-categories {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}
.topic-card {display:block;position:relative;isolation:isolate;overflow:hidden;margin:0;padding:0;min-width:0;text-align:left;color:#fff5e4;aspect-ratio:1.45;background:#2f2921;border:1px solid #716650;border-radius:3px;transition:border-color .2s}
.topic-card img {position:absolute;inset:0;z-index:-2;width:100%;height:100%;object-fit:cover;transition:transform .4s ease}
.topic-card::before {content:"";position:absolute;inset:0;z-index:-1;background:linear-gradient(0deg,#110f0cf7,rgba(20,16,12,.75) 19%,transparent 75%)}
.topic-card:hover img {transform:scale(1.04)}
.topic-card[aria-pressed=true] {border-color:#e6be80;box-shadow:0 0 0 1px #e6be80}
.topic-ink {position:absolute;right:12px;top:12px;writing-mode:vertical-rl;padding:5px 3px;font:500 .82rem/1.1 var(--myeongjo);letter-spacing:.13em;color:#f4e4c1;background:#231c17c9;border:1px solid #b1976a}
.topic-label {position:absolute;left:17px;right:12px;bottom:13px}
.topic-label b,.topic-label small {display:block}
.topic-label b {font:400 clamp(1.4rem,2.2vw,2.15rem)/1.25 var(--serif)}
.topic-label small {font-size:.85rem;color:#f0dbc0;margin-top:3px}
.reading-list {margin-top:22px;border-top:1px solid #b59b6d;scroll-margin-top:84px}
.reading-item {display:flex;justify-content:space-between;align-items:flex-start;gap:20px;padding:22px 0;border-bottom:1px solid var(--line)}
.reading-body h4 {font:700 1.17rem/1.5 var(--sans);margin:0 0 4px}
.reading-body p {font-size:1rem;color:#dccfbf}
.reading-body details {font-size:.92rem;margin-top:7px}
.reading-body summary {color:#e2c394;cursor:pointer;width:fit-content}
.reading-body ul {margin:8px 0;padding-inline-start:1.3em}
.reading-book {display:flex;align-items:center;gap:20px;flex-shrink:0}
.reading-book strong {color:#efd4a7;font-weight:650;white-space:nowrap}
.reading-book s {font-size:.82rem;font-weight:400;opacity:.78}
.reading-book .btn {background:transparent;border-color:#9a8460;color:var(--hanji)}
#order-sec {background:#efe6d4;color:#292e26}
#order-sec .kicker {color:#7e4736}
.order {grid-template-columns:repeat(5,minmax(0,1fr));gap:0}
.order li {border:0;border-top:1px solid #9c8767;background:transparent;border-radius:0;padding:16px 16px 0 0}
.order li::before {width:auto;height:auto;display:block;border:0;border-radius:0;color:#83432e;font:500 1.25rem/1.5 var(--myeongjo)}
.order span,.vow p {font-size:1rem}
.vows {gap:0;grid-template-columns:repeat(2,minmax(0,1fr))}
.vow.hanji {background:transparent;box-shadow:none;color:var(--hanji);border-radius:0;border-top:1px solid var(--line);padding:22px 22px 22px 0}
.vow p {color:#e1d3bf}
.vow h3 i {color:#e6be81;border:1px solid #94774e;border-radius:1px}
.faq {max-width:none}
.faq summary {font-size:1.12rem}
.app-link {border-radius:3px}
.cta-band {background:linear-gradient(90deg,#151b17df,#18221edb),url("art/almanac.webp") center 50%/cover;padding:58px 20px}
.hanji {border-radius:3px}
.room {background:radial-gradient(ellipse at top,#2b372c,#17231f 55%,#141e1b);background-repeat:no-repeat}
.room-top {min-height:68px}
.room .trail {gap:0;border-top:1px solid var(--line);margin:0 0 17px}
.trail li,.trail li.on,.trail li.done {flex:1 1 0;border:0;border-bottom:2px solid #665c48;border-radius:0;background:transparent;color:#dbcdb5;opacity:1}
.trail li.on {border-color:#e6be80;color:#ffe0a8}
.trail li.done {border-color:#849483}
.shrine-host {position:relative;display:flex;align-items:center;min-height:216px;padding:28px clamp(20px,4vw,56px);margin-bottom:22px;border:1px solid #665744;background:#191e19;color:var(--hanji);isolation:isolate;overflow:hidden}
.shrine-host::before {content:"";position:absolute;inset:0 0 0 auto;z-index:-1;height:100%;aspect-ratio:3/2;max-width:65%;background:url("art/host-read.webp?v=51-original") center/cover no-repeat;mask-image:linear-gradient(90deg,transparent,#000 22%)}
.host-copy {width:51%}
.shrine-host .say {display:block;margin:12px 0 0}
.shrine-host .words {background:none;border:0;padding:0;font:400 clamp(1.65rem,2.65vw,2.6rem)/1.25 var(--serif)}
.shrine-host .words small {margin-top:10px;opacity:1;color:#e4d5be;font:500 .94rem/1.6 var(--sans)}
.pick {grid-template-columns:repeat(auto-fit,minmax(min(100%,250px),1fr))}
.pick button.hanji {border:1px solid #b8a98b;border-top:3px solid #8c9e87;background:#f1e8d7;box-shadow:none;border-radius:2px;padding:20px}
.pick button.hanji.star {border-top-color:var(--seal)}
.pick button.hanji:hover {box-shadow:inset 0 0 0 1px #8e734e}
.pick .what {font-size:1rem}
.doc.hanji {border-top:4px solid #9a6650}
@media(min-width:900px) {
  .sheet-sec:has(.faq)>.wrap {display:grid;grid-template-columns:1fr 1.65fr;align-items:start;gap:50px}
}
@media(max-width:900px) {
  .order {grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}
  #menu-sec .sec-head {display:block}
  #menu-sec .sec-head p {text-align:left;justify-self:start}
  .reading-categories {gap:9px}
  .topic-card {aspect-ratio:1.12}
  .topic-label {left:12px}
}
@media(max-width:660px) {
  .wrap {width:calc(100% - 36px)}
  .demo-bar {font-size:.76rem;padding:5px 10px}
  .top .wrap {min-height:56px;gap:3px}
  .brand {font-size:1.5rem;gap:7px}
  .brand i {width:27px;height:30px;font-size:1.07rem}
  .top nav {gap:2px}
  .top nav a {padding:6px;font-size:.84rem}
  .top nav a.hide-s {display:none}
  .top nav a.go {padding:5px 10px}
  .shrine-gate {min-height:0;display:block;--photo-height:min(66.667vw,400px)}
  .shrine-scene {width:100%;max-width:none;height:var(--photo-height);object-position:center 40%;mask-image:none}
  .shrine-gate::after {background:linear-gradient(to bottom,transparent 0,transparent calc(var(--photo-height) - 90px),#1a201b var(--photo-height),#1a201b 100%)}
  .shrine-intro {padding:calc(var(--photo-height) - 30px) 2px 29px}
  .shrine-copy {max-width:none}
  .shrine-copy h1 {font-size:clamp(2.8rem,10vw,4rem);margin:12px 0}
  .shrine-copy p {font-size:1rem;line-height:1.65}
  .shrine-actions {margin:20px 0 8px;gap:18px}
  .shrine-actions .btn {min-height:45px;padding:0 20px}
  .reading-categories {grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
  .topic-card {aspect-ratio:1.3}
  .topic-label {bottom:10px}
  .topic-label b {font-size:1.4rem}
  .topic-label small {font-size:.77rem}
  .topic-ink {right:8px;top:8px;font-size:.72rem}
  .reading-item {display:block;padding:18px 0}
  .reading-book {justify-content:space-between;margin-top:15px}
  .order,.vows {grid-template-columns:1fr}
  .order li {display:grid;grid-template-columns:28px 1fr;column-gap:10px}
  .order li::before {grid-row:span 2}
  .vow.hanji {padding:18px 0}
  .room .wrap {width:calc(100% - 26px)}
  .room .trail li {font-size:.77rem;padding:8px 1px}
  .shrine-host {min-height:215px;padding:18px 14px}
  .shrine-host::before {mask-image:linear-gradient(90deg,transparent,#000 35%);background-position:54% center}
  .host-copy {width:58%}
  .shrine-host .words {font-size:1.5rem}
  .shrine-host .words small {font-size:.86rem}
}
@media print { .shrine-host {display:none} }

/* 손님 자리에서 바라본 산통과 풀이 */
.room[data-stage="draw"] .shrine-host,
.room[data-stage="read"] .shrine-host { display:none; }
.ritual-scene,.reading-scene {
  display:grid;grid-template-columns:minmax(0,.84fr) minmax(0,1.16fr);
  grid-template-areas:"dialogue portrait";align-items:stretch;
  background:#25291f;border:1px solid #796744;border-radius:3px;overflow:hidden;
}
html:has(.ritual-scene) {scrollbar-gutter:stable}
.ritual-photo,.reader-photo {
  grid-area:portrait;align-self:start;display:block;width:100%;min-width:0;height:auto;aspect-ratio:3/2;
}
.ritual-photo[hidden] {display:none}
#s-draw,#s-read {animation:none}
.ritual-dialogue,.reader-dialogue {
  grid-area:dialogue;min-width:0;display:flex;flex-direction:column;align-items:flex-start;justify-content:center;
  padding:clamp(22px,3.5vw,56px);background:linear-gradient(110deg,#212a23,#30291f);
}
.ritual-dialogue h2,.reader-dialogue h2 {font:400 clamp(2.2rem,3.5vw,3.65rem)/1.2 var(--serif);color:#fff1d9;letter-spacing:-.04em;margin:19px 0 12px}
.ritual-dialogue p,.reader-dialogue p {font-size:clamp(1rem,1.35vw,1.2rem);line-height:1.7;color:#e6dbc9}
.ritual-dialogue .btn {margin-top:24px}
.ritual-dialogue .lot:not(:empty) {border-left:2px solid #a8804c;padding:3px 0 3px 14px;margin-top:18px}
.ritual-dialogue .lot .name {font:400 clamp(1.65rem,2.2vw,2.25rem)/1.25 var(--serif);color:#f2ce90}
.ritual-dialogue .lot .sub {font-size:.94rem;color:#e2d3b9;margin:4px 0 0}
.ritual-dialogue [hidden],.reader-actions [hidden],#s-read .more-row[hidden],#s-read .btn[hidden] {display:none}
.reading-scene {margin:0 0 clamp(24px,4vw,54px)}
.reader-actions {display:flex;align-items:center;flex-wrap:wrap;gap:14px 22px;margin-top:22px}
.reader-dialogue h2:focus {outline:none}
#paper .part {scroll-margin-top:24px}
@media(max-width:720px) {
  .ritual-scene,.reading-scene {grid-template-areas:"portrait" "dialogue";grid-template-columns:minmax(0,1fr)}
  .ritual-dialogue,.reader-dialogue {padding:21px 21px 25px}
  .ritual-dialogue h2,.reader-dialogue h2 {font-size:clamp(1.85rem,7.2vw,2.6rem);margin:12px 0 8px}
  .ritual-dialogue .btn {margin-top:17px}
  .ritual-dialogue .lot:not(:empty) {margin-top:12px}
  .ritual-dialogue .eyeline,.reader-dialogue .eyeline {letter-spacing:.09em}
  #s-read .scroll::before,#s-read .scroll::after {margin-inline:-4px}
}
@media(prefers-reduced-motion:reduce) {html {scroll-behavior:auto}}
@media print {.reading-scene {display:none}}

/* ── PDF 로 뜰 때만(2026-11-23) — 복사한 종이에 .pdf 가 붙는다. A4 안쪽 폭 760px 에 맞춘 배치 ───── */
.paper.pdf .part { margin-top: 0; padding-top: 22px; }
.paper.pdf .part > h3 { margin-bottom: 10px; }
.paper.pdf details.cand > summary::after, .paper.pdf .cand summary::after { display: none; }
.paper.pdf .names { grid-template-columns: 1fr 1fr; }
/* 풀이가 긴 이름 후보(글자 뜻 · 수리 · 소리)는 한 줄에 하나씩 넓게 — 카드가 낮아지고, 쪽 끝에서는 덩이 사이로 나눌 수 있다 */
.paper.pdf .names:has(.cand dl) { grid-template-columns: 1fr; gap: 10px; }
.paper.pdf .topics { grid-template-columns: 1fr 1fr; }
/* 그림 딸린 카드(네 시기 · 갈래별 점괘)는 한 줄에 하나씩 넓게 — 카드가 낮아져 쪽이 고르게 차고, 글줄도 길어 읽기 편하다 */
.paper.pdf .ages, .paper.pdf .topics:has(.jg-row) { grid-template-columns: 1fr; gap: 10px; }
.paper.pdf .age, .paper.pdf .topic { padding: 12px 16px; }
.paper.pdf .jg { margin-top: 10px; padding-top: 8px; }
.paper.pdf .bs-row { grid-template-columns: repeat(4, 1fr); }
.paper.pdf .jg-row { grid-template-columns: 104px 1fr; }
.paper.pdf .pic { cursor: default; box-shadow: none; }
/* 쪽 틀(js/keep.js layPages) — 화면 밖 작업대에 A4 쪽(840×1188, 여백 40)을 쌓아 풀이를 채워 넣는다 */
.pdf-stage { position: absolute; left: -20000px; top: 0; width: 840px; pointer-events: none; }
.pdf-page { width: 840px; height: 1188px; box-sizing: border-box; padding: 40px 40px 0; overflow: hidden; }
.pdf-page > .paper.pdf { display: flow-root; width: 760px; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; box-shadow: none; background: transparent; animation: none; }
.pdf-page .part.hidden-part { display: block !important; }
.paper.pdf > h2 { font-size: 30px; margin-top: 6px; }
/* 휴대폰에서 만들어도 PC 와 같은 쪽이 나오게 — 화면 폭을 따라 줄던 크기를 PDF 에서는 고정한다 */
.paper.pdf .pillar b { font-size: 38px; }
.paper.pdf .person b { font-size: 32px; }
.paper.pdf .score .n { font-size: 76px; }
.paper.pdf .jg-row { gap: 14px; }
.paper.pdf .cal-d { min-height: 54px; }
.paper.pdf .cal-d small { font-size: 10.5px; }
.paper.pdf > .who-line { font-size: 15px; }
.paper.pdf > .part:first-of-type { margin-top: 18px; }
/* 조금 좁힌 판 — 마지막 쪽에 몇 줄만 남을 때 한 번 더 짜 본다(글자 크기는 그대로, 줄 간격·여백만) */
.pdf-tight .paper.pdf .part { padding-top: 14px; }
.pdf-tight .paper.pdf .part p { margin-top: 7px; line-height: 1.72; }
.pdf-tight .paper.pdf .age p { margin-top: 6px; line-height: 1.68; }
.pdf-tight .paper.pdf .part h4.theme { margin-top: 16px; }
.pdf-tight .paper.pdf :is(.ages, .topics, .names, .months) { gap: 8px; }
.pdf-tight .paper.pdf :is(.age, .topic, .cand, .month) { padding-top: 9px; padding-bottom: 9px; }
.pdf-tight .paper.pdf .jg { margin-top: 7px; padding-top: 6px; }
.pdf-tight .paper.pdf .legal { margin-top: 16px; padding-top: 10px; font-size: 12px; line-height: 1.55; }
.pdf-tight .paper.pdf .seal-mark { width: 44px; height: 44px; margin-top: 8px; font-size: 21px; line-height: 38px; }
.pdf-tight .paper.pdf .part h3 { margin-bottom: 6px; }
/* 그래도 몇 줄이 남으면 본문 글자를 한 치 줄인 판(15px ≈ 10.7pt — 종이에서 읽기 넉넉한 크기)까지 해 본다 */
.pdf-small .paper.pdf .part :is(p, li) { font-size: 15px; line-height: 1.66; }
.pdf-small .paper.pdf .age p { font-size: 14.5px; }
/* 쪽을 넘어 이어지는 조각 — 대목은 위 줄을 걷고, 카드는 「이어서」를 단다 */
.paper.pdf > .part.pdf-cont { border-top: 0; padding-top: 0; }
.paper.pdf :is(.age, .topic, .cand, .month, .person).pdf-cont::before { content: '— 앞 쪽에서 이어서'; display: block; margin-bottom: 6px; font-size: 12px; color: var(--ink-soft); }
.paper.pdf :is(.age, .topic, .cand, .month, .person).pdf-cont[data-cont]::before { content: '— ' attr(data-cont) ' · 앞 쪽에서 이어서'; }

/* ── 이름 풀이 — 한자 이름으로 바꾸기(2026-11-23) ─────────────── */
#n-conv-box { margin-top: 8px; }
#n-conv-box[hidden], #n-hanja[hidden] { display: none; }
.conv-out .hint { margin-top: 10px; }
.conv-list { display: grid; gap: 8px; margin-top: 8px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }
.conv { display: grid; gap: 3px; text-align: left; padding: 10px 12px; border-radius: 8px; border: 1px solid rgba(120, 84, 30, .45);
  background: rgba(255, 255, 255, .4); color: var(--ink); font: inherit; cursor: pointer; }
.conv b { font-size: 19px; letter-spacing: .04em; }
.conv span { font-size: 13.5px; color: var(--ink-soft); }
.conv em { font-style: normal; justify-self: start; }
.conv.on { border-color: var(--jade-hi); box-shadow: 0 0 0 2px rgba(47, 132, 104, .35); }

/* 풀이 뒤 「두고두고 보시려면 천율 앱」 — 어두운 바탕이라 글을 한지 빛으로(2026-11-24) */
.to-app { border-color: var(--gold-deep); background: rgba(217, 178, 95, .07); }
.to-app h3 { color: var(--gold); }
.to-app p { color: var(--hanji); line-height: 1.75; }
.to-app .btn.ghost { color: var(--hanji); border-color: var(--hanji-2); }
/* 맛보기 잠금 — 앱 안내와 같은 빛, 테두리만 인주색 */
.taste-lock { border-color: var(--seal); background: rgba(164, 60, 50, .10); }
.taste-lock h3 { color: var(--gold); }
.taste-lock p { color: var(--hanji); line-height: 1.75; }
.taste-lock .btn.ghost { color: var(--hanji); border-color: var(--hanji-2); }
