*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
  background: #000;
}

.feed {
  width: 100%;
  height: 100%;
  overflow-y: scroll;
  overflow-x: hidden;
  scroll-snap-type: y mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.feed::-webkit-scrollbar {
  display: none;
}

.feed__slide {
  position: relative;
  width: 100%;
  height: 100%;
  height: 100dvh;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
}

.feed__slide video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  background: #000;
}

.feed__back {
  position: fixed;
  top: 14px;
  left: 12px;
  z-index: 10;
  width: 52px;
  height: 52px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  filter: contrast(1.08) saturate(0.85);
  transition: transform 0.18s ease, filter 0.18s ease;
}

.feed__back:hover {
  transform: scale(1.06) rotate(-3deg);
  filter: contrast(1.15) brightness(1.05);
}

.feed__back:active {
  transform: scale(0.96) rotate(1deg);
}

.feed__back-icon {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 1px 0 rgba(0, 0, 0, 0.85));
}

.feed__hint {
  position: fixed;
  bottom: 20px;
  left: 50%;
  z-index: 10;
  transform: translateX(-50%);
  margin: 0;
  padding: 6px 12px;
  border-radius: 0;
  background: rgba(0, 0, 0, 0.45);
  color: rgba(242, 235, 224, 0.72);
  font: 12px/1.4 "Courier New", Courier, monospace;
  letter-spacing: 0.08em;
  text-transform: lowercase;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.6s ease;
}

.feed__hint.is-hidden {
  opacity: 0;
}

.feed__loading {
  position: fixed;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  color: rgba(255, 255, 255, 0.55);
  font: 13px/1.4 system-ui, sans-serif;
  letter-spacing: 0.08em;
  pointer-events: none;
}

.feed__loading.is-hidden {
  display: none;
}

.feed__empty {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  color: rgba(255, 255, 255, 0.7);
  font: 14px/1.5 system-ui, sans-serif;
  text-align: center;
}

.feed__empty.is-visible {
  display: flex;
}

.feed__slide--end {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px;
  background:
    radial-gradient(ellipse at center, rgba(20, 18, 16, 0.55) 0%, #000 72%);
}

.feed__end-note {
  position: relative;
  max-width: min(88vw, 320px);
  padding: clamp(22px, 5vw, 32px) clamp(18px, 4vw, 28px);
  background:
    linear-gradient(180deg, rgba(255, 252, 245, 0.98) 0%, rgba(242, 235, 224, 0.96) 100%);
  border: 2px solid rgba(10, 10, 10, 0.88);
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.35) inset,
    0 10px 28px rgba(0, 0, 0, 0.35);
  transform: rotate(-1.4deg);
  text-align: center;
}

.feed__end-note::before {
  content: "";
  position: absolute;
  inset: 6px;
  border: 1px dashed rgba(10, 10, 10, 0.14);
  pointer-events: none;
}

.feed__end-title {
  margin: 0 0 12px;
  color: #3f3a36;
  font-family: "Cormorant Garamond", "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1.45rem, 4.8vw, 2.1rem);
  line-height: 1.35;
  letter-spacing: 0.04em;
}

.feed__end-text {
  margin: 0;
  color: #6a635c;
  font-family: "Cormorant Garamond", "Times New Roman", Times, serif;
  font-style: italic;
  font-weight: 300;
  font-size: clamp(1rem, 3.4vw, 1.25rem);
  line-height: 1.55;
  letter-spacing: 0.03em;
}

.feed__end-hint {
  display: block;
  margin-top: 18px;
  color: rgba(90, 84, 78, 0.7);
  font: 300 11px/1.4 "Courier New", Courier, monospace;
  letter-spacing: 0.14em;
  text-transform: lowercase;
}

@media (prefers-reduced-motion: reduce) {
  .feed__back {
    transition: none;
  }

  .feed__back:hover,
  .feed__back:active {
    transform: none;
  }
}
