/* ============================================================
 * 收藏品管理工具 collectibles-cn — 设计 Token
 * REGISTRY #139 · 端口 3211
 * 用法：开发只引用 var(--*)，禁止在组件 CSS 里写硬编码色值/字号/圆角。
 * 风格：苹果式简约大气 — 大留白、超大标题、黑白灰骨架、克制蓝色点缀。
 * 最后核验：2026-11-24
 * ============================================================ */

:root {
  /* ---------- 颜色：黑白灰骨架 ---------- */
  --color-bg: #ffffff;            /* 页面底色 */
  --color-bg-subtle: #f5f5f7;     /* 浅灰底（分区、仪表盘底） */
  --color-bg-muted: #fafafa;      /* 更浅的灰（卡片 hover 前的次底） */
  --color-surface: #ffffff;       /* 卡片面 */
  --color-surface-elevated: #ffffff;

  --color-text: #1d1d1f;          /* 主文字（近黑） */
  --color-text-secondary: #6e6e73;/* 次要文字 */
  --color-text-tertiary: #86868b; /* 辅助文字 / 占位 */
  --color-text-inverse: #ffffff;  /* 深底上的文字 */

  --color-border: #d2d2d7;        /* 分隔线 */
  --color-border-light: #e8e8ed;  /* 轻分隔线 */
  --color-divider: #f5f5f7;       /* 极轻分隔 */

  /* ---------- 颜色：克制蓝色点缀（全站只此一处彩色主色） ---------- */
  --color-accent: #0071e3;        /* 主按钮 / 链接 / 选中态 */
  --color-accent-hover: #0077ed;  /* 主按钮 hover */
  --color-accent-pressed: #006edb;/* 主按钮按下 */
  --color-accent-soft: #e8f2fd;   /* 蓝色浅底（标签、选中卡片底） */
  --color-accent-text: #0066cc;   /* 正文中的蓝色链接文字 */

  /* ---------- 颜色：涨跌语义（只用于数字，不做大面积色块） ---------- */
  --color-up: #1d9d5f;            /* 涨：克制绿 */
  --color-up-bg: #e6f4ec;
  --color-down: #d70015;          /* 跌：克制红 */
  --color-down-bg: #fdeceb;
  --color-flat: #6e6e73;          /* 持平：灰 */
  --color-flat-bg: #f5f5f7;

  /* ---------- 颜色：状态 ---------- */
  --color-success: #1d9d5f;
  --color-warning: #b25e09;
  --color-warning-bg: #fdf3e3;
  --color-error: #d70015;
  --color-error-bg: #fdeceb;

  /* ---------- 字体 ---------- */
  --font-sans: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;
  --font-mono: "SF Mono", ui-monospace, "PingFang SC", Menlo, Consolas, monospace; /* 仅用于金额数字等位数字场景 */

  --font-size-hero: 56px;        /* 首页 hero 大标题（桌面） */
  --font-size-hero-mobile: 40px; /* 首页 hero 大标题（手机） */
  --font-size-h1: 40px;          /* 页标题 */
  --font-size-h2: 28px;          /* 区块标题 */
  --font-size-h3: 21px;          /* 卡片标题 / 小节标题 */
  --font-size-body: 17px;        /* 正文 */
  --font-size-body-sm: 15px;     /* 次要正文 */
  --font-size-caption: 13px;     /* 辅助说明 */
  --font-size-footnote: 12px;    /* 脚注 / 元信息 */
  --font-size-stat: 48px;        /* 总价值大数字（桌面） */
  --font-size-stat-mobile: 36px; /* 总价值大数字（手机） */
  --font-size-price: 21px;       /* 卡片现价 */
  --font-size-price-sm: 17px;    /* 卡片购入价 */

  --font-weight-regular: 400;
  --font-weight-medium: 500;
  --font-weight-semibold: 600;
  --font-weight-bold: 700;

  --line-height-tight: 1.1;      /* 大标题 */
  --line-height-heading: 1.25;   /* 标题 */
  --line-height-body: 1.6;       /* 正文 */
  --line-height-compact: 1.4;    /* 卡片内文字 */

  --letter-spacing-tight: -0.02em; /* 大标题微收 */
  --letter-spacing-normal: 0;

  /* ---------- 间距（4px 基数，8 点网格） ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;
  --space-16: 64px;
  --space-20: 80px;
  --space-24: 96px;
  --space-section: 96px;         /* 区块上下留白（桌面） */
  --space-section-mobile: 56px;  /* 区块上下留白（手机） */

  /* ---------- 圆角 ---------- */
  --radius-sm: 8px;              /* 小标签、输入框内元素 */
  --radius-md: 12px;             /* 按钮、输入框 */
  --radius-lg: 18px;             /* 藏品卡片 */
  --radius-xl: 24px;             /* 仪表盘、弹窗 */
  --radius-full: 999px;          /* 胶囊按钮、分类 pill */

  /* ---------- 阴影（克制：默认无阴影，靠边框与留白分层） ---------- */
  --shadow-none: none;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.16);
  --shadow-float: 0 4px 16px rgba(0, 0, 0, 0.08);

  /* ---------- 布局 ---------- */
  --layout-max: 1200px;          /* 内容最大宽 */
  --layout-max-narrow: 980px;    /* 表单/详情页最大宽 */
  --layout-max-text: 680px;      /* 长文案最大宽 */
  --layout-gutter: 24px;         /* 桌面左右内边距 */
  --layout-gutter-mobile: 16px;  /* 手机左右内边距 */

  /* ---------- 断点 ---------- */
  --breakpoint-mobile: 640px;    /* ≤640 手机 */
  --breakpoint-tablet: 1024px;   /* 641–1024 平板 */
  /* >1024 桌面 */

  /* ---------- 按钮 ---------- */
  --btn-height: 44px;
  --btn-height-sm: 36px;
  --btn-padding-x: 24px;
  --btn-radius: var(--radius-full);

  /* ---------- 表单 ---------- */
  --input-height: 48px;
  --input-radius: var(--radius-md);
  --input-border: var(--color-border);
  --input-border-focus: var(--color-accent);

  /* ---------- 动效 ---------- */
  --duration-fast: 120ms;
  --duration-base: 200ms;
  --duration-slow: 320ms;
  --ease-standard: cubic-bezier(0.32, 0.72, 0, 1);
}

/* 深色模式：只反转骨架，蓝色点缀不变 */
@media (prefers-color-scheme: dark) {
  :root {
    --color-bg: #000000;
    --color-bg-subtle: #161617;
    --color-bg-muted: #1d1d1f;
    --color-surface: #1d1d1f;
    --color-surface-elevated: #2d2d2f;
    --color-text: #f5f5f7;
    --color-text-secondary: #a1a1a6;
    --color-text-tertiary: #6e6e73;
    --color-border: #424245;
    --color-border-light: #333336;
    --color-divider: #1d1d1f;
    --color-accent: #2997ff;
    --color-accent-hover: #53a9ff;
    --color-accent-pressed: #1e8bf5;
    --color-accent-soft: #0a2a4a;
    --color-accent-text: #2997ff;
    --color-up-bg: #0d2b1d;
    --color-down-bg: #3a0d10;
    --color-flat-bg: #1d1d1f;
    --color-warning-bg: #33260a;
    --color-error-bg: #3a0d10;
    --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-card-hover: 0 8px 24px rgba(0, 0, 0, 0.5);
    --shadow-modal: 0 24px 64px rgba(0, 0, 0, 0.6);
  }
}
