html, body {
	margin: 0;
	padding: 0;
	box-sizing: border-box;

	color: #fff;
	background-color: #222;
	font-family: sans-serif;
}

* {
	box-sizing: inherit;
}

body {
	display: grid;
	grid-template-columns: 1fr auto;
	grid-template-rows: 3em calc(100vh - 4em) 1em;

	align-items: stretch;
	justify-items: stretch;

	height: 100vh;
}
@media only screen and (max-width: 800px) {
	body {
		grid-template-rows: 1.5em calc(100vh - 1.5em);
	}
}

/* Footer */
#footer {
	grid-column: span 2;

	color: #fff;
	font-size: 0.5em;
	padding: 0.25rem 0.5em;
	background: #555;
	border-top: 2px solid #777;
}

#footer br { display: none; }

@media only screen and (max-width: 800px) {
	#footer { display: none; }
}

/* License */
#license { display: none; }

/* Main container */
#directory {
	text-align: center;
}

/* Directory view */
#files {
	padding: 4px 0 0;
	overflow: auto;
	overflow-y: overlay;
	height: calc(100vh - 4em);
}
@media only screen and (max-width: 800px) {
	#files {
		height: calc(100vh - 1.5em);
	}
}

/* Top bar */
#menu {
	grid-column: span 2;

	font-size: 1em;
	padding: 1rem;
	border-bottom: 2px solid #777;
	background: #555;
}

#menuButtons {
	position: relative;
	top: -0.66rem;
	display: block;
	float: right;
}

#menuButtons > a {
	position: absolute;
	right: 0;
	top: 0;
	padding: 0;
	font-size: 2em;
	cursor: pointer;
}

#menuButtons > ul {
	position: relative;
	display: inline-block;
	margin: 0;
	padding: 0 0 0 0.5rem;
	font-size: 2em;
	list-style: none;
	cursor: pointer;
}

#menuButtons > ul ul {
	display: none;
	z-index: 15;
	position: absolute;
	right: 0;
	top: 0;
	padding: 0;
	margin: 0;
	list-style: none;
	cursor: pointer;
	background: #555;
}

#menuButtons > ul:hover ul {
	display: block;
	position: absolute;
}

@media only screen and (max-width: 800px) {
	#menu {
		font-size: 0.8em;
		padding: 0.2em 0.4em;
		border-width: 1px;
	}

	#menuButtons {
		top: 0;
	}

	#menuButtons > a {
		font-size: 1em;
	}

	#menuButtons > ul {
		font-size: 1em;
	}
}

/* Picture display — main picture + next and previous picture links */
#directory {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

#picture img,
#picture video {
	display: block;
	max-height: calc(100vh - 4em);
	max-width: 100vw;

	overflow: hidden;
	margin: auto;
}

.infoOnRight #picture img,
.infoOnRight #picture video {
	max-width: calc(100vw - 19em);
}

@media only screen and (max-width: 800px) {
	#picture img,
	#picture video {
		max-height: calc(100vh - 1.5em);
	}

	.infoOnRight #picture img,
	.infoOnRight #picture video {
		max-width: calc(100vw - 9em);
	}
}

#info {
	display: none;

	padding: 0.5em 0;

	color: #bbb;
	background: #555;
	text-align: center;
}

.infoOnRight #info {
	display: block;
	width: 19em;
}
@media only screen and (max-width: 800px) {
	.infoOnRight #info {
		width: 9em;
	}
}

#info > * {
	margin-bottom: 1rem;
}

#info #smallmap {
	border: none;
	padding: 0;
}

#info #picturedata {
	font-size: 0.6em;
	margin-left: 0;
	margin-right: 0;
	padding: 0;
	list-style: none;
	column-count: 2;
}

.nav {
	display: none;
}

#directory {
	position: relative;
}

#directory:hover .nav {
	display: block;
}

.nav.left,
.nav.right {
	position: absolute;
	z-index: 10;
	font-size: 500%;
	line-height: 1.0;
	height: 1.25em;
	width: 1.25em;

	color: #999;
	background: rgba(0, 0, 0, 0.5);
}

.nav a {
	color: #999;
	background: transparent;
}

.nav:hover a {
	color: #fff;
}

.nav.left {
	top: 0;
	left: 0;

	border-radius: 0 0 1em 0;
}
.nav.right {
	right: 0;
	bottom: 0;

	border-radius: 1em 0 0 0;
}

.nav img {
	display: none;
}
.nav span {
	display: block;
}

/* Directory (album) view */
#files a {
	width: 175px;
	height: 175px;
	position: relative;
	display: inline-block;
	overflow: hidden;
	margin: 0px;

	color: #030;
	background-color: #888;
	background-repeat: no-repeat;
	background-position: 50% 50%;
}

#files a.dimmed {
	opacity: 0.25;
}

#files:hover a.dimmed {
	opacity: 1.0;
}

#files a.folder,
#files a.file {
	color: black;
	text-shadow: 0 0 2px white, 0 0 4px white, 0 0 6px white, 0 0 8px white;

	text-align: center;
}

#files a.picture {
	background-color: black;
}

#files a span {
	display: block;
}

#files a span {
	width: 65%;
	background-color: rgba(220, 220, 220, 0.9);
	border: 4px solid white;
	padding: 0.5em 1em;
	font-size: 0.9em;
	margin: 1ex auto;
}

#files a.picture span {
	display: none;
}

#dircomment {
	clear: both;
}

/* General — links */
a {
	color: #8e8;
	text-decoration: none;
}

a:hover {
	color: #090;
}

a img {
	border: none;
}

/* Map stuff */
#mapcontainer {
	display: none;
	background: #555;
}

.mapOnRight #mapcontainer {
	display: block;
	width: 25em;
	overflow: hidden;
}

@media only screen and (max-width: 800px) {
	.mapOnRight #mapcontainer {
		width: 12em;
	}
}

#map {
	font-size: 80%;
	color: #222;
	background: #fff;
	margin: 0;
	overflow: hidden;
}

.map a img {
	border: none;
}

#map a[href] {
	color: #436976;
	background-color: transparent;
}

#map #tags {
	display: none;
}

#map #docs p {
	margin-bottom: 0.5em;
}

/* kate: indent-mode normal; indent-width 4; space-indent off; tab-width 4; hl css; */
