/* Heart and flame taken from vegain.com (.wg-egg), scaled up via --hw. */
html, body { margin: 0; block-size: 100%; background: #fff; }
main { display: grid; place-items: center; min-block-size: 100vh; min-block-size: 100dvh; }

.egg {
  --hw: clamp(4rem, 16vmin, 8rem);     /* heart width */
  position: relative;
  padding: 0;
  border: 0;
  background: none;
  cursor: pointer;
  color: #ef402c;                      /* from HERZUEBERKOPF Logo Symbol.svg */
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;          /* no double-tap zoom, so fast taps all toggle */
}
.egg:focus-visible { outline: 2px solid currentColor; outline-offset: 0.5rem; border-radius: 0.25rem; }
.egg__heart { display: block; inline-size: var(--hw); block-size: calc(var(--hw) * 0.8875); }
.egg__flame {
  --fw: calc(var(--hw) / 0.512);       /* the heart's share of a frame */
  position: absolute;
  inset-inline-start: calc(50% - var(--fw) / 2);
  inset-block-start: calc(50% - var(--fw) * 1.4651);   /* heart centre sits at 81.7 % of the frame height */
  inline-size: var(--fw);
  block-size: calc(var(--fw) * 1.7939);
  background: url("media/heart-flame.webp") 0 0 / 1500% 100% no-repeat;
  opacity: 0;
  pointer-events: none;
  transition: opacity 200ms ease-out;
}
@keyframes burn { to { background-position: 107.143% 0; } }
.egg[aria-pressed="true"] .egg__flame { opacity: 1; animation: burn 0.6s steps(15) infinite; }
@media (hover: hover) and (pointer: fine) {
  .egg:hover .egg__flame { opacity: 1; animation: burn 0.6s steps(15) infinite; }
}
/* Reduced motion: the flame shows as one still frame, no flicker. */
@media (prefers-reduced-motion: reduce) {
  .egg .egg__flame { animation: none !important; background-position: 50% 0; transition: none; }
}
