/* =====================================================================================================
   Constellation Style: Constellate's look as reusable tokens and a few classes.
   From Constellate (index.html: the Clear theme, the Dark theme, the player colors, the fonts), build 2026-11-21.
   Every value here was a placeholder in the game too (docs/PLACEHOLDERS.md): change freely.

   The Clear look: glass panels and buttons over the Sky, every tint mixed from --pt, the color of the player whose turn it is.
   Set it from script when the turn changes:  document.documentElement.style.setProperty('--pt', '#ff3b3b')
   It glides to the new color (1.2 s); add the class cs-still to <html> to make it jump (Animations Off).
   Fonts: Exo 2 (text) and VT323 (the retro readouts). Put this in <head> to load them:
     <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Exo+2:wght@200;300;400;500;600;700&family=VT323&display=swap">
   ===================================================================================================== */

@property --pt { syntax: '<color>'; inherits: true; initial-value: #8a93d8; }

:root {
  /* The ten player colors, and the four seats' defaults (red, purple, blue, orange). */
  --cs-red: #ff3b3b; --cs-yellow: #ffe033; --cs-green: #3ddc6a; --cs-blue: #34b4ff; --cs-purple: #8a4dff;
  --cs-orange: #ffa63d; --cs-pink: #ff6fb5; --cs-silver: #c9d1d9; --cs-brown: #723e47; --cs-navy: #2a4fd6;
  --cs-seat1: var(--cs-red); --cs-seat2: var(--cs-purple); --cs-seat3: var(--cs-blue); --cs-seat4: var(--cs-orange);

  /* The sky's own colors (the canvas draws these itself; here for anything else that wants them). */
  --cs-deep-centre: #0b1022; --cs-deep-edge: #020308; --cs-dust: #d7e1ff; --cs-seed: #a5b4e1; --cs-warn: #ffbe5a; --cs-idle: #3c468c;

  /* The Dark theme (the game's solid look). */
  --cs-dark-bg: #0d141b; --cs-dark-panel: #18222c; --cs-dark-ink: #e8eef3; --cs-dark-mut: #93a5b3; --cs-dark-line: #2a3945; --cs-dark-acc: #2a6a8c;

  /* The Clear theme (glass over the Sky), mixed from --pt. */
  --cs-bg: color-mix(in srgb, var(--pt) 16%, rgba(8, 8, 22, .5));
  --cs-panel: color-mix(in srgb, var(--pt) 12%, rgba(8, 8, 22, .68));
  --cs-ink: #f3f2f9;
  --cs-mut: color-mix(in srgb, var(--pt) 22%, #bdbad0);
  --cs-grid: color-mix(in srgb, var(--pt) 30%, #cbc8de);
  --cs-line: color-mix(in srgb, var(--pt) 50%, rgba(205, 202, 232, .42));
  --cs-dis: rgba(40, 40, 70, .4); --cs-dis-ink: #9c9ab6;
  --cs-acc: color-mix(in srgb, var(--pt) 62%, #14122a);
  --cs-acc-hover: color-mix(in srgb, var(--pt) 72%, #14122a);
  --cs-acc-press: color-mix(in srgb, var(--pt) 50%, #14122a);
  --cs-ink-on-pt: #fff;   /* set to a dark color for light player colors (yellow, silver) */

  --cs-font: 'Exo 2', system-ui, sans-serif;
  --cs-font-retro: 'VT323', 'Courier New', ui-monospace, monospace;
  --cs-radius: 12px;
}
html { transition: --pt 1.2s ease; }
html.cs-still { transition: none; }

/* A page over the Sky: no background of its own, so the canvas behind shows. */
.cs-page { margin: 0; min-height: 100vh; background: #05040f; color: var(--cs-ink); font-family: var(--cs-font); color-scheme: dark; }

/* A glass panel: the Clear theme's dialog look. */
.cs-glass {
  background: var(--cs-panel); color: var(--cs-ink); border-radius: var(--cs-radius);
  border: 1.5px solid color-mix(in srgb, var(--pt) 55%, rgba(220, 218, 240, .6));
  box-shadow: 0 0 26px color-mix(in srgb, var(--pt) 30%, transparent), inset 0 0 40px color-mix(in srgb, var(--pt) 12%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}

/* Buttons: plain glass, and the main action (a gradient in the player's color with a glow). */
.cs-btn {
  font: inherit; min-height: 44px; padding: 0 14px; border-radius: 10px; cursor: pointer;
  background-color: var(--cs-bg); color: var(--cs-ink); border: 1px solid var(--cs-line);
  box-shadow: inset 0 0 10px color-mix(in srgb, var(--pt) 14%, transparent);
}
.cs-btn:hover { border-color: color-mix(in srgb, var(--pt) 70%, #fff); }
.cs-btn:disabled { background: var(--cs-dis); color: var(--cs-dis-ink); box-shadow: none; cursor: default; }
.cs-btn-main {
  background: linear-gradient(115deg, color-mix(in srgb, var(--pt) 78%, #0c0a1c), color-mix(in srgb, var(--pt) 48%, #0c0a1c));
  border-color: color-mix(in srgb, var(--pt) 55%, #fff); color: var(--cs-ink-on-pt);
  box-shadow: 0 0 14px color-mix(in srgb, var(--pt) 45%, transparent), inset 0 0 12px rgba(255, 255, 255, .08);
}
/* "Not yet": the striped look of a button that can't be used right now (End turn while moves remain). */
.cs-nogo { position: relative; overflow: hidden; box-shadow: none; }
.cs-nogo::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(135deg, transparent 0 7px, rgba(0, 0, 0, .32) 7px 11px), rgba(10, 10, 25, .5); }

/* A see-through board frame: the board's own lines over the Sky (pair with the sky's boardGlow: 'edge'). */
.cs-board { border: 1px solid var(--cs-line); background: transparent; }

.cs-retro { font-family: var(--cs-font-retro); letter-spacing: .02em; }
.cs-muted { color: var(--cs-mut); }
