body {
	background: #f2f2f2;
}

/* taken from https://perfectmotherfuckingwebsite.com/ */
body{
	max-width:650px;
	margin:40px auto;
	padding:0 10px;
	font:18px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
	color:#444;
}

h1,h2,h3{
	line-height:1.2;
}

@media (prefers-color-scheme: dark){
	body{
		color:#c9d1d9;
		background:#0d1117;
	}
	a:link{
		color:#58a6ff;
	}
	a:visited{
		color:#8e96f0;
	}
}
/* end taken */


/* suggested by https://github.com/whatwg/html/issues/7732. janky fix to stop scrolling when a dialog is present */
body:has(#largeFigureModal.show) {
	overflow: hidden;
}
/* end */

body.galleryMode p {
	display:none;
}

.notes p {
	white-space: pre-line;
	text-wrap: wrap;
	margin:0px;
}
.notes * {
	white-space: normal;
}
.gallery {
	display: flex;
	flex-direction: row;
	width: 100%;
	overflow: scroll;
	min-height:250px;
}
figure {
	margin: 40px 10px;
}
figure img {
	height:250px;
	aspect-ratio: 2/3;
}
figure img.horizontal {
	aspect-ratio: 3/2;
}
figure img.horizontal-phone {
	aspect-ratio: 4/3;
}
figure img.vertical-phone {
	aspect-ratio: 3/4;
}

figure figcaption {
	color: #777;
}
/* dialog {
	background: inherit;
	color: inherit;
	outline: none;
	width: 100dvw;
	height: 100dvh;
	display: grid;
	justify-items: center;
}
dialog img {
	max-width: 100%;
	max-height: calc(100dvh - 2*(18px + 1.5px + 1.5px));
} */

#largeFigureModal {
	position:fixed;
	width:100dvw;
	height:100dvh;
	overflow:auto;
	background: inherit;
	top:0px;
	left:0px;
}
#largeFigureModal.show {
	display:block;
}
#largeFigureModal.hide {
	display:none;
}
.figureModalContainer {
	height:100%;
	display: grid;
	justify-content: center;
	align-content: center;
}
.figureModalContainer img {
	max-width: 100%;
	max-height: calc(100dvh - 2*(18px + 1.5px + 1.5px));
}
#closeDialog {
	border: 1px solid #888;
	color: inherit;
	background: inherit;
    padding: 8px;
    margin: 4px;
    /* width: calc(100dvw - 8px); */
}