:root {
  color-scheme: light;

  /* Brand */
  --orbit-night: #13233b;
  --orbit-night-soft: #203650;
  --mars-coral: #e65f4d;
  --mars-coral-deep: #c84837;
  --signal-teal: #1c8c83;
  --signal-teal-bright: #46c7b8;
  --loss-blue: #2e5e91;

  /* Surfaces and type */
  --atmosphere: #f4f7f8;
  --atmosphere-deep: #e7eef2;
  --cabin-white: #ffffff;
  --ink: #132136;
  --ink-soft: #526174;
  --ink-faint: #788596;
  --dust-line: #d8e1e8;
  --dust-line-soft: #e8eef2;

  /* Status */
  --status-positive: #26705d;
  --status-warning: #946327;
  --status-danger: #a7352b;
  --status-info: #3f5f9b;

  /* Game identity */
  --game-mahjong: #718b55;
  --game-guandan: #b47b33;
  --game-texas: var(--mars-coral);

  /* Typography */
  --font-body: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC",
    "Noto Sans SC", "Microsoft YaHei", system-ui, sans-serif;
  --font-display: "STYuanti-SC-Regular", "Yuanti SC", "PingFang SC",
    system-ui, sans-serif;
  --font-data: "SFMono-Regular", "Roboto Mono", "Cascadia Code", ui-monospace,
    monospace;

  /* Shape, rhythm and elevation */
  --radius-xs: 6px;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --tap-min: 44px;
  --tap-primary: 52px;
  --shadow-low: 0 8px 30px rgb(23 34 53 / 0.07);
  --shadow-mid: 0 16px 44px rgb(23 34 53 / 0.12);
  --shadow-high: 0 26px 70px rgb(23 34 53 / 0.18);
  --focus-ring: 0 0 0 3px rgb(47 143 131 / 0.25);
  --motion-fast: 160ms;
  --motion-standard: 240ms;
  --ease-out: cubic-bezier(0.2, 0.75, 0.2, 1);

  /* iPhone safe areas */
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-right: env(safe-area-inset-right, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-left: env(safe-area-inset-left, 0px);
  --visual-viewport-height: 100dvh;

  /* Compatibility aliases used by the current shell during the v2 migration. */
  --paper: var(--atmosphere);
  --paper-deep: var(--atmosphere-deep);
  --cabin: var(--cabin-white);
  --mars: var(--mars-coral);
  --mars-dark: var(--mars-coral-deep);
  --mars-pale: #f9e9e5;
  --orbit: var(--loss-blue);
  --orbit-dark: #304a80;
  --orbit-pale: #e9eef8;
  --dust: var(--dust-line);
  --dust-light: var(--dust-line-soft);
  --success: var(--status-positive);
  --warning: var(--status-warning);
  --danger: var(--status-danger);
}

@media (prefers-reduced-motion: reduce) {
  :root {
    --motion-fast: 0ms;
    --motion-standard: 0ms;
  }
}
