/* The story player (story.js): a phone with the app's stills rotating, a note between them, ticks along the top
   for where it is. Uses the page's own tokens. */
.stills {
  position: relative; width: 100%; max-width: 300px; margin-inline: auto; aspect-ratio: 540 / 1076;
  border-radius: 34px; padding: 9px; background: #0a0d0f; box-shadow: 0 24px 60px rgb(0 0 0 / 0.35);
  overflow: hidden; isolation: isolate;
}
.stills.sideways { max-width: 520px; aspect-ratio: 1000 / 423; border-radius: 26px; padding: 7px; }
.stills .frames { list-style: none; margin: 0; padding: 0; position: absolute; inset: 9px; border-radius: 26px; overflow: hidden; background: #1b2127; }
.stills.sideways .frames { inset: 7px; border-radius: 19px; }
.stills .frames li {
  position: absolute; inset: 0; opacity: 0; transition: opacity 0.45s ease;
}
.stills .frames li.on, .stills:not(:has(li.on)) .frames li:first-child { opacity: 1; }
.stills .frames img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: top; }
.stills .note {
  display: grid; place-content: center; justify-items: center; gap: 12px; padding: 26px; text-align: center;
  background:
    repeating-radial-gradient(ellipse 120% 90% at 70% 35%, transparent 0 22px, rgb(238 241 239 / 0.05) 22px 24px),
    #1b2127;
  color: #eef1ef;
}
.stills .note svg { width: 64px; height: 64px; color: var(--accent, #d94f1e); }
.stills .note.on svg { animation: story-pop 0.5s ease both; }
.stills .note strong { font: 800 1.7rem/1.02 var(--display, sans-serif); text-transform: uppercase; letter-spacing: 0.01em; text-wrap: balance; }
.stills.sideways .note strong { font-size: 1.5rem; }
.stills .note span { color: rgb(238 241 239 / 0.72); font-size: 1rem; line-height: 1.35; max-width: 14em; text-wrap: balance; }
@keyframes story-pop { from { transform: scale(0.7); opacity: 0; } to { transform: none; opacity: 1; } }

/* Where it is: one tick each, the current one filling while it shows. */
.stills .ticks { position: absolute; z-index: 2; top: 16px; left: 22px; right: 22px; display: flex; gap: 3px; }
.stills.sideways .ticks { top: 12px; }
.stills .ticks i { flex: 1; height: 3px; border-radius: 2px; background: rgb(255 255 255 / 0.28); overflow: hidden; }
.stills .ticks b { display: block; height: 100%; width: 0; background: #ffffff; }
.stills .ticks i.done b { width: 100%; }
.stills.running .ticks i.now b { animation: story-tick var(--ms, 3000ms) linear both; }
.stills:not(.running) .ticks i.now b { width: 100%; }
@keyframes story-tick { from { width: 0; } to { width: 100%; } }

/* Tap the left half for the one before, the right for the next. */
.stills button { position: absolute; z-index: 1; top: 0; bottom: 0; width: 50%; border: 0; padding: 0; background: transparent; cursor: pointer; }
.stills button.prev { left: 0; }
.stills button.next { right: 0; }
.stills button:focus-visible { outline: 3px solid var(--accent, #d94f1e); outline-offset: -8px; border-radius: 26px; }


@media (prefers-reduced-motion: reduce) {
  .stills .frames li { transition: none; }
  .stills .note.on svg { animation: none; }
}

/* The slot, whole in the page's layout. */
.stills-holder { width: 100%; min-width: 0; }
