The year is 2021. A frightened, angry crowd lines up outside a medical center, desperate for a cure for a terrible virus. “He pushed in front!” someone shouts.

Talk about timing. When he began making “Little Fish,” an intimate and affecting romance in a sci-fi setting, director Chad Hartigan had no idea the world would be coping with a real pandemic in the real 2021. Watching this fictional society begin to fray in panic feels just a tad too close for comfort.

Perhaps it’s for the best, then, that “Little Fish,” starring the very appealing duo of Olivia Cooke and Jack O’Connell, is a sci-fi romance that doesn’t spend too much time on the “sci."

Yes, this virus -- NIA, or Neuroinflammatory Affliction -- terrifyingly causes its victims to lose their memories, sometimes suddenly and sometimes slowly, with no relation to age, gender or anything else. But the focus here is on the role that memory plays in a relationship. Obviously, the memories we create together are crucial building blocks. But if they disappear, does the love remain? And what does that look like? Without a past, can we have a present, not to mention a future?

We begin on a windswept beach in the Seattle area. A young woman, Emma, sits alone, crying. A friendly dog runs up for a cuddle, soon followed by its owner, Jude. He's surprised by her charming northern England accent. They smile.

The clever script by Mattson Tomlin flips around in time over the couple's yearlong relationship, from first cute kiss — on line for the bathroom in a club — to moving in together, to cute proposal in a pet store, to marriage. While the approach is not linear, it doesn’t feel confusing, either, although it might be if you really tried to chronologize everything.

There’s no question we’re rooting for both of these charismatic characters. Emma, a veterinary technician, aims for a better future as a scientist. Jude is a photographer who’s been chronicling the touring rock band led by his friend, Ben. When he texts Emma soon after they meet, she’s at a Halloween party, He invites her to his party instead. She looks like George Washington, but says she’s dressed as 18th-century French veterinarian Claude Bourgelat. By the time she gets upstairs, he knows exactly who that is. “What’s your costume, guy who Googles things and pretends he already knows them?” she cracks, sweetly.

Soon they're a couple, building memories together like that time they painted their walls yellow — Emma’s favorite color — and had a rambunctious paint fight. But remember — these memories come to us just as they're getting lost. And so we wonder: Whose memories are we seeing, anyway? His, hers, or no one's?

The first scary reports seem far away from everyday life. There’s a fisherman who forgot how to operate his boat, so he jumped into the water to swim home. People suddenly forget how to drive cars. Most seriously, pilots lose the ability to fly, midair.

Then the virus hits Ben (Raúl Castillo). His girlfriend Sam (the singer-songwriter Soko, performing some of her own work) takes him to a tattoo parlor and has a key piece of music inked onto his arm.

And then, Jude. At first it’s the little details -- he shows up hours late to a job taking wedding pictures. He forgets arguments he and Emma just had. One day Emma sees that he's labeled the back of a photo: “Emma, wife." It's a desperate race against time to find a cure, or a treatment. Cooke's slow-burn panic is heartbreaking to watch.

The film has strong echoes of the 2004 classic “Eternal Sunshine of the Spotless Mind,” where the same question arose: What remains when memories disappear? On top of this, “Little Fish” asks, how much are we allowed to mourn when the grief is not unique to us?

Or, in a line from Emma that surely couldn't be more timely in the real 2021: “When your disaster is everyone’s disaster, how do you grieve?”

“Little Fish,” an IFC Films release, is unrated by the Motion Picture Association of America. Running time: 101 minutes. Three stars out of four.

___

Follow Jocelyn Noveck on Twitter at www.twitter.com/JocelynNoveckAP

Copyright 2021 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed without permission.