@charset "UTF-8";

div.modal-open{
	transition: .5s;
}
button:hover{
	opacity: .5;
}
.modal-bg{
	position: fixed;
	width: 100%;
	min-height: 100dvh;
	height: auto;
	background-color: rgba(0, 0, 0, 0.7);
	top: 0;
	left: 0;
	z-index: 10;
	overflow: auto;
}
.modal{
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	margin: 0 auto;
	padding: 5rem;
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	gap: 5rem 0;
}
.modal.comic{
	flex-direction: row-reverse;
	flex-wrap: wrap;
	justify-content: flex-start;
	max-width: calc(1200px + 10rem) !important;
}

.left::before{
	content: "";
	display: block;
	height: 0;
	width:100% !important;
	max-width: 600px !important;
}

@media screen and (max-width: calc(1315px)) {
	.modal.comic{
		justify-content: center;
	}

	.left::before{
		content: none;
	}
}

.modal img{
	max-width: calc(100vw - 10rem);
	max-height: calc(100vh - 10rem);
	z-index: 1000;
}

.modal img.long{
	max-height:fit-content !important;
}

.modal.comic img{
	width:100% !important;
	max-width: 600px !important;
	height:auto !important;
	max-height: 847px !important;
}

figure{
	display: table;
}

.modal figure img{
	max-height: calc(100vh - 14.5rem);
}

figcaption {
	background-color: #fff;
	caption-side: bottom;
	display: table-caption;
	padding: 1.2rem 2rem;
	font-size: 1.4rem;
	line-height: 1.5;
}

.modal-bg.active{
	display: block;
}
/* transition 追記*/
.fade-enter-active, .fade-leave-active{
	animation-name: fade;
	animation-duration: .5s;
}
.fade-leave-active{
	animation-direction: reverse;
}
@keyframes fade{
	0%{
		opacity: 0;
	}
	100%{
		opacity: 1;
	}
}



/*スクロールバー*/

.modal-bg::-webkit-scrollbar {
   width: 1.5rem;
}

.modal-bg::-webkit-scrollbar-track {
	background-color: rgb(179, 179, 179);
}

.modal-bg::-webkit-scrollbar-thumb {
  background-color: #000;
}

@media screen and (max-width: 767px) {

	.modal{
		padding: 2.5rem;
		gap: 2.5rem 0;
	}

	.modal img{
		max-width: calc(100vw - 5rem);
		max-height: calc(100vh - 5rem);
	}

	.modal-bg::-webkit-scrollbar {
		width: 0.5rem;
	}

	figcaption {
		padding: 0.6rem 1rem;
		font-size: 1.2rem;
		line-height: 1.3;
	}
}
