:root {
  --bg: #040b15;
  --bg-2: #081627;
  --navy: #124572;
  --ink: #eaf3fb;
  --muted: #9db2c6;
  --teal: #38dfcb;
  --gold: #e3b273;
  --red: #ff7a6b;
  --line: rgba(157, 200, 235, .2);
  --line-strong: rgba(157, 200, 235, .42);
  --sans: "Noto Sans TC", "PingFang TC", "Microsoft JhengHei", sans-serif;
  --tech: "Space Grotesk", "Noto Sans TC", sans-serif;
  --snap: cubic-bezier(.2, 0, 0, 1);
  --hud-h: 64px;
  --gutter: max(20px, calc((100vw - 1200px) / 2)); /* 全頁內容欄置中，最寬 1200px */
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; background: var(--bg); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 16px/1.8 var(--sans);
  overflow-x: clip;
}
[hidden] { display: none !important; }
h1, h2, h3, p, ul { margin: 0; padding: 0; }
ul { list-style: none; }
a { color: inherit; }
img { display: block; max-width: 100%; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
:focus-visible { outline: 2px solid var(--teal); outline-offset: 3px; }

/* ---------- 背景 ---------- */
#fx { position: fixed; inset: 0; width: 100%; height: 100vh; height: 100lvh; z-index: 1; pointer-events: none; }
.grid-bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(60% 60% at 66% 46%, rgba(18, 69, 114, .55), transparent 72%),
    linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 100% 72px,
    linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 72px 100%,
    var(--bg);
  background-blend-mode: normal;
  opacity: .5;
}
main, .footer { position: relative; z-index: 2; }

/* ---------- 開機畫面 ---------- */
.boot {
  position: fixed; inset: 0; z-index: 50; display: none;
  place-content: center; justify-items: center; gap: 6px;
  background: var(--bg); font-family: var(--tech);
  transition: opacity .35s ease-in, visibility .35s;
}
.motion .boot { display: grid; }
.boot.off { opacity: 0; visibility: hidden; }
.boot-label { font-size: 13px; letter-spacing: .42em; color: var(--muted); padding-left: .42em; }
.boot-num { font-size: clamp(72px, 16vw, 132px); font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums; }
.boot-num small { font-size: .32em; color: var(--teal); margin-left: 4px; }
.boot-ver { font-size: 13px; letter-spacing: .2em; color: var(--muted); }
.boot-ver b { color: var(--teal); }
.boot-bar { display: block; width: min(280px, 70vw); height: 2px; margin-top: 14px; background: var(--line); }
.boot-bar i { display: block; height: 100%; background: var(--teal); transform-origin: left; transform: scaleX(0); }

/* ---------- 頂部 ---------- */
.hud {
  position: fixed; inset: 0 0 auto; z-index: 20; height: var(--hud-h);
  display: flex; align-items: center; gap: 20px;
  padding: env(safe-area-inset-top) var(--gutter) 0;
  background: linear-gradient(rgba(4, 11, 21, .85), transparent);
}
.hud-logo { flex: none; display: flex; align-items: center; min-height: 44px; min-width: 44px; }
.hud-logo img { height: 44px; width: auto; }
.hud-progress { flex: 1; display: flex; align-items: center; justify-content: flex-end; gap: 10px; font: 500 11px/1 var(--tech); letter-spacing: .2em; color: var(--muted); font-variant-numeric: tabular-nums; }
.hud-progress > i { display: block; width: min(180px, 24vw); height: 2px; background: var(--line); }
.hud-progress > i > i { display: block; height: 100%; background: var(--teal); transform-origin: left; transform: scaleX(0); }

/* ---------- 按鈕 ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center;
  min-height: 46px; padding: 10px 26px; overflow: hidden;
  border: 1px solid var(--teal); border-radius: 2px;
  background: transparent; color: var(--ink);
  font: 700 16px/1.2 var(--sans); letter-spacing: .12em; text-decoration: none; cursor: pointer;
  transition: color .15s, border-color .15s;
  isolation: isolate;
}
.btn::before { content: ""; position: absolute; inset: 0; z-index: -1; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--snap); }
.btn:active { opacity: .85; }
.btn:disabled { opacity: .55; cursor: wait; }
@media (hover: hover) and (pointer: fine) {
  .btn:hover { color: #03201c; }
  .btn:hover::before { transform: scaleX(1); }
}
.btn-sm { min-height: 40px; padding: 6px 18px; font-size: 14px; flex: none; }
.btn-block { width: 100%; min-height: 54px; font-size: 17px; letter-spacing: .2em; }

/* ---------- 共用文字 ---------- */
.kicker { font: 500 13px/1.5 var(--tech); letter-spacing: .24em; color: var(--muted); }
.kicker-teal { color: var(--teal); }
.mega { font: 900 clamp(38px, 6vw, 84px)/1.16 var(--sans); letter-spacing: .02em; }
.mega-ask { font-size: clamp(34px, 5.2vw, 76px); }
.title-sub { margin-top: 14px; font: 700 clamp(20px, 2.5vw, 34px)/1.4 var(--sans); color: var(--gold); letter-spacing: .08em; }
.lede { margin-top: 14px; font-size: clamp(16px, 1.45vw, 20px); line-height: 1.75; color: var(--ink); }
.h2 { margin-top: 12px; font: 900 clamp(30px, 4.2vw, 60px)/1.25 var(--sans); }
.h2-xl { font-size: clamp(40px, 6vw, 88px); line-height: 1.14; }
.wrap { width: min(1200px, 100% - 40px); margin-inline: auto; }

/* 捲動浮現 */
.motion .rv { opacity: 0; transform: translateY(18px); transition: opacity .6s ease-out, transform .6s var(--snap); }
.motion .rv.in { opacity: 1; transform: none; }

/* ---------- 釘選段落 ---------- */
.track { position: relative; }
.anchor { display: none; }
.motion .track { height: calc(var(--steps) * var(--sh, 58vh) + 100vh); }
.motion .stage {
  position: sticky; top: 0; height: 100vh; height: 100svh; overflow: hidden;
  display: flex; align-items: center;
  padding: var(--hud-h) var(--gutter) 0;
}
.motion .step {
  position: absolute; left: 0; right: 0; top: 50%;
  opacity: 0; visibility: hidden;
  transform: translateY(calc(-50% + 14px));
  transition: opacity .2s ease-in, transform .2s ease-in, visibility .2s;
}
.motion .step.on { opacity: 1; visibility: visible; transform: translateY(-50%); transition: opacity .34s ease-out .08s, transform .34s var(--snap) .08s, visibility 0s; }
.motion .cover-copy, .motion .up-copy, .motion .asset-copy, .motion .flow-copy { position: relative; width: min(46%, 640px); height: 100%; }

/* 無動態或不支援 WebGL：全部攤開 */
html:not(.motion) .stage { padding: 96px 20px 20px; width: min(1280px, 100%); margin-inline: auto; }
html:not(.motion) .step { margin-bottom: 72px; }
html:not(.motion) .scroll-hint, html:not(.motion) .rail { display: none; }

.scroll-hint {
  position: absolute; right: var(--gutter); bottom: 26px;
  display: grid; justify-items: center; gap: 8px; min-width: 44px; min-height: 44px; text-decoration: none;
  font: 500 11px/1 var(--tech); letter-spacing: .3em; color: var(--muted);
  transition: opacity .2s;
}
.scroll-hint i { width: 1px; height: 44px; background: linear-gradient(var(--teal), transparent); transform-origin: top; animation: cue 2s var(--snap) infinite; }
@keyframes cue { 0% { transform: scaleY(0); } 55% { transform: scaleY(1); opacity: 1; } 100% { transform: scaleY(1); opacity: 0; } }
.scrolled .scroll-hint { opacity: 0; pointer-events: none; }

/* ---------- 深層思維 ---------- */
.motion .deep-copy { position: relative; width: 100%; height: 100%; }
/* 水面：畫在粒子後面，高度跟著冰山的水線走 */
.water { position: fixed; left: 0; right: 0; top: 0; height: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .5s ease-out; will-change: transform; }
.water.on { opacity: 1; }
.water i { position: absolute; left: 0; right: 0; display: block; }
.water .sky { bottom: 0; height: 120vh; background: linear-gradient(transparent 20%, rgba(120, 190, 235, .2)); }
.water .sea { top: 0; height: 220vh; background: linear-gradient(rgba(16, 112, 150, .62), rgba(6, 50, 92, .62) 28%, rgba(2, 14, 34, .9) 62%, #010713); }
.water .line { top: -1px; height: 2px; background: linear-gradient(90deg, transparent, var(--teal) 16%, #d8fff8 50%, var(--teal) 84%, transparent); box-shadow: 0 0 22px rgba(56, 223, 203, .75); }
.water span { position: absolute; left: var(--gutter); font-size: 14px; letter-spacing: .3em; font-weight: 500; }
.water .w-up { bottom: 10px; color: var(--ink); }
.water .w-down { top: 12px; color: var(--teal); }

.motion .deep .step { text-align: center; }
.motion .deep .step-top { top: auto; bottom: 22%; transform: translateY(14px); }
.motion .deep .step-top.on { transform: none; }
.motion .deep .step-top .mega { font-size: clamp(38px, 5vw, 72px); }
.motion .deep .step-list { top: 42%; transform: translateY(14px); text-align: left; }
.motion .deep .step-list.on { transform: none; }
.motion .deep .step-node { top: auto; bottom: 96px; left: 50%; right: auto; width: min(1000px, 100%); margin-left: calc(min(1000px, 100%) / -2); transform: translateY(14px); }
.motion .deep .step-node.on { transform: none; }
.step-node .num { display: inline-block; font-size: clamp(36px, 3.6vw, 52px); }
.step-node h3 { margin-top: 0; font-size: clamp(36px, min(5vw, 10vh), 76px); text-shadow: 0 0 20px rgba(1, 7, 19, .95); }
.step-node h3.h3-long { font-size: clamp(26px, min(3.8vw, 8vh), 60px); white-space: nowrap; }
.motion .deep .step-base { top: 74%; isolation: isolate; }
.motion .deep .step-base.on { transition-delay: .3s; }
.motion .deep .step-base::before { content: ""; position: absolute; z-index: -1; left: 50%; top: 50%; width: min(1100px, 92vw); height: 190%; transform: translate(-50%, -50%); background: radial-gradient(closest-side, rgba(1, 7, 19, .5), rgba(1, 7, 19, .28) 55%, rgba(1, 7, 19, 0)); pointer-events: none; }
.step-base .kicker em { font-style: normal; color: var(--teal); }
.step-base .kicker { color: #fff; font-size: clamp(20px, min(2vw, 4.4vh), 30px); letter-spacing: .14em; font-family: var(--sans); font-weight: 700; text-shadow: 0 0 14px #010713, 0 0 4px #010713; }
.mega-base { margin-top: 8px; font-size: clamp(40px, min(6.4vw, 11.5vh), 96px); --form-shadow: 0 0 36px rgba(1, 7, 19, .95), 0 0 10px rgba(1, 7, 19, .95); color: var(--gold); text-shadow: var(--form-shadow); }
.list-head { display: flex; justify-content: space-between; gap: 20px; align-items: baseline; margin-bottom: 8px; }
.deep-tip { color: var(--muted); font-size: 14px; }
/* 十二個節點分列冰山左右，中間留給冰山 */
.depths { display: grid; grid-auto-flow: column; grid-template-rows: repeat(6, auto); grid-template-columns: 290px 290px; justify-content: space-between; }
.depths li { border-top: 1px solid var(--line-strong); }
.depths li:nth-child(n+7) button { flex-direction: row-reverse; text-align: right; }
.depths button {
  display: flex; align-items: baseline; gap: 10px; width: 100%; min-height: 50px; padding: 10px 2px; text-align: left; cursor: pointer;
  border: 0; background: none; color: var(--ink); font: 700 clamp(15px, 1.3vw, 18px)/1.4 var(--sans); transition: color .15s, transform .15s;
}
.depths small { font: 500 12px/1 var(--tech); color: var(--teal); letter-spacing: .08em; }
@media (hover: hover) and (pointer: fine) { .depths button:hover { color: var(--gold); } }
.motion .depths li { opacity: 0; transform: translateY(10px); }
.motion .step.on .depths li { opacity: 1; transform: none; transition: opacity .34s ease-out, transform .34s var(--snap); transition-delay: calc(var(--i) * 40ms + 100ms); }

/* 冰山上跟著節點走的編號 */
.node-tags { position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .25s; }
.deep[data-s="1"] .node-tags { opacity: 1; }
.ntag {
  position: absolute; left: 0; top: 0; width: 34px; height: 34px; margin: -17px 0 0 -17px; padding: 0; border-radius: 50%; cursor: pointer;
  border: 1px solid var(--gold); background: rgba(4, 11, 21, .72); color: var(--ink); font: 500 12px/1 var(--tech); will-change: transform; transition: background .15s, color .15s;
}
.deep[data-s="1"] .ntag { pointer-events: auto; }
.ntag.hot { background: var(--gold); color: #1c1205; }
.num small { margin-left: 10px; font-size: 18px; color: var(--muted); -webkit-text-stroke: 0; letter-spacing: .08em; }
.motion .rail-deep { opacity: 0; pointer-events: none; transition: opacity .25s; }
.motion .deep[data-s]:not([data-s="0"]):not([data-s="14"]) .rail-deep { opacity: 1; pointer-events: auto; }

/* ---------- 八大項目 ---------- */
.rail {
  position: absolute; z-index: 3; left: var(--gutter); right: var(--gutter); bottom: 30px;
  display: flex; gap: 4px;
}
.rail button {
  flex: 1; min-height: 46px; padding: 6px 2px 4px; position: relative;
  border: 0; border-top: 2px solid var(--line-strong); background: none; color: var(--muted);
  font: 500 14px/1.3 var(--sans); cursor: pointer; transition: color .15s;
}
.rail button::before { content: ""; position: absolute; left: 0; right: 0; top: -2px; height: 2px; background: var(--teal); transform: scaleX(0); transform-origin: left; transition: transform .28s var(--snap); }
.rail button.on { color: var(--ink); font-weight: 700; }
.rail button.on::before, .rail button.done::before { transform: scaleX(1); }
@media (hover: hover) and (pointer: fine) { .rail button:hover { color: var(--ink); } }

.num { font: 700 clamp(56px, 8vw, 116px)/1 var(--tech); color: transparent; -webkit-text-stroke: 1px var(--teal); letter-spacing: .02em; }
.step h3 { margin-top: 6px; font: 900 clamp(38px, 5.4vw, 78px)/1.16 var(--sans); }
.quote { margin-top: 14px; font-size: clamp(17px, 1.6vw, 22px); line-height: 1.7; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tags li { padding: 5px 12px; border: 1px solid var(--line-strong); background: rgba(4, 11, 21, .6); font-size: 14px; line-height: 1.5; }

/* ---------- 一般段落 ---------- */
.sec { position: relative; display: flex; align-items: center; min-height: 100vh; min-height: 100svh; padding: 96px 0; }
.two { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; }
.two-flip .copy { grid-column: 2; }
.center { text-align: center; }

/* 系統狀態面板 */
.panel { margin-top: 26px; padding: 20px; border: 1px solid var(--line-strong); background: rgba(4, 11, 21, .78); }
.panel-title { display: flex; justify-content: space-between; gap: 12px; font: 500 12px/1.4 var(--tech); letter-spacing: .16em; color: var(--muted); padding-bottom: 12px; border-bottom: 1px solid var(--line); }
#panel-state { color: var(--teal); }
.bars { margin: 14px 0 18px; display: grid; gap: 10px; }
.bars li { display: grid; grid-template-columns: 62px 1fr 112px; align-items: center; gap: 10px; font-size: 15px; }
.bars li > i { display: block; height: 6px; background: var(--line); overflow: hidden; }
.bars li > i > i { display: block; height: 100%; background: var(--teal); transform-origin: left; transform: scaleX(0); transition: transform .9s var(--snap); }
.bars b { font-weight: 500; font-size: 13px; color: var(--muted); text-align: right; opacity: 0; transition: opacity .2s; }
.bars.run li > i > i { transform: scaleX(1); }
.bars.run b { opacity: 1; }
.bars.run li:nth-child(2) i i { transition-delay: .12s; } .bars.run li:nth-child(3) i i { transition-delay: .24s; }
.bars.run li:nth-child(4) i i { transition-delay: .36s; } .bars.run li:nth-child(5) i i { transition-delay: .48s; }
.bars li.stuck { color: var(--red); font-weight: 700; }
.bars li.stuck > i > i { background: var(--red); }
.bars.run li.stuck > i > i { transform: scaleX(.14); transition-delay: .6s; }
.bars li.stuck b { color: var(--red); }
.bars li.fixed { color: var(--teal); }
.bars li.fixed > i > i { background: var(--gold); }
.bars.run li.fixed > i > i { transform: scaleX(1); transition: transform .8s var(--snap); }
.bars li.fixed b { color: var(--gold); }

/* 三個原因 */
.why-title { font: 900 clamp(30px, 3.2vw, 46px)/1.25 var(--sans); }
.why-title small { margin-right: 12px; font: 500 clamp(18px, 1.6vw, 24px)/1 var(--tech); color: var(--teal); letter-spacing: .08em; }

/* 資產/負債 */
.verdict-word { font: 900 clamp(64px, 8vw, 112px)/1.1 var(--sans); color: var(--red); }
.verdict-word.good { color: var(--teal); }
.asset-head { font: 900 clamp(26px, 2.6vw, 38px)/1.3 var(--sans); }
.slogan { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 22px; margin-top: 10px; font: 700 clamp(16px, 1.5vw, 20px)/1.5 var(--sans); color: var(--gold); }

/* 興合力 */
.years { margin-top: 8px; font: 700 clamp(26px, 3vw, 40px)/1.1 var(--sans); }
.years b { font: 700 clamp(96px, 15vw, 210px)/1 var(--tech); color: var(--teal); margin: 0 .06em; font-variant-numeric: tabular-nums; }
.vow { margin-top: 44px; font: 900 clamp(36px, 6.2vw, 92px)/1.2 var(--sans); }

/* ---------- 登記 ---------- */
.sec-form { padding-top: 110px; }
.form-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 560px); gap: clamp(24px, 4vw, 64px); align-items: start; }
.intro { padding: 36px 36px 34px; border: 1px solid var(--line-strong); background: rgba(5, 14, 26, .94); color: var(--ink); text-align: center; }
.intro h2 { margin: 6px 0 16px; font: 900 clamp(28px, 3.1vw, 40px)/1.25 var(--sans); }
.intro-text { font-size: 17px; text-align: left; }
.intro-text p, .intro-text li { margin: 0; }
.intro-text h1, .intro-text h2, .intro-text h3 { color: var(--ink); line-height: 1.4; margin: .4em 0; }
.intro-text [style*="color"] { color: var(--teal) !important; background: none !important; }
.intro-text strong { color: var(--teal); }
.intro-text h1 { font-size: 1.8em; }
.intro-text h2 { font-size: 1.45em; }
.intro-text h3 { font-size: 1.2em; }
.intro-text ul, .intro-text ol { margin: .3em 0; padding-left: 1.6em; }
.intro-text li[data-list="bullet"] { list-style-type: disc; }
.intro-text li[data-list="ordered"] { list-style-type: decimal; }
.intro-text blockquote { margin: .5em 0; padding: .2em 1em; border-left: 4px solid var(--teal); color: var(--muted); }
.intro-text a { color: var(--teal); }
.intro-text .ql-align-center { text-align: center; }
.intro-text .ql-align-right { text-align: right; }
.intro-text .ql-align-justify { text-align: justify; }
.intro-text .ql-size-small { font-size: .8em; }
.intro-text .ql-size-large { font-size: 1.4em; }
.intro-text .ql-size-huge { font-size: 2em; }
.intro-text .ql-indent-1 { padding-left: 2em; }
.intro-text .ql-indent-2 { padding-left: 4em; }
.intro-text .ql-indent-3 { padding-left: 6em; }
.intro-text .ql-indent-4 { padding-left: 8em; }
.intro-text .ql-indent-5 { padding-left: 10em; }
.intro-text .ql-indent-6 { padding-left: 12em; }
.intro-text .ql-indent-7 { padding-left: 14em; }
.intro-text .ql-indent-8 { padding-left: 16em; }

.form-wrap { scroll-margin-top: 76px; }
.card { padding: 30px 24px; border: 1px solid var(--line-strong); background: rgba(5, 14, 26, .94); }
@media (min-width: 600px) { .card { padding: 36px 36px 30px; } }
.card h2 { margin-top: 6px; font: 900 clamp(28px, 3.1vw, 40px)/1.25 var(--sans); }
.form-desc { margin: 8px 0 24px; color: var(--muted); }
.q { border: 0; margin: 0 0 26px; padding: 0; min-width: 0; }
.q legend, .contact legend { padding: 0; margin-bottom: 10px; font-weight: 700; font-size: 17px; line-height: 1.5; }
.q legend .num { all: unset; color: var(--teal); margin-right: 6px; font: 700 17px var(--tech); }
.q .hint { margin: -6px 0 10px; font-size: 14px; color: var(--muted); }
.req { color: var(--red); font-weight: 700; }
.opts { display: grid; gap: 8px; }
.opt {
  position: relative; display: flex; align-items: center; gap: 12px; min-height: 52px; padding: 12px 16px; cursor: pointer;
  border: 1px solid var(--line-strong); transition: border-color .15s, background .15s;
}
.opt input { position: absolute; opacity: 0; pointer-events: none; }
.opt .mark { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border: 1.5px solid var(--muted); border-radius: 50%; transition: border-color .15s, background .15s; }
.opt input[type=checkbox] + .mark { border-radius: 3px; }
.opt input:checked + .mark { border-color: var(--teal); background: var(--teal); }
.opt input:checked + .mark::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--bg); }
.opt input[type=checkbox]:checked + .mark::after { width: 10px; height: 6px; border-radius: 0; background: none; border: solid var(--bg); border-width: 0 0 2px 2px; transform: rotate(-45deg) translate(1px, -1px); }
.opt:has(input:checked) { border-color: var(--teal); background: rgba(56, 223, 203, .12); }
.opt input:focus-visible + .mark { outline: 2px solid var(--teal); outline-offset: 3px; }
@media (hover: hover) and (pointer: fine) { .opt:hover { border-color: var(--teal); } }
.motion .q.enter { animation: q-in .3s var(--snap); }
@keyframes q-in { from { opacity: 0; transform: translateY(12px); } }

.contact { border: 0; padding: 22px 0 0; margin: 8px 0 0; border-top: 1px solid var(--line); min-width: 0; }
.field { display: block; margin-bottom: 16px; }
.field > span { display: block; font-weight: 500; margin-bottom: 6px; }
.field input, .q textarea {
  width: 100%; min-height: 50px; padding: 12px 14px; font: inherit; font-size: 16px; color: var(--ink);
  border: 1px solid var(--line-strong); border-radius: 0; background: rgba(4, 11, 21, .7);
  transition: border-color .15s;
}
.field input::placeholder { color: #7f94a8; }
.q textarea { min-height: 96px; resize: vertical; }
.field input:focus, .q textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 1px var(--teal); }
.field-note { display: block; margin-top: 6px; font-size: 13px; color: var(--gold); line-height: 1.5; }
.invalid { border-color: var(--red) !important; }
.q.invalid-q legend { color: var(--red); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-error { margin: 0 0 14px; padding: 10px 14px; border-left: 3px solid var(--red); background: rgba(255, 122, 107, .12); color: #ffb8ae; font-size: 15px; }
.privacy { margin-top: 12px; text-align: center; font-size: 13px; color: var(--muted); }
.loading { color: var(--muted); }
.done { text-align: center; border-color: var(--teal); }
.done p:last-child { margin-top: 8px; color: var(--ink); }

.footer { padding: 26px 16px calc(84px + env(safe-area-inset-bottom)); text-align: center; font-size: 14px; color: var(--muted); }

/* ---------- 手機底部按鈕 ---------- */
.dock {
  position: fixed; z-index: 19; left: 0; right: 0; bottom: 0; display: none; align-items: center; justify-content: center;
  min-height: 56px; padding-bottom: env(safe-area-inset-bottom);
  background: var(--teal); color: #03201c; font-weight: 700; letter-spacing: .14em; text-decoration: none;
  transition: transform .25s var(--snap);
}
.dock.off { transform: translateY(110%); }

/* ---------- 游標 ---------- */
.cursor { position: fixed; left: 0; top: 0; z-index: 40; width: 34px; height: 34px; margin: -17px 0 0 -17px; border: 1px solid var(--teal); border-radius: 50%; pointer-events: none; opacity: 0; transition: width .15s, height .15s, margin .15s, background .15s, opacity .15s; }
.cursor.on { opacity: 1; }
.cursor.hot { width: 58px; height: 58px; margin: -29px 0 0 -29px; background: rgba(56, 223, 203, .14); }

/* ---------- 不支援 WebGL 時的標誌 ---------- */
.no-webgl .cover-copy::before { content: ""; display: block; width: 160px; height: 208px; margin-bottom: 28px; background: url("/images/logo-mask.png") left top / contain no-repeat; }
.no-webgl .boot { display: none; }

/* ---------- 平板 / 手機 ---------- */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  :root { --hud-h: 56px; }
  .hud-logo img { height: 38px; }
  .hud-cta { display: none; }
  .dock { display: flex; }
  .motion .track { height: calc(var(--steps) * 52vh + 100vh); }
  .motion .stage { display: block; padding: 0 20px; }
  /* 上半部給粒子造型，文字放下半部，拇指不必伸太遠 */
  .motion .cover-copy, .motion .up-copy, .motion .deep-copy, .motion .asset-copy, .motion .flow-copy { position: absolute; left: 20px; right: 20px; top: 50%; bottom: 66px; width: auto; height: auto; }
  .motion .deep-copy { top: 36%; }
  .depths button { min-height: 44px; padding: 6px 2px; font-size: 14px; }
  .node-tags { display: none; }
  .motion .up-copy { bottom: 124px; top: 46%; }
  .motion .step { top: 0; transform: translateY(14px); }
  .motion .step.on { transform: none; }
  .rail { left: 12px; right: 12px; bottom: 66px; gap: 2px; }
  .rail button { font-size: 13px; }
  .scroll-hint { bottom: 66px; right: 12px; }
  .scroll-hint i { height: 30px; }
  .num { font-size: 40px; display: inline-block; }
  .step h3 { display: inline; margin: 0 0 0 10px; font-size: 34px; vertical-align: 4px; }
  .quote { margin-top: 6px; font-size: 16px; line-height: 1.6; }
  .tags { margin-top: 10px; gap: 6px; }
  .tags li { padding: 2px 8px; font-size: 13px; }
  .h2-xl { font-size: 38px; }
  .mega { font-size: clamp(36px, 11vw, 54px); }
  .mega-ask { font-size: clamp(32px, 9.4vw, 48px); }

  /* 一般段落：造型在上，內容接在下面 */
  .sec { align-items: flex-start; padding: 44vh 0 72px; }
  .two { grid-template-columns: 1fr; gap: 0; }
  .two-flip .copy { grid-column: 1; }
  .sec-vow { padding-top: 96px; align-items: center; }
  .sec-form { padding: 84px 0 40px; }
  .form-grid { grid-template-columns: 1fr; }
  .form-wrap { order: -1; }
  .h2 { font-size: clamp(27px, 7.6vw, 40px); }
  .bars li { grid-template-columns: 54px 1fr 104px; }
  .tabs button { min-height: 76px; padding: 8px; font-size: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* 保險：就算程式出錯，開機畫面也會自動消失 */
.motion .boot { animation: boot-failsafe .3s ease-in 5s forwards; }
@keyframes boot-failsafe { to { opacity: 0; visibility: hidden; } }

/* ---------- 桌機：全部置中，造型在上、文字在下 ---------- */
.motion main { -webkit-user-select: none; user-select: none; }
.motion .sec-form { -webkit-user-select: text; user-select: text; }
.rail button:focus-visible { outline: 1px solid var(--teal); outline-offset: -1px; }
.callouts { display: none; }
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  .motion .cover-copy, .motion .up-copy, .motion .asset-copy, .motion .flow-copy { width: 100%; }
  .motion .cover .step, .motion .up .step, .motion .asset .step, .motion .why .step { top: 62%; transform: translateY(14px); text-align: center; }
  .motion .cover .step.on, .motion .up .step.on, .motion .asset .step.on, .motion .why .step.on { transform: none; }
  .motion .why .step { top: 66%; }
  .motion .flow-head { position: absolute; left: 0; right: 0; top: 37%; text-align: center; font: 900 clamp(28px, 3vw, 44px)/1.3 var(--sans); }
  .motion .flow-head-one { top: 59%; }
  .motion .update .panel { position: absolute; left: 50%; top: 52%; width: min(720px, 100%); margin: 0 0 0 calc(min(720px, 100%) / -2); padding: 14px 20px; }
  .motion .update .bars { margin: 10px 0 0; gap: 6px; }
  .motion .asset .step { top: 63%; }
  .motion .asset-head { position: absolute; left: 0; right: 0; top: 56%; text-align: center; }
  .motion .up .step .num { display: inline-block; font-size: clamp(40px, 3.6vw, 54px); vertical-align: baseline; }
  .motion .up .step h3 { display: inline-block; margin: 0 0 0 16px; font-size: clamp(38px, 3.8vw, 56px); vertical-align: baseline; }
  .motion .up .quote { margin-top: 6px; font-size: clamp(16px, 1.3vw, 19px); line-height: 1.6; }
  .motion .up .tags { display: none; }
  .motion .mega { font-size: clamp(38px, 5vw, 76px); }
  .motion .h2-xl { font-size: clamp(38px, 5vw, 76px); }
  .scroll-hint { right: 50%; margin-right: -22px; }

  /* 造型上的標註 */
  .callouts { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s ease-out; }
  .callouts.on { opacity: 1; }
  .callout { position: absolute; left: 0; top: 0; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(227, 178, 115, .25); will-change: transform; }
  .callout span { font-style: normal; position: absolute; top: 50%; padding: 4px 11px; white-space: nowrap; transform: translateY(-50%); background: rgba(4, 11, 21, .88); border: 1px solid var(--gold); font-size: 15px; font-weight: 700; line-height: 1.4; }
  .callout::before { content: ""; position: absolute; top: 50%; height: 1px; width: 34px; background: var(--gold); }
  .callout.r span { left: 42px; } .callout.r::before { left: 8px; }
  .callout.l span { right: 42px; } .callout.l::before { right: 8px; }
}

/* ---------- 主視覺 ---------- */
.key-sub { margin-top: 10px; font-size: clamp(18px, 1.8vw, 26px); font-weight: 500; letter-spacing: .08em; }
.mega-key { color: var(--gold); letter-spacing: .06em; }
.key-tag { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--muted); letter-spacing: .12em; }
.key-tag img { height: 40px; width: auto; }
.key-tag span { color: var(--ink); font-weight: 700; font-size: 16px; }
.key-tag em { font-style: normal; padding-left: 14px; border-left: 1px solid var(--line-strong); }
.motion .step-key.on .key-sub { animation: key-in .6s var(--snap) .25s both; }
.motion .step-key.on .key-tag { animation: key-in .6s var(--snap) .45s both; }
@keyframes key-in { from { opacity: 0; transform: translateY(12px); } }

.flow-head { margin: 0 0 16px; font: 900 clamp(26px, 3vw, 44px)/1.3 var(--sans); }

/* 矮螢幕：說明文字不壓到八大導覽 */
@media (min-width: 861px) and (min-aspect-ratio: 1/1) and (max-height: 780px) {
  .motion .up .step { top: 60%; }
  .motion .up .step .num { font-size: 34px; }
  .motion .up .step h3 { font-size: 34px; }
  .motion .up .step .quote { margin-top: 4px; font-size: 15px; line-height: 1.55; }
}

/* ---------- 深藏的基石：節點拉線標出名稱 ---------- */
.base-labels { display: none; }
@media (min-width: 861px) and (min-aspect-ratio: 1/1) {
  .motion .base-labels { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; visibility: hidden; }
  .motion .base-labels.on { visibility: visible; }
  .base-labels svg { position: absolute; inset: 0; width: 100%; height: 100%; }
  .base-labels line { stroke: var(--gold); stroke-width: 1; opacity: .75; stroke-dasharray: 1; stroke-dashoffset: 1; }
  .base-labels circle { fill: var(--gold); opacity: 0; }
  .base-labels.on line { stroke-dashoffset: 0; transition: stroke-dashoffset .35s ease-out calc(var(--i) * 110ms + 250ms); }
  .base-labels.on circle { opacity: 1; transition: opacity .2s ease-out calc(var(--i) * 110ms + 250ms); }
  .base-label { position: absolute; top: 0; width: 230px; margin: -.75em 0 0; display: flex; align-items: baseline; gap: 8px; opacity: 0; color: #fff; font: 700 clamp(13px, min(1vw, 2.1vh), 16px)/1.5 var(--sans); text-shadow: 0 0 10px #010713, 0 0 3px #010713; will-change: transform; }
  .base-label.l { left: var(--gutter); justify-content: flex-end; text-align: right; }
  .base-label.r { right: var(--gutter); flex-direction: row-reverse; justify-content: flex-end; }
  .base-label small { font: 500 12px/1 var(--tech); color: var(--gold); letter-spacing: .08em; }
  .base-labels.on .base-label { opacity: 1; transition: opacity .3s ease-out calc(var(--i) * 110ms + 300ms); }
}

/* ---------- 手機：全部置中，造型在上、文字在下 ---------- */
.m-br { display: none; }
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .motion .step { text-align: center; }
  .m-br { display: inline; }
  .motion .cover-copy, .motion .asset-copy, .motion .flow-copy { top: 53%; }
  .motion .up-copy { top: 52%; }
  .tags { justify-content: center; }
  .quote, .lede { margin-inline: auto; }

  /* 長標題不留單字在第二行 */
  .mega-key { font-size: clamp(24px, 8.4vw, 54px); }
  .mega-ask { font-size: clamp(24px, 8vw, 48px); }
  .key-sub { font-size: clamp(14px, 4.2vw, 22px); letter-spacing: .04em; }
  .key-tag { gap: 10px; font-size: 12px; }
  .key-tag img { height: 34px; }
  .key-tag span { font-size: 14px; }
  .key-tag em { padding-left: 10px; }

  /* 世界已全面升級 */
  .motion .update .flow-copy { top: 33%; }
  .motion .update .flow-head { text-align: center; font-size: clamp(22px, 6.2vw, 34px); }
  .motion .update .panel { margin-top: 12px; }

  /* 為什麼要升級：標題固定在上，三個原因接在下面 */
  .motion .why .flow-head { text-align: center; font-size: clamp(22px, 6.2vw, 34px); margin: 0; }
  .motion .why .step { top: 56px; }
  .why-title { font-size: clamp(24px, 7vw, 36px); }

  /* 冰山 */
  .motion .rail-deep { display: none; }
  .motion .deep .step-top { bottom: 14%; }
  .motion .deep .step-list { top: 6vh; text-align: center; }
  .list-head { justify-content: center; margin-bottom: 6px; }
  .deep-tip { display: none; }
  .depths { grid-template-columns: 1fr 1fr; column-gap: 10px; }
  .depths button { font-size: clamp(11px, 3.1vw, 15px); gap: 6px; line-height: 1.3; }
  .motion .deep .step-node { bottom: 90px; left: 20px; right: 20px; width: auto; margin-left: 0; }
  .motion .deep .step-node .num { display: block; font-size: 34px; }
  .motion .deep .step-node h3 { display: block; margin: 4px 0 0; font-size: clamp(30px, 9vw, 44px); vertical-align: baseline; }
  .motion .deep .step-node h3.h3-long { font-size: clamp(20px, 7.2vw, 40px); }

  /* 深藏的基石：關鍵字排在冰山與大字之間 */
  .motion .base-labels { display: grid; position: absolute; z-index: 2; left: 20px; right: 20px; top: 40vh; grid-auto-flow: column; grid-template-rows: repeat(6, auto); grid-template-columns: 1fr 1fr; gap: 5px 10px; pointer-events: none; visibility: hidden; }
  .motion .base-labels.on { visibility: visible; }
  .base-labels svg { display: none; }
  .base-label { display: flex; align-items: baseline; gap: 6px; margin: 0; opacity: 0; color: #fff; font: 700 clamp(11px, 3.3vw, 15px)/1.4 var(--sans); text-shadow: 0 0 8px #010713, 0 0 3px #010713; transform: none !important; }
  .base-label small { font: 500 11px/1 var(--tech); color: var(--gold); }
  .base-labels.on .base-label { opacity: 1; transition: opacity .3s ease-out calc(var(--i) * 110ms + 300ms); }
  .motion .deep .step-base { top: 56%; }
  .motion .deep .step-base.on { transition-delay: .3s; }
  .step-base .kicker { font-size: clamp(15px, 4.4vw, 24px); }
  .mega-base { font-size: clamp(34px, 11vw, 64px); }

  /* 資產還是負債：問句固定在上，答案接在下面 */
  .motion .asset-head { position: absolute; left: 0; right: 0; top: 0; margin: 0; text-align: center; font-size: clamp(18px, 5.3vw, 30px); }
  .motion .asset .step { top: 48px; }
}
@media (max-width: 860px) and (max-height: 760px), (max-aspect-ratio: 1/1) and (max-height: 760px) {
  .motion .up .step h3 { font-size: 28px; }
  .motion .up .step .num { font-size: 32px; }
  .motion .up .quote { margin-top: 4px; font-size: 14.5px; line-height: 1.5; }
  .motion .update .bars li { padding-block: 0; }
  .motion .update .panel { padding: 10px 14px; }
}

/* ---------- 粒子聚成標題（全面升級的先進住宅、才是深藏的基石） ---------- */
.form-fx { display: none; }
.motion .form-fx { display: block; position: absolute; inset: 0; width: 100%; height: 100%; z-index: 3; pointer-events: none; }
.form-text { --form-shadow: 0 0 0 transparent; --form-glow: color-mix(in srgb, var(--gold) 55%, transparent); position: relative; transition: opacity .35s ease-out; }
.motion .step.forming .form-text { opacity: 0; }
/* 呼吸光：字落定後一直留著；金光：落定時由左往右掃過一次 */
.motion .step.on:not(.forming) .form-text { animation: form-breath 3.2s ease-in-out infinite; }
.motion .step.on.formed .form-text { animation: form-land .8s ease-out, form-breath 3.2s ease-in-out .8s infinite; }
.motion .step.formed .form-text::after {
  content: attr(data-text); position: absolute; inset: 0; color: transparent; text-shadow: none; pointer-events: none;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 255, 255, .98) 50%, transparent 58%) no-repeat;
  background-size: 260% 100%; background-position: 120% 0;
  -webkit-background-clip: text; background-clip: text;
  animation: form-sweep 1.1s ease-in-out .2s both;
}
@keyframes form-sweep { from { background-position: 120% 0; } to { background-position: -20% 0; } }
@keyframes form-breath { 50% { text-shadow: var(--form-shadow), 0 0 30px var(--form-glow); } }
@keyframes form-land { from { text-shadow: 0 0 34px var(--gold), 0 0 10px var(--gold); } }

/* 捲離的段落：文字淡出 */
.motion .stage { transition: opacity .25s ease-out; }
.motion .track.gone .stage { opacity: 0; transition: opacity .15s ease-in; }

/* 手機：每次滑動停在下一格 */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  html.snap { scroll-snap-type: y mandatory; scroll-padding-top: 0; }
  html.snap .track > .anchor { display: block; position: absolute; left: 0; width: 1px; height: 1px; scroll-snap-align: start; scroll-snap-stop: always; pointer-events: none; }
}

/* iPhone 開啟陀螺儀的按鈕 */
.tilt-btn { position: relative; display: inline-flex; align-items: center; gap: 12px; min-height: 60px; margin-top: 18px; padding: 8px 22px; border: 0; background: var(--gold); color: #1c1205; text-align: left; cursor: pointer; animation: tilt-pulse 1.8s ease-out infinite; }
.tilt-btn b { display: block; font: 900 18px/1.25 var(--sans); letter-spacing: .08em; }
.tilt-btn small { display: block; margin-top: 2px; font: 500 12px/1.3 var(--sans); }
.tilt-btn svg { flex: none; animation: tilt-wobble 1.8s ease-in-out infinite; }
.tilt-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
@keyframes tilt-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 70%, transparent); } 70%, 100% { box-shadow: 0 0 0 18px transparent; } }
@keyframes tilt-wobble { 0%, 100% { transform: rotate(-16deg); } 50% { transform: rotate(16deg); } }

/* 手機：小標直接標在圖上，取代文字下方的小方塊 */
@media (max-width: 860px), (max-aspect-ratio: 1/1) {
  .motion .callouts { display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none; opacity: 0; transition: opacity .3s ease-out; }
  .motion .callouts.on { opacity: 1; }
  .callout { position: absolute; left: 0; top: 0; width: 6px; height: 6px; margin: -3px 0 0 -3px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(227, 178, 115, .25); will-change: transform; }
  .callout::before { content: ""; position: absolute; top: 50%; height: 1px; width: 16px; background: var(--gold); }
  .callout.r::before { left: 6px; } .callout.l::before { right: 6px; }
  .callout span { position: absolute; top: 50%; display: block; width: max-content; max-width: 100px; padding: 2px 6px; transform: translateY(-50%); background: rgba(4, 11, 21, .9); border: 1px solid var(--gold); font-style: normal; font-size: 11.5px; font-weight: 700; line-height: 1.3; text-align: center; }
  .callout.r span { left: 22px; } .callout.l span { right: 22px; }
  .motion .up .tags { display: none; }
}
