* {
  margin: 0;
  padding: 0;
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

body {
  font-family: "Yrsa", serif;
  line-height: 1.6;
  font-size: 18px;
}

* {
  -webkit-box-sizing: border-box;
          box-sizing: border-box;
}

@-webkit-keyframes appear {
  from {
    opacity: 0;
    scale: 0.25;
    -webkit-transform: translateY(100%);
            transform: translateY(100%);
  }
  to {
    opacity: 1;
    scale: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.25;
    -webkit-transform: translateY(100%);
            transform: translateY(100%);
  }
  to {
    opacity: 1;
    scale: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}
main {
  background-color: #e4e72c;
}
main section {
  padding: 20px;
  max-width: 820px;
  background-color: #eee;
  margin-left: auto;
  margin-right: auto;
}
main h1 {
  font-size: 3em;
  text-align: center;
  padding: 1em 0;
}
main h2 {
  font-size: 1.5em;
  text-align: center;
  padding: 3em 0;
}
main img {
  width: 100%;
  max-width: 400px;
  aspect-ratio: 1/1;
  border-radius: 3rem;
  -webkit-box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.18), 0 0.75px 3px 0 rgba(0, 0, 0, 0.125);
          box-shadow: 0 4px 16px 0 rgba(31, 38, 135, 0.18), 0 0.75px 3px 0 rgba(0, 0, 0, 0.125);
}
main ul {
  padding: 120px 0 0 0;
  display: -ms-grid;
  display: grid;
  -ms-grid-columns: 1fr 1rem 1fr;
  grid-template-columns: repeat(2, 1fr);
  gap: 0 1rem;
  -webkit-box-pack: center;
      -ms-flex-pack: center;
          justify-content: center;
}
main li {
  list-style: none;
}
main li:nth-child(even) {
  margin-top: 35%;
}
main li:nth-child(odd) {
  margin-top: -35%;
}
main img {
  background-color: lightblue;
}
main img:nth-child(2) {
  background-color: yellow;
}

@keyframes appear {
  from {
    opacity: 0;
    scale: 0.25;
    -webkit-transform: translateY(100%);
            transform: translateY(100%);
  }
  to {
    opacity: 1;
    scale: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
}
@-webkit-keyframes disappear {
  from {
    opacity: 1;
    scale: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  to {
    opacity: 0;
    scale: 0.65;
    -webkit-transform: translateY(-100%);
            transform: translateY(-100%);
  }
}
@keyframes disappear {
  from {
    opacity: 1;
    scale: 1;
    -webkit-transform: translateY(0);
            transform: translateY(0);
  }
  to {
    opacity: 0;
    scale: 0.65;
    -webkit-transform: translateY(-100%);
            transform: translateY(-100%);
  }
}
@media (prefers-reduced-motion: no-preference) {
  #app[example-number="2"] img {
    -webkit-animation: appear linear;
            animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0 cover 35%;
  }
}

@media (prefers-reduced-motion: no-preference) {
  #app[example-number="3"] img {
    -webkit-animation: appear linear;
            animation: appear linear;
    animation-timeline: view();
    animation-range: entry 0 cover 45%;
  }
  #app[example-number="3"] li:has(img) {
    -webkit-animation: disappear linear forwards;
            animation: disappear linear forwards;
    animation-timeline: view();
    animation-range: exit 0 exit 45%;
  }
}