"Lyrically I was scared," she says, reaching for the container of guacamole on the table between us. "I was like 'Fuck, am I gonna dare to be as open next time?' I didn't realize how many people were gonna hear it when I wrote those songs. That's where Lady Wood came from, because I, for some reason, love doing things that scare me and turn me on at the same time."

Before solo stardom struck, Nilsson spent years sharpening her lyrical craft at songwriting camps across Europe, including the famous Xenomania collective two hours outside of London. "You have five or six tracks and they give you a topic to each track and they're like, 'Just improvise melodies and stick to these sort of sentences and this kind of world,'" she recalls of the experience. "That's why sometimes on their songs there can be thirteen writers, because you basically just improvise and sing whatever you're feeling on the track. And then [Brian Higgins, the British producer and leader of Xenomania] puts everything together. So I basically got the song sent to me like 'Here's the song, it's done,' and there are like four other people that I've never met on the song. I'm just like 'OK! Did I write this? Oh… that's my melody. And that's my melody! And I did that! That's my lyric!' It's a very rare way to write."

Today, she still belongs to a collective—Max Martin's all-Swedish Wolf Cousins, to which she contributes "only when an artist asks for me, if I have time," she says, nodding to her solo stardom, her real day job. The all-star team also includes Ali Payami (Taylor Swift's "Style"), Mattman and Robin (Selena Gomez's "Hands to Myself"), Oscar Görres (Britney Spears' "Hard to Forget Ya"), Oscar Holter (P!nk's "Just Like Fire"), and Ilya Salmanzadeh (Ariana Grande's "Problem")—no small fries in the bunch, really. "Everyone's brutally honest. A lot of people actually can't handle how hard on each other we can be sometimes, but for me it's freeing."

This spring, she hunkered down in Stockholm and Los Angeles to finish the record, re-enlisting Wolf Cousins and her Queen of the Clouds producers the Struts (Jakob Jerlström and Ludvig Söderberg). Starting with a pile of demos she'd half-crafted on the road, Nilsson worked her way through icy highlights like album-opener "Influence" (which picked up a Wiz Khalifa feature along the way) all the way to the last song on the record, "What the Fuck Love Is."

"I remember going through demos early on, and I was like 'Fuck, I have so much already,'" she says. "It can take me half an hour to come up with a chorus and verse but then it can take me three weeks to write a bridge."

Nilsson's mother, a therapist, taught her how to properly understand those impulses. "It's not a stigma in my family," she says. "I can identify all of my issues."

Nilsson also turned to Martin for advice early in the _Lady Wood _sessions, presenting the world's foremost pop producer with a rough demo of the chest-puffing lead single "Cool Girl." "Max was like, 'If you do this right, this can be fucking amazing. Just keep going… but make sure that the chorus is this minimal, dry thing that you have going on here,'" she says. "He's so good at giving advice."

"Cool Girl" is just one sample of the album's icy, club-ready sound. Lady Wood's thumping, angular beats and production, she says, were inspired by a year of success marred by "the most brutal breakup of my life, and a lot of private family bullshit."

"During that time I was just writing without thinking," she says. "I knew very early that I was falling completely in love with the underground techno rave scene, and finding all these clubs and warehouses to just fucking dance in. That was my outlet, the same as writing. I started sending all these aggressive minimal techno songs and beats to my producers, like, 'This is the vibe.'"