For thousands of years, people have built their great metropolises right up against the contours of coasts, in estuaries and deltas, confident of the ebb and flow of the tides.
Domination of the seas allowed many coastal cities to become trading powerhouses and cultural melting pots.
But now that strength is becoming a liability as climate change swells the oceans, redrawing the map and putting hundreds of millions at risk.
That's the warning of an unpublished draft report by the UN's climate science advisory panel, seen exclusively by AFP, which outlines the vast and urgent climate threats facing the planet.
From the air, you can see the problem.
In city upon city, office towers, warehouses and homes crowd the water's edge as if they are jostling to take a dip, major roads hug the shore, landing strips jut dauntlessly into the frothing waves.
These cities are on the "frontline", the Intergovernmental Panel on Climate Change (IPCC) report says.
"Difficult choices will need to be made as sea level continues to rise, floods and storm surges become more frequent and intense, warming increases ocean acidity and intensifies heatwaves," it adds.
Rising seas will likely spark mass migration and eventually force whole cities to be abandoned to the flood.
But profound consequences for megacities, small islands, arctic communities and deltas will come long before that -- well within the lifetimes of most alive today.
In some places, people already know all too well the destructive power of water.
"I once was a bride of an affluent family," Yasmin Begum tells AFP in the bare corrugated metal hut she now shares with her relatives in the Bangladesh capital Dhaka.
"My in-laws and parents, they had everything -- cattle, nice house, farmland. But the river took it all away."
The family had lived a relatively prosperous life in the southern island district of Bhola, an exposed tendril of land at the outer limits of one of the world's most populated deltas.
Then one night 12 years ago, the raging Meghna river devoured everything they had.
Begum, now 30 and a mother of three, scratches a living as a Dhaka housekeeper, while her husband drives a cycle rickshaw through the city's steamy streets.
They escaped one flood only to be at risk of another: Their new home, in one of the narrow-alley slums clustered precariously close to a flood barrier, is just metres from the riverbank.
- 'Mortal' cities -
Roughly a tenth of the world's population and assets are based less than 10 metres (33 feet) above sea level.
"Structurally, a lot of cities are set up in almost the exact wrong place for a world with rising seas," says Ben Strauss, CEO and chief scientist at Climate Central.
Ports and airports are built on the very flattest, lowest land possible.
"Sea level used to be stable," Strauss explains.
Land currently home to 300 million people will be vulnerable to annual flooding by 2050, according to his research.
Those least able to afford to protect themselves will likely be hit hardest.
All urban areas are increasingly stifled by air pollution and extreme heat, but those at the coasts are also deluged by flooding intensified by the rising water level and lashed by storms whipped into greater fury by warmer seas.
Saltwater washes across agricultural fields and rice paddies, while ecosystems -- crucial for economies, cultures and climate protection -- are gravely degraded by human activities.
Cities like Venice and Jakarta are also sinking, while low-lying island nations, particularly in the Pacific, are at risk of disappearing under the waves.
The report says slashing emissions now can reduce the risks.
"But sea level rise is accelerating and will continue for millennia," it says.
The greenhouse gases already in the air have essentially baked-in the amount that waters will rise until around 2050.
By 2100, the IPCC has predicted water levels could be 60 centimetres (24 inches) higher, even if global warming is limited to well below two degrees Celsius -- the cornerstone target of the 2015 Paris Agreement.
Longer term, it says, the prospects for many coastal cities are "dismal" without deep cuts to emissions.
Meanwhile, humanity continues to pump pollution into the atmosphere, locking in global heating that is melting ice sheets and glaciers and expanding oceans.
In just a few decades we may have emitted enough to eventually drown some of the world's great cities, Strauss says.
By 2050, an at-risk region like South Florida might have developed a multi-decade plan to "empty out", he says.
"We live our lives knowing we're going to die, but I don't think we often think of our cities in those terms," he tells AFP.
"Most of our coastal cities are mortal. A lot of them will end by flood in the long run."
- Cascading risk -
Costs are already rising.
In October 2012, Hurricane Sandy slammed into the coast around New York and New Jersey, killing scores of people and causing tens of billions of dollars in damages.
The storm caused "cascading" impacts, the IPCC says, triggering massive power outages and disrupting water and communication links for hundreds of thousands of people.
Disasters like this in globalised coastal cities pose "risks for societies and the global economy in general", the report says.
A worst-case-scenario projection for the world's 136 largest coastal cities calculated expected damages by mid-century of between $1.6 to $3.2 trillion from sea level rise without adaptation.
There were wide variations between cities, partly because of where assets and people are concentrated, study co-author Elisa Sainz de Murieta of the Basque Centre for Climate Change said.
Guangzhou was top of the list, with damages calculated at around $330 billion by 2050 under a pessimistic emissions scenario without adaptation, and nearly $1.4 trillion in 2100.
In second place was Mumbai, which the IPCC report describes as a "non-adapter" -- with little done to prepare people and property for disaster -- despite predictions that swathes of built-up area could be flood-prone by 2100.
And cities continue to expand, putting millions more in harm's way, particularly in Asia and Africa.
- Lessons from the 'bathtub' -
How can cities protect themselves?
Options include engineered protections like dykes and seawalls, which could cut flood risk for up to a few metres of sea rise but can damage environmental systems.
Rehabilitating coastal ecosystems also offers broad benefits.
Storm surges kill fewer people and cause less damage when a coastal city is sheltered behind a wide buffer of mangroves or marshes.
Seagrass meadows, mangrove forests, coral reefs and tidal marshes also support marine life and related economic sectors like fisheries and tourism.
There is "no silver bullet", the IPCC draft says, but the choices will only get tougher as the impacts stack up.
"We have to act now, because we are already too late," says Johan Verlinde, programme manager for Rotterdam's Climate Adaptation Plan.
More than half of the Netherlands is vulnerable to large-scale coastal and river flooding and over a quarter is below sea level.
After deadly inundations in 1953 the country set about building a network of high-tech defences.
The Netherlands currently allocates one billion euros ($1.2 billion) a year for its "living with water" adaptation plan.
Rotterdam's assortment of floating infrastructure includes a cattle farm.
With 85 percent below sea level, Verlinde says the city is "really a bathtub".
"Every drop of water that falls on our city, we need to pump it up. We really need to be innovative to keep our feet dry," he says.
Dutch engineers travel the world sharing their flood resilience expertise, although many poorer countries and communities cannot afford the most effective big infrastructure defences.
But the reasons why some are protected and others not go far beyond national budgets.
- 'Sink or swim' -
Cape Town is an "extensive adapter", according to the IPCC, with flood protection infrastructure, as well as early warning systems in place.
But almost 100,000 households are exposed to flooding in a city riven by deep poverty and the legacy of apartheid.
Toward the coast, the serene Lake Michelle is a high-end housing complex enfolded within a secure perimeter fence.
Outside a scrubby strip of land separates it from Masiphumelele, where ramshackle informal homes blanket the waterlogged ground.
The contrast is an example of the stark inequalities that make finding consensus on a response to climate change much more difficult, says Anton Cartwright of the African Centre for Cities.
"Ultimately we're all going to have to sink or swim -- literally in this instance -- together," he says.
- 'Die by drowning' -
In the end, even the most innovative, big-spending adapters may not be able to avoid the ultimate solution: retreat.
Indonesia has already put together plans to shift its capital to Borneo from subsidence-wracked Jakarta.
In Bangladesh, climate-related migration has already started. But this is just the beginning.
Studies predict sea level rise could displace nearly a million people in the country by 2050, and more than two million by the end of the century.
Dhaka will likely be a destination for those driven from their homes in other low-lying coastal areas.
But the delta city, where almost 40 percent of people live in vulnerable informal settlements, is itself expected to face increasing inundations.
As simple as their rented house is, Begum says they cannot afford to lose it -- her family has nowhere to retreat to.
"Then probably we'll have to die by drowning," she tells AFP.
"We have no other option."
Like Begum, some communities will be unable or unwilling to move even if their homes are at risk.
And some places are irreplaceable.
- 'Queen of the Seas' -
UNESCO describes Venice as an "extraordinary architectural masterpiece" where even the smallest buildings contain works by some of the world's great artists, such as Titian and Tintoretto.
The city was founded in the 5th century, although it was not until the 10th century that the "Queen of the Seas" became a major maritime power.
Today, Venice is the most threatened world heritage site in the Mediterranean.
Over 90 percent of the city is vulnerable to flooding.
Venice has installed mobile barriers to close lagoon inlets during storm surges.
But if sea levels rise 30 centimetres, floodwaters could slosh around the palazzi for several weeks. At 75 centimetres, they could linger for six months.
The IPCC's most pessimistic prediction for 2100 is 1.1 metres.
Oceanographer Georg Umgiesser says because of the effects of subsidence, even half a metre would be "catastrophic" for the city.
St Mark's Square would never be dry.
And Venice is not alone -- up to 140 world heritage sites are at risk of coastal flooding even at two degrees Celsius of global warming, mostly in the Mediterranean.
- What we've lost -
Humans have told stories about cities and civilisations swallowed by the sea for centuries.
In the past, there was no evidence linking behaviour to the deluge, but now our choices are creating real Atlantises of the future, says Strauss.
"Our efforts to stop climate change are to protect the lives that we have today, but also they are going to shape the stories that our descendants tell about us," Strauss says.
"And I think there will be a lot of stories about what we've lost, about the things we failed to protect."