/* The big screen for Naughty List. Its screens are drawn in tv-naughty.js from the approved pictures, in the
   picture's own pixels (--u, set in tv-jingle.css). The morning story is four frames that fade one into the next. */

/* While a Naughty List screen is up it has the whole window: its own top line and workshop, no snow. */
body.naughty-on { background: #0c1733; }
body.naughty-on #snow, body.naughty-on #bar, body.naughty-on #progress { display: none; }
body.naughty-on .stage { inset: 0; padding: 0; text-align: left; }

/* The pictures were drawn with a box's padding added to its size, and with the writing's own line height. */
.nl, .nl *:not(button) { box-sizing: content-box; }
.nl { line-height: normal; }
.nl b { font-weight: 700; }

/* The story: one frame on at a time. */
.nl-frame { position: absolute; left: 0; top: 0; width: calc(1280 * var(--u)); height: calc(720 * var(--u)); overflow: hidden; opacity: 0; transition: opacity .6s ease; }
.nl-frame.on { opacity: 1; }

/* What moves. Inside the story a frame's movement starts when that frame comes up. */
@keyframes nl-bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 calc(-10 * var(--u)); } }
@keyframes nl-drop { 0% { translate: 0 calc(-420 * var(--u)); opacity: 0; } 60% { translate: 0 calc(10 * var(--u)); opacity: 1; } 80% { translate: 0 calc(-6 * var(--u)); } 100% { translate: 0 0; opacity: 1; } }
@keyframes nl-swing { 0%, 100% { rotate: -2deg; } 50% { rotate: 2deg; } }
@keyframes nl-slide { 0% { translate: calc(-700 * var(--u)) calc(-260 * var(--u)); rotate: -30deg; opacity: 0; } 70% { translate: 0 0; rotate: 6deg; opacity: 1; } 100% { translate: 0 0; rotate: 0deg; opacity: 1; } }
@keyframes nl-waddle { 0%, 100% { rotate: -5deg; } 50% { rotate: 5deg; } }
@keyframes nl-pop { 0% { scale: 0; } 70% { scale: 1.15; } 100% { scale: 1; } }
@keyframes nl-rise { 0% { translate: 0 calc(40 * var(--u)); opacity: 0; } 100% { translate: 0 0; opacity: 1; } }
@keyframes nl-lid { 0% { translate: calc(220 * var(--u)) calc(130 * var(--u)); rotate: 0deg; } 100% { translate: 0 0; rotate: -24deg; } }
@keyframes nl-glow { 0%, 100% { scale: 1; } 50% { scale: 1.06; } }
/* A lover posted for love: their label or their parcel comes in from the side, after the others (2026-11-30). */
@keyframes nl-slidein { 0% { translate: calc(760 * var(--u)) 0; rotate: 16deg; opacity: 0; } 75% { translate: calc(-14 * var(--u)) 0; rotate: -2deg; opacity: 1; } 100% { translate: 0 0; rotate: 0deg; opacity: 1; } }

.nl-bob { animation: nl-bob 1.6s ease-in-out infinite; }
.nl-drop { animation: nl-drop 1.1s ease-out .4s both; }
.nl-swing { animation: nl-swing 2.4s ease-in-out infinite; transform-origin: 10% 50%; }
.nl-slide { animation: nl-slide 1.2s cubic-bezier(.2, .8, .3, 1) both; }
.nl-waddle { animation: nl-waddle .9s ease-in-out infinite; transform-origin: 50% 100%; }
.nl-pop { animation: nl-pop .5s ease-out .6s both; }
.nl-rise { animation: nl-rise .7s ease-out .5s both; }
.nl-lid { rotate: -24deg; animation: nl-lid .8s cubic-bezier(.2, .9, .3, 1.2) .5s both; }
.nl-glow { animation: nl-glow 2s ease-in-out infinite; }
.nl-slidein { animation: nl-slidein 1.1s cubic-bezier(.2, .8, .3, 1) .6s both; }

.nl-frame:not(.on) :is(.nl-bob, .nl-drop, .nl-swing, .nl-slide, .nl-waddle, .nl-pop, .nl-rise, .nl-lid, .nl-slidein) { animation: none; }

@media (prefers-reduced-motion: reduce) {
  .nl * { animation: none !important; }
  .nl-frame { transition: none; }
}
