/* ============================================================
 * Tales of Mother Goose
 * home.css
 * index.html only
 * ============================================================ */


/* fiction modal
------------------------------------------------------------ */
.fiction_modal {
	position: fixed;
	inset: 0;
	z-index: 9999;

	display: none;
	align-items: center;
	justify-content: center;

	padding: 40px;

	box-sizing: border-box;

	font-family:
		-apple-system,
		BlinkMacSystemFont,
		"Helvetica Neue",
		"Yu Gothic",
		"YuGothic",
		"Meiryo",
		sans-serif;
}

.fiction_modal.is_show {
	display: flex;
}

.fiction_modal_overlay {
	position: absolute;
	inset: 0;

	background: rgba(23, 20, 18, 0.76);

	backdrop-filter: blur(3px);
	-webkit-backdrop-filter: blur(3px);
}

.fiction_modal_box {
	position: relative;

	width: min(92vw, 560px);

	/* 重要 */
	max-height: calc(100dvh - 40px);
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;

	padding: 40px;

	box-sizing: border-box;

	background: #fbfaf6;
	color: #171714;

	border: 1px solid #4b332b;
	border-radius: 40px;

	box-shadow:
		0 0 0 1px rgba(75, 51, 43, 0.12),
		0 24px 80px rgba(0, 0, 0, 0.28);
}

.fiction_modal_title {
	margin: 0 0 22px;
	padding-bottom: 16px;

	border-bottom: 1px solid #8f8178;

	color: #4b332b;

	font-size: 20px;
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.04em;
}

.fiction_modal_text {
	color: #34302d;

	font-size: 16px;
	font-weight: 500;
}

.fiction_modal_text p:last-child {
	margin-bottom: 0;
}

.fiction_modal_button {
	display: block;

	width: 100%;

	margin-top: 28px;
	padding: 16px 18px;

	border: 1px solid #4b332b;
	border-radius: 20px;

	background: #4b332b;
	color: #fbfaf6;

	font-family: inherit;
	font-size: 16px;
	font-weight: 500;

	cursor: pointer;

	transition:
		background 0.2s ease,
		border-color 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
}

.fiction_modal_button:hover {
	background: #33231e;
	border-color: #33231e;

	transform: translateY(-1px);
}

body.is_modal_open {
	overflow: hidden;
}


/* small smartphone / iPhone SE
------------------------------------------------------------ */
@media (max-width: 480px) {

	.fiction_modal {
		padding:
			calc(16px + env(safe-area-inset-top))
			16px
			calc(16px + env(safe-area-inset-bottom));
	}

	.fiction_modal_box {
		width: 100%;

		max-height:
			calc(
				100dvh
				- 32px
				- env(safe-area-inset-top)
				- env(safe-area-inset-bottom)
			);

		padding: 24px 22px;

		border-radius: 24px;
	}

	.fiction_modal_title {
		margin-bottom: 16px;
		padding-bottom: 12px;

		font-size: 18px;
	}

	.fiction_modal_text {
		font-size: 14px;
		line-height: 1.6;
	}

	.fiction_modal_button {
		margin-top: 20px;
		padding: 14px 16px;

		font-size: 15px;
	}
}


/* chapter list
------------------------------------------------------------ */
.chapter-list {
	width: min(680px, 100%);
	margin-top: 40px;
}

.chapter-section {
	margin: 0 0 14px;
	color: #4b332b;
	font-size: 22px;
	font-weight: 300;
	letter-spacing: 0.04em;
}

.main-section {
	margin-top: 100px;
}


/* chapter item
------------------------------------------------------------ */
.chapter-item {
	display: grid;
	grid-template-columns:
		120px
		46px
		minmax(0, 1fr);
	gap: 14px;
	align-items: flex-start;
	padding: 20px 0;
	border-top: 1px solid #8f8178;
	color: #171714;
	text-decoration: none;
	transition:
		border-color 0.2s ease,
		opacity 0.2s ease;

}

.chapter-item:last-child {
	border-bottom: 1px solid #8f8178;
}


/* chapter number
------------------------------------------------------------ */
.chapter-no {
	align-self: start;
	padding-top: 3px;
	color: #756a63;
	text-align: center;
	letter-spacing: -0.15em;
	transition: color 0.2s ease;
}


/* chapter body
------------------------------------------------------------ */
.chapter-body {
	display: block;
	min-width: 0;
}

.chapter-name {
	display: block;
	color: #171714;
	font-size: 22px;
	font-weight: 300;
	transition: color 0.2s ease;
}

.chapter-sub {
	display: block;
	color: #171714;
	font-size: 16px;
	transition: color 0.2s ease;
}

.chapter-ja {
	display: block;
	margin-top: 10px;
	color: #625a55;
	font-size: 16px;
	font-weight: 300;
	transition: color 0.2s ease;
	font-family:
		Arial,
		"Helvetica Neue",
		"Yu Gothic",
		"YuGothic",
		"Meiryo",
		sans-serif;
}


/* chapter thumbnail
------------------------------------------------------------ */
.chapter-thumb {
	display: block;
	width: 120px;
	height: 120px;
	border-radius: 50%;
	object-fit: cover;
	object-position: center;
	filter: none;
}


/* main story
------------------------------------------------------------ */
.main-item .chapter-no {
	padding-top: 0;
	font-size: 22px;
}

.main-item .chapter-name {
	font-size: 22px;
	letter-spacing: 0.12em;
}

.main-item .chapter-sub {
	font-size: 16px;
}

.main-item .chapter-ja {
	margin-top: 10px;
	color: #625a55;
	font-size: 16px;
	font-weight: 300;
	font-family:
		Arial,
		"Helvetica Neue",
		"Yu Gothic",
		"YuGothic",
		"Meiryo",
		sans-serif;
}


/* gray
------------------------------------------------------------ */
.gray { opacity: 0.5;}


/* ------------------------------------------------------------
 * YouTube
 * ------------------------------------------------------------ */

.music-section {
	margin-top: 0;
	margin-bottom: 40px;
}

.music-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 28px;
}

.music-item {
	min-width: 0;
}

.music-video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #d8d0c5;
}

.music-video iframe {
	display: block;
	width: 100%;
	height: 100%;
	border: 0;
}

.music-title {
	margin: 12px 0 0;

	font-family: "Cutive Mono", monospace;
	font-size: 14px;
	letter-spacing: 0.06em;

	color: #332b27;
}


/* ------------------------------------------------------------
 *  YouTube mobile
 * ------------------------------------------------------------ */

@media screen and (max-width: 700px) {

	.music-section {
		margin-top: 42px;
		margin-bottom: 42px;
	}

	.music-grid {
		grid-template-columns: 1fr;
		gap: 34px;
	}

	.music-title {
		margin-top: 10px;
		font-size: 13px;
	}
}


/* very small smartphone
------------------------------------------------------------ */
@media (max-width: 480px) {

	.chapter-list {
		margin-top: 64px;
	}

	.chapter-item {
		grid-template-columns:
			52px
			34px
			minmax(0, 1fr);
		gap: 10px;
		padding: 18px 0;
	}
	.chapter-thumb {

		width: 52px;
		height: 52px;
	}

	.chapter-no {
		font-size: 14px;
	}

	.chapter-name {
		font-size: 16px;
	}

	.main-item .chapter-name {
		font-size: 16px;

		letter-spacing: 0.08em;
	}

	.chapter-sub {
		font-size: 12px;
	}

	.chapter-ja {
		font-size: 10px;
	}

	.chapter-thumb {
		width: 52px;
		height: 52px;

		flex-basis: 52px;
	}
}