/* Entrance belongs to the outer tile; its inner flipper keeps its own transform. */
.railTrack[data-entrance="preparing"] .tile {
  opacity: 0;
}

.railTrack[data-entrance="falling"] .tile {
  animation: card-arrive 840ms both;
  animation-delay: calc(var(--arrival-delay, 180ms) + var(--arrival-order) * 85ms);
  will-change: transform, opacity;
  transform-origin: 50% 65%;
}

/* Keep the filtered artwork on the same layer when the entrance ends. */
.railTrack .direct-guide-tile {
  --arrival-overshoot: 0px;
  --arrival-rest-transform: translateZ(0);
  transform: var(--arrival-rest-transform);
  transform-origin: 50% 65%;
  will-change: transform, opacity;
}

@keyframes card-arrive {
  0% {
    opacity: 0;
    transform: translateY(-150px) rotate(var(--arrival-tilt));
    animation-timing-function: cubic-bezier(.32, 0, .68, 1);
  }
  22% {
    opacity: 1;
    transform: translateY(-116px) rotate(var(--arrival-tilt));
    animation-timing-function: cubic-bezier(.2, .52, .28, 1);
  }
  76% {
    opacity: 1;
    transform: translateY(var(--arrival-overshoot, 5px)) rotate(0deg);
    animation-timing-function: cubic-bezier(.3, 0, .3, 1);
  }
  100% {
    opacity: 1;
    transform: var(--arrival-rest-transform, none);
  }
}

@media (prefers-reduced-motion: reduce) {
  .railTrack[data-entrance] .tile {
    animation: none;
    opacity: 1;
    transform: none;
    will-change: auto;
  }
}

.showcase-return-curtain {
  position: fixed;
  z-index: 20;
  inset: 0;
  background: #000;
  opacity: 0;
  touch-action: none;
}

/* The edge controls sit outside the guide and must leave with its frame. */
.root[data-showcase-revealing] .roblox-guide-edge-toolbar {
  display: none;
}
