/* 知命 A：水墨朱砂 */
:root {
  --paper: #f3eee4;
  --paper-2: #ebe4d6;
  --card: rgba(250, 247, 240, .92);
  --ink: #1d1b19;
  --ink-2: #4a4540;
  --ink-3: #8a837a;
  --line: #d9d0c0;
  --red: #9e2b25;
  --red-2: #b8433a;
  --wood: #4f7a4a; --fire: #b8433a; --earth: #a77f45; --metal: #8f8a83; --water: #3f6585;
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", sans-serif;
  --radius: 6px;
  --shadow: 0 1px 2px rgba(60, 40, 20, .06), 0 8px 24px rgba(60, 40, 20, .06);
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; color: var(--ink); font-family: var(--sans); line-height: 1.7;
  background: var(--paper);
  background-image: radial-gradient(rgba(120, 90, 50, .05) 1px, transparent 1px);
  background-size: 3px 3px;
}
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 900; margin: 0; letter-spacing: .04em; }

/* ---------- 共用元件 ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5em; border: 0; cursor: pointer;
  font: 500 1rem var(--sans); letter-spacing: .2em; padding: .85em 1.6em; border-radius: var(--radius); transition: background .2s, transform .2s; }
.btn-red { background: var(--red); color: #fff8f0; }
.btn-red:hover { background: var(--red-2); }
.btn-red:active { transform: translateY(1px); }
.btn-sm { padding: .5em 1.4em; font-size: .95rem; }
.btn-block { width: 100%; }
.card { background: var(--card); border: 1px solid rgba(160, 140, 110, .18); border-radius: var(--radius); box-shadow: var(--shadow); }
.chip { display: inline-block; font: 500 .75rem var(--sans); letter-spacing: .1em; color: var(--red);
  background: #f4e1d4; padding: .2em .8em; border-radius: 99px; vertical-align: middle; }
.seal { display: inline-grid; place-items: center; height: 1.6em; margin-left: .35em; font: 600 .42em/1 var(--serif); padding: 0 .25em; color: var(--red); border: 1.5px solid var(--red); border-radius: 3px; vertical-align: top; }
.seal-lg { position: absolute; right: 28px; bottom: 28px; font-size: 1.8rem; opacity: .75; }

/* ---------- 導覽 ---------- */
.nav { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding: 14px clamp(16px, 5vw, 64px); background: rgba(243, 238, 228, .9); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.logo { font: 900 2rem/1 var(--serif); letter-spacing: .02em; display: inline-flex; align-items: flex-start; }
.logo.light { color: #f3eee4; }
.nav-links { display: flex; gap: clamp(16px, 3vw, 44px); font-family: var(--serif); font-size: 1.05rem; letter-spacing: .15em; }
.nav-links a { padding: 4px 0; border-bottom: 2px solid transparent; }
.nav-links a:hover, .nav-links a[aria-current] { border-color: var(--red); }

/* ---------- 首頁 hero ---------- */
.hero { position: relative; overflow: hidden; min-height: 600px; display: flex; align-items: center;
  padding: 56px clamp(16px, 5vw, 64px) 72px; border-bottom: 1px solid var(--line); }
.hero-art { position: absolute; right: 0; top: 0; height: 100%; width: 72%; object-fit: cover; object-position: right center;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%); mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  mix-blend-mode: multiply; }
/* 首頁山水動態：舞台照原圖 16:9 比例鋪滿（等同 object-fit: cover 靠右），特效用原圖百分比座標對位 */
.hero-scene { position: absolute; right: 0; top: 0; height: 100%; width: 72%; overflow: hidden; container-type: size;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, #000 30%); mask-image: linear-gradient(to right, transparent 0%, #000 30%);
  mix-blend-mode: multiply; }
.hs-defs { position: absolute; }
.hero-stage { position: absolute; right: 0; top: 50%; width: max(100cqw, calc(100cqh * 16 / 9)); aspect-ratio: 16 / 9; transform: translateY(-50%) translate(calc(var(--px, 0) * -14px), calc(var(--py, 0) * -8px)); }
.hero-stage > * { position: absolute; pointer-events: none; }
.hs-img { inset: 0; width: 100%; height: 100%; transform: scale(1.04); }
/* 用原圖局部當底再加位移濾鏡：L/T/W/H 是原圖百分比 */
.hs-river, .hs-fall { --L: 0; --T: 0; --W: 10; --H: 10; left: calc(var(--L) * 1%); top: calc(var(--T) * 1%); width: calc(var(--W) * 1%); height: calc(var(--H) * 1%);
  background: url(img/hero.webp) no-repeat; background-size: calc(10000% / var(--W)) calc(10000% / var(--H));
  background-position: calc(var(--L) / (100 - var(--W)) * 100%) calc(var(--T) / (100 - var(--H)) * 100%); transform: scale(1.04); transform-origin: calc(50% - (var(--L) + var(--W) / 2 - 50) * 100% / var(--W)) calc(50% - (var(--T) + var(--H) / 2 - 50) * 100% / var(--H)); }
.hs-river { --L: 79; --T: 66; --W: 21; --H: 30; filter: url(#hs-ripple);
  -webkit-mask-image: radial-gradient(ellipse 62% 60% at 62% 52%, #000 40%, transparent 100%); mask-image: radial-gradient(ellipse 62% 60% at 62% 52%, #000 40%, transparent 100%); }
.hs-river::after { content: ""; position: absolute; inset: 0; opacity: .8;
  background: repeating-linear-gradient(to bottom, transparent 0 7px, rgba(255, 253, 247, .55) 7px 8px, transparent 8px 13px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 20%, transparent 40%, #000 60%, transparent 80%, #000); mask-image: linear-gradient(90deg, transparent, #000 20%, transparent 40%, #000 60%, transparent 80%, #000);
  -webkit-mask-size: 200% 100%; mask-size: 200% 100%; animation: hs-glint 7s linear infinite; }
.hs-fall { filter: url(#hs-flow); overflow: hidden;
  -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 35%, transparent 100%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 35%, transparent 100%); }
/* 水絲：直條紋，用往下移動的斷續遮罩做出流下來的感覺 */
.hs-fall::after { content: ""; position: absolute; inset: 0; opacity: .75;
  background: repeating-linear-gradient(90deg, transparent 0 2px, rgba(255, 255, 251, .95) 2px 3px, transparent 3px 4px, rgba(255, 255, 251, .6) 4px 5px, transparent 5px 7px);
  -webkit-mask-image: repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 14px, #000 14px 30px, transparent 30px 38px); mask-image: repeating-linear-gradient(to bottom, #000 0 9px, transparent 9px 14px, #000 14px 30px, transparent 30px 38px);
  animation: hs-fall .9s linear infinite; }
.hs-fall-1 { --L: 93.4; --T: 43; --W: 3; --H: 16; }
.hs-fall-2 { --L: 60.8; --T: 68.5; --W: 4.4; --H: 14; }
.hs-fall-2::after { opacity: .5; }
/* 雲海：可無縫循環的雲霧貼圖，兩倍寬整條平移 */
.hs-mist { left: 30%; width: 70%; overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 85%, transparent); }
.hs-mist::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background: url(img/mist-a.webp) repeat-x 0 0 / 50% 100%;
  animation: hs-flow 40s linear infinite; }
.hs-mist-1 { top: 15%; height: 26%; opacity: .95; }
.hs-mist-2 { top: 40%; height: 20%; opacity: .9; }
.hs-mist-2::before { background-image: url(img/mist-b.webp); animation-duration: 32s; animation-direction: reverse; }
.hs-mist-3 { top: 70%; height: 30%; opacity: .85; left: 25%; width: 75%; transform: translateX(calc(var(--px, 0) * -18px)); }
.hs-mist-3::before { animation-duration: 26s; }
.hs-sun { left: 89.4%; top: 11.2%; width: 18%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: radial-gradient(circle, rgba(214, 86, 58, .42) 0 17%, rgba(214, 86, 58, .16) 32%, transparent 62%);
  animation: hs-breathe 7s ease-in-out infinite; }
/* 飛鳥：從右往左慢慢飛過天空，翅膀拍動 */
.hs-birds { left: 0; top: 0; width: 100%; height: 40%; }
.hs-birds i { position: absolute; left: 100%; top: 30%; width: 2.6%; animation: hs-fly 30s linear infinite; }
.hs-birds i:nth-child(2) { top: 38%; width: 2%; animation-delay: -1.6s; animation-duration: 31s; }
.hs-birds i:nth-child(3) { top: 24%; width: 1.6%; animation-delay: -3s; animation-duration: 32s; }
.hs-birds svg { display: block; width: 100%; overflow: visible; fill: none; stroke: #2b2622; stroke-width: 2.8; stroke-linecap: round; transform-origin: 50% 60%; animation: hs-flap .7s ease-in-out infinite alternate; }
.hs-birds i:nth-child(2) svg { animation-delay: -.3s; }
.hs-birds i:nth-child(3) svg { animation-delay: -.5s; }
@keyframes hs-breathe { 0%, 100% { opacity: .5; transform: scale(.9); } 50% { opacity: 1; transform: scale(1.08); } }
@keyframes hs-flow { to { transform: translateX(-50%); } }
@keyframes hs-fall { to { -webkit-mask-position: 0 38px; mask-position: 0 38px; } }
@keyframes hs-glint { from { -webkit-mask-position: 0 0; mask-position: 0 0; } to { -webkit-mask-position: -200% 0; mask-position: -200% 0; } }
@keyframes hs-flap { from { transform: scaleY(1.1); } to { transform: scaleY(-.6); } }
@keyframes hs-fly { 0% { left: 100%; translate: 0 0; opacity: 0; } 4% { opacity: 1; } 50% { translate: 0 -40%; } 70% { opacity: 1; } 80%, 100% { left: 40%; translate: 0 10%; opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .hero-stage *, .hero-stage *::before, .hero-stage *::after { animation: none !important; } .hs-river, .hs-fall { filter: none; } .hs-birds { display: none; } }
.hero-motto { position: absolute; right: clamp(16px, 4vw, 56px); top: 150px; display: flex; gap: 10px; writing-mode: vertical-rl;
  font: 600 1.15rem var(--serif); letter-spacing: .5em; color: var(--ink-2);
  text-shadow: 0 0 6px var(--paper), 0 0 12px var(--paper), 0 0 18px var(--paper); }
.hero-inner { position: relative; max-width: 620px; }
.hero h1 { font-size: clamp(2.8rem, 7vw, 5.2rem); line-height: 1.15; letter-spacing: .06em; }
.hero h1 em { font-style: normal; color: var(--red); }
.lead { font: 600 clamp(1.1rem, 2vw, 1.4rem) var(--serif); letter-spacing: .2em; margin: 14px 0 32px; color: var(--ink-2); }

.birth-form { display: grid; grid-template-columns: 1.2fr 1.2fr .8fr; gap: 14px 16px; padding: 24px; }
.birth-form label { display: grid; gap: 6px; font-size: .85rem; color: var(--ink-2); letter-spacing: .08em; }
.birth-form input, .birth-form select { font: 1rem var(--sans); color: var(--ink); background: #fffdf8; border: 1px solid var(--line);
  border-radius: var(--radius); padding: .65em .7em; width: 100%; min-width: 0; }
/* iPhone Safari 的日期欄有內建最小寬度又置中，會撐出卡片：拿掉原生外觀、改靠左 */
.birth-form input[type="date"] { -webkit-appearance: none; appearance: none; display: block; max-width: 100%; min-height: 2.9em; line-height: 1.4; text-align: left; }
.birth-form input[type="date"]::-webkit-date-and-time-value { text-align: left; margin: 0; }
.birth-form input[type="date"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.birth-form label { min-width: 0; }
.birth-form input:focus, .birth-form select:focus { outline: 2px solid rgba(158, 43, 37, .35); border-color: var(--red); }
.birth-form .btn { grid-column: 1 / -1; }

/* ---------- 區塊 ---------- */
.section { padding: 72px clamp(16px, 5vw, 64px); max-width: 1240px; margin: 0 auto; }
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-head h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); display: inline-flex; align-items: center; gap: 24px; }
.sec-head:not(.left) h2::before, .sec-head:not(.left) h2::after { content: ""; width: clamp(24px, 8vw, 100px); height: 1px; background: var(--ink); }
.sec-head p { color: var(--ink-2); letter-spacing: .15em; margin: 8px 0 0; }
.sec-head.left { text-align: left; }
.sec-head.left h2::after { content: ""; flex: 1; min-width: 60px; height: 1px; background: var(--line); }

.tools { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.tool { overflow: hidden; transition: transform .25s, box-shadow .25s; }
.tool:hover { transform: translateY(-4px); box-shadow: 0 16px 40px rgba(60, 40, 20, .12); }
.tool-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: var(--paper-2); }
.tool-art img { width: 100%; height: 100%; object-fit: cover; mix-blend-mode: multiply; }
.tool-mark { position: absolute; inset: 0; display: grid; place-items: center; text-align: center;
  font: 900 2.1rem/1.05 var(--serif); color: var(--red); }
/* 首頁三張工具卡動態：座標是原圖（4:3 裁成 16:9）上的百分比；離開畫面時暫停 */
.tool-fx { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.tool-fx > * { position: absolute; }
.tool-fx *, .tool-fx *::before, .tool-fx *::after { animation-play-state: paused !important; }
.tool-art.in-view .tool-fx *, .tool-art.in-view .tool-fx *::before, .tool-art.in-view .tool-fx *::after { animation-play-state: running !important; }
.tool-mark { z-index: 1; }
.tf-mist { left: 0; width: 100%; overflow: hidden; -webkit-mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); mask-image: linear-gradient(90deg, transparent, #000 15%, #000 85%, transparent); }
.tf-mist::before { content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 200%; background: url(img/mist-a.webp) repeat-x 0 0 / 50% 100%; animation: hs-flow 30s linear infinite; }
.tf-mist-1 { top: 22%; height: 36%; opacity: .75; }
.tf-mist-2 { top: 66%; height: 40%; opacity: .85; }
.tf-mist-2::before { background-image: url(img/mist-b.webp); animation-duration: 22s; animation-direction: reverse; }
.tf-mist-3 { top: 70%; height: 40%; width: 55%; opacity: .8; }
.tf-mist-3::before { animation-duration: 24s; }
/* 八字：濕墨光澤沿著墨圈繞行 */
.tf-enso { left: 50.6%; top: 49.5%; width: 63.3%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg, rgba(255, 250, 238, 0) 250deg, rgba(255, 250, 238, .22) 320deg, rgba(255, 252, 244, .7) 352deg, transparent 360deg);
  -webkit-mask-image: radial-gradient(circle closest-side, transparent 54%, #000 60%, #000 90%, transparent 97%); mask-image: radial-gradient(circle closest-side, transparent 54%, #000 60%, #000 90%, transparent 97%);
  animation: tf-spin 6s linear infinite; }
.fx-bazi ~ .tool-mark, .fx-ziwei ~ .tool-mark { animation: tf-ink 6s ease-in-out infinite; }
/* 紫微：朱紅掃描光繞星盤、星點閃爍、一顆亮星沿內圈運行 */
.tf-sweep { left: 58.3%; top: 48.5%; width: 68.4%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0deg 250deg, rgba(178, 48, 36, .06) 280deg, rgba(178, 48, 36, .22) 357deg, rgba(178, 48, 36, .5) 359deg, transparent 360deg);
  -webkit-mask-image: radial-gradient(circle closest-side, #000 96%, transparent 100%); mask-image: radial-gradient(circle closest-side, #000 96%, transparent 100%);
  animation: tf-spin 9s linear infinite; }
.tf-orbit { left: 58.3%; top: 48.5%; width: 45.6%; aspect-ratio: 1; translate: -50% -50%; border-radius: 50%; animation: tf-spin 14s linear infinite reverse; }
.tf-orbit b { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: #c2412f;
  box-shadow: 0 0 0 3px rgba(194, 65, 47, .18), 0 0 14px 4px rgba(194, 65, 47, .45); }
.tf-twinkle { left: var(--x); top: var(--y); width: 14px; height: 14px; margin: -7px; border-radius: 50%;
  background: radial-gradient(circle, #d4462f 0 22%, rgba(212, 70, 50, .3) 34%, transparent 62%);
  animation: tf-twinkle 3.2s ease-in-out var(--d) infinite; }
/* 塔羅：光從牌面掃過、月亮牌星星閃爍、梅花瓣飄落 */
.tf-glint { inset: 0; background: linear-gradient(105deg, transparent 35%, rgba(255, 251, 240, .5) 47%, rgba(255, 253, 247, .75) 50%, rgba(255, 251, 240, .5) 53%, transparent 65%);
  animation: tf-glint 6.5s ease-in-out infinite; }
.tf-star { left: var(--x); top: var(--y); width: calc(26px * var(--s)); aspect-ratio: 1; translate: -50% -50%;
  background: radial-gradient(circle, #fffaf0 0 8%, rgba(255, 248, 230, .5) 22%, transparent 60%);
  clip-path: polygon(50% 0, 56% 44%, 100% 50%, 56% 56%, 50% 100%, 44% 56%, 0 50%, 44% 44%);
  animation: tf-star 2.6s ease-in-out var(--d) infinite; }
.tf-star::after { content: ""; position: absolute; inset: 30%; border-radius: 50%; background: rgba(255, 252, 240, .9); filter: blur(2px); }
.tf-petal { left: var(--x); top: -8%; width: calc(11px * var(--s)); height: calc(8px * var(--s)); border-radius: 80% 0 80% 0;
  background: radial-gradient(circle at 30% 30%, #e0584a, #a8261c 75%); opacity: .9;
  animation: tf-petal var(--t) linear var(--d) infinite; }
@keyframes tf-spin { to { transform: rotate(360deg); } }
@keyframes tf-ink { 0%, 100% { text-shadow: 0 0 0 rgba(158, 43, 37, 0); } 50% { text-shadow: 0 0 14px rgba(158, 43, 37, .45); } }
@keyframes tf-twinkle { 0%, 100% { opacity: 0; transform: scale(.4); } 45% { opacity: 1; transform: scale(1.25); } 60% { opacity: .8; transform: scale(1); } }
@keyframes tf-glint { 0% { transform: translateX(-110%); } 55%, 100% { transform: translateX(110%); } }
@keyframes tf-star { 0%, 100% { opacity: .15; transform: scale(.5) rotate(0deg); } 50% { opacity: 1; transform: scale(1.15) rotate(45deg); } }
@keyframes tf-petal { 0% { transform: translate(0, 0) rotate(0deg); } 25% { transform: translate(calc(var(--w) * .6), 30cqh) rotate(120deg); }
  50% { transform: translate(calc(var(--w) * -.2), 60cqh) rotate(220deg); } 75% { transform: translate(var(--w), 90cqh) rotate(320deg); } 100% { transform: translate(calc(var(--w) * .4), 125cqh) rotate(420deg); } }
.fx-tarot { container-type: size; }
@media (prefers-reduced-motion: reduce) { .tool-fx { display: none; } .tool-mark { animation: none !important; } }
.tool-body { position: relative; padding: 18px 22px 22px; }
.tool-body h3 { font-size: 1.5rem; }
.tool-body p { margin: 6px 0 0; color: var(--ink-2); }
.arrow { position: absolute; right: 22px; bottom: 22px; width: 34px; height: 34px; display: grid; place-items: center;
  border: 1.5px solid var(--red); color: var(--red); border-radius: 50%; }
.soon { position: absolute; right: 22px; bottom: 24px; font-size: .78rem; color: var(--ink-3); letter-spacing: .1em; }
.is-soon .tool-art img { filter: grayscale(.3); }

.ai-card { position: relative; display: grid; grid-template-columns: 200px 1fr; gap: 40px; align-items: center; padding: 36px 48px; }
.ai-art { position: relative; width: 180px; height: 180px; }
.ai-disc { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; background: var(--paper-2); isolation: isolate;
  clip-path: circle(50% at 50% 50%); -webkit-mask-image: -webkit-radial-gradient(white, black); }
.ai-disc img { width: 100%; height: 100%; object-fit: cover; object-position: 75% center; mix-blend-mode: multiply;
  transform-origin: 70% 55%; animation: ai-kenburns 22s ease-in-out infinite alternate; }
.ai-mist { position: absolute; top: 45%; height: 45%; opacity: .9; }
.ai-mist::before { animation-duration: 18s; }
/* 圓圖外圈：羅盤刻度慢慢轉，一顆朱點繞行 */
.ai-dial { position: absolute; inset: -16px; width: calc(100% + 32px); height: calc(100% + 32px); overflow: visible; animation: tf-spin 80s linear infinite; }
.ai-dial circle { fill: none; stroke: var(--red); stroke-opacity: .45; stroke-width: .5; stroke-dasharray: 1 4; }
.ai-dial .ai-dial-fine { stroke: var(--ink-3); stroke-opacity: .5; stroke-width: .3; stroke-dasharray: 22 8; }
.ai-orbit { position: absolute; inset: -16px; border-radius: 50%; animation: tf-spin 16s linear infinite; }
.ai-orbit b { position: absolute; left: 50%; top: 0; width: 7px; height: 7px; margin: -3.5px; border-radius: 50%; background: var(--red);
  box-shadow: 0 0 10px 3px rgba(158, 43, 37, .35); }
@keyframes ai-kenburns { from { transform: scale(1.08) translate(0, 0); } to { transform: scale(1.3) translate(-6%, 3%); } }
.ai-text h3 { font-size: 1.7rem; margin: 10px 0 12px; }
.ai-text p { margin: 0; color: var(--ink-2); font-size: 1.05rem; line-height: 2; }

.trust { position: relative; overflow: hidden; padding: 88px 16px 96px; text-align: center; }
.trust-art { position: absolute; left: 0; right: 0; top: -14%; width: 100%; height: 128%; object-fit: cover; object-position: bottom;
  opacity: .55; mix-blend-mode: multiply; transform: translateY(calc(var(--p, 0) * 36px)); }
/* 雲海兩層、隨捲動有不同景深，兩隻飛鳥越過山頭 */
.trust-mist { position: absolute; left: 0; width: 100%; pointer-events: none; }
.trust-mist-1 { top: 28%; height: 45%; opacity: .7; transform: translateY(calc(var(--p, 0) * 22px)); }
.trust-mist-1::before { animation-duration: 70s; }
.trust-mist-2 { top: 58%; height: 50%; opacity: .85; transform: translateY(calc(var(--p, 0) * -18px)); }
.trust-mist-2::before { background-image: url(img/mist-b.webp); animation-duration: 38s; animation-direction: reverse; }
.trust-birds { position: absolute; left: 0; top: 0; width: 100%; height: 55%; pointer-events: none; }
.trust-birds i { width: 1.6%; min-width: 16px; animation-duration: 38s; }
.trust-birds i:nth-child(2) { width: 1.2%; min-width: 12px; animation-duration: 39s; }
.trust-birds svg { stroke: #5a524b; }
/* 進入畫面時：文字像墨一樣逐字暈開、盾牌描線、印章蓋下（由 home-motion.js 拆字並加上 .revealed） */
.reveal-ready .ch { opacity: 0; }
.reveal-ready.revealed .ch { animation: ink-in .7s ease-out forwards; animation-delay: calc(var(--i) * 30ms + var(--base, 0ms)); }
.reveal-ready .chip, .reveal-ready .ai-text h3 { opacity: 0; }
.reveal-ready.revealed .chip, .reveal-ready.revealed .ai-text h3 { animation: fade-up .6s ease-out forwards; }
.reveal-ready.revealed .ai-text h3 { animation-delay: .15s; }
.reveal-ready .seal-lg { opacity: 0; }
.reveal-ready.revealed .seal-lg { animation: stamp .5s cubic-bezier(.3, 1.5, .5, 1) var(--seal-delay, 2s) forwards; }
.reveal-ready .trust-shield path { stroke-dasharray: 1; stroke-dashoffset: 1; }
.reveal-ready.revealed .trust-shield path { animation: draw 1.2s ease-in-out .1s forwards; }
.reveal-ready.revealed .trust-shield path + path { animation-delay: .9s; animation-duration: .5s; }
@keyframes ink-in { from { opacity: 0; text-shadow: 0 0 10px currentColor, 0 0 3px currentColor; } 60% { opacity: 1; } to { opacity: 1; text-shadow: none; } }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes stamp { 0% { opacity: 0; transform: scale(1.9) rotate(-14deg); } 60% { opacity: .85; transform: scale(.94) rotate(2deg); } 100% { opacity: .75; transform: none; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
@media (prefers-reduced-motion: reduce) { .ai-disc img, .ai-dial, .ai-orbit, .tf-mist::before { animation: none !important; } .trust-birds { display: none; } .trust-art, .trust-mist { transform: none !important; } }
.trust-inner { position: relative; display: inline-flex; align-items: center; gap: 18px; text-align: left; }
.trust h2 { font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: .12em; }
.trust p { margin: 4px 0 0; color: var(--ink-2); letter-spacing: .1em; }

/* ---------- 頁尾 ---------- */
.footer { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 24px 40px; align-items: center;
  padding: 40px clamp(16px, 5vw, 64px) 24px; background: #23201d; color: #cfc6b8; }
.footer-brand { display: flex; align-items: flex-start; gap: 6px; }
.footer-brand p { margin: 0 0 0 20px; padding-left: 20px; border-left: 1px solid #4a443d; font-size: .85rem; line-height: 1.8; }
.footer-brand .seal { font-size: 2rem; }
.footer nav { display: flex; gap: 22px; flex-wrap: wrap; font-size: .9rem; }
.footer nav a:hover { color: #fff; }
.footer .muted { color: #9d9487; }
.copy { grid-column: 1 / -1; margin: 12px 0 0; padding-top: 16px; border-top: 1px solid #3a352f; font-size: .8rem; color: #8a8175; }

/* ---------- 結果頁 ---------- */
.r-hero { position: relative; overflow: hidden; padding: 44px clamp(16px, 5vw, 64px) 52px; border-bottom: 1px solid var(--line); }
.r-hero .hero-art { width: 60%; }
.r-hero-inner { position: relative; }
.kicker { margin: 0 0 8px; color: var(--red); font: 600 .95rem var(--serif); letter-spacing: .3em; }
.r-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.4; }

.r-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; max-width: 1240px; margin: 0 auto; padding: 32px clamp(16px, 5vw, 64px) 0; align-items: start; }
.r-main, .r-side { display: grid; gap: 24px; }
.r-side { position: sticky; top: 88px; }
.r-card { padding: 26px 28px; }
.r-card h2 { font-size: 1.35rem; margin-bottom: 18px; }
.r-card h2 small { font: 400 .85rem var(--sans); color: var(--ink-3); margin-left: 10px; letter-spacing: .05em; }
.r-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.re summary { cursor: pointer; font-size: .85rem; color: var(--ink-2); border: 1px solid var(--line); border-radius: 99px; padding: .3em 1em; list-style: none; }
.re[open] summary { color: var(--red); border-color: var(--red); }
.birth-form.compact { margin-top: 12px; padding: 0; grid-template-columns: 1fr 1fr 80px auto; align-items: end; }
.birth-form.compact .btn { grid-column: auto; padding: .7em 1.2em; }

.dm { display: flex; gap: 22px; align-items: center; margin-bottom: 22px; }
.dm-art { width: 108px; height: 108px; border-radius: 50%; object-fit: cover; mix-blend-mode: multiply; border: 1px solid var(--line); }
.dm-label { margin: 0; font: 600 1.25rem var(--serif); }
.dm-gan { font-size: 2.6rem; margin-left: .3em; letter-spacing: .05em; }
.dm-image { margin: 0 0 6px; font-family: var(--serif); color: var(--ink-2); }
.meta { margin: 0; font-size: .85rem; color: var(--ink-3); }

.pillars { display: grid; grid-template-columns: repeat(4, 1fr); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pillar { text-align: center; border-left: 1px solid var(--line); padding-bottom: 14px; background: rgba(255, 253, 248, .6); }
.pillar:first-child { border-left: 0; }
.pillar.is-day { background: #f6ece2; }
.pillar-name { font-family: var(--serif); font-weight: 600; padding: 10px 0; background: var(--paper-2); border-bottom: 1px solid var(--line); }
.pillar-shishen { font-size: .8rem; color: var(--ink-3); margin: 10px 0 2px; letter-spacing: .1em; }
.pillar.is-day .pillar-shishen { color: var(--red); font-weight: 500; }
.pillar-char { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 6px 0; }
.pillar-char .char { font: 900 clamp(2rem, 4.5vw, 3rem)/1.15 var(--serif); }
.wx-tag { font-size: .7rem; width: 1.8em; height: 1.8em; border-radius: 50%; display: grid; place-items: center; color: #fff; }
.pillar-hide { font-size: .8rem; color: var(--ink-3); margin-top: 6px; }
.wx-wood .char, .dm-gan.wx-wood { color: var(--wood); } .wx-wood .wx-tag { background: var(--wood); }
.wx-fire .char, .dm-gan.wx-fire { color: var(--fire); } .wx-fire .wx-tag { background: var(--fire); }
.wx-earth .char, .dm-gan.wx-earth { color: var(--earth); } .wx-earth .wx-tag { background: var(--earth); }
.wx-metal .char, .dm-gan.wx-metal { color: #6f6a63; } .wx-metal .wx-tag { background: var(--metal); }
.wx-water .char, .dm-gan.wx-water { color: var(--water); } .wx-water .wx-tag { background: var(--water); }

.el-wrap { display: grid; grid-template-columns: 1.3fr 1fr; gap: 28px; align-items: center; }
.elements { display: grid; gap: 12px; }
.el-row { display: grid; grid-template-columns: 2em 1fr 3.5em; align-items: center; gap: 12px; }
.el-name { font: 900 1.2rem var(--serif); }
.el-track { height: 10px; background: var(--paper-2); border-radius: 99px; overflow: hidden; }
.el-fill { display: block; height: 100%; border-radius: 99px; transition: width .8s ease; }
.el-pct { font-size: .85rem; color: var(--ink-3); text-align: right; }
.wx-wood .el-fill { background: var(--wood); } .wx-fire .el-fill { background: var(--fire); } .wx-earth .el-fill { background: var(--earth); }
.wx-metal .el-fill { background: var(--metal); } .wx-water .el-fill { background: var(--water); }
.wx-wood .el-name { color: var(--wood); } .wx-fire .el-name { color: var(--fire); } .wx-earth .el-name { color: var(--earth); }
.wx-metal .el-name { color: #6f6a63; } .wx-water .el-name { color: var(--water); }
.el-summary { margin: 0; padding: 18px 20px; background: rgba(235, 228, 214, .6); border-radius: var(--radius); color: var(--ink-2); font-size: .92rem; }

.dayun { display: grid; grid-template-columns: repeat(8, 1fr); gap: 8px; }
.yun { text-align: center; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 4px; background: rgba(255, 253, 248, .6); }
.yun.is-current { border-color: var(--red); background: #f8e7df; }
.yun-years { font-size: .72rem; color: var(--ink-3); }
.yun-gz { font: 900 1.25rem var(--serif); margin: 4px 0; }
.yun-age { font-size: .75rem; color: var(--ink-2); }
.yun-now { font-size: .7rem; color: var(--red); margin-top: 4px; letter-spacing: .1em; }

.reading article { padding: 16px 0; border-top: 1px solid var(--line); }
.reading article:first-of-type { border-top: 0; padding-top: 0; }
.reading h3 { font-size: 1.1rem; margin-bottom: 6px; }
.reading h3::before { content: "◆"; color: var(--red); font-size: .7em; margin-right: .5em; vertical-align: .15em; }
.reading p { margin: 0; color: var(--ink-2); font-size: .95rem; }

.lock-card { padding: 28px; border-radius: var(--radius); color: #efe7da; background: #22201d;
  background-image: linear-gradient(160deg, rgba(158, 43, 37, .18), transparent 60%); box-shadow: var(--shadow); }
.lock-card h2 { font-size: 1.35rem; display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.lock-card h2 span { color: #e9b9a6; }
.lock-card p { color: #bdb3a4; font-size: .9rem; }
.lock-card ul { list-style: none; padding: 0; margin: 0 0 22px; display: grid; gap: 8px; font-size: .92rem; }
.lock-card li::before { content: "✓"; color: #d9a35c; margin-right: .6em; }

.articles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.article { overflow: hidden; display: block; color: inherit; text-decoration: none; transition: transform .2s, box-shadow .2s; }
.article:hover { transform: translateY(-3px); box-shadow: 0 10px 24px rgba(60,40,20,.12); }
.article:hover h3 { color: var(--red); }
.article img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; mix-blend-mode: multiply; background: var(--paper-2); }
.article h3 { font-size: 1.05rem; line-height: 1.5; padding: 14px 16px 0; }
.article p { margin: 6px 16px 16px; font-size: .85rem; color: var(--ink-3); }

/* ---------- 手機 ---------- */
@media (max-width: 960px) {
  .r-layout { grid-template-columns: 1fr; }
  .r-side { position: static; }
  .articles { grid-template-columns: repeat(2, 1fr); }
  .dayun { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .nav { gap: 12px; backdrop-filter: none; background: var(--paper); } /* backdrop-filter 會讓底部固定導覽被困在 header 裡 */
  .nav-links { position: fixed; bottom: 0; left: 0; right: 0; justify-content: space-around; padding: 10px 8px calc(10px + env(safe-area-inset-bottom));
    background: rgba(243, 238, 228, .96); border-top: 1px solid var(--line); z-index: 20; }
  body { padding-bottom: 56px; }
  .hero { min-height: 0; padding-top: 220px; align-items: flex-end; }
  .hero-art { width: 100%; height: 300px; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
  .hero-scene { width: 100%; height: 300px; -webkit-mask-image: linear-gradient(to bottom, #000 55%, transparent); mask-image: linear-gradient(to bottom, #000 55%, transparent); }
  .hs-river, .hs-fall { display: none; }
  .hero-motto { display: none; }
  .birth-form { grid-template-columns: 1.5fr 1fr; padding: 18px; }
  .birth-form label:first-child { grid-column: 1 / -1; }
  .birth-form.compact { grid-template-columns: 1fr 1fr; }
  .birth-form.compact .btn { grid-column: 1 / -1; }
  .tools { grid-template-columns: 1fr; }
  .ai-card { grid-template-columns: 1fr; padding: 28px 22px; gap: 20px; justify-items: center; text-align: center; }
  .ai-art { width: 140px; height: 140px; }
  .ai-card .seal-lg { top: 18px; right: 18px; bottom: auto; font-size: 1.45rem; }
  .ai-text p br { display: none; }
  .trust-inner { flex-direction: column; text-align: center; }
  .footer { grid-template-columns: 1fr; }
  .r-hero .hero-art { width: 100%; opacity: .45; }
  .r-card { padding: 20px 16px; }
  .dm-art { width: 80px; height: 80px; }
  .el-wrap { grid-template-columns: 1fr; }
  .pillar-char { flex-direction: column; gap: 2px; }
  .pillar-hide { font-size: .7rem; padding: 0 4px; line-height: 1.5; }
  .articles { grid-template-columns: 1fr; }
}

/* ---------- 紫微命盤 ---------- */
.zw-layout { display: grid; grid-template-columns: 1fr 360px; gap: 24px; max-width: 1320px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 48px) 72px; align-items: start; }
.zw-side { display: grid; gap: 24px; position: sticky; top: 88px; }
.zw-layout > * { min-width: 0; }
.zw-scroll { overflow-x: auto; margin: 0 -4px; padding: 0 4px 4px; }
.zw-board { display: grid; grid-template-columns: repeat(4, minmax(150px, 1fr)); grid-template-rows: repeat(4, minmax(150px, auto));
  border: 1.5px solid var(--ink); background: var(--ink); gap: 1px; min-width: 640px; }
.zw-cell { position: relative; display: flex; flex-direction: column; background: #fbf8f1; padding: 8px 8px 6px; min-height: 150px; }
.zw-cell.is-soul { background: #f8e9df; box-shadow: inset 0 0 0 2px var(--red); }
.zw-cell.is-decadal .zw-decadal { background: var(--ink); color: #fbf8f1; }
.zw-stars { display: flex; flex-wrap: wrap; align-content: flex-start; gap: 2px 8px; flex: 1; }
.zw-major { font: 900 1.05rem/1.4 var(--serif); color: var(--red); white-space: nowrap; }
.zw-minor { font-size: .82rem; color: var(--ink-2); white-space: nowrap; }
.zw-bright { font: 400 .7rem var(--sans); color: var(--ink-3); margin-left: 1px; }
.zw-mut { display: inline-grid; place-items: center; width: 1.35em; height: 1.35em; margin-left: 2px; font: 600 .68rem var(--sans);
  color: #fff; border-radius: 3px; vertical-align: 2px; }
.mut-祿 { background: #4f7a4a; } .mut-權 { background: #a77f45; } .mut-科 { background: #3f6585; } .mut-忌 { background: var(--red); }
.zw-adj { font-size: .72rem; color: var(--ink-3); margin: 4px 0; }
.zw-foot { display: flex; justify-content: space-between; align-items: center; gap: 4px; border-top: 1px dashed var(--line); padding-top: 5px; font-size: .78rem; }
.zw-decadal { color: var(--ink-3); padding: 0 4px; border-radius: 3px; }
.zw-name { font: 900 .95rem var(--serif); color: var(--ink); }
.zw-body { font-style: normal; font-size: .68rem; color: #fff; background: var(--ink-2); border-radius: 3px; padding: 0 3px; margin-left: 3px; vertical-align: 2px; }
.zw-sb { font-family: var(--serif); color: var(--ink-2); }
.zw-center { grid-row: 2 / 4; grid-column: 2 / 4; background: var(--paper); display: grid; align-content: center; gap: 6px; padding: 20px 28px;
  background-image: url(img/ziwei.webp); background-size: cover; background-position: center; background-blend-mode: soft-light; }
.zw-info { display: grid; grid-template-columns: 6em 1fr; gap: 8px; font-size: .9rem; padding: 4px 0; border-bottom: 1px solid rgba(160, 140, 110, .25); }
.zw-info span { color: var(--ink-3); }
.zw-info strong { font: 600 1rem var(--serif); }
.zw-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .78rem; color: var(--ink-3); margin: 12px 0 0; }
.lg-soul::before, .lg-dec::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: 5px; vertical-align: -1px; border-radius: 2px; }
.lg-soul::before { background: #f8e9df; box-shadow: inset 0 0 0 2px var(--red); }
.lg-dec::before { background: var(--ink); }
.reading .zw-soul-big { font: 900 2.2rem var(--serif); color: var(--red); margin: 0 0 4px; letter-spacing: .1em; }
.zw-reading { padding: 16px 0 0; margin-top: 16px; border-top: 1px solid var(--line); }
.zw-reading h3 { font-size: 1.2rem; }
.zw-reading h3 small { font: 400 .78rem var(--sans); color: var(--ink-3); margin-left: 8px; letter-spacing: .05em; }
.zw-reading p { margin: 6px 0 0; color: var(--ink-2); font-size: .95rem; }
@media (max-width: 1100px) {
  .zw-layout { grid-template-columns: 1fr; }
  .zw-side { position: static; }
}
@media (max-width: 720px) {
  .zw-board { grid-template-columns: repeat(4, 150px); }
  .zw-scroll::before { content: "← 左右滑動看完整命盤 →"; display: block; font-size: .75rem; opacity: .6; text-align: center; margin-bottom: 6px; position: sticky; left: 0; }
  .zw-center { padding: 14px 18px; }
}

/* ---------- 線上塔羅 ---------- */
.btn-outline { color: var(--red); background: transparent; border: 1.5px solid var(--red); }
.btn-outline:hover { background: #f4e1d4; }
.tarot { max-width: 1100px; margin: 0 auto; padding: 40px clamp(16px, 4vw, 48px) 72px; text-align: center; --card-w: 150px; }
.tr-tabs { display: inline-flex; gap: 6px; padding: 5px; background: var(--paper-2); border-radius: 99px; flex-wrap: wrap; justify-content: center; }
.tr-tabs button { border: 0; background: transparent; font: 600 1rem var(--serif); letter-spacing: .1em; color: var(--ink-2);
  padding: .55em 1.4em; border-radius: 99px; cursor: pointer; }
.tr-tabs button[aria-selected="true"] { background: var(--red); color: #fff8f0; }
.tr-spread-desc { color: var(--ink-2); margin: 14px 0 18px; letter-spacing: .08em; }
.tr-q-label { display: grid; gap: 6px; max-width: 460px; margin: 0 auto 28px; font-size: .85rem; color: var(--ink-2); text-align: left; }
.tr-question { font: 1rem var(--sans); padding: .7em .9em; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf8; }
.tr-question:focus { outline: 2px solid rgba(158, 43, 37, .35); border-color: var(--red); }
.tr-table { padding: 32px 16px 28px; border-radius: var(--radius); border: 1px solid var(--line);
  background: radial-gradient(ellipse at 50% 30%, #fbf8f1, var(--paper-2)); box-shadow: inset 0 0 60px rgba(120, 90, 50, .08); }
.tr-slots { display: flex; justify-content: center; gap: clamp(10px, 2.5vw, 28px); flex-wrap: wrap; }
.tr-slot { display: grid; gap: 10px; justify-items: center; }
.tr-slot-card { width: var(--card-w); aspect-ratio: 2 / 3; border: 1.5px dashed rgba(158, 43, 37, .35); border-radius: 8px; }
.tr-slot.is-filled .tr-slot-card { border-color: transparent; }
.tr-slot-label { font: 600 .9rem var(--serif); color: var(--ink-2); letter-spacing: .08em; }
.tr-hint { min-height: 1.7em; margin: 22px 0 8px; font-family: var(--serif); color: var(--red); letter-spacing: .1em; }
.tr-actions { display: flex; justify-content: center; gap: 12px; margin-top: 18px; }
.tr-actions .btn { min-width: 160px; }

/* 扇形牌堆 */
.tr-fan { position: relative; height: 0; transition: height .4s; }
.tarot:not(.is-picking) .tr-fan { display: none; }
.is-picking .tr-fan { height: 210px; margin-bottom: 36px; }
.tr-back { position: absolute; left: 50%; bottom: 0; width: 92px; aspect-ratio: 2 / 3; margin-left: -46px; padding: 0; cursor: pointer;
  border: 1px solid rgba(29, 27, 25, .25); border-radius: 6px; background: #f3eee4 url(img/tarot/back.webp) center / cover;
  box-shadow: 0 4px 10px rgba(60, 40, 20, .18); transform-origin: 50% 160%;
  transform: translateX(calc((var(--i) - (var(--n) - 1) / 2) * 30px)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 2.6deg));
  transition: transform .25s, opacity .25s; animation: deal .5s backwards; animation-delay: calc(var(--i) * 25ms); }
.tr-back:hover, .tr-back:focus-visible { transform: translateX(calc((var(--i) - (var(--n) - 1) / 2) * 30px)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 2.6deg)) translateY(-18px); outline: none; box-shadow: 0 10px 22px rgba(158, 43, 37, .3); }
.tr-back.is-picked { opacity: 0; pointer-events: none; }
@keyframes deal { from { opacity: 0; transform: translateY(40px); } }

/* 翻牌 */
.tc { width: 100%; height: 100%; perspective: 900px; }
.tc-inner { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .7, .3, 1); animation: land .4s; }
@keyframes land { from { transform: translateY(30px) scale(.9); opacity: 0; } }
.tc.is-flipped .tc-inner { transform: rotateY(180deg); }
.tc-back, .tc > .tc-inner > .tc-face { position: absolute; inset: 0; backface-visibility: hidden; -webkit-backface-visibility: hidden; border-radius: 8px; overflow: hidden; }
.tc-back { background: #f3eee4 url(img/tarot/back.webp) center / cover; box-shadow: 0 6px 16px rgba(60, 40, 20, .2); }
.tc > .tc-inner > .tc-face { transform: rotateY(180deg); box-shadow: 0 8px 22px rgba(60, 40, 20, .25); }
.tc.is-reversed > .tc-inner > .tc-face { transform: rotateY(180deg) rotate(180deg); }
.tc-face { background: #fbf8f1; }
.tc-face img { width: 100%; height: 100%; object-fit: cover; }
.tc-fallback { height: 100%; display: grid; place-content: center; gap: 6px; padding: 10px; text-align: center; border: 1px solid var(--line); border-radius: inherit;
  background: radial-gradient(circle at 50% 35%, #fff, #efe7d8); }
.tc-fb-mark { font: 900 2.2rem var(--serif); color: var(--red); }
.tc-fb-name { font: 900 1.05rem var(--serif); letter-spacing: .1em; }
.tc-fb-en { font-size: .65rem; color: var(--ink-3); letter-spacing: .05em; }

/* 解讀 */
.tr-result { display: grid; gap: 18px; margin-top: 36px; text-align: left; }
.tr-q { font: 600 1.1rem var(--serif); text-align: center; color: var(--ink-2); margin: 0; }
.tr-read { display: grid; grid-template-columns: 130px 1fr; gap: 24px; padding: 22px; background: var(--card); border: 1px solid rgba(160, 140, 110, .18); border-radius: var(--radius); box-shadow: var(--shadow); }
.tr-read > .tc-face { aspect-ratio: 2 / 3; border-radius: 6px; overflow: hidden; box-shadow: 0 4px 12px rgba(60, 40, 20, .2); }
.tr-read.is-reversed > .tc-face { transform: rotate(180deg); }
.tr-pos { margin: 0; font-size: .8rem; color: var(--red); letter-spacing: .2em; }
.tr-read h3 { font-size: 1.5rem; margin: 2px 0 6px; }
.tr-orient { font: 500 .78rem var(--sans); margin-left: 10px; padding: .15em .7em; border-radius: 99px; background: #e7efe3; color: var(--wood); vertical-align: middle; letter-spacing: .1em; }
.tr-orient.rev { background: #f4e1d4; color: var(--red); }
.tr-key { margin: 0 0 8px; font-family: var(--serif); font-weight: 600; color: var(--ink-2); }
.tr-text { margin: 0; color: var(--ink-2); line-height: 1.9; }
.tr-summary { margin: 4px 0 0; padding: 16px 20px; border-left: 3px solid var(--red); background: rgba(235, 228, 214, .6); color: var(--ink-2); font-family: var(--serif); }
.tr-lock { max-width: 620px; margin: 48px auto 0; text-align: center; }
.tr-lock h2 { justify-content: center; }
.tr-lock .btn { margin-top: 6px; }

@media (max-width: 720px) {
  .tarot { --card-w: 92px; }
  .tr-slots[data-count="5"] { --card-w: 84px; gap: 8px; }
  .tr-slots[data-count="1"] { --card-w: 150px; }
  .tr-slot-label { font-size: .75rem; }
  .is-picking .tr-fan { height: 150px; }
  .tr-back { width: 64px; margin-left: -32px;
    transform: translateX(calc((var(--i) - (var(--n) - 1) / 2) * 13px)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 3deg)); }
  .tr-back:hover, .tr-back:focus-visible { transform: translateX(calc((var(--i) - (var(--n) - 1) / 2) * 13px)) rotate(calc((var(--i) - (var(--n) - 1) / 2) * 3deg)) translateY(-12px); }
  .tr-read { grid-template-columns: 88px 1fr; gap: 14px; padding: 16px; }
  .tr-read h3 { font-size: 1.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .tc-inner, .tr-back { transition: none; animation: none; }
}

/* ---------- 每日運勢 ---------- */
.daily { max-width: 1200px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 40px; }
.d-head { display: grid; grid-template-columns: 48px 1fr 48px; align-items: center; gap: 12px; text-align: center; padding: 36px 0 28px; }
.d-head h1 { font-size: clamp(1.7rem, 4vw, 2.4rem); }
.d-nav { width: 44px; height: 44px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 50%; font-size: 1.6rem; color: var(--red); background: var(--card); }
.d-nav:hover { border-color: var(--red); }
.d-back { display: inline-block; margin-top: 6px; font-size: .85rem; color: var(--red); border-bottom: 1px solid currentColor; }
.d-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 24px; align-items: start; }
.d-lead { color: var(--ink-2); margin: 0 0 6px; }
.link-btn { border: 0; background: none; padding: 0; font: .85rem var(--sans); color: var(--ink-3); text-decoration: underline; cursor: pointer; }
.p-title { font-size: clamp(1.5rem, 3vw, 2rem); color: var(--red); margin: 6px 0 18px; }
.p-body { display: grid; grid-template-columns: 200px 1fr; gap: 24px; align-items: start; }
.p-stars { display: grid; gap: 8px; padding: 16px 18px; background: rgba(235, 228, 214, .55); border-radius: var(--radius); }
.star-row { display: flex; justify-content: space-between; align-items: center; font-family: var(--serif); font-weight: 600; }
.stars { letter-spacing: 1px; font-size: 1.05rem; }
.stars i { font-style: normal; color: #d8cfbf; }
.stars i.on { color: var(--red); }
.stars i.half { background: linear-gradient(90deg, var(--red) 50%, #d8cfbf 50%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.p-text { margin: 0 0 10px; font-size: 1.05rem; line-height: 1.9; }
.p-rel { margin: 0 0 10px; padding: 10px 14px; border-left: 3px solid var(--red); background: #f8ece4; color: var(--ink-2); font-size: .92rem; }
.p-tip { margin: 0; color: var(--ink-2); font-size: .92rem; }
.p-tip span { font-weight: 500; color: var(--ink); }
.lucky { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 22px 0 0; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.lucky div { background: #fbf8f1; padding: 12px 14px; }
.lucky dt { font-size: .78rem; color: var(--ink-3); letter-spacing: .1em; }
.lucky dd { margin: 2px 0 0; font: 600 1.05rem var(--serif); display: flex; align-items: center; gap: 6px; }
.dot { width: 14px; height: 14px; border-radius: 50%; display: inline-block; border: 1px solid rgba(0, 0, 0, .15); }

.d-card-sec { text-align: center; }
.d-card { width: 170px; aspect-ratio: 2 / 3; margin: 16px auto; }
.daily-tc { padding: 0; border: 0; background: none; cursor: pointer; display: block; }
.daily-tc:not(.is-flipped) .tc-inner { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-6px); } }
.d-card-info { text-align: left; }
.d-card-info h3 { font-size: 1.4rem; margin-bottom: 4px; }
.d-card-info .btn { margin-top: 14px; }

.almanac { margin-top: 24px; }
.yiji { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.yiji > div { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; padding: 16px; border-radius: var(--radius); border: 1px solid var(--line); background: #fbf8f1; }
.yiji p { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.9; }
.yiji-tag { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 50%; font: 900 1.6rem var(--serif); color: #fff8f0; }
.yi .yiji-tag { background: var(--wood); }
.ji .yiji-tag { background: var(--red); }
.alm-info { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 18px 0 0; }
.alm-info dt { font-size: .78rem; color: var(--ink-3); letter-spacing: .1em; }
.alm-info dd { margin: 2px 0 0; font: 600 .98rem var(--serif); }
.alm-h3 { font-size: 1.1rem; margin: 24px 0 12px; }
.hours { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.hour { display: grid; gap: 2px; text-align: center; padding: 10px 4px; border-radius: var(--radius); border: 1px solid var(--line); font-size: .78rem; color: var(--ink-3); }
.hour strong { font: 900 1.05rem var(--serif); color: var(--ink); }
.hour em { font-style: normal; }
.hour.good { background: #eef3ea; border-color: #c9d8c2; }
.hour.good em { color: var(--wood); }
.hour.bad em { color: var(--red); }
.alm-note { margin-top: 14px; }

.zodiac-sec { padding: 56px 0 24px; }
.zodiac-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; }
.zodiac-item { padding: 16px 14px; background: var(--card); border: 1px solid rgba(160, 140, 110, .18); border-radius: var(--radius); box-shadow: var(--shadow); }
.zodiac-item h3 { font-size: 1.5rem; }
.zodiac-item h3 small { font: 400 .8rem var(--sans); color: var(--ink-3); margin-left: 6px; }
.zodiac-item .stars { font-size: .9rem; }
.zodiac-item p { margin: 6px 0 0; font-size: .85rem; color: var(--ink-2); }
.zodiac-item.rel-chong { border-color: rgba(158, 43, 37, .35); }
.zodiac-item.rel-liuhe, .zodiac-item.rel-sanhe { border-color: #c9d8c2; }

@media (max-width: 960px) {
  .d-grid { grid-template-columns: 1fr; }
  .zodiac-grid { grid-template-columns: repeat(3, 1fr); }
  .hours { grid-template-columns: repeat(4, 1fr); }
}
@media (max-width: 720px) {
  .p-body { grid-template-columns: 1fr; }
  .lucky { grid-template-columns: repeat(2, 1fr); }
  .yiji { grid-template-columns: 1fr; }
  .alm-info { grid-template-columns: 1fr 1fr; }
  .hours { grid-template-columns: repeat(3, 1fr); }
  .zodiac-grid { grid-template-columns: repeat(2, 1fr); }
}
.d-head h1 small { font: 600 .55em var(--serif); margin-left: .6em; color: var(--ink-2); white-space: nowrap; }

/* ---------- 吉日 SEO 頁 ---------- */
.jiri { max-width: 1100px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 56px; display: grid; gap: 24px; }
.crumbs { font-size: .82rem; color: var(--ink-3); padding-top: 22px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.crumbs a { color: var(--ink-2); border-bottom: 1px solid var(--line); }
.crumbs i { font-style: normal; opacity: .6; }
.jiri-head { text-align: center; padding: 8px 0 4px; }
.jiri-head h1 { font-size: clamp(2rem, 5vw, 3rem); }
.jiri-count { margin: 8px 0 0; color: var(--ink-2); letter-spacing: .08em; }
.jiri-count strong { color: var(--red); font: 900 1.5em var(--serif); margin: 0 .15em; }
.jiri-intro { margin: 0 0 18px; color: var(--ink-2); line-height: 1.95; }
.jiri-intro a { color: var(--red); border-bottom: 1px solid currentColor; }
.zodiac-filter { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: .88rem; color: var(--ink-2); margin-bottom: 14px; }
.zodiac-filter select { font: 1rem var(--sans); padding: .45em .6em; border: 1px solid var(--line); border-radius: var(--radius); background: #fffdf8; }
.jiri-table { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.jt-row { display: grid; grid-template-columns: 1fr 1.3fr 1.6fr 1.3fr 1.3fr; gap: 10px; align-items: center; padding: 12px 16px; border-top: 1px solid var(--line); background: #fbf8f1; font-size: .92rem; }
.jt-row:first-child { border-top: 0; }
.jt-row span { display: grid; gap: 1px; }
.jt-row small { color: var(--ink-3); font-size: .78rem; }
.jt-head { background: var(--paper-2); font: 600 .85rem var(--serif); color: var(--ink-2); padding: 10px 16px; }
.jt-date strong { font: 900 1.25rem var(--serif); color: var(--red); }
.jt-row.is-chong { background: repeating-linear-gradient(135deg, #f3e6dc 0 8px, #f7eee6 8px 16px); opacity: .75; }
.jt-row.is-chong .jt-chong { color: var(--red); font-weight: 600; }
.jt-row.is-chong .jt-chong::after { content: "沖到你"; display: inline-block; width: max-content; margin-top: 3px; font-size: .72rem; color: #fff; background: var(--red); border-radius: 99px; padding: 0 .6em; }
.empty { padding: 20px; text-align: center; color: var(--ink-3); border: 1px dashed var(--line); border-radius: var(--radius); }
.jiri-rule { margin-top: 14px; }
.month-nav { display: flex; justify-content: space-between; gap: 12px; font-family: var(--serif); }
.month-nav a { color: var(--red); padding: .5em 1em; border: 1px solid var(--line); border-radius: 99px; background: var(--card); }
.month-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.month-card { display: grid; gap: 4px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbf8f1; transition: border-color .2s, transform .2s; }
.month-card:hover { border-color: var(--red); transform: translateY(-2px); }
.month-card strong { font: 900 1.05rem var(--serif); }
.mc-count { color: var(--red); font-size: .85rem; }
.mc-days { font-size: .8rem; color: var(--ink-3); line-height: 1.6; }
.jiri-tips ul { margin: 0; padding-left: 1.2em; color: var(--ink-2); line-height: 2; }
.jiri-faq details { border-top: 1px solid var(--line); padding: 12px 0; }
.jiri-faq details:first-of-type { border-top: 0; }
.jiri-faq summary { cursor: pointer; font: 600 1.02rem var(--serif); }
.jiri-faq p { margin: 8px 0 0; color: var(--ink-2); }
.related h2 { font-size: 1.15rem; margin-bottom: 10px; }
.related-links { display: flex; flex-wrap: wrap; gap: 10px; }
.related-links a { padding: .45em 1.1em; border: 1px solid var(--line); border-radius: 99px; background: var(--card); font-size: .9rem; }
.related-links a:hover { border-color: var(--red); color: var(--red); }
.hub-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.hub-card { position: relative; padding: 24px 26px 28px; transition: transform .2s; }
.hub-card:hover { transform: translateY(-3px); }
.hub-card h2 { font-size: 1.7rem; margin: 4px 0 8px; }
.hub-card p { margin: 0; color: var(--ink-2); padding-right: 40px; }
.hub-card strong { color: var(--red); }
.hub-card .arrow { bottom: 24px; right: 24px; }
@media (max-width: 720px) {
  .jt-head { display: none; }
  .jt-row { grid-template-columns: 1fr 1fr; gap: 8px 14px; }
  .jt-date { grid-column: 1 / -1; display: flex !important; align-items: baseline; gap: 8px; }
  .jt-row span:nth-child(3)::before { content: "吉時"; font-size: .72rem; color: var(--ink-3); }
  .hub-grid { grid-template-columns: 1fr; }
}
.alm-links { margin: 10px 0 0; font-size: .9rem; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 14px; }
.alm-links a { color: var(--red); border-bottom: 1px solid currentColor; }
.spring { border: 1.5px solid rgba(158, 43, 37, .4); }
.spring h2 { color: var(--red); }

/* ---------- 九宮飛星 ---------- */
.fx-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 44px clamp(20px, 4vw, 52px); border-radius: 18px; color: #f1e8da;
  background: radial-gradient(ellipse at 70% 40%, #6a2f28, transparent 60%), linear-gradient(140deg, #3a1f1b, #2a1715); box-shadow: 0 20px 50px rgba(60, 25, 15, .25); }
.fx-hero .kicker { color: #d9a35c; }
.fx-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); line-height: 1.25; color: #fbf3e6; }
.fx-hero h1 span { font-size: .78em; }
.fx-hero h1::after { content: ""; display: block; width: 110px; height: 2px; margin-top: 22px; background: linear-gradient(90deg, #d9a35c, transparent); }
.fx-hero .jiri-intro { color: #e3d6c3; margin-top: 18px; }
.fx-range { display: inline-block; margin: 0 0 22px; padding: .45em 1.2em; border: 1px solid rgba(217, 163, 92, .5); border-radius: 99px; font-size: .92rem; color: #e9dcc8; }
.fx-sum { display: grid; gap: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
.fx-sum-row { padding: 16px 0; border-bottom: 1px solid rgba(255, 255, 255, .12); }
.fx-sum-row h3 { display: flex; justify-content: space-between; font: 600 .95rem var(--sans); letter-spacing: .2em; margin-bottom: 8px; }
.fx-sum-row h3 small { letter-spacing: .05em; font-weight: 400; color: #bfae98; }
.fx-sum-row.good h3 { color: #e3b46c; } .fx-sum-row.bad h3 { color: #f08f7e; }
.fx-sum-row p { margin: 0; display: flex; flex-wrap: wrap; gap: 8px 24px; }
.fx-sum-row span { color: #e3d6c3; font-size: .95rem; }
.fx-sum-row strong { font: 900 1.35rem var(--serif); margin-right: 8px; }
.fx-sum-row.good strong { color: #f0c27a; } .fx-sum-row.bad strong { color: #ff9a88; }
.fx-overlap { margin-top: 18px; padding: 14px 18px; border-radius: 10px; background: rgba(240, 143, 126, .12); border: 1px solid rgba(240, 143, 126, .35); }
.fx-overlap h3 { color: #ff9a88; font-size: 1rem; margin-bottom: 6px; }
.fx-overlap ul { margin: 0; padding-left: 1.1em; color: #ead8c8; font-size: .92rem; }

.fx-figure { margin: 0; text-align: center; }
.fx-compass { position: relative; padding: 34px; }
.fx-dir { position: absolute; font: 900 1.05rem var(--serif); color: #e3b46c; }
.fx-s { top: 4px; left: 50%; transform: translateX(-50%); } .fx-n { bottom: 4px; left: 50%; transform: translateX(-50%); }
.fx-e { left: 6px; top: 50%; transform: translateY(-50%); } .fx-w { right: 6px; top: 50%; transform: translateY(-50%); }
.fx-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-radius: 14px; overflow: hidden; box-shadow: 0 12px 30px rgba(0, 0, 0, .3); }
.fx-cell { position: relative; aspect-ratio: 1; display: grid; place-content: center; gap: 2px; text-align: center; background: #f6efe3; color: #3a221b; border: .5px solid rgba(90, 50, 40, .18); }
.fx-pos { position: absolute; top: 8px; left: 10px; font-size: .72rem; letter-spacing: .15em; color: #8a7466; }
.fx-cell strong { font: 900 clamp(1.4rem, 3vw, 2.1rem)/1.1 var(--serif); letter-spacing: .05em; }
.fx-cell small { font-size: .75rem; color: #8a7466; }
.fx-cell em { justify-self: center; margin-top: 6px; font: 500 .72rem var(--sans); font-style: normal; padding: .1em .7em; border-radius: 99px; border: 1px solid currentColor; }
.fx-cell.lk-great { background: #f3d9a0; } .fx-cell.lk-great em { background: #6a3a14; color: #f9e8c4; border-color: #6a3a14; }
.fx-cell.lk-bad { background: #f6d6cc; } .fx-cell.lk-bad em { color: #a1392d; }
.fx-cell.lk-worst { background: #9e1f1f; color: #f8e4cf; } .fx-cell.lk-worst .fx-pos, .fx-cell.lk-worst small { color: #f1c8b8; }
.fx-cell.lk-worst em { background: #fff3e6; color: #9e1f1f; border-color: #fff3e6; }
.fx-cell.lk-good em { color: #6d5a49; }
.fx-figure figcaption { margin-top: 12px; font-size: .82rem; color: #cbb9a3; line-height: 1.8; }

.fx-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.fx-card { padding: 18px 18px 14px; border-radius: var(--radius); border: 1px solid var(--line); background: #fbf8f1; }
.fx-card h3 { font-size: 1.1rem; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.fx-tag { font: 500 .72rem var(--sans); padding: .1em .7em; border-radius: 99px; border: 1px solid currentColor; }
.fx-card.lk-worst { border-color: #c95b4c; background: #fbeee9; } .fx-card.lk-worst .fx-tag { background: #9e1f1f; color: #fff; border-color: #9e1f1f; }
.fx-card.lk-bad .fx-tag { color: var(--red); }
.fx-card.lk-great { border-color: #d7b26a; background: #fbf2de; } .fx-card.lk-great .fx-tag { background: #6a3a14; color: #fff; border-color: #6a3a14; }
.fx-card.lk-good .fx-tag { color: var(--wood); }
.fx-theme { margin: 4px 0 8px; font: 600 .85rem var(--serif); color: var(--red); letter-spacing: .1em; }
.fx-card p { margin: 0 0 6px; font-size: .9rem; color: var(--ink-2); }
.fx-card ul { margin: 0; padding-left: 1.1em; font-size: .88rem; color: var(--ink-2); line-height: 1.8; }
@media (max-width: 960px) {
  .fx-hero { grid-template-columns: 1fr; }
  .fx-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .fx-hero { padding: 28px 18px; gap: 20px; }
  .fx-compass { padding: 28px 24px; }
  .fx-cards { grid-template-columns: 1fr; }
  .fx-sum-row h3 { flex-direction: column; gap: 2px; }
}
.fx-hero h1 { font-size: clamp(1.9rem, 3.4vw, 2.8rem); }
.fx-hero h1 > br + span, .fx-hero h1 span { display: inline-block; }

/* ---------- 知命人格 ---------- */
.persona { max-width: 1160px; margin: 0 auto; padding: 0 clamp(16px, 4vw, 48px) 64px; }
.ps-intro { display: grid; grid-template-columns: 1fr 440px; gap: 48px; align-items: center; padding: 56px 0 40px; }
.ps-intro h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); line-height: 1.35; }
.ps-lead { color: var(--ink-2); line-height: 2; margin: 18px 0 0; }
.ps-form { grid-template-columns: 1fr 1fr; padding: 28px; }
.ps-form label:first-child { grid-column: 1 / -1; }
.ps-check { grid-column: 1 / -1; display: flex !important; align-items: center; gap: 8px; font-size: .92rem !important; cursor: pointer; }
.ps-check input { width: auto !important; accent-color: var(--red); }
.ps-form select:disabled { opacity: .45; }
.ps-result { padding: 36px clamp(20px, 4vw, 48px); scroll-margin-top: 90px; }
.ps-from-share { margin: 0 0 18px; padding: 10px 14px; border-radius: var(--radius); background: #f4e1d4; color: var(--red); font-size: .9rem; }
.ps-top { display: grid; grid-template-columns: 1fr 280px; gap: 36px; align-items: center; }
.ps-name { font-size: clamp(2.4rem, 6vw, 4rem); color: var(--red); letter-spacing: .08em; margin: 4px 0 14px; }
.ps-desc { font-size: 1.08rem; line-height: 2; margin: 0; }
.ps-note { margin: 14px 0 0; font-size: .88rem; color: var(--ink-3); }
.ps-img { width: 100%; border-radius: var(--radius); mix-blend-mode: multiply; }
.ps-cols { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px 36px; margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); }
.ps-cols h3 { font-size: 1.1rem; margin-bottom: 10px; }
.ps-cols p { margin: 0; color: var(--ink-2); line-height: 1.9; }
.ps-tags { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ps-tags li { padding: .3em 1em; border-radius: 99px; background: #f4e1d4; color: var(--red); font-weight: 500; }
.ps-list { margin: 0; padding-left: 1.1em; color: var(--ink-2); line-height: 1.9; }
.ps-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.home-persona { display: grid; grid-template-columns: 1fr auto; gap: 24px; align-items: center; padding: 28px 36px; }
.home-persona h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); }
.home-persona p { margin: 6px 0 0; color: var(--ink-2); }
@media (max-width: 860px) {
  .ps-intro { grid-template-columns: 1fr; padding-top: 32px; gap: 24px; }
  .ps-top { grid-template-columns: 1fr; }
  .ps-img { max-width: 240px; justify-self: center; order: -1; }
  .ps-cols { grid-template-columns: 1fr; }
  .home-persona { grid-template-columns: 1fr; padding: 24px 20px; }
}
.fx-hero > *, .fx-hero-text { min-width: 0; }
@media (max-width: 720px) {
  .fx-compass { padding: 26px 22px; }
  .fx-cell strong { font-size: 1.35rem; }
  .fx-pos { top: 5px; left: 6px; font-size: .62rem; letter-spacing: .05em; }
  .fx-cell em { margin-top: 3px; }
  .ps-form { grid-template-columns: 1.4fr 1fr; }
}
@media (max-width: 720px) {
  .fx-pos { position: static; display: block; margin-bottom: 2px; font-size: .66rem; }
  .fx-cell { aspect-ratio: auto; padding: 8px 2px 10px; }
}

/* ---------- 文件頁（關於、隱私、聯絡、404）---------- */
.doc { max-width: 760px; margin: 0 auto; padding: 48px clamp(16px, 5vw, 32px) 72px; }
.doc h1 { font-size: clamp(2rem, 5vw, 2.8rem); margin: 4px 0 12px; }
.doc .kicker { color: var(--red); }
.doc h2 { font-size: 1.3rem; margin: 32px 0 10px; }
.doc p, .doc li { color: var(--ink-2); line-height: 2; }
.doc ul { padding-left: 1.2em; }
.doc a { color: var(--red); border-bottom: 1px solid currentColor; }
.doc .btn { border-bottom: 0; }
.doc .btn-red { color: #fff8f0; }
.lead-doc { font: 600 1.2rem var(--serif); color: var(--ink) !important; }
.contact-mail { font: 900 clamp(1.4rem, 4vw, 1.9rem) var(--serif); margin: 18px 0 4px; }
.notfound { text-align: center; padding: 40px 0; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }

/* ---------- 知識頁（塔羅牌義、紫微主星、八字日主）---------- */
.kn-article { padding: clamp(22px, 4vw, 40px); }
.kn-article h1 { font-size: clamp(1.9rem, 4.5vw, 2.6rem); margin: 4px 0 14px; }
.kn-article h2 { font-size: 1.3rem; margin: 30px 0 10px; }
.kn-article p, .kn-article li { color: var(--ink-2); line-height: 2; }
.kn-article .kicker { color: var(--red); margin: 0; }
.kn-head { display: grid; grid-template-columns: 240px 1fr; gap: 32px; align-items: start; }
.kn-card-img { width: 100%; height: auto; border-radius: 10px; box-shadow: 0 10px 28px rgba(60, 40, 20, .2); }
.kn-star-img { mix-blend-mode: multiply; box-shadow: none; }
.kn-lead { font-size: 1.05rem; color: var(--ink) !important; }
.kn-keys { display: grid; gap: 6px; margin: 10px 0 14px; }
.kn-keys p { margin: 0; }
.kn-up, .kn-rev { display: inline-block; font: 600 .75rem var(--sans); padding: .15em .7em; border-radius: 99px; margin-right: 10px; letter-spacing: .1em; }
.kn-up { background: #e7efe3; color: var(--wood); }
.kn-rev { background: #f4e1d4; color: var(--red); }
.kn-yes { margin: 0 0 18px; }
.kn-yes small { color: var(--ink-3); margin-left: 6px; font-size: .8rem; }
.kn-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.kn-pair > div { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbf8f1; }
.kn-pair p { margin: 8px 0 0; }
.kn-two { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.kn-two h2 { margin-top: 30px; }
.kn-two ul { margin: 0; padding-left: 1.2em; }
.kn-advice { margin-top: 30px; padding: 16px 20px; border-left: 3px solid var(--red); background: rgba(235, 228, 214, .55); border-radius: 0 var(--radius) var(--radius) 0; }
.kn-advice h2 { margin: 0 0 4px; font-size: 1.05rem; }
.kn-advice p { margin: 0; font: 600 1.05rem var(--serif); color: var(--ink) !important; }
.kn-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 14px; }
.kn-tile { display: grid; gap: 4px; text-align: center; padding: 8px; border-radius: var(--radius); transition: background .2s, transform .2s; }
.kn-tile:hover { background: rgba(235, 228, 214, .7); transform: translateY(-2px); }
.kn-tile img { width: 100%; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 6px; box-shadow: 0 4px 12px rgba(60, 40, 20, .15); }
.kn-grid-stars .kn-tile img { aspect-ratio: 3 / 4; mix-blend-mode: multiply; box-shadow: none; }
.kn-tile strong { font: 900 1rem var(--serif); }
.kn-tile small { font-size: .75rem; color: var(--ink-3); line-height: 1.5; }
.kn-grid-rz { grid-template-columns: repeat(5, 1fr); }
.kn-tile-text { padding: 18px 8px; border: 1px solid var(--line); background: #fbf8f1; }
.kn-gan { font: 900 2.6rem/1 var(--serif); }
.kn-tile-text.wx-wood .kn-gan { color: var(--wood); } .kn-tile-text.wx-fire .kn-gan { color: var(--fire); }
.kn-tile-text.wx-earth .kn-gan { color: var(--earth); } .kn-tile-text.wx-metal .kn-gan { color: #6f6a63; }
.kn-tile-text.wx-water .kn-gan { color: var(--water); }
.kn-link { color: inherit; border-bottom: 1px dashed currentColor; }
@media (max-width: 720px) {
  .kn-head { grid-template-columns: 1fr; }
  .kn-card-img { max-width: 200px; justify-self: center; }
  .kn-pair, .kn-two { grid-template-columns: 1fr; }
  .kn-grid { grid-template-columns: repeat(3, 1fr); gap: 10px; }
  .kn-grid-rz { grid-template-columns: repeat(2, 1fr); }
}
.kn-sx-rel { display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 16px; border-radius: var(--radius); background: #fbf8f1; border: 1px solid var(--line); margin: 4px 0 8px; }
.kn-sx-rel span { font-size: .75rem; padding: .1em .7em; border-radius: 99px; color: #fff; background: var(--ink-3); }
.kn-sx-rel.lv2 span, .kn-tile.lv2 small { background: var(--wood); color: #fff; }
.kn-sx-rel.lv-1 span { background: #c07a3a; } .kn-sx-rel.lv-2 span { background: var(--red); }
.kn-tile.lv2 small, .kn-tile.lv-1 small, .kn-tile.lv-2 small, .kn-tile.lv0 small { padding: 0 .6em; border-radius: 99px; justify-self: center; }
.kn-tile.lv-1 small { background: #f3e1cc; color: #8a5320; } .kn-tile.lv-2 small { background: #f4e1d4; color: var(--red); }
.kn-grid-sx { grid-template-columns: repeat(6, 1fr); }
.kn-grid-gong { grid-template-columns: repeat(4, 1fr); }
.kn-grid-gong .kn-tile strong { font-size: 1.2rem; }
.kn-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 0; }
.kn-facts div { padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbf8f1; }
.kn-facts dt { font-size: .78rem; color: var(--ink-3); letter-spacing: .1em; }
.kn-facts dd { margin: 4px 0 0; font-family: var(--serif); font-weight: 600; }
.kn-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.kn-list a { font: 600 1.05rem var(--serif); color: var(--red); }
.kn-list small { display: block; color: var(--ink-3); margin-top: 2px; }
.kn-cta { margin-top: 26px; }
.kn-article > .btn { margin-top: 22px; }
@media (max-width: 720px) {
  .kn-grid-sx { grid-template-columns: repeat(3, 1fr); }
  .kn-grid-gong { grid-template-columns: repeat(2, 1fr); }
  .kn-facts { grid-template-columns: 1fr; }
}
/* 九宮格：方位標籤改成排在星名上方，不再絕對定位壓到大字 */
.fx-cell { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; padding: 10px 6px 12px; }
.fx-cell .fx-pos { position: static; display: block; margin: 0 0 4px; font-size: .74rem; letter-spacing: .12em; line-height: 1.2; }
.fx-cell strong { font-size: clamp(1.25rem, 2.6vw, 1.9rem); white-space: nowrap; }
@media (max-width: 720px) {
  .fx-cell .fx-pos { font-size: .64rem; letter-spacing: .04em; margin-bottom: 2px; }
}
.fx-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.fx-cell { min-width: 0; padding: 10px 4px 12px; }
.fx-cell strong { font-size: clamp(1.15rem, 2.1vw, 1.85rem); }
/* 生肖插圖 */
.kn-tile-sx { padding: 12px 8px 14px; border: 1px solid var(--line); background: #fbf8f1; }
.kn-tile-sx img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; mix-blend-mode: multiply; box-shadow: none; }
.kn-sx-img { mix-blend-mode: multiply; box-shadow: none; border-radius: 10px; }
