/* Chess cosmetics are presentation-only. Board state, move overlays, and game authority stay in the canonical Chess owners. */

#chessGameView[data-chess-environment="dew-grove-kingdom"] {
  --chess-v2-bg: #202826;
  --chess-v2-panel: #2a302d;
  --chess-v2-panel-2: #343a36;
  --chess-v2-panel-3: #414842;
  background:
    radial-gradient(circle at 10% 18%, rgba(80, 145, 211, .18), transparent 31%),
    radial-gradient(circle at 90% 82%, rgba(82, 145, 87, .2), transparent 34%),
    linear-gradient(180deg, #26302f 0%, #202725 44%, #1c2421 100%);
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-game-header {
  background:
    linear-gradient(90deg, rgba(55, 105, 161, .18), rgba(255, 255, 255, .025) 46%, rgba(53, 111, 68, .18));
  border-bottom: 1px solid rgba(240, 226, 192, .08);
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-player {
  position: relative;
  border-radius: 14px;
  background: rgba(24, 31, 29, .72);
  box-shadow: inset 0 0 0 1px rgba(246, 232, 199, .055);
  backdrop-filter: blur(6px);
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-player::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(76, 142, 211, .55), rgba(238, 224, 192, .18) 48%, rgba(71, 137, 78, .55));
  pointer-events: none;
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap {
  position: relative;
  box-sizing: border-box;
  padding: 4px;
  border-radius: 10px;
  background:
    linear-gradient(90deg,
      #547899 0%,
      #6f8da7 45%,
      #b4a98e 49%,
      #b4a98e 51%,
      #69866a 55%,
      #476c4d 100%);
  box-shadow:
    0 0 0 1px rgba(244, 230, 195, .22),
    0 12px 32px rgba(0, 0, 0, .28),
    inset 0 0 0 1px rgba(255, 255, 255, .14);
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::before,
#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::after {
  content: "";
  position: absolute;
  z-index: 4;
  top: -5px;
  width: 18px;
  height: 12px;
  border-radius: 3px 3px 8px 8px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, .18) inset, 0 2px 4px rgba(0, 0, 0, .2);
  pointer-events: none;
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::before {
  left: 12px;
  background: linear-gradient(180deg, #4b91d8, #285e9d);
}

#chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::after {
  right: 12px;
  background: linear-gradient(180deg, #5b9c61, #32683b);
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.light {
  background: #efe4c6;
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.dark {
  background: #75865b;
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.last-move {
  box-shadow: inset 0 0 0 999px rgba(247, 200, 77, .36);
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.selected {
  box-shadow: inset 0 0 0 4px rgba(255, 213, 83, .94);
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.destination::before {
  background: rgba(31, 38, 30, .36);
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.capture::before {
  background: transparent;
  border-color: rgba(31, 38, 30, .31);
}

#chessGameView[data-chess-board-theme="kingdom-courtyard"] .chess-square.in-check {
  box-shadow: inset 0 0 0 999px rgba(194, 49, 49, .5);
}

@media (max-width: 480px) {
  #chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-player {
    border-radius: 11px;
  }

  #chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap {
    padding: 3px;
    border-radius: 8px;
  }

  #chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::before,
  #chessGameView[data-chess-environment="dew-grove-kingdom"] .chess-v2-board-wrap::after {
    top: -4px;
    width: 15px;
    height: 10px;
  }
}

@media (prefers-reduced-motion: reduce) {
  #chessGameView[data-chess-environment="dew-grove-kingdom"] *,
  #chessGameView[data-chess-environment="dew-grove-kingdom"] *::before,
  #chessGameView[data-chess-environment="dew-grove-kingdom"] *::after {
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}
