:root {
  color-scheme: dark;
}

body {
  margin: 0;
  background: #090909;
  overflow: hidden;
}

.header {
  position: relative;
  z-index: 10;
}

.shorts-shell {
  position: relative;
  height: calc(100dvh - 74px);
  min-height: 420px;
  background: #090909;
  color: #fff;
}

.shorts-feed {
  width: min(100%, 430px);
  height: 100%;
  margin: 0 auto;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior-y: contain;
  scroll-snap-type: y mandatory;
  scrollbar-width: none;
  background: #000;
}

.shorts-feed::-webkit-scrollbar {
  display: none;
}

.short-slide {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  background: #000;
}

.short-slide video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
}

.short-slide::after {
  content: "";
  position: absolute;
  inset: 45% 0 0;
  pointer-events: none;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
}

.short-unmute {
  position: absolute;
  z-index: 3;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  border: 1px solid rgba(255, 255, 255, 0.4);
  border-radius: 999px;
  padding: 8px 14px;
  color: #fff;
  background: rgba(0, 0, 0, 0.58);
  font: inherit;
  cursor: pointer;
}

.short-overlay {
  position: absolute;
  z-index: 2;
  right: 18px;
  bottom: max(24px, env(safe-area-inset-bottom));
  left: 18px;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.9);
}

.short-caption {
  margin: 0 0 8px;
  font-size: clamp(1.2rem, 5vw, 1.55rem);
  line-height: 1.35;
}

.short-meta {
  min-height: 1.4em;
  margin: 0 0 14px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.9rem;
}

.short-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.short-full-link,
.short-share {
  border: 1px solid rgba(255, 255, 255, 0.38);
  border-radius: 999px;
  padding: 10px 15px;
  color: #fff;
  background: rgba(0, 0, 0, 0.56);
  font: inherit;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}

.short-full-link {
  background: rgba(102, 126, 234, 0.9);
}

.shorts-state {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: grid;
  place-items: center;
  color: rgba(255, 255, 255, 0.75);
  background: #090909;
}

.shorts-state[hidden],
.shorts-toast[hidden] {
  display: none;
}

.shorts-toast {
  position: fixed;
  z-index: 30;
  bottom: max(28px, env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  width: max-content;
  max-width: calc(100vw - 40px);
  padding: 10px 16px;
  border-radius: 999px;
  color: #fff;
  background: rgba(0, 0, 0, 0.82);
  text-align: center;
}

.short-share-overlay {
  position: fixed;
  z-index: 40;
  inset: 0;
  display: none;
  color: #fff;
  background: rgba(0, 0, 0, 0.86);
}

.short-share-overlay.show {
  display: block;
}

.short-share-overlay-close {
  position: absolute;
  top: 20px;
  left: 20px;
  border: 0;
  color: #fff;
  background: transparent;
  font-size: 2rem;
}

.short-share-overlay-guide {
  position: absolute;
  top: 28px;
  right: 24px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 1.05rem;
}

.short-share-overlay-arrow {
  font-size: 2.3rem;
  line-height: 0.7;
}

@media (min-width: 700px) {
  .shorts-shell {
    background: radial-gradient(circle at center, #252525, #090909 62%);
  }

  .shorts-feed {
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  }
}

@media (max-width: 600px) {
  .shorts-shell {
    height: calc(100dvh - 66px);
  }
}
