Hanna (right) with her boyfriend, Harry, and her girlfriend, Beaux, at Hanna’s house in Brooklyn. Isadora Kosofsky for The New York Times

Hanna, age 17, woke up from under the “Dear Evan Hansen” poster she’d duct-taped to her ceiling, pulled on her good jeans, brushed some glitter across her cheeks, ran her fingers through her rainbow hair and walked with her mother, a rabbi, down Church Avenue, in Brooklyn, to shul. Her boyfriend, Harry, was already there, 16 years old and newly manly in his purple button-down shirt. The two sat down in a fluorescent-lit room, ate bagels with schmears and discussed their coming Advanced Placement exams, disappearing into each other in that calm, fractal way of a couple inside a bubble of love that is itself floating deep inside a sea of love. Then they joined a classroom of 7-to-9-year-olds to help the religious-school teacher explain how Moses received the Ten Commandments on Mount Sinai.

Harry was the boy of Hanna’s parents’ dreams, the boy she would have been set up to marry had she lived in a shtetl in rural Jewish Russia a couple of centuries ago — as opposed to being the boy who, this spring, she sang and acted with in their school’s production of “Fiddler on the Roof.” Hanna’s father and Harry’s mother fake-planned their wedding over text before their children started dating. “I don’t like Harry,” Hanna’s mother likes to say. “You should break up with him.” Then she mutters, “Reverse psychology.”

In the synagogue, during the services that followed, Hanna and Harry sat in the back, his fingers tapping on her knee, her head resting on his shoulder, their chins occasionally tipped toward God as they sang prayers like show tunes. Harry had watched a few minutes of “The Office” on his phone earlier that day at shul. But still everybody stared and smiled at them with the confidence that all was right in that tiny corner of the world: the exhausted parents running for crayons to keep their toddlers silent, the elders naming far too many people during the mi shebeirach, the prayer for the sick.

Two by two may have worked for Noah’s animals in the (heteronormative!) Bible, but these are people — specific, glorious, teenage people — and their hearts are much bigger than anyone could imagine. As congregants spilled into the temple foyer and wished one another “Shabbat shalom,” Beaux, Hanna’s girlfriend, appeared — her face tough, tender, searching, critical, defended and vulnerable all at once. She wore boots, baggy jeans, shark-tooth earrings and a silk camisole, and her head was shaved.

Hanna met Beaux, who then went by Sophie, way back in sixth grade. At that point, they thought they were straight, though Beaux also thought the way Hanna ate cabbage, which Hanna did all the time that year, was pretty cute. Still, Hanna’s head was always in a book, or her mouth was full of vegetables, so Beaux assumed that Hanna didn’t like to talk much. Then one day Beaux decided to talk to Hanna anyway, and as Hanna explained, their friendship went wooooooosh! They started kissing each other hello on the cheek. In eighth grade, they started kissing each other hello on both cheeks. Then their middle-school classmates started saying, “That’s so gay!” to which Beaux and Hanna responded: “No, it’s not! It’s European.” That year, Beaux and Hanna had the same homeroom. One day, they were hugging outside it, and another kid walked up and said, “Oh, my God, I ship you so much” (meaning, Jeez, start a relationship already). Beaux and Hanna kissed on the mouth.

The following year, ninth grade, Beaux went to Stuyvesant, and Hanna and Harry went to Brooklyn Tech. Hanna still had never really considered that she could be gay, despite having daydreamed about having children with Beaux via stem cells. So instead of dating Beaux (who realized she was gay a few months earlier when she saw an incredibly beautiful woman in blue corduroys playing trumpet at her grandparents’ 60th-anniversary party), at the beginning of 10th grade, Hanna started dating Harry.

Beaux (right), Hanna and Harry at a playground in Brooklyn. Isadora Kosofsky for The New York Times

Over lunch at a big round table in the temple basement, Beaux looked at Hanna and said to the world, but mostly to Harry, “She’s so pretty!” Harry and Beaux shared a moment of mutual appreciation over Hanna’s adorable nose freckles. Now, at the end of 11th grade, the three teenagers moved with a flowing intimacy — their bodies melting, looping and reconfiguring like the liquid in a lava lamp. A 10-year-old girl, watching them, became so mesmerized that she inserted herself in the middle, on Beaux’s lap.

Beaux was patient and kind but did ask, “Don’t you have other 10-year-olds?”

“I also have feelings,” the girl said.

Hanna, meanwhile, stood behind Beaux, rubbing Beaux’s head with such tender affection that an older woman nearby asked, “Is she being blessed?”

On the rainy walk back up Church Avenue to Hanna’s house, Hanna, Beaux and Harry cycled through those seemingly profound topics that teenagers have been discussing forever, like that thing that happens when you think you see a cat in your peripheral vision, and you mutter the word “cat” before you realize it isn’t actually a cat, it’s a girl. And then that girl asks you about the cat, and you’re just like, What? They analyzed Harry’s smile — how it’s basically the exact same smile that little kids draw on faces. They praised a girl they know, who Beaux declared “is not even sure she’s queer despite being the most queer person” and “who wears Old Spice Swagger deodorant ironically and pulls it off.”

Hanna floated between Beaux and Harry. She’s the quietest of the bunch, and her heart seems almost miraculously whole and unbroken, like a cake hot from the oven before the surface cools, contracts and cracks. This is perhaps a result of the fact that Hanna is a person who falls in love with one thing and then falls in love with another thing and then, instead of letting go of the first, just adds on. She loved all the Harry Potter books, and then she loved all the Percy Jackson books, and she still rereads them both. Same with watching “Buffy the Vampire Slayer” and “Doctor Who.” And so it was with Harry and Beaux. A few months before she started dating Harry, Hanna spoke with Beaux in the front doorway of her house. “I have something to say,” Hanna told her. “I like you.”

“I like you, too,” Beaux said, “but let’s not date!”

Beaux soon changed her mind. To deal with the situation, she wrote a slam poem titled “The 21st Century Version of Asking for Their Parent’s Blessing” and performed it on video for Harry. “Dear Mr. Harry,” it started:

I am in love with your girlfriend. Now, I know how this sounds but you’ve done it too and you know how she is and you’ve seen the way I look at her. She is important to me. She is the caveat in every suicide note The random smile in the middle of math class.

Harry handled Beaux’s request extremely well. He was a mensch already and had been friends with Hanna in ninth grade, when she talked about almost nothing but her love for Beaux. He did not want to be the kind of boyfriend who kept his girlfriend from chasing her bliss.

When they arrived at Hanna’s house after shul, the three kicked off their shoes and flopped together on the wide, tawny brown couch in the living room. Beaux pretended to whisper in Harry’s ear and then licked it instead. I lost track of their limbs.

Hanna and Beaux washing up at Hanna’s home in Brooklyn during a sleepover. Isadora Kosofsky for The New York Times

“No one in New York is straight!” Beaux texted me a few weeks earlier. “ESP not high schoolers.” She was not entirely kidding.

Harry extracted himself from the girls and sat up. “If our life is a sitcom,” he explained, “I’m the token straight guy.”

Beaux has a theory: San Francisco is the capital of white gay men. New York City is the center of queer youth. “When you are queer, that becomes like a huge part of who you are,” Hanna told me, “because you just start to be like, Damn, I’m so gay, constantly.” You’re sitting watching “Castle,” and Stana Katic comes on-screen, and you’re like, Damn, I’m really gay! Or you see something cute, like even that hetero couple in “The End of the F***ing World,” and you find yourself thinking, That’s so gay!, because the word “gay” is cross-wired in your brain with exuberant/life-affirming/hot/cute. You go to the ice cream truck, and you ask your friend what kind of sprinkles you should get, and she says, “You have to get rainbow ones because you’re queer.” You don’t need to push the boundaries or make up some whole new type of identity from scratch, but you do need to represent.

A few years ago, Beaux and Hanna started poking around Tumblr, trying to name, with precision, their feelings and experiences. At first, Hanna said, “I was like, I think I’m bi, and then I learned the word ‘pansexual’ and was like, I think that describes me better.” Beaux goes with “queer,” partly to avoid the implication in the word “bi” that you’re a double agent and need to make up your mind. At school she hangs out with her gang of lesbians. “There’s a lesbian and a straight girl living inside me!” she says. “I’m the straightest one and the gayest one there, and that’s been my experience my entire life. It’s not like I’m .5 gay and .5 straight. It’s like I have two full sexualities.”

But the city is not all one big sparkly unicorn of love. Hanna and Beaux are lucky, they know that. They know that if your parents are part of what they call “the Park Slope white-parent community” (not limited to Park Slope proper), your parents can’t be homophobic, or if they are they have to be hermits. White, liberal parents have to be O.K. if a kid comes out. When Hanna first told her mom she was bi, her mom said: “I think I might be bi, too, but it doesn’t matter because I’m married to your father! If I had the freedoms you have in high school, things might have been different.” Yet for kids raised outside this bubble, perhaps most especially immigrant kids, what passes for a decent parental response is: You’re a lesbian, that’s cool, but you can’t be a lesbian when you’re out of the house. Before one friend introduced Beaux to her mother, the friend said, You really can’t say anything or do anything around my parents that would imply any level of queerness.

Beaux said, “O.K., I guess I’ll just put away my head.”

Hanna’s house is where a bunch of Hanna and Beaux’s friends plan to come if they get kicked out of their own homes. The space is a monument to comfort, supersaturated with chairs, books, blankets, snacks, humanity, tea bags, extra beds and warmth. Hanna, Beaux and Harry spent the afternoon there leaning one against another, like kids stacked on a toboggan — Harry’s elbow resting on Beaux’s head, Beaux’s arms around Hanna’s neck, Hanna’s fantasia of hair fanned across Beaux’s chest. They ate a bag of Tostitos and projected onto the living room wall an episode of “Sherlock,” the campy BBC series based on the character Sherlock Holmes. When it ended, Hanna ran upstairs and changed out of her good jeans into a pair of jeans full of holes (if you can call slashes down the entire leg holes) that really belonged to Beaux, but they looked so good on Hanna that Beaux told her just to keep them. Then the three teenagers walked down 19th Street to go for burgers.

Near Middle School 442, Beaux noticed the 12-year-old sister of one of her friends hanging out under a tree, taking hits off a Juul, and she fake-metal-band screamed: “You’re giving yourself a nicotine addiction! Your parents are in my phone!”

Hanna and Beaux in Hanna's bedroom. Isadora Kosofsky for The New York Times

The burger place didn’t open for 30 minutes, so Hanna, Beaux and Harry drifted over to a nearby playground to kill a little time. Beaux called her family, who live nearby, to invite them to join for dinner, and a few minutes later her 11-year-old sister, wearing sneakers and a fleece, rolled up on a scooter from the other side of the puberty divide. As the sister figure-eighted around, the older kids, who had climbed up on some oversize green plastic rings, decided that Harry would make a great E.M.T. (Sorry, Harry’s parents, who I’m sure would prefer he become a doctor.) They talked about friends who smoked “the drugs.” (They meant weed.) Hanna and Beaux kissed, just a quick one, and Harry busied himself doing pull-ups.

Most of the time, Hanna just hangs out with Beaux, or she just hangs out with Harry, though the three of them tried for a while to be a “thruple.” The experiment started last summer when Hanna went to Israel. Beaux and Harry stayed in Brooklyn, and one day they looked at each other flirtatiously and said: “Should we? For science?” They agreed that they should — of course they should. They shook hands and awkwardly kissed. But Beaux and Harry argued all the time, and those arguments left everybody sad. Harry broke up with Beaux over text. Beaux had never been broken up with before, and she looks back fondly at the experience. She got to tell Harry: “As your best friend, this is me telling you that you cannot break up with girls over text. It’s just ... you just did it wrong. Like you could have wikiHow’ed ‘how to break up with girls,’ and that is what it would’ve said: Don’t do that.”

People often say to Beaux, Hanna and Harry: Isn’t this three-way relationship difficult? Aren’t you consumed by jealousy? Their honest, heartfelt answer is no. “Wow, I like you, and I like you, and I don’t feel tense about that!” — that’s their basic feeling. Beaux is O.K. with Hanna’s dating Harry, and Hanna is O.K. with Beaux’s dating whomever she wants (at the moment, she has such a huge crush on a girl from school that she bought a pair of shoes like the ones this girl wears, just to impress her), because they get to have each other, too.

At dinner, Harry and Beaux sat next to each other and across from Hanna. “You’re my second favorite!” Harry said to Beaux.

“You’re my second favorite!” Beaux said back. They high-fived.

The air smelled great walking back to Hanna’s house — rain, leaves, late-blooming lilac, a hint of smoke. On the couch once again, the three resumed casually playing with one another’s hands, running their fingers through (or over) one another’s hair. At 10:01 p.m., Harry said, “I have to leave negative one minute ago.” Hanna kissed him good night. Beaux, feigning horror, said: “Ewwww! Ewwww!”

Upstairs, in Hanna’s room, among the ACT study books, the Elmer’s Glue and the Polaroids from when Beaux had long blue hair, the two girls flopped on the bed. Beaux is excited for college; Hanna, less so. She doesn’t like to think about the future. “Excuse me, could you come here?” Beaux said, pulling Hanna close. “I need the teddy-bear aspect of you.”

The two rolled around for a minute beneath the “Dear Evan Hansen” poster. Then Beaux brushed her teeth while Hanna washed the glitter off her face, and soon they fell asleep.♦