/* Generated by server/scripts/sync-site-profit.mjs from the plugin source. Do not edit. */
/**
 * 设计 token —— 全项目唯一的一套。
 *
 * 之前的状态：三处各定义一套变量，命名互不相干。
 *   popup-modern.css   --accent / --ink / --canvas / --line / --muted …
 *   optimizer.css      --primary / --text / --bg / --border / --muted …
 *   popup.html 内联    没有变量，全是硬编码 #4CAF50 / #f44336 / #ddd …
 *
 * 同一个「主色」在两个文件里叫不同名字、取不同值（#ff3b5c vs #2563eb），
 * 结果是同一个插件的两个页面看起来像两个产品。
 *
 * 本文件的做法：
 *   1. 定义一套语义化的规范 token（`--mk-*` 前缀，避免和站点样式撞名）
 *   2. **把旧名字全部别名到新 token 上** —— 这样 popup-modern.css 和
 *      optimizer.css 一行都不用改就能统一取色，风险为零
 *   3. 新 UI 只用 `--mk-*`，不要再用旧名
 *
 * 关于品牌主色：保留 popup-modern.css 的 Mercari 红 (#ff3b5c) 作为品牌色，
 * 因为那是用户已经熟悉的插件形象；optimizer.css 的蓝色降级为「信息色」。
 *
 * 固定浅色：扩展页面（popup / 侧栏 / 运营台 / 对话框）只有一套经过验收的浅色配色，
 * 很多组件写死了浅色背景。以前这里跟随系统切深色 token，结果系统深色时出现
 * 「浅灰字 + 白底」几乎看不清。现在 color-scheme 固定为 light（表单控件、滚动条
 * 也保持浅色），不再定义 prefers-color-scheme: dark 覆盖。官网另有自己的主题。
 */

:root {
  color-scheme: light;

  /* ---- 品牌 ---- */
  --mk-brand: #ff3b5c;
  --mk-brand-strong: #df2948;
  --mk-brand-soft: #fff0f3;
  --mk-brand-contrast: #ffffff;

  /* ---- 语义色 ---- */
  --mk-info: #2563eb;
  --mk-info-strong: #174bb8;
  --mk-info-soft: #eaf1ff;
  --mk-success: #119c67;
  --mk-success-soft: #e6f6ef;
  --mk-warning: #d97706;
  --mk-warning-soft: #fdf3e5;
  --mk-danger: #d14343;
  --mk-danger-soft: #fdeceb;

  /* ---- 表面与文字 ---- */
  --mk-canvas: #f5f7fb;
  --mk-surface: #ffffff;
  --mk-surface-soft: #f8fafc;
  --mk-surface-sunken: #eef1f7;
  --mk-border: #e5e9f0;
  --mk-border-strong: #cbd2df;
  --mk-text: #182033;
  --mk-text-muted: #6c7688;
  --mk-text-inverse: #ffffff;

  /* ---- 排版 ---- */
  --mk-font: Inter, "Segoe UI", "Hiragino Sans", "Yu Gothic UI", "Microsoft YaHei", Arial, sans-serif;
  /* Chrome does not support ui-monospace: Mac falls through to Menlo (not Courier), Windows keeps Consolas. */
  --mk-font-mono: Consolas, "Cascadia Code", "SF Mono", SFMono-Regular, Menlo, Monaco, ui-monospace, monospace;
  --mk-text-xs: 11px;
  --mk-text-sm: 12px;
  --mk-text-base: 14px;
  --mk-text-lg: 16px;
  --mk-text-xl: 18px;
  --mk-leading: 1.5;

  /* ---- 间距（4px 基准） ---- */
  --mk-space-1: 4px;
  --mk-space-2: 8px;
  --mk-space-3: 12px;
  --mk-space-4: 16px;
  --mk-space-5: 20px;
  --mk-space-6: 24px;

  /* ---- 圆角与阴影 ---- */
  --mk-radius-sm: 8px;
  --mk-radius: 12px;
  --mk-radius-lg: 16px;
  --mk-radius-pill: 999px;
  --mk-shadow-sm: 0 3px 9px rgba(29, 42, 69, .09);
  --mk-shadow: 0 8px 24px rgba(27, 39, 67, .08);
  --mk-shadow-lg: 0 16px 40px rgba(27, 39, 67, .14);

  /* ---- 交互 ---- */
  --mk-transition: .18s ease;
  /* Keyboard focus: a solid 2px ring (≥ 3:1 against the surface it sits on). --mk-focus-ring is the same ring as a
     box-shadow (a surface-coloured gap, then the ring) for components that draw focus with box-shadow. */
  --mk-focus-color: #2563eb;
  --mk-focus-ring: 0 0 0 2px var(--mk-surface), 0 0 0 4px #2563eb;

  /* ---- 层级 ---- */
  --mk-z-toast: 9000;
  --mk-z-modal: 9500;

  /* =========================================================================
   * 旧名别名（兼容层）
   *
   * popup-modern.css 与 optimizer.css 继续用这些名字，不需要改动。
   * 等 Task 8 把功能面板迁完、旧 CSS 退场后，这一段可以整块删掉。
   * ========================================================================= */

  /* popup-modern.css */
  --accent: var(--mk-brand);
  --accent-dark: var(--mk-brand-strong);
  --accent-soft: var(--mk-brand-soft);
  --ink: var(--mk-text);
  --muted: var(--mk-text-muted);
  --line: var(--mk-border);
  --canvas: var(--mk-canvas);
  --green: var(--mk-success);
  --blue: var(--mk-info);
  --orange: var(--mk-warning);
  --red: var(--mk-danger);
  --shadow: var(--mk-shadow);

  /* optimizer.css */
  --bg: var(--mk-canvas);
  --surface: var(--mk-surface);
  --surface-soft: var(--mk-surface-soft);
  --border: var(--mk-border);
  --text: var(--mk-text);
  --primary: var(--mk-info);
  --primary-dark: var(--mk-info-strong);
  --primary-soft: var(--mk-info-soft);
  --success: var(--mk-success);
  --warning: var(--mk-warning);
  --danger: var(--mk-danger);
  --radius: var(--mk-radius-lg);
}

/* 中文界面先用中文字体 (2026-10-31): with the Japanese fonts first, the characters both languages share came from Yu Gothic
   and the simplified-only ones from the next font, so one word mixed two weights. */
:root:lang(zh) { --mk-font: Inter, "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans SC", "Hiragino Sans GB", Arial, sans-serif; }

/* 尊重系统的「减少动效」设置。做无障碍不是可选项。 */
@media (prefers-reduced-motion: reduce) {
  :root {
    --mk-transition: 0s;
  }
}
