@charset "UTF-8";

body {
	font-size: 16px;
	font-family: 'BIZUD';
}

h1 {
	font-size: 1.5em;
	margin-bottom: 1rem;
	line-height: 1;
}

#container {
	margin: 2em auto;
	width: 80%;
}

ul#filter {
	display: flex;
	flex-wrap: wrap;
	font-size: 0.8em;
	grid-gap: 0.25em 0.5em;
	margin-bottom: 1rem;
}

ul#filter li {
	line-height: 1;
	background-color: dimgray;
	border-radius: 1em;
	font-size: 1em;
	padding: 0.25em 0.5em;
}

ul#filter li:not(:first-child)::after {
	content: 'さん';
	font-size: 0.75em;
}

ul#filter li:hover {
	cursor: pointer;
	text-decoration: underline;
}

ul#list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(100px, 100px));
	justify-content: center;
	gap: 4px;
	margin: 0 auto;
}

ul#list li {
	display: flex;
	width: 100%;
	border-radius: 4px;
	aspect-ratio: 2/3;
	background-color: #FFF;
}

ul#list li:hover {
	outline: 1px solid #FFF;
	z-index: 9999;
	cursor: pointer;
}

ul#list li > div {
	width: 100%;
	background-size: 100%;
	background-position: center;
	background-repeat: no-repeat;
	transition: filter 400ms ease;
}

dialog {
	border: none;
	padding: 0;
	background: none;
	width: 100vw;
	height: 100dvh;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

dialog::backdrop {
	background: rgba(0, 0, 0, 0.8);
}

.dialog-img {
	max-width: 800px;
	max-height: 1200px;
	height: calc(90vh - 2rem);
	display: block;
	aspect-ratio: 2 / 3;
	margin: 0 auto;
	background-color: #FFF;
	filter: drop-shadow(2px 2px 4px black);
}

dialog ul {
	margin-top: 1rem;
}

dialog ul li.userName span::before,
dialog ul li.userName span::after,
dialog ul li.userName span.dateString {
	font-size: 0.75em;
}

dialog ul li.userName span:first-child::before {
	content: 'Posted by';
	margin-right: 0.5em;
}

dialog ul li.userName span:first-child::after {
	content: 'さん';
	margin-left: 0.25em;
}

@media screen and (max-width: 430px) {
	li.userName {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.dialog-img {
		height: auto;
		width: calc(90%);
		display: block;
		aspect-ratio: 2 / 3;
		margin: 0 auto;
		background-color: #FFF;
		filter: drop-shadow(2px 2px 4px black);
	}
}