/* 福星何大師 區塊：#fengshui 辦公室、店面與居家風水（2026-11-27 新建；每個區塊一個檔案，修改時直接改寫這裡）
   第 1 回合（2026-11-27 重新設計）：參考「Feature」捲動釘選橫向卡片
   - 區塊 260vh 當捲動跑道，裡面 100vh 的畫面釘住；往下捲，三張大卡往左橫移，最後停在附註
   - 每張卡上半是會自己動的平面圖：羅盤慢轉、動線虛線流動、重點位置金色脈動、標籤輪播
     辦公室＝財位＋老闆座位＋動線｜店面＝入口箭頭＋櫃台｜居家＝洛書九宮，紫白飛星依 5→6→7→8→9→1→2→3→4 順序亮起
   - 背景 72px 細格線；≤960px、畫面太矮或減少動態時不釘選，改成左右滑
   第 2 回合（2026-11-29，截圖框住手機版第一張卡，老高：「自己猜，檢查錯誤」）：
   - 檢查到的錯誤：辦公室卡的羅盤蓋住右上的財位；店面卡的標籤蓋住入口箭頭與重點圓；居家卡（手機）標籤壓到九宮格最上排
   - 手機左右滑時第一張卡貼齊螢幕左緣（scroll-snap 吃掉了左邊留白）：軌道加 scroll-padding-left，跟左邊留白一樣寬
   - 改法：辦公室羅盤移到平面圖上方中間的空白處；店面標籤移到右上；居家標籤移到左下。只換位置，大小、動態、文字不變
   - 手機（≤960px）規則搬到 fengshui.m.css
   捲動位移由 fengshui.js 寫入 --x */
/* 手機（≤960px）的規則已搬到 assets/blocks/fengshui.m.css（2026-11-29） */

#fengshui{padding:0}
.fs-track{position:relative;height:260vh}
.fs-sticky{position:sticky;top:0;height:100vh;overflow:hidden;display:flex;flex-direction:column;justify-content:center;padding:84px 0 32px}
.fs-grid{position:absolute;inset:0;z-index:0;pointer-events:none;
  background-image:linear-gradient(rgba(20,45,78,.045) 1px,transparent 1px),linear-gradient(90deg,rgba(20,45,78,.045) 1px,transparent 1px);
  background-size:72px 72px;-webkit-mask:radial-gradient(120% 90% at 50% 50%,#000 55%,transparent);mask:radial-gradient(120% 90% at 50% 50%,#000 55%,transparent)}
.fs-sticky>.ink-lib{z-index:0}

/* 標題列：左標題、右導言 */
.fs-head{position:relative;z-index:2}
.fs-head .sec-head{display:flex;justify-content:space-between;align-items:flex-end;gap:40px;margin-bottom:clamp(24px,5vh,56px)}
.fs-head .sec-head .lead{max-width:420px;margin:0}
.fs-head .sec-head>div,.fs-head .lead{opacity:0;transform:translateY(20px);transition:opacity .8s cubic-bezier(.16,1,.3,1),transform .8s cubic-bezier(.16,1,.3,1)}
.fs-head .lead{transition-delay:.15s}
.fs-head.in .sec-head>div,.fs-head.in .lead{opacity:1;transform:none}

/* 橫向軌道 */
.fs-rail{position:relative;z-index:2;overflow:hidden;padding-left:max(16px,calc((100vw - 1160px) / 2))}
.fs-move{display:flex;align-items:flex-start;gap:28px;width:max-content;transform:translate3d(calc(var(--x,0) * -1px),0,0);will-change:transform}

.fs-card{width:min(520px,78vw);display:flex;flex-direction:column;gap:18px}
.fs-gfx{position:relative;height:min(400px,44vh);border-radius:20px;overflow:hidden;border:1px solid rgba(20,45,78,.06);box-shadow:var(--sh-card);
  background:var(--fs-tint);color:var(--fs-line)}
.fs-c0{--fs-tint:var(--c-accent-soft);--fs-line:var(--c-deep)}
.fs-c1{--fs-tint:var(--c-paper-2);--fs-line:var(--c-deep)}
.fs-c2{--fs-tint:var(--c-deep);--fs-line:var(--c-on-deep)}
.fs-gfx-bg{position:absolute;inset:0;background:var(--tex-paper);opacity:.8}
.fs-c2 .fs-gfx-bg{background:radial-gradient(70% 60% at 30% 20%,var(--c-deep-3),transparent)}

/* 平面圖 */
.fs-plan{position:absolute;inset:6% 4% 4% 4%;width:92%;height:90%;fill:none;stroke:currentColor;stroke-linecap:round;stroke-linejoin:round;animation:fs-bob 7s ease-in-out infinite}
.fs-plan .wall{stroke-width:3.2;opacity:.82}
.fs-plan .wall.thin{stroke-width:1.6;opacity:.5}
.fs-plan .desk{stroke-width:1.4;opacity:.45}
.fs-plan .hot{stroke:var(--c-accent);stroke-width:2.4;fill:color-mix(in srgb,var(--c-accent) 22%,transparent);animation:fs-glow 3.2s ease-in-out infinite}
.fs-plan .flow{stroke:var(--c-accent-ink);stroke-width:2;stroke-dasharray:7 9;animation:fs-flow 2.4s linear infinite}
.fs-plan .spot{stroke:var(--c-accent);stroke-width:1.6}
.fs-plan .spot path,.fs-plan .spot .f{fill:var(--c-accent);stroke:none}
.fs-plan .spot circle:not(.f){transform-box:fill-box;transform-origin:center;animation:fs-ping 2.6s cubic-bezier(.2,.7,.2,1) infinite}
.fs-plan .in path{stroke:var(--c-accent-ink);stroke-width:3;animation:fs-in 1.8s ease-in-out infinite}
.fs-plan .in path:nth-child(2){animation-delay:.3s}.fs-plan .in path:nth-child(3){animation-delay:.6s}
/* 洛書九宮 */
.fs-plan .grid9 rect{stroke:var(--c-accent);stroke-width:1;fill:transparent;opacity:.55;animation:fs-cell 5.4s ease-in-out infinite;animation-delay:calc(var(--o) * .6s)}
.fs-plan .grid9 text{fill:currentColor;stroke:none;font:500 26px/1 var(--f-latin);text-anchor:middle;opacity:.55;animation:fs-num 5.4s ease-in-out infinite;animation-delay:calc(var(--o) * .6s)}

/* 羅盤 */
.fs-luopan{position:absolute;right:16px;top:16px;width:118px;height:118px;padding:6px;border-radius:50%;
  background:color-mix(in srgb,var(--c-surface) 82%,transparent);box-shadow:0 10px 24px rgba(13,28,48,.16);animation:fs-float 4.6s ease-in-out infinite}
.fs-lp{width:100%;height:100%;fill:none;stroke:var(--c-deep);stroke-width:1.1}
.fs-lp-ring{animation:fs-spin 48s linear infinite;transform-origin:0 0}
.fs-lp-ring circle:first-child{stroke:var(--c-accent);stroke-width:2}
.fs-lp-hub{fill:var(--c-accent-soft);stroke:var(--c-accent)}
.fs-lp-needle{animation:fs-needle 5s ease-in-out infinite;transform-origin:0 0}
.fs-lp-needle path{fill:var(--c-deep);stroke:none}
.fs-lp-needle .n{fill:var(--c-accent)}
.fs-c0 .fs-luopan{right:auto;left:43%;top:32%;translate:-50% -50%}  /* 第 2 回合：讓出右上的財位 */
.fs-c1 .fs-luopan{right:auto;left:16px}
.fs-c2 .fs-luopan{top:auto;bottom:16px}

/* 標籤輪播（文字取自卡片內容） */
.fs-chip{position:absolute;left:50%;bottom:18px;translate:-50% 0;display:flex;align-items:center;gap:10px;height:42px;padding:0 20px 0 14px;border-radius:999px;
  background:var(--c-surface);box-shadow:0 10px 26px rgba(13,28,48,.14);animation:fs-float 5.2s ease-in-out infinite;animation-delay:-1.4s}
.fs-c1 .fs-chip{left:auto;right:16px;bottom:auto;top:18px;translate:0}  /* 第 2 回合：讓出下方的入口箭頭 */
.fs-c2 .fs-chip{left:16px;translate:0}  /* 第 2 回合：移到左下，不壓九宮格 */
.fs-dot{width:9px;height:9px;border-radius:50%;background:var(--c-accent);position:relative}
.fs-dot::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--c-accent);animation:fs-dotp 1.8s ease-out infinite}
.fs-chip em{position:relative;display:block;height:20px;overflow:hidden;font:500 15px/20px var(--f-body);font-style:normal;letter-spacing:.08em;color:var(--c-deep)}
.fs-chip em{width:var(--w,7em)}  /* 寬度＝最長標籤，由 fengshui.js 量 */
.fs-chip em span{position:absolute;left:0;top:0;white-space:nowrap;opacity:0;transform:translateY(12px);transition:opacity .45s ease,transform .45s cubic-bezier(.16,1,.3,1)}
.fs-chip em span.on{opacity:1;transform:none}
.fs-chip em span.out{opacity:0;transform:translateY(-12px)}

/* 卡片文字 */
.fs-txt{display:grid;grid-template-columns:44px 1fr;column-gap:16px;width:min(440px,100%)}
.fs-txt .itile{grid-row:1 / span 3}
.fs-txt i{font-family:var(--f-num);font-style:normal;font-weight:600;font-size:12.5px;color:var(--c-accent-ink);letter-spacing:.2em}
.fs-txt h3{margin:4px 0 6px;font-size:24px}
.fs-txt p{margin:0;font-size:15.5px;line-height:1.85;color:var(--c-muted)}

.fs-end{width:340px;align-self:center;padding:20px 64px 20px 0}
.fs-end-mark{display:block;width:120px;height:24px;margin-bottom:18px;background:var(--orn-knot) left center/contain no-repeat}
.fs-end .note{margin:0;font-size:15px;line-height:1.9}

@keyframes fs-bob{50%{transform:translateY(-6px)}}
@keyframes fs-float{50%{transform:translateY(-7px)}}
@keyframes fs-spin{to{transform:rotate(360deg)}}
@keyframes fs-needle{0%,100%{transform:rotate(-14deg)}50%{transform:rotate(10deg)}}
@keyframes fs-flow{to{stroke-dashoffset:-32}}
@keyframes fs-glow{50%{fill:color-mix(in srgb,var(--c-accent) 42%,transparent)}}
@keyframes fs-ping{0%{transform:scale(.4);opacity:.9}100%{transform:scale(1.5);opacity:0}}
@keyframes fs-in{0%,100%{opacity:.15;transform:translateY(0)}50%{opacity:1;transform:translateY(-4px)}}
@keyframes fs-cell{0%,4%{fill:color-mix(in srgb,var(--c-accent) 55%,transparent);opacity:1}22%,100%{fill:transparent;opacity:.55}}
@keyframes fs-num{0%,4%{opacity:1}22%,100%{opacity:.55}}
@keyframes fs-dotp{to{transform:scale(2.6);opacity:0}}

/* 不釘選：手機、平板、太矮的畫面 */
.fs-track.fs-flow{height:auto}
.fs-flow .fs-sticky{position:relative;height:auto;overflow:visible;padding:120px 0 110px}
.fs-flow .fs-rail{overflow-x:auto;overscroll-behavior-x:contain;scroll-snap-type:x mandatory;scroll-padding-left:max(16px,calc((100vw - 1160px) / 2));scrollbar-width:none;padding-right:16px}
.fs-flow .fs-rail::-webkit-scrollbar{display:none}
.fs-flow .fs-move{transform:none}
.fs-flow .fs-card,.fs-flow .fs-end{scroll-snap-align:start}
.fs-flow .fs-gfx{height:340px}
@media (prefers-reduced-motion:reduce){
  .fs-plan,.fs-plan *,.fs-luopan,.fs-lp *,.fs-chip,.fs-dot::after{animation:none!important}
  .fs-head .sec-head>div,.fs-head .lead{opacity:1;transform:none}
}
