/* =========================================================================
   Pomelo 柚子桌面 — 網站樣式
   不載入任何外部字型或框架；用系統字型，跟桌面本身一樣輕。
   ========================================================================= */

/* ---------- 色彩與尺寸 ---------- */
:root {
    --bg: #fbfaf8;
    --bg-soft: #f3f1ec;
    --bg-sunken: #ece9e3;
    --surface: #ffffff;
    --surface-2: #faf9f7;
    --ink: #17161d;
    --ink-2: #45434f;
    --muted: #6f6c7a;
    --line: #e6e2db;
    --line-strong: #d4cfc6;

    --accent: #5b4fd6;
    --accent-hover: #4a3fc0;
    --accent-soft: #efedff;
    --accent-ink: #4337b8;
    --on-accent: #ffffff;

    --pomelo: #f7c63f;
    --pomelo-soft: #fff4d1;
    --pomelo-ink: #8a5a00;
    --coral: #ff7a6b;
    --coral-soft: #ffe9e4;
    --leaf: #4f9a2f;
    --leaf-soft: #e6f4dc;
    --ui-blue: #0a7cff;

    --ok: #23874a;
    --ok-soft: #e3f4e8;
    --warn: #a56a00;
    --warn-soft: #fff1d6;
    --bad: #c93b3b;

    --hero-grad: linear-gradient(128deg, #2a47b3 0%, #5153c3 28%, #8a6fc4 56%, #c886b0 76%, #f3a17d 100%);
    --hero-ink: #ffffff;

    --radius-sm: 10px;
    --radius: 16px;
    --radius-lg: 24px;
    --shadow-1: 0 1px 2px rgba(23, 18, 48, .05), 0 2px 10px rgba(23, 18, 48, .05);
    --shadow-2: 0 2px 6px rgba(23, 18, 48, .06), 0 18px 48px -14px rgba(36, 24, 96, .22);
    --shadow-3: 0 30px 80px -20px rgba(20, 12, 60, .45), 0 10px 30px -10px rgba(20, 12, 60, .3);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Source Han Sans TC", "Microsoft JhengHei", "Heiti TC", sans-serif;
    --mono: ui-monospace, "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", "Noto Sans Mono CJK TC", Menlo, Consolas, monospace;

    --header-h: 64px;
    --gutter: 24px;
    --maxw: 1200px;

    color-scheme: light;
}

:root[data-theme="dark"] {
    --bg: #110f17;
    --bg-soft: #17151f;
    --bg-sunken: #0c0b11;
    --surface: #1b1924;
    --surface-2: #211f2b;
    --ink: #f1eff7;
    --ink-2: #cdc9d8;
    --muted: #9c98aa;
    --line: #2c2938;
    --line-strong: #3a3648;
    --accent: #a59cff;
    --accent-hover: #bbb4ff;
    --accent-soft: #262245;
    --accent-ink: #c4beff;
    --on-accent: #15122b;
    --pomelo-soft: #3a2f12;
    --pomelo-ink: #ffd56b;
    --coral-soft: #3d2120;
    --leaf-soft: #1d2f17;
    --ok: #5fd08a;
    --ok-soft: #173223;
    --warn: #f0b44c;
    --warn-soft: #3a2c10;
    --bad: #ff7b7b;
    --hero-grad: linear-gradient(128deg, #1c2b74 0%, #343188 30%, #5a3f86 58%, #7e4a72 78%, #9a5b4c 100%);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 10px rgba(0, 0, 0, .25);
    --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 48px -14px rgba(0, 0, 0, .6);
    --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 10px 30px -10px rgba(0, 0, 0, .5);
    color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #110f17;
        --bg-soft: #17151f;
        --bg-sunken: #0c0b11;
        --surface: #1b1924;
        --surface-2: #211f2b;
        --ink: #f1eff7;
        --ink-2: #cdc9d8;
        --muted: #9c98aa;
        --line: #2c2938;
        --line-strong: #3a3648;
        --accent: #a59cff;
        --accent-hover: #bbb4ff;
        --accent-soft: #262245;
        --accent-ink: #c4beff;
        --on-accent: #15122b;
        --pomelo-soft: #3a2f12;
        --pomelo-ink: #ffd56b;
        --coral-soft: #3d2120;
        --leaf-soft: #1d2f17;
        --ok: #5fd08a;
        --ok-soft: #173223;
        --warn: #f0b44c;
        --warn-soft: #3a2c10;
        --bad: #ff7b7b;
        --hero-grad: linear-gradient(128deg, #1c2b74 0%, #343188 30%, #5a3f86 58%, #7e4a72 78%, #9a5b4c 100%);
        --shadow-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 10px rgba(0, 0, 0, .25);
        --shadow-2: 0 2px 6px rgba(0, 0, 0, .35), 0 18px 48px -14px rgba(0, 0, 0, .6);
        --shadow-3: 0 30px 80px -20px rgba(0, 0, 0, .75), 0 10px 30px -10px rgba(0, 0, 0, .5);
        color-scheme: dark;
    }
}

/* ---------- 基本 ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
    scroll-behavior: smooth;
    scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.75;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
}

img, svg, video, picture { display: block; max-width: 100%; }
img { height: auto; }
picture { display: contents; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); }

h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); }
h1 { font-weight: 800; }
h2 { font-weight: 800; }
h3 { font-weight: 700; }
p { margin: 0 0 1em; }

::selection { background: color-mix(in srgb, var(--accent) 28%, transparent); }

:focus-visible { outline: 3px solid color-mix(in srgb, var(--accent) 60%, transparent); outline-offset: 2px; border-radius: 6px; }

kbd {
    display: inline-block;
    font-family: var(--font);
    font-size: .82em;
    font-weight: 600;
    line-height: 1.5;
    padding: 0 .45em;
    margin: 0 .08em;
    border-radius: 6px;
    background: var(--surface);
    border: 1px solid var(--line-strong);
    border-bottom-width: 2px;
    color: var(--ink);
    white-space: nowrap;
    vertical-align: .05em;
}

code {
    font-family: var(--mono);
    font-size: .88em;
    padding: .12em .4em;
    border-radius: 6px;
    background: var(--bg-soft);
    color: var(--ink);
    overflow-wrap: anywhere;
}

pre {
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.65;
    background: #16141f;
    color: #e9e6f5;
    border-radius: var(--radius);
    padding: 16px 20px;
    overflow-x: auto;
    margin: 0 0 1.2em;
}
pre code { background: none; padding: 0; color: inherit; font-size: inherit; }

.muted { color: var(--muted); }
.icon { width: 1.15em; height: 1.15em; flex: none; display: inline-block; vertical-align: -.2em; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.nowrap { white-space: nowrap; }
.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; }

.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { top: 12px; color: var(--on-accent); }

.container { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 var(--gutter); }
.container-narrow { max-width: 860px; }

@media (max-width: 640px) {
    :root { --gutter: 16px; }
}

/* ---------- 按鈕 ---------- */
.btn {
    --btn-bg: var(--surface);
    --btn-ink: var(--ink);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--btn-bg);
    color: var(--btn-ink);
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    line-height: 1;
    cursor: pointer;
    white-space: nowrap;
    transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.btn:hover { color: var(--btn-ink); transform: translateY(-1px); box-shadow: var(--shadow-1); }
.btn:active { transform: translateY(0); }
.btn-primary { --btn-bg: var(--accent); --btn-ink: var(--on-accent); border-color: transparent; box-shadow: 0 6px 18px -8px color-mix(in srgb, var(--accent) 80%, transparent); }
.btn-primary:hover { --btn-bg: var(--accent-hover); }
.btn-light { --btn-bg: #ffffff; --btn-ink: #1d1747; border-color: transparent; }
.btn-light:hover { --btn-bg: #f4f2ff; }
.btn-glass { --btn-bg: rgba(255, 255, 255, .14); --btn-ink: #fff; border-color: rgba(255, 255, 255, .35); backdrop-filter: blur(8px); }
.btn-glass:hover { --btn-bg: rgba(255, 255, 255, .24); }
.btn-ghost { --btn-bg: transparent; }
.btn-lg { min-height: 54px; padding: 0 28px; font-size: 17px; }
.btn-sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.btn .icon { width: 1.1em; height: 1.1em; }

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--ink-2);
    cursor: pointer;
}
.icon-btn:hover { background: var(--bg-soft); color: var(--ink); }
.icon-btn .icon { width: 20px; height: 20px; }

/* ---------- 頂端 ---------- */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    height: var(--header-h);
    background: color-mix(in srgb, var(--bg) 82%, transparent);
    backdrop-filter: saturate(1.6) blur(16px);
    -webkit-backdrop-filter: saturate(1.6) blur(16px);
    border-bottom: 1px solid transparent;
    transition: border-color .2s ease, background-color .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 100%; }

.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); font-weight: 800; font-size: 19px; letter-spacing: -.01em; }
.brand:hover { color: var(--ink); }
.brand img { width: 32px; height: 32px; transition: transform .4s cubic-bezier(.3, 1.6, .5, 1); }
.brand:hover img { transform: rotate(-18deg) scale(1.06); }
.brand-zh { color: var(--muted); font-weight: 700; }

.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav a { color: var(--ink-2); font-size: 15px; font-weight: 600; padding: 8px 12px; border-radius: 10px; }
.main-nav a:hover { color: var(--ink); background: var(--bg-soft); }
.main-nav a.active { color: var(--accent-ink); background: var(--accent-soft); }
.main-nav .nav-download { display: none; }

.header-actions { display: flex; align-items: center; gap: 6px; }
.nav-toggle { display: none; }
.theme-icon-light { display: none; }
:root[data-theme="dark"] .theme-icon-light { display: inline-block; }
:root[data-theme="dark"] .theme-icon-dark { display: none; }
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .theme-icon-light { display: inline-block; }
    :root:not([data-theme="light"]) .theme-icon-dark { display: none; }
}

@media (max-width: 1020px) {
    .nav-toggle { display: inline-grid; }
    .header-download { display: none; }
    .main-nav {
        position: fixed;
        inset: var(--header-h) 0 auto 0;
        flex-direction: column;
        align-items: stretch;
        gap: 2px;
        padding: 12px var(--gutter) 20px;
        background: var(--bg);
        border-bottom: 1px solid var(--line);
        box-shadow: var(--shadow-2);
        transform: translateY(-8px);
        opacity: 0;
        visibility: hidden;
        transition: opacity .18s ease, transform .18s ease, visibility .18s;
    }
    .main-nav a { padding: 12px 14px; font-size: 17px; }
    .main-nav .nav-download { display: inline-flex; margin-top: 10px; min-height: 48px; font-size: 16px; }
    .header-actions { margin-left: auto; }
    body.nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
    .nav-close-icon { display: none; }
    body.nav-open .nav-open-icon { display: none; }
    body.nav-open .nav-close-icon { display: inline-block; }
}

/* ---------- 區塊 ---------- */
.section { padding: 112px 0; position: relative; }
.section-tight { padding: 72px 0; }
.section-alt { background: var(--bg-soft); }
.section + .section-alt, .section-alt + .section { border-top: 0; }

.section-head { max-width: 760px; margin: 0 auto 56px; text-align: center; }
.section-head.left { margin-left: 0; text-align: left; }
.section-head h2 { font-size: clamp(30px, 4.4vw, 48px); letter-spacing: -.02em; }
.section-head .lead { margin-top: 12px; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 800;
    letter-spacing: .08em;
    color: var(--accent-ink);
    margin-bottom: 14px;
}
.eyebrow .icon { width: 18px; height: 18px; }
.eyebrow.pomelo { color: var(--pomelo-ink); }
.eyebrow.coral { color: var(--coral); }
.eyebrow.leaf { color: var(--leaf); }

.lead { font-size: clamp(17px, 1.6vw, 19px); color: var(--ink-2); line-height: 1.8; }

.grad-text {
    background: linear-gradient(100deg, #5b4fd6 0%, #b25fc0 45%, #ff7a6b 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
:root[data-theme="dark"] .grad-text { background-image: linear-gradient(100deg, #a59cff 0%, #e08ee0 45%, #ffa08f 100%); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .grad-text { background-image: linear-gradient(100deg, #a59cff 0%, #e08ee0 45%, #ffa08f 100%); } }

.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 960px) { .grid-3, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); } }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-1);
}
.card h3 { font-size: 19px; margin-bottom: 8px; }
.card p { color: var(--ink-2); margin: 0; }
.card p + p { margin-top: .6em; }

.card-icon {
    display: inline-grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    margin-bottom: 18px;
    background: var(--accent-soft);
    color: var(--accent-ink);
}
.card-icon .icon { width: 24px; height: 24px; }
.card-icon.pomelo { background: var(--pomelo-soft); color: var(--pomelo-ink); }
.card-icon.coral { background: var(--coral-soft); color: var(--coral); }
.card-icon.leaf { background: var(--leaf-soft); color: var(--leaf); }

.pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: var(--accent-soft);
    color: var(--accent-ink);
    white-space: nowrap;
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.pomelo { background: var(--pomelo-soft); color: var(--pomelo-ink); }
.pill.neutral { background: var(--bg-soft); color: var(--ink-2); }
.pill .icon { width: 14px; height: 14px; }

.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.dot-ok { background: #36c26b; box-shadow: 0 0 0 3px color-mix(in srgb, #36c26b 25%, transparent); }

.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li { display: grid; grid-template-columns: 24px 1fr; gap: 10px; color: var(--ink-2); }
.check-list li::before {
    content: "";
    width: 22px;
    height: 22px;
    margin-top: 3px;
    border-radius: 50%;
    background: var(--ok-soft) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2323874a' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 13px no-repeat;
}
.check-list strong { color: var(--ink); }

/* ---------- 首頁：主視覺 ---------- */
.hero {
    position: relative;
    margin-top: calc(var(--header-h) * -1);
    padding: calc(var(--header-h) + 72px) 0 0;
    background: var(--hero-grad);
    color: var(--hero-ink);
    overflow: hidden;
    isolation: isolate;
}
.hero::before, .hero::after {
    content: "";
    position: absolute;
    z-index: -1;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    animation: drift 18s ease-in-out infinite alternate;
}
.hero::before { width: 520px; height: 520px; left: -140px; top: 80px; background: #3c6cf0; }
.hero::after { width: 460px; height: 460px; right: -120px; top: -60px; background: #ffb48a; animation-delay: -6s; }
@keyframes drift {
    from { transform: translate(0, 0) scale(1); }
    to { transform: translate(60px, 40px) scale(1.12); }
}
.hero-grain {
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .06;
    background-image: radial-gradient(rgba(255, 255, 255, .9) 1px, transparent 1px);
    background-size: 22px 22px;
    mask-image: linear-gradient(to bottom, #000 0%, transparent 80%);
}

.hero-content { text-align: center; max-width: 920px; margin: 0 auto; }
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 8px 6px 6px;
    margin-bottom: 28px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .28);
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    backdrop-filter: blur(10px);
}
.hero-badge:hover { color: #fff; background: rgba(255, 255, 255, .22); }
.hero-badge b { background: #fff; color: #3b2fb0; border-radius: 999px; padding: 2px 10px; font-size: 13px; }
.hero-badge .icon { width: 16px; height: 16px; margin-right: 4px; }

.hero h1 {
    font-size: clamp(40px, 7.2vw, 84px);
    line-height: 1.12;
    letter-spacing: -.03em;
    color: #fff;
    margin-bottom: 24px;
    text-wrap: balance;
}
.hero h1 .hl {
    background: linear-gradient(100deg, #fff1b8, #ffd166 40%, #ffb199 100%);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}
.hero-sub { font-size: clamp(17px, 2vw, 21px); line-height: 1.75; color: rgba(255, 255, 255, .9); max-width: 760px; margin: 0 auto 36px; text-wrap: pretty; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }
.hero-meta { margin-top: 20px; font-size: 14px; color: rgba(255, 255, 255, .8); display: flex; flex-wrap: wrap; gap: 6px 18px; justify-content: center; }
.hero-meta span { display: inline-flex; align-items: center; gap: 6px; }
.hero-meta .icon { width: 16px; height: 16px; }

.hero-visual { position: relative; max-width: 1080px; margin: 64px auto 0; padding: 0 var(--gutter); }
.screen-frame {
    position: relative;
    border-radius: 18px 18px 0 0;
    padding: 12px 12px 0;
    background: linear-gradient(180deg, #2a2838, #1a1924);
    box-shadow: var(--shadow-3);
    transform: perspective(2400px) rotateX(8deg);
    transform-origin: 50% 100%;
    transition: transform .8s cubic-bezier(.2, .8, .2, 1);
}
.hero-visual:hover .screen-frame { transform: perspective(2400px) rotateX(2deg); }
.screen-frame img { border-radius: 8px 8px 0 0; width: 100%; }
.screen-frame::before {
    content: "";
    position: absolute;
    top: 4px;
    left: 50%;
    width: 6px;
    height: 6px;
    margin-left: -3px;
    border-radius: 50%;
    background: #3a3850;
}

.float-card {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .94);
    color: #1d1b26;
    box-shadow: 0 20px 40px -16px rgba(20, 10, 60, .5);
    font-size: 14px;
    line-height: 1.4;
    animation: bob 6s ease-in-out infinite;
}
.float-card strong { display: block; font-size: 15px; }
.float-card small { color: #6a6777; }
.float-card .fc-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none; }
.float-card .fc-icon .icon { width: 22px; height: 22px; }
.float-1 { left: -10px; top: 18%; }
.float-2 { right: -14px; top: 34%; animation-delay: -2s; }
.float-3 { left: 8%; bottom: 10%; animation-delay: -4s; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-10px); } }
@media (max-width: 860px) {
    .float-card { display: none; }
    .screen-frame { transform: none; padding: 8px 8px 0; border-radius: 12px 12px 0 0; }
}

/* ---------- 數字 ---------- */
.stats {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 0;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-2);
    overflow: hidden;
}
.stat { padding: 28px 24px; border-left: 1px solid var(--line); }
.stat:first-child { border-left: 0; }
.stat-value { font-size: clamp(28px, 3.2vw, 40px); font-weight: 800; letter-spacing: -.02em; line-height: 1.1; font-variant-numeric: proportional-nums; }
.stat-value small { font-size: .5em; font-weight: 700; margin-left: 3px; color: var(--ink-2); }
.stat-label { color: var(--muted); font-size: 14px; margin-top: 8px; line-height: 1.5; }
.stats-wrap { position: relative; z-index: 3; margin-top: -56px; }
@media (max-width: 960px) {
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .stat { border-left: 0; border-top: 1px solid var(--line); }
    .stat:nth-child(-n+2) { border-top: 0; }
    .stat:nth-child(even) { border-left: 1px solid var(--line); }
    .stat:last-child:nth-child(odd) { grid-column: 1 / -1; }
}

/* ---------- 一整套：堆疊圖 ---------- */
.stack { display: grid; gap: 10px; }
.stack-layer {
    position: relative;
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 20px;
    align-items: center;
    padding: 18px 22px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-1);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.stack-layer:hover { transform: translateX(6px); box-shadow: var(--shadow-2); border-color: color-mix(in srgb, var(--layer) 45%, var(--line)); }
.stack-layer::before {
    content: "";
    position: absolute;
    left: -1px;
    top: 14px;
    bottom: 14px;
    width: 4px;
    border-radius: 0 4px 4px 0;
    background: var(--layer);
}
.stack-name { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 17px; }
.stack-name .layer-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: color-mix(in srgb, var(--layer) 14%, transparent); color: var(--layer); flex: none; }
.stack-name .layer-icon .icon { width: 21px; height: 21px; }
.stack-name small { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.stack-pkgs { display: flex; flex-wrap: wrap; gap: 6px; }
.stack-pkg {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 8px;
    background: var(--bg-soft);
    font-family: var(--mono);
    font-size: 12.5px;
    color: var(--ink-2);
}
.stack-pkg b { font-family: var(--font); font-weight: 700; font-size: 11.5px; color: var(--muted); }
.stack-size { font-weight: 800; font-size: 18px; text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.stack-size small { display: block; font-size: 12px; color: var(--muted); font-weight: 600; }
.stack-total {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 10px;
    padding: 22px 26px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--bg);
}
.stack-total strong { font-size: clamp(26px, 3vw, 34px); letter-spacing: -.02em; }
.stack-total p { margin: 0; color: color-mix(in srgb, var(--bg) 72%, transparent); font-size: 15px; }
.stack-layer[data-layer="login"] { --layer: #7a5af8; }
.stack-layer[data-layer="wm"] { --layer: #3d7bf7; }
.stack-layer[data-layer="input"] { --layer: #0ea5a0; }
.stack-layer[data-layer="settings"] { --layer: #64748b; }
.stack-layer[data-layer="apps"] { --layer: #e38b00; }
.stack-layer[data-layer="pdf"] { --layer: #e5484d; }
.stack-layer[data-layer="ai"] { --layer: #d846b8; }
@media (max-width: 860px) {
    .stack-layer { grid-template-columns: 1fr auto; gap: 12px; }
    .stack-pkgs { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- 左右排版 ---------- */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); gap: 64px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split-text h2 { font-size: clamp(28px, 3.6vw, 42px); letter-spacing: -.02em; }
.split-text .lead { margin-bottom: 28px; }
@media (max-width: 960px) {
    .split { grid-template-columns: minmax(0, 1fr); gap: 40px; }
    .split.reverse > :first-child { order: 0; }
}

.shot {
    position: relative;
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-2);
    border: 1px solid var(--line);
    background: var(--surface);
}
.shot img { width: 100%; }
.shot-bg {
    padding: clamp(16px, 4vw, 40px);
    border-radius: var(--radius-lg);
    background: var(--hero-grad);
    box-shadow: var(--shadow-2);
}
.shot-bg .shot { border: 0; box-shadow: var(--shadow-3); }
.shot-bg.center { display: grid; place-items: center; }
.shot-bg.center img { width: auto; max-height: 520px; border-radius: 12px; box-shadow: var(--shadow-3); }

[data-zoom] { cursor: zoom-in; }

/* ---------- 分頁（截圖切換） ---------- */
.tabs-list {
    display: flex;
    gap: 6px;
    padding: 6px;
    margin: 0 auto 28px;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
    border-radius: 999px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
}
.tabs-list::-webkit-scrollbar { display: none; }
.tab-btn {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: var(--ink-2);
    font: inherit;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    white-space: nowrap;
}
.tab-btn:hover { color: var(--ink); background: var(--bg-soft); }
.tab-btn[aria-selected="true"] { background: var(--accent); color: var(--on-accent); }
.tab-btn .icon { width: 17px; height: 17px; }
.tab-panel[hidden] { display: none; }
.tab-panel { animation: fadeIn .35s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.tour-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; align-items: start; }
.tour-caption h3 { font-size: 22px; }
.tour-caption p { color: var(--ink-2); }
.tour-caption .check-list { margin-top: 16px; font-size: 15px; }
@media (max-width: 960px) { .tour-grid { grid-template-columns: minmax(0, 1fr); } }

/* 桌面導覽的熱點 */
.hotspots { position: relative; }
.hotspot {
    position: absolute;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 0;
    padding: 0;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font: 800 13px/30px var(--font);
    cursor: pointer;
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--accent) 30%, transparent), 0 6px 16px rgba(0, 0, 0, .3);
    z-index: 2;
}
.hotspot::after {
    content: "";
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    border: 2px solid var(--accent);
    animation: ping 2.2s ease-out infinite;
}
.hotspot[aria-expanded="true"] { background: var(--coral); }
.hotspot[aria-expanded="true"]::after { border-color: var(--coral); }
@keyframes ping { from { transform: scale(1); opacity: .9; } to { transform: scale(2.1); opacity: 0; } }
.hotspot-tip {
    position: absolute;
    z-index: 3;
    width: min(280px, 70vw);
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    font-size: 14px;
    line-height: 1.6;
}
.hotspot-tip strong { display: block; font-size: 15px; margin-bottom: 4px; }
.hotspot-tip[hidden] { display: none; }

/* ---------- 小柚 ---------- */
.assistant-stage { display: grid; grid-template-columns: 260px minmax(0, 1fr); gap: 32px; align-items: end; }
@media (max-width: 860px) { .assistant-stage { grid-template-columns: minmax(0, 1fr); } .assistant-stage .robot-wrap { order: 2; max-width: 200px; margin: 0 auto; } }

.robot-wrap { position: relative; }
.robot { width: 100%; height: auto; overflow: visible; }
.robot-body-group { animation: robot-bob 3.2s ease-in-out infinite; transform-origin: 100px 230px; }
.robot-shadow { animation: robot-shadow 3.2s ease-in-out infinite; transform-origin: 100px 238px; }
.robot-head { transform-origin: 100px 130px; transition: transform .4s ease; }
.robot-eyes { transition: transform .15s ease; }
.robot-eye { transform-box: fill-box; transform-origin: center; animation: blink 5s infinite; }
.robot-happy { opacity: 0; transition: opacity .2s; }
.robot.happy .robot-eyes { opacity: 0; }
.robot.happy .robot-happy { opacity: 1; }
.robot.thinking .robot-eyes { transform: translateY(-6px); }
.robot.thinking .robot-antenna { animation: antenna 0.5s ease-in-out infinite alternate; }
.robot-antenna { transform-box: fill-box; transform-origin: center; }
.robot.talking .robot-mouth { animation: talk .18s ease-in-out infinite alternate; transform-box: fill-box; transform-origin: center; }
.robot-arm-r { transform-origin: 148px 152px; transition: transform .4s cubic-bezier(.3, 1.5, .5, 1); }
.robot.wave .robot-arm-r { animation: wave .5s ease-in-out 3 alternate; }
.robot-chest { animation: chest 3s ease-in-out infinite; }
@keyframes robot-bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes robot-shadow { 0%, 100% { transform: scaleX(1); opacity: .18; } 50% { transform: scaleX(.86); opacity: .12; } }
@keyframes blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.1); } }
@keyframes antenna { from { opacity: 1; } to { opacity: .35; } }
@keyframes talk { from { transform: scaleY(1); } to { transform: scaleY(.3); } }
@keyframes wave { from { transform: rotate(0deg); } to { transform: rotate(-38deg); } }
@keyframes chest { 0%, 100% { opacity: 1; } 50% { opacity: .65; } }

.chat {
    position: relative;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow-2);
    padding: 20px;
}
.chat::after {
    content: "";
    position: absolute;
    left: -10px;
    bottom: 64px;
    width: 20px;
    height: 20px;
    background: var(--surface);
    border-left: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    transform: rotate(45deg);
}
@media (max-width: 860px) { .chat::after { left: 50%; bottom: -10px; margin-left: -10px; transform: rotate(-45deg); } }
.chat-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; font-size: 13px; color: var(--muted); }
.chat-head strong { color: var(--ink); font-size: 15px; }
.chat-log { display: flex; flex-direction: column; gap: 10px; min-height: 220px; max-height: 340px; overflow-y: auto; padding: 4px 2px 8px; scroll-behavior: smooth; }
.msg { max-width: 86%; padding: 9px 14px; border-radius: 18px; font-size: 15px; line-height: 1.6; animation: fadeIn .25s ease; overflow-wrap: anywhere; }
.msg-user { align-self: flex-end; background: var(--ui-blue); color: #fff; border-bottom-right-radius: 6px; }
.msg-bot { align-self: flex-start; background: var(--bg-soft); color: var(--ink); border-bottom-left-radius: 6px; }
.msg-bot ol { margin: 4px 0 0; padding-left: 1.3em; }
.msg-bot a { color: var(--ui-blue); }
:root[data-theme="dark"] .msg-bot a { color: #6cb6ff; }
.msg-meta { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--muted); margin-top: -4px; padding-left: 6px; }
.msg-meta .icon { width: 13px; height: 13px; }
.msg-meta.fast { color: var(--ok); }
.msg-meta.model { color: var(--accent-ink); }
.typing { display: inline-flex; gap: 4px; padding: 14px 16px; }
.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--muted); animation: typing 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes typing { 0%, 60%, 100% { opacity: .3; transform: translateY(0); } 30% { opacity: 1; transform: translateY(-3px); } }

.chat-form { display: flex; gap: 8px; margin-top: 12px; }
.chat-form input {
    flex: 1;
    min-width: 0;
    height: 46px;
    padding: 0 16px;
    border-radius: 14px;
    border: 2px solid color-mix(in srgb, var(--ui-blue) 70%, transparent);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 16px;
}
.chat-form input:focus { outline: none; border-color: var(--ui-blue); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ui-blue) 18%, transparent); }
.chat-form button { flex: none; width: 46px; height: 46px; border-radius: 14px; border: 0; background: var(--ui-blue); color: #fff; cursor: pointer; display: grid; place-items: center; }
.chat-form button .icon { width: 20px; height: 20px; }
.chip-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.chip {
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink-2);
    font: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.chip[aria-pressed="true"] { border-color: var(--accent); color: var(--on-accent); background: var(--accent); }
.demo-note { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* ---------- 長條圖（輸入法比較） ---------- */
.chart-card { padding: 28px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; }
.chart-head h3 { margin: 0; font-size: 17px; }
.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--bg-soft); border: 1px solid var(--line); }
.seg button { border: 0; background: transparent; color: var(--ink-2); font: inherit; font-size: 13px; font-weight: 700; padding: 6px 12px; border-radius: 8px; cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
.bars { display: grid; gap: 18px; }
.bar-row { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 14px; align-items: center; }
.bar-label { font-weight: 700; font-size: 14px; line-height: 1.35; }
.bar-label small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.bar-track { position: relative; height: 24px; border-left: 1px solid var(--line-strong); display: flex; align-items: center; }
.bar {
    height: 20px;
    width: 0;
    border-radius: 0 4px 4px 0;
    background: var(--line-strong);
    transition: width .9s cubic-bezier(.2, .8, .2, 1);
    min-width: 3px;
}
.bar.is-us { background: var(--accent); }
.bar-value { margin-left: 10px; font-weight: 800; font-size: 14px; white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--ink); }
.bar-row:hover .bar { filter: brightness(1.08); }
.bar-row[data-us] .bar-label { color: var(--accent-ink); }
.chart-foot { margin-top: 18px; font-size: 13px; color: var(--muted); }
@media (max-width: 520px) { .bar-row { grid-template-columns: 1fr; gap: 6px; } }

/* ---------- 應用程式格子 ---------- */
.app-card { display: flex; flex-direction: column; padding: 0; overflow: hidden; transition: transform .2s ease, box-shadow .2s ease; }
.app-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-2); }
.app-card .app-shot { aspect-ratio: 16 / 10; overflow: hidden; background: var(--bg-soft); border-bottom: 1px solid var(--line); }
.app-card .app-shot img { width: 100%; height: 100%; object-fit: cover; object-position: top left; transition: transform .5s ease; }
.app-card:hover .app-shot img { transform: scale(1.04); }
.app-card .app-body { padding: 20px 22px 24px; }
.app-card h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; }
.app-card h3 .icon { color: var(--accent); width: 20px; height: 20px; }
.app-card p { font-size: 15px; }
.app-card .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* ---------- 語言 ---------- */
.lang-cloud { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 900px; margin: 0 auto; }
.lang {
    display: inline-flex;
    align-items: baseline;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-1);
    font-size: 17px;
    font-weight: 700;
    transition: transform .2s ease;
}
.lang:hover { transform: translateY(-3px) rotate(-1deg); }
.lang small { font-size: 12px; color: var(--muted); font-weight: 600; }
.lang.native { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.lang.native small { color: color-mix(in srgb, var(--on-accent) 75%, transparent); }

/* ---------- 發行版 ---------- */
.distro-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 960px) { .distro-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.distro-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 20px;
    border-radius: var(--radius);
    background: var(--surface);
    border: 1px solid var(--line);
    color: var(--ink);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.distro-card:hover { color: var(--ink); transform: translateY(-3px); border-color: var(--accent); box-shadow: var(--shadow-2); }
.distro-card strong { font-size: 17px; }
.distro-card small { color: var(--muted); font-size: 13px; }
.distro-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-weight: 900; font-size: 16px; color: #fff; margin-bottom: 8px; }
.distro-mark.Ubuntu { background: #e95420; }
.distro-mark.Fedora { background: #3c6eb4; }
.distro-mark.Rocky { background: #10b981; }

/* ---------- 召喚行動 ---------- */
.cta-band {
    position: relative;
    overflow: hidden;
    padding: clamp(40px, 6vw, 72px);
    border-radius: 32px;
    background: var(--hero-grad);
    color: #fff;
    text-align: center;
    isolation: isolate;
}
.cta-band::before {
    content: "";
    position: absolute;
    z-index: -1;
    width: 360px;
    height: 360px;
    right: -100px;
    bottom: -160px;
    border-radius: 50%;
    background: #ffd166;
    filter: blur(70px);
    opacity: .5;
}
.cta-band h2 { color: #fff; font-size: clamp(28px, 4vw, 44px); letter-spacing: -.02em; }
.cta-band p { color: rgba(255, 255, 255, .88); font-size: 18px; max-width: 620px; margin: 0 auto 28px; }
.cta-band .hero-ctas { margin-top: 8px; }
.cta-cmd {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    max-width: 100%;
    margin-top: 28px;
    padding: 10px 10px 10px 18px;
    border-radius: 14px;
    background: rgba(10, 8, 30, .35);
    border: 1px solid rgba(255, 255, 255, .2);
    font-family: var(--mono);
    font-size: 14px;
    text-align: left;
}
.cta-cmd code { background: none; color: #fff; padding: 0; overflow-x: auto; white-space: nowrap; }

/* ---------- 子頁面的標題區 ---------- */
.page-hero {
    position: relative;
    padding: 88px 0 64px;
    overflow: hidden;
    isolation: isolate;
    border-bottom: 1px solid var(--line);
    background:
        radial-gradient(900px 380px at 85% -10%, color-mix(in srgb, var(--coral) 18%, transparent), transparent 70%),
        radial-gradient(800px 420px at 0% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%),
        var(--bg);
}
.page-hero h1 { font-size: clamp(36px, 5.6vw, 64px); letter-spacing: -.03em; margin-bottom: 18px; text-wrap: balance; }
.page-hero .lead { max-width: 760px; }
.page-hero .hero-ctas { justify-content: flex-start; margin-top: 28px; }
.page-hero.dark { background: var(--hero-grad); border-bottom: 0; color: #fff; }
.page-hero.dark h1 { color: #fff; }
.page-hero.dark .lead { color: rgba(255, 255, 255, .88); }
.page-hero.dark .eyebrow { color: #ffe08a; }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 48px; align-items: center; }
@media (max-width: 960px) { .page-hero-grid { grid-template-columns: minmax(0, 1fr); } }
.breadcrumb { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; color: var(--muted); margin-bottom: 18px; }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--accent); }

/* ---------- 功能列表 ---------- */
.feature-block { padding: 72px 0; border-top: 1px solid var(--line); }
.feature-block:first-of-type { border-top: 0; }
.feature-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 32px; margin: 24px 0 0; padding: 0; list-style: none; }
.feature-list li { position: relative; padding-left: 22px; color: var(--ink-2); }
.feature-list li::before { content: ""; position: absolute; left: 2px; top: .7em; width: 8px; height: 8px; border-radius: 3px; background: var(--accent); transform: rotate(45deg); }
.feature-list strong { color: var(--ink); }
@media (max-width: 720px) { .feature-list { grid-template-columns: minmax(0, 1fr); } }

.mini-nav {
    position: sticky;
    top: var(--header-h);
    z-index: 20;
    background: color-mix(in srgb, var(--bg) 88%, transparent);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.mini-nav .container { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; padding-top: 8px; padding-bottom: 8px; }
.mini-nav .container::-webkit-scrollbar { display: none; }
.mini-nav a { flex: none; padding: 7px 14px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 14px; }
.mini-nav a:hover { background: var(--bg-soft); color: var(--ink); }
.mini-nav a.active { background: var(--accent-soft); color: var(--accent-ink); }

.shortcut-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 40px; }
@media (max-width: 760px) { .shortcut-grid { grid-template-columns: minmax(0, 1fr); } }
.shortcut { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.shortcut span { color: var(--ink-2); }
.shortcut .keys { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }
.shortcut kbd { font-size: 13px; padding: 2px 8px; }

.limits { columns: 2; column-gap: 40px; }
.limits li { break-inside: avoid; margin-bottom: 10px; color: var(--ink-2); }
@media (max-width: 760px) { .limits { columns: 1; } }

.callout {
    display: flex;
    gap: 14px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--accent-soft);
    color: var(--ink);
    border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent);
}
.callout > .icon { width: 22px; height: 22px; color: var(--accent-ink); margin-top: 3px; }
.callout p { margin: 0; color: var(--ink-2); }
.callout p strong { color: var(--ink); }
.callout.warn { background: var(--warn-soft); border-color: color-mix(in srgb, var(--warn) 25%, transparent); }
.callout.warn > .icon { color: var(--warn); }

/* PDF 數位簽章狀態列示意 */
.sig-states { display: grid; gap: 10px; }
.sig-state { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; font-weight: 600; font-size: 15px; }
.sig-state .sig-dot { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none; }
.sig-state .sig-dot .icon { width: 13px; height: 13px; stroke-width: 3; }
.sig-state small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.sig-ok { background: #e3f6e8; color: #17572f; } .sig-ok .sig-dot { background: #2fb05a; }
.sig-warn { background: #fff3d6; color: #6b4600; } .sig-warn .sig-dot { background: #e0a100; }
.sig-bad { background: #ffe4e1; color: #7a1d1d; } .sig-bad .sig-dot { background: #e5484d; }
.sig-state small { color: inherit; opacity: .75; }

/* ---------- 計畫：時間軸 ---------- */
.timeline { position: relative; display: grid; gap: 0; max-width: 880px; margin: 0 auto; }
.timeline::before { content: ""; position: absolute; left: 87px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--accent), var(--coral)); opacity: .35; }
.tl-item { position: relative; display: grid; grid-template-columns: 70px 1fr; gap: 36px; padding: 14px 0; }
.tl-ver { text-align: right; font-weight: 800; font-family: var(--mono); font-size: 15px; color: var(--accent-ink); padding-top: 3px; }
.tl-ver a { color: inherit; }
.tl-item::before { content: ""; position: absolute; left: 81px; top: 22px; width: 14px; height: 14px; border-radius: 50%; background: var(--surface); border: 3px solid var(--accent); }
.tl-item.major::before { background: var(--pomelo); border-color: var(--pomelo-ink); width: 18px; height: 18px; left: 79px; top: 20px; }
.tl-body h3 { font-size: 18px; margin-bottom: 2px; }
.tl-body p { margin: 0; color: var(--ink-2); font-size: 15px; }
@media (max-width: 560px) {
    .timeline::before { left: 7px; }
    .tl-item { grid-template-columns: 1fr; gap: 2px; padding-left: 32px; }
    .tl-item::before { left: 1px; }
    .tl-item.major::before { left: -1px; }
    .tl-ver { text-align: left; }
}

.roadmap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 960px) { .roadmap { grid-template-columns: minmax(0, 1fr); } }
.road-col h3 { display: flex; align-items: center; gap: 10px; font-size: 18px; margin-bottom: 16px; }
.road-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.road-col li { padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); font-size: 15px; color: var(--ink-2); }
.road-col li strong { display: block; color: var(--ink); font-size: 15.5px; margin-bottom: 2px; }

.principles { counter-reset: p; }
.principle { position: relative; padding-top: 56px; }
.principle::before {
    counter-increment: p;
    content: "0" counter(p);
    position: absolute;
    top: 0;
    left: 0;
    font-size: 40px;
    font-weight: 900;
    font-family: var(--mono);
    line-height: 1;
    color: transparent;
    -webkit-text-stroke: 1.5px var(--accent);
    opacity: .7;
}

/* ---------- 更新紀錄 ---------- */
.cl-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; align-items: start; }
@media (max-width: 960px) { .cl-layout { grid-template-columns: minmax(0, 1fr); } .cl-side { position: static !important; } }
.cl-side { position: sticky; top: calc(var(--header-h) + 24px); }
.cl-search { position: relative; margin-bottom: 18px; }
.cl-search input {
    width: 100%;
    height: 42px;
    padding: 0 12px 0 38px;
    border-radius: 12px;
    border: 1px solid var(--line-strong);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 15px;
}
.cl-search input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cl-search .icon { position: absolute; left: 12px; top: 12px; width: 18px; height: 18px; color: var(--muted); }
.cl-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cl-filters .chip { font-size: 13px; padding: 5px 11px; }
.cl-filters .chip small { color: inherit; opacity: .6; margin-left: 2px; }
.cl-versions-nav { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 4px; }
.cl-versions-nav a { font-family: var(--mono); font-size: 13px; padding: 3px 8px; border-radius: 6px; color: var(--muted); }
.cl-versions-nav a:hover { background: var(--bg-soft); color: var(--ink); }

.cl-version { position: relative; display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 28px; padding: 36px 0; border-top: 1px solid var(--line); }
.cl-version:first-child { border-top: 0; padding-top: 0; }
.cl-version[hidden] { display: none; }
.cl-ver-head { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.cl-ver-num { font-family: var(--mono); font-weight: 800; font-size: 24px; color: var(--ink); }
.cl-ver-num a { color: inherit; }
.cl-ver-head .pill { margin-top: 6px; }
.cl-ver-head small { display: block; color: var(--muted); font-size: 13px; margin-top: 6px; }
@media (max-width: 640px) { .cl-version { grid-template-columns: minmax(0, 1fr); gap: 12px; } .cl-ver-head { position: static; } }

.cl-items { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.cl-items > li { position: relative; padding-left: 20px; }
.cl-items > li::before { content: ""; position: absolute; left: 0; top: .72em; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.cl-items > li[hidden], .cl-items li li[hidden] { display: none; }
.cl-items > li > p { margin: 0; font-weight: 600; color: var(--ink); }
.cl-items ul { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.cl-items ul li { position: relative; padding-left: 18px; color: var(--ink-2); font-size: 15.5px; }
.cl-items ul li::before { content: ""; position: absolute; left: 2px; top: .8em; width: 6px; height: 2px; background: var(--muted); }
.cl-items code { font-size: .86em; }
.cl-items kbd { font-size: .78em; }
.cl-after { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; font-weight: 400; }
.cl-code { margin: 10px 0 4px; padding: 12px 16px; border-radius: 12px; background: #16141f; display: grid; gap: 4px; overflow-x: auto; }
.cl-code div { display: flex; gap: 18px; white-space: nowrap; font-size: 13.5px; }
.cl-code code { background: none; color: #e9e6f5; padding: 0; }
.cl-code span { color: #9a96b0; }
mark.hit { background: color-mix(in srgb, var(--pomelo) 55%, transparent); color: inherit; border-radius: 3px; padding: 0 1px; }
.cl-empty { padding: 48px 0; text-align: center; color: var(--muted); }

/* ---------- 下載 ---------- */
.dl-tabs { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-bottom: 28px; }
@media (max-width: 900px) { .dl-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.dl-tab {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    padding: 16px;
    border-radius: var(--radius);
    border: 2px solid var(--line);
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
    transition: border-color .15s ease, box-shadow .15s ease;
}
.dl-tab:hover { border-color: var(--line-strong); }
.dl-tab[aria-selected="true"] { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.dl-tab strong { font-size: 16px; }
.dl-tab small { color: var(--muted); font-size: 13px; }
.dl-tab .distro-mark { width: 32px; height: 32px; border-radius: 10px; font-size: 13px; margin-bottom: 6px; }
.dl-tab .dl-avail { position: absolute; top: 14px; right: 14px; }
.dl-tab .detected { position: absolute; top: -10px; left: 12px; font-size: 11px; font-weight: 800; padding: 1px 8px; border-radius: 6px; background: var(--pomelo); color: #3d2a00; }

.dl-panel { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 24px; align-items: start; }
.dl-panel[hidden] { display: none; }
@media (max-width: 960px) { .dl-panel { grid-template-columns: minmax(0, 1fr); } }
.dl-main { padding: 32px; }
.dl-main h2 { font-size: 26px; margin-bottom: 4px; }
.dl-file { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; padding: 20px; margin: 22px 0; border-radius: var(--radius); background: var(--bg-soft); }
.dl-file .file-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 14px; background: var(--accent); color: var(--on-accent); flex: none; }
.dl-file .file-icon .icon { width: 26px; height: 26px; }
.dl-file .file-meta { flex: 1; min-width: 200px; }
.dl-file .file-meta strong { display: block; font-family: var(--mono); font-size: 14.5px; overflow-wrap: anywhere; }
.dl-file .file-meta small { color: var(--muted); }
.sha { display: flex; align-items: center; gap: 8px; margin-top: 4px; font-size: 13px; color: var(--muted); }
.sha code { font-size: 12px; background: none; padding: 0; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; }
.steps > li { position: relative; padding-left: 44px; }
.steps > li::before {
    counter-increment: step;
    content: counter(step);
    position: absolute;
    left: 0;
    top: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--accent-soft);
    color: var(--accent-ink);
    font-weight: 800;
    font-size: 14px;
}
.steps h4 { margin: 2px 0 6px; font-size: 16px; }
.steps p { color: var(--ink-2); font-size: 15px; margin-bottom: 8px; }

.cmd {
    position: relative;
    margin: 8px 0 0;
    border-radius: 14px;
    background: #16141f;
    color: #e9e6f5;
    font-family: var(--mono);
    font-size: 14px;
    line-height: 1.7;
    overflow: hidden;
}
.cmd-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: #211e2d; }
.cmd-bar i { width: 10px; height: 10px; border-radius: 50%; background: #ff5f57; }
.cmd-bar i:nth-child(2) { background: #febc2e; }
.cmd-bar i:nth-child(3) { background: #28c840; }
.cmd-bar span { margin-left: 8px; font-family: var(--font); font-size: 12px; color: #9a96b0; }
.cmd pre { margin: 0; padding: 14px 16px; background: none; border-radius: 0; font-size: 14px; }
.cmd .prompt { color: #8f88ff; user-select: none; }
.cmd .comment { color: #8a86a0; }
.copy-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, .14);
    background: rgba(255, 255, 255, .06);
    color: #d6d3e6;
    font: 600 12px/1.4 var(--font);
    cursor: pointer;
}
.copy-btn:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.copy-btn .icon { width: 14px; height: 14px; }
.copy-btn.copied { color: #7ee2a0; border-color: rgba(126, 226, 160, .4); }
.copy-inline { position: static; padding: 3px 8px; border-color: var(--line-strong); background: var(--surface); color: var(--ink-2); }
.copy-inline:hover { background: var(--bg-soft); color: var(--ink); }

.dl-side { display: grid; gap: 16px; }
.dl-side .card { padding: 22px; }
.dl-side h3 { font-size: 16px; display: flex; align-items: center; gap: 8px; }
.dl-side ul { margin: 0; padding-left: 1.1em; color: var(--ink-2); font-size: 15px; }
.dl-side li { margin-bottom: 4px; }

.pkg-details { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 18px; }
.pkg-details summary { cursor: pointer; font-weight: 700; display: flex; align-items: center; gap: 8px; list-style: none; }
.pkg-details summary::-webkit-details-marker { display: none; }
.pkg-details summary .icon { transition: transform .2s ease; }
.pkg-details[open] summary .icon { transform: rotate(180deg); }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--line); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th, td { padding: 9px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--bg-soft); font-weight: 700; font-size: 13.5px; color: var(--ink-2); white-space: nowrap; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
td code { font-size: 13px; }

.unavailable { text-align: center; padding: 40px 24px; }
.unavailable .card-icon { margin: 0 auto 16px; }

/* ---------- 手冊與文件 ---------- */
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 56px; align-items: start; padding: 48px 0 96px; }
@media (max-width: 1020px) { .doc-layout { grid-template-columns: minmax(0, 1fr); gap: 24px; } }
.toc { position: sticky; top: calc(var(--header-h) + 24px); max-height: calc(100vh - var(--header-h) - 48px); overflow-y: auto; padding-right: 8px; font-size: 14.5px; }
.toc h2 { font-size: 13px; letter-spacing: .08em; color: var(--muted); margin-bottom: 10px; }
.toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.toc li a { display: block; padding: 5px 12px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink-2); line-height: 1.45; }
.toc li a:hover { color: var(--ink); }
.toc li a.active { border-left-color: var(--accent); color: var(--accent-ink); font-weight: 700; }
.toc li.l3 a { padding-left: 26px; font-size: 13.5px; }
.toc-tools { margin-top: 20px; display: grid; gap: 8px; }
.toc-tools .btn { justify-content: flex-start; }
@media (max-width: 1020px) {
    .toc { position: static; max-height: none; padding: 16px 18px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
    .toc ol { columns: 2; column-gap: 24px; border-left: 0; }
    .toc li { break-inside: avoid; }
    .toc li a { border-left: 0; padding: 4px 0; }
    .toc li.l3 { display: none; }
}
@media (max-width: 560px) { .toc ol { columns: 1; } }

.distro-switch { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.distro-switch a { display: inline-flex; align-items: center; gap: 8px; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); font-weight: 600; font-size: 14px; }
.distro-switch a:hover { border-color: var(--accent); color: var(--accent-ink); }
.distro-switch a.active { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }

.prose { font-size: 17px; line-height: 1.85; color: var(--ink-2); min-width: 0; }
.prose > :first-child { margin-top: 0; }
.prose h2 { font-size: 28px; margin: 2.2em 0 .7em; padding-top: .4em; color: var(--ink); scroll-margin-top: calc(var(--header-h) + 20px); }
.prose h3 { font-size: 21px; margin: 1.8em 0 .6em; color: var(--ink); }
.prose h4 { font-size: 18px; margin: 1.5em 0 .5em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: .3em 0; }
.prose li > ul, .prose li > ol { margin: .3em 0; }
.prose strong { color: var(--ink); }
.prose a { text-decoration: underline; text-decoration-color: color-mix(in srgb, var(--accent) 40%, transparent); text-underline-offset: 3px; }
.prose hr { border: 0; height: 1px; background: var(--line); margin: 2.4em 0; }
.prose figure { margin: 1.6em 0 2em; }
.prose figure img, .prose p > img {
    border-radius: 12px;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    background: var(--surface);
    cursor: zoom-in;
    margin: 0 auto;
}
.prose p > img { display: inline-block; max-width: calc(50% - 10px); margin: 4px; vertical-align: top; }
.prose figcaption { text-align: center; color: var(--muted); font-size: 14.5px; margin-top: 12px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 4px solid var(--warn); background: var(--warn-soft); border-radius: 0 12px 12px 0; color: var(--ink); }
.prose blockquote p:last-child { margin-bottom: 0; }
.prose pre { position: relative; }
.prose table { font-size: 15px; }
.prose .table-wrap { margin: 1.2em 0 1.6em; }
@media (max-width: 640px) { .prose { font-size: 16px; } .prose h2 { font-size: 24px; } .prose p > img { max-width: 100%; } }

.doc-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); font-size: 14px; }
.doc-others { margin-top: 64px; padding-top: 32px; border-top: 1px solid var(--line); }

/* ---------- 燈箱 ---------- */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: grid;
    place-items: center;
    padding: 56px 16px 24px;
    background: rgba(8, 6, 18, .86);
    backdrop-filter: blur(6px);
    animation: fadeIn .2s ease;
    cursor: zoom-out;
}
.lightbox[hidden] { display: none; }
.lightbox figure { margin: 0; max-width: min(1400px, 100%); }
.lightbox img { max-height: calc(100vh - 120px); width: auto; margin: 0 auto; border-radius: 10px; box-shadow: var(--shadow-3); }
.lightbox figcaption { color: #d8d5e6; text-align: center; margin-top: 12px; font-size: 15px; }
.lightbox-close { position: absolute; top: 12px; right: 12px; color: #fff; background: rgba(255, 255, 255, .1); }
.lightbox-close:hover { background: rgba(255, 255, 255, .2); color: #fff; }

/* ---------- 頁尾 ---------- */
.site-footer { background: var(--bg-sunken); border-top: 1px solid var(--line); padding: 64px 0 32px; font-size: 15px; }
.footer-top { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2.2fr); gap: 48px; }
.footer-brand p { color: var(--muted); margin-top: 14px; }
.footer-version { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink-2) !important; }
.footer-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.footer-cols h3 { font-size: 13px; letter-spacing: .08em; color: var(--muted); margin-bottom: 12px; }
.footer-cols a { display: flex; align-items: center; gap: 6px; padding: 4px 0; color: var(--ink-2); }
.footer-cols a:hover { color: var(--accent); }
.footer-cols .icon { width: 14px; height: 14px; }
.footer-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; font-size: 13.5px; color: var(--muted); }
.footer-bottom p { margin: 0; }
@media (max-width: 860px) {
    .footer-top { grid-template-columns: minmax(0, 1fr); }
    .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ---------- 捲動時淡入 ---------- */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.js .reveal.in { opacity: 1; transform: none; }
.reveal-d1 { transition-delay: .08s; }
.reveal-d2 { transition-delay: .16s; }
.reveal-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
    .js .reveal { opacity: 1; transform: none; }
}

@media print {
    .site-header, .site-footer, .toc, .mini-nav, .copy-btn, .lightbox { display: none !important; }
    .doc-layout { display: block; padding: 0; }
    body { background: #fff; color: #000; }
}

/* ---------- 小柚：架構圖 ---------- */
.arch { display: grid; gap: 0; margin-top: 18px; }
.arch-box { padding: 14px 16px; border-radius: 14px; background: var(--bg-soft); border: 1px solid var(--line); }
.arch-box strong { display: block; font-family: var(--mono); font-size: 14.5px; color: var(--ink); }
.arch-box small { color: var(--muted); font-size: 13.5px; }
.arch-box.accent { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent) 30%, transparent); }
.arch-arrow { position: relative; padding: 10px 0 10px 34px; font-size: 13px; color: var(--muted); }
.arch-arrow::before { content: ""; position: absolute; left: 20px; top: 0; bottom: 0; width: 2px; background: var(--line-strong); }
.arch-arrow::after { content: ""; position: absolute; left: 16px; bottom: 0; border: 5px solid transparent; border-top-color: var(--line-strong); border-bottom: 0; }
.hero-robot { filter: drop-shadow(0 30px 40px rgba(10, 0, 40, .35)); }
.page-hero.dark .robot-shadow { fill: #000; }
.faq { display: grid; gap: 4px; }
.faq-item { margin-top: 0; padding: 18px 4px; }
.faq-item summary { font-size: 17px; }
.stats.no-overlap { margin-top: 0; }
@media (max-width: 960px) { .stats[style*="repeat(4"] { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 860px) { #source .dl-main { grid-template-columns: minmax(0, 1fr) !important; } }
.bars-compact { gap: 12px; }
.bars-compact .bar-row { grid-template-columns: 110px minmax(0, 1fr); }
.bars-compact .bar { height: 14px; }
.bars-compact .bar-label { font-size: 13.5px; }
.copy-inline { flex: none; white-space: nowrap; }
.steps > li, .dl-main, .dl-side, .tour-caption, .split > * { min-width: 0; }
.sha { min-width: 0; }
.sha code { flex: 1; min-width: 0; }
.stack { grid-template-columns: minmax(0, 1fr); }
.stack-layer > * { min-width: 0; }
.stack-size small { white-space: normal; max-width: 280px; margin-left: auto; }
@media (max-width: 860px) {
    .stack-size small { display: none; }
    .stack-layer { padding: 16px; }
    .stack-pkg { font-size: 12px; }
    .stack-total strong { font-size: 22px; }
}
@media (max-width: 640px) {
    .hotspot { width: 22px; height: 22px; margin: -11px 0 0 -11px; font-size: 11px; line-height: 22px; }
    .hotspot::after { inset: -3px; }
}

/* ---------- 語言 ---------- */
:lang(ja) { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo", sans-serif; }
:lang(ko) { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif; }
:lang(zh-Hans) { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Noto Sans SC", "Noto Sans CJK SC", "Microsoft YaHei", sans-serif; }
:lang(th) { --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans Thai", "Leelawadee UI", "Thonburi", "Noto Sans TC", sans-serif; }
html:lang(ja) body, html:lang(ko) body, html:lang(zh-Hans) body, html:lang(th) body { font-family: var(--font); }
[lang="zh-Hant"] { font-family: "PingFang TC", "Noto Sans TC", "Noto Sans CJK TC", "Microsoft JhengHei", sans-serif; }
html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .hero h1 { letter-spacing: -.035em; }
html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .hero h1 { font-size: clamp(36px, 6.2vw, 76px); }

.lang-menu { position: relative; }
.lang-menu summary { list-style: none; width: auto; padding: 0 10px; gap: 6px; display: inline-flex; align-items: center; cursor: pointer; }
.lang-menu summary::-webkit-details-marker { display: none; }
.lang-current { font-size: 14px; font-weight: 600; white-space: nowrap; }
.lang-list {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    z-index: 60;
    width: 230px;
    max-height: min(70vh, 520px);
    overflow-y: auto;
    padding: 6px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-2);
    display: grid;
}
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 12px; border-radius: 9px; color: var(--ink-2); font-size: 15px; }
.lang-list a:hover { background: var(--bg-soft); color: var(--ink); }
.lang-list a.active { color: var(--accent-ink); font-weight: 700; background: var(--accent-soft); }
.lang-list .icon { width: 16px; height: 16px; }
@media (max-width: 1180px) { .lang-current { display: none; } .lang-menu summary { padding: 0; width: 40px; justify-content: center; } }

.lang-suggest { background: var(--accent-soft); border-bottom: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); font-size: 14.5px; position: relative; z-index: 51; }
.lang-suggest[hidden] { display: none; }
.lang-suggest .container { display: flex; align-items: center; gap: 12px; min-height: 48px; padding-top: 6px; padding-bottom: 6px; flex-wrap: wrap; }
.lang-suggest span { flex: 1; min-width: 180px; color: var(--ink); }
.lang-suggest .icon-btn { width: 32px; height: 32px; }

.lang-cloud a.lang { color: var(--ink); }
.lang-cloud a.lang:hover { color: var(--accent-ink); border-color: var(--accent); }
.lang-cloud a.lang.native { color: var(--on-accent); }

.zh-only-note { margin-bottom: 28px; }

/* 外文比較長：導覽列提早收成選單 */
@media (max-width: 1120px) {
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .nav-toggle { display: inline-grid; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .header-download { display: none; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .main-nav {
        position: fixed; inset: var(--header-h) 0 auto 0; flex-direction: column; align-items: stretch; gap: 2px;
        padding: 12px var(--gutter) 20px; background: var(--bg); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2);
        transform: translateY(-8px); opacity: 0; visibility: hidden; transition: opacity .18s ease, transform .18s ease, visibility .18s;
    }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .main-nav a { padding: 12px 14px; font-size: 17px; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .main-nav .nav-download { display: inline-flex; margin-top: 10px; min-height: 48px; font-size: 16px; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .header-actions { margin-left: auto; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) body.nav-open .main-nav { transform: none; opacity: 1; visibility: visible; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) .nav-close-icon { display: none; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) body.nav-open .nav-open-icon { display: none; }
    html:not(:lang(zh)):not(:lang(ja)):not(:lang(ko)) body.nav-open .nav-close-icon { display: inline-block; }
}
