:root {
  --checkers-felt: #0b6b3a;
  --checkers-felt-light: #14804b;
  --checkers-felt-deep: #064526;
  --checkers-white: #f2eee4;
  --checkers-black: #171a18;
}

html,
body {
  background-color: var(--checkers-felt-deep) !important;
}

body[data-fp-art="crown-checkers"]::before {
  background:
    radial-gradient(ellipse at 50% 36%, rgba(37, 158, 91, 0.48), transparent 50%),
    radial-gradient(circle at 12% 12%, rgba(255, 255, 255, 0.06), transparent 25%),
    linear-gradient(145deg, var(--checkers-felt-light), var(--checkers-felt) 45%, var(--checkers-felt-deep)) !important;
}

body[data-fp-art="crown-checkers"]::after {
  opacity: 0.2;
  background-image:
    repeating-linear-gradient(24deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 4px),
    repeating-linear-gradient(114deg, rgba(0, 0, 0, 0.035) 0 1px, transparent 1px 5px);
  background-size: auto;
  mask-image: none;
}

body[data-fp-art="crown-checkers"] :is(.topbar, .panel) {
  border-color: rgba(238, 213, 137, 0.22);
  background-color: rgba(3, 47, 27, 0.9);
}

.board-wrap {
  padding: clamp(0.7rem, 2vw, 1.5rem);
  border: 1px solid rgba(242, 207, 112, 0.42);
  background:
    repeating-linear-gradient(24deg, rgba(255, 255, 255, 0.018) 0 1px, transparent 1px 5px),
    radial-gradient(ellipse at 50% 38%, var(--checkers-felt-light), var(--checkers-felt) 52%, var(--checkers-felt-deep)) !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.1),
    inset 0 0 48px rgba(1, 28, 15, 0.28),
    0 16px 34px rgba(1, 25, 14, 0.3);
}

.grid-board {
  gap: 0 !important;
  overflow: hidden;
  border: clamp(5px, 1vw, 10px) solid #211f1a;
  border-radius: 0.45rem;
  background: #211f1a;
  box-shadow:
    0 0 0 2px rgba(230, 199, 115, 0.58),
    0 12px 26px rgba(0, 0, 0, 0.42),
    inset 0 0 0 1px rgba(255, 255, 255, 0.16);
}

.grid-board > .cell {
  overflow: visible;
  border: 0;
  border-radius: 0;
}

.grid-board > .cell.light,
.grid-board > .cell.light:hover:not(:disabled) {
  background: var(--checkers-white) !important;
}

.grid-board > .cell.dark,
.grid-board > .cell.dark:hover:not(:disabled) {
  background: var(--checkers-black) !important;
}

.grid-board > .cell.selected {
  z-index: 2;
  box-shadow: inset 0 0 0 clamp(3px, 0.6vw, 6px) #f6c84d !important;
}

.checker {
  position: relative;
  z-index: 1;
  width: 88%;
  aspect-ratio: 1;
  border: 0;
  border-radius: 0;
  background-color: transparent !important;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  filter: drop-shadow(0 5px 4px rgba(0, 0, 0, 0.58));
  transition: transform 140ms ease, filter 140ms ease;
}

.checker.red {
  background: transparent url("/images/games/crown-checkers/piece-white.png") center / contain no-repeat !important;
}

.checker.blue {
  background: transparent url("/images/games/crown-checkers/piece-black.png") center / contain no-repeat !important;
  filter:
    drop-shadow(0 0 1px rgba(255, 255, 255, 0.6))
    drop-shadow(0 5px 4px rgba(0, 0, 0, 0.68));
}

.cell:hover .checker,
.cell:focus-visible .checker,
.cell.selected .checker {
  transform: translateY(-3%) scale(1.035);
  filter: drop-shadow(0 7px 5px rgba(0, 0, 0, 0.66));
}

.checker.king::after {
  position: absolute;
  top: 50%;
  left: 50%;
  display: grid;
  width: 47%;
  aspect-ratio: 1;
  place-items: center;
  transform: translate(-50%, -52%);
  border: 1px solid rgba(255, 246, 199, 0.75);
  border-radius: 50%;
  color: #ffd968;
  background: rgba(64, 42, 10, 0.34);
  box-shadow: 0 1px 5px rgba(0, 0, 0, 0.48);
  content: "♛";
  font-size: clamp(0.7rem, 3.2vw, 1.8rem);
  line-height: 1;
  text-shadow: 0 1px 2px #000, 0 0 6px rgba(255, 217, 104, 0.48);
}

@media (max-width: 420px) {
  .board-wrap {
    padding: 0.5rem;
  }

  .grid-board {
    border-width: 4px;
  }

  .checker {
    width: 94%;
  }
}
