/* 首頁 · 基於 tokens.css：紙面、冷調傳統色、宋體標題、小圓角加細線 */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body {
  margin: 0; color: var(--c-ink); font: var(--t-body)/1.85 var(--f-sans);
  background: var(--tex-paper), var(--c-paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, p, blockquote, dl, dd { margin: 0; }
h1, h2, h3, h4, h5 { font-family: var(--f-serif); font-weight: 500; text-wrap: balance; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid var(--c-daiqing); outline-offset: 3px; }
[hidden] { display: none !important; }
/* 版心 1200：1440 寬時左右各留 120；首屏和各模塊都按這個版心分兩欄（各一半，中間 48） */
.wrap { width: min(1200px, calc(100% - 64px)); margin-inline: auto; }
.skip { position: fixed; top: -100px; left: 12px; z-index: 100; background: var(--c-page); padding: 10px 14px; border: var(--border); }
.skip:focus { top: 12px; }

/* 通用元素 */
.label { font-size: var(--t-label); letter-spacing: .16em; color: var(--c-ink-3); }
/* 面包屑：次級頁面標題上方「首頁 / 當前頁」（古籍書架、生成我的命書） */
.crumb { display: flex; gap: 10px; margin-bottom: var(--s-6); font-size: 13px; color: var(--c-ink-3); }
.crumb a { transition: color .2s; }
.crumb a:hover { color: var(--c-ink); }
@media (max-width: 860px) { .crumb { margin-bottom: var(--s-5); } }
.page { background: var(--tex-paper), var(--c-page); border: var(--border); border-radius: var(--r-md); }
.btn { --px: 28px; display: inline-flex; align-items: center; border: 1px solid transparent; border-radius: var(--r-sm); padding: 12px var(--px); font-size: 15px; line-height: 1.5; white-space: nowrap; transition: background .2s, color .2s, border-color .2s, padding .25s var(--ease-out); }
/* 所有按鈕統一：懸停或聚焦時，文字右側滑出一個向右的箭頭；左右內邊距同步收窄，按鈕寬度不變 */
.btn::after { content: '→'; display: inline-block; width: 0; margin-left: 0; overflow: hidden; opacity: 0; transform: translateX(-6px); transition: width .25s var(--ease-out), margin .25s var(--ease-out), opacity .2s, transform .25s var(--ease-out); }
.btn:hover, .btn:focus-visible { padding-inline: calc(var(--px) - .5em - 3px); }
.btn:hover::after, .btn:focus-visible::after { width: 1em; margin-left: 6px; opacity: 1; transform: none; }
.btn-primary { background: var(--c-daiqing); color: var(--c-page); }
.btn-primary:hover { background: var(--c-daiqing-deep); }
.btn-sm { --px: 22px; padding-block: 8px; font-size: 13px; }
.link { color: var(--c-daiqing); font-size: 15px; border-bottom: 1px solid currentColor; padding-bottom: 2px; transition: color .2s; }
.link:hover { color: var(--c-ink); }
.draft { flex-shrink: 0; font-size: 12px; color: var(--c-ink-3); border: 1px dashed var(--c-line-strong); border-radius: var(--r-sm); padding: 3px 10px; }
.footnote { font-size: 12px; color: var(--c-ink-3); margin-top: var(--s-4); }

/* 頁頭 */
.header { position: sticky; top: 0; z-index: 10; background: var(--tex-paper), rgb(242 241 236 / .92); backdrop-filter: blur(14px); border-bottom: 1px solid var(--c-line); transition: border-color .3s, background-color .3s; }
/* 首頁頁頭（site.js 切換狀態）：首屏還在頁頭下面時不顯示分割線，滾過首屏後出現；右側的古籍書架入口和兩個按鈕一直顯示。
   在頁面最上方時去掉頁頭自己的底，直接透出首屏的紙面，兩層紙紋不會錯開 */
.header.on-hero { border-bottom-color: transparent; }
.header.on-hero.is-top { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.header-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: baseline; gap: 10px; font-family: var(--f-serif); font-size: 24px; letter-spacing: .12em; white-space: nowrap; }
.brand small { font-family: var(--f-num); font-size: 12px; letter-spacing: .08em; color: var(--c-ink-3); }
.nav { display: flex; align-items: center; gap: var(--s-6); font-size: var(--t-small); color: var(--c-ink-2); }
.nav a:not(.btn):hover { color: var(--c-ink); }
.nav-link { letter-spacing: .12em; white-space: nowrap; transition: color .2s; padding: 10px 6px; margin: 0 -6px; }   /* 字不動，可點的範圍上下左右各放出一圈，手機上手指好點 */
/* 窄屏手機上頁頭怎麼收緊，寫在文件後面「手機」那一段的後面（要排在它後面才蓋得住那裡的間距） */
.nav-link[aria-current="page"] { color: var(--c-ink); }
.nav-actions { display: flex; gap: var(--s-2); }
/* 語言開關「簡 | 繁」（發佈時 deploy/build_hant.py 生成）：細線方框兩格，當前語言那格黛青底白字、不可點；字比導航小一號，和欄目入口區分開 */
.lang-seg { display: inline-flex; flex: none; border: 1px solid var(--c-line-strong); border-radius: var(--r-sm); overflow: hidden; font: 12px/1 var(--f-sans); letter-spacing: 0; }
.lang-seg > * { display: grid; place-items: center; min-width: 26px; height: 24px; padding: 0 6px; color: var(--c-ink-2); text-decoration: none; transition: background-color .2s, color .2s; }
.lang-seg > * + * { border-left: 1px solid var(--c-line-strong); }
.lang-seg > a:hover { background: rgb(47 75 87 / .08); color: var(--c-ink); }
.lang-seg > [aria-current] { background: var(--c-daiqing); color: var(--c-page); }
.nav-sep { flex: none; width: 1px; height: 18px; margin: 0 -8px; background: var(--c-line-strong); }   /* 頁頭裡開關前面的細豎線：按鈕和語言分成兩組 */
.header-lang { margin-left: auto; }   /* 資料頁頁頭只有品牌：開關靠右 */
.nd-lang { margin: 0 4px 0 auto; }   /* 手機側邊欄：和「關閉」並排 */
.nd-lang > * { min-width: 34px; height: 30px; font-size: 13px; }   /* 手機上手指點，格子大一點 */
.rd-lang { align-self: center; margin-right: 6px; }   /* 古籍章節頁頂欄，「閱讀器」前 */
/* 手機頁頭：品牌 + 「查看示例」「生成命書」兩個短文案按鈕 + 漢堡圖標；古籍書架、價格和兩個主按鈕在右側側邊欄裡。桌面上不出現。
   按鈕裡同時寫長短兩版文案（.t-full / .t-short），手機上換成短的 */
.btn .t-short, .nav-burger { display: none; }
.nav-burger { place-items: center; width: 40px; height: 40px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--c-ink); cursor: pointer; -webkit-tap-highlight-color: transparent; }
.nav-burger svg, .nd-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.4; stroke-linecap: round; }
/* 側邊欄：從右邊滑出，紙色底；上面菜單二字和關閉，中間古籍書架、價格，主按鈕壓在底部。點遮罩、點鏈接、按 Esc 收起（nav-menu.js） */
.nav-drawer { position: fixed; inset: 0 0 0 auto; width: min(320px, 86vw); height: 100%; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; border-left: 1px solid var(--c-line); background: var(--tex-paper), var(--c-paper, #f2f1ec); color: var(--c-ink); }
.nav-drawer::backdrop { background: rgb(20 24 26 / .32); }
.nav-drawer[open] { animation: nd-in .3s var(--ease-out); }
.nav-drawer[open]::backdrop { animation: nd-fade .3s; }
@keyframes nd-in { from { transform: translateX(100%); } }
@keyframes nd-fade { from { opacity: 0; } }
html:has(.nav-drawer[open]) { overflow: hidden; }   /* 側邊欄開著的時候底下的頁面不跟著滾 */
.nd-inner { display: flex; flex-direction: column; height: 100%; padding: 0 20px calc(24px + env(safe-area-inset-bottom)); }
.nd-head { display: flex; align-items: center; justify-content: space-between; height: 60px; border-bottom: 1px solid var(--c-line); }
.nd-title { font-size: 13px; letter-spacing: .3em; color: var(--c-ink-3); }
.nd-close { display: grid; place-items: center; width: 40px; height: 40px; margin-right: -10px; padding: 0; border: 0; background: none; color: var(--c-ink-2); cursor: pointer; }
.nd-links a { display: flex; align-items: center; justify-content: space-between; min-height: 58px; border-bottom: 1px solid var(--c-line); font: 400 18px/1.4 var(--f-serif); letter-spacing: .08em; color: var(--c-ink); }
.nd-links a[aria-current="page"] { color: var(--c-daiqing); }
.nd-links a[aria-current="page"]::after { content: '當前'; font: 12px var(--f-sans); letter-spacing: .1em; color: var(--c-ink-3); }
.nd-actions { display: grid; gap: var(--s-3); margin-top: auto; }
.nd-actions .btn { justify-content: center; }
@media (prefers-reduced-motion: reduce) { .nav-drawer[open], .nav-drawer[open]::backdrop { animation: none; } }

/* 區塊 */
.section { padding-top: 120px; }
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-6); padding-bottom: var(--s-5); margin-bottom: var(--s-7); border-bottom: 1px solid var(--c-ink); }
.section-head h2 { font-size: var(--t-h2); line-height: 1.45; }
.section-intro { margin-top: var(--s-3); color: var(--c-ink-2); font-size: 15px; }

/* 印刷細節：編號小標題、裁切角標（參考 Antimetal 的工程圖細節，換成書頁的語境） */
/* 編號小標題：標題上方一行小字，「編號 — 模塊名」 */
.sec-no { display: flex; align-items: center; gap: 12px; margin-bottom: var(--s-5); font-size: 13px; line-height: 1; letter-spacing: .18em; color: var(--c-ink-3); }
.sec-no b { display: flex; align-items: center; gap: 12px; font: 400 14px/1 var(--f-num); letter-spacing: .04em; color: var(--c-ink); }
.sec-no b::after { content: ''; width: 28px; height: 1px; background: var(--c-line-strong); }
.questions-section .section-head { flex-direction: column; align-items: center; }
/* 裁切角標：卡片四角外各有一對短線，像印刷品的裁切線；--cm 是線長，--co 是離卡片的距離。
   只用在「命書節選」：多流派模塊的小標題吸附在卡片上方，角標會從小標題兩側露出來 */
#sample .report-page::before { --cm: 12px; --co: 18px; --cc: var(--c-ink-3); content: ''; position: absolute; inset: calc(-1 * var(--co)); pointer-events: none;
  background:
    linear-gradient(var(--cc) 0 0) left 0 top var(--co) / var(--cm) 1px, linear-gradient(var(--cc) 0 0) left var(--co) top 0 / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) right 0 top var(--co) / var(--cm) 1px, linear-gradient(var(--cc) 0 0) right var(--co) top 0 / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) left 0 bottom var(--co) / var(--cm) 1px, linear-gradient(var(--cc) 0 0) left var(--co) bottom 0 / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) right 0 bottom var(--co) / var(--cm) 1px, linear-gradient(var(--cc) 0 0) right var(--co) bottom 0 / 1px var(--cm);
  background-repeat: no-repeat; }
@media (max-width: 720px) { #sample .report-page::before { --cm: 8px; --co: 11px; } } /* 手機兩側只留 16px，角標收短、貼近 */

/* 01 · Hero：居中文案，下方是一本正在展開的書 */
.hero { padding-top: 64px; overflow: hidden; }
.hero h1 span { display: inline-block; }
.hero-copy { text-align: center; }
.hero h1 { font-size: clamp(34px, 4.4vw, 60px); line-height: 1.3; letter-spacing: .02em; }
.lead { margin: var(--s-5) auto 0; font-size: 19px; line-height: 1.9; color: var(--c-ink-2); }
.hero-actions { display: flex; justify-content: center; gap: var(--s-3); margin-top: var(--s-6); }
.hero-actions .btn { flex: 0 1 196px; justify-content: center; padding-block: 13px; font-size: 15px; }
/* 次按鈕：不畫整圈描邊，只在四角畫直角短線，底下墊一層極淡的墨色，讓按鈕的範圍看得出來；懸停時角線變長 */
@property --cm { syntax: '<length>'; inherits: false; initial-value: 8px; }
.btn-ghost { --cm: 8px; --cc: var(--c-ink); color: var(--c-ink);
  background:
    linear-gradient(var(--cc) 0 0) left top / var(--cm) 1px, linear-gradient(var(--cc) 0 0) left top / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) right top / var(--cm) 1px, linear-gradient(var(--cc) 0 0) right top / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) left bottom / var(--cm) 1px, linear-gradient(var(--cc) 0 0) left bottom / 1px var(--cm),
    linear-gradient(var(--cc) 0 0) right bottom / var(--cm) 1px, linear-gradient(var(--cc) 0 0) right bottom / 1px var(--cm),
    rgb(30 36 37 / .04);
  background-repeat: no-repeat; transition: background-color .2s, color .2s, padding .25s var(--ease-out), --cm .25s var(--ease-out); }
.btn-ghost:hover { --cm: 14px; --cc: var(--c-daiqing); color: var(--c-daiqing); background-color: rgb(47 75 87 / .07); }
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-4) var(--s-6); margin-top: var(--s-7); }

/* 書：參照誠品講堂海報。中間是書脊，兩側各 13 張半透明書頁。
   每頁是梯形：書脊處矮、外側高，頂尖齊平並均勻排開，疊得越多越深。
   右側是平滑色面，左側是顆粒，越靠近書脊越散。 */
.book-stage { --book-h: 1180px; --book-rise: 27%; --book-gap: 14px; --fade-end: 72%; position: relative; width: min(1040px, 100%); height: clamp(420px, 50vw, 720px); margin: var(--s-8) auto 0; overflow: hidden;
  /* 下半部分緩緩淡出：前段慢、後段快。到問題模塊標題的中線（--fade-end）時完全消失。 */
  -webkit-mask-image: linear-gradient(to bottom, #000 calc(var(--fade-end) - 38%), rgb(0 0 0 / .86) calc(var(--fade-end) - 30%), rgb(0 0 0 / .62) calc(var(--fade-end) - 22%), rgb(0 0 0 / .36) calc(var(--fade-end) - 14%), rgb(0 0 0 / .14) calc(var(--fade-end) - 7%), transparent var(--fade-end)); mask-image: linear-gradient(to bottom, #000 calc(var(--fade-end) - 38%), rgb(0 0 0 / .86) calc(var(--fade-end) - 30%), rgb(0 0 0 / .62) calc(var(--fade-end) - 22%), rgb(0 0 0 / .36) calc(var(--fade-end) - 14%), rgb(0 0 0 / .14) calc(var(--fade-end) - 7%), transparent var(--fade-end)); }
.book { position: absolute; left: 0; right: 0; top: 0; height: var(--book-h); }
.spine { position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; margin-left: -.5px; background: var(--c-ink-3); opacity: .55; }
/* 書頁由 site.js 按實際尺寸畫成 SVG：上下邊是從書脊拱起再放平的弧線，外側邊緣略微外鼓。 */
.book-svg { position: absolute; inset: 0; overflow: visible; }
.book .sd { transition: transform 1.6s var(--ease-in-out); }
.book .sd.r { transform: scaleX(calc(1 + var(--lean, 0) * .08)); }
.book .sd.l { transform: scaleX(calc(1 - var(--lean, 0) * .08)); }
.pg { transform: scaleX(0); transition: transform 2.3s var(--ease-in-out) calc(var(--i) * 60ms); }
.book.is-open .pg { transform: scaleX(1); }
.pg-in { animation: leaf-breathe 6s ease-in-out calc(var(--i) * -.45s) infinite alternate; animation-play-state: paused; }
.book.is-open .pg-in { animation-play-state: running; }
@keyframes leaf-breathe { from { transform: scaleX(1); } to { transform: scaleX(.975); } }

/* 進場：屏幕中央一條短線落下、拉長成書脊，書頁隨之展開，文字由模糊漸顯。 */
.intro .header, .intro .hero-copy > * { opacity: 0; filter: blur(14px); transform: translateY(14px); }
.intro .spine { opacity: 0; }
.intro main > section:not(.hero), .intro .footer { opacity: 0; }
/* 書頁基本展開後，下面的模塊才淡入 */
.intro.intro-go main > section:not(.hero), .intro.intro-go .footer { opacity: 1; transition: opacity 1.4s var(--ease-in-out) 2.1s; }
.intro.intro-spine .spine { opacity: .55; }
.intro.intro-go .header, .intro.intro-go .hero-copy > * { opacity: 1; filter: blur(0); transform: none;
  transition: opacity 1.5s var(--ease-in-out), filter 1.5s var(--ease-in-out), transform 1.5s var(--ease-in-out); }
.intro.intro-go .hero-copy > :nth-child(2) { transition-delay: .15s; }
.intro.intro-go .hero-copy > :nth-child(3) { transition-delay: .3s; }
.intro.intro-go .header { transition-delay: .5s; }
.intro-line-layer { position: absolute; left: 0; right: 0; top: 0; z-index: 5; pointer-events: none; }
.intro-line { position: absolute; top: 0; left: 50%; width: 1px; height: 56px; margin-left: -.5px; background: var(--c-ink-3); transform-origin: 50% 0; pointer-events: none; opacity: 0; }

/* 02 · 問題球：卡片排在緩慢轉動的橢球面上，始終正對觀眾；前排大而清晰，後排小、淡、微模糊。
   中心點與放射線只作背景。 */
/* 標題上移，疊在書本淡出的尾部；居中對齊下方的問題球，不要分割線。 */
.questions-section { position: relative; z-index: 1; padding-top: 0; margin-top: calc(clamp(420px, 50vw, 720px) * -.3); overflow-x: clip; }   /* 問題球轉到兩側的卡片會伸出屏幕，只裁左右，避免橫向滾動條 */
.questions-section .section-head { justify-content: center; text-align: center; border-bottom: 0; padding-bottom: 0; margin-bottom: var(--s-4); }
.q-orb { position: relative; height: clamp(460px, 48vw, 640px); cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.q-orb.is-dragging { cursor: grabbing; }
.q-canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.q-items { position: absolute; inset: 0; margin: 0; padding: 0; list-style: none; }
.q-item { position: absolute; left: 0; top: 0; display: grid; gap: 2px; padding: 10px 16px 11px; white-space: nowrap;
  background: var(--tex-paper), var(--c-page); border: 1px solid var(--c-line); border-radius: var(--r-md);
  transform-origin: 50% 50%; will-change: transform, opacity; pointer-events: none; transition: box-shadow .4s, border-color .4s; }
/* 前排的卡片描邊加深，和後排拉開；層次靠線，不用投影 */
.q-item.is-front { border-color: var(--c-line-strong); }
.q-item .q-cat { font-size: 11px; letter-spacing: .16em; color: var(--c-ink-3); }
.q-item .q-text { font-family: var(--f-serif); font-size: 17px; line-height: 1.5; color: var(--c-ink); }
.q-orb.is-js .q-item { visibility: hidden; }
.q-orb.is-ready .q-item { visibility: visible; }
/* 沒有腳本時退回為平鋪的卡片列表 */
.q-orb:not(.is-js) { height: auto; }
.q-orb:not(.is-js) .q-items { position: static; display: flex; flex-wrap: wrap; gap: var(--s-3); }
.q-orb:not(.is-js) .q-item { position: static; }

/* 03 · 名人主題 */
/* 左欄：標題與主題目錄；右欄：內容卡片，每張卡片底部是完整案例的入口。 */
.preview-layout { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.preview-side { position: sticky; top: calc(72px + var(--s-6)); }
.preview-side h2 { font-size: var(--t-h2); line-height: 1.45; margin-bottom: var(--s-7); }
.tabs { display: flex; flex-direction: column; border-top: var(--border); }
.tabs a { position: relative; display: flex; align-items: baseline; gap: var(--s-4); padding: var(--s-4) 0 var(--s-4) var(--s-4); border: 0; border-bottom: var(--border); background: none; text-align: left; font-size: 15px; color: var(--c-ink-2); transition: color .2s, padding .3s; }
.tabs a::before { content: ''; position: absolute; left: 0; top: 50%; width: 2px; height: 0; background: var(--c-ink); transform: translateY(-50%); transition: height .3s; }
.tabs a:hover { color: var(--c-ink); }
.tabs a[aria-current="true"] { color: var(--c-ink); font-weight: 500; padding-left: var(--s-5); }
.tabs a[aria-current="true"]::before { height: 60%; }
/* 命書節選、多流派對照自動輪播（site.js 加 .is-autoplay）：當前那一章左邊的細線變成進度——淺色的底，深色從上往下走滿 */
.is-autoplay .tabs a[aria-current="true"]::before { background: var(--c-line-strong); }
.is-autoplay .tabs a::after { content: ''; position: absolute; left: 0; top: 20%; width: 2px; height: 60%; background: var(--c-ink); transform: scaleY(var(--p, 0)); transform-origin: 50% 0; opacity: 0; }
.is-autoplay .tabs a[aria-current="true"]::after { opacity: 1; }
.tab-no { font-family: var(--f-num); font-size: 13px; font-weight: 400; color: var(--c-ink-3); }
/* 左欄底部唯一的入口，跟著目錄一起吸附 */
.side-cta { margin-top: var(--s-6); }
.tabs a[aria-current="true"] .tab-no { color: var(--c-ink); }
/* 命書節選：一頁從命書裡截下來的紙。頁眉、生辰、結論，六路視角逐行對照，下沿漸隱，按鈕壓在漸隱處。 */
/* 每一頁一種中國傳統色做主色：黛青、蒼綠、藕荷、赭石。「凶」統一用硃砂。 */
.hue-self, .tabs a[data-target="sample-self"] { --hue: #2f4b57; --hue-deep: #223a44; --hue-soft: #dfe8e8; }
.hue-work, .tabs a[data-target="sample-work"] { --hue: #3d5c48; --hue-deep: #2c4535; --hue-soft: #e1e9e0; }
.hue-family, .tabs a[data-target="sample-family"] { --hue: #6b4d5c; --hue-deep: #533a47; --hue-soft: #ede4e7; }
.hue-years, .tabs a[data-target="sample-years"] { --hue: #7a5634; --hue-deep: #5e4127; --hue-soft: #efe7da; }
/* 右側四頁從上到下排開；左側目錄吸附，並隨滾動高亮當前這一頁 */
.sample-panels { display: grid; gap: var(--s-7); }
/* 疊卡：讀完的一頁停住，下一頁蓋上來，上一頁縮小、變模糊，退到後面 */
.sample-panels.is-stacked .report-page { position: sticky; will-change: transform, filter, opacity; }
/* 目錄翻頁（2026-10-15 起，site.js 加 .is-paged）：左右分欄不變——左邊標題和目錄，右邊一次只放一篇，
   點目錄、卡片下方的橫槓或左右箭頭換頁。寬屏：卡片裡再分左右兩欄，一篇整張在一屏裡放得下（不折疊）。
   窄屏：兩欄疊成一欄，放不下的部分折起來（底部漸隱 +「展開全文」） */
.sample-panels.is-paged { display: block; }
.sample-panels.is-paged .report-page[hidden] { display: none; }
.is-paged .rp-body { position: relative; display: flex; flex-direction: column; min-height: 0; }
.rp-expand { display: none; }
.is-paged .rp-more { display: none; }   /* 「細看」只是一段被遮住的預告，完整內容由「查看完整命書案例」承接 */
/* 疊加：當前這頁下面墊著幾層紙，從卡片下沿錯開露出來——一眼看出還有幾頁；翻到最後一頁就沒有了。
   卡片外沿的角標在疊起來的紙邊上會顯得亂，翻頁模式裡不畫 */
.sp-deck { position: relative; isolation: isolate; margin-bottom: 24px; }   /* 下沿留出墊著的紙邊 */
.sp-deck::before, .sp-deck::after { content: ''; position: absolute; inset: 0; z-index: -1; border: var(--border); border-radius: var(--r-md);
  background: color-mix(in srgb, var(--c-page) 94%, var(--c-ink)); transform-origin: 50% 100%; transition: opacity .3s; }
.sp-deck::before { transform: translateY(12px) scaleX(.965); }
.sp-deck::after { z-index: -2; transform: translateY(24px) scaleX(.93); background: color-mix(in srgb, var(--c-page) 88%, var(--c-ink)); }
.sp-deck[data-left="1"]::after, .sp-deck[data-left="0"]::before, .sp-deck[data-left="0"]::after { opacity: 0; }
.is-paged .report-page { z-index: 1; }
#sample .is-paged .report-page::before { display: none; }
/* 多流派對照：每一步的小標題挪進了卡片頂上，當頁眉用，不再吸附 */
.is-paged .mc-step-head { position: static; padding: 0 0 var(--s-3); background: none; border-bottom: var(--border); }
#sample .rp-verdicts { display: none; }   /* 2026-10-15 先拿掉各流派的吉凶判斷這一行（總評印章 + 六路標籤），標記還留在 HTML 裡，要加回來刪掉這一行即可 */

@media (min-width: 861px) {
  /* 左右分欄不變：左邊標題、目錄、按鈕，右邊一次一篇；卡片一屏放得下，左欄不用再吸附 */
  .preview-layout:has(.is-paged) .preview-side { position: static; }
  /* 一屏放得下：卡片裡各塊之間的距離收一點（24 → 16） */
  .is-paged .report-page { padding-block: 20px; }
  .is-paged :is(.rp-person, .rp-couple, .rp-verdicts, .rp-portrait) { margin-top: var(--s-4); }
  .is-paged .rp-verdicts { padding-block: var(--s-3); }
  /* 總評印章小一號（原來字 26、內邊距 16/24），這一行不再那麼高 */
  .is-paged .rp-stamp.vf { gap: 4px; padding: 10px 16px 11px calc(16px + var(--ls)); font-size: 20px; }
  .is-paged .rp-stamp span { font-size: 10px; }
  /* 事業篇、走勢篇的總評橫跨整張卡片：段落最多兩行，後面用省略號（完整內容在「查看完整命書案例」） */
  .is-paged .rp-body > .rp-portrait { padding-block: var(--s-4); }
  .is-paged .rp-body > .rp-portrait p { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: var(--s-2); }
  /* 半欄裡的財富塊：總數和分階段上下排，小注省掉；走勢圖矮一點 */
  .is-paged .rp-col .rp-wealth { grid-template-columns: 1fr; gap: var(--s-3); padding: var(--s-4); }
  .is-paged .rp-col :is(.rp-wealth-basis, .rp-wealth-note) { display: none; }
  .is-paged .rp-col .rp-life { padding: var(--s-3) var(--s-4) var(--s-2); }
  .is-paged .rp-col .rp-life-plot { height: 190px; }
  .is-paged .rp-col .lc-axis-labels span { font-size: 0; }   /* 半欄裡六步運擠不下，只留運名；年齡在右邊的階段詳解裡 */
  .is-paged .rp-col .lc-axis-labels b { font-size: 12px; }
  /* 卡片下半截左右並排，一樣寬；窄欄里長處、短板上下排 */
  .is-paged .rp-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: var(--s-6); align-items: start; margin-top: var(--s-4); }
  .is-paged .rp-col > * { margin-top: 0; }
  .is-paged .rp-col .rp-notes { grid-template-columns: 1fr; gap: var(--s-3); margin: 0; }
  .is-paged .rp-col .rp-notes .rp-one { padding-top: var(--s-3); }
  /* 走勢篇：四步大運在走勢圖右邊豎排，只留年齡、運、標題和吉凶，段落和年份省掉 */
  .is-paged .rp-col .rp-stages ol { margin-top: var(--s-2); }
  .is-paged .rp-col .rp-stages li { display: block; padding: 6px 0; }
  .is-paged .st-age { display: flex; align-items: baseline; gap: var(--s-2); }
  .is-paged .st-age b { display: inline; font-size: 15px; }
  .is-paged .st-age span { font-size: 12px; }
  .is-paged .st-body > p:nth-child(2), .is-paged .st-years { display: none; }
  .is-paged .st-title { flex-wrap: wrap; justify-content: flex-start; gap: var(--s-2); margin-top: 2px; font-size: 14px; }
}
@media (max-width: 860px) {
  .is-paged .rp-col > * + * { margin-top: var(--s-5); }
  .sample-panels.is-paged { --sp-h: clamp(520px, calc(100svh - 220px), 680px); }   /* 手機上至少露出總評的標題 */
  .is-paged .report-page:not(.is-open) .rp-body { max-height: var(--sp-h); overflow: hidden; }
  .is-paged .report-page.is-clipped:not(.is-open) .rp-body::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 150px; pointer-events: none;
    background: linear-gradient(to bottom, color-mix(in srgb, var(--c-page) 0%, transparent), var(--c-page) 82%); }
  .is-paged .report-page.is-clipped .rp-expand { position: relative; z-index: 1; display: inline-flex; align-items: center; align-self: center; margin-top: -18px; padding: 7px 18px;
    border: var(--border); border-radius: 999px; background: var(--c-page); font-size: 13px; letter-spacing: .08em; color: var(--c-ink-2); cursor: pointer; }
  .is-paged .report-page.is-open .rp-expand { margin-top: var(--s-4); }
}
.report-page { scroll-margin-top: calc(72px + var(--s-6) - 88px); } /* 與 html 的 scroll-padding-top 疊加後，卡片頂與左欄對齊 */
.report-page { position: relative; display: flex; flex-direction: column; padding: var(--s-5) var(--s-6) var(--s-5); background: var(--tex-paper), var(--c-page); border: var(--border); border-radius: var(--r-md); }
.rp-head b { font-weight: 500; color: var(--c-ink-2); }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); padding-bottom: var(--s-3); border-bottom: var(--border); font-size: 12px; letter-spacing: .12em; color: var(--c-ink-3); }
/* 同一本命書的後幾章：頁眉右邊一個小頭像，表明說的都是同一個人（頭像和四柱只在第一章完整出現） */
.rp-head-avatar { flex: none; width: 28px; height: 28px; margin: -6px 0; border-radius: 50%; object-fit: cover; object-position: 50% 18%; border: var(--border); }
/* 人物：頭像、名字與生辰、八字四柱 */
.rp-person { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: var(--s-5); margin-top: var(--s-5); }
/* 同一本命書的後幾章：人物只留一行（姓名 + 八字），頭像和四柱只在第一章完整出現 */
.rp-person.is-compact { display: flex; align-items: baseline; gap: var(--s-3); }
.rp-person.is-compact h3 { font-size: 18px; }
.rp-person.is-compact p { font-size: 13px; letter-spacing: .1em; color: var(--c-ink-3); }
.rp-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; background: var(--tex-paper), var(--hue-soft); color: var(--hue); font: 32px/1 var(--f-serif); overflow: hidden; }
.rp-avatar img { width: 100%; height: 100%; object-fit: cover; }
/* 畫像頭像：豎向橢圓，放得下頭和肩 */
.rp-avatar.is-photo { width: 72px; height: 90px; }
.rp-id h3 { font-size: 32px; line-height: 1.3; letter-spacing: .06em; }
.rp-id p { margin-top: var(--s-1); font-family: var(--f-serif); font-size: 14px; color: var(--c-ink-2); }
.rp-aside { display: block; font-family: var(--f-sans); font-size: 12px; color: var(--c-ink-3); }
.rp-pillars { display: grid; grid-template-columns: repeat(4, 38px); gap: 6px; }
.rp-pillar { display: grid; justify-items: center; gap: 2px; padding: 6px 0 8px; border: var(--border); border-radius: var(--r-sm); background: var(--c-paper); }
.rp-pillar span { font-size: 11px; color: var(--c-ink-3); }
.rp-pillar b { font: 500 20px/1.25 var(--f-serif); color: var(--c-ink); }
.rp-pillar.is-unknown b { color: var(--c-ink-3); }
/* 主體：命書裡的畫像 */
.rp-portrait { margin-top: var(--s-5); padding: var(--s-5) var(--s-5) var(--s-5); background: var(--hue-soft); border-radius: var(--r-md); }
.rp-portrait h4 { font-size: 22px; font-weight: 600; line-height: 1.55; color: var(--hue-deep); }
.rp-portrait p { margin-top: var(--s-3); font-size: 15px; line-height: 1.95; color: var(--c-ink); }
.rp-notes { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4) var(--s-6); margin: var(--s-5) 0 var(--s-5); }
.rp-notes dt { font-size: 14px; font-weight: 600; color: var(--c-ink); }
.rp-notes dd { margin: var(--s-1) 0 0; font-size: 14px; line-height: 1.85; color: var(--c-ink-2); }
.rp-notes .rp-one { grid-column: 1 / -1; padding-top: var(--s-4); border-top: var(--border); }
/* 多流派結論條：籤式的綜合結論 + 六路各自的結論 */
.rp-verdicts { display: flex; align-items: center; gap: var(--s-6); margin-top: var(--s-5); padding: var(--s-4) 0; border-top: var(--border); border-bottom: var(--border); }
.rp-stamp.vf { display: grid; justify-items: center; gap: 6px; flex-shrink: 0; padding: 16px 24px 17px calc(24px + var(--ls)); font: 600 26px/1 var(--f-serif); }
.rp-stamp span { font: 400 11px/1.2 var(--f-serif); letter-spacing: .4em; margin-right: -.4em; }
.rp-stamp b { position: relative; font-weight: inherit; }
.rp-stamp span { position: relative; }
.rp-verdicts ul { flex: 1; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-3) var(--s-2); margin: 0; padding: 0; list-style: none; }
.rp-verdicts li { display: grid; justify-items: center; gap: 4px; min-width: 44px; }
.rp-verdicts li b { padding: 7px 13px 7px calc(13px + var(--ls)); font: 600 15px/1 var(--f-serif); }
/* 吉凶：三種顏色只表示方向（吉硃砂、平菸灰、凶墨），大小由字面區分；字重統一 */
.v-daji, .v-ji { --v: var(--c-zhusha); }
.v-ping { --v: var(--c-ink-3); }
.v-xiong, .v-daxiong { --v: var(--c-xiong); }
.v-none { --v: #a3a9a6; }
/* 吉凶邊框：委角雙線，細而淡，只做襯托，文字在前 */
/* 文字居中：行高取 1，左側補回字間距，避免最後一個字後的空白把文字擠向左邊 */
.vf { --ls: .1em; position: relative; display: inline-flex; align-items: center; justify-content: center; color: var(--v); font-weight: 600; line-height: 1; letter-spacing: var(--ls); white-space: nowrap; }
.vf-frame { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; fill: none; stroke: currentColor; stroke-width: 1; opacity: .4; pointer-events: none; }
/* 流派：統一用淡墨，靠圖標形狀區分 */
.s-tag { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; line-height: 1.4; color: var(--c-ink-2); white-space: nowrap; }
.s-icon { width: 14px; height: 14px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.1; stroke-linecap: round; stroke-linejoin: round; opacity: .7; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.rp-more { position: relative; margin-top: auto; padding-top: var(--s-4); border-top: var(--border); }
.rp-more-text { max-height: 120px; overflow: hidden; -webkit-mask-image: linear-gradient(to bottom, #000 15%, transparent 88%); mask-image: linear-gradient(to bottom, #000 15%, transparent 88%); }
.rp-more-text h5 { font-size: 15px; font-weight: 600; color: var(--c-ink); }
.rp-more-text p { margin-top: var(--s-2); font-size: 14px; line-height: 1.95; color: var(--c-ink-2); }
/* 財富總量（曾國藩頁）：當時貨幣的總數、摺合人民幣，以及分階段的積累 */
.rp-wealth { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: var(--s-3) var(--s-6); margin-top: var(--s-5); padding: var(--s-5); border: var(--border); border-radius: var(--r-md); }
.rp-label { font-size: 12px; letter-spacing: .14em; color: var(--c-ink-3); }
.rp-wealth-num { margin-top: var(--s-2); font-family: var(--f-serif); font-size: 18px; color: var(--c-ink); }
.rp-wealth-num b { font: 500 44px/1.1 var(--f-num); color: var(--c-ink); margin: 0 4px; }
.rp-wealth-num.is-text { font-size: 15px; color: var(--c-ink-2); }
.rp-wealth-num.is-text b { display: block; margin: 0 0 2px; font: 500 26px/1.3 var(--f-serif); }   /* 財運用一句話概括（不寫具體數額） */
.rp-wealth-rmb { margin-top: var(--s-2); font-size: 15px; color: var(--c-ink-2); }
.rp-wealth-rmb b { font: 500 20px var(--f-num); color: var(--c-ink); }
.rp-wealth-basis { margin-top: var(--s-1); font-size: 12px; color: var(--c-ink-3); }
.rp-wealth-stages { align-self: center; display: grid; gap: var(--s-3); margin: 0; padding: 0; list-style: none; }
.rp-wealth-stages li { display: grid; grid-template-columns: 116px minmax(0, 1fr) 72px; align-items: center; gap: var(--s-3); font-size: 13px; color: var(--c-ink-2); }
.rp-wealth-stages i { display: block; height: 8px; border-radius: 1px; background: linear-gradient(to right, var(--hue) var(--w), color-mix(in srgb, var(--hue) 12%, transparent) var(--w)); }
.rp-wealth-stages b { font: 500 13px var(--f-num); color: var(--c-ink); text-align: right; }
.rp-wealth-note { grid-column: 1 / -1; padding-top: var(--s-3); border-top: var(--border); font-size: 14px; color: var(--c-ink-2); }
/* 合盤（婚姻頁）：兩人並排，中間標出兩張盤的關鍵呼應 */
.rp-couple { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: end; gap: var(--s-4); margin-top: var(--s-5); }
.rp-mate { display: grid; gap: var(--s-4); }
.rp-mate:last-child { justify-items: end; text-align: right; }
.rp-mate:last-child .rp-mate-id { flex-direction: row-reverse; }
.rp-mate-id { display: flex; align-items: center; gap: var(--s-4); }
.is-couple .rp-avatar { width: 60px; height: 60px; font-size: 26px; }
.is-couple .rp-id h3 { font-size: 26px; }
.is-couple .rp-id p { font-size: 13px; }
.is-couple .rp-pillar.is-day { border-color: var(--hue); background: var(--hue-soft); }
.rp-bond { display: grid; grid-template-columns: 1fr auto 1fr; grid-template-rows: auto auto; align-items: center; column-gap: var(--s-2); padding-bottom: 14px; color: var(--c-ink-2); text-align: center; }
.rp-bond i { grid-row: 1; height: 1px; width: 28px; background: var(--c-line-strong); }
.rp-bond b { grid-row: 1; font: 500 18px/1.2 var(--f-serif); letter-spacing: .08em; padding: 4px 10px; border: var(--border-strong); border-radius: var(--r-sm); background: var(--c-page); color: var(--c-ink); }
.rp-bond span { grid-column: 1 / -1; margin-top: 6px; font-size: 11px; line-height: 1.5; color: var(--c-ink-3); }

/* 人生走勢（王陽明頁）：大運底帶、參考線、漸變面積、關鍵流年節點與懸停詳情 */
.rp-life { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-5) var(--s-3); border: var(--border); border-radius: var(--r-md); }
.rp-life-head { display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); margin-bottom: var(--s-4); }
.rp-life-key { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--c-ink-3); }
.rp-life-key i { width: 9px; height: 9px; border-radius: 50%; background: var(--hue); }
.rp-life-key i.is-minor { width: 7px; height: 7px; background: var(--c-page); border: 1.5px solid var(--hue); }
.rp-life-plot { position: relative; height: 240px; margin-left: 22px; }
.lc-svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.lc-bands .b-odd { fill: color-mix(in srgb, var(--hue) 7%, transparent); }
.lc-bands .b-even { fill: transparent; }
.lc-grid path { fill: none; stroke: color-mix(in srgb, var(--hue) 16%, transparent); stroke-width: 1; stroke-dasharray: 2 4; vector-effect: non-scaling-stroke; }
.lc-grid .lc-axis { stroke: color-mix(in srgb, var(--hue) 45%, transparent); stroke-dasharray: none; }
.lc-fill-top { stop-color: var(--hue); stop-opacity: .22; }
.lc-fill-bottom { stop-color: var(--hue); stop-opacity: 0; }
.lc-area { fill: url(#lc-fill); }
.lc-line { fill: none; stroke: var(--hue); stroke-width: 2; stroke-linejoin: round; vector-effect: non-scaling-stroke; }
.lc-y { position: absolute; left: -22px; transform: translateY(-50%); font-size: 11px; color: var(--c-ink-3); }
.lc-nodes { position: absolute; inset: 0; }
.lc-node { position: absolute; width: 0; height: 0; outline: none; }
.lc-node > i { position: absolute; left: -4px; top: -4px; width: 8px; height: 8px; border-radius: 50%; background: var(--c-page); border: 1.5px solid var(--hue); transition: transform .2s var(--ease-out); }
.lc-node.is-major > i { left: -5.5px; top: -5.5px; width: 11px; height: 11px; background: var(--hue); border: 2px solid var(--c-page); box-shadow: 0 0 0 1px var(--hue); }
.lc-node::after { content: ''; position: absolute; left: -12px; top: -12px; width: 24px; height: 24px; cursor: pointer; }
.lc-tag { position: absolute; left: 0; transform: translateX(-50%); font-style: normal; font-size: 12px; line-height: 1.3; white-space: nowrap; color: var(--c-ink-2); pointer-events: none; }
.lc-tag.lc-t { bottom: 12px; }
.lc-tag.lc-b { top: 12px; }
.lc-year { font: 12px var(--f-serif); color: var(--c-ink-3); }
.lc-tip { position: absolute; left: 0; bottom: 18px; z-index: 3; width: 200px; transform: translate(-50%, 6px); padding: 10px 12px; background: var(--c-page); border: var(--border-strong); border-radius: var(--r-md); font-size: 14px; color: var(--c-ink); opacity: 0; visibility: hidden; transition: opacity .25s var(--ease-out), transform .25s var(--ease-out), visibility .25s; pointer-events: none; }
.lc-tip b { display: block; font: 500 12px 'Iowan Old Style', 'Palatino', var(--f-serif); color: var(--c-ink-3); }
.lc-tip small { display: block; margin-top: 4px; font-size: 12px; line-height: 1.6; color: var(--c-ink-2); }
.lc-node:hover .lc-tip, .lc-node:focus-visible .lc-tip { opacity: 1; visibility: visible; transform: translate(-50%, 0); }
/* 靠右的節點，提示卡片向左展開，避免超出頁面 */
.lc-node.is-right .lc-tip { left: auto; right: -12px; transform: translate(0, 6px); }
.lc-node.is-right:hover .lc-tip, .lc-node.is-right:focus-visible .lc-tip { transform: translate(0, 0); }
.lc-node:hover > i, .lc-node:focus-visible > i { transform: scale(1.35); }
.lc-node:hover .lc-tag, .lc-node:focus-visible .lc-tag { opacity: 0; }
.lc-axis-labels { position: relative; height: 38px; margin: 6px 0 0 22px; }
.lc-axis-labels span { position: absolute; top: 0; transform: translateX(-50%); display: grid; justify-items: center; font-size: 11px; color: var(--c-ink-3); white-space: nowrap; }
.lc-axis-labels b { font: 500 13px var(--f-serif); color: var(--c-ink-2); }
/* 階段詳解：按大運逐段說明 */
.rp-stages { margin-top: var(--s-5); }
.rp-stages ol { margin: var(--s-3) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--c-ink); }
.rp-stages li { display: grid; grid-template-columns: 120px minmax(0, 1fr); gap: var(--s-5); padding: var(--s-4) 0; border-bottom: var(--border); }
.st-age b { display: block; font: 500 20px/1.3 var(--f-num); color: var(--c-ink); }
.st-age span { font-family: var(--f-serif); font-size: 13px; color: var(--c-ink-2); }
.st-title { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); font-family: var(--f-serif); font-size: 17px; color: var(--c-ink); }
.st-body > p:nth-child(2) { margin-top: var(--s-1); font-size: 14px; line-height: 1.85; color: var(--c-ink-2); }
.st-years { margin-top: var(--s-2); font: 12px var(--f-num); color: var(--c-ink-3); letter-spacing: .02em; }
.st-tag { flex-shrink: 0; padding: 6px 11px 6px calc(11px + var(--ls)); font: 600 12px/1 var(--f-serif); }

/* 人生曲線（王陽明頁） */
.rp-curve { position: relative; margin: var(--s-3) 0 0; padding-bottom: 20px; }
.rp-curve svg { display: block; width: 100%; height: 52px; overflow: visible; }
.rp-curve-grid path { fill: none; stroke: color-mix(in srgb, var(--hue) 22%, transparent); stroke-width: 1; vector-effect: non-scaling-stroke; }
.rp-curve-line { fill: none; stroke: var(--hue); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.rp-curve circle { fill: var(--hue); }
.rp-curve figcaption span { position: absolute; bottom: 0; transform: translateX(-50%); font-size: 11px; line-height: 1.45; text-align: center; color: var(--c-ink-2); white-space: nowrap; }

/* 04 · 多流派對比：與上一模塊左右鏡像，卡片在左、目錄在右；整組用群青 */
.hue-compare { --hue: #3b4a6b; --hue-deep: #2b3752; --hue-soft: #e3e6ee; }
.preview-layout.is-mirrored { grid-template-columns: minmax(0, 1fr) minmax(260px, 360px); }
.is-mirrored .preview-side { order: 2; }
.is-mirrored .preview-side h2 { margin-bottom: var(--s-4); }
.side-intro { margin-bottom: var(--s-6); font-size: 15px; line-height: 1.85; color: var(--c-ink-2); }
/* 每一步的小標題在卡片上方，讀這張卡片時吸附在頁頭下方，下一步到來時被頂走 */
.is-mirrored .sample-panels { gap: var(--s-5); }
.mc-step { scroll-margin-top: calc(73px - 88px); } /* 與 html 的 scroll-padding-top 疊加後，小標題正好貼住頁頭 */
.mc-step-head { position: sticky; top: 73px; z-index: 2; display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: baseline; gap: 2px var(--s-3); padding: calc(var(--s-6) - 1px) 0 var(--s-3); background: var(--tex-paper), rgb(242 241 236 / .92); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.mc-step-head .tab-no { font-size: 15px; color: var(--c-ink-3); }
.mc-step-head h3 { font-size: 19px; line-height: 1.4; }
.mc-step-head p { grid-column: 2; font-size: 13px; line-height: 1.6; color: var(--c-ink-3); }
/* 01 · 六路各自的判斷：流派、結論與盤面依據、吉凶 */
.mc-schools { list-style: none; margin: var(--s-4) 0 0; padding: 0; border-top: var(--border); }
.mc-schools li { display: grid; grid-template-columns: 104px minmax(0, 1fr) auto; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: var(--border); }
.mc-schools li:last-child { border-bottom: 0; padding-bottom: 0; }
.mc-school { align-self: baseline; padding-top: 3px; font-size: 13px; }
.mc-schools p { font-size: 15px; line-height: 1.7; color: var(--c-ink); }
.mc-schools small { display: block; margin-top: 2px; font-size: 13px; color: var(--c-ink-3); }
.mc-v { padding: 9px 16px 9px calc(16px + var(--ls)); font: 600 18px/1 var(--f-serif); }
/* 02 · 對照表：行是人生三段，列是六路，流派順序與上一張卡片一致；最後一列直接給出是否一致。有分歧的一行下面並列兩種判斷 */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mc-table { width: 100%; border-collapse: collapse; }
.mc-table th, .mc-table td { padding: 12px 4px; border-bottom: var(--border); text-align: center; font-weight: 400; white-space: nowrap; }
.mc-table thead th { padding-top: 0; border-bottom: 1px solid var(--c-ink); }
.mc-table thead .s-tag { font-size: 13px; }
.mc-table thead th:last-child, .mc-table tbody th { font-size: 13px; color: var(--c-ink-2); }
.mc-table tbody th { padding-left: 0; text-align: left; font: 500 15px var(--f-serif); color: var(--c-ink); }
.mc-table td b { padding: 6px 10px 6px calc(10px + var(--ls)); font: 600 13px/1 var(--f-serif); }
.mc-result { padding-left: var(--s-3) !important; }
.mc-result span { display: block; font-size: 12px; color: var(--c-ink-3); }
.mc-result b { display: block; margin-top: 2px; font: 600 15px/1.3 var(--f-serif); color: var(--v); }
.mc-table tr.is-split > * { border-bottom: 0; }
.mc-split-row td { padding: 0 0 var(--s-4); text-align: left; white-space: normal; }
.mc-split { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-3); }
.mc-split > div { padding: var(--s-3) var(--s-4); border: var(--border); border-radius: var(--r-md); }
.mc-split-head { display: flex; align-items: baseline; gap: var(--s-2); font-size: 12px; color: var(--c-ink-3); }
.mc-split-head b { font: 600 14px var(--f-serif); color: var(--v); }
.mc-split p:last-child { margin-top: var(--s-1); font-size: 14px; line-height: 1.7; color: var(--c-ink); }
.mc-principle { margin-top: var(--s-3); font-size: 13px; color: var(--c-ink-2); }
/* 03 · 結論：每一句都標出來自哪幾路 */
.mc-verdict { margin: var(--s-5) 0 0; padding: var(--s-4) var(--s-6); background: var(--hue-soft); border-radius: var(--r-md); font: 600 22px/1.6 var(--f-serif); color: var(--hue-deep); text-wrap: balance; }   /* 結論一句話一行（放不下時兩行均分），不再拆成三行大字 */
.mc-basis { list-style: none; margin: var(--s-4) 0 0; padding: 0; counter-reset: basis; }
.mc-basis li { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: var(--s-1) var(--s-3); padding: var(--s-4) 0; border-bottom: var(--border); counter-increment: basis; }
.mc-basis li::before { content: counter(basis, decimal-leading-zero); grid-row: span 2; font: 15px/1.8 var(--f-num); color: var(--c-ink-3); }
.mc-basis li:last-child { border-bottom: 0; padding-bottom: 0; }
.mc-basis p { font-size: 15px; line-height: 1.8; color: var(--c-ink); }
.mc-from { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; font-size: 12px; color: var(--c-ink-3); }

/* 04 · 典籍：標題左對齊；下面一排書橫向排開，左右出血到屏幕外（第一本對齊版心左邊），兩側箭頭翻頁；
   「查看全部 N 部書目」居中放在書下面（書目卡片樣式在 shelf-book.css） */
.classics-section { overflow-x: clip; }
.classics-section h2 { font-size: var(--t-h2); line-height: 1.45; }
.classics-section .section-intro { margin-top: var(--s-4); line-height: 1.85; text-wrap: pretty; }
/* --pad：版心兩邊的留白，書架的內邊距和吸附位置都用它，所以第一本正好落在版心左邊 */
.classics-box { --pad: max(32px, (100% - 1200px) / 2); --gap: 32px; --cols: 6; position: relative; margin-top: var(--s-7); }
/* 上面留 14px 給懸停上抬，不被橫向滾動裁掉 */
.classics-shelf { list-style: none; margin: -14px 0 0; padding: 14px var(--pad) 4px; display: flex; gap: var(--gap);
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: var(--pad); overscroll-behavior-x: contain; scrollbar-width: none; }
.classics-shelf::-webkit-scrollbar { display: none; }
.classics-shelf .bk { flex: 0 0 calc((100% - (var(--cols) - 1) * var(--gap)) / var(--cols)); min-width: 0; scroll-snap-align: start; }   /* min-width: 0：作者很長時卡片不被撐寬 */
.classics-shelf :is(.bk-t, .bk-m) { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }   /* 作者太長時截斷，保證一排的流派標籤對齊；全名在書架詳情裡 */
/* 兩側淺淺的蒙層：用遮罩讓書架兩頭漸漸變淡（透出的就是頁面本身的紙，不另外鋪顏色，否則在 Chrome 裡整排會亮出一條），
   出血的半本書被壓淡，箭頭落在淡掉的地方，不和書混在一起 */
.classics-shelf { --fw: max(64px, var(--pad));
  -webkit-mask-image: linear-gradient(90deg, rgb(0 0 0 / .22), #000 var(--fw), #000 calc(100% - var(--fw)), rgb(0 0 0 / .22));
  mask-image: linear-gradient(90deg, rgb(0 0 0 / .22), #000 var(--fw), #000 calc(100% - var(--fw)), rgb(0 0 0 / .22)); }
/* 圓形箭頭：在版心外側，豎直對準封面中線（--nav-y 由 site.js 量出） */
.classics-nav { position: absolute; top: var(--nav-y, 40%); z-index: 2; width: 48px; height: 48px; display: grid; place-items: center; transform: translateY(-50%);
  border: 1px solid var(--c-line-strong); border-radius: 50%; background: var(--c-page); color: var(--c-ink);
  box-shadow: 0 2px 4px rgb(30 40 42 / .06), 0 8px 20px rgb(30 40 42 / .08); transition: border-color .2s, color .2s, transform .25s var(--ease-out); }
.classics-nav:hover { border-color: var(--c-daiqing); color: var(--c-daiqing); }
.classics-nav.is-prev:hover { transform: translateY(-50%) translateX(-2px); }
.classics-nav.is-next:hover { transform: translateY(-50%) translateX(2px); }
.classics-nav svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.4; }
.classics-nav.is-prev { left: max(12px, var(--pad) - 72px); }
.classics-nav.is-next { right: max(12px, var(--pad) - 72px); }
.classics-more { display: flex; justify-content: center; margin-top: var(--s-6); }
@media (max-width: 860px) {
  .classics-box { --gap: 20px; --cols: 3.5; margin-top: var(--s-6); }
  .classics-nav { display: none; }   /* 平板和手機直接滑 */
  .classics-shelf { --fw: 28px; }
}
@media (max-width: 720px) { .classics-box { --pad: 16px; } }
@media (max-width: 520px) {
  .classics-box { --gap: 14px; --cols: 2.4; }
  .classics-shelf .bk-t { font-size: 15px; }
}

/* 06 · 常見問題 */
/* 分欄與「在命書裡」一致：左欄 340px、間距 64px；左欄是標題和一句說明 */
.faq-section { display: grid; grid-template-columns: minmax(260px, 340px) minmax(0, 1fr); gap: var(--s-8); align-items: start; }
.faq-section h2 { font-size: var(--t-h2); line-height: 1.45; }
.faq-section .section-intro { margin-top: var(--s-4); line-height: 1.85; }
.faq-list details { border-bottom: var(--border); scroll-margin-top: 110px; }
.faq-list details[open] { padding-bottom: 22px; }
/* 上下留白放在問題這一行自己身上：整行（不只是那一行字）都能點開；第一個問題往上收，與標題第一行頂部對齊 */
.faq-list details:first-child { margin-top: -14px; }
.faq-list summary { position: relative; padding: 22px var(--s-7) 22px 0; font: 500 18px/1.6 var(--f-serif); color: var(--c-ink); cursor: pointer; list-style: none; transition: color .2s; }
.faq-list summary:hover { color: var(--c-daiqing); }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: '+'; position: absolute; right: 4px; top: 50%; transform: translateY(-52%); font: 200 22px/1 var(--f-num); color: var(--c-ink-3); transition: color .2s; }
.faq-list summary:hover::after { color: var(--c-daiqing); }
.faq-list details[open] summary::after { content: '−'; }
.faq-list p { margin-top: var(--s-3); max-width: 42em; font-size: 15px; color: var(--c-ink-2); }
.faq-list details .link { display: inline-block; margin-top: var(--s-3); font-size: 14px; }
.faq-list summary + * { margin-top: calc(var(--s-3) - 22px); }   /* 問題行自帶 22 的下留白，答案往上收回去，展開後的間距和原來一樣 */

/* 07 · 收尾：全站唯一的深色段落 */
.final-cta { margin-top: 120px; background: var(--c-daiqing); color: var(--c-page); }
.final-inner { display: flex; justify-content: space-between; align-items: flex-end; gap: var(--s-7); padding-block: var(--s-9); }
.final-cta h2 { font-size: var(--t-h2); line-height: 1.5; }
.final-side .actions { margin-top: 0; }
.btn-inverse { background: var(--c-page); color: var(--c-daiqing-deep); }
.btn-inverse:hover { background: var(--c-yuebai); }
.link-inverse { color: var(--c-page); }
.link-inverse:hover { color: var(--c-yuebai); }
.micro { margin-top: var(--s-4); font-size: 13px; color: rgb(251 250 246 / .7); }
/* 小字裡的鏈接（首頁收尾「查看價格」）：比小字亮一檔，帶下劃線 */
.final-cta .micro a { margin-left: .5em; padding-bottom: 1px; border-bottom: 1px solid currentColor; color: var(--c-page); white-space: nowrap; transition: color .2s; }
.final-cta .micro a:hover { color: var(--c-yuebai); }

/* 頁腳 */
.footer { border-top: var(--border); }
.footer-inner { display: grid; grid-template-columns: auto 1fr; align-items: baseline; gap: var(--s-2) var(--s-6); padding-block: var(--s-7) var(--s-8); font-size: 13px; color: var(--c-ink-2); }
.footer .brand { font-size: 20px; grid-row: span 3; }
.footer-icp a:hover { color: var(--c-ink-2); }
.footer small { font-size: 12px; color: var(--c-ink-3); }

/* 平板 */
@media (max-width: 1000px) {
  .preview-layout { grid-template-columns: 240px minmax(0, 1fr); gap: var(--s-6); }
  .preview-side h2 { font-size: 30px; }
  .preview-layout.is-mirrored { grid-template-columns: minmax(0, 1fr) 240px; }
  .is-mirrored .preview-side h2 { font-size: 26px; }
}

/* 手機 */
@media (max-width: 720px) {
  :root { --header-h: 61px; }
  .wrap { width: calc(100% - 32px); }
  .header-inner { height: 60px; }
  .brand { font-size: 21px; }
  .brand small { display: none; }
  .nav { gap: var(--s-4); }
  .nav a:not(.btn, .nav-link) { display: none; }
  .nav > .nav-link, .nav > .lang-seg, .nav > .nav-sep { display: none; }   /* 古籍書架、價格和語言開關收進側邊欄 */
  .nav-burger { display: grid; }
  .btn .t-full { display: none; }
  .btn .t-short { display: inline; }
  .section { padding-top: 80px; }
  .section-head { display: block; margin-bottom: var(--s-6); }
  .section-head > .link { display: inline-block; margin-top: var(--s-4); }
  .hero { padding-top: var(--s-7); }
  .hero h1 { font-size: clamp(28px, 8vw, 38px); }
  .lead { font-size: 16px; }
  .lead br { display: none; }
  .hero-actions { margin-top: var(--s-5); }
  .hero-actions .btn { flex-basis: 50%; --px: 12px; }
  .book-stage { --book-h: 720px; --book-gap: 8px; --fade-end: 78%; height: 360px; margin-top: var(--s-7); }
  .questions-section { margin-top: -96px; padding-top: 0; }
  .preview-layout { grid-template-columns: 1fr; gap: var(--s-5); }
  .preview-side { position: static; }
  .preview-side h2 { margin-bottom: var(--s-5); }
  .side-cta { margin-top: var(--s-4); }
  .tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 var(--s-4); }
  .tabs a { padding: var(--s-3) 0 var(--s-3) var(--s-3); font-size: 14px; gap: var(--s-2); }
  .tabs a[aria-current="true"] { padding-left: var(--s-4); }
  .report-page { min-height: 0; padding: var(--s-4); }
  .rp-person { grid-template-columns: auto minmax(0, 1fr); gap: var(--s-3) var(--s-4); }
  .rp-avatar { width: 56px; height: 56px; font-size: 24px; }
  .rp-avatar.is-photo { width: 56px; height: 70px; }
  .rp-id h3 { font-size: 24px; }
  .rp-id p { font-size: 13px; }
  .rp-pillars { grid-column: 1 / -1; grid-template-columns: repeat(4, 1fr); }
  .rp-portrait { padding: var(--s-4); }
  .rp-portrait h4 { font-size: 18px; }
  .rp-portrait p { font-size: 14px; }
  .rp-notes { grid-template-columns: 1fr; gap: var(--s-3); }
  .rp-life { padding: var(--s-3); }
  .rp-life-key { display: none; }
  .rp-life-plot { height: 200px; margin-left: 16px; }
  .lc-y { left: -16px; }
  .lc-tag:not(.lc-year) { font-size: 11px; }
  .lc-year { display: none; }
  .lc-axis-labels { margin-left: 16px; height: 34px; }
  .lc-axis-labels span { font-size: 10px; }
  .lc-axis-labels b { font-size: 11px; }
  .rp-stages li { grid-template-columns: 1fr; gap: var(--s-2); }
  .rp-wealth { grid-template-columns: 1fr; padding: var(--s-4); }
  .rp-wealth-num b { font-size: 36px; }
  .rp-wealth-stages li { grid-template-columns: 96px minmax(0, 1fr) 64px; font-size: 12px; }
  .rp-couple { grid-template-columns: 1fr; gap: var(--s-3); }
  .rp-mate:last-child { justify-items: start; text-align: left; }
  .rp-mate:last-child .rp-mate-id { flex-direction: row; }
  .rp-bond { justify-self: center; padding-bottom: 0; }
  .rp-mate > .rp-pillars { justify-self: stretch; }
  .rp-verdicts { flex-direction: column; align-items: flex-start; gap: var(--s-3); }
  .rp-verdicts ul { gap: var(--s-2) 4px; width: 100%; }
  .rp-verdicts li { min-width: 0; }
  .rp-verdicts .s-tag { gap: 2px; font-size: 11px; }
  .rp-verdicts .s-icon { width: 12px; height: 12px; }
  .preview-layout.is-mirrored { grid-template-columns: 1fr; }
  .is-mirrored .preview-side { order: 0; }
  .side-intro { margin-bottom: var(--s-5); font-size: 14px; }
  .is-mirrored .tabs { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mc-step { scroll-margin-top: calc(61px - 88px); }
  .mc-step-head { top: 61px; padding: var(--s-4) 0 var(--s-3); }
  .mc-step-head h3 { font-size: 17px; }
  .mc-step-head p { font-size: 12px; }
  .mc-schools li { grid-template-columns: minmax(0, 1fr) auto; gap: var(--s-1) var(--s-3); padding: var(--s-3) 0; }
  .mc-school { grid-column: 1 / -1; }
  .mc-schools p { font-size: 14px; }
  .mc-schools small { font-size: 12px; }
  /* 手機上每一段拆成一塊：方面和結論在上，七家在下，每格上方標出流派名 */
  .mc-table, .mc-table tbody { display: block; }
  .mc-table thead { display: none; }
  .mc-table tr { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: var(--s-2) 4px; padding: var(--s-4) 0; border-bottom: var(--border); }
  .mc-table tr.is-split { border-bottom: 0; }
  .mc-table th, .mc-table td { padding: 0; border: 0; }
  .mc-table tbody th { grid-row: 1; grid-column: 1 / 4; align-self: center; }
  .mc-result { grid-row: 1; grid-column: 4 / -1; display: flex; align-items: baseline; justify-content: flex-end; gap: var(--s-2); padding: 0 !important; }
  .mc-result b { margin-top: 0; }
  .mc-table td[data-s] { grid-row: 2; display: grid; justify-items: center; gap: 4px; }
  .mc-table td[data-s]::before { content: attr(data-s); font-size: 11px; color: var(--c-ink-2); }
  .mc-table td b { padding: 5px 5px 5px calc(5px + var(--ls)); font-size: 12px; }
  .mc-split-row { padding-top: 0 !important; }
  .mc-split-row td { grid-column: 1 / -1; }
  .mc-split { grid-template-columns: 1fr; }
  .mc-v { padding: 7px 12px 7px calc(12px + var(--ls)); font-size: 16px; }
  .rp-stamp.vf { font-size: 24px; }
  .rp-verdicts li b { padding: 6px 6px 6px calc(6px + var(--ls)); font-size: 13px; }
  .mc-verdict { padding: var(--s-4); font-size: 21px; }
  .mc-basis p { font-size: 14px; }
  .faq-section { grid-template-columns: 1fr; gap: var(--s-5); }
  .faq-list details:first-child { margin-top: -22px; }
  .faq-list summary { font-size: 16px; }
  .q-orb { height: 440px; }   /* 手機上原來 560，縱向占得太多；只留 12 張卡片，440 也排得開 */
  .q-item:not(.q-keep) { display: none; }   /* 手機上 24 張擠在一起互相壓住：只留 12 張，每類一到兩張（site.js 把留下的重新鋪滿球面） */
  .q-item { padding: 8px 12px 9px; }
  .q-item .q-text { font-size: 14px; }
  .q-item .q-cat { font-size: 11px; }
  .final-cta { margin-top: 80px; }
  .final-inner { flex-direction: column; align-items: flex-start; gap: var(--s-6); padding-block: var(--s-8); }
  .footer-inner { grid-template-columns: 1fr; }
  .footer .brand { grid-row: auto; }
}
/* 窄屏手機的頁頭：品牌、古籍書架、價格、主按鈕要排在一行。400 以下收一點間距、字距和按鈕內邊距；
   350 以下（320 寬的小屏、摺疊屏外屏）再收一檔，品牌的字距、導航和按鈕的字號一起收，免得品牌和「古籍書架」貼在一起、按鈕頂出屏幕。
   首頁頁頭左右各留 24（look-dark.css），比其他頁面少 16，下面的數字按首頁算：320 寬時品牌和導航之間還有 17，最緊的 351 寬還有 13 */
@media (max-width: 400px) {
  .nav { gap: var(--s-3); }
  .nav-link { letter-spacing: .04em; }
  .nav-actions .btn-sm { --px: 14px; }
}
@media (max-width: 350px) {
  .header .brand { letter-spacing: .04em; }
  .nav { gap: var(--s-2); }
  .nav-link { font-size: 13px; }
  .nav-actions .btn-sm { --px: 9px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pg { transition: none !important; transform: none; }
  .pg-in { animation: none; }
  *, *::before, *::after { transition: none !important; }
}


/* ===== 首屏：鋪滿整個視口，按版心分兩欄：左欄文字，右欄是一塊帶角標的演示圖版（構圖參照 Antimetal） =====
   首屏往上挪到頁頭下面，頁頭透明地壓在紙面上；兩欄上下居中對齊 */
:root { --header-h: 73px; }
#intro { margin-top: calc(-1 * var(--header-h)); padding: 0; }
.hn-card {
  --hn-pad: 24px;   /* 只在窄屏用：單欄時的左右留白 */
  /* 三維場景的用色（R,G,B），hero-demo.js 從這裡讀取。和全站一樣剋制：墨色細線、石青曲線、月白光幕，
     節點按吉凶上色（吉硃砂、平菸灰、凶墨），硃砂是畫面裡唯一跳出來的顏色 */
  --g-grid: 30,36,37; --g-k: .38; --g-line: 93,133,149; --g-curtain: 93,133,149; --g-curtain-a: .16;
  --g-label: 30,36,37; --g-head: 251,250,246; --g-month: 93,133,149;
  --g-ji: 169,67,47; --g-xiong: 58,68,70; --g-ping: 122,131,133;
  position: relative; isolation: isolate;
  /* 左欄按文字的實際寬度收緊（副標題在「寫成」處折行），右欄是剩下的寬度；兩欄靠近一些，內容更緊湊。
     演示區的高度跟左欄文字一樣：動畫頂和標題頂齊、底和按鈕底齊 */
  display: grid; grid-template-columns: max-content minmax(0, 1fr); column-gap: 64px; align-items: center; align-content: center;
  width: min(1200px, calc(100% - 64px)); margin-inline: auto;
  height: max(640px, 100svh); padding: var(--header-h) 0 clamp(40px, 7vh, 80px);
}
.hn-deco { display: none; }   /* 首屏的光影裝飾：只在深色版試驗裡顯示（look-dark.css） */
.hn-copy { position: relative; z-index: 2; display: flex; flex-direction: column; grid-area: 1 / 1; }
/* 標題一行，常規粗細，1440 寬時 54px；副標題用宋體，兩行 */
#intro h1 { font-size: clamp(40px, 3.75vw, 54px); line-height: 1.2; letter-spacing: .04em; font-weight: 400; color: var(--c-ink); white-space: nowrap; }

/* 三個賣點：豎排在左欄，對應右邊循環播放的三段動畫；點一下可以切換。
   沒在播放的只留淺灰標題；正在播放的那條標題變深、展開一行說明，左邊一根黛青細線隨播放從上往下畫滿。
   三條說明都是一行，切換時一條收起、一條展開，整組高度不變 */
.hn-points { list-style: none; margin: 32px 0 0; padding: 0; }
.hn-pt { position: relative; display: grid; grid-template-rows: auto 0fr; width: 100%; padding: 9px 0 9px 18px; border: 0; background: none; font: inherit; text-align: left; color: var(--c-ink-3); cursor: pointer;
  transition: color .3s, grid-template-rows .45s var(--ease-out); }
.hn-pt::before, .hn-pt::after { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 2px; }
.hn-pt::before { background: var(--c-line); }
.hn-pt::after { background: var(--c-daiqing); transform-origin: 50% 0; transform: scaleY(var(--p, 0)); }
.pt-title { font: 500 17px/1.4 var(--f-serif); letter-spacing: .06em; }
.pt-desc { min-height: 0; overflow: hidden; }
.pt-desc > span { display: block; padding-top: 4px; font-size: 14px; line-height: 1.5; color: var(--c-ink-2); opacity: 0; transition: opacity .2s; }
.hn-pt:hover { color: var(--c-ink-2); }
.hn-pt[aria-selected="true"] { grid-template-rows: auto 1fr; color: var(--c-ink); }
.hn-pt[aria-selected="true"] .pt-desc > span { opacity: 1; transition: opacity .35s .15s; }
#intro .hn-actions { justify-content: flex-start; margin-top: 36px; }

/* 演示區：占滿右欄，高度跟左欄文字一樣（拉伸到同一行的高度）；三段疊放、交替淡入 */
.hn-stage { position: relative; z-index: 0; grid-area: 1 / 2; align-self: stretch; container-type: inline-size; }
/* 圖版左上角的讀數：每段一行固定位置的小字（推算到第幾個月 / 流派比對到哪一步 / 核對了幾件），不隨畫面移動 */
.h3-meta { position: absolute; left: 0; top: 0; display: flex; align-items: baseline; gap: 8px; font-size: 12px; line-height: 1; letter-spacing: .14em; color: var(--c-ink-3); white-space: nowrap; }
.h3-meta b { font: 400 14px/1 var(--f-num); letter-spacing: .02em; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.h3-meta s { text-decoration: none; font: 400 14px/1 var(--f-num); letter-spacing: .02em; color: var(--c-ink-3); }
.h3-meta .m-n { display: contents; }
.h3-meta .m-q { display: none; }   /* 命書原文只在深色版的讀數卡片裡顯示 */
.h3-meta .m-ill { display: none; }   /* 器物插圖只在深色版的說明卡里顯示 */
.hn-demo { position: absolute; inset: 13% 7% 12% 15%; display: flex; flex-direction: column; padding: 0; --c-page: var(--c-paper); opacity: 0; transform: translateY(8px); transition: opacity .55s var(--ease-out), transform .55s var(--ease-out); }
.hn-demo > :first-child { margin-top: 0; }
.hn-demo[hidden] { display: flex; visibility: hidden; }
.hn-demo.is-active { opacity: 1; transform: none; visibility: visible; }
.d-head { display: flex; justify-content: space-between; padding-bottom: 3cqw; border-bottom: 1px solid var(--c-line); font-size: clamp(11px, 2.1cqw, 13px); color: var(--c-ink-3); letter-spacing: .04em; }
.d-head b { font-weight: 500; color: var(--c-ink-2); }

/* 三段演示：三維場景畫在 canvas 上，鋪滿整個演示區；標註是疊在上面的細線框小標籤，始終正對觀眾 */
.hn-demo.d1, .hn-demo.d2, .hn-demo.d3 { inset: 0; }
.h3-canvas { position: absolute; inset: 0; width: 100%; height: 100%;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); mask-image: linear-gradient(90deg, transparent 0, #000 4%, #000 96%, transparent 100%); }
.h3-chips { position: absolute; inset: 0; pointer-events: none; }
.h3-chip, .h3-now { position: absolute; left: 0; top: 0; white-space: nowrap; opacity: 0; transition: opacity .3s; }
.h3-chip { display: inline-flex; align-items: center; gap: 7px; padding: 4px 10px 5px 8px; border-radius: var(--r-sm);
  background: var(--c-page); border: 1px solid var(--c-line-strong); font: 500 13px/1.3 var(--f-serif); color: var(--c-ink); }
.h3-chip i { width: 6px; height: 6px; border-radius: 50%; background: var(--v); }
.h3-chip b { margin-right: -2px; color: var(--c-zhusha); font-weight: 700; }
/* 畫面區右上角的當前干支時辰：只在深色版顯示（look-dark.css） */
.hn-now { display: none; }
/* 流派球上的標籤：圖標 + 名字，比普通標註小一號；前後的明暗和大小由腳本按深度設置 */
.h3-chip.h3-school { gap: 5px; padding: 3px 9px 3px 7px; font-size: 12px; transform-origin: 0 50%; transition: none; }
.h3-chip.h3-school .s-icon { width: 13px; height: 13px; opacity: .85; }
@container (max-width: 439px) { .h3-chip.h3-school { gap: 3px; padding: 1px 6px 1px 5px; font-size: 11px; } .h3-chip.h3-school .s-icon { width: 11px; height: 11px; } }   /* 窄屏的球小，標籤也收小 */
/* 推算出的未來：石青字、虛線框，和已經應驗的過去區分開 */
.h3-chip.is-fut { color: var(--c-shiqing); border-style: dashed; }
.h3-now { font: 12px/1 var(--f-num); color: var(--c-ink-3); letter-spacing: .02em; }
.h3-chip.is-on, .h3-now.is-on { opacity: 1; }
@container (max-width: 439px) { .h3-chip { gap: 5px; padding: 2px 7px 3px 6px; font-size: 12px; } }
/* 「今天」兩側的一詞標註：左「應驗」硃砂，右「推算」石青，不加框 */
.h3-chip.h3-tag { padding: 0; background: none; border: 0; font: 600 13px/1.4 var(--f-serif); letter-spacing: .2em; }
.h3-tag.t-past { color: var(--c-zhusha); }
.h3-tag.t-fut { color: var(--c-shiqing); }
/* 畫面上的小字註釋（「10 個流派各算一條」「已核對 3 / 5」）：不加框，宋體小字 */
.h3-chip.h3-note { padding: 0; background: none; border: 0; font: 500 13px/1.4 var(--f-serif); color: var(--c-ink-2); }
/* 星盤中央最後立起的「大吉」：硃砂雙線框 */
.h3-chip.h3-seal { padding: 7px 16px 8px; border: 1px solid var(--c-zhusha); box-shadow: inset 0 0 0 3px var(--c-page), inset 0 0 0 4px var(--c-zhusha);
  font: 600 22px/1 var(--f-serif); letter-spacing: .08em; color: var(--c-zhusha); }

/* 首屏副標題 */
.hn-lead { max-width: 26em; margin-top: 20px; font-family: var(--f-serif); font-size: clamp(17px, 1.4vw, 20px); line-height: 1.65; color: var(--c-ink-2); letter-spacing: .02em; }

/* 三段演示統一字號：主數字 / 標籤與結論 / 次數字 / 數據小字 四檔，三段共用 */
.hn-stage { --t-num: clamp(36px, 8cqw, 48px); --t-label: clamp(14px, 2.7cqw, 16px); --t-num2: clamp(18px, 3.6cqw, 22px); --t-data: clamp(12px, 2.2cqw, 13px); }
.d2-q, .d2-result p { font-size: var(--t-label); }
.d2-q, .d2-result p { line-height: 1.5; }

/* 01a · 命書數據：五項靠攏成一組、整體居中，沒有豎線和頂線。每項兩行：上面「數字 + 單位」一種樣式，下面一行小字說明；
   同字號下數字看著比中文小，單位的中文縮到 .8 倍，兩者看起來一樣大；說明的長短和上面那行差不多寬 */
.hn-facts { margin-top: clamp(28px, 4.5vh, 48px); }
.facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px clamp(40px, 5vw, 80px); list-style: none; margin-block: 0; padding: 0; text-align: center; }   /* 只清上下外邊距，左右要留給 .wrap 居中 */
.f-num { font: 400 clamp(24px, 2.1vw, 30px)/1.3 var(--f-serif); letter-spacing: .02em; color: var(--c-ink); white-space: nowrap; }
.f-num span { margin-left: .3em; font-size: .8em; }
.f-desc { margin-top: 6px; font-size: 14px; line-height: 1.6; color: var(--c-ink-3); white-space: nowrap; }
.f-ill { display: none; }   /* 數據行的器物插圖：只在深色版試驗裡按 &fi 顯示（look-dark.css） */

/* 進場：標語與三條特點由模糊變清晰 */
.intro-hn .header, .intro-hn #intro .hn-copy > *, .intro-hn .hn-stage { opacity: 0; filter: blur(12px); transform: translateY(12px); }
.intro-hn.intro-go .header, .intro-hn.intro-go #intro .hn-copy > *, .intro-hn.intro-go .hn-stage { opacity: 1; filter: none; transform: none; transition: opacity 1.1s var(--ease-in-out), filter 1.1s var(--ease-in-out), transform 1.1s var(--ease-in-out); }
.intro-hn.intro-go #intro .hn-copy > :nth-child(2) { transition-delay: .15s; }
.intro-hn.intro-go #intro .hn-copy > :nth-child(3) { transition-delay: .3s; }
.intro-hn.intro-go .hn-stage { transition-delay: .35s; }
.intro-hn.intro-go .header { transition-delay: .5s; }

/* 問題模塊緊跟首屏，下面直接接命書節選 */
.questions-section { margin-top: 0; padding-top: 120px; }

/* 窄屏：標題、副標題在上，演示在中間，三個賣點緊貼在演示下面，按鈕在最後 */
@media (max-width: 860px) {
  .hn-card { height: auto; min-height: 100svh; display: flex; flex-direction: column; align-items: stretch; width: auto; padding: 0; }
  .hn-copy { display: contents; }
  #intro h1 { order: 1; position: relative; z-index: 2; padding: calc(var(--header-h) + 28px) var(--hn-pad) 0; font-size: clamp(34px, 10vw, 52px); }
  .hn-lead { order: 2; padding: 0 var(--hn-pad); margin-top: 10px; font-size: 16px; }
  .hn-br { display: none; }   /* 窄屏不強制折行 */
  .hn-stage { order: 3; aspect-ratio: 1 / .82; margin: 20px var(--hn-pad) 0; }
  .hn-points { order: 4; margin: 16px var(--hn-pad) 0; }   /* 窄屏：賣點緊貼在動畫下面 */
  .hn-demo { inset: 10% 6% 8%; }
  .h3-meta { left: 0; top: 0; }
  #intro .hn-actions { order: 5; margin: 20px var(--hn-pad) 32px; }
  .questions-section { padding-top: 64px; }
}
@media (max-width: 480px) {
  .hn-stage { aspect-ratio: 1 / .78; }
}
/* 矮屏桌面：標題、間距收一收 */
@media (min-width: 861px) and (max-height: 800px) {
  #intro h1 { font-size: clamp(40px, 3.6vw, 50px); }
  .hn-lead { margin-top: 14px; }
  #intro .hn-actions { margin-top: 26px; }
  .hn-points { margin-top: 22px; }
  .hn-pt { padding-block: 8px; }
}

/* 手機（720 以下，2026-12-06）：命書節選、多流派對照改成三層——一行橫滑的標籤 → 一行橫滑的卡片（右邊露出下一張的邊）→ 底部整行按鈕。
   標籤和卡片的聯動在 site.js 的 pageSection 裡；手機上不自動輪播，也不疊紙 */
@media (max-width: 720px) {
  :is(#sample, #compare) .preview-layout { display: flex; flex-direction: column; align-items: stretch; gap: 0; }   /* 桌面是 align-items: start，豎排時卡片區會按內容寬度撐開 */
  :is(#sample, #compare) .preview-side { display: contents; }   /* 標題、標籤、按鈕和卡片排在同一列裡，按鈕才能挪到卡片下面 */
  /* 標籤：一行排開，放不下就橫滑，鋪到屏幕兩邊；當前那個下面一條墨線（不要桌面上的豎線和進度線） */
  :is(#sample, #compare) .tabs { position: relative; display: flex; flex-direction: row; gap: 24px; margin: 0 -16px; padding: 0 16px; border-top: 0; border-bottom: var(--border);
    overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; }
  :is(#sample, #compare) .tabs::-webkit-scrollbar { display: none; }
  :is(#sample, #compare) .tabs a { flex: none; gap: 6px; margin-bottom: -1px; padding: 12px 0 11px; border-bottom: 2px solid transparent; white-space: nowrap; font-size: 15px; }
  :is(#sample, #compare) .tabs a[aria-current="true"] { padding-left: 0; border-bottom-color: var(--c-ink); }
  :is(#sample, #compare) .tabs a::before, :is(#sample, #compare) .tabs a::after { display: none; }
  /* 卡片：一行橫滑，鬆手停在整張卡片上；一張寬度比屏幕少一截，露出下一張的邊，提示還能往右滑 */
  :is(#sample, #compare) .sample-panels { order: 1; min-width: 0; margin-top: 20px; }
  :is(#sample, #compare) .sp-deck { display: flex; align-items: flex-start; gap: 12px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  :is(#sample, #compare) .sp-deck::-webkit-scrollbar { display: none; }
  :is(#sample, #compare) .sp-deck::before, :is(#sample, #compare) .sp-deck::after { display: none; }
  :is(#sample, #compare) .sp-deck > * { flex: 0 0 calc(100% - 20px); min-width: 0; scroll-snap-align: start; }
  /* 按鈕：放到最下面，占滿一行 */
  :is(#sample, #compare) .side-cta { order: 2; justify-content: center; margin-top: 28px; }
}

/* 手機「閱讀全文」面板（2026-12-06，site.js 的 pageSection 生成）：從底部升起，九成屏高，頂部露出一小條原頁面；
   標題欄可以往下拖著收起；內容在面板裡滾動，背後的頁面不跟著滾；底部固定這一塊原來的按鈕。桌面上不會打開 */
.rp-sheet { position: fixed; inset: auto 0 0; width: 100%; max-width: none; height: 90svh; max-height: none; margin: 0; padding: 0;
  border: 0; border-radius: 12px 12px 0 0; background: var(--tex-paper), var(--c-page); color: var(--c-ink); overflow: hidden; }
.rp-sheet[open] { display: flex; flex-direction: column; animation: rs-up .32s var(--ease-out); }
.rp-sheet::backdrop { background: rgb(20 24 26 / .4); }
.rp-sheet[open]::backdrop { animation: nd-fade .32s; }
@keyframes rs-up { from { transform: translateY(100%); } }
html:has(.rp-sheet[open]) { overflow: hidden; }
.rs-head { position: relative; display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: 18px 20px 12px; border-bottom: var(--border); touch-action: none; }
.rs-grip { position: absolute; left: 50%; top: 7px; width: 36px; height: 4px; margin-left: -18px; border-radius: 2px; background: var(--c-line-strong); }
.rs-title { margin: 0; min-width: 0; font: 500 16px/1.4 var(--f-serif); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rs-close { flex: none; margin-right: -8px; padding: 8px; border: 0; background: none; font: inherit; font-size: 14px; color: var(--c-ink-2); cursor: pointer; }
.rs-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
/* 面板裡的那一頁：去掉卡片外框，直接鋪在面板上 */
.rs-body .report-page { padding: var(--s-4) 20px var(--s-6); border: 0; border-radius: 0; background: none; }
.rs-body .report-page::before { display: none; }
.rs-body .rp-more { display: none; }
.rs-foot { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: var(--border); background: var(--tex-paper), var(--c-page); }
.rs-foot .btn { width: 100%; justify-content: center; }
@media (prefers-reduced-motion: reduce) { .rp-sheet[open], .rp-sheet[open]::backdrop { animation: none; } }
