
:root {
  /* Agent colors */
  --color-herd: rgba(224, 156, 156, 0.8);
  --color-shepherd: rgba(70, 70, 70, 0.9);
  --color-target: rgba(0, 0, 0, 0.8);
  
  /* UI colors */
  --color-accent: rgba(0, 100, 200, 0.6);
  --color-border: rgba(0, 0, 0, 0.2);
  --color-text: rgba(0, 0, 0, 0.8);
  --color-text-muted: rgba(0, 0, 0, 0.6);
  --color-text-subtle: rgba(0, 0, 0, 0.5);

  /* toggle track / label (light mode) */
  --color-track-bg: rgba(0, 0, 0, 0.08);
  --color-label-inactive: rgba(0, 0, 0, 0.35);
  --color-label-active: rgba(0, 0, 0, 0.7);
}

/* Dark-mode overrides (applied when body.dark is set by applyTheme) */
body.dark {
  /* Agent colors — herd reddish stays, greys/blacks go light */
  --color-shepherd: rgba(180, 180, 180, 0.9);
  --color-target: rgba(220, 220, 220, 0.8);

  /* UI colors */
  --color-border: rgba(255, 255, 255, 0.2);
  --color-text: rgba(255, 255, 255, 0.85);
  --color-text-muted: rgba(255, 255, 255, 0.6);
  --color-text-subtle: rgba(255, 255, 255, 0.45);

  /* toggle track / label */
  --color-track-bg: rgba(255, 255, 255, 0.12);
  --color-label-inactive: rgba(255, 255, 255, 0.35);
  --color-label-active: rgba(255, 255, 255, 0.85);
}




/* === CANVAS STYLING === */
html, body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  background: transparent;
}

canvas {
  display: block;
}

/* ===== CURSOR MODE TOGGLE ===== */
#cursor-mode-wrapper {
  position: fixed;
  bottom: 10px;
  left: 10px;
  z-index: 10;
  font-family: monospace;
  font-size: 11px;
}

/* ===== 3-WAY SLIDING TOGGLE ===== */
.three-way-toggle {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 2px;
  width: 120px;
  cursor: pointer;
  touch-action: manipulation;
}

.three-way-track {
  position: relative;
  height: 14px;
  background: var(--color-track-bg);
  border-radius: 7px;
}

.three-way-pill {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc(33.333% - 3px);
  height: 10px;
  background: var(--color-herd);
  border-radius: 5px;
  transition: left 0.2s ease, background 0.2s ease;
}

.three-way-toggle[data-pos="1"] .three-way-pill { left: calc(33.333% + 0.5px); background: var(--color-shepherd); }
.three-way-toggle[data-pos="2"] .three-way-pill { left: calc(66.666% - 1px); background: var(--color-target); }

.three-way-labels {
  display: flex;
  justify-content: space-between;
}

.three-way-labels span {
  flex: 1;
  text-align: center;
  font-size: 8px;
  font-family: monospace;
  color: var(--color-label-inactive);
  transition: color 0.2s;
  user-select: none;
}

.three-way-toggle[data-pos="0"] .three-way-labels span:nth-child(1),
.three-way-toggle[data-pos="1"] .three-way-labels span:nth-child(2),
.three-way-toggle[data-pos="2"] .three-way-labels span:nth-child(3) {
  color: var(--color-label-active);
}

