/* Checkers (js/games/checkers.js): the board, drawn pieces, move dots and the last move.
 * Board and piece colours are puzzle art (the same in both themes); everything else uses the
 * design system's tokens. */
.ck-room {
  --ck-frame: #3E2F24; --ck-dot: rgba(255, 255, 255, .82); --ck-last: rgba(242, 200, 121, .5); --ck-hint: rgba(163, 166, 248, .55);
  position: absolute; inset: 0; overflow: hidden; background: var(--surface-100);
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.ck-board {
  position: absolute; left: 0; top: 0; width: 320px; height: 320px; border-radius: 4px; cursor: pointer;
  box-shadow: 0 0 0 var(--ck-frame-w, 8px) var(--ck-frame), 0 calc(var(--ck-frame-w, 8px) + 10px) 30px rgba(0, 0, 0, .3);
}
.ck-squares { position: absolute; inset: 0; width: 100%; height: 100%; display: block; border-radius: 3px; }

/* pieces and marks sit on one square each (12.5% of the board), moved with translate(col×100%, row×100%) */
.ck-piece, .ck-mark { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; }
.ck-piece { z-index: 2; will-change: transform; }
.ck-piece svg { display: block; width: 88%; height: 88%; margin: 6%; overflow: visible; }
.ck-anim .ck-piece { transition: transform .24s cubic-bezier(.2, .8, .3, 1), opacity .3s ease; }
.ck-piece .ck-ring { stroke: transparent; }
.ck-piece.is-sel { z-index: 4; }
.ck-piece.is-sel .ck-ring { stroke: var(--accent); }
.ck-piece.is-sel svg { filter: drop-shadow(0 6px 8px rgba(0, 0, 0, .35)); transform: translateY(-4%); }
.ck-piece.is-drag { z-index: 6; transition: none !important; }
.ck-piece.is-taken { opacity: .3; }
.ck-piece.is-hint .ck-ring { stroke: var(--accent); animation: ck-pulse 1.1s ease-in-out 3; }
@keyframes ck-pulse { 0%, 100% { opacity: 1; } 50% { opacity: .45; } }

.ck-mark { z-index: 1; pointer-events: none; }
.ck-dot::after { content: ''; position: absolute; inset: 33%; border-radius: 50%; background: var(--ck-dot); box-shadow: 0 0 0 3px var(--accent); }
.ck-last { background: var(--ck-last); }
.ck-hintsq { background: var(--ck-hint); box-shadow: inset 0 0 0 3px var(--accent); }

.ck-nope { animation: ck-shake .38s ease; }
@keyframes ck-shake { 0%, 100% { translate: 0 0; } 20% { translate: -6% 0; } 40% { translate: 6% 0; } 60% { translate: -4% 0; } 80% { translate: 3% 0; } }

.ck-status { position: absolute; margin: 0; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0 var(--space-3); font-size: 1rem; line-height: 1.4; color: var(--ink-muted); pointer-events: none; }
.ck-status b { color: var(--ink); font-weight: 600; }
.ck-won .ck-piece:not(.ck-taken) svg { transition: filter .6s ease; }

/* the small sheets: draw, new game, game over */
.ck-confirm { display: flex; flex-direction: column; gap: var(--space-4); }
.ck-confirm p { margin: 0; }
.ck-confirm-actions { display: flex; flex-wrap: wrap; gap: var(--space-2); }

@media (prefers-reduced-motion: reduce) {
  .ck-anim .ck-piece { transition: none; }
  .ck-nope, .ck-piece.is-hint .ck-ring { animation: none; }
}

/* keyboard: a button on each dark square, above the pieces; pointers pass through to the board */
.ck-sq { position: absolute; left: 0; top: 0; width: 12.5%; height: 12.5%; z-index: 5; margin: 0; padding: 0; border: 0; background: none; pointer-events: none; }
.ck-sq:focus { outline: none; }
.ck-sq:focus-visible { outline: 4px solid var(--focus-ring); outline-offset: -4px; border-radius: 4px; box-shadow: inset 0 0 0 7px rgba(255, 255, 255, .6); }
