html, body {
    margin: 0;
    height: 100%;
    background: black;
    color: white;
}

main {
    min-height: 100vh;
    min-height: 100dvh;
    box-sizing: border-box;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
}

/* Fliers are 1200x1500. Fit the taller of viewport width or height, leaving room for the credit line. */
#flier {
    position: relative;
    display: block;
    aspect-ratio: 4 / 5;
    width: min(100%, calc((100vh - 96px) * 0.8));
    width: min(100%, calc((100dvh - 96px) * 0.8));
}

#flier img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 2.5s ease-in-out;
}

/* Outgoing frame stays fully visible underneath so the crossfade never dips toward black. */
#flier img.prev {
    opacity: 1;
    z-index: 0;
    transition: none;
}

#flier img.on {
    opacity: 1;
    z-index: 1;
}

#credit {
    margin: 0;
    font: 11px/1.4 ui-monospace, Menlo, Consolas, monospace;
    letter-spacing: 0.04em;
    color: #777;
}

#credit a {
    color: inherit;
    text-decoration: none;
}

#credit a:hover {
    color: #ccc;
    text-decoration: underline;
}
