/* Toons: standalone animated mural characters with transparent grounds.
   Markup (decorative, one per character across the whole site; see docs/TOONS.md):
   <figure class="toon" style="--w:260px" data-toon="hearts-beat" aria-hidden="true">
     <img src="/toon/hearts-beat-still.webp" alt="" width="266" height="480" loading="lazy">
   </figure>
   Options: --w (width, default 240px), --tilt (e.g. -4deg), class .toon--flip to mirror the facing direction.
   The still's width/height attributes hold the box, so nothing jumps when the video swaps in. */
.toon{
  position:relative;
  display:block;
  width:var(--w,240px);
  max-width:100%;
  margin:0;
  line-height:0;
  pointer-events:none;
  user-select:none;
  -webkit-user-select:none;
  transform:rotate(var(--tilt,0deg)) scaleX(var(--toon-flip,1));
}
.toon--flip{--toon-flip:-1}
.toon img,
.toon video{
  display:block;
  width:100%;
  height:auto;
  background:none;
  border:0;
  box-shadow:none;
  filter:none;
}
.toon video{
  position:absolute;
  inset:0;
  height:100%;
  object-fit:contain;
  opacity:0;
}
/* toon.js adds .is-live on the video's first `playing` event: same first frame, so no flash */
.toon.is-live video{opacity:1}
.toon.is-live img{visibility:hidden}
@media (prefers-reduced-motion:reduce){
  .toon video{display:none}
  .toon.is-live img{visibility:visible}
}
