/* =====================================================================
   Absolute Axis 介紹站 — 與主控台（/main）同一套玻璃質感
   深色預設；<html class="light"> ＝亮色（ui.js toggleTheme，記在 localStorage axis-bg-mode）
   ===================================================================== */
:root {
    --bg: #07080C;
    --wallpaper: radial-gradient(1100px 800px at 12% 0%, rgba(98, 92, 230, 0.48), transparent 62%),
                 radial-gradient(900px 700px at 100% 12%, rgba(16, 150, 170, 0.36), transparent 62%),
                 radial-gradient(1200px 800px at 60% 110%, rgba(255, 136, 64, 0.26), transparent 62%);
    --card-bg: rgba(30, 30, 38, 0.52);
    --card-solid: #1C1C22;
    --fill: rgba(255, 255, 255, 0.08);
    --fill-2: rgba(118, 118, 128, 0.24);
    --text: #F5F5F7;
    --muted: rgba(235, 235, 245, 0.62);
    --faint: rgba(235, 235, 245, 0.32);
    --line: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.09);
    --glass-blur: blur(40px) saturate(170%);
    --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08), 0 20px 40px rgba(0, 0, 0, 0.25);
    --shadow: 0 16px 40px rgba(0, 0, 0, 0.35);
    --backdrop: rgba(0, 0, 0, 0.45);
    --accent: #4C8DFF;
    --accent-soft: rgba(76, 141, 255, 0.16);
    --on-accent: #FFFFFF;
    --ok: #34D17A;
    --warn: #FFB340;
    --bad: #FF6B62;
    --grad: linear-gradient(100deg, #7FB0FF 0%, #5CE1E6 45%, #B79CFF 100%);

    --font-sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang TC", "Geist", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    --font-display: -apple-system, BlinkMacSystemFont, "SF Pro Display", "PingFang TC", "Geist", "Noto Sans TC", "Microsoft JhengHei", sans-serif;
    --font-mono: "SF Mono", "Geist Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
    --radius: 26px;
    color-scheme: dark;
}

html.light {
    --bg: #EEF0F5;
    --wallpaper: radial-gradient(1100px 800px at 12% 0%, rgba(128, 122, 255, 0.32), transparent 62%),
                 radial-gradient(900px 700px at 100% 12%, rgba(40, 190, 205, 0.26), transparent 62%),
                 radial-gradient(1200px 800px at 60% 110%, rgba(255, 160, 100, 0.28), transparent 62%);
    --card-bg: rgba(255, 255, 255, 0.62);
    --card-solid: #FFFFFF;
    --fill: rgba(120, 120, 128, 0.12);
    --fill-2: rgba(118, 118, 128, 0.12);
    --text: #1C1C1E;
    --muted: rgba(60, 60, 67, 0.7);
    --faint: rgba(60, 60, 67, 0.34);
    --line: rgba(60, 60, 67, 0.12);
    --glass-border: rgba(255, 255, 255, 0.8);
    --glass-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 18px 40px rgba(40, 50, 90, 0.10);
    --shadow: 0 14px 36px rgba(40, 50, 90, 0.16);
    --backdrop: rgba(40, 45, 60, 0.28);
    --accent: #2563D9;
    --accent-soft: rgba(37, 99, 217, 0.12);
    --ok: #1E9E52;
    --warn: #B35F06;
    --bad: #D93A30;
    --grad: linear-gradient(100deg, #2563D9 0%, #0E9AA7 50%, #7A4DE0 100%);
    color-scheme: light;
}

/* ---------- 基礎 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scroll-padding-top: 96px; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background: var(--wallpaper);
    pointer-events: none;
}
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: 10px; }

.wrap { width: 100%; max-width: 1160px; margin: 0 auto; padding: 0 24px; }
svg.i { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
svg.i-fill { fill: currentColor; stroke: none; }
.sm-only { display: none; }

.glass {
    background: var(--card-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
}

/* ---------- 按鈕 ---------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border: 0;
    border-radius: 999px;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    white-space: nowrap;
    transition: transform 0.15s ease, filter 0.15s ease, background 0.2s ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn-primary { background: var(--accent); color: var(--on-accent); box-shadow: 0 8px 22px -8px var(--accent); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: var(--fill); color: var(--text); }
.btn-ghost:hover { background: var(--fill-2); }
.btn-lg { height: 52px; padding: 0 26px; font-size: 16px; }
.btn-sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-danger { background: rgba(255, 107, 98, 0.14); color: var(--bad); }
.btn-danger:hover { background: rgba(255, 107, 98, 0.22); }
.icon-btn {
    width: 40px; height: 40px;
    display: inline-grid; place-items: center;
    border: 0; border-radius: 50%;
    background: var(--fill); color: var(--text);
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.icon-btn:hover { background: var(--fill-2); }
.icon-btn:active { transform: scale(0.94); }
.icon-btn svg { width: 19px; height: 19px; }

/* ---------- 導覽列 ---------- */
.site-nav { position: sticky; top: 0; z-index: 50; padding: 12px 0 0; }
.nav-bar {
    display: flex;
    align-items: center;
    gap: 16px;
    height: 62px;
    padding: 0 10px 0 14px;
    border-radius: 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: 0.02em; }
.brand-mark {
    display: block;
    width: 34px; height: 34px;
    border-radius: 9px;
    overflow: hidden;
    background: #F4F3EF;
    box-shadow: 0 0 0 1px var(--line);
    flex: none;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 38%; transform: scale(1.5); }
.brand-name { font-size: 15px; white-space: nowrap; }
.brand-name small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); letter-spacing: 0.08em; line-height: 1.1; }
.nav-links { display: flex; align-items: center; gap: 4px; margin-left: 12px; }
.nav-links a {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover { color: var(--text); background: var(--fill); }
.nav-links a.active { color: var(--text); background: var(--fill); }
.nav-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.intro-logged-out-actions, .intro-logged-in-actions { display: flex; align-items: center; gap: 8px; }
.intro-logged-in-actions { display: none; }
.nav-text-link { padding: 8px 12px; font-size: 14px; font-weight: 500; color: var(--muted); cursor: pointer; background: none; border: 0; font-family: inherit; }
.nav-text-link:hover { color: var(--text); }
.menu-btn { display: none; }
.intro-avatar-btn {
    width: 38px; height: 38px;
    padding: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid var(--accent);
    background: var(--card-solid);
    cursor: pointer;
}
.intro-avatar-btn img { width: 100%; height: 100%; object-fit: cover; }

/* 帳號選單 */
.user-popover {
    position: fixed;
    top: 84px;
    right: max(16px, calc((100vw - 1160px) / 2 + 24px));
    z-index: 70;
    width: 260px;
    padding: 16px;
    border-radius: 20px;
    background: var(--card-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    opacity: 0;
    transform: translateY(-6px) scale(0.98);
    pointer-events: none;
    transition: opacity 0.18s ease, transform 0.18s ease;
}
.user-popover.active { opacity: 1; transform: none; pointer-events: auto; }
.pop-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.pop-head img { width: 44px; height: 44px; border-radius: 50%; object-fit: cover; background: var(--fill); }
.pop-head h4 { font-size: 16px; font-weight: 600; }
.pop-head div div { font-size: 13px; color: var(--muted); }
.pop-actions { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 14px; }

/* ---------- 區塊共用 ---------- */
.section { padding: 104px 0 0; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head.center { margin-left: auto; margin-right: auto; text-align: center; }
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    letter-spacing: 0.06em;
}
.section-title {
    font-family: var(--font-display);
    font-size: clamp(28px, 3.6vw, 42px);
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}
.section-lead { margin-top: 14px; font-size: 17px; color: var(--muted); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- 首屏 ---------- */
.hero { padding: 72px 0 0; }
.hero-grid { display: grid; grid-template-columns: 1.02fr 1fr; gap: 56px; align-items: center; }
.pill-tag {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 32px;
    padding: 0 14px 0 6px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}
.pill-tag b {
    height: 22px;
    padding: 0 9px;
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    background: var(--accent);
    color: var(--on-accent);
    font-size: 12px;
    font-weight: 600;
}
.hero h1 {
    margin-top: 22px;
    font-family: var(--font-display);
    font-size: clamp(34px, 5vw, 58px);
    font-weight: 700;
    line-height: 1.12;
    letter-spacing: -0.02em;
}
.nb { display: inline-block; }
.hero-lead { margin-top: 22px; max-width: 540px; font-size: 18px; color: var(--muted); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-top: 28px; font-size: 14px; color: var(--muted); }
.hero-meta span { display: inline-flex; align-items: center; gap: 7px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--ok); }

/* 首屏右側：主控台介面示意 */
.showcase { position: relative; }
.mock { border-radius: 30px; padding: 16px; }
.mock-top { display: flex; align-items: center; gap: 7px; padding: 2px 4px 14px; }
.mock-top i { width: 11px; height: 11px; border-radius: 50%; background: var(--fill-2); }
.mock-top i:nth-child(1) { background: #FF5F57; }
.mock-top i:nth-child(2) { background: #FEBC2E; }
.mock-top i:nth-child(3) { background: #28C840; }
.mock-top span { margin-left: 10px; font-size: 12px; color: var(--muted); }
.mock-body { display: grid; gap: 12px; }
.tile { border-radius: 20px; padding: 14px; background: var(--fill); }
.tile-title { display: flex; align-items: center; justify-content: space-between; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.rings { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ring { display: flex; align-items: center; gap: 10px; }
.ring svg { width: 46px; height: 46px; transform: rotate(-90deg); flex: none; }
.ring circle { fill: none; stroke-width: 5; stroke-linecap: round; }
.ring .track { stroke: var(--fill-2); }
.ring b { display: block; font-size: 17px; font-weight: 600; 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: 10px; padding: 7px 0; }
.dev-row + .dev-row { border-top: 1px solid var(--line); }
.dev-ico { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: #fff; 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: 600; }
.dev-main small { display: block; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 209, 122, 0.18); flex: none; }
.dot.idle { background: var(--warn); box-shadow: 0 0 0 3px rgba(255, 179, 64, 0.18); }
.mini-switch { width: 38px; height: 23px; border-radius: 999px; background: var(--ok); position: relative; flex: none; }
.mini-switch::after { content: ""; position: absolute; top: 2px; right: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25); }
.mini-switch.off { background: var(--fill-2); }
.mini-switch.off::after { right: auto; left: 2px; }
.disk { padding: 6px 0; }
.disk + .disk { border-top: 1px solid var(--line); }
.disk-line { display: flex; justify-content: space-between; font-size: 12.5px; }
.disk-line b { font-weight: 600; }
.disk-line span { color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--fill-2); overflow: hidden; margin-top: 6px; }
.bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); }
.disk-add { display: flex; align-items: center; gap: 8px; margin-top: 8px; padding: 8px 10px; border-radius: 12px; border: 1px dashed var(--faint); font-size: 12px; color: var(--muted); }
.disk-add svg { width: 15px; height: 15px; }
.float-note {
    position: absolute;
    left: -34px;
    bottom: -2px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px 12px 12px;
    border-radius: 20px;
    max-width: 290px;
    animation: floaty 6s ease-in-out infinite;
}
.float-note .dev-ico { width: 38px; height: 38px; border-radius: 11px; }
.float-note b { display: block; font-size: 13.5px; font-weight: 600; }
.float-note small { display: block; font-size: 12px; color: var(--muted); }
.mock-caption { margin-top: 14px; text-align: right; font-size: 12px; color: var(--faint); }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ---------- 功能（便當盒格線） ---------- */
.bento { display: grid; grid-template-columns: repeat(6, 1fr); gap: 16px; }
.card { border-radius: var(--radius); padding: 28px; }
.bento .card { grid-column: span 2; display: flex; flex-direction: column; }
.bento .card.wide { grid-column: span 3; }
.app-ico { width: 48px; height: 48px; border-radius: 13px; display: grid; place-items: center; color: #fff; margin-bottom: 18px; flex: none; }
.app-ico svg { width: 26px; height: 26px; }
.card h3 { font-size: 20px; font-weight: 650; 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: 18px; }
.chip { display: inline-flex; align-items: center; height: 28px; padding: 0 11px; border-radius: 999px; background: var(--fill); font-size: 12.5px; color: var(--muted); }
.i-green { background: linear-gradient(180deg, #3DDC6E, #28B857); }
.i-indigo { background: linear-gradient(180deg, #7472F0, #5552DC); }
.i-blue { background: linear-gradient(180deg, #3D9BFF, #1573E8); }
.i-orange { background: linear-gradient(180deg, #FFB23D, #F58A07); }
.i-pink { background: linear-gradient(180deg, #FF5C84, #EB3160); }
.i-teal { background: linear-gradient(180deg, #4FD4E8, #22AFC6); }
.i-gray { background: linear-gradient(180deg, #A1A1A8, #7C7C84); }

/* ---------- 你自己新增（iOS 分組清單） ---------- */
.yours-grid { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: start; }
.yours-grid .section-head { margin-bottom: 0; position: sticky; top: 110px; }
.ios-list { border-radius: var(--radius); overflow: hidden; padding: 6px 0; }
.ios-row { display: flex; gap: 16px; padding: 18px 22px; }
.ios-row + .ios-row { border-top: 1px solid var(--line); margin-left: 76px; padding-left: 0; }
.ios-row + .ios-row .app-ico { margin-left: -54px; }
.ios-row .app-ico { width: 38px; height: 38px; border-radius: 10px; margin: 2px 0 0; }
.ios-row .app-ico svg { width: 21px; height: 21px; }
.ios-row h3 { font-size: 17px; font-weight: 600; }
.ios-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: 12.5px; color: var(--muted); }
.path span { padding: 3px 9px; border-radius: 8px; 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: 14px; }
.flow-node { border-radius: 24px; padding: 22px; }
.flow-node h3 { font-size: 17px; font-weight: 600; margin-top: 12px; }
.flow-node p { font-size: 14px; color: var(--muted); margin-top: 4px; }
.flow-node .app-ico { width: 42px; height: 42px; border-radius: 12px; margin: 0; }
.flow-node .app-ico svg { width: 23px; height: 23px; }
.flow-node.core { box-shadow: var(--glass-shadow), 0 0 0 1px var(--accent-soft), 0 24px 60px -20px var(--accent); }
.flow-arrow { display: grid; place-items: center; color: var(--faint); }
.flow-arrow svg { width: 34px; height: 34px; }
.res-list { display: grid; gap: 8px; margin-top: 14px; }
.res { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 14px; 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-size: 12px; color: var(--faint); }

/* ---------- 安裝 ---------- */
.install-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 40px; align-items: center; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; counter-reset: step; }
.steps li { display: flex; gap: 14px; counter-increment: step; }
.steps li::before {
    content: counter(step);
    width: 30px; height: 30px;
    flex: none;
    display: grid; place-items: center;
    border-radius: 50%;
    background: var(--accent-soft);
    color: var(--accent);
    font-size: 14px;
    font-weight: 700;
}
.steps b { display: block; font-size: 16px; font-weight: 600; }
.steps span { display: block; font-size: 14.5px; color: var(--muted); margin-top: 2px; }
.steps code, .note code, .env-table code, .card p code { font-size: 0.92em; padding: 1px 6px; border-radius: 6px; background: var(--fill); }
.terminal {
    position: relative;
    border-radius: 22px;
    background: #0E1015;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: var(--shadow);
    overflow: hidden;
    color: #E6E8EE;
}
.term-top { display: flex; align-items: center; gap: 7px; padding: 14px 16px; border-bottom: 1px solid rgba(255, 255, 255, 0.06); }
.term-top i { width: 11px; height: 11px; border-radius: 50%; }
.term-top i:nth-child(1) { background: #FF5F57; }
.term-top i:nth-child(2) { background: #FEBC2E; }
.term-top i:nth-child(3) { background: #28C840; }
.term-top span { margin-left: 8px; 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.1);
    color: #E6E8EE;
    font: inherit; font-size: 12.5px; font-weight: 600;
    cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, 0.16); }
.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; }
.terminal .p { color: #5CE1E6; user-select: none; }
.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; }
.contact-list { display: grid; gap: 10px; margin-top: 18px; }
.contact {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: var(--fill);
    transition: background 0.2s ease;
}
a.contact:hover { background: var(--fill-2); }
.contact .app-ico { width: 34px; height: 34px; border-radius: 9px; margin: 0; }
.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: 600; word-break: break-all; }

/* ---------- 行動呼籲 / 頁尾 ---------- */
.cta-band { margin-top: 104px; border-radius: 32px; padding: 56px 40px; text-align: center; position: relative; overflow: hidden; }
.cta-band::before {
    content: "";
    position: absolute; inset: 0;
    background: radial-gradient(600px 240px at 50% 0%, var(--accent-soft), transparent 70%);
    pointer-events: none;
}
.cta-band > * { position: relative; }
.cta-band .hero-cta { justify-content: center; }
.site-footer { padding: 48px 0 40px; margin-top: 64px; 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-links { display: flex; flex-wrap: wrap; gap: 18px; }
.footer-links a:hover { color: var(--text); }

/* ---------- 子頁（安裝、帳號） ---------- */
.page-hero { padding: 72px 0 0; }
.page-hero h1 { font-family: var(--font-display); font-size: clamp(32px, 4.6vw, 52px); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; }
.page-hero p { margin-top: 16px; max-width: 640px; 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: 22px; font-weight: 650; }
.req-list { list-style: none; padding: 0; margin: 16px 0 0; display: grid; gap: 10px; }
.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: 11px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.env-table th { font-size: 12px; font-weight: 600; color: var(--muted); border-top: 0; }
.env-table td:first-child { white-space: nowrap; }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: var(--fill); color: var(--muted); }
.tag.must { background: rgba(255, 107, 98, 0.14); color: var(--bad); }
.tag.opt { background: var(--accent-soft); color: var(--accent); }

.profile-card { text-align: center; }
.profile-avatar { width: 104px; height: 104px; margin: 4px auto 16px; border-radius: 50%; overflow: hidden; background: var(--fill); box-shadow: 0 0 0 4px var(--accent-soft); }
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-card h2 { font-size: 26px; }
.role-badge { display: inline-flex; align-items: center; height: 26px; margin-top: 8px; padding: 0 12px; border-radius: 999px; background: var(--accent-soft); color: var(--accent); font-size: 13px; font-weight: 600; }
.kv { display: grid; gap: 0; margin-top: 22px; text-align: left; border-radius: 18px; background: var(--fill); padding: 4px 16px; }
.kv div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; font-size: 14.5px; }
.kv div + div { border-top: 1px solid var(--line); }
.kv span { color: var(--muted); }
.kv b { font-weight: 600; }
.link-row { display: flex; align-items: center; gap: 14px; padding: 16px 18px; border-radius: 20px; transition: transform 0.15s ease; }
.link-row:hover { transform: translateY(-2px); }
.link-row .app-ico { width: 40px; height: 40px; border-radius: 11px; margin: 0; }
.link-row .app-ico svg { width: 22px; height: 22px; }
.link-row b { display: block; font-size: 16px; font-weight: 600; }
.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; }

/* ---------- 登入視窗 ---------- */
.login-overlay {
    position: fixed; inset: 0; z-index: 90;
    display: none;
    align-items: center; justify-content: center;
    padding: 16px;
    background: var(--backdrop);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}
.login-overlay.open { display: flex; animation: fadeIn 0.18s ease; }
.sheet { position: relative; width: 100%; max-width: 380px; padding: 26px 24px 24px; border-radius: 28px; background: var(--card-solid); border: 1px solid var(--line); box-shadow: var(--shadow); animation: popIn 0.22s cubic-bezier(0.2, 0.9, 0.3, 1.2); }
.sheet .close { position: absolute; top: 14px; right: 14px; width: 32px; height: 32px; }
.sheet .close svg { width: 16px; height: 16px; }
.sheet-mark { width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 14px; }
.sheet h2 { text-align: center; font-size: 21px; font-weight: 650; }
.sheet .sub { text-align: center; margin-top: 4px; font-size: 13.5px; color: var(--muted); }
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 20px 0 16px; padding: 3px; border-radius: 12px; background: var(--fill-2); }
.seg button { height: 34px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s ease, color 0.2s ease; }
.seg button[aria-selected="true"] { background: var(--card-bg); color: var(--text); box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18); }
html.light .seg button[aria-selected="true"] { background: #fff; }
.field { display: block; margin-bottom: 10px; }
.field span { display: block; font-size: 12.5px; font-weight: 600; color: var(--muted); margin: 0 0 6px 4px; }
.field input {
    width: 100%; height: 48px; padding: 0 14px;
    border-radius: 14px;
    border: 1px solid var(--line);
    background: var(--fill);
    color: var(--text);
    font: inherit; font-size: 16px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.field input:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.sheet .btn-primary { margin-top: 8px; }
.sheet .fine { margin-top: 14px; text-align: center; font-size: 12.5px; color: var(--faint); }

/* ---------- 通知 ---------- */
#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: 12px 18px 12px 12px;
    border-radius: 999px;
    background: var(--card-solid);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
    font-size: 14.5px; font-weight: 500;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.22s ease, transform 0.22s ease;
}
.toast.toast-visible { opacity: 1; transform: none; }
.toast-icon { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; 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(18px); transition: opacity 0.6s ease, transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1); }
html.js .reveal.in { opacity: 1; transform: none; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(8px) scale(0.97); } to { opacity: 1; transform: none; } }
@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) {
    .hero-grid, .yours-grid, .install-grid, .two-col, .about-grid { grid-template-columns: 1fr; }
    .yours-grid .section-head { position: static; margin-bottom: 8px; }
    .showcase { max-width: 620px; }
    .float-note { left: auto; right: 12px; }
    .bento .card, .bento .card.wide { grid-column: span 3; }
    .flow { grid-template-columns: 1fr; }
    .flow-arrow { transform: rotate(90deg); height: 28px; }
}
@media (max-width: 820px) {
    .menu-btn { display: inline-grid; }
    .nav-links {
        position: absolute;
        top: 80px; left: 16px; right: 16px;
        margin: 0;
        flex-direction: column; align-items: stretch;
        gap: 2px; padding: 8px;
        border-radius: 20px;
        background: var(--card-solid);
        border: 1px solid var(--line);
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.nav-open .nav-links { display: flex; }
    .nav-links a { padding: 12px 14px; font-size: 16px; }
    .nav-links .sm-only { display: block; }
    .nav-hide-sm { display: none; }
}
@media (max-width: 640px) {
    .wrap { padding: 0 16px; }
    .nav-bar { height: 56px; padding: 0 8px 0 10px; gap: 8px; border-radius: 18px; }
    .brand-name small { display: none; }
    .hero { padding-top: 44px; }
    .hero-lead { font-size: 16.5px; }
    .hero-cta .btn { flex: 1 1 auto; }
    .section { padding-top: 80px; }
    .bento { grid-template-columns: 1fr; }
    .bento .card, .bento .card.wide { grid-column: auto; }
    .card { padding: 22px; }
    .mock { padding: 12px; border-radius: 24px; }
    .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; }
    .float-note { position: relative; left: auto; right: auto; bottom: auto; margin: -18px 12px 0 auto; }
    .mock-caption { margin-top: 12px; }
    .ios-row { padding: 16px; }
    .ios-row + .ios-row { margin-left: 70px; }
    .cta-band { padding: 40px 20px; border-radius: 26px; margin-top: 80px; }
    .env-table td:first-child { white-space: normal; word-break: break-all; }
    .user-popover { top: 76px; right: 16px; }
}
