html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ff4d1f;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.stage {
  padding: clamp(8px, 2.4vw, 16px);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(3, 56px);
  grid-template-rows: repeat(2, 56px);
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 184px;
  max-width: 100%;
}

.tile {
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transform: scale(1);
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tile--featured {
  grid-column: 1/3;
  grid-row: 1/3;
  background: linear-gradient(150deg, #fff7e6 0%, #ff4d1f 100%);
}

.tile--small:nth-of-type(2) {
  background: linear-gradient(60deg, #17141a 0%, #fff7e6 100%);
}

.tile--small:nth-of-type(3) {
  background: linear-gradient(200deg, #fff7e6 0%, #17141a 100%);
}

.tile:hover, .tile:focus-visible, .tile:active {
  transform: scale(1.04);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.gallery.is-demo .tile--featured {
  animation: pop-loop-lg 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.gallery.is-demo .tile--small {
  animation: pop-loop-sm 2s cubic-bezier(0.2, 0.8, 0.2, 1) infinite;
}

.gallery.is-demo .tile--small:nth-of-type(3) {
  animation-delay: -0.3s;
}

@keyframes pop-loop-lg {
  0%, 8% {
    transform: scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
  30%, 50% {
    transform: scale(1.03);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  70%, 100% {
    transform: scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
}
@keyframes pop-loop-sm {
  0%, 40% {
    transform: scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
  60%, 80% {
    transform: scale(1.06);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
}
@media (hover: none) {
  .tile:active {
    transform: scale(1.04);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile {
    transition: none;
  }
  .gallery.is-demo .tile--featured, .gallery.is-demo .tile--small {
    animation: none;
  }
}
