/* 基底令牌(原型 :root / midnight)+ 明暗模式 + 布局/动效/阴影 真源 styles.css:2-73 | 依据《设计令牌.md》v3.0 §三·§六·§七·§八·§九 说明:语义色跨配色固定,故在此定义(palette 只覆盖表面/导航/主色族)。 命名一律用 ui-kit 词汇(--canvas/--ink/--edge/--primary…),禁止自有前缀。*/ :root { /* 表面与文字 */ --canvas: #edf1f6; --surface: #ffffff; --surface-2: #f5f7fa; --surface-hover: #eaf0f7; --surface-active: #dfe6f0; --rail-surface: #f0f3f8; --edge: #dce3ed; --edge-strong: #c5d0df; --ink: #172337; --ink-2: #495b74; --muted: #61728a; --inverse: #ffffff; /* 语义色(跨配色固定)—— info 取原型值,非底座 #0369a1(评审 S2) --on-danger:danger 底上的文字色。暗色下 --danger 是浅粉,故文字须用深色 */ --success: #207550; --success-subtle: #edf7f1; --warning: #91600e; --warning-subtle: #fff7e8; --danger: #c33f42; --danger-subtle: #fff0f0; --on-danger: #ffffff; --info: #315fa8; --info-subtle: #edf3fd; /* 主色(基底;4 套配色整体覆盖)—— --primary-ring 为推导值(原型未定义 focus 环) */ --primary: #315acb; --primary-hover: #2548aa; --primary-active: #2548aa; --primary-subtle: #eaf0ff; --primary-content: #ffffff; --primary-ring: rgb(49 90 203 / .35); /* 导航族(随配色整套变化) */ --nav-surface: #18243a; --nav-ink: #f3f6fc; --nav-text: #c4cfdf; --nav-muted: #9aadc8; --nav-line: #30405a; --nav-hover: #24334d; --nav-active: #2c4167; --nav-accent: #b4ccff; --nav-brand: #4269d8; --nav-on-brand: #ffffff; /* 辅助族 */ --metric-fill: #5476ca; --avatar-ink: #46618c; --avatar-bg: #eaf0fa; --avatar-ink-alt: #596780; --avatar-bg-alt: #edf0f5; --neutral: #687385; --neutral-soft: #eff1f5; --overlay: #18223966; --overlay-strong: #182239d9; /* 深色遮罩上的前景色:明暗主题下都保持浅色(灯箱/全屏预览用) */ --on-overlay: #ffffff; --on-overlay-soft: rgb(255 255 255 / .14); --on-overlay-hover: rgb(255 255 255 / .24); /* 字号:锁定 8 档(名称 = 底座,数值 = 原型) */ --fs-11: 11px; --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 14px; --fs-17: 16px; --fs-20: 20px; --fs-26: 28px; --fs-42: 36px; /* 圆角:锁定 4 档 */ --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-tag: 999px; /* 动效(底座无此层,由原型引入) */ --motion-fast: 120ms; --motion-page: 160ms; --motion-detail: 200ms; --motion-panel: 240ms; --motion-exit: 160ms; --ease-standard: cubic-bezier(.2, 0, 0, 1); /* 阴影四级(色基取原型,结构沿用底座;修复底座暗色不可见缺陷) */ --shadow-soft: 0 1px 2px rgb(23 36 60 / .04), 0 4px 12px rgb(23 36 60 / .06); --shadow-card: 0 1px 2px rgb(23 36 60 / .05), 0 8px 24px rgb(23 36 60 / .07); --shadow-pop: 0 4px 8px rgb(23 36 60 / .08), 0 16px 32px rgb(23 36 60 / .12); --shadow-overlay: 0 8px 16px rgb(23 36 60 / .1), 0 24px 48px rgb(23 36 60 / .18); /* 布局令牌 —— 前缀用 --desk-/--mob-(--dk- 是存量禁用前缀);--desk-nav-w* 已随竖栏废弃 */ --desk-topbar-h: 56px; --desk-tree-w: 280px; --desk-nav-w: 200px; --desk-nav-w-compact: 176px; --desk-nav-w-icon: 72px; --desk-list-w: 274px; --desk-list-w-compact: 244px; --desk-list-w-narrow: 250px; --desk-main-min-w: 480px; --desk-aside-w: 320px; --desk-aside-w-compact: 300px; /* * 2026-11-23 移动端空间优化: * navbar 60 → 52。44px 是无障碍最小触摸区(--touch-min), * 52 = 44 按钮 + 上下各 4 呼吸,仍满足可点性,只砍掉纯装饰性留白。 * tabbar 不动(底部还要塞安全区,64 是底线)。 */ --mob-navbar-h: 52px; --mob-tabbar-h: 64px; --mob-gutter: 16px; --mob-safe-top: env(safe-area-inset-top, 0px); --mob-safe-bottom: env(safe-area-inset-bottom, 0px); --touch-min: 44px; /* 无障碍硬约束,非设计偏好 */ /* 页面最大宽度(《双端布局规范》v2.1 §2.4)—— 窗口更宽时居中留白,避免超宽屏内容拉散 */ --page-max-w: 1440px; /* 通用/仪表盘类 */ --page-max-w-narrow: 980px; /* 阅读型(事件流) */ --page-max-w-settings: 1240px; /* 设置页 */ } /* 暗色:--inverse 与 --primary-content 同源统一(评审 A5) */ .dark { --canvas: #11151c; --surface: #191f29; --surface-2: #1e2531; --surface-hover: #2a3342; --surface-active: #333c4c; --rail-surface: #141b26; --edge: #2d3747; --edge-strong: #414f65; --ink: #edf1f8; --ink-2: #b8c2d2; --muted: #98a6bc; --inverse: #14203b; --success: #8ed2ac; --success-subtle: #1d352c; --warning: #e8bf77; --warning-subtle: #382f22; --danger: #f2a0a5; --danger-subtle: #3b272f; --on-danger: #3b272f; --info: #acc9fa; --info-subtle: #273a55; --primary: #93b5ff; --primary-hover: #b0c9ff; --primary-active: #93b5ff; --primary-subtle: #253451; --primary-content: #14203b; --primary-ring: rgb(147 181 255 / .4); --nav-surface: #0c1320; --nav-hover: #1a2940; --nav-active: #243957; --nav-line: #25324a; --metric-fill: #a8c2ff; --avatar-ink: #b7cdf2; --avatar-bg: #2b3b56; --avatar-ink-alt: #bac7db; --avatar-bg-alt: #2d3748; --neutral: #acb7c9; --neutral-soft: #2b3341; --overlay: #070b12a6; --overlay-strong: #070b12e6; --on-overlay: #ffffff; --on-overlay-soft: rgb(255 255 255 / .14); --on-overlay-hover: rgb(255 255 255 / .24); --shadow-soft: 0 1px 2px rgb(0 0 0 / .3), 0 4px 12px rgb(0 0 0 / .28); --shadow-card: 0 1px 2px rgb(0 0 0 / .34), 0 8px 24px rgb(0 0 0 / .32); --shadow-pop: 0 4px 8px rgb(0 0 0 / .38), 0 16px 32px rgb(0 0 0 / .34); --shadow-overlay: 0 8px 16px rgb(0 0 0 / .42), 0 24px 48px rgb(0 0 0 / .4); }