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

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #17141a;
  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(2, 1fr);
  gap: 8px;
  list-style: none;
  margin: 0;
  padding: 0;
  width: 188px;
  max-width: 100%;
}

.tile {
  aspect-ratio: 4/3;
  border-radius: 8px;
  outline: none;
  cursor: pointer;
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  transition: transform 220ms ease-out, box-shadow 220ms ease-out;
}

.tile:nth-child(1) {
  background: linear-gradient(155deg, #2f6df6 0%, #17141a 100%);
}

.tile:nth-child(2) {
  background: linear-gradient(205deg, #fff7e6 0%, #2f6df6 100%);
}

.tile:nth-child(3) {
  background: linear-gradient(115deg, #2f6df6 0%, #fff7e6 60%);
}

.tile:nth-child(4) {
  background: linear-gradient(250deg, #17141a 0%, #2f6df6 100%);
}

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

.gallery.is-demo .tile {
  animation: lift-loop 2s ease-out infinite;
}

.gallery.is-demo .tile:nth-child(2) {
  animation-delay: -0.5s;
}

.gallery.is-demo .tile:nth-child(3) {
  animation-delay: -1s;
}

.gallery.is-demo .tile:nth-child(4) {
  animation-delay: -1.5s;
}

@keyframes lift-loop {
  0%, 10% {
    transform: translateY(0) scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
  25%, 35% {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
  50%, 100% {
    transform: translateY(0) scale(1);
    box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  }
}
@media (hover: none) {
  .tile:active {
    transform: translateY(-4px) scale(1.03);
    box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  }
}
@media (prefers-reduced-motion: reduce) {
  .tile {
    transition: none;
  }
  .gallery.is-demo .tile {
    animation: none;
  }
}
