{
  height: 800px;
  margin: 0;
  display: grid;
  grid-template-rows: 900px 100px;
  grid-template-columns: 1fr 30px 30px 30px 30px 30px 30px 1fr;
  align-items: center;
  justify-items: center;
  overflow-wrap: normal;
}

main#carousel {
  grid-row: 1 / 2;
  grid-column: 1 / 6;
  width: none;
  height: 600px;
  display: flex;
  align-items: left;
  justify-content: center;
  transform-style: preserve-3d;
  perspective: 800px;
  --items: 6;
  --middle: 4;
  --position: 1;
}

div.slide {
  position: absolute;
  width: 400px;
  height: 600px;
  background-color: white;
  padding: 10px;
  overflow-wrap: normal;
  --r: calc(var(--position) - var(--offset));
  --abs: max(calc(var(--r) * -1), var(--r));
  transition: all 0.25s linear;
  transform: rotateY(calc(-10deg * var(--r)))
    translateX(calc(-450px * var(--r)));
  z-index: calc((var(--position) - var(--abs)));
}

div.slide:nth-of-type(1) {
  --offset: 1;
  background-color: #ffffff;
}
div.slide:nth-of-type(2) {
  --offset: 2;
  background-color: #ffffff;
}
div.slide:nth-of-type(3) {
  --offset: 3;
  background-color: #ffffff;
}
div.slide:nth-of-type(4) {
  --offset: 4;
  background-color: #ffffff;
}
div.slide:nth-of-type(5) {
  --offset: 5;
  background-color: #ffffff;
}
div.slide:nth-of-type(6) {
  --offset: 6;
  background-color: #ffffff;
}

input:nth-of-type(1) {
  grid-column: 2 / 3;
  grid-row: 2 / 3;
}
input:nth-of-type(1):checked ~ main#carousel {
  --position: 1;
}

input:nth-of-type(2) {
  grid-column: 3 / 4;
  grid-row: 2 / 3;
}
input:nth-of-type(2):checked ~ main#carousel {
  --position: 2;
}

input:nth-of-type(3) {
  grid-column: 4 /5;
  grid-row: 2 / 3;
}
input:nth-of-type(3):checked ~ main#carousel {
  --position: 3;
}

input:nth-of-type(4) {
  grid-column: 5 / 6;
  grid-row: 2 / 3;
}
input:nth-of-type(4):checked ~ main#carousel {
  --position: 4;
}

input:nth-of-type(5) {
  grid-column: 6 / 7;
  grid-row: 2 / 3;
}
input:nth-of-type(5):checked ~ main#carousel {
  --position: 5;
}

input:nth-of-type(6) {
  grid-column: 7 / 8;
  grid-row: 2 / 3;
}
input:nth-of-type(6):checked ~ main#carousel {
  --position: 6;
}