/* Shared shadcn semantic tokens. The ship builder uses the light root palette;
   all other screens opt into .dark on html, including body-mounted portals. */
:root {
  color-scheme: light;
  --background: #dadcdf;
  --foreground: #1b1d20;
  --card: #f4f4f5;
  --card-foreground: #1b1d20;
  --popover: #ffffff;
  --popover-foreground: #1b1d20;
  --primary: #2f6fed;
  --primary-foreground: #ffffff;
  --secondary: #ffffff;
  --secondary-foreground: #1b1d20;
  --muted: #e9eaec;
  --muted-foreground: #55595f;
  --accent: #e6eeff;
  --accent-foreground: #1a4fc4;
  --destructive: #d64545;
  --border: rgba(0, 0, 0, 0.08);
  --input: rgba(0, 0, 0, 0.16);
  --ring: #2f6fed;
  --chart-1: #2f6fed;
  --chart-2: #55595f;
  --chart-3: #8a9097;
  --chart-4: #b0b4b9;
  --chart-5: #d64545;
  --radius: 0.75rem;
  --sidebar: #f4f4f5;
  --sidebar-foreground: #1b1d20;
  --sidebar-primary: #2f6fed;
  --sidebar-primary-foreground: #ffffff;
  --sidebar-accent: #e6eeff;
  --sidebar-accent-foreground: #1a4fc4;
  --sidebar-border: rgba(0, 0, 0, 0.08);
  --sidebar-ring: #2f6fed;
  /* Game-specific: dark floating chrome, semantic ok, hostile. */
  --dark: #1c1e21;
  --dark-foreground: #f4f4f5;
  --dark-muted: #b5b9bf;
  --ok: #2f8f5b;
  --ok-foreground: #ffffff;
  --hostile: #d64545;
  --canvas-dot: #a9adb2;
  --glass: rgb(255 255 255 / 0.88);
  --glass-border: rgb(255 255 255 / 0.55);
  --map-grid: rgb(0 0 0 / 0.1);
  --map-island: #d3d6da;
  --map-island-border: #8a9097;
}

.dark {
  color-scheme: dark;
  --background: #141416;
  --foreground: #f4f4f5;
  --card: #1e1e21;
  --card-foreground: #f4f4f5;
  --popover: #252528;
  --popover-foreground: #f4f4f5;
  --primary: #82aaff;
  --primary-foreground: #101c34;
  --secondary: #2a2a2e;
  --secondary-foreground: #f4f4f5;
  --muted: #2a2a2e;
  --muted-foreground: #b0b0b9;
  --accent: #273754;
  --accent-foreground: #bdd2ff;
  --destructive: #ff9393;
  --border: rgb(255 255 255 / 0.12);
  --input: rgb(255 255 255 / 0.18);
  --ring: #82aaff;
  --chart-1: #82aaff;
  --chart-2: #b0b0b9;
  --chart-3: #8a9097;
  --chart-4: #65656f;
  --chart-5: #ff9393;
  --sidebar: #1e1e21;
  --sidebar-foreground: #f4f4f5;
  --sidebar-primary: #82aaff;
  --sidebar-primary-foreground: #101c34;
  --sidebar-accent: #273754;
  --sidebar-accent-foreground: #bdd2ff;
  --sidebar-border: rgb(255 255 255 / 0.12);
  --sidebar-ring: #82aaff;
  --ok: #7dd8a3;
  --ok-foreground: #10271a;
  --hostile: #ff9393;
  --canvas-dot: #3e3e46;
  --glass: rgb(24 24 27 / 0.88);
  --glass-border: rgb(255 255 255 / 0.16);
  --map-grid: rgb(255 255 255 / 0.12);
  --map-island: #373c45;
  --map-island-border: #8993a4;
}
