.game-wrap {
  max-width: 620px;
  margin: 0 auto;
  padding: 0.5rem 1rem 3rem;
  text-align: center;
  color: #fff;
}

.game-wrap h1 {
  margin: 0.4rem 0 0.2rem;
  text-shadow: 0 3px 0 rgba(0,0,0,0.15);
}

.game-wrap .sub {
  margin: 0 auto 1rem;
  max-width: 480px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  font-size: 0.92rem;
}

.hud {
  display: flex;
  justify-content: center;
  gap: 1.2rem;
  flex-wrap: wrap;
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
  padding: 0.5rem 1.2rem;
  margin: 0 auto 1rem;
  max-width: fit-content;
  font-weight: 700;
}

#msg { color: var(--gold); font-weight: 800; }

.board {
  display: grid;
  grid-template-columns: repeat(8, 1fr);
  grid-template-rows: repeat(8, 1fr);
  width: min(92vw, 480px);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 6px solid #4a3620;
}

.cell {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.cell.light { background: #f4e4c1; }
.cell.dark { background: #7a5a3a; }

.cell.movable::after {
  content: '';
  position: absolute;
  inset: 6%;
  border-radius: 50%;
  box-shadow: 0 0 0 3px rgba(255, 204, 77, 0.85);
  pointer-events: none;
  animation: pulse 1.4s ease-in-out infinite;
}

.cell.target {
  background: #22c1a1 !important;
}

@keyframes pulse {
  0%, 100% { opacity: 0.55; }
  50% { opacity: 1; }
}

.piece {
  width: 78%;
  height: 78%;
  border-radius: 50%;
  position: relative;
  box-shadow: 0 3px 6px rgba(0,0,0,0.35), inset 0 -4px 8px rgba(0,0,0,0.25), inset 0 3px 6px rgba(255,255,255,0.25);
}

.piece.red { background: radial-gradient(circle at 35% 30%, #ff9ab8, #ff6b9d 45%, #c23a67 100%); }
.piece.black { background: radial-gradient(circle at 35% 30%, #7c6ea8, #4a3f6b 45%, #241a3d 100%); }

.piece.selected { outline: 3px solid var(--gold); outline-offset: -3px; }

.piece.king::after {
  content: '★';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--gold);
  font-size: 1.1rem;
  text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

.winbanner {
  margin-top: 1rem;
  font-size: 1.3rem;
  font-weight: 800;
  color: #fff;
  text-shadow: 0 3px 0 rgba(0,0,0,0.15);
}
