/* Demo page layout for this entry. Not part of the pattern. */
.stay { position: relative; width: min(420px, 100%); padding: 6px; display: grid; gap: 0; }
.crossfade { border-radius: 4px; overflow: clip; }
.xf-frame { position: relative; margin: 0; aspect-ratio: 16 / 9; }
.xf-frame svg { display: block; width: 100%; height: 100%; }
.xf-frame figcaption { position: absolute; left: 8px; bottom: 8px; display: flex; gap: 8px; align-items: baseline; max-width: calc(100% - 16px);
  padding: 4px 8px; border-radius: 4px; background: var(--demo-paper); color: var(--demo-ink); font-size: 12px; font-weight: 500; }
.xf-frame figcaption .num { font-weight: 700; }
.stay-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 8px 8px; }
.stay h1 { font-size: 17px; font-weight: 700; }
.stay-sub { color: var(--demo-mute); font-size: 13px; }
/* three ticks on the top edge that fill in step with the frames: the same 12s cycle, one third each */
.ticks { position: absolute; left: 14px; right: 14px; top: 14px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.ticks span { height: 2px; border-radius: 1px; background: rgb(255 255 255 / .45); overflow: clip; }
.ticks span::after { content: ""; display: block; height: 100%; background: #fff; transform-origin: 0 50%; scale: 0 1; animation: tick-1 12s linear infinite; }
.ticks span:nth-child(2)::after { animation-name: tick-2; }
.ticks span:nth-child(3)::after { animation-name: tick-3; }
@keyframes tick-1 { 0% { scale: 0 1; } 33.33% { scale: 1 1; } 99.9% { scale: 1 1; } 100% { scale: 0 1; } }
@keyframes tick-2 { 0%, 33.33% { scale: 0 1; } 66.67% { scale: 1 1; } 99.9% { scale: 1 1; } 100% { scale: 0 1; } }
@keyframes tick-3 { 0%, 66.67% { scale: 0 1; } 99.9% { scale: 1 1; } 100% { scale: 0 1; } }
.crossfade:hover ~ .ticks *, .crossfade:focus-within ~ .ticks *,
.crossfade-group:has(.crossfade-pause :checked) .ticks * { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .ticks { display: none; }
}
@media (max-height: 400px) {
  .stay-sub { display: none; }
}
@media (min-width: 900px) and (min-height: 560px) {
  .stay { width: 560px; }
}
