/* ============================================================
   HamKit 设计系统（唯一入口）
   —— 首页 / 登录页 / 用户中心 / 管理后台共用
   扩展自原站点视觉：午夜深空 + 大气蓝 + 玻璃卡片 + 鸿蒙字体
   ============================================================ */

/* ---------- 设计令牌 ---------- */
:root {
    /* 颜色 */
    --bg-base: #0B0E14;
    --bg-elevated: #11151D;
    --bg-sunken: #080A0F;
    --bg-card: rgba(22, 27, 34, 0.62);
    --bg-card-hover: rgba(30, 36, 46, 0.82);
    --bg-input: rgba(8, 10, 15, 0.6);

    --text-primary: #E6EDF3;
    --text-secondary: #B1BAC4;
    --text-tertiary: #7D8590;
    --text-muted: #4A5159;

    --border: rgba(255, 255, 255, 0.06);
    --border-strong: rgba(255, 255, 255, 0.12);
    --border-focus: rgba(77, 143, 255, 0.55);

    --accent: #4D8FFF;
    --accent-bright: #6BA3FF;
    --accent-dim: #2F5FA8;
    --accent-glow: rgba(77, 143, 255, 0.4);
    --accent-soft: rgba(77, 143, 255, 0.12);

    --success: #3FB950;
    --success-soft: rgba(63, 185, 80, 0.13);
    --warning: #E8B34C;
    --warning-soft: rgba(232, 179, 76, 0.13);
    --danger: #F85149;
    --danger-soft: rgba(248, 81, 73, 0.13);
    --info: #5AC8C8;
    --info-soft: rgba(90, 200, 200, 0.13);
    --violet: #6B5DD3;

    /* 字体 */
    --font-sans: 'HarmonyOS Sans SC', 'HarmonyOS Sans', 'PingFang SC',
                 'Microsoft YaHei', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', 'Cascadia Code', 'SFMono-Regular', Consolas,
                 'Liberation Mono', monospace;

    /* 圆角 / 阴影 */
    --radius-xs: 6px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow-md: 0 8px 24px -8px rgba(0, 0, 0, 0.5);
    --shadow-lg: 0 24px 60px -20px rgba(0, 0, 0, 0.7);
    --shadow-accent: 0 8px 24px -8px var(--accent-glow);

    /* 布局 */
    --container: 1200px;
    --container-narrow: 760px;
    --nav-height: 60px;
    --sidebar-width: 232px;

    /* 层级 */
    --z-nav: 40;
    --z-drawer: 50;
    --z-modal: 60;
    --z-toast: 80;
}

@media (prefers-color-scheme: light) {
    :root {
        --bg-base: #F7F8FA;
        --bg-elevated: #FFFFFF;
        --bg-sunken: #EEF0F4;
        --bg-card: rgba(255, 255, 255, 0.78);
        --bg-card-hover: rgba(255, 255, 255, 0.96);
        --bg-input: rgba(255, 255, 255, 0.9);

        --text-primary: #1F2328;
        --text-secondary: #424A53;
        --text-tertiary: #636C76;
        --text-muted: #848D97;

        --border: rgba(0, 0, 0, 0.08);
        --border-strong: rgba(0, 0, 0, 0.15);
        --border-focus: rgba(45, 107, 255, 0.5);

        --accent: #2D6BFF;
        --accent-bright: #1A56E0;
        --accent-dim: #7AA2FF;
        --accent-glow: rgba(45, 107, 255, 0.22);
        --accent-soft: rgba(45, 107, 255, 0.08);

        --success: #1A7F37;
        --warning: #B7791F;
        --danger: #CF222E;
        --info: #0F7A7A;
        --shadow-sm: 0 1px 3px rgba(16, 24, 40, 0.08);
        --shadow-md: 0 8px 24px -12px rgba(16, 24, 40, 0.18);
        --shadow-lg: 0 24px 60px -24px rgba(16, 24, 40, 0.24);
    }
}

/* ---------- 重置 ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-base);
    color: var(--text-primary);
    font-family: var(--font-sans);
    font-size: 15px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; transition: color 0.18s; }
ul, ol { margin: 0; padding: 0; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: -0.02em; }
p { margin: 0; }
button, input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
code, kbd, pre { font-family: var(--font-mono); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
::selection { background: var(--accent-glow); }

/* 细滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
    background: var(--border-strong);
    border-radius: 100px;
    border: 2px solid transparent;
    background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); background-clip: content-box; }

/* ---------- 工具类 ---------- */
.u-hidden { display: none !important; }
.u-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;
}
.u-mono { font-family: var(--font-mono); }
.u-muted { color: var(--text-tertiary); }
.u-dim { color: var(--text-muted); }
.u-center { text-align: center; }
.u-nowrap { white-space: nowrap; }
.u-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.u-row { display: flex; align-items: center; gap: 10px; }
.u-row--between { justify-content: space-between; }
.u-wrap { flex-wrap: wrap; }
.u-grow { flex: 1; min-width: 0; }
.u-stack { display: flex; flex-direction: column; gap: 14px; }
.u-stack--sm { gap: 8px; }
.u-mt { margin-top: 16px; }
.u-mt-lg { margin-top: 28px; }
.u-mb { margin-bottom: 16px; }
.u-hide-sm { display: initial; }

/* ---------- 布局容器 ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 32px;
    width: 100%;
}
.container--narrow { max-width: var(--container-narrow); }

/* 背景光晕（首页/登录页复用） */
.aurora {
    position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden;
}
.aurora__blob {
    position: absolute; border-radius: 50%; filter: blur(120px); opacity: 0.4;
    animation: drift 18s ease-in-out infinite;
}
@media (prefers-color-scheme: light) { .aurora__blob { opacity: 0.22; } }
.aurora__blob--1 { width: 600px; height: 600px; background: radial-gradient(circle, #4D8FFF 0%, transparent 70%); top: -200px; left: -100px; }
.aurora__blob--2 { width: 500px; height: 500px; background: radial-gradient(circle, #5AC8C8 0%, transparent 70%); top: 30%; right: -150px; animation-delay: -6s; }
.aurora__blob--3 { width: 450px; height: 450px; background: radial-gradient(circle, #6B5DD3 0%, transparent 70%); bottom: -100px; left: 30%; animation-delay: -12s; }
@keyframes drift {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(40px, -30px) scale(1.05); }
    66% { transform: translate(-30px, 30px) scale(0.96); }
}

/* ---------- 顶部导航（全站共用） ---------- */
.nav {
    position: relative; z-index: var(--z-nav);
    max-width: var(--container); margin: 0 auto;
    padding: 18px 32px;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav--sticky {
    position: sticky; top: 0;
    max-width: none;
    padding: 12px 32px;
    background: color-mix(in srgb, var(--bg-base) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
}
.nav--sticky > .nav__inner {
    max-width: var(--container); margin: 0 auto; width: 100%;
    display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.nav__brand {
    display: flex; align-items: center; gap: 10px;
    font-size: 16px; font-weight: 600; letter-spacing: -0.02em;
}
.nav__dot {
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--accent); box-shadow: 0 0 12px var(--accent-glow);
    flex-shrink: 0;
}
.nav__links { display: flex; gap: 28px; font-size: 14px; color: var(--text-secondary); }
.nav__links a:hover { color: var(--text-primary); }
.nav__links a.is-active { color: var(--text-primary); }
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__toggle {
    display: none; background: none; border: 1px solid var(--border-strong);
    color: var(--text-secondary); border-radius: var(--radius-sm);
    width: 36px; height: 36px; cursor: pointer; font-size: 16px; line-height: 1;
}

/* 用户胶囊 */
.user-chip {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--border-strong); border-radius: 100px;
    font-size: 13px; color: var(--text-secondary);
    transition: all 0.18s;
}
.user-chip:hover { border-color: var(--accent); color: var(--text-primary); background: var(--accent-soft); }
.user-chip__avatar {
    width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
    background: var(--accent-soft); flex-shrink: 0;
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 600; color: var(--accent-bright);
}
.user-chip__role {
    font-size: 10px; padding: 1px 6px; border-radius: 100px;
    background: var(--accent-soft); color: var(--accent-bright);
    text-transform: uppercase; letter-spacing: 0.04em;
}

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 40px; padding: 0 18px;
    font-size: 14px; font-weight: 500;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    background: transparent;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.18s, border-color 0.18s, transform 0.12s, color 0.18s, box-shadow 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn[aria-disabled='true'] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn--primary { background: var(--accent); color: #fff; box-shadow: var(--shadow-accent); }
.btn--primary:hover:not(:disabled) { background: var(--accent-bright); }
.btn--ghost {
    background: var(--bg-card); color: var(--text-primary);
    border-color: var(--border-strong);
}
.btn--ghost:hover:not(:disabled) { background: var(--bg-card-hover); border-color: var(--text-muted); }
.btn--subtle { background: transparent; color: var(--text-secondary); border-color: transparent; }
.btn--subtle:hover:not(:disabled) { background: var(--bg-card-hover); color: var(--text-primary); }
.btn--danger { background: var(--danger-soft); color: var(--danger); border-color: rgba(248, 81, 73, 0.35); }
.btn--danger:hover:not(:disabled) { background: var(--danger); color: #fff; }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: var(--radius-xs); }
.btn--lg { height: 46px; padding: 0 26px; font-size: 15px; }
.btn--block { width: 100%; }
.btn--icon { width: 36px; height: 36px; padding: 0; }
.btn__spinner {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid currentColor; border-right-color: transparent;
    animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field__label {
    font-size: 12.5px; font-weight: 500; color: var(--text-secondary);
    display: flex; align-items: center; gap: 6px;
}
.field__label .req { color: var(--danger); }
.field__hint { font-size: 12px; color: var(--text-muted); line-height: 1.5; }
.field__error { font-size: 12px; color: var(--danger); }
.input, .textarea, .select {
    width: 100%;
    background: var(--bg-input);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius-sm);
    padding: 9px 12px;
    font-size: 14px;
    color: var(--text-primary);
    transition: border-color 0.18s, box-shadow 0.18s;
}
.input::placeholder, .textarea::placeholder { color: var(--text-muted); }
.input:focus, .textarea:focus, .select:focus {
    outline: none; border-color: var(--border-focus);
    box-shadow: 0 0 0 3px var(--accent-soft);
}
.input:disabled, .textarea:disabled, .select:disabled { opacity: 0.55; cursor: not-allowed; }
.textarea { min-height: 120px; resize: vertical; line-height: 1.6; }
.textarea--mono { font-family: var(--font-mono); font-size: 13px; }
.select { appearance: none; padding-right: 32px;
    background-image: linear-gradient(45deg, transparent 50%, var(--text-tertiary) 50%), linear-gradient(135deg, var(--text-tertiary) 50%, transparent 50%);
    background-position: calc(100% - 16px) 50%, calc(100% - 11px) 50%;
    background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
}
.input--invalid, .textarea--invalid { border-color: var(--danger); }
.switch { display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch__track {
    width: 38px; height: 22px; border-radius: 100px;
    background: var(--border-strong); position: relative; transition: background 0.2s;
    flex-shrink: 0;
}
.switch__track::after {
    content: ''; position: absolute; top: 3px; left: 3px;
    width: 16px; height: 16px; border-radius: 50%; background: #fff;
    transition: transform 0.2s;
}
.switch input:checked + .switch__track { background: var(--accent); }
.switch input:checked + .switch__track::after { transform: translateX(16px); }
.switch__label { font-size: 13px; color: var(--text-secondary); }

/* ---------- 卡片 ---------- */
.card {
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color 0.25s, background 0.25s, transform 0.25s;
}
.card--flush { padding: 0; overflow: hidden; }
.card--hover:hover { border-color: var(--border-strong); background: var(--bg-card-hover); transform: translateY(-2px); }
.card__head {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 16px; margin-bottom: 18px;
}
.card__head--bordered { padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.card__title { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card__desc { font-size: 13px; color: var(--text-tertiary); margin-top: 4px; line-height: 1.6; }
.card__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

/* 分区标题 */
.section { padding: 72px 0; position: relative; z-index: 1; }
.section__head {
    display: flex; flex-direction: column; gap: 14px; align-items: center;
    text-align: center; max-width: 720px; margin: 0 auto 48px;
}
.section__tag {
    display: inline-block; padding: 4px 12px;
    border: 1px solid var(--border-strong); border-radius: 100px;
    font-size: 11px; letter-spacing: 0.1em; color: var(--accent-bright);
    background: var(--accent-soft); text-transform: uppercase;
}
.section__title {
    font-size: clamp(28px, 3.6vw, 42px); line-height: 1.15;
    background: linear-gradient(180deg, #FFFFFF 0%, #B1BAC4 100%);
    -webkit-background-clip: text; background-clip: text;
    -webkit-text-fill-color: transparent;
}
@media (prefers-color-scheme: light) {
    .section__title, .hero__title { background: linear-gradient(180deg, #1F2328 0%, #424A53 100%);
        -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
}
.section__desc { font-size: 15px; color: var(--text-tertiary); line-height: 1.7; }

/* ---------- 徽标 / 标签 ---------- */
.badge {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 2px 9px; border-radius: 100px;
    font-size: 11px; font-weight: 500; letter-spacing: 0.01em;
    border: 1px solid var(--border-strong); color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.03);
    white-space: nowrap;
}
.badge--accent { color: var(--accent-bright); border-color: rgba(77, 143, 255, 0.4); background: var(--accent-soft); }
.badge--success { color: var(--success); border-color: rgba(63, 185, 80, 0.4); background: var(--success-soft); }
.badge--warning { color: var(--warning); border-color: rgba(232, 179, 76, 0.4); background: var(--warning-soft); }
.badge--danger { color: var(--danger); border-color: rgba(248, 81, 73, 0.4); background: var(--danger-soft); }
.badge--info { color: var(--info); border-color: rgba(90, 200, 200, 0.4); background: var(--info-soft); }
.badge--muted { color: var(--text-muted); }
.badge--dot::before {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: currentColor; flex-shrink: 0;
}
.tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
    padding: 3px 10px; border: 1px solid var(--border); border-radius: 100px;
    font-size: 11px; color: var(--text-tertiary); background: rgba(255, 255, 255, 0.02);
}

/* 角色徽标 */
.role-admin { color: var(--danger); border-color: rgba(248, 81, 73, 0.4); background: var(--danger-soft); }
.role-editor { color: var(--accent-bright); border-color: rgba(77, 143, 255, 0.4); background: var(--accent-soft); }
.role-viewer { color: var(--text-secondary); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th {
    text-align: left; font-weight: 500; font-size: 12px;
    color: var(--text-tertiary); text-transform: uppercase; letter-spacing: 0.05em;
    padding: 10px 14px; border-bottom: 1px solid var(--border-strong);
    white-space: nowrap; background: rgba(255, 255, 255, 0.015);
}
.table td { padding: 12px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: var(--bg-card-hover); }
.table tbody tr:last-child td { border-bottom: none; }
.table__actions { display: flex; gap: 6px; justify-content: flex-end; }
.table__empty { padding: 40px; text-align: center; color: var(--text-tertiary); font-size: 13.5px; }

/* ---------- 统计卡 ---------- */
.stat-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px;
}
.stat {
    padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius-md);
    background: var(--bg-card); display: flex; flex-direction: column; gap: 6px;
    position: relative; overflow: hidden;
}
.stat::after {
    content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
    background: var(--accent); opacity: 0.7;
}
.stat--success::after { background: var(--success); }
.stat--warning::after { background: var(--warning); }
.stat--info::after { background: var(--info); }
.stat__label { font-size: 12px; color: var(--text-tertiary); display: flex; align-items: center; gap: 6px; }
.stat__value { font-size: 26px; font-weight: 600; font-family: var(--font-mono); letter-spacing: -0.02em; line-height: 1.1; }
.stat__sub { font-size: 12px; color: var(--text-muted); }

/* ---------- 提示条 ---------- */
.alert {
    display: flex; gap: 12px; align-items: flex-start;
    padding: 14px 16px; border-radius: var(--radius-md);
    border: 1px solid var(--border-strong); font-size: 13.5px; line-height: 1.6;
    background: var(--bg-card);
}
.alert__icon { flex-shrink: 0; font-size: 15px; line-height: 1.4; }
.alert__body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.alert__title { font-weight: 600; font-size: 13.5px; }
.alert--info { border-color: rgba(90, 200, 200, 0.35); background: var(--info-soft); }
.alert--success { border-color: rgba(63, 185, 80, 0.35); background: var(--success-soft); }
.alert--warning { border-color: rgba(232, 179, 76, 0.35); background: var(--warning-soft); }
.alert--danger { border-color: rgba(248, 81, 73, 0.35); background: var(--danger-soft); }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed; inset: 0; z-index: var(--z-modal);
    display: none; align-items: center; justify-content: center; padding: 24px;
    background: rgba(4, 6, 10, 0.72);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.modal.is-open { display: flex; }
.modal__panel {
    width: 100%; max-width: 620px; max-height: 88vh;
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    display: flex; flex-direction: column; overflow: hidden;
    animation: modal-in 0.18s ease-out;
}
.modal__panel--wide { max-width: 820px; }
@keyframes modal-in { from { opacity: 0; transform: translateY(8px) scale(0.99); } to { opacity: 1; transform: none; } }
.modal__head {
    display: flex; align-items: center; justify-content: space-between; gap: 16px;
    padding: 18px 22px; border-bottom: 1px solid var(--border);
}
.modal__title { font-size: 16px; font-weight: 600; }
.modal__close {
    background: none; border: none; color: var(--text-tertiary); cursor: pointer;
    font-size: 20px; line-height: 1; padding: 4px 8px; border-radius: var(--radius-xs);
}
.modal__close:hover { background: var(--bg-card-hover); color: var(--text-primary); }
.modal__body { padding: 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; }
.modal__foot {
    padding: 16px 22px; border-top: 1px solid var(--border);
    display: flex; justify-content: flex-end; gap: 10px; background: rgba(255, 255, 255, 0.015);
}
.modal__foot--between { justify-content: space-between; }

/* ---------- 轻提示 ---------- */
.toast-host {
    position: fixed; right: 20px; bottom: 20px; z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: 10px; align-items: flex-end;
    pointer-events: none; max-width: min(420px, calc(100vw - 40px));
}
.toast {
    pointer-events: auto;
    display: flex; gap: 10px; align-items: flex-start;
    padding: 12px 16px; border-radius: var(--radius-md);
    background: var(--bg-elevated); border: 1px solid var(--border-strong);
    box-shadow: var(--shadow-md); font-size: 13.5px; line-height: 1.55;
    animation: toast-in 0.2s ease-out;
}
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.toast.is-leaving { opacity: 0; transform: translateY(6px); transition: all 0.2s; }
.toast--success { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--warning { border-left: 3px solid var(--warning); }
.toast--info { border-left: 3px solid var(--accent); }
.toast__icon { flex-shrink: 0; }
.toast__body { min-width: 0; }
.toast__title { font-weight: 600; }
.toast__text { color: var(--text-secondary); word-break: break-word; }
.toast__close {
    background: none; border: none; color: var(--text-muted); cursor: pointer;
    font-size: 15px; line-height: 1; padding: 0 2px; margin-left: auto;
}

/* ---------- 加载 / 空态 ---------- */
.skeleton {
    background: linear-gradient(90deg, var(--border) 25%, var(--border-strong) 37%, var(--border) 63%);
    background-size: 400% 100%;
    animation: skeleton 1.4s ease infinite;
    border-radius: var(--radius-xs);
    min-height: 12px;
}
@keyframes skeleton { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }
.empty {
    display: flex; flex-direction: column; align-items: center; gap: 10px;
    padding: 48px 24px; text-align: center; color: var(--text-tertiary);
}
.empty__icon { font-size: 28px; opacity: 0.6; }
.empty__title { font-size: 15px; font-weight: 600; color: var(--text-secondary); }
.empty__text { font-size: 13px; max-width: 420px; line-height: 1.6; }
.loading-line {
    display: flex; align-items: center; gap: 10px;
    color: var(--text-tertiary); font-size: 13px; padding: 20px 0;
}

/* ---------- 分段控件 / 页签 ---------- */
.tabs {
    display: flex; gap: 4px; padding: 4px;
    background: var(--bg-input); border: 1px solid var(--border);
    border-radius: var(--radius-md); overflow-x: auto;
}
.tab {
    padding: 7px 14px; border-radius: var(--radius-sm); border: none;
    background: transparent; color: var(--text-tertiary); cursor: pointer;
    font-size: 13px; white-space: nowrap; transition: all 0.18s;
}
.tab:hover { color: var(--text-primary); }
.tab.is-active { background: var(--bg-card-hover); color: var(--text-primary); box-shadow: var(--shadow-sm); }

/* ---------- Markdown 渲染 ---------- */
.md { font-size: 14px; line-height: 1.75; color: var(--text-secondary); }
.md > *:first-child { margin-top: 0; }
.md > *:last-child { margin-bottom: 0; }
.md h1, .md h2, .md h3, .md h4 { color: var(--text-primary); margin: 22px 0 10px; line-height: 1.3; }
.md h1 { font-size: 22px; }
.md h2 { font-size: 18px; }
.md h3 { font-size: 16px; }
.md p { margin: 10px 0; }
.md a { color: var(--accent-bright); text-decoration: underline; text-underline-offset: 2px; }
.md a:hover { color: var(--accent); }
.md ul, .md ol { margin: 10px 0; padding-left: 22px; }
.md li { margin: 4px 0; }
.md ul { list-style: disc; }
.md ol { list-style: decimal; }
.md code {
    background: var(--bg-input); padding: 2px 6px; border-radius: var(--radius-xs);
    font-size: 12.5px; border: 1px solid var(--border);
}
.md pre {
    background: var(--bg-sunken); border: 1px solid var(--border);
    border-radius: var(--radius-sm); padding: 14px 16px; overflow-x: auto; margin: 12px 0;
}
.md pre code { background: none; border: none; padding: 0; font-size: 12.5px; line-height: 1.6; }
.md blockquote {
    margin: 12px 0; padding: 8px 16px;
    border-left: 3px solid var(--accent-dim); color: var(--text-tertiary);
    background: var(--accent-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.md hr { border: none; border-top: 1px solid var(--border); margin: 20px 0; }
.md table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 13px; }
.md th, .md td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; }
.md th { background: rgba(255, 255, 255, 0.02); color: var(--text-primary); }
.md img { border-radius: var(--radius-sm); margin: 12px 0; }

/* ---------- 首页补充组件 ---------- */

/* 导航右侧动作区（原 style.css 未定义） */
.nav__actions { display: flex; align-items: center; gap: 10px; }
.nav__cta {
    display: inline-flex; align-items: center; gap: 8px;
    height: 36px; padding: 0 16px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-sm);
    font-size: 13px; color: var(--text-secondary);
    transition: all 0.2s; white-space: nowrap;
}
.nav__cta:hover { border-color: var(--accent); color: var(--text-primary); background: var(--accent-soft); }

/* 公告横幅 */
.announce {
    display: flex; flex-direction: column; gap: 10px;
    max-width: var(--container); margin: 0 auto 8px; padding: 0 32px;
}
.announce__body { font-size: 13px; }
.announce__body p { margin: 6px 0 0; }
.announce__link { display: inline-block; margin-top: 8px; font-size: 12.5px; color: var(--accent-bright); }
.announce__link:hover { text-decoration: underline; }

/* 下载区 */
.download-grid {
    display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 16px; align-items: start;
}
.release-card { display: flex; flex-direction: column; gap: 14px; }
.release-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.release-card__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.release-card__changelog {
    border-top: 1px dashed var(--border); padding-top: 14px; max-height: 320px; overflow-y: auto;
}
.release-card__history { border-top: 1px dashed var(--border); padding-top: 12px; }
.release-card__history summary {
    cursor: pointer; font-size: 13px; color: var(--text-tertiary);
    list-style: none; user-select: none;
}
.release-card__history summary::-webkit-details-marker { display: none; }
.release-card__history summary::before { content: '▸ '; color: var(--accent); }
.release-card__history[open] summary::before { content: '▾ '; }
.release-card__history summary:hover { color: var(--text-primary); }
.release-card__history-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.release-card__history-item {
    display: flex; gap: 14px; flex-wrap: wrap; align-items: baseline;
    padding: 8px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm);
    font-size: 12.5px; color: var(--text-secondary);
    transition: all 0.18s;
}
.release-card__history-item:hover { border-color: var(--accent); background: var(--accent-soft); }

.download-side { display: flex; flex-direction: column; gap: 14px; }
.requirement-list { display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--text-secondary); }
.requirement-list li { display: flex; align-items: flex-start; gap: 8px; }
.requirement-list li::before { content: '✓'; color: var(--success); font-size: 12px; line-height: 1.6; }
.download-facts { display: flex; flex-direction: column; gap: 10px; margin: 0; font-size: 13px; }
.download-facts > div { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.download-facts dt { color: var(--text-tertiary); flex-shrink: 0; }
.download-facts dd { margin: 0; text-align: right; }
.download-facts a { color: var(--accent-bright); }
.download-facts a:hover { text-decoration: underline; }
.download-note {
    font-size: 12.5px; color: var(--text-muted); line-height: 1.6;
    border-top: 1px solid var(--border); padding-top: 12px;
}
.footer__icp { font-size: 12px; color: var(--text-muted); }

@media (max-width: 900px) {
    .download-grid { grid-template-columns: 1fr; }
    .announce { padding: 0 20px; }
}

/* ---------- 页脚 ---------- */
.footer {
    position: relative; z-index: 1;
    border-top: 1px solid var(--border);
    margin-top: 40px;
    background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.18));
}
.footer__inner {
    max-width: var(--container); margin: 0 auto; padding: 56px 32px 28px;
}
.footer__top {
    display: grid; grid-template-columns: 1.5fr 2fr; gap: 56px;
    padding-bottom: 36px; border-bottom: 1px solid var(--border);
}
.footer__brand { display: flex; flex-direction: column; gap: 12px; }
.footer__logo { display: flex; align-items: center; gap: 10px; font-size: 17px; font-weight: 600; }
.footer__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 12px var(--accent-glow); }
.footer__tagline { font-size: 13px; color: var(--text-tertiary); line-height: 1.6; max-width: 320px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.footer__col { display: flex; flex-direction: column; gap: 10px; }
.footer__col h4 { font-size: 12px; color: var(--accent-bright); letter-spacing: 0.08em; text-transform: uppercase; margin-bottom: 4px; }
.footer__col a, .footer__col span { font-size: 13px; color: var(--text-secondary); }
.footer__col a:hover { color: var(--text-primary); }
.footer__bar {
    padding-top: 20px; display: flex; justify-content: space-between; gap: 12px;
    font-size: 12px; color: var(--text-muted); flex-wrap: wrap;
}
.footer__sig { color: var(--accent-bright); }

/* ---------- 错误页 ---------- */
.page-error { display: flex; align-items: center; justify-content: center; min-height: 100vh; padding: 24px; }
.err { display: flex; flex-direction: column; align-items: center; gap: 14px; text-align: center; max-width: 520px; }
.err__code { font-family: var(--font-mono); font-size: 64px; font-weight: 600; color: var(--accent); line-height: 1; opacity: 0.85; }
.err__title { font-size: 22px; }
.err__text { color: var(--text-tertiary); font-size: 14px; line-height: 1.7; }
.err__code-tag {
    font-family: var(--font-mono); font-size: 12px; padding: 3px 8px;
    border: 1px solid var(--border-strong); border-radius: var(--radius-xs);
    color: var(--text-tertiary); background: var(--bg-card);
}
.err__actions { display: flex; gap: 10px; margin-top: 8px; flex-wrap: wrap; justify-content: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1024px) {
    .footer__top { grid-template-columns: 1fr; gap: 32px; }
    .nav__links { display: none; }
    .nav__toggle { display: inline-flex; align-items: center; justify-content: center; }
    .nav__links.is-open {
        display: flex; flex-direction: column; gap: 4px;
        position: absolute; top: 100%; left: 0; right: 0;
        padding: 12px 24px 18px;
        background: var(--bg-elevated); border-bottom: 1px solid var(--border-strong);
        box-shadow: var(--shadow-md);
    }
    .nav--sticky { position: sticky; }
    .nav { position: relative; }
}
@media (max-width: 640px) {
    .container { padding: 0 20px; }
    .nav { padding: 14px 20px; }
    .nav--sticky { padding: 10px 20px; }
    .section { padding: 52px 0; }
    .footer__inner { padding: 40px 20px 24px; }
    .footer__cols { grid-template-columns: 1fr; gap: 22px; }
    .footer__bar { flex-direction: column; gap: 6px; }
    .card { padding: 18px; }
    .u-hide-sm { display: none !important; }
    .modal { padding: 12px; }
    .modal__panel { max-height: 94vh; }
}

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