/* M3E tokens shared with the macOS app. */

:root {
  color-scheme: only light;

  /* Colors */
  --primary: #6750a4;
  --on-primary: #ffffff;
  --primary-container: #eaddff;
  --on-primary-container: #21005d;

  --surface: #fef7ff;
  --surface-container-low: #f7f2fa;
  --surface-container: #f3edf7;
  --surface-container-high: #ece6f0;
  --surface-container-highest: #e6e0e9;

  --on-surface: #1d1b20;
  --on-surface-variant: #49454f;
  --outline: #79747e;
  --outline-variant: #cac4d0;

  --success: #386a20;
  --warning: #825500;
  --error: #b3261e;
  --error-container: #f9dedc;
  --on-error-container: #410e0b;

  /* Category colors, independent of selection state. */
  --icon-blue: #0b57d0;
  --icon-blue-container: #d7e9ff;
  --icon-pink: #a30d5b;
  --icon-pink-container: #ffd9e7;
  --icon-orange: #8b4500;
  --icon-orange-container: #ffe0c2;
  --icon-yellow: #6a5200;
  --icon-yellow-container: #ffe59a;
  --icon-green: #126c2d;
  --icon-green-container: #cfefce;
  --icon-gray: #50545a;
  --icon-gray-container: #e4e4e4;

  --state-hover: color-mix(in srgb, var(--primary) 8%, transparent);
  --state-press: color-mix(in srgb, var(--primary) 12%, transparent);

  /* Shape */
  --radius-outer: 20px;   /* connected list outer */
  --radius-inner: 6px;    /* connected list inner */
  --radius-card: 20px;
  --radius-dialog: 28px;
  --radius-input: 16px;
  --radius-run: 22px;     /* button run outer */
  --radius-run-inner: 8px;

  /* Spacing */
  --gap-connected: 3px;
  --sp-4: 4px;
  --sp-8: 8px;
  --sp-12: 12px;
  --sp-16: 16px;
  --sp-20: 20px;
  --sp-22: 22px;

  --sp-32: 32px;
  --sp-48: 48px;

  /* Motion */
  --dur-state: 160ms;
  --dur-tab: 180ms;
  --dur-view: 420ms;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  --ease-expressive: cubic-bezier(0.34, 1.32, 0.42, 1);

  /* Typography */
  /* Use locale-specific CJK fonts to preserve Japanese glyph shapes. */
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, "JetBrains Mono",
    monospace;

  /* Elevation */
  --shadow-1: 0 1px 2px rgb(0 0 0 / 0.08);
  --shadow-2: 0 4px 16px rgb(29 27 32 / 0.1);
  --shadow-3: 0 12px 40px rgb(29 27 32 / 0.14);

  --page-max: 1200px;
}

:root:lang(ja) {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Hiragino Sans",
    "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Noto Sans JP", system-ui,
    sans-serif;
}
