:root[data-theme="dark"] {
  --move-fill: #a89a81;
  --move-ink: #241b17;
  --standard-jump-fill: #cb8586;
  --long-jump-fill: #b599ba;
  --jump-stripe: #f5e5f266;
  --path-fill: #90b1a4;
  --sightline: #931449;
  --tile-trail-color: #e6a2ae;
  --grid-line: #f5dbba13;
  --wrap-line: #97806c;
  --light-square: #443732;
  --dark-square: #241d1a;
  --selected-sightline: #ffc4dc;
  --check-line: #ffc1bb;
  --check-halo: #493031;
  --capture-ring: #ffe2a8;
  --selection-edge: #f8d4a4;
  --selection-fill: #583d2d;
  --action-motion: #404e50;
  --action-support: #365651;
  --action-impact: #684353;
  --action-disassemble: #a83e40;
  --action-ink: #faead5;
  --action-focus: #ffe1a9;

  .board-frame {
    outline-color: #806b5b;
    background: #241d1a;
    box-shadow: 0 0 0 3px #a98b6717, 0 10px 30px #100b0847;
  }
  .board-frame:focus-visible { outline-color: var(--accent); }

  .coord { color: #e1d4c3; }
  .square:focus-visible { outline-color: #fff3ca; }

  .square.destination .coord, .square.on-path .coord { color: var(--move-ink); }
  .square.destination:focus-visible { outline-color: var(--move-ink); }
  .legend .capture-mark { background-color: #52443a; }
  .square.on-path:where(:not(.selected)) {
    --frame-color: #cee7d9;
  }
  .square.in-check {
    --square-face: #652e3a;
    --frame-color: #ffafbf;
  }
  .square.selected .coord, .square.in-check .coord { color: #fff7ee; }
  .square.capture::after { box-shadow: 0 0 0 1px #3a2c35, inset 0 0 0 1px #3a2c35; }

  .board-grid:not(.hide-labels) .square:not(.cannon-part, .special-target) img.piece,
  .board-motion:not(.hide-labels) .motion-piece:not(.motion-cannon) img.piece {
    bottom: 1%;
    height: 69%;
  }
  .square.cannon-part .coord {
    color: #eadbc9;
    background: #312522eb;
    border-radius: 2px;
    padding-inline: .12em;
  }
  :is(.square, .motion-piece) img.piece.black { filter: var(--black-piece-tint); }
  /* A deeper mahogany against a lit tile keeps the cutouts readable on capture and hover. */
  .square:is(.destination, .on-path):not(.selected, .in-check) img.piece.black {
    filter: brightness(0) invert(18%) sepia(1) saturate(305%) hue-rotate(-41deg);
  }
  .legend i:not(.ammo-pawn, .ammo-phalanx, .ammo-jester) { box-shadow: inset 0 0 0 1px #e4cda741; }
}
