.checkers-game {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, .82fr);
  grid-template-areas: "board sidebar";
  gap: clamp(16px, 3.3vw, 42px);
  align-items: start;
  margin-top: 24px;
  padding: clamp(12px, 3vw, 31px);
  border-radius: 14px;
  color: #fff9e6;
  background: var(--felt);
}

.checkers-sidebar {
  grid-area: sidebar;
  display: grid;
  align-content: start;
  gap: 21px;
  padding-top: 6px;
}

.checkers-frame {
  grid-area: board;
  width: min(650px, 100%);
  padding: clamp(7px, 1.1vw, 14px);
  border: 1px solid #96734e;
  border-radius: 10px;
  background: repeating-linear-gradient(174deg, #dbaf8660 0 1px, transparent 1px 9px),
    linear-gradient(115deg, #a97a56, #d0a375 48%, #ad7a54);
  box-shadow: 0 12px 17px #0e251958, inset 0 0 0 2px #68442f50;
}

.checkers-board {
  display: grid;
  width: 100%;
  aspect-ratio: 1;
  grid-template-rows: repeat(8, minmax(0, 1fr));
  border: 1px solid #533c26;
}

.checkers-rank {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
}

.checkers-square {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: none;
  color: #354535;
  background: #eedbb4;
}

.checkers-square[data-dark="true"] {
  color: #fff3d1;
  background: #537260;
}

.checkers-square[aria-disabled="true"] {
  cursor: default;
}

.checkers-square[data-last="true"] {
  box-shadow: inset 0 0 0 2px #e6d4a7, inset 0 0 0 3px #576452;
}

.checkers-square[data-active="true"] {
  z-index: 1;
  box-shadow: inset 0 0 0 3px #ffd779, inset 0 0 0 5px #234233;
}

.checkers-square[data-landing="true"]::before {
  content: "";
  width: 34%;
  height: 34%;
  border-radius: 50%;
  border: 2px solid #ffe194;
  background: #243e34;
}

.checkers-square[data-available="true"]::after {
  content: "";
  position: absolute;
  top: 6%;
  right: 6%;
  width: clamp(5px, 15%, 9px);
  aspect-ratio: 1;
  border: 1px solid #294b3d;
  border-radius: 50%;
  background: #ffe194;
  pointer-events: none;
}

.checkers-square[data-available="true"]:hover .checkers-token {
  outline: 2px solid #ffe194;
  outline-offset: 1px;
}

.checkers-square:focus-visible {
  z-index: 2;
  outline: 3px solid #ffecab;
  outline-offset: -4px;
  box-shadow: inset 0 0 0 7px #20392c;
}

.checkers-token {
  display: inline-grid;
  place-items: center;
  flex: none;
  aspect-ratio: 1;
  width: 75%;
  border: 1px solid var(--token-edge);
  border-radius: 50%;
  color: var(--token-ink);
  background: radial-gradient(circle, transparent 46%, var(--token-rim) 47% 51%, transparent 53% 57%, var(--token-rim) 59% 63%, transparent 65%),
    linear-gradient(150deg, var(--token-light), var(--token-face) 60%, var(--token-edge));
  box-shadow: 0 2px 0 var(--token-edge), 0 3px 4px #18271d7a;
  font-size: 0;
}

.checkers-token-red {
  --token-light: #e28869;
  --token-face: #b04d42;
  --token-rim: #f0a78b;
  --token-edge: #732b2d;
  --token-ink: #fff5cb;
}

.checkers-token-ivory {
  --token-light: #fff2ca;
  --token-face: #e7cca0;
  --token-rim: #9b784a;
  --token-edge: #816243;
  --token-ink: #61482e;
}

.checkers-token.checkers-king {
  font-size: clamp(.84rem, 4vw, 2.2rem);
  line-height: 1;
  box-shadow: 0 2px 0 var(--token-light), 0 4px 0 var(--token-edge), 0 5px 4px #18271d7a;
}

.checkers-notation {
  position: absolute;
  color: inherit;
  font: 750 clamp(.55rem, 1.4vw, .8rem)/1 var(--sans);
  pointer-events: none;
}

.checkers-rank-label {
  top: 3px;
  left: 4px;
}

.checkers-file-label {
  bottom: 3px;
  right: 4px;
}

.checkers-score {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkers-score p {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 5px 11px 6px;
  border: 1px solid #d4dbbc73;
  border-radius: 30px;
  font-size: .88rem;
}

.checkers-score .checkers-token {
  width: 17px;
  border: 1px solid #ffe2bb;
  box-shadow: none;
}

.checkers-score b {
  margin-left: 3px;
  font-variant-numeric: tabular-nums;
}

.checkers-status {
  min-height: 112px;
}

.checkers-status h2 {
  color: #fff6d8;
  font-size: clamp(1.85rem, 3.9vw, 3rem);
}

.checkers-status p {
  max-width: 35ch;
  margin-top: 9px;
}

.checkers-setup label {
  display: block;
  margin-bottom: 6px;
  font-size: .88rem;
  font-weight: 700;
}

.checkers-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.checkers-actions select {
  min-height: 44px;
  min-width: 0;
  max-width: 100%;
  padding: 6px 9px;
  border: 1px solid #dbd3a6;
  border-radius: 7px;
  color: #203a31;
  background: #fff9e6;
}

.checkers-actions .btn {
  min-height: 44px;
  color: #16372c;
  background: var(--gold);
}

.checkers-actions :focus-visible {
  outline-color: #ffecab;
}

.checkers-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.checkers-rules {
  max-width: 75ch;
  margin-top: 20px;
  padding: 15px 18px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: var(--ink);
  background: #fffdf6;
}

.checkers-rules summary {
  width: fit-content;
  font-weight: 750;
  cursor: pointer;
}

.checkers-rules ul {
  padding-left: 1.2em;
}

.checkers-rules li + li {
  margin-top: 6px;
}

@media (max-width: 680px) {
  .checkers-game {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "sidebar" "board";
    max-width: 540px;
  }

  .checkers-sidebar {
    gap: 13px;
    padding-top: 0;
  }

  .checkers-status {
    min-height: 83px;
  }

  .checkers-status h2 {
    font-size: clamp(1.65rem, 6vw, 2.3rem);
  }

  .checkers-status p {
    margin-top: 5px;
    font-size: .94rem;
  }
}
