.note {
  position: absolute;
  z-index: 9;
  max-width: 220px;
  padding: 9px 13px 10px;
  border-radius: 3px;
  background: #fbf5e9;
  color: #3a2a1d;
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.3;
  text-align: center;
  box-shadow: 0 10px 22px -10px rgba(0, 0, 0, .6), 0 1px 0 rgba(0, 0, 0, .05);
  transform: translate(-50%, -100%) rotate(-2deg);
  transform-origin: 50% 100%;
  pointer-events: none;
  animation: note-in .3s cubic-bezier(.3, 1.4, .5, 1);
}
.note::before {
  content: "";
  position: absolute;
  left: 50%;
  top: -5px;
  width: 10px;
  height: 10px;
  margin-left: -5px;
  border-radius: 50%;
  background: #a5303c;
  box-shadow: inset -2px -2px 0 rgba(0, 0, 0, .2);
}
.note--bubble { border-radius: 12px; font-family: var(--font); font-size: 14px; transform: translate(-50%, -100%); }
.note--bubble::before {
  top: auto;
  bottom: -7px;
  width: 14px;
  height: 14px;
  margin-left: -7px;
  border-radius: 0 0 3px 0;
  background: #fbf5e9;
  transform: rotate(45deg);
  box-shadow: none;
}
.note.is-leaving { opacity: 0; transition: opacity .3s; }
@keyframes note-in { from { opacity: 0; transform: translate(-50%, -80%) rotate(-6deg) scale(.9); } }

.confetti {
  position: fixed;
  z-index: 30;
  left: 0;
  top: 0;
  width: var(--piece-width);
  height: var(--piece-height);
  background: var(--color);
  pointer-events: none;
  animation: confetti-fly var(--lifetime) cubic-bezier(.2, .6, .4, 1) forwards;
}
@keyframes confetti-fly {
  0% { transform: translate(var(--x0), var(--y0)) rotate(0deg); opacity: 1; }
  45% { transform: translate(calc(var(--x0) + var(--dx) * .7), calc(var(--y0) + var(--dy))) rotate(calc(var(--spin) * .6)); opacity: 1; }
  100% { transform: translate(calc(var(--x0) + var(--dx)), calc(var(--y0) + var(--dy) + 140px)) rotate(var(--spin)); opacity: 0; }
}
