/* Hallmark · shape: app screen · genre: playful · theme: Arcade (deal 2/3, seed island-base-builder-game-hud-dc2f·444421ff·2026-11-02·r0) · redesign: full
 * nav: kept, the game shell · signature: the resource strip as one continuous gauge, each cell a reading · states: hover, active, focus, disabled, full-capacity, busy, empty, locked · arcade: ember/grille
 * axes: dark/geometric/ember · posture: full-palette · contrast: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S3 R4 V4 · weakest: S — 去掉彩虹图标色和呼吸动画之后，这一屏仍然是一个通用游戏 HUD；
   补救是把资源条做成一条连续的读数带（每格一个读数、满仓只变数字），让它成为这个游戏自己的东西，而不是五颗一样的胶囊。 */
/* Hallmark · waive 39b · the build cards run 121px tall because each one carries an icon, a name, a tag, a cost line and a build time · a card with five facts is not a 40px control */
/* Hallmark · answered F7 · every secondary action inside the build and territory panels shares one recipe on purpose: they rank equal, and the label carries the difference, not the box */
/* Hallmark · dismissed 40 · the active state is acid (relative luminance 0.741) under accent-ink (0.001), 15.5:1 by the WCAG formula · the reported 4.11 was measured before the state moved from ember to acid */
/* Hallmark tokens · Arcade 材料，按「厚实卡通 HUD」调整：
   圆角 4→8（卡通必须有厚度）、表面带 alpha（HUD 要压在 3D 场景上，不能是不透明纸）、
   字体换中文系统栈（主题的 Bungee/Chivo/Silkscreen 没有中文字形）。 */
:root {
  color-scheme: dark;

  /* 间距：4px 网格，HUD 用前五档就够 */
  --space-3xs: 2px; --space-2xs: 4px; --space-xs: 8px; --space-sm: 12px;
  --space-md: 16px; --space-lg: 24px; --space-xl: 40px; --space-2xl: 64px;

  /* 字号：app 尺度，功能文字不低于 11px */
  --text-2xs: 11px;       /* 容量、单位 */
  --text-xs: 12px;        /* 标签 */
  --text-sm: 13px;        /* 正文 */
  --text-md: 15px;        /* 按钮 */
  --text-lg: 18px;        /* 读数 */
  --text-xl: 22px;        /* 大读数 */

  /* 动效：只有状态，没有装饰 */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur-micro: 120ms; --dur-short: 220ms;

  /* 表面：半透明，压在亮场景上仍可读；三档亮度做层次 */
  --surface-1: oklch(17% 0.038 302 / 0.92);
  --surface-2: oklch(22% 0.042 302 / 0.94);
  --surface-3: oklch(27% 0.046 302 / 0.96);
  --surface-solid: oklch(16% 0.036 302);

  /* 墨 */
  --ink: oklch(96% 0.014 315);
  --ink-2: oklch(88% 0.018 315);
  --ink-muted: oklch(72% 0.026 315);
  --ink-faint: oklch(60% 0.028 315);

  /* 线：2px 是「厚实」的来源，1px 只做分隔 */
  --line: oklch(48% 0.058 305);
  --line-soft: oklch(38% 0.045 305 / 0.55);

  /* 信号：ember 主操作 / acid 状态与选中 */
  --accent: oklch(72% 0.19 44);
  --accent-deep: oklch(56% 0.175 38);
  --accent-2: oklch(87% 0.185 116);
  --accent-ink: oklch(9% 0.028 302);

  /* 状态色：告急 / 满仓 / 正常 */
  --danger: oklch(70% 0.185 27);
  --good: oklch(80% 0.145 150);
  --focus: oklch(88% 0.19 116);

  /* 资源色：和 3D 场景里的矿石/火焰/叶片/晶体/原木对齐 */
  --res-ore: oklch(78% 0.035 250);
  --res-power: oklch(78% 0.16 62);
  --res-bio: oklch(80% 0.15 148);
  --res-crystal: oklch(76% 0.13 300);
  --res-wood: oklch(72% 0.09 62);

  --radius-card: 12px;
  --radius-pill: 999px;
  --rule-hair: 1px;
  --rule-bar: 2px;

  /* 厚度：底边一条实线 + 顶部内高光。深色硬阴影在深色 HUD 上根本看不见，
     而 4px 右偏的投影在亮场景里只会糊成一团 —— 竖向的「底边」才是按钮的厚度。 */
  --shadow-card: 0 3px 0 var(--line);
  --shadow-lift: 0 4px 0 var(--accent);
  /* 面板用中性底边：lift 带 ember，只配主操作按钮，套到面板上会变成一条抢眼的橙线 */
  --shadow-panel: 0 4px 0 var(--line);
  /* 塑料感：顶部一道亮边 + 底部一道暗边，中间是平的。这是「厚」的来源，
     比投影有效 —— 投影只说明它浮着，亮暗边说明它本身有体积。 */
  --bevel-top: inset 0 2px 0 color-mix(in oklab, var(--ink) 20%, transparent);
  --bevel-bottom: inset 0 -3px 0 oklch(10% 0.02 315 / 0.45);

  --font-body: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans SC", sans-serif;
  --font-display: var(--font-body);
  --font-num: ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;

  --z-base: 1; --z-raised: 10; --z-dropdown: 100; --z-sticky: 200; --z-modal: 400; --z-toast: 500;
}
