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

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

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

.photo {
  margin: 0;
  width: min(160px, 50vw);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  border: 3px solid #17141a;
  outline: none;
  cursor: pointer;
}

.photo__pic {
  display: block;
  position: relative;
  aspect-ratio: 4/3;
  background: linear-gradient(155deg, #17141a 0%, #2f6df6 100%);
}

.photo__sun {
  position: absolute;
  top: 16%;
  right: 18%;
  width: 20%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: #fff7e6;
}

.photo__hill {
  position: absolute;
  left: -8%;
  right: -8%;
  bottom: -10%;
  height: 48%;
  border-radius: 50% 50% 0 0/100% 100% 0 0;
  background: #ff4d1f;
  opacity: 0.6;
}

.photo__sweep {
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 247, 230, 0.65) 50%, transparent 70%);
  transform: translateX(-120%);
  pointer-events: none;
}

.photo:hover .photo__sweep,
.photo:focus-visible .photo__sweep,
.photo:active .photo__sweep {
  transform: translateX(120%);
  transition: transform 600ms ease-out;
}

.photo__cap {
  word-break: keep-all;
  margin: 0;
  padding: 10px 14px;
  font-weight: 600;
  font-size: clamp(12px, 3.4vw, 14px);
  line-height: 1.3;
  font-family: inherit;
  color: #fff7e6;
  background: #17141a;
}

.photo.is-demo .photo__sweep {
  animation: sweep-loop 2s ease-out infinite;
}

@keyframes sweep-loop {
  0%, 15% {
    transform: translateX(-120%);
  }
  65% {
    transform: translateX(120%);
  }
  100% {
    transform: translateX(120%);
  }
}
@media (hover: none) {
  .photo:active .photo__sweep {
    transform: translateX(120%);
    transition: transform 600ms ease-out;
  }
}
@media (prefers-reduced-motion: reduce) {
  .photo__sweep {
    transition: none;
  }
  .photo.is-demo .photo__sweep {
    animation: none;
    transform: translateX(-120%);
  }
}
