/* =====================================================================
   Absolute Axis 介紹站
   深色預設＝夜晚；<html class="light">＝亮色＝早晨（hero.js／ui.js 切換，記在 localStorage axis-bg-mode）
   首屏場景參考 MotionSites「Solar Fog」：天空、建築去背、即時霧氣三層，切換時建築沉進霧裡再浮上來
   ===================================================================== */
html, body { background: #070B10; }
html.light, html.light body { background: #F5F3EF; }

:root {
    --bg: #070B10;
    --surface: #0E141B;
    --surface-2: #131A22;
    --fill: rgba(255, 255, 255, 0.06);
    --fill-2: rgba(255, 255, 255, 0.10);
    --text: #F2F4F7;
    --muted: rgba(242, 244, 247, 0.64);
    --faint: rgba(242, 244, 247, 0.36);
    --line: rgba(255, 255, 255, 0.08);
    --nav-bg: rgba(7, 11, 16, 0.72);
    --shadow: 0 4px 14px rgba(0, 0, 0, 0.28);
    --accent: #4C8DFF;
    --accent-ink: #7FAEFF;
    --accent-soft: rgba(76, 141, 255, 0.14);
    --on-accent: #FFFFFF;
    --ok: #3FCB7E;
    --warn: #F2B24C;
    --bad: #F2726A;

    --font-sans: "Geist", "Noto Sans TC", -apple-system, BlinkMacSystemFont, "PingFang TC", "Microsoft JhengHei", sans-serif;
    --font-mono: "Geist Mono", "SF Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    --radius: 20px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
    --k: 1; --k2: 1; --dip: 0;
    color-scheme: dark;
}

html.light {
    --bg: #F5F3EF;
    --surface: #FFFFFF;
    --surface-2: #FBFAF8;
    --fill: rgba(21, 25, 31, 0.05);
    --fill-2: rgba(21, 25, 31, 0.09);
    --text: #15191F;
    --muted: rgba(21, 25, 31, 0.64);
    --faint: rgba(21, 25, 31, 0.38);
    --line: rgba(21, 25, 31, 0.10);
    --nav-bg: rgba(245, 243, 239, 0.78);
    --shadow: 0 4px 14px rgba(40, 36, 30, 0.10);
    --accent: #2563D9;
    --accent-ink: #2563D9;
    --accent-soft: rgba(37, 99, 217, 0.10);
    --ok: #1E9E52;
    --warn: #A85B07;
    --bad: #CC3A30;
    --k: 0; --k2: 0;
    color-scheme: light;
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
img, svg { display: block; }
h1, h2, h3, h4, p { margin: 0; }
p { text-wrap: pretty; }
code, pre { font-family: var(--font-mono); }
::selection { background: var(--accent-soft); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 8px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 32px; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
svg.i-fill { fill: currentColor; stroke: none; }
.sm-only { display: none; }

/* 唯一的材質：實心表面＋細線 */
.surface { background: var(--surface); border: 1px solid var(--line); }

/* ---------- 按鈕 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.15s ease;
}
.btn:active { transform: scale(0.98); }
.btn svg { width: 18px; height: 18px; flex: none; transition: transform 0.2s var(--ease); }
.btn:hover svg.arrow { transform: translateX(2px); }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: color-mix(in srgb, var(--accent) 88%, #fff); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--fill-2); }
.btn-lg { height: 50px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }
.icon-btn {
    width: 40px; height: 40px;
    display: inline-grid; place-items: center;
    border: 0; border-radius: 50%;
    background: transparent; color: var(--muted);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}
.icon-btn:hover { background: var(--fill); color: var(--text); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 導覽列 ---------- */
.site-nav {
    position: fixed; top: 0; left: 0; right: 0; z-index: 50;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    border-bottom: 1px solid transparent;
}
.site-nav.scrolled, .page-sub .site-nav {
    background: var(--nav-bg);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    backdrop-filter: blur(16px) saturate(140%);
    border-bottom-color: var(--line);
}
.nav-bar { display: flex; align-items: center; gap: 16px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 500; letter-spacing: -0.01em; }
.brand-mark {
    display: block;
    width: 32px; height: 32px;
    border-radius: 8px;
    overflow: hidden;
    background: #F4F3EF;
    flex: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; padding: 2px; }
.brand-name { font-size: 16px; white-space: nowrap; line-height: 1.15; }
.brand-name small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); letter-spacing: 0.04em; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 20px; }
.nav-links a {
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--muted);
    transition: color 0.2s ease;
}
.nav-links a:hover, .nav-links a.active { color: var(--text); }
.nav-actions { display: flex; align-items: center; gap: 6px; margin-left: auto; }
.menu-btn { display: none; }

/* 首屏上方（還沒捲動）時，導覽列文字跟場景的早晚顏色走 */
.has-scene .site-nav:not(.scrolled) { color: var(--scene-ink); }
.has-scene .site-nav:not(.scrolled) .nav-links a,
.has-scene .site-nav:not(.scrolled) .icon-btn,
.has-scene .site-nav:not(.scrolled) .brand-name small { color: var(--scene-soft); }
.has-scene .site-nav:not(.scrolled) .nav-links a:hover { color: var(--scene-ink); }

/* ---------- 首屏場景 ---------- */
.scene {
    --u: min(calc(100vw / 1600), calc(100vh / 900));
    position: relative;
    height: 100svh;
    min-height: 560px;
    overflow: hidden;
    isolation: isolate;
    background: #070B10;
}
.has-scene {
    --scene-ink: color-mix(in srgb, #15202C calc((1 - var(--k, 1)) * 100%), #F4F7FA);
    --scene-soft: color-mix(in srgb, #2A3746 calc((1 - var(--k, 1)) * 100%), #C9D3DE);
}
.scene .layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.sky-m { background: linear-gradient(180deg, #C7DBF2 0%, #E4E2E6 58%, #F5E3D8 100%); }
.sky-n { background: linear-gradient(180deg, #040C12 0%, #0A1821 52%, #132430 100%); opacity: var(--k); }
.home { will-change: transform; transform: translate3d(0, var(--sink, 0px), 0); }
.home img {
    position: absolute; inset: 0;
    width: 100%; height: 100%;
    object-fit: cover; object-position: 50% 100%;
    /* 往下放，讓標題、說明和按鈕落在天空上，不壓在水塔和屋頂 */
    transform: translateY(calc(118 * var(--u)));
    visibility: hidden;
}
.home img.is-on { visibility: visible; }
.tilt {
    position: absolute; inset: 0; pointer-events: none;
    -webkit-backdrop-filter: blur(calc(8 * var(--u)));
    backdrop-filter: blur(calc(8 * var(--u)));
    -webkit-mask-image: linear-gradient(transparent 76%, #000 96%);
    mask-image: linear-gradient(transparent 76%, #000 96%);
}
#fog { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.scene-fade {
    position: absolute; left: 0; right: 0; bottom: 0; height: 22%;
    background: linear-gradient(transparent, var(--bg));
    pointer-events: none;
}
.scene-ui {
    position: absolute; inset: 0; z-index: 2;
    display: flex; flex-direction: column; align-items: center;
    padding: calc(68px + 64 * var(--u)) 24px 0;
    pointer-events: none;
    text-align: center;
}
.scene-ui a, .scene-ui button { pointer-events: auto; }
.scene h1 {
    font-size: calc(68 * var(--u));
    line-height: 1.12;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--scene-ink);
}
.scene h1 > span:not(.sr-only) { display: block; }
.scene h1 .l1 { opacity: calc(1 - var(--dip) * 0.8); }
.scene h1 i {
    font-style: normal;
    color: color-mix(in srgb, #6B7785 calc((1 - var(--k2)) * 100%), #F4F7FA);
}
.scene-lead {
    margin-top: calc(20 * var(--u));
    max-width: 34rem;
    font-size: calc(18 * var(--u));
    line-height: 1.55;
    color: var(--scene-soft);
    opacity: calc(1 - var(--dip) * 0.8);
}
.scene-cta { display: flex; gap: 12px; justify-content: center; margin-top: calc(28 * var(--u)); opacity: calc(1 - var(--dip) * 0.62); }
.scene-cta .btn-ghost {
    background: color-mix(in srgb, rgba(21, 32, 44, 0.08) calc((1 - var(--k)) * 100%), rgba(255, 255, 255, 0.12));
    color: var(--scene-ink);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}
.dock { margin-top: auto; padding-bottom: calc(44 * var(--u)); display: flex; flex-direction: column; align-items: center; }
.toggle {
    position: relative;
    display: grid; grid-template-columns: 1fr 1fr;
    width: calc(440 * var(--u)); height: calc(76 * var(--u));
    padding: calc(3 * var(--u));
    border-radius: calc(16 * var(--u));
    overflow: hidden;
    background: rgba(120, 132, 140, 0.30);
    border: 1px solid rgba(255, 255, 255, 0.18);
    -webkit-backdrop-filter: blur(calc(14 * var(--u)));
    backdrop-filter: blur(calc(14 * var(--u)));
}
.toggle button {
    position: relative;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: calc(2 * var(--u));
    border: 0; border-radius: calc(13 * var(--u));
    background: none; color: #fff; font: inherit; cursor: pointer;
    overflow: hidden;
}
.toggle button::before {
    content: ""; position: absolute; inset: 0; border-radius: inherit;
    background: linear-gradient(160deg, #F6F7F2, #E6ECF4 90%);
    box-shadow: inset 0 0 calc(16 * var(--u)) rgba(255, 255, 255, 0.6);
    opacity: var(--on);
}
/* 選中的那格在白底上用深字；沒選的跟著場景字色（早晨深、夜晚淺），亮色時也讀得到 */
.toggle b, .toggle small { position: relative; color: color-mix(in srgb, #15202C calc(var(--on) * 100%), var(--scene-ink)); }
.toggle b { font-size: calc(20 * var(--u)); font-weight: 500; }
.toggle small { font-size: calc(13 * var(--u)); opacity: 0.72; }
.toggle button:focus-visible { outline: 2px solid #fff; outline-offset: -4px; }
#tm { --on: calc(1 - var(--k)); }
#tn { --on: var(--k); }
.dock-note { margin-top: calc(14 * var(--u)); font-size: calc(13 * var(--u)); color: var(--scene-soft); }

/* ---------- 區塊共用 ---------- */
.section { padding: 112px 0 0; }
.section-head { max-width: 680px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
    display: inline-block;
    margin-bottom: 12px;
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
    letter-spacing: 0.12em;
}
.section-title {
    font-size: clamp(28px, 3.4vw, 40px);
    font-weight: 500;
    line-height: 1.22;
    letter-spacing: -0.015em;
}
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); }

/* ---------- 介面示意 ---------- */
.preview { padding-top: 24px; }
.preview .mock { max-width: 760px; margin: 0 auto; }
.mock { border-radius: 24px; padding: 16px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); }
.mock-top { display: flex; align-items: center; gap: 7px; padding: 2px 4px 14px; }
.mock-top i { width: 10px; height: 10px; border-radius: 50%; background: var(--fill-2); }
.mock-top span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.mock-body { display: grid; gap: 12px; }
.tile { border-radius: 16px; padding: 16px; background: var(--fill); }
.tile-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 500; color: var(--muted); margin-bottom: 12px; }
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ring { display: flex; align-items: center; gap: 12px; }
.ring svg { width: 44px; height: 44px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 4; stroke-linecap: round; }
.ring .track { stroke: var(--fill-2); }
.ring .val { stroke: var(--accent); }
.ring .val.quiet { stroke: var(--faint); }
.ring b { display: block; font-size: 17px; font-weight: 500; line-height: 1.1; font-variant-numeric: tabular-nums; }
.ring small { font-size: 12px; color: var(--muted); }
.mock-cols { display: grid; grid-template-columns: 1.15fr 1fr; gap: 12px; }
.dev-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; }
.dev-row + .dev-row { border-top: 1px solid var(--line); }
.dev-ico { width: 32px; height: 32px; border-radius: 8px; display: grid; place-items: center; background: var(--fill); color: var(--muted); flex: none; }
.dev-ico svg { width: 17px; height: 17px; }
.dev-main { min-width: 0; flex: 1; }
.dev-main b { display: block; font-size: 13px; font-weight: 500; }
.dev-main small { display: block; font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); flex: none; }
.dot.idle { background: var(--warn); }
.mini-switch { width: 36px; height: 22px; border-radius: 999px; background: var(--ok); position: relative; flex: none; }
.mini-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 18px; height: 18px; border-radius: 50%; background: #fff; }
.disk { padding: 8px 0; }
.disk + .disk { border-top: 1px solid var(--line); }
.disk-line { display: flex; flex-wrap: wrap; justify-content: space-between; column-gap: 12px; font-size: 13px; }
.disk-line b { font-weight: 500; }
.disk-line span { color: var(--muted); font-variant-numeric: tabular-nums; }
.bar { height: 4px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin-top: 8px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.bar i.quiet { background: var(--faint); }
.disk-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 12px; border-radius: 10px; border: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.disk-add svg { width: 15px; height: 15px; }
.mock-caption { margin-top: 12px; text-align: center; font-size: 12px; color: var(--faint); }

/* ---------- 功能 ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { border-radius: var(--radius); padding: 28px; background: var(--surface); border: 1px solid var(--line); }
.bento .card { grid-column: span 2; display: flex; flex-direction: column; }
.bento .card.wide { grid-column: span 3; }
.bento .card.lead { grid-column: span 4; }
.app-ico { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: var(--fill); color: var(--text); margin-bottom: 20px; flex: none; }
.app-ico svg { width: 20px; height: 20px; }
.card h3 { font-size: 19px; font-weight: 500; letter-spacing: -0.005em; }
.card p { margin-top: 8px; color: var(--muted); font-size: 15px; }
.card p + p { margin-top: 12px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 20px; }
.chip { display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 6px; background: var(--fill); font-family: var(--font-mono); font-size: 12px; color: var(--muted); }

/* ---------- 自己新增 ---------- */
.yours-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.yours-grid .section-head { margin-bottom: 0; position: sticky; top: 112px; }
.list { border-radius: var(--radius); overflow: hidden; background: var(--surface); border: 1px solid var(--line); }
.list-row { display: flex; gap: 16px; padding: 20px 24px; }
.list-row + .list-row { border-top: 1px solid var(--line); }
.list-row .app-ico { width: 36px; height: 36px; margin: 2px 0 0; }
.list-row .app-ico svg { width: 18px; height: 18px; }
.list-row h3 { font-size: 16px; font-weight: 500; }
.list-row p { margin-top: 4px; color: var(--muted); font-size: 14.5px; }
.path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.path span { padding: 2px 8px; border-radius: 6px; background: var(--fill); }
.path svg { width: 12px; height: 12px; color: var(--faint); }

/* ---------- 運作方式 ---------- */
.flow { display: grid; grid-template-columns: 1fr auto 1.1fr auto 1.25fr; align-items: center; gap: 16px; }
.flow-node { border-radius: var(--radius); padding: 24px; background: var(--surface); border: 1px solid var(--line); }
.flow-node h3 { font-size: 16px; font-weight: 500; margin-top: 14px; }
.flow-node p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.flow-node .app-ico { margin: 0; }
.flow-node.core { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); }
.flow-node .brand-mark { width: 40px; height: 40px; border-radius: 10px; }
.flow-arrow { display: grid; place-items: center; color: var(--faint); }
.flow-arrow svg { width: 28px; height: 28px; }
.res-list { display: grid; gap: 8px; margin-top: 14px; }
.res { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--fill); font-size: 14px; }
.res svg { width: 17px; height: 17px; color: var(--muted); flex: none; }
.res em { margin-left: auto; font-style: normal; font-family: var(--font-mono); font-size: 12px; color: var(--faint); }

/* ---------- 安裝 ---------- */
.install-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 48px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { display: flex; gap: 16px; counter-increment: step; }
.steps li::before {
    content: counter(step, decimal-leading-zero);
    flex: none;
    padding-top: 2px;
    font-family: var(--font-mono);
    font-size: 13px;
    color: var(--faint);
}
.steps b { display: block; font-size: 16px; font-weight: 500; }
.steps span { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.steps code, .note code, .env-table code, .card p code, .list-row p code { font-size: 0.9em; padding: 1px 6px; border-radius: 6px; background: var(--fill); }
.terminal {
    position: relative;
    border-radius: 16px;
    background: #0B0F14;
    border: 1px solid rgba(255, 255, 255, 0.08);
    overflow: hidden;
    color: #E6E8EE;
}
.term-top { display: flex; align-items: center; gap: 7px; padding: 12px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.term-top i { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, 0.14); }
.term-top span { margin-left: 8px; font-family: var(--font-mono); font-size: 12px; color: rgba(230, 232, 238, 0.5); }
.copy-btn {
    margin-left: auto;
    display: inline-flex; align-items: center; gap: 6px;
    height: 30px; padding: 0 12px;
    border: 0; border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #E6E8EE;
    font: inherit; font-size: 12.5px; font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.14); }
.copy-btn svg { width: 14px; height: 14px; }
.terminal pre {
    margin: 0;
    padding: 18px 20px 22px;
    font-size: 13.5px;
    line-height: 1.85;
    white-space: pre-wrap;
    word-break: break-all;
}
.terminal .c { color: #7D8590; }
.note { margin-top: 14px; font-size: 13.5px; color: var(--muted); }

/* ---------- 關於 / 聯絡 ---------- */
.about-grid { display: grid; grid-template-columns: 1.3fr 1fr; gap: 16px; }
.about-grid .card p { font-size: 16px; line-height: 1.8; }
.about-grid .section-title { font-size: clamp(22px, 2.4vw, 28px); }
.contact-list { display: grid; gap: 8px; margin-top: 20px; }
.contact {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    background: var(--fill);
    transition: background-color 0.2s ease;
}
a.contact:hover { background: var(--fill-2); }
.contact .app-ico { width: 32px; height: 32px; border-radius: 8px; margin: 0; background: transparent; color: var(--muted); }
.contact .app-ico svg { width: 18px; height: 18px; }
.contact small { display: block; font-size: 12px; color: var(--muted); }
.contact b { display: block; font-size: 14.5px; font-weight: 500; word-break: break-all; }

/* ---------- 行動呼籲 / 頁尾 ---------- */
.cta-band { margin-top: 112px; border-radius: 24px; padding: 64px 40px; text-align: center; background: var(--surface); border: 1px solid var(--line); }
.cta-band .section-lead { margin-left: auto; margin-right: auto; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.cta-band .cta-row { justify-content: center; }
.site-footer { padding: 40px 0; margin-top: 72px; border-top: 1px solid var(--line); }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 13.5px; color: var(--muted); }
.footer-inner .brand { font-weight: 400; }
.footer-inner .brand-mark { width: 24px; height: 24px; border-radius: 6px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-links a:hover { color: var(--text); }

/* ---------- 子頁（安裝） ---------- */
.page-hero { padding: 152px 0 0; }
.page-hero h1 { font-size: clamp(34px, 4.6vw, 54px); font-weight: 500; line-height: 1.15; letter-spacing: -0.02em; }
.page-hero p { margin-top: 16px; max-width: 620px; font-size: 17px; color: var(--muted); }
.two-col { display: grid; grid-template-columns: 1.15fr 1fr; gap: 16px; align-items: start; }
.stack { display: grid; gap: 16px; }
.card h2 { font-size: 21px; font-weight: 500; }
.req-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 12px; }
.req-list li { display: flex; gap: 10px; font-size: 15px; }
.req-list svg { width: 18px; height: 18px; flex: none; margin-top: 3px; color: var(--ok); }
.req-list span { color: var(--muted); }
.env-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.env-table th, .env-table td { text-align: left; padding: 12px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.env-table th { font-size: 12px; font-weight: 500; color: var(--muted); border-top: 0; }
.env-table td:first-child { white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 20px; margin-top: 4px; padding: 0 6px; border-radius: 4px; font-family: var(--font-mono); font-size: 11px; background: var(--fill); color: var(--muted); }
.tag.must { color: var(--bad); }
.tag.opt { color: var(--accent-ink); }
.link-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); transition: border-color 0.2s ease; }
.link-row:hover { border-color: var(--faint); }
.link-row .app-ico { margin: 0; }
.link-row b { display: block; font-size: 15px; font-weight: 500; }
.link-row small { display: block; font-size: 13.5px; color: var(--muted); }
.link-row > svg { width: 18px; height: 18px; margin-left: auto; color: var(--faint); flex: none; }

/* ---------- 通知 ---------- */
#toast-container { position: fixed; left: 50%; bottom: 24px; z-index: 100; transform: translateX(-50%); display: grid; gap: 8px; width: max-content; max-width: calc(100vw - 32px); }
.toast {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 18px 10px 10px;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 14.5px; font-weight: 500;
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.toast-visible { opacity: 1; transform: none; }
.toast-icon { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; font-weight: 600; flex: none; background: var(--accent); }
.toast-success .toast-icon { background: var(--ok); }
.toast-error .toast-icon { background: var(--bad); }
.toast-warning .toast-icon { background: var(--warn); }

/* ---------- 進場動畫（JS 加 html.js 才生效；沒有 JS 內容照常顯示） ---------- */
html.js .reveal { opacity: 0; transform: translateY(16px); transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }
html.js .reveal.in { opacity: 1; transform: none; }
/* backwards：只在開始前套用起始值，結束後交回原本的 opacity（場景切換時才淡得掉） */
html.js .scene-ui > * { animation: rise 0.9s var(--ease) backwards; }
html.js .scene-ui > :nth-child(2) { animation-delay: 0.12s; }
html.js .scene-ui > :nth-child(3) { animation-delay: 0.24s; }
html.js .scene-ui > :nth-child(4) { animation-delay: 0.36s; }
@keyframes rise { from { opacity: 0; transform: translateY(20px); } to { opacity: 1; transform: none; } }

/* ---------- 文字特效（static/js/text-fx.js） ---------- */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
/* 逐字從縫裡升上來 */
.fx-ch { display: inline-block; overflow: hidden; vertical-align: top; padding: 0.06em 0.01em 0.16em; margin: -0.06em -0.01em -0.16em; }
.fx-ch > span { display: inline-block; transform: translateY(115%); transition: transform 0.95s cubic-bezier(0.16, 1, 0.3, 1); transition-delay: calc(var(--d, 0ms) + var(--i) * var(--step, 32ms)); }
.fx-in .fx-ch > span { transform: none; }
.fx-snap .fx-ch > span { transition: none; }
html.js .scene-ui > h1.fx-split { animation: none; }
/* 首屏說明：從模糊對焦進來，按鈕和切換跟在標題後面 */
html.js .scene-ui > .scene-lead { animation: focus-in 1.1s var(--ease) 0.6s backwards; }
html.js .scene-ui > .scene-cta { animation-delay: 0.85s; }
html.js .scene-ui > .dock { animation-delay: 1.05s; }
@keyframes focus-in { from { opacity: 0; filter: blur(12px); transform: translateY(8px); letter-spacing: 0.06em; } to { opacity: 1; filter: blur(0); transform: none; } }
/* 示意畫面：圓環與容量條 */
.mock .ring circle.val { transition: stroke-dashoffset 1.6s var(--ease); }
.mock .bar i { transition: width 1.4s var(--ease); }
/* 終端機打字 */
.terminal pre.typing .tc { visibility: hidden; }
.terminal pre.typing .tc.on { visibility: visible; }
.tw-caret { display: inline-block; width: 0.55em; height: 1.15em; margin-right: -0.55em; vertical-align: -0.22em; background: var(--accent); opacity: 0.85; animation: blink 1s step-end infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { animation: none !important; transition: none !important; }
    html.js .reveal { opacity: 1; transform: none; }
}

/* ---------- 響應式 ---------- */
@media (max-width: 1020px) {
    .yours-grid, .install-grid, .two-col, .about-grid { grid-template-columns: 1fr; }
    .yours-grid .section-head { position: static; margin-bottom: 8px; }
    .bento .card, .bento .card.wide, .bento .card.lead { grid-column: span 3; }
    .flow { grid-template-columns: 1fr; }
    .flow-arrow { transform: rotate(90deg); height: 28px; }
}
@media (max-width: 820px) {
    .scene { --u: 1px; }
    .scene h1 { font-size: clamp(34px, 9.6vw, 52px); }
    .scene-lead { font-size: 15.5px; }
    .home img { object-position: 46% 100%; }
    .toggle { width: 100%; max-width: 400px; height: 68px; }
    .toggle b { font-size: 18px; }
    .toggle small { font-size: 12px; }
    .dock { width: 100%; padding: 0 0 24px; }
    .dock-note { font-size: 12.5px; }
    .menu-btn { display: inline-grid; }
    .nav-links {
        position: absolute;
        top: 64px; left: 16px; right: 16px;
        margin: 0;
        flex-direction: column; align-items: stretch;
        gap: 2px; padding: 8px;
        border-radius: 16px;
        background: var(--surface);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.nav-open .nav-links { display: flex; }
    .site-nav .nav-links a, .has-scene .site-nav:not(.scrolled) .nav-links a { padding: 12px 14px; font-size: 16px; color: var(--text); }
    .nav-hide-sm { display: none; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 20px; }
    .nav-bar { height: 60px; gap: 8px; }
    .brand-name small { display: none; }
    .scene-ui { padding-top: calc(60px + 40px); padding-left: 20px; padding-right: 20px; }
    .scene-cta { flex-direction: column; width: 100%; max-width: 320px; }
    .section { padding-top: 88px; }
    .bento { grid-template-columns: 1fr; }
    .bento .card, .bento .card.wide, .bento .card.lead { grid-column: auto; }
    .card { padding: 22px; }
    .mock { padding: 12px; border-radius: 20px; }
    .mock-cols { grid-template-columns: 1fr; }
    .rings { gap: 4px; }
    .ring { flex-direction: column; align-items: flex-start; gap: 6px; }
    .ring svg { width: 40px; height: 40px; }
    .list-row { padding: 16px; }
    .cta-band { padding: 44px 20px; margin-top: 88px; }
    .cta-row .btn { flex: 1 1 auto; }
    .page-hero { padding-top: 120px; }
    .env-table td:first-child { white-space: normal; word-break: break-all; }
}
