/* =========================================================================
   GG chrome · DSv2 tokens
   Single source of truth for chrome color/type tokens · mirrors
   DESIGN_SYSTEM_V2.html · no literal hex elsewhere in chrome/.
   ========================================================================= */

:root {
  /* ===== BASE PALETTE ===== */
  --rd-dark:            #101010;
  --rd-gold:            #C5A069;
  --rd-gold-dim:        #8a7048;  /* DECORATIVE only · failed AA */
  --rd-cream:           #FFFDE1;
  --rd-cream-dim:       #d5d3bf;  /* text labels · passes AAA */

  /* ===== POSITIVE/NEGATIVE BUTTON GRADIENTS ===== */
  --rd-emerald-1:       #2a6044;
  --rd-emerald-2:       #1d4a32;
  --rd-emerald-3:       #0d2818;
  --rd-red-1:           #822528;
  --rd-red-2:           #691A1D;
  --rd-red-3:           #931D21;

  /* ===== ACCENT COLORS (P2-a tokens · 2026-05-28) ===== */
  --rd-warn-red:        #d47878;  /* warning text · clock last-5s · hit notation */
  --rd-warn-red-bright: #e89898;  /* danger button hover text */
  --rd-opp-name:        #a892c4;  /* opponent chat name (their voice) */
  --rd-emerald-text:    #a8d4b8;  /* YES/take/double button text */
  --rd-red-text:        #d4a8a8;  /* NO/drop/resign button text */
  /* Beaver button — blue (WEEK57: re-added; from mockup 63) */
  --rd-blue-1:          #2e5290;
  --rd-blue-2:          #1a3868;
  --rd-blue-3:          #4878c0;
  --rd-blue-text:       #a8c4e0;

  /* ===== GLASS / SURFACES / LINES ===== */
  --rd-glass-bg:        rgba(16,16,16,0.55);
  --rd-glass-border:    rgba(197,160,105,0.4);
  --rd-line:            rgba(197,160,105,0.18);
  --rd-line-strong:     rgba(197,160,105,0.45);
  --rd-surface:         rgba(255,255,255,0.04);
  --rd-surface-strong:  rgba(255,255,255,0.06);

  /* ===== TIER PALETTE · Option C Heritage (LOCKED 2026-05-28) ===== */
  --rd-tier-beginner:     #7a5a3a;  /* oak brown */
  --rd-tier-casual:       #b87340;  /* copper */
  --rd-tier-intermediate: #4a7c5e;  /* emerald */
  --rd-tier-advanced:     #3a5a8a;  /* lapis */
  --rd-tier-expert:       #6a558c;  /* amethyst */
  --rd-tier-world:        #a83838;  /* garnet */
  --rd-tier-supremo-from: #d8d8e0;  /* silver gradient start */
  --rd-tier-supremo-to:   #a8a8b0;  /* silver gradient end */
  --rd-tier-gm-from:      #f8c878;  /* gold gradient start */
  --rd-tier-gm-to:        #C5A069;  /* gold gradient end (= --rd-gold) */

  /* ===== TYPOGRAPHY ===== */
  --rd-font-serif:  'Playfair Display', Georgia, serif;
  --rd-font-body:   'Lora', Georgia, serif;
  --rd-font-action: 'Space Grotesk', sans-serif;

  /* ===== W/L CHIP (locked exception · Space Grotesk for precision feel) ===== */
  --rd-result-win:  #3e7a52;
  --rd-result-loss: #6e2a26;

  /* ===== TRANSLUCENT VARIANTS · brand-color alphas =====
     Sprint 39: any brand-color rgba() used in chrome/layout/*.css comes from
     a named token here · only pure neutral shadows rgba(0,0,0,α) and
     highlights rgba(255,255,255,α) may stay literal in the layout CSS. */

  /* Avatar gradient · player passport (decorative dark frame) */
  --rd-avatar-grad-from:    rgba(42, 38, 32, 1);
  --rd-avatar-grad-to:      rgba(20, 17, 12, 1);

  /* Translucent gold · clock active state · hover/active tints */
  --rd-gold-glow:           rgba(197, 160, 105, 0.35);
  --rd-gold-fill:           rgba(197, 160, 105, 0.25);
  --rd-gold-hover:          rgba(197, 160, 105, 0.15);
  --rd-gold-hover-soft:     rgba(197, 160, 105, 0.12);
  --rd-gold-hover-subtle:   rgba(197, 160, 105, 0.10);

  /* Translucent dark · panel veils (chat-input · menu-bar · fs-toggle bgs) */
  --rd-dark-veil-soft:      rgba(16, 16, 16, 0.4);
  --rd-dark-veil-medium:    rgba(16, 16, 16, 0.7);
  --rd-dark-veil-strong:    rgba(16, 16, 16, 0.85);

  /* Translucent red · danger hover (resign button etc.) */
  --rd-red-tint:            rgba(130, 37, 40, 0.25);

  /* ===== NEUTRAL OVERLAYS · WEEK47 (iPad layout) =====
     Pure-neutral alphas split out so chrome/layout/ipad.css can stay
     fully tokenized (Greptile P3). desktop.css predates this rule and
     still carries inline neutrals — M1.5+ layouts tokenize. */
  --rd-overlay-dark-soft:    rgba(0, 0, 0, 0.25);     /* stat / pip / clock / autoroll backgrounds */
  --rd-overlay-dark-medium:  rgba(0, 0, 0, 0.40);     /* .pa-switch off-state track */
  --rd-overlay-dark-shadow:  rgba(0, 0, 0, 0.50);     /* fab-menu box-shadow drop */
  --rd-overlay-light-inset:  rgba(255, 255, 255, 0.04); /* fab-menu inset top highlight */
  --rd-overlay-light-edge:   rgba(255, 255, 255, 0.18); /* flag border */

  /* ===== CHECKER TOKENS · WEEK69 =====
     The real dice/checker colours. Used by the log panel's cube chips
     (.cube-chip.red / .cube-chip.white in desktop.css) — chip colour =
     the side that did the cube action. Mirrors mockup 67 lines 38–39. */
  --checker-red:            #D41124;
  --checker-white:          #D6D6D6;

  /* Board-button dark gradient · WEEK44 (mirrors index.html's PHASE D++
     unified primary/secondary look · index.html ~3088 + ~3101). */
  --rd-board-btn-1:         #2a2620;
  --rd-board-btn-2:         #1a1610;
  --rd-board-btn-3:         #14110c;
  --rd-board-btn-hi-1:      #3a342a;
  --rd-board-btn-hi-2:      #28221a;
  --rd-board-btn-hi-3:      #1a160e;
}
