.feed-cue {
  position: fixed;
  z-index: 8;
  display: flex;
  align-items: center;
  gap: 4px;
  width: max-content;
  max-width: calc(100vw - 16px);
  padding: 1px 1px 1px 8px;
  border: 1.5px solid #1d1b27;
  border-radius: 6px;
  background: #242232;
  color: #fff8e7;
  box-shadow: 2px 3px 0 #1d1b2766;
  font: 650 13px/1.25 var(--sans, system-ui), sans-serif;
  pointer-events: none;
}
.feed-cue::after {
  content: '';
  position: absolute;
  left: var(--cue-pointer);
  width: 8px;
  height: 8px;
  transform: translateX(-50%) rotate(45deg);
  background: #242232;
}
.feed-cue[data-side=above]::after { bottom: -4px; }
.feed-cue[data-side=below]::after { top: -4px; }
.feed-cue[data-side=rail] .feed-cue-copy { order: -1; }
.feed-cue-arrow {
  color: #d8fc55;
  font: 800 20px/1 system-ui, sans-serif;
}
.feed-cue-sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.feed-cue-close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: 20px/1 system-ui, sans-serif;
  pointer-events: auto;
  cursor: pointer;
}
.feed-cue-close:focus-visible, .feed-account-prompt button:focus-visible {
  outline: 3px solid #bf72ef;
  outline-offset: 2px;
}
@media (prefers-reduced-motion: no-preference) {
  .feed-cue-arrow { animation: feed-swipe-up .85s ease-in-out 2; }
  @keyframes feed-swipe-up {
    0%, 100% { transform: translateY(2px); }
    55% { transform: translateY(-3px); }
  }
}

/* The invitation replaces the mast's controls for one card, without moving
   the feed or taking focus from playback or Next. */
.yt-mast:has(> .feed-account-prompt) .yt-topline { display: none; }
.feed-account-prompt {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto 44px;
  align-items: center;
  gap: clamp(3px, 1vw, 10px);
  box-sizing: border-box;
  width: min(100%, 500px);
  min-height: 44px;
  margin-inline: auto;
  padding-inline-start: clamp(10px, 2vw, 16px);
  border-radius: 22px;
  background: #242128;
  color: #fff8e7;
  box-shadow: inset 0 0 0 1px #fff8e74d;
  pointer-events: auto;
  font: 600 14px/1.15 var(--sans, system-ui), sans-serif;
}
.feed-invite-copy { text-wrap: pretty; }
.feed-invite-register, .feed-invite-dismiss {
  min-height: 44px;
  border: 0;
  border-radius: 20px;
  background: transparent;
  cursor: pointer;
}
.feed-invite-register {
  position: relative;
  padding-inline: 4px;
  color: #d8fc55;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* The reel's 32px visual pill retains the mast's full 44px tap height. */
.yt-page .feed-invite-register::after {
  content: '';
  position: absolute;
  inset: -6px 0;
}
.yt-page .feed-cue-close { font: 400 18px/1 system-ui, sans-serif; }
@media (max-width: 359px) {
  body.yt-page .feed-account-prompt {
    gap: 3px;
    padding-inline-start: 8px;
    font-size: 16px;
  }
  body.yt-page .feed-invite-register {
    padding-inline: 8px;
    font-size: 14px;
  }
}
.feed-invite-dismiss {
  width: 44px;
  padding: 0;
  color: inherit;
  font: 400 22px/1 system-ui, sans-serif;
}
@media (forced-colors: active) {
  .feed-account-prompt { outline: 1px solid CanvasText; }
  .feed-invite-register { color: LinkText; }
}
