/* 雪巴人：電影感夜山 × 現代介面
   夜 night / 岩 slate / 雪 snow / 霧 frost / 晨光金 gold（取自主視覺山頂的光）
   元件：玻璃膠囊導覽、Bento 磚格、堆疊卡片、3D 傾斜卡、聚光燈、磁吸按鈕、跑馬燈、自訂游標 */
@view-transition { navigation: auto; }
:root {
  --night: #0b1118;
  --night-2: #121b25;
  --slate: #1b2632;
  --snow: #f1f3f3;
  --text: #cfd6dc;
  --frost: #8a98a5;
  --gold: #e6b65f;
  --gold-2: #f7d48f;
  --steel: #5b7896;
  --line: rgba(241, 243, 243, .1);
  --glass: rgba(255, 255, 255, .055);
  --glass-line: rgba(255, 255, 255, .12);
  --serif: "Noto Serif TC", "Songti TC", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --display: "Syne", "Noto Sans TC", sans-serif;
  --wrap: 1280px;
  --gut: clamp(18px, 4.5vw, 64px);
  --r: 28px;
  --ease: cubic-bezier(.2, .75, .1, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 100px; }
body { margin: 0; background: var(--night); color: var(--text); font: 400 17px/1.85 var(--sans); letter-spacing: .03em; overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: .28em; text-decoration-thickness: 1px; }
::selection { background: var(--gold); color: var(--night); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; color: var(--snow); line-height: 1.25; letter-spacing: .03em; margin: 0; text-wrap: balance; }
p { margin: 0 0 1em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: fixed; left: 12px; top: -60px; z-index: 100; background: var(--gold); color: var(--night); padding: 8px 14px; border-radius: 8px; }
.skip:focus { top: 12px; }
svg { width: 1.1em; height: 1.1em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.glass {
  background: var(--glass); border: 1px solid var(--glass-line);
  backdrop-filter: blur(22px) saturate(1.6); -webkit-backdrop-filter: blur(22px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 20px 50px -20px rgba(0, 0, 0, .5);
}

/* 顆粒質感 */
.grain { position: fixed; inset: -50%; z-index: 90; pointer-events: none; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 1.2s steps(6) infinite; }
@keyframes grain { 0%, 100% { transform: none; } 20% { transform: translate(-3%, 2%); } 40% { transform: translate(2%, -3%); } 60% { transform: translate(-2%, -1%); } 80% { transform: translate(3%, 3%); } }

/* 開場 */
.loader { position: fixed; inset: 0; z-index: 95; background: var(--night); display: grid; place-content: center; gap: 28px; justify-items: center;
  transition: clip-path 1s var(--ease); clip-path: inset(0 0 0 0); }
.loader-logo img { width: min(240px, 50vw); animation: logoIn 1s var(--ease) both; }
@keyframes logoIn { from { opacity: 0; transform: translateY(20px); filter: blur(8px); } }
.loader-bar { width: 160px; height: 2px; background: var(--line); border-radius: 2px; overflow: hidden; }
.loader-bar span { display: block; height: 100%; background: var(--gold); transform-origin: left; animation: load 1.1s .15s var(--ease) both; }
@keyframes load { from { transform: scaleX(0); } }
.loader.done { clip-path: inset(0 0 100% 0); }
.loader.gone { display: none; }

/* 自訂游標 */
.cursor { position: fixed; left: 0; top: 0; z-index: 80; pointer-events: none; width: 12px; height: 12px; margin: -6px 0 0 -6px; border-radius: 50%;
  background: var(--gold); transform: translate3d(var(--cx, -100px), var(--cy, -100px), 0); display: grid; place-items: center;
  transition: width .4s var(--spring), height .4s var(--spring), margin .4s var(--spring), background-color .3s; mix-blend-mode: normal; }
.cursor span { font-size: 13px; font-weight: 500; color: var(--night); opacity: 0; transition: opacity .2s; white-space: nowrap; letter-spacing: .08em; }
.cursor.big { width: 84px; height: 84px; margin: -42px 0 0 -42px; }
.cursor.big span { opacity: 1; }
.cursor.hide { opacity: 0; }
@media (hover: none), (pointer: coarse) { .cursor { display: none; } }

/* 玻璃膠囊導覽 */
.bar { position: fixed; top: 14px; left: 0; right: 0; z-index: 60; display: flex; justify-content: center; padding: 0 var(--gut); pointer-events: none;
  transition: transform .5s var(--ease); }
.bar.away { transform: translateY(-130%); }
.bar-pill { pointer-events: auto; display: flex; align-items: center; gap: clamp(12px, 2.4vw, 32px); padding: 8px 8px 8px 22px; border-radius: 999px;
  width: min(100%, 720px); justify-content: space-between;
  background: rgba(16, 24, 33, .5); border: 1px solid var(--glass-line);
  backdrop-filter: blur(20px) saturate(1.6); -webkit-backdrop-filter: blur(20px) saturate(1.6);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .08), 0 10px 40px -10px rgba(0, 0, 0, .55); position: relative; }
.logo img { width: 86px; }
.bar nav { display: flex; gap: 4px; font-size: 15px; }
.bar nav a { white-space: nowrap; color: var(--text); text-decoration: none; padding: 8px 16px; border-radius: 999px; transition: background-color .3s, color .3s; }
.bar nav a:hover { background: rgba(255, 255, 255, .08); color: var(--snow); }
.bar-cta { white-space: nowrap; background: var(--snow); color: var(--night); text-decoration: none; font-size: 14px; font-weight: 500; padding: 10px 18px; border-radius: 999px; display: inline-block; transition: background-color .3s; }
.bar-cta:hover { background: var(--gold); }
.ring { display: none; position: absolute; right: -46px; width: 34px; height: 34px; transform: rotate(-90deg); }
.ring circle { fill: none; stroke: var(--line); stroke-width: 2.5; }
.ring .ring-fill { stroke: var(--gold); stroke-dasharray: 100; stroke-dashoffset: calc(100 - var(--read, 0) * 100); }
.article .ring { display: block; }

/* 按鈕 */
.btn {
  display: inline-flex; align-items: center; gap: 10px; min-height: 52px; padding: 0 26px; border-radius: 999px;
  font-size: 15px; font-weight: 500; text-decoration: none; letter-spacing: .06em; position: relative; overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease), border-color .35s, transform .4s var(--ease);
}
.btn svg { transition: transform .35s var(--ease); }
.btn:hover svg { transform: translateX(4px); }
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; border-radius: inherit; transform: translateY(101%); transition: transform .5s var(--ease); }
.btn:hover::before { transform: none; }
.btn-gold { background: var(--gold); color: var(--night); box-shadow: 0 10px 40px -10px rgba(230, 182, 95, .6); }
.btn-gold::before { background: var(--snow); }
.btn-glass, .btn-ghost { color: var(--snow); background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.btn-glass::before, .btn-ghost::before { background: var(--snow); }
.btn-glass:hover, .btn-ghost:hover { color: var(--night); }
[data-magnetic] { will-change: transform; }

/* 首屏 */
.hero { height: 190vh; position: relative; }
.hero-stage { position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden; }
.hero-photo { position: absolute; inset: 0; transform: scale(calc(1.08 + var(--p, 0) * .22)) translate3d(calc(var(--mx, 0) * -12px), calc(var(--p, 0) * -3% + var(--my, 0) * -10px), 0); will-change: transform; }
.hero-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 62% 40%; }
.ready .hero-photo img { animation: develop 2.4s var(--ease) both; }
@keyframes develop { from { opacity: 0; filter: blur(14px) brightness(.4); transform: scale(1.12); } }
.hero-shade { position: absolute; inset: 0; background:
  radial-gradient(60% 80% at 15% 85%, rgba(11, 17, 24, .92), transparent 70%),
  linear-gradient(90deg, rgba(11, 17, 24, .85) 0%, rgba(11, 17, 24, .4) 40%, transparent 70%),
  linear-gradient(0deg, var(--night) 0%, transparent 30%); }
.hero-stage::after { content: ""; position: absolute; inset: 0; background: var(--night); opacity: calc(var(--p, 0) * 1.15 - .2); pointer-events: none; }
.snow { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-copy { position: absolute; left: var(--gut); bottom: clamp(90px, 15vh, 170px); max-width: min(980px, calc(100vw - var(--gut) * 2)); z-index: 2;
  transform: translateY(calc(var(--p, 0) * -18vh)); opacity: calc(1 - var(--p, 0) * 1.8); }
.hero-kicker { display: inline-flex; align-items: center; gap: 10px; color: var(--snow); font-size: 14px; letter-spacing: .12em; margin-bottom: 22px;
  padding: 8px 16px; border-radius: 999px; background: rgba(255, 255, 255, .07); border: 1px solid var(--glass-line); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 0 rgba(230, 182, 95, .7); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 10px rgba(230, 182, 95, 0); } 100% { box-shadow: 0 0 0 0 rgba(230, 182, 95, 0); } }
.hero h1 { white-space: nowrap; font-size: clamp(2.6rem, 7.6vw, 7.2rem); font-weight: 900; line-height: 1.06; letter-spacing: .01em; margin-bottom: 26px; }
.ch { display: inline-block; animation: char 1.1s calc(.2s + var(--i) * .065s) var(--ease) both; }
.js:not(.ready) .ch, .js:not(.ready) .hero-kicker, .js:not(.ready) .hero-sub, .js:not(.ready) .hero-actions, .js:not(.ready) .hero-chips li { animation-play-state: paused; }
@keyframes char { from { opacity: 0; transform: translateY(.5em) rotate(5deg); filter: blur(12px); } }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
.hero-kicker { animation: rise 1s .1s var(--ease) both; }
.hero-sub { font-size: clamp(16px, 1.5vw, 19px); color: var(--text); max-width: 26em; margin-bottom: 30px; animation: rise 1s 1.1s var(--ease) both; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; animation: rise 1s 1.25s var(--ease) both; }
.hero-chips { position: absolute; right: var(--gut); bottom: clamp(90px, 15vh, 170px); list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; z-index: 2;
  opacity: calc(1 - var(--p, 0) * 2); }
.hero-chips li { border-radius: 18px; padding: 12px 20px; display: flex; align-items: baseline; gap: 12px; min-width: 190px; animation: rise 1s calc(1.4s + var(--k, 0) * .12s) var(--ease) both; }
.hero-chips li:nth-child(2) { --k: 1; transform: translateX(-24px); }
.hero-chips li:nth-child(3) { --k: 2; }
.hero-chips b { font: 800 26px/1 var(--display); color: var(--snow); }
.hero-chips span { font-size: 14px; color: var(--text); }
.scroll-cue { position: absolute; left: 50%; bottom: 26px; width: 26px; height: 42px; margin-left: -13px; border: 1.5px solid rgba(241, 243, 243, .4); border-radius: 20px; opacity: calc(1 - var(--p, 0) * 4); }
.scroll-cue span { position: absolute; left: 50%; top: 8px; width: 3px; height: 8px; margin-left: -1.5px; border-radius: 2px; background: var(--gold); animation: wheel 1.8s infinite var(--ease); }
@keyframes wheel { 60% { transform: translateY(12px); opacity: 0; } 61% { transform: none; opacity: 0; } 100% { opacity: 1; } }

/* 跑馬燈 */
.marquee { position: relative; z-index: 3; margin-top: -14vh; padding: 26px 0; overflow: hidden; border-block: 1px solid var(--line); background: rgba(11, 17, 24, .6); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent); }
.marquee-track { display: flex; width: max-content; align-items: center; gap: 40px; animation: marq 38s linear infinite; }
.marquee-track span { font: 800 clamp(28px, 4.4vw, 60px)/1 var(--display); color: transparent; -webkit-text-stroke: 1px rgba(241, 243, 243, .55); white-space: nowrap; letter-spacing: .02em; }
.marquee-track span:nth-of-type(3n+1) { color: var(--snow); -webkit-text-stroke: 0; }
.marquee-track i { font-style: normal; color: var(--gold); font-size: clamp(16px, 2vw, 26px); }
@keyframes marq { to { transform: translateX(-33.333%); } }

/* 宣言 */
.manifesto { max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 14vw, 200px) var(--gut) clamp(64px, 8vw, 120px); }
.mani { font-family: var(--serif); font-weight: 700; font-size: clamp(1.7rem, 4.2vw, 3.6rem); line-height: 1.5; color: var(--snow); max-width: 20em; margin: 0; }
.js .mani .w { opacity: .13; transition: opacity .25s linear; }
.js .mani .w.on { opacity: 1; }

/* 進場 */
.js [data-reveal] { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity 1s var(--d, 0s) var(--ease), transform 1.1s var(--d, 0s) var(--ease); }
.js [data-reveal].in { opacity: 1; transform: none; }
.split .sw { display: inline-block; overflow: hidden; vertical-align: bottom; padding-bottom: .08em; margin-bottom: -.08em; }
.split .sc { display: inline-block; transform: translateY(105%); transition: transform 1s calc(var(--i) * 28ms) var(--ease); }
.split.in .sc { transform: none; }

.sec-head { max-width: var(--wrap); margin: 0 auto 44px; padding: 0 var(--gut); display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 14px 40px; }
.sec-head h2 { font-size: clamp(2.1rem, 5vw, 4.2rem); }
.sec-head p { color: var(--frost); margin: 0; max-width: 26em; }
.sec-head a { color: var(--snow); }

/* Bento 磚格 */
.bento-sec { position: relative; max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gut) clamp(96px, 12vw, 180px); }
.bento-sec::before { content: ""; position: absolute; inset: -10% 5% 10%; z-index: -1; pointer-events: none; filter: blur(80px); opacity: .5;
  background: radial-gradient(40% 50% at 20% 30%, rgba(230, 182, 95, .22), transparent 70%), radial-gradient(40% 50% at 80% 70%, rgba(91, 120, 150, .35), transparent 70%);
  animation: aurora 16s ease-in-out infinite alternate; }
@keyframes aurora { to { transform: translate(4%, -3%) scale(1.08); } }
.bento { display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(220px, auto); gap: 14px; }
.tile { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r); padding: 26px; text-decoration: none; display: flex; flex-direction: column;
  background: linear-gradient(160deg, rgba(255, 255, 255, .06), rgba(255, 255, 255, .02)); border: 1px solid var(--glass-line);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06); transition: border-color .4s, transform .6s var(--ease); }
.tile::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s;
  background: radial-gradient(380px circle at var(--sx, 50%) var(--sy, 50%), rgba(230, 182, 95, .16), transparent 60%); }
.tile:hover::after { opacity: 1; }
.tile:hover { border-color: rgba(230, 182, 95, .35); }
a.tile:hover { transform: translateY(-4px); }
.tile-k { font-size: 14px; color: var(--frost); letter-spacing: .08em; }
.tile-d { font-size: 15px; color: var(--frost); line-height: 1.7; margin-top: auto; }
.tile-more { display: inline-flex; gap: 8px; align-items: center; color: var(--snow); font-size: 15px; margin-top: 18px; }
.tile-about { grid-column: span 2; grid-row: span 2; padding: clamp(26px, 3vw, 44px); background: radial-gradient(120% 80% at 100% 0%, rgba(230, 182, 95, .14), transparent 55%), linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02)); }
.tile-logo img { width: 150px; margin-bottom: auto; }
.tile-big { font-family: var(--serif); font-weight: 900; font-size: clamp(1.9rem, 3.4vw, 3.1rem); line-height: 1.25; color: var(--snow); margin: 56px 0 18px; }
.tile-about .tile-d { margin-top: 0; max-width: 26em; }
.tile-latest { grid-row: span 2; padding: 0; justify-content: flex-end; }
.tile-latest img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform 1.2s var(--ease); }
.tile-latest::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(0deg, rgba(11, 17, 24, .98) 22%, rgba(11, 17, 24, .3) 65%, rgba(11, 17, 24, 0)); }
.tile-latest:hover img { transform: scale(1.06); }
.tile-latest-body { padding: 24px; display: grid; gap: 10px; }
.badge { justify-self: start; font-size: 12px; font-weight: 700; letter-spacing: .1em; color: var(--night); background: var(--gold); padding: 4px 10px; border-radius: 999px; }
.tile-latest-t { font-family: var(--serif); font-weight: 700; font-size: 19px; line-height: 1.5; color: var(--snow); }
.tile-num { font: 800 clamp(56px, 6vw, 84px)/1 var(--display); color: var(--snow); margin: 14px 0 10px; letter-spacing: -.02em; }
.tile-num::after { content: "篇"; font: 500 16px var(--sans); color: var(--frost); margin-left: 6px; letter-spacing: 0; }
.tile-quote { justify-content: center; background: linear-gradient(160deg, rgba(230, 182, 95, .16), rgba(230, 182, 95, .04)); border-color: rgba(230, 182, 95, .25); }
.tile-q { font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.65; color: var(--snow); }
.tile-ig { background: linear-gradient(160deg, rgba(91, 120, 150, .3), rgba(91, 120, 150, .06)); }
.tile-handle { font: 800 clamp(17px, 1.55vw, 22px)/1.2 var(--display); color: var(--snow); margin: 14px 0 10px; white-space: nowrap; }

/* 堆疊卡片 */
.stack-sec { padding: 0 0 clamp(80px, 10vw, 140px); }
.stack { list-style: none; margin: 0 auto; padding: 0 var(--gut); max-width: var(--wrap); }
.stack-card { position: sticky; top: calc(100px + var(--n) * 22px); margin-bottom: 8vh; transform-origin: 50% 0; transform: scale(var(--s, 1)); filter: brightness(var(--b, 1)); will-change: transform; }
.stack-card:last-child { margin-bottom: 0; }
.stack-card a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); height: min(72vh, 600px); text-decoration: none; overflow: hidden; border-radius: 36px;
  background: linear-gradient(160deg, #18222d, #0f161e); border: 1px solid var(--glass-line); box-shadow: 0 -20px 60px -20px rgba(0, 0, 0, .7); }
.stack-img { overflow: hidden; min-height: 0; }
.stack-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.stack-card a:hover .stack-img img { transform: scale(1.05); }
.stack-body { padding: clamp(28px, 4vw, 64px); display: flex; flex-direction: column; }
.stack-n { font: 800 clamp(48px, 7vw, 104px)/1 var(--display); color: var(--snow); letter-spacing: -.02em; display: flex; align-items: baseline; gap: 12px; }
.stack-n { font-family: var(--serif); font-weight: 900; font-size: clamp(36px, 4.6vw, 64px); }
.stack-n em { font: 500 16px var(--sans); color: var(--frost); }
.stack-t { font-family: var(--serif); font-weight: 700; font-size: clamp(1.4rem, 2.6vw, 2.2rem); line-height: 1.35; color: var(--snow); margin-top: auto; }
.stack-d { color: var(--frost); margin-top: 16px; max-width: 30em; }
.stack-go { display: inline-flex; gap: 10px; align-items: center; color: var(--gold); margin-top: 28px; font-size: 15px; }

/* 文章庫 */
.journal { padding: clamp(80px, 10vw, 140px) 0; }
.tools { max-width: var(--wrap); margin: 0 auto 36px; padding: 0 var(--gut); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px 24px; align-items: center; }
.chips, .view { display: flex; flex-wrap: wrap; gap: 6px; }
.chips { padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.chips button, .view button {
  font: inherit; font-size: 14px; letter-spacing: .04em; color: var(--text); cursor: pointer;
  background: transparent; border: 0; border-radius: 999px; padding: 8px 16px; transition: background-color .3s, color .3s;
}
.view { padding: 6px; border-radius: 999px; background: rgba(255, 255, 255, .04); border: 1px solid var(--line); }
.chips button span { color: var(--frost); font-size: 12px; margin-left: 2px; }
.chips button:hover, .view button:hover { color: var(--snow); background: rgba(255, 255, 255, .06); }
.chips button[aria-pressed="true"], .view button[aria-pressed="true"] { background: var(--snow); color: var(--night); }
.chips button[aria-pressed="true"] span { color: #7a5c1e; }
.tools-right { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.search { position: relative; display: block; }
.search svg { position: absolute; left: 16px; top: 50%; transform: translateY(-50%); color: var(--frost); pointer-events: none; }
.search input {
  width: 280px; font: inherit; font-size: 14px; color: var(--snow); background: rgba(255, 255, 255, .05);
  border: 1px solid var(--line); border-radius: 999px; padding: 11px 18px 11px 42px; transition: border-color .3s, background-color .3s, width .5s var(--ease);
}
.search input::placeholder { color: var(--frost); }
.search input:focus { outline: none; border-color: var(--gold); background: rgba(255, 255, 255, .08); }

.rail {
  --pad: max(var(--gut), calc((100vw - var(--wrap)) / 2 + var(--gut)));
  list-style: none; margin: 0; padding: 12px var(--pad) 28px; scroll-padding-inline: var(--pad);
  display: grid; grid-auto-flow: column; grid-auto-columns: clamp(240px, 23vw, 320px); gap: clamp(16px, 1.8vw, 24px);
  overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; cursor: grab; scroll-snap-type: x proximity;
}
.rail::-webkit-scrollbar { display: none; }
.rail.dragging { cursor: grabbing; scroll-snap-type: none; }
.rail.dragging a { pointer-events: none; }
.rail:focus-visible { outline-offset: -2px; }
.card { scroll-snap-align: start; perspective: 900px; }
.card[hidden] { display: none; }
.card a { display: block; text-decoration: none; user-select: none; -webkit-user-select: none; }
.card-img { display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: 22px; background: var(--slate); position: relative; border: 1px solid var(--glass-line);
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .6s var(--ease), box-shadow .6s; transform-style: preserve-3d; }
.card a:hover .card-img { box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .8), 0 0 0 1px rgba(230, 182, 95, .3); }
.card-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease), filter .5s; filter: brightness(.85) saturate(.92); }
.card a:hover .card-img img { transform: scale(1.06); filter: none; }
.glare { position: absolute; inset: 0; pointer-events: none; opacity: 0; transition: opacity .4s;
  background: radial-gradient(circle at var(--gx, 50%) var(--gy, 0%), rgba(255, 255, 255, .28), transparent 55%); mix-blend-mode: soft-light; }
.card a:hover .glare { opacity: 1; }
.card-meta { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--frost); margin: 16px 4px 6px; }
.card-meta span:first-child { color: var(--gold); }
.card-title { display: block; margin: 0 4px; font-family: var(--serif); font-weight: 700; font-size: 18px; line-height: 1.55; color: var(--snow); transition: color .3s; }
.card a:hover .card-title { color: var(--gold-2); }
.js .rail .card { opacity: 0; transform: translateX(80px); transition: opacity .9s var(--ease), transform 1.1s var(--ease); transition-delay: calc(var(--k, 0) * 70ms); }
.js .rail.in .card { opacity: 1; transform: none; }
.rail-foot { max-width: var(--wrap); margin: 8px auto 0; padding: 0 var(--gut); display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; }
.count { margin: 0; font-size: 14px; color: var(--frost); min-width: 7em; }
.rail-track { height: 3px; background: var(--line); border-radius: 3px; position: relative; overflow: hidden; }
.rail-track span { position: absolute; inset: 0 auto 0 0; border-radius: 3px; background: var(--gold); width: var(--w, 20%); transform: translateX(var(--x, 0)); }
.rail-btns { display: flex; gap: 10px; }
.rail-btns button { width: 50px; height: 50px; border-radius: 50%; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .05); color: var(--snow); cursor: pointer; display: grid; place-items: center; transition: background-color .3s, color .3s, transform .4s var(--spring); }
.rail-btns button:first-child svg { transform: scaleX(-1); }
.rail-btns button:hover { background: var(--snow); color: var(--night); transform: scale(1.08); }
.empty { max-width: var(--wrap); margin: 0 auto; padding: 24px var(--gut); color: var(--frost); }
.rail-wrap.grid .rail { grid-auto-flow: row; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); grid-auto-columns: auto; overflow: visible; cursor: auto; row-gap: 48px; }
.rail-wrap.grid .rail-track, .rail-wrap.grid .rail-btns { display: none; }

/* 關於 */
.about { max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--gut); display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(40px, 7vw, 112px); }
.about-mark { position: sticky; top: 110px; align-self: start; }
.about-photo { border-radius: var(--r); overflow: hidden; aspect-ratio: 4 / 5; margin-bottom: 24px; border: 1px solid var(--glass-line); }
.about-photo img { width: 100%; height: 100%; object-fit: cover; object-position: 78% 40%; transform: scale(calc(1.15 - var(--ap, 0) * .15)); }
.about-mark p { color: var(--frost); font-size: 15px; max-width: 24em; }
.about-text { max-width: 36em; padding-top: 12px; }
.about-text h2 { font-size: clamp(2.1rem, 4.6vw, 3.8rem); margin-bottom: 44px; }
.sign { font-family: var(--serif); font-size: 22px; color: var(--snow); margin-top: 44px; }
.sign span { display: block; font-size: 15px; color: var(--gold); margin-top: 6px; font-family: var(--sans); }
.about-links { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 28px; margin-top: 36px; }
.link { color: var(--text); text-decoration-color: var(--gold); }

/* 合作 */
.contact { position: relative; max-width: var(--wrap); margin: 0 auto; padding: clamp(96px, 12vw, 180px) var(--gut); }
.contact-glow { position: absolute; left: 10%; right: 10%; top: 20%; height: 60%; z-index: -1; pointer-events: none; filter: blur(90px); opacity: .55;
  background: radial-gradient(50% 60% at 30% 50%, rgba(230, 182, 95, .28), transparent 70%), radial-gradient(50% 60% at 75% 50%, rgba(91, 120, 150, .4), transparent 70%);
  animation: aurora 14s ease-in-out infinite alternate; }
.contact h2 { font-size: clamp(2.6rem, 7vw, 6.2rem); font-weight: 900; line-height: 1.12; margin-bottom: 28px; }
.contact > p { color: var(--frost); max-width: 30em; }
.contact-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 56px; }
.contact-card { position: relative; overflow: hidden; isolation: isolate; border-radius: var(--r); padding: clamp(24px, 3vw, 40px); text-decoration: none; display: grid; gap: 10px; transition: transform .6s var(--ease), border-color .4s; }
.contact-card::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s; background: radial-gradient(400px circle at var(--sx, 50%) var(--sy, 50%), rgba(230, 182, 95, .2), transparent 60%); }
.contact-card:hover::after { opacity: 1; }
.contact-card:hover { transform: translateY(-4px); border-color: rgba(230, 182, 95, .4); }
.contact .k { font-size: 14px; color: var(--frost); }
.contact .v { font: 700 clamp(20px, 2.6vw, 32px)/1.3 var(--sans); color: var(--snow); overflow-wrap: anywhere; letter-spacing: .01em; }
.contact .go { position: absolute; right: clamp(20px, 3vw, 36px); top: clamp(20px, 3vw, 36px); width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--snow); color: var(--night); transform: rotate(-45deg); transition: transform .5s var(--spring), background-color .3s; }
.contact-card:hover .go { transform: none; background: var(--gold); }

/* 頁尾 */
.foot { padding: 64px var(--gut) 28px; border-top: 1px solid var(--line); overflow: hidden; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px 40px; }
.foot-line { margin: 0; font-family: var(--serif); font-size: 20px; color: var(--snow); }
.foot ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; font-size: 15px; }
.foot ul a { display: inline-block; text-decoration: none; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); transition: background-color .3s, color .3s; }
.foot ul a:hover { background: var(--snow); color: var(--night); }
.wordmark { display: block; width: min(520px, 72vw); margin: 56px auto 0; opacity: .92; transition: opacity .3s;
  transform: translateY(calc((1 - var(--wp, 1)) * 30%)); }
.wordmark:hover { opacity: 1; }
.wordmark img { display: block; width: 100%; height: auto; }
.fine { max-width: var(--wrap); margin: 24px auto 0; font-size: 13px; color: var(--frost); }

/* 文章頁 */
.post-hero { position: relative; overflow: hidden; padding: 150px var(--gut) clamp(56px, 7vw, 96px); }
.post-ambient { position: absolute; inset: -80px; background-size: cover; background-position: center; filter: blur(80px) saturate(1.4); opacity: .35; transform: scale(1.2); animation: breathe 14s ease-in-out infinite alternate; }
@keyframes breathe { to { transform: scale(1.35) translate(2%, -2%); opacity: .45; } }
.post-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--night), rgba(11, 17, 24, .25) 60%, rgba(11, 17, 24, .6)); }
.post-hero-inner { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: clamp(32px, 6vw, 88px); align-items: end; }
.post-cover { border-radius: var(--r); overflow: hidden; border: 1px solid var(--glass-line); box-shadow: 0 50px 100px -30px rgba(0, 0, 0, .8); animation: rise 1.1s .1s var(--ease) both; }
.post-cover img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.crumb { display: inline-flex; align-items: center; gap: 8px; color: var(--text); font-size: 14px; text-decoration: none; margin-bottom: 24px; padding: 7px 16px; border-radius: 999px; background: rgba(255, 255, 255, .06); border: 1px solid var(--glass-line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); transition: background-color .3s; }
.crumb::before { content: "←"; transition: transform .3s var(--ease); }
.crumb:hover { background: rgba(255, 255, 255, .12); color: var(--snow); }
.crumb:hover::before { transform: translateX(-4px); }
.post-meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 13px; color: var(--text); margin-bottom: 18px; animation: rise 1s .2s var(--ease) both; }
.post-meta span { padding: 4px 12px; border-radius: 999px; border: 1px solid var(--glass-line); background: rgba(255, 255, 255, .04); }
.post-meta .cat { color: var(--night); background: var(--gold); border-color: var(--gold); font-weight: 500; }
.post-titles h1 { font-size: clamp(2rem, 4.6vw, 3.7rem); line-height: 1.24; margin-bottom: 22px; }
.post-titles .ch { animation-duration: .9s; animation-delay: calc(.25s + var(--i) * .022s); }
.deck { font-size: clamp(17px, 1.6vw, 20px); color: var(--text); max-width: 34em; margin-bottom: 28px; animation: rise 1s .7s var(--ease) both; }
.post-titles > p:last-child { animation: rise 1s .85s var(--ease) both; margin: 0; }

.post-grid { max-width: var(--wrap); margin: 0 auto; padding: clamp(40px, 5vw, 72px) var(--gut) 0; display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: clamp(40px, 7vw, 104px); }
.toc { position: sticky; top: 100px; align-self: start; font-size: 14px; padding: 20px; border-radius: 22px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); }
.toc summary { color: var(--frost); letter-spacing: .12em; margin-bottom: 12px; list-style: none; cursor: default; }
.toc summary::-webkit-details-marker { display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: c; display: grid; gap: 2px; }
.toc li { counter-increment: c; }
.toc a { display: grid; grid-template-columns: 26px 1fr; padding: 8px 10px; border-radius: 12px; color: var(--frost); text-decoration: none; line-height: 1.55; transition: color .3s, background-color .3s; }
.toc a::before { content: counter(c, decimal-leading-zero); font-size: 12px; padding-top: 2px; font-variant-numeric: tabular-nums; }
.toc a:hover { color: var(--snow); background: rgba(255, 255, 255, .05); }
.toc a[aria-current="true"] { color: var(--snow); background: rgba(230, 182, 95, .12); }
.toc a[aria-current="true"]::before { color: var(--gold); }

.prose { max-width: 40em; min-width: 0; }
.prose > h2 { font-size: clamp(1.5rem, 2.6vw, 2.05rem); margin: 80px 0 24px; padding-top: 12px; }
.prose > h2:first-child { margin-top: 0; }
.prose > h2::before { content: ""; display: block; width: 40px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold), transparent); margin-bottom: 22px; }
.prose h3 { font-size: 1.2rem; margin: 32px 0 12px; }
.prose p, .prose li { line-height: 2; }
.prose ul, .prose ol:not(.steps) { padding-left: 1.4em; }
.prose li { margin-bottom: .5em; }
.prose li::marker { color: var(--gold); }
.prose strong, .prose b { color: var(--snow); font-weight: 700; }
.prose a { color: var(--snow); text-decoration-color: var(--gold); overflow-wrap: anywhere; }
.prose code { font-size: .9em; background: var(--slate); color: var(--snow); padding: .15em .45em; border-radius: 6px; overflow-wrap: anywhere; }
.prose pre { background: var(--night-2); border: 1px solid var(--line); padding: 20px; border-radius: 16px; overflow-x: auto; font-size: 14px; line-height: 1.7; }
.prose pre code { background: none; padding: 0; }
.prose blockquote { margin: 28px 0; padding: 18px 24px; border-radius: 18px; background: rgba(230, 182, 95, .08); border: 1px solid rgba(230, 182, 95, .2); font-family: var(--serif); font-size: 1.1em; color: var(--snow); }
.prose img { border-radius: 18px; margin: 28px 0; }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 48px 0; }
.steps { list-style: none; padding: 0; margin: 12px 0 28px; counter-reset: s; display: grid; gap: 10px; }
.steps > li { counter-increment: s; position: relative; padding: 18px 20px 18px 70px; margin: 0; border-radius: 18px; background: rgba(255, 255, 255, .035); border: 1px solid var(--line); transition: border-color .3s, background-color .3s; }
.steps > li:hover { border-color: rgba(230, 182, 95, .3); background: rgba(255, 255, 255, .05); }
.steps > li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 34px; height: 34px; border-radius: 50%; background: var(--gold); color: var(--night); display: grid; place-items: center; font: 800 15px/1 var(--display); }
.steps > li > strong:first-child { display: inline-block; font-family: var(--serif); font-size: 1.08rem; }
.table-wrap { overflow-x: auto; margin: 12px 0 32px; border: 1px solid var(--line); border-radius: 18px; background: rgba(255, 255, 255, .02); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--line); line-height: 1.75; min-width: 8em; }
.prose th { color: var(--snow); background: rgba(255, 255, 255, .04); font-weight: 500; white-space: nowrap; }
.prose tr:last-child td { border-bottom: 0; }
.dt-start, .dt-check, .example, .cost-calculator { background: rgba(255, 255, 255, .035); border: 1px solid var(--line); border-radius: 22px; padding: clamp(20px, 3vw, 30px); margin: 0 0 32px; }
.dt-start h2, .dt-check h2 { font-size: 1.35rem; margin-bottom: 14px; }
.dt-check { border-color: rgba(230, 182, 95, .3); background: rgba(230, 182, 95, .06); }
.dt-hint { margin: 8px 0; }
.dt-hint summary { cursor: pointer; color: var(--snow); }
.example { border-color: rgba(230, 182, 95, .3); font-family: var(--serif); color: var(--snow); }
.cost-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; }
.cost-fields label { display: grid; gap: 6px; font-size: 14px; color: var(--frost); }
.cost-fields input { font: inherit; font-size: 17px; color: var(--snow); background: var(--night); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; }
.cost-fields input:focus { outline: none; border-color: var(--gold); }
.cost-result { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line); }
.cost-result p { margin: 0 0 4px; }
.cost-result p:first-child { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; color: var(--gold); }
.caption { margin: 64px 0 0; border-radius: 22px; border: 1px solid var(--line); background: rgba(255, 255, 255, .03); padding: 0 24px; }
.caption summary { cursor: pointer; list-style: none; padding: 20px 0; display: flex; justify-content: space-between; color: var(--snow); font-weight: 500; }
.caption summary::-webkit-details-marker { display: none; }
.caption summary::after { content: "+"; color: var(--gold); font-size: 24px; line-height: 1; transition: transform .4s var(--spring); }
.caption[open] summary::after { transform: rotate(45deg); }
.caption > div { padding: 0 0 24px; color: var(--frost); font-size: 16px; }
.caption > div p { margin: 0 0 .8em; line-height: 1.9; }
.sources { margin-top: 48px; }
.sources h2 { font-size: 1.25rem; margin-bottom: 14px; }
.sources ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sources a { display: flex; justify-content: space-between; gap: 16px; padding: 14px 18px; border-radius: 14px; border: 1px solid var(--line); text-decoration: none; color: var(--text); transition: border-color .3s, color .3s, transform .4s var(--ease); }
.sources a::after { content: "↗"; color: var(--gold); }
.sources a:hover { color: var(--snow); border-color: rgba(230, 182, 95, .4); transform: translateX(4px); }
.ig-cta { margin-top: 64px; padding: clamp(28px, 4vw, 44px); border-radius: var(--r); position: relative; overflow: hidden;
  background: radial-gradient(80% 120% at 100% 0%, rgba(230, 182, 95, .2), transparent 60%), linear-gradient(160deg, #18222d, #0f161e); border: 1px solid var(--glass-line); }
.ig-cta p:first-child { font-family: var(--serif); font-weight: 700; font-size: clamp(1.3rem, 2.4vw, 1.8rem); color: var(--snow); margin-bottom: 24px; }
.ig-cta .btns { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.next { max-width: var(--wrap); margin: 0 auto; padding: clamp(80px, 10vw, 140px) var(--gut); }
.next h2 { font-size: clamp(1.9rem, 3.8vw, 3rem); margin-bottom: 36px; }
.next-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 2.4vw, 28px); }
.notfound { max-width: var(--wrap); margin: 0 auto; padding: 200px var(--gut) 120px; }
.notfound h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); margin-bottom: 16px; }

::view-transition-old(root), ::view-transition-new(root) { animation-duration: .45s; animation-timing-function: var(--ease); }

/* 響應式 */
@media (max-width: 1024px) {
  .bento { grid-template-columns: repeat(2, 1fr); }
  .tile-about { grid-column: span 2; grid-row: auto; }
  .tile-latest { grid-row: span 2; }
  .hero-chips { display: none; }
}
@media (max-width: 900px) {
  .stack-card a { grid-template-columns: 1fr; height: auto; }
  .stack-img { aspect-ratio: 16 / 10; }
  .stack-t { margin-top: 18px; }
  .about { grid-template-columns: 1fr; }
  .about-mark { position: static; }
  .about-photo { aspect-ratio: 16 / 10; }
  .contact-cards, .next-list { grid-template-columns: 1fr; }
  .post-hero-inner { grid-template-columns: 1fr; }
  .post-cover { width: min(220px, 56vw); }
  .post-grid { grid-template-columns: 1fr; }
  .toc { position: static; }
  .toc summary { margin: 0; cursor: pointer; list-style: revert; }
  .toc details[open] summary { margin-bottom: 12px; }
  .next-list .card a { display: grid; grid-template-columns: 96px 1fr; gap: 0 18px; align-items: start; }
  .next-list .card-img { grid-row: span 2; border-radius: 16px; }
  .next-list .card-meta { margin-top: 0; }
  .ring { display: none !important; }
}
@media (max-width: 640px) {
  body { font-size: 16px; }
  :root { --r: 22px; }
  .bar { top: 10px; }
  .bar-pill { padding: 6px 6px 6px 16px; gap: 8px; }
  .logo img { width: 72px; }
  .bar nav a { padding: 6px 9px; font-size: 14px; }
  .bar-cta { padding: 8px 12px; font-size: 13px; }
}
@media (max-width: 380px) {
  .bar-pill { padding-left: 12px; gap: 4px; }
  .logo img { width: 62px; }
  .bar nav { gap: 0; }
  .bar nav a { padding: 6px 7px; font-size: 13px; }
  .bar-cta { padding: 8px 10px; font-size: 12px; }
}
@media (max-width: 640px) {
  .hero { height: 160vh; }
  .hero-photo img { object-position: 72% 40%; }
  .hero-shade { background: linear-gradient(0deg, var(--night) 8%, rgba(11, 17, 24, .55) 55%, rgba(11, 17, 24, .25)); }
  .hero-copy { right: var(--gut); bottom: 80px; }
  .scroll-cue { display: none; }
  .marquee { margin-top: -10vh; padding: 18px 0; }
  .bento { grid-template-columns: 1fr; grid-auto-rows: auto; }
  .tile-about, .tile-latest { grid-column: auto; grid-row: auto; }
  .tile-latest { min-height: 420px; }
  .tile { min-height: 180px; }
  .stack-card { top: calc(80px + var(--n) * 14px); }
  .stack-card a { border-radius: 26px; }
  .tools-right, .search, .search input { width: 100%; }
  .chips { border-radius: 22px; }
  .rail { grid-auto-columns: 74vw; }
  .rail-foot { grid-template-columns: 1fr auto; }
  .rail-track { display: none; }
  .cost-fields { grid-template-columns: 1fr; }
  .post-hero { padding-top: 110px; }
  .foot ul { flex-wrap: wrap; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0s !important; transition-duration: .01ms !important; }
  .grain { display: none; }
  .hero { height: auto; }
  .hero-stage { position: relative; }
  .hero-photo, .hero-copy, .wordmark { transform: none !important; opacity: 1 !important; }
  .hero-stage::after { display: none; }
  .marquee { margin-top: 0; }
  .marquee-track { animation: none; }
  .js .mani .w { opacity: 1; }
  .js [data-reveal], .js .rail .card { opacity: 1; transform: none; }
  .split .sc { transform: none; }
  .stack-card { position: relative; top: auto; transform: none; filter: none; }
}
