:root {
  --story-size: 72px;
  --avatar-border-gradient: conic-gradient(#78d620, #2a5403, #7dd474);
}

.stories-container {
  width: 400px;
  margin: 0 auto;
  overflow: hidden;
}


.stories-wrapper::-webkit-scrollbar {
  display: none;
}

.stories-wrapper {
  scroll-behavior: smooth;
}

.stories-wrapper {
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
  display: flex;
  gap: 12px;
  overflow-x: auto;
  padding: 10px 0px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.stories-wrapper::-webkit-scrollbar {
  display: none;
}

.story {
  cursor: pointer;
  width: var(--story-size);
  text-align: center;
  user-select: none;
  flex-shrink: 0;
}

.story-avatar {
  width: var(--story-size);
  height: var(--story-size);
  border-radius: 50%;
  background: var(--avatar-border-gradient);
  padding: 3px;
  display: grid;
  place-items: center;
  position: relative;
  box-sizing: border-box;
}

.story-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid white;
}

.story-label {
  margin-top: 6px;
  font-size: 12px;
  color: #3d3d3d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@keyframes storyRotation {
  from {
    filter: hue-rotate(0deg);
  }

  to {
    filter: hue-rotate(360deg);
  }
}

#blind-cover {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, .75);
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-in-out;
  z-index: 999;
}

#blind-cover.active {
  opacity: 1;
  pointer-events: auto;
}

.story-modal {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s ease-in-out;
  z-index: 1000;
}

.story-modal.active {
  opacity: 1;
  pointer-events: auto;
}

.story-modal-content {
  width: min(380px, 92vw);
  aspect-ratio: 9 / 16;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  position: relative;
}

.story-modal-content img.story-image,
.story-modal-content video.story-video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.close-story-modal {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 0;
  background: rgba(255, 255, 255, .18);
  color: #fff;
  cursor: pointer;
  font-size: 18px;
  font-weight: bold;
  backdrop-filter: blur(8px);
  z-index: 1003;
  display: flex;
  justify-content: center;
  align-items: center;
  transition: background .2s ease;
}

.close-story-modal:hover {
  background: rgba(255, 255, 255, .3);
}

.story-tap {
  position: absolute;
  top: 0;
  height: 100%;
  width: 50%;
  z-index: 1002;
  -webkit-tap-highlight-color: transparent;
  -webkit-focus-ring-color: transparent;
  outline: none;
  user-select: none;
  cursor: pointer;
}

.story-tap:focus,
.story-tap:active {
  outline: none;
  -webkit-tap-highlight-color: transparent;
}

.story-modal * {
  -webkit-tap-highlight-color: transparent;
}

.story-prev {
  right: 0;
}

.story-next {
  left: 0;
}

@media (max-width: 480px) {
  :root {
    --story-size: 64px;
  }

  .close-story-modal {
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    font-size: 16px;
  }
}