body {
  margin: 0;
  padding: 40px 24px;
}

.container {
  display: grid;
  gap: 40px;
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1vw;
  width: 100%;
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

/* 最終形スタイル（整列した状態） */
li {
  border-radius: 16px;
  background: skyblue;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  aspect-ratio: 1 / 1;
  opacity: 1;
  transform: rotate(0deg);
  transition: opacity 0.4s, transform 0.4s;

  /* sibling-index() でスタッガー */
  transition-delay: calc((sibling-index() - 1) * 0.04s);
}

/* 初回表示時のスタイル */
@starting-style {
  li {
    --rotate-deg: calc((sibling-index() - 1) * 1.5deg);
    opacity: 0;
    transform: rotate(var(--rotate-deg));
  }
}

.cards.is-reset li {
  transition: none;
  --rotate-deg: calc((sibling-index() - 1) * 1.5deg);
  opacity: 0;
  transform: rotate(var(--rotate-deg));
}

.replay-button {
  justify-self: center;
  border: none;
  border-radius: 999px;
  padding: 12px 28px;
  background: #d6d6d6;
  color: #414141;
  font-size: 16px;
  font-weight: bold;
  cursor: pointer;
  transition: background-color 0.3s, box-shadow 0.3s;
}

@media (any-hover: hover) {
  .replay-button:hover {
    background: #b6b6b6;
    box-shadow: none;
  }
}
