* {
  box-sizing: border-box;
}

body {
  margin: 0;
  overflow: hidden;
  background: #101214;
  color: white;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-text-size-adjust: 100%;
}

.instagram {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 1;
  padding: 10px 14px;
  border-radius: 24px;
  background: rgb(16 18 20 / 80%);
  color: rgb(255 255 255 / 50%);
  font-size: 14px;
  text-underline-offset: 4px;
}

.instagram:focus-visible {
  outline: 2px solid white;
  outline-offset: 4px;
}

.instagram:hover,
.instagram:focus-visible {
  color: white;
}

#videos {
  --video-height: min(960px, calc(100vh - 112px), calc((100vw - 32px) * 16 / 9));
  --video-height: min(960px, calc(100dvh - 112px), calc((100vw - 32px) * 16 / 9));
  --video-inset: calc((100vh - var(--video-height)) / 2);
  --video-inset: calc((100dvh - var(--video-height)) / 2);
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: var(--video-inset) 16px;
  overflow-y: auto;
  scroll-padding-block: var(--video-inset);
  scroll-snap-type: y mandatory;
  overscroll-behavior-y: contain;
}

.reel {
  flex: 0 0 auto;
  height: var(--video-height);
  display: flex;
  align-items: center;
  justify-content: center;
  scroll-snap-align: start;
  scroll-snap-stop: always;
}

.reel video {
  display: block;
  width: auto;
  height: 100%;
  max-width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  background: #08090a;
  opacity: 0.5;
  transition: opacity 400ms ease-in-out;
}

.reel video.is-playing {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .reel video {
    transition: none;
  }
}

#status {
  position: fixed;
  inset: 50% 24px auto;
  margin: 0;
  text-align: center;
}

#status[hidden] {
  display: none;
}
