* {
	box-sizing: border-box;
}

html,
body {
	position: absolute;
	margin: 0;
	min-width: 100%;
	min-height: 100%;
}

body {
	font-family: sans-serif;
	color: #DDD;
	background-color: #0c0c0c;
}

a,
a:visited,
a:active {
	color: inherit;
}

table {
	border-collapse: collapse;
}
table, th, td {
	border: 1px solid #DDD;
}

.map {
	display: grid;
	grid-template-rows: auto 1fr;
	min-height: 100vh;
}

.album-header {
	padding: 20px;
	text-align: center;
}
.album-header h1 {
	margin-top: 0;
	margin-bottom: 10px;
}
.album-header nav a {
	display: inline-block;
	text-decoration: none;
	background-color: #DDD;
	border: 2px solid #DDD;
	color: #0c0c0c;
	padding: 5px;
}
.album-header nav a.active {
	background-color: transparent;
	color: inherit;
}

.album-header ul {
	list-style-type: none;
}

.gallery, .story-list {
	padding: 5px;
}

/* TODO: consider using display: grid-lanes */
.gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.gallery img {
	width: auto;
	height: 200px;
}

@media (max-width: 600px) {
	.gallery a {
		width: 100%;
	}
	.gallery img {
		width: 100%;
		height: auto;
	}
}

.story-list {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}
.story-list .story-tile {
	position: relative;
	width: 300px;
	height: 300px;
	background-color: #303030;
	border-radius: 5px;
	overflow: hidden;
}
.story-list .story-tile img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.story-list .overlay {
	position: absolute;
	bottom: 0;
	width: 100%;
	max-height: 100%;
	overflow: hidden;
	padding: 10px;
	color: white;
	background: linear-gradient(to bottom, rgb(0 0 0 / 0) 0px, rgb(0 0 0 / 0.3) 50px);
	pointer-events: none;
}
.story-list p {
	margin: 0;
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	text-overflow: ellipsis;
}
.story-list button {
	float: right;
	pointer-events: auto;
}

@media (max-width: 600px) {
	.story-list .story-tile {
		width: 100%;
	}
}

.media-marker {
	width: auto;
	height: auto;
	max-width: 50px;
	max-height: 50px;
	border: 2px solid white;
	outline: 1px solid black;
}

.media-picker {
	max-height: 500px;
	overflow: auto;
	margin: 5px 0;
	display: flex;
	flex-wrap: wrap;
	gap: 5px;
}
.media-picker label {
	display: inline-block;
	position: relative;
}
.media-picker img {
	width: 100px;
	height: 100px;
	object-fit: cover;
}
.media-picker input[type="checkbox"] {
	position: absolute;
	top: 5px;
	left: 5px;
}

.fullscreen {
	position: relative;
	width: 100vw;
	height: 100vh;
	overflow: hidden;
}

.fullscreen:not(.with-controls):not(.with-story) {
	cursor: none;
}

.fullscreen img {
	width: 100vw;
	height: 100vh;
	object-fit: contain;
}

.fullscreen:not(.with-controls) .control {
	display: none;
}

.fullscreen .close,
.fullscreen .prev,
.fullscreen .next {
	position: absolute;
	text-decoration: none;
	font-size: 75px;
	padding: 30px;
}
.fullscreen .close {
	left: 0;
	top: 0;
	text-align: center;
	width: 150px;
	height: 150px;
}
.fullscreen .prev,
.fullscreen .next {
	height: 100vh;
	min-width: 20vw;
	line-height: 100vh;
}
.fullscreen .prev {
	left: 0;
}
.fullscreen .next {
	right: 0;
	text-align: right;
}

.fullscreen .story {
	position: absolute;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	overflow: auto;
	padding-top: calc(100vh - 100px);
}
.fullscreen:not(.with-story) .story {
	display: none;
}
.fullscreen .story .overlay {
	position: relative;
	z-index: 1;
	padding: 20px;
	min-height: 100%;
	background: linear-gradient(
		to bottom, rgb(0 0 0 / 0) 0px,
		rgb(0 0 0 / 0.3) 50px,
		rgb(0 0 0 / 0.7) 300px
	);
}
.fullscreen .story .overlay .inner {
	max-width: 600px;
	margin: auto;
}
.fullscreen .story p {
	margin: 0;
}

.login-form {
	padding: 15px;
	max-width: 300px;
	margin: auto;
}
