html.tm-story-open,
html.tm-story-open body {
  overflow: hidden;
}

.tm-stories {
  --tm-story-accent: #ff580d;
  --tm-story-ring: linear-gradient(135deg, #f59e0b, #ff580d 40%, #ea580c 70%, #c026d3);
  padding: 16px 0 10px;
  background: #fff;
  border-bottom: 1px solid #f3f3f3;
  overflow-x: clip;
  max-width: 100%;
}

.tm-stories__head {
  display: none;
}

.tm-stories__heading {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: #111;
}

.tm-stories__rail {
  display: flex;
  gap: 14px;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  padding: 2px 16px 10px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  max-width: min(1280px, 100%);
  margin: 0 auto;
  position: relative;
}

.tm-stories__rail::-webkit-scrollbar {
  display: none;
}

.tm-stories__item {
  flex: 0 0 auto;
  width: 76px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  scroll-snap-align: start;
  -webkit-tap-highlight-color: transparent;
  font: inherit;
  color: inherit;
}

.tm-stories__ring {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  padding: 2.5px;
  background: var(--tm-story-ring);
  box-sizing: border-box;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
}

.tm-stories__item.is-seen .tm-stories__ring {
  background: #d1d5db;
}

.tm-stories__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 2.5px solid #fff;
  background: #f3f4f6;
}

.tm-stories__avatar--fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 800;
  color: #6b7280;
}

.tm-stories__label {
  width: 100%;
  min-height: 2.5em;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  color: #333;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  hyphens: auto;
}

@media (min-width: 900px) {
  .tm-stories {
    padding: 18px 0 12px;
  }

  .tm-stories__item {
    width: 84px;
  }

  .tm-stories__ring {
    width: 72px;
    height: 72px;
  }

  .tm-stories__label {
    font-size: 12px;
  }
}

/* Viewer */
.tm-story-viewer {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  box-sizing: border-box;
}

.tm-story-viewer[hidden] {
  display: none !important;
}
