.town-scene-frames {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.town-scene-frames img {
  position: absolute;
  display: block;
  max-width: none;
  opacity: 0;
}

.town-scene-frames img.is-playing {
  opacity: 1;
}

.town-scene-frames img {
  --edge: min(13px, 2cqw);
  mask-image:
    linear-gradient(to right, transparent, black var(--edge), black calc(100% - var(--edge)), transparent),
    linear-gradient(to bottom, transparent, black var(--edge), black calc(100% - var(--edge)), transparent);
  mask-composite: intersect;
}

.town-scene-frames img:last-child {
  mask-image:
    linear-gradient(to right, transparent, black var(--edge)),
    linear-gradient(to bottom, transparent, black var(--edge), black calc(100% - var(--edge)), transparent);
}
