/* 晨偲 官網 v3 ─ 舞台樣式
   3D 場景是主角，卡片只放一段話和幾個圖示。細節在 hover 卡和跳出的整頁說明裡。
   html.stage：有 3D，整頁不捲動，卡片疊在場景上，跟著進度換場。
   html.flat：沒有 3D，照一般網頁從上往下排，所有內容都直接展開。
   卡片換場：stage.js 每一幀寫入 --l（-1 進場 … 0 停住 … 1 離場）和 --a（|l|）。 */

:root {
  color-scheme: light;
  --paper: oklch(0.965 0.01 85);
  --paper-2: oklch(0.94 0.013 85);
  --ink: oklch(0.24 0.012 120);
  --ink-2: oklch(0.42 0.012 120);
  --ink-3: oklch(0.56 0.01 120);
  --line: oklch(0.24 0.012 120 / 0.16);
  --line-strong: oklch(0.24 0.012 120 / 0.34);
  --learn: oklch(0.66 0.15 50);
  --learn-ink: oklch(0.5 0.14 42);
  --teams: oklch(0.42 0.085 248);
  --teams-ink: oklch(0.38 0.09 250);
  --accent: var(--learn-ink);
  --ok: oklch(0.45 0.09 150);
  --serif: "Noto Serif TC", "Songti TC", "PMingLiU", serif;
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", monospace;
  --gutter: clamp(1rem, 0.4rem + 3vw, 3rem);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  --bar-h: 4.25rem;
  /* 疊在 3D 場景上的玻璃面、陰影、熱點 */
  --glass: oklch(0.97 0.01 85 / 0.7);
  --glass-2: oklch(0.985 0.006 85 / 0.8);
  --card: oklch(0.975 0.008 85 / 0.9);
  --card-solid: oklch(0.98 0.007 85 / 0.97);
  --field: oklch(0.985 0.006 85);
  --chip-mute: oklch(0.92 0.012 85);
  --stage-bg: #ebe7df;
  --veil-a: oklch(0.95 0.01 85);
  --veil-b: oklch(0.93 0.012 85);
  --halo: oklch(0.96 0.01 85 / 0.9);
  --shade: oklch(0.25 0.02 80);
  --spot-ring: oklch(0.3 0.02 80 / 0.42);
  --spot-ring-2: oklch(0.3 0.02 80 / 0.22);
  --spot-halo: oklch(0.99 0.005 85 / 0.32);
  --spot-halo-on: oklch(0.99 0.005 85 / 0.55);
  --flat-glow: oklch(0.93 0.05 60 / 0.55);
  --flat-top: oklch(0.95 0.012 85);
  /* 切換到另一個站的按鈕：學習主站上是石墨色（預告企業專區），企業專區上是暖紙色 */
  --switch-bg: #17212b;
  --switch-ink: #f3f5f7;
  --curtain: #dce2e8;
}
body[data-line="teams"] { --accent: var(--teams-ink); }

/* ── 企業專區：「晨間石墨」──
   冷灰藍紙、深石墨字、深藍強調；晨光橘只留給日出記號和「預約諮詢」。
   文字對比（WCAG）：ink 14.4、ink-2 8.0、ink-3 4.9、accent 7.6，都在 #EEF1F4 上量。 */
html[data-site="biz"] {
  --paper: #eef1f4;
  --paper-2: #e2e7ec;
  --ink: #17212b;
  --ink-2: #3e4a57;
  --ink-3: #5d6976;
  --line: rgb(23 33 43 / 0.16);
  --line-strong: rgb(23 33 43 / 0.42);
  --teams: #1f4e79;
  --teams-ink: #1f4e79;
  --accent: #1f4e79;
  --cta: #e0782f;
  --cta-ink: #17212b;
  --glass: rgb(248 250 251 / 0.72);
  --glass-2: rgb(248 250 251 / 0.82);
  --card: rgb(248 250 251 / 0.92);
  --card-solid: rgb(248 250 251 / 0.97);
  --field: #f8fafb;
  --chip-mute: #e2e7ec;
  --stage-bg: #e3e8ec;
  --veil-a: #e6ebef;
  --veil-b: #dce2e8;
  --halo: rgb(238 241 244 / 0.92);
  --shade: #1e262e;
  --spot-ring: rgb(23 33 43 / 0.45);
  --spot-ring-2: rgb(23 33 43 / 0.24);
  --spot-halo: rgb(248 250 251 / 0.36);
  --spot-halo-on: rgb(248 250 251 / 0.6);
  --flat-glow: rgb(239 194 156 / 0.4);
  --flat-top: #e6ebef;
  --switch-bg: #f3eee4;
  --switch-ink: #2f3531;
  --curtain: #ebe4d6;
}
html[data-site="biz"] body[data-line="teams"] { --accent: #1f4e79; }

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.75 var(--sans);
  -webkit-font-smoothing: antialiased;
  overflow-wrap: break-word;
}
a { color: inherit; text-decoration: none; }
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; text-wrap: balance; letter-spacing: -0.01em; }
p { text-wrap: pretty; }
svg { display: block; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.skip {
  position: fixed; z-index: 80; inset-block-start: 0.75rem; inset-inline-start: 0.75rem;
  padding: 0.6rem 1rem; background: var(--ink); color: var(--paper); translate: 0 -200%;
}
.skip:focus { translate: 0 0; }

/* ── 頁首 ─────────────────────────────── */
.bar {
  position: fixed; z-index: 40; inset: 0 0 auto;
  height: var(--bar-h);
  display: flex; align-items: center; gap: 2rem;
  padding: env(safe-area-inset-top) var(--gutter) 0;
  pointer-events: none;
}
.bar > * { pointer-events: auto; }
.brand { display: inline-flex; align-items: center; gap: 0.55rem; font: 700 1.3rem/1 var(--serif); letter-spacing: 0.04em; }
.brand-mark { width: 2rem; height: 2rem; }
.brand-mark .sun { fill: var(--learn); }
.menu { display: flex; gap: 1.6rem; margin-inline-start: auto; font-size: 0.94rem; }
.menu a { position: relative; padding-block: 0.4rem; color: var(--ink-2); transition: color 0.2s; }
.menu a:hover, .menu a[aria-current] { color: var(--ink); }
.menu a[aria-current]::after { content: ""; position: absolute; inset: auto 0 0; height: 2px; background: var(--accent); border-radius: 2px; }
.bar-contact {
  padding: 0.45rem 1.05rem; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.9rem; background: var(--glass); transition: background 0.2s, border-color 0.2s;
}
.bar-contact:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.brand-sub {
  margin-inline-start: 0.15rem; padding-inline-start: 0.6rem; border-inline-start: 1px solid var(--line-strong);
  font: 500 0.82rem/1 var(--sans); letter-spacing: 0.08em; color: var(--ink-2);
}
/* 企業專區的主要行動：晨光橘底、深字（白字對比不夠） */
.bar-cta { background: var(--cta); color: var(--cta-ink); border-color: var(--cta); font-weight: 500; }
.bar-cta:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
/* 切換到另一個站 */
.bar-switch {
  display: inline-flex; align-items: center; gap: 0.4rem; position: relative;
  padding: 0.45rem 1.05rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500; white-space: nowrap;
  background: var(--switch-bg); color: var(--switch-ink);
  box-shadow: 0 8px 20px -12px color-mix(in oklab, var(--shade) 60%, transparent);
  transition: translate 0.2s var(--ease), box-shadow 0.2s;
}
.bar-switch::before { content: ""; position: absolute; inset-block: 0.55rem; inset-inline-start: -0.55rem; width: 1px; background: var(--line-strong); }
.bar-switch .arrow { transition: translate 0.2s var(--ease); }
.bar-switch:hover .arrow { translate: 3px 0; }
.bar-switch.is-back:hover .arrow { translate: -3px 0; }
.bar-switch:hover { box-shadow: 0 10px 24px -10px color-mix(in oklab, var(--shade) 70%, transparent); }
.bar-switch .sw-short { display: none; }
.foot-switch { margin-inline-start: 0.75rem; color: var(--accent); border-block-end: 1px solid currentColor; }

/* 換站時的霧幕：先蓋滿，再在新的一站散開 */
.curtain {
  position: fixed; inset: 0; z-index: 35; pointer-events: none; opacity: 0;
  background: radial-gradient(120% 90% at 50% 55%, color-mix(in oklab, var(--curtain) 70%, white) 25%, var(--curtain));
  transition: opacity 1.4s ease;
}
html.leaving .curtain { opacity: 1; transition: opacity 0.6s ease; }
html:is(.arriving, .arrived) .curtain { background: radial-gradient(120% 90% at 50% 55%, var(--veil-a) 25%, var(--veil-b)); }
html.arriving .curtain { opacity: 1; transition: none; }

/* ── 按鈕、標籤 ─────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.5rem;
  padding: 0.62rem 1.15rem; border-radius: 999px;
  background: var(--ink); color: var(--paper); border: 1px solid var(--ink);
  font-size: 0.92rem; font-weight: 500; line-height: 1.2;
  transition: background 0.2s, color 0.2s, translate 0.2s var(--ease);
}
.btn:hover { background: var(--accent); border-color: var(--accent); }
.btn:hover .arrow { translate: 3px 0; }
.btn .arrow { transition: translate 0.2s var(--ease); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.status {
  display: inline-block; padding: 0.05rem 0.55rem; border-radius: 999px; vertical-align: 0.1em;
  font: 500 0.72rem/1.6 var(--sans); letter-spacing: 0.02em;
  background: var(--chip-mute); color: var(--ink-2);
}
.status.s-live { background: oklch(0.92 0.04 150); color: var(--ok); }

/* ── 卡片內容（兩種模式共用） ─────────────────────────────── */
.kicker { font: 500 0.74rem/1.5 var(--mono); letter-spacing: 0.14em; color: var(--accent); }
.title { font-size: clamp(1.7rem, 1.1rem + 1.7vw, 2.55rem); line-height: 1.28; margin-block: 0.55rem 0.7rem; }
.text { color: var(--ink-2); font-size: 0.98rem; line-height: 1.8; max-width: 34em; }
.items { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-block-start: 1.1rem; }
.chip {
  display: inline-flex; align-items: center; gap: 0.45rem;
  padding: 0.35rem 0.8rem 0.35rem 0.55rem; border: 1px solid var(--line-strong); border-radius: 999px;
  font-size: 0.84rem; line-height: 1.35; text-align: start; background: var(--glass-2);
  transition: border-color 0.2s, color 0.2s, background 0.2s;
}
.chip .ico { width: 1.05rem; height: 1.05rem; flex: none; color: var(--accent); }
.chip:hover, .chip.is-on { border-color: var(--accent); color: var(--accent); background: var(--paper); }
.actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-block-start: 1.3rem; }
.direct { margin-block-start: 0.9rem; font-size: 0.86rem; color: var(--ink-3); }
.direct a { color: var(--ink); border-block-end: 1px solid var(--line-strong); }
.count { position: absolute; inset: 1.1rem 1.4rem auto auto; font: 500 0.72rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0.08em; }
.count span { opacity: 0.6; }
.hint { display: flex; align-items: center; gap: 0.75rem; margin-block-start: 2.2rem; font: 500 0.78rem/1 var(--mono); letter-spacing: 0.14em; color: var(--ink-3); }
.hint-line { width: 2.5rem; height: 1px; background: currentColor; transform-origin: left; animation: hint 2.4s var(--ease) infinite; }
@keyframes hint { 0% { scale: 0 1; } 60% { scale: 1 1; } 100% { scale: 1 1; opacity: 0; } }

.item-body .label { font: 500 0.72rem/1.5 var(--mono); letter-spacing: 0.1em; color: var(--accent); margin-block-end: 0.2rem; }
.item-body h3 { font-size: 1.05rem; line-height: 1.45; }
.item-body p:not(.label) { color: var(--ink-2); font-size: 0.9rem; line-height: 1.75; margin-block-start: 0.35rem; }
.item-body .list { margin-block-start: 0.5rem; display: grid; gap: 0.3rem; font-size: 0.88rem; color: var(--ink-2); }
.item-body .list li { position: relative; padding-inline-start: 1rem; line-height: 1.6; }
.item-body .list li::before { content: ""; position: absolute; inset: 0.65em auto auto 0; width: 0.4rem; height: 1px; background: var(--accent); }
.item-body .pair { display: grid; gap: 0.4rem; margin-block-start: 0.55rem; font-size: 0.88rem; }
.item-body .pair div { display: grid; grid-template-columns: 2.6rem 1fr; gap: 0.5rem; }
.item-body .pair dt { font: 500 0.72rem/1.9 var(--mono); color: var(--learn-ink); letter-spacing: 0.06em; }
.item-body .pair div + div dt { color: var(--teams-ink); }
.item-body .pair dd { color: var(--ink-2); line-height: 1.6; }

/* ════════════════ 舞台模式 ════════════════ */
html.stage, html.stage body { height: 100%; overflow: hidden; overscroll-behavior: none; }
html.stage body { position: fixed; inset: 0; touch-action: none; background: var(--stage-bg); }
.stage-ui { display: none; }
html.stage .stage-ui { display: block; position: fixed; inset: 0; z-index: 0; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity 1.2s ease; }
html.stage-live #world { opacity: 1; }
.veil {
  position: absolute; inset: 0; opacity: 0; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 55%, var(--veil-a) 30%, var(--veil-b));
}
.grain {
  position: absolute; inset: 0; pointer-events: none; opacity: 0.08; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .2 0 0 0 0 .2 0 0 0 0 .18 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='180' height='180' filter='url(%23n)'/%3E%3C/svg%3E");
}
html.stage .journey { position: fixed; inset: 0; z-index: 10; pointer-events: none; }
html.stage .chapter { position: absolute; inset: 0; visibility: hidden; }
html.stage .chapter.is-vis { visibility: visible; }
html.stage .item-body, html.stage .detail-src { display: none; }

html.stage .card {
  --out: max(0, var(--l, 0));
  --in: max(0, calc(-1 * var(--l, 0)));
  position: absolute;
  inset-inline-start: clamp(1.25rem, 5vw, 5.5rem);
  inset-block-end: clamp(5rem, 12vh, 8.5rem);
  width: min(31rem, 40vw);
  padding: 1.7rem 1.9rem 1.8rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  box-shadow: 0 1px 0 oklch(1 0 0 / 0.6) inset, 0 18px 40px -24px color-mix(in oklab, var(--shade) 35%, transparent);
  pointer-events: auto;
  opacity: clamp(0, calc(1 - var(--a, 0) * 1.65), 1);
  will-change: transform, opacity, filter;
}
html.stage .l-center .card {
  inset-inline: 0; inset-block: calc(var(--bar-h) + 12vh) auto; margin-inline: auto;
  width: min(58rem, 100% - 2 * var(--gutter));
  background: none; border: 0; box-shadow: none; padding: 0; text-align: center;
}
html.stage .l-center .title { font-size: clamp(2.4rem, 1.2rem + 3.4vw, 4.4rem); line-height: 1.18; letter-spacing: -0.02em; }
html.stage .l-center .text { margin-inline: auto; font-size: 1.06rem; }
html.stage .l-center .actions, html.stage .l-center .hint { justify-content: center; }
html.stage .l-center .count { display: none; }
html.stage .l-center .card { text-shadow: 0 0 24px var(--halo), 0 0 8px var(--halo); }
html.stage .w-camino.l-center .card { inset-block-start: calc(var(--bar-h) + 6vh); }

/* 換場方式 */
html.stage .t-fog .card {
  filter: blur(calc(var(--a, 0) * 16px));
  scale: calc(1 + var(--l, 0) * 0.05);
}
html.stage .t-rise .card {
  translate: 0 calc(var(--in) * 22vh - var(--out) * 30vh);
  filter: blur(calc(var(--out) * 6px));
}
html.stage .t-drift .card {
  translate: calc(var(--out) * -42vw) calc(var(--in) * 8vh);
  rotate: calc(var(--out) * -4deg);
  scale: calc(1 - var(--in) * 0.1);
  filter: blur(calc(var(--in) * 8px));
}
html.stage .t-depth .card {
  scale: calc(1 + var(--out) * 0.4 - var(--in) * 0.22);
  filter: blur(calc(var(--a, 0) * 10px));
}
html.stage .t-wipe .card {
  -webkit-mask-image: linear-gradient(100deg, #000 38%, transparent 62%);
  mask-image: linear-gradient(100deg, #000 38%, transparent 62%);
  -webkit-mask-size: 320% 100%; mask-size: 320% 100%;
  -webkit-mask-position: calc(var(--a, 0) * 130%) 0; mask-position: calc(var(--a, 0) * 130%) 0;
  -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat;
  translate: calc(var(--l, 0) * -3vw) 0;
}
/* 卡片內的段落依序出現 */
html.stage .card > * { translate: 0 calc(var(--in) * 1.2rem); }
html.stage .card > .title { translate: 0 calc(var(--in) * 2rem); }
html.stage .card > .items, html.stage .card > .actions { translate: 0 calc(var(--in) * 3rem); }
html.stage .card > .count { translate: none; }

/* 熱點 */
html.stage .spots { position: absolute; inset: 0; z-index: 5; pointer-events: none; }
.spot {
  position: absolute; inset: 0 auto auto 0;
  width: 3rem; height: 3rem; margin: -1.5rem 0 0 -1.5rem;
  border-radius: 50%; pointer-events: auto;
  display: grid; place-items: center;
}
.spot::before {
  content: ""; width: 2.3rem; height: 2.3rem; border-radius: 50%;
  border: 1.5px solid var(--spot-ring);
  box-shadow: 0 0 0 3px var(--spot-halo);
  transition: scale 0.25s var(--ease), border-color 0.2s, box-shadow 0.2s;
}
.spot:hover::before, .spot.is-on::before, .spot:focus-visible::before {
  scale: 1.18; border-color: var(--learn); border-width: 2px;
  box-shadow: 0 0 0 4px var(--spot-halo-on), 0 0 22px oklch(0.8 0.12 60 / 0.55);
}
@media (prefers-reduced-motion: no-preference) {
  .spot::before { animation: breathe 3.4s ease-in-out infinite; }
  .spot.is-on::before, .spot:hover::before { animation: none; }
}
@keyframes breathe { 50% { scale: 1.12; border-color: var(--spot-ring-2); } }

.tip {
  position: fixed; inset: 0 auto auto 0; z-index: 30;
  width: min(21rem, calc(100vw - 1.5rem));
  padding: 1rem 1.15rem 1.05rem;
  background: var(--card-solid);
  border: 1px solid var(--line-strong); border-radius: 6px;
  box-shadow: 0 16px 36px -18px color-mix(in oklab, var(--shade) 45%, transparent);
  pointer-events: auto;
  animation: tip-in 0.22s var(--ease);
}
@keyframes tip-in { from { opacity: 0; translate: 0 6px; } }
.tip .label { font: 500 0.72rem/1.5 var(--mono); letter-spacing: 0.1em; color: var(--accent); margin-block-end: 0.15rem; }
.tip h3 { font-size: 1.02rem; line-height: 1.45; }
.tip p:not(.label) { color: var(--ink-2); font-size: 0.88rem; line-height: 1.7; margin-block-start: 0.3rem; }
.tip .list { margin-block-start: 0.45rem; display: grid; gap: 0.25rem; font-size: 0.86rem; color: var(--ink-2); }
.tip .list li { position: relative; padding-inline-start: 0.95rem; line-height: 1.55; }
.tip .list li::before { content: ""; position: absolute; inset: 0.7em auto auto 0; width: 0.4rem; height: 1px; background: var(--accent); }
.tip .pair { display: grid; gap: 0.35rem; margin-block-start: 0.5rem; font-size: 0.86rem; }
.tip .pair div { display: grid; grid-template-columns: 2.5rem 1fr; gap: 0.5rem; }
.tip .pair dt { font: 500 0.72rem/1.9 var(--mono); color: var(--learn-ink); }
.tip .pair div + div dt { color: var(--teams-ink); }
.tip .pair dd { color: var(--ink-2); line-height: 1.55; }
.tip-more { display: inline-block; margin-block-start: 0.65rem; font-size: 0.86rem; font-weight: 500; color: var(--accent); }

/* 段落導覽 */
.rail, .pager { display: none; }
html.stage .rail {
  display: block; position: fixed; z-index: 20;
  inset-inline-end: clamp(0.75rem, 2vw, 1.75rem); inset-block-start: 50%; translate: 0 -50%;
}
.rail ol { display: grid; gap: 0.15rem; justify-items: end; }
.rail button { display: flex; align-items: center; gap: 0.6rem; flex-direction: row-reverse; padding: 0.28rem 0; font-size: 0.78rem; color: var(--ink-2); }
.rail .dot { width: 0.42rem; height: 0.42rem; border-radius: 50%; background: color-mix(in oklab, var(--ink) 32%, transparent); transition: height 0.3s var(--ease), background 0.3s; }
.rail .lbl { opacity: 0; translate: 6px 0; transition: opacity 0.2s, translate 0.2s var(--ease); white-space: nowrap; padding: 0.05rem 0.5rem; border-radius: 4px; background: var(--card); }
.rail:hover .lbl, .rail button:focus-visible .lbl, .rail [aria-current] .lbl { opacity: 1; translate: 0 0; }
.rail [aria-current] { color: var(--ink); font-weight: 500; }
.rail [aria-current] .dot { height: 1.3rem; border-radius: 999px; background: var(--accent); }
html.stage .pager {
  display: flex; align-items: center; gap: 0.35rem; position: fixed; z-index: 20;
  inset-inline-end: clamp(0.75rem, 2vw, 1.75rem); inset-block-end: clamp(1rem, 3vh, 1.75rem);
  padding: 0.25rem; border: 1px solid var(--line); border-radius: 999px; background: var(--card);
}
.pager button { width: 2.25rem; height: 2.25rem; border-radius: 50%; display: grid; place-items: center; }
.pager button:hover { background: var(--ink); color: var(--paper); }
.pager svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pager .progress { font: 500 0.75rem/1 var(--mono); color: var(--ink-3); letter-spacing: 0.06em; padding-inline: 0.25rem; }
.pager .cur { color: var(--ink); }
html.stage .foot { display: none; }

/* 手機與直式畫面 */
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  :root { --bar-h: 3.6rem; }
  .menu { display: none; }
  .bar { gap: 0.75rem; }
  .bar-contact { display: none; }
  .bar-switch { margin-inline-start: auto; padding: 0.42rem 0.85rem; font-size: 0.86rem; }
  .bar-switch::before { display: none; }
  .bar-switch .sw-full { display: none; }
  .bar-switch .sw-short { display: inline; }
  .brand-sub { font-size: 0.76rem; padding-inline-start: 0.5rem; }
  html.stage .card {
    inset-inline: 0.75rem; inset-block-end: calc(env(safe-area-inset-bottom) + 4.25rem);
    width: auto; max-height: 50svh; overflow: auto; overscroll-behavior: contain;
    padding: 1.15rem 1.2rem 1.25rem;
  }
  html.stage .l-center .card { inset-block-start: calc(var(--bar-h) + 7svh); max-height: none; overflow: visible; }
  html.stage .l-center .title { font-size: clamp(2.2rem, 9.5vw, 3.2rem); }
  html.stage .w-camino.l-center .card { inset-block-start: calc(var(--bar-h) + 3svh); }
  .title { font-size: 1.5rem; }
  .text { font-size: 0.92rem; line-height: 1.75; }
  .items { gap: 0.35rem; margin-block-start: 0.8rem; }
  .chip { font-size: 0.8rem; padding: 0.3rem 0.7rem 0.3rem 0.5rem; }
  .actions { margin-block-start: 0.95rem; }
  .hint { margin-block-start: 1.4rem; }
  html.stage .rail { display: none; }
  html.stage .pager { inset-inline: 50% auto; translate: -50% 0; inset-block-end: calc(env(safe-area-inset-bottom) + 0.7rem); }
  html.stage .t-drift .card { translate: calc(var(--out) * -70vw) calc(var(--in) * 6vh); }
  .count { inset: 0.9rem 1.1rem auto auto; }
}
.menu-m { display: none; position: relative; }
@media (max-width: 760px), (max-aspect-ratio: 1/1) {
  .menu-m { display: block; }
  .menu-m summary {
    list-style: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 1px solid var(--line-strong);
    display: grid; place-content: center; gap: 0.3rem; cursor: pointer; background: var(--glass);
  }
  .menu-m summary::-webkit-details-marker { display: none; }
  .menu-m summary span { display: block; width: 1rem; height: 1.5px; background: currentColor; border-radius: 2px; transition: rotate 0.2s, translate 0.2s; }
  .menu-m[open] summary span:first-child { translate: 0 0.2rem; rotate: 45deg; }
  .menu-m[open] summary span:last-child { translate: 0 -0.2rem; rotate: -45deg; }
  .menu-m nav {
    position: absolute; inset: calc(100% + 0.5rem) 0 auto auto; display: grid; min-width: 10rem;
    padding: 0.4rem; border: 1px solid var(--line-strong); border-radius: 6px; background: var(--paper);
    box-shadow: 0 16px 36px -18px color-mix(in oklab, var(--shade) 45%, transparent);
  }
  .menu-m nav a, .menu-m nav button { padding: 0.6rem 0.8rem; border-radius: 4px; text-align: start; }
  .menu-m nav button { border-block-start: 1px solid var(--line); border-radius: 0; margin-block-start: 0.3rem; padding-block-start: 0.8rem; }
  .menu-m nav [data-switch] { font-weight: 500; color: var(--accent); }
  .menu-m nav a[aria-current] { color: var(--accent); background: var(--paper-2); }
}

/* ════════════════ Modal ════════════════ */
.modal {
  width: min(46rem, 100vw - 1.5rem); max-height: min(88svh, 60rem);
  padding: 0; border: 1px solid var(--line-strong); border-radius: 8px;
  background: var(--paper); color: var(--ink);
  box-shadow: 0 30px 80px -30px color-mix(in oklab, var(--shade) 50%, transparent);
}
.modal::backdrop { background: color-mix(in oklab, var(--ink) 38%, transparent); backdrop-filter: blur(3px); }
.modal[open] { animation: modal-in 0.35s var(--ease); }
@keyframes modal-in { from { opacity: 0; translate: 0 14px; } }
.modal-in { padding: clamp(1.25rem, 3vw, 2.25rem); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; padding-block-end: 1rem; margin-block-end: 1.25rem; border-block-end: 1px solid var(--line); }
.modal-meta { font: 500 0.74rem/1.5 var(--mono); letter-spacing: 0.12em; color: var(--accent); }
.modal-head h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); line-height: 1.3; margin-block-start: 0.2rem; }
.modal-x { width: 2.5rem; height: 2.5rem; flex: none; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line); }
.modal-x:hover { background: var(--ink); color: var(--paper); }
.modal-x svg { width: 1.1rem; height: 1.1rem; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.modal-body { display: grid; gap: 1rem; }
.modal-body > h3 { font-size: 1.15rem; margin-block-start: 0.5rem; }
.modal-body p { color: var(--ink-2); line-height: 1.85; }
.modal-body .note { font-size: 0.9rem; padding: 0.8rem 1rem; background: var(--paper-2); border-radius: 4px; }
.modal-actions { display: flex; gap: 0.6rem; }
.mono { font: 500 0.76rem/1.5 var(--mono); letter-spacing: 0.1em; color: var(--accent); }

.task-steps { display: grid; gap: 0.9rem; counter-reset: s; }
.task-steps li { padding: 1rem 1.15rem; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
.task-steps h3 { font-size: 1.15rem; margin-block: 0.2rem 0.35rem; }
.task-steps .fill { margin-block-start: 0.7rem; padding-block-end: 1.6rem; border-block-end: 1px dashed var(--line-strong); font-family: var(--serif); color: var(--ink-3); }
.flow { display: grid; gap: 0.6rem; }
.flow li { display: grid; grid-template-columns: 5.5rem 1fr; column-gap: 1rem; padding: 0.8rem 0; border-block-end: 1px solid var(--line); }
.flow .who { grid-row: span 2; font: 500 0.74rem/1.9 var(--mono); color: var(--accent); }
.flow h3 { font-size: 1.02rem; }
.flow p { font-size: 0.9rem; }
.spec { display: grid; border-block-start: 1px solid var(--line); }
.spec div { display: grid; grid-template-columns: 8rem 1fr; gap: 1rem; padding: 0.75rem 0; border-block-end: 1px solid var(--line); }
.spec dt { font: 500 0.76rem/1.9 var(--mono); color: var(--ink-3); letter-spacing: 0.06em; }
.spec dd { line-height: 1.75; }
.others { display: grid; gap: 0.4rem; }
.others a { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0.9rem; border: 1px solid var(--line); border-radius: 6px; }
.others a:hover { border-color: var(--accent); }
.others span { font-size: 0.82rem; color: var(--ink-3); }
.change { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.change th, .change td { padding: 0.7rem 0.6rem; border-block-end: 1px solid var(--line); text-align: start; vertical-align: top; line-height: 1.65; }
.change thead th { font: 500 0.76rem/1.5 var(--mono); color: var(--accent); }
.change tbody th { font-weight: 500; width: 9rem; color: var(--ink); }
.change td { color: var(--ink-2); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 0.6rem; }
.stats div { padding: 0.9rem 1rem; border: 1px solid var(--line); border-radius: 6px; }
.stats dt { font: 700 1.7rem/1.1 var(--serif); color: var(--accent); }
.stats dd { font-size: 0.84rem; color: var(--ink-2); margin-block-start: 0.3rem; }

/* 聯絡表單 */
.contact-form { display: grid; gap: 1rem; }
.contact-form fieldset { border: 0; padding: 0; margin: 0; }
.contact-form legend, .lbl { display: block; font-size: 0.84rem; color: var(--ink-2); margin-block-end: 0.35rem; }
.seg { display: inline-flex; padding: 0.2rem; border: 1px solid var(--line-strong); border-radius: 999px; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.seg span { display: block; padding: 0.4rem 1rem; border-radius: 999px; font-size: 0.9rem; }
.seg input:checked + span { background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.contact-form input[type="text"], .contact-form textarea {
  width: 100%; padding: 0.65rem 0.8rem; border: 1px solid var(--line-strong); border-radius: 4px; background: var(--field);
}
.contact-form input:focus, .contact-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.contact-form .btn { justify-self: start; }
.form-note { font-size: 0.88rem; color: var(--ink-2); }
@media (max-width: 560px) { .form-row { grid-template-columns: 1fr; } .spec div { grid-template-columns: 1fr; gap: 0.1rem; } .flow li { grid-template-columns: 1fr; } .flow .who { grid-row: auto; } }

/* ════════════════ 一般網頁模式（沒有 3D） ════════════════ */
html:not(.stage) body {
  background:
    radial-gradient(60% 40% at 72% 0%, var(--flat-glow), transparent 70%),
    linear-gradient(var(--flat-top), var(--paper) 40rem);
}
html:not(.stage) .bar { position: absolute; }
html:not(.stage) .journey { padding-block: calc(var(--bar-h) + 3rem) 4rem; display: grid; gap: clamp(3rem, 8vw, 6rem); width: min(52rem, 100% - 2 * var(--gutter)); margin-inline: auto; }
html:not(.stage) .chapter:first-child .title { font-size: clamp(2.4rem, 1.2rem + 4vw, 4.4rem); }
html:not(.stage) .card { position: relative; }
html:not(.stage) .count { position: static; margin-block-end: 0.75rem; }
html:not(.stage) .items { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.75rem; }
html:not(.stage) .item { padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: 6px; background: var(--field); }
html:not(.stage) .chip { display: none; }
html:not(.stage) .item-body h3::before { content: none; }
html:not(.stage) .hint { display: none; }
html:not(.stage) .detail-src { margin-block-start: 1.5rem; padding: 1.25rem 1.4rem; border: 1px solid var(--line); border-radius: 6px; display: grid; gap: 0.9rem; }
html:not(.stage) .detail-h { font-size: 1.2rem; }
html:not(.stage) .detail-body { display: grid; gap: 0.9rem; }
html:not(.stage) .detail-body p { color: var(--ink-2); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; padding: 2rem var(--gutter) 3rem; border-block-start: 1px solid var(--line); font-size: 0.86rem; color: var(--ink-2); }
.foot .brand { font-size: 1rem; margin-inline-end: 0.75rem; vertical-align: middle; }
.foot .brand-mark { width: 1.5rem; height: 1.5rem; }

/* ════════════════ 游標 ════════════════ */
@media (pointer: fine) {
  body[data-theme="fog"] { cursor: url("assets/cursor-sun.svg") 12 12, auto; }
  body[data-theme="fog"] :is(a, button, .spot, label) { cursor: url("assets/cursor-sun-hover.svg") 16 18, pointer; }
  body[data-theme="camino"] { cursor: url("assets/cursor-stone.svg") 12 12, auto; }
  body[data-theme="camino"] :is(a, button, .spot, label) { cursor: url("assets/cursor-stone-hover.svg") 16 6, pointer; }
  input, textarea { cursor: text !important; }
}

/* ════════════════ 減少動態 ════════════════ */
html.still .card { filter: none !important; translate: none !important; rotate: none !important; scale: none !important; -webkit-mask-image: none !important; mask-image: none !important; }
html.still .card > * { translate: none !important; }
html.still.stage .card { opacity: clamp(0, calc(1 - var(--a, 0) * 4), 1); }

/* ════════════════ 列印（任務卡） ════════════════ */
@media print {
  html, body { height: auto !important; overflow: visible !important; position: static !important; background: #fff !important; }
  body > :not(.modal) { display: none !important; }
  .modal { position: static; display: block; width: auto; max-height: none; border: 0; box-shadow: none; }
  .modal::backdrop { display: none; }
  .modal-x, .modal-actions { display: none !important; }
}
