.game-root[data-game="checkers"] {
  min-height: 34rem;
  display: flex;
  flex-direction: column;
}

.game-root[data-game="checkers"].is-filled {
  overflow: hidden;
  min-height: 0;
}

.game-root[data-game="checkers"].is-filled .chk-stage {
  width: min(100%, 34rem, calc(100dvh - 8rem));
}

.game-root[data-game="checkers"].is-filled .chk-board {
  width: min(100%, calc(100dvh - 13rem));
  margin-inline: auto;
}

.chk-num {
  display: inline-block;
  min-width: 3ch;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.chk-new {
  min-width: 8.6rem;
  white-space: nowrap;
}

.chk-stage {
  width: min(100%, 34rem);
  margin-inline: auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  user-select: none;
  flex: 1 1 auto;
  min-height: 0;
  justify-content: center;
}

.chk-status {
  min-height: 4.5rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.12rem;
  text-align: center;
}

.chk-line,
.chk-note {
  margin: 0;
  line-height: 1.35;
  min-height: 1.35em;
}

.chk-line { color: #f4f0e8; }

.chk-note {
  color: #d5ddd6;
  font-size: 0.95rem;
}

.chk-note.is-good { color: #e0b948; }

.chk-legend {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  min-height: 2.75rem;
}

.chk-who {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  margin: 0;
  padding: 0 0.4rem;
  border-radius: 10px;
  color: #d5ddd6;
  font-size: 0.95rem;
  box-shadow: inset 0 0 0 1px transparent;
}

.chk-who.is-turn {
  color: #f4f0e8;
  box-shadow: inset 0 0 0 1px rgba(224, 185, 72, 0.75);
}

.chk-avatar {
  width: 1.65rem;
  height: 1.65rem;
}

.chk-key {
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 -2px 2px rgba(60, 30, 10, 0.28);
}

.chk-key.is-red,
.chk-piece.is-red {
  background:
    radial-gradient(circle at 35% 30%, #f6d2cc 0%, #d15a52 34%, #8f2f2c 68%, #641f1c 100%);
}

.chk-key.is-black,
.chk-piece.is-black {
  background:
    radial-gradient(circle at 35% 30%, #4a5568 0%, #1d2433 42%, #0d121c 100%);
}

.chk-board {
  display: grid;
  grid-template-columns: repeat(8, minmax(0, 1fr));
  grid-template-rows: repeat(8, minmax(0, 1fr));
  gap: 0;
  width: 100%;
  aspect-ratio: 1;
  border-radius: 14px;
  overflow: hidden;
  touch-action: none;
  box-shadow:
    inset 0 0 0 1px rgba(232, 217, 168, 0.38),
    inset 0 12px 24px rgba(0, 0, 0, 0.25);
  background: #14241e;
}

.chk-board.is-live {
  box-shadow:
    inset 0 0 0 1px rgba(224, 185, 72, 0.75),
    inset 0 12px 24px rgba(0, 0, 0, 0.25);
}

.chk-board.is-dragging {
  cursor: grabbing;
}

.chk-sq {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  margin: 0;
  padding: 0;
  border: 0;
  min-width: 0;
  min-height: 0;
  aspect-ratio: 1;
  background: #e8d9a8;
  color: inherit;
  cursor: default;
  touch-action: none;
}

.chk-sq.is-dark {
  background: #2a3d34;
}

.chk-sq:disabled {
  pointer-events: none;
}

.chk-sq.is-pick {
  cursor: pointer;
}

.chk-sq.is-target {
  cursor: pointer;
}

.chk-sq.is-target::after {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  background: rgba(224, 185, 72, 0.55);
  pointer-events: none;
}

.chk-sq.is-selected {
  box-shadow: inset 0 0 0 3px rgba(224, 185, 72, 0.95);
}

.chk-sq.is-last {
  box-shadow: inset 0 0 0 2px rgba(255, 253, 247, 0.55);
}

.chk-sq.is-selected.is-last {
  box-shadow: inset 0 0 0 3px rgba(224, 185, 72, 0.95);
}

.chk-sq:focus-visible {
  outline: 3px solid #e0b948;
  outline-offset: -3px;
  z-index: 1;
}

.chk-piece {
  position: absolute;
  inset: 12%;
  border-radius: 50%;
  pointer-events: none;
  box-shadow:
    inset 0 -3px 4px rgba(0, 0, 0, 0.35),
    0 2px 3px rgba(0, 0, 0, 0.25);
}

.chk-piece.is-king::before {
  content: "";
  position: absolute;
  inset: 28%;
  border-radius: 50%;
  border: 2px solid rgba(255, 246, 212, 0.85);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.chk-piece.is-draggable {
  cursor: grab;
}

@media (max-width: 640px) {
  .chk-stage { gap: 0.55rem; }
  .chk-status { min-height: 3.8rem; }
  .chk-piece { inset: 10%; }
}

@media (min-width: 720px) {
  .game-root[data-game="checkers"] { min-height: 46rem; }
}

@media (prefers-reduced-motion: reduce) {
  .chk-sq.is-target::after { transition: none; }
}
