body {
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	margin: 0;
	padding: 1rem;
	box-sizing: border-box;
}

main {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	gap: 1rem;
}

h1 {
	color: midnightblue;
}

a {
	color: white;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

/* ------------------- Diary box (left) ------------------- */

.diary {
	background-image: linear-gradient(to right, #0f0f46, black);
	flex: 1 1 20rem;
	max-width: 25rem;
	height: 40rem;
	padding: 1rem;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
}

.diary h2 {
	margin-top: 0;
}

.diary input {
	width: 100%;
	height: 2rem;
	margin-bottom: 0.75rem;
	padding: 0 0.5rem;
	box-sizing: border-box;
	background: transparent;
	color: white;
	font-family: monospace;
	border: 1px solid #555;
}

.diary input:hover {
	border-color: white;
}

.entry_scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #888 transparent;
}

#entry_list {
	list-style: none;
	margin: 0;
	padding: 0 0.5rem 0 0;
}

.entry {
	display: block;
	padding: 0.75rem 0.5rem;
	border-bottom: 1px solid #555;
}

.entry:hover {
	background-color: rgba(255, 255, 255, 0.08);
	text-decoration: none;
}

.entry.selected {
	background-color: rgba(255, 255, 255, 0.14);
}

.entry.selected .entry_title {
	color: lightskyblue;
}

.entry_top {
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	gap: 0.75rem;
}

.entry_title {
	min-width: 0;
	font-weight: bold;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.entry_dates {
	flex-shrink: 0;
	text-align: right;
	font-size: 0.8rem;
	color: #ccc;
}

.entry_dates small {
	display: block;
	color: #aaa;
}

.entry_snippet {
	margin: 0.35rem 0 0;
	font-size: 0.85rem;
	color: #ccc;
	display: -webkit-box;
	line-clamp: 3;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.empty {
	padding: 0.75rem 0.5rem;
	color: #ccc;
}

/* ------------------- Right part ------------------- */

.right {
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	flex: 1 1 20rem;
	height: 40rem;
}

.reader {
	padding: 1rem;
	overflow-wrap: anywhere;
	overflow-y: auto;
	scrollbar-width: thin;
	scrollbar-color: #888 transparent;
}

#reader_title {
	border-bottom: 1px solid #555;
	padding-bottom: 0.5rem;
}

#reader_title:empty,
#reader_info:empty {
	display: none;
}

#reader_info {
	display: block;
	color: #888;
	margin: 0.5rem 0 1rem;
}

.reader h1 {
	color: white;
	font-size: 1.5rem;
	font-family: sans-serif;
}

.reader h2 {
	color: lightskyblue;
	font-size: 1.25rem;
	font-family: sans-serif;
}

.reader a {
	color: lightgreen;
	font-family: 'Times New Roman', Times, serif;
}

.reader img {
	max-width: 100%;
}

#reader_bottom {
	display: flex;
	flex-direction: row;
	gap: 1rem;
	margin-top: auto;
}

/* ------------------- Links and footer ------------------- */

.links {
	flex: 1 1 100%;
}

.links ul {
	list-style: none;
	padding: 0;
}

footer {
	display: flex;
	justify-content: space-between;
}

footer a {
	color:black;
}