* {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
    'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
    sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  padding: 0;
  min-height: 100vh;
  padding: 20px;
  transition: opacity 400ms ease;
}

.demo {
  position: absolute;
  max-width: 1200px;
  width: 100%;
  transform: translateX(-50%);
  top: 0;
  left: 50%;
  padding: 40px;
}

.demo > ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  grid-gap: 40px;
}

.demo > ul > li {
  position: relative;
  display: grid;
  place-content: center;
  font-size: 1.5rem;
  font-weight: bold;
  color: #fff;
  padding-top: 80%;
}

.demo > ul > li > button {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  color: #fff;
  font-size: 1.5rem;
  font-weight: bold;
  border: none;
  border-radius: 5px;
  cursor: grab;
}

@media (max-width: 767px) {
  .demo {
    top: 0;
    height: 100vh;
    overflow: auto;
    overscroll-behavior: contain;
  }
  .demo > ul {
    grid-template-columns: repeat(auto-fit, minmax(75px, 1fr));
    grid-gap: 20px;
  }

  .demo > ul > li > button {
    font-size: 1rem;
  }
}
