.video-feed {
  position: relative;
  max-width: 1500px;
  margin: auto;
  padding: 8px 24px 12px;
  color: var(--ui-text, #f5f4f7);
}
.feed-top {
  position: absolute;
  top: 16px;
  right: 24px;
  z-index: 3;
}
.feed-more summary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  color: inherit;
  border-radius: 8px;
  cursor: pointer;
}
.feed-more summary:hover,
.feed-more[open] summary {
  background: #24212b;
}
.feed-more summary {
  background: rgb(20 18 26 / 90%);
  list-style: none;
  font-size: 14px;
}
.feed-more summary::-webkit-details-marker {
  display: none;
}
.feed-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  width: min(340px, calc(100vw - 24px));
  max-height: calc(100dvh - 160px);
  overflow-y: auto;
  scrollbar-color: #655d75 #19171e;
  background: #19171e;
  border: 1px solid #514b60;
  border-radius: 12px;
  padding: 20px;
  font-size: 14px;
}
.feed-menu label {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  cursor: pointer;
}
.feed-browse {
  justify-content: space-between;
  margin-bottom: 20px;
}
.feed-autoplay input {
  accent-color: #8b70ff;
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}
.feed-autoplay small {
  display: block;
  font-size: 13px;
  color: #c8c2d2;
  line-height: 1.5;
  margin-top: 4px;
}
.feed-usage {
  margin: 20px 0;
  padding-top: 16px;
  border-top: 1px solid #39333f;
}
.feed-usage h2 {
  font-size: 14px;
  margin: 0 0 8px;
}
.feed-usage p {
  color: #c8c2d2;
  margin: 8px 0 0;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}
#feed-scope,
#feed-reason {
  background: #19171e;
  color: #f5f4f7;
  border: 1px solid #655d75;
  padding: 10px;
  min-height: 44px;
  border-radius: 8px;
}
.feed-stage {
  position: relative;
  height: calc(100dvh - 90px);
  min-height: 260px;
  background: #000;
  isolation: isolate;
  touch-action: pan-x;
}
#feed-video {
  display: block;
  width: calc(100% - 64px);
  height: 100%;
  object-fit: contain;
}
.feed-cover {
  position: absolute;
  inset: 0 64px 0 0;
  display: grid;
  place-items: center;
  background: rgb(0 0 0 / 55%);
  text-align: center;
  padding: 24px;
}
.feed-cover[hidden] {
  display: none;
}
.feed-cover > div {
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 380px;
}
.feed-cover h2 {
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 16px;
  overflow-wrap: anywhere;
}
.feed-cover p {
  order: 2;
  color: #e0dce6;
  font-size: 14px;
  line-height: 1.6;
  margin: 12px 0 0;
}
.feed-cover p:empty {
  display: none;
}
.feed-cover .button {
  min-height: 52px;
  min-width: 164px;
  font-size: 16px;
}
.feed-controls {
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.feed-controls button {
  width: 48px;
  height: 48px;
  padding: 12px;
}
#feed-prev .icon {
  transform: rotate(-90deg);
}
#feed-next .icon {
  transform: rotate(90deg);
}
#feed-save {
  margin-top: 12px;
}
#feed-save[aria-pressed='true'] {
  color: #c5b5ff;
  border-color: #b397ff;
}
.feed-notice {
  margin: 8px 0 0;
  font-size: 14px;
  color: #d4cfde;
  line-height: 1.5;
}
.feed-notice:empty {
  display: none;
}
#feed-report-dialog {
  max-width: min(440px, 94vw);
  background: #17151e;
  color: #f5f4f7;
  border: 1px solid #514b60;
  border-radius: 12px;
  padding: 24px;
}
#feed-report-dialog label {
  display: grid;
  gap: 8px;
  margin: 20px 0;
}
.video-feed :focus-visible {
  outline: 2px solid #c5b5ff;
  outline-offset: 4px;
}
.video-feed ::selection {
  background: #6650a8;
  color: white;
}
@media (max-width: 640px) {
  .video-feed {
    padding: 4px 12px max(12px, env(safe-area-inset-bottom));
  }
  .feed-top {
    top: 8px;
    right: 12px;
  }
  .feed-menu select {
    font-size: 16px;
    max-width: 200px;
  }
  .feed-stage {
    height: calc(100dvh - 146px);
  }
  #feed-video {
    width: 100%;
  }
  .feed-controls {
    right: 4px;
    gap: 12px;
  }
  .feed-controls button {
    background: rgb(20 18 26 / 90%);
  }
  .feed-cover {
    right: 0;
    padding: 18px 64px 18px 14px;
  }
  .feed-cover h2 {
    font-size: 20px;
  }
}

.video-feed:is(:fullscreen, :-webkit-full-screen) {
  max-width: none;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  margin: 0;
  padding: max(8px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right))
    max(12px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  background: #000;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.video-feed:is(:fullscreen, :-webkit-full-screen) .feed-stage {
  flex: 1;
  height: auto;
  min-height: 200px;
}
.video-feed:is(:fullscreen, :-webkit-full-screen) .feed-notice {
  flex-shrink: 0;
}
