.character-container {
	display: inline-block;
	width: 550px;
	vertical-align: top;
}

.character-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-start;
	row-gap: 50px;
	column-gap: 30px;
	width: 100%;
	max-height: calc(184px * 4);
	overflow-y: auto;
	scrollbar-width: none;
	padding-bottom: 30px;
}

.character-list::-webkit-scrollbar {
	display: none;
}

.character-item {
	position: relative;
	cursor: pointer;
	width: 137px;
	height: 137px;
	border: 1px solid #000;
	text-align: center;
}

.character-item img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.character-item:hover img {
	filter: brightness(60%) saturate(80%);
}

.random-btn-wrap {
	margin-top: 0px;
	margin-bottom: 10px;
}

#randomBtn {
	cursor: pointer;
	font-size: 10px;
	color: #0000ff;
	background: #fff;
	border: 1px solid #0000ff;
	padding: 2px 5px;
}

#randomBtn:hover {;
	color: #fff;
	background: #0000ff
}

.character-display {
	position: relative;
	display: inline-block;
	vertical-align: top;
}

.image-window {
	position: relative;
	display: flex;
	flex-direction: column;
	box-sizing: border-box;
	width: 580px;
	height: 850px;
	background: #fff;
	border: 1px solid #000;
}

.image-window-body {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	height: calc(100% - 24px);
	overflow: hidden;
}

.image-window img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.image-window-header {
	font-size: 12px;
	background: #fff;
	border-bottom: 1px solid #000;
	padding: 4px;
}

.no-image {
	font-size: 14px;
	color: #0000ff;
	text-align: center;
}

.no-image #next-btn {
	display: none;
}

.next-btn {
	position: absolute;
	cursor: pointer;
	background: none;
	font-size: 18px;
	color: #000;
	border: none;
	right: 10px;
	bottom: center;
}

.text-window {
	position: absolute;
	width: 260px;
	background: #fff;
	border: 1px solid #000;
	top: 50px;
	left: 50px;
}

.text-window-header {
	cursor: move;
	font-size: 12px;
	background: #fff;
	border-bottom: 1px solid #000;
	padding: 4px;
}

.text-window-body {
	height: 150px;
	padding: 8px;
	overflow-y: auto;
}

.char-name {
	display: inline-block;
	color: #0000ff;
	border-bottom: 1px solid #000;
	margin: 0 0 6px;
}

.close-btn {
	position: absolute;
	cursor: pointer;
	font-size: 12px;
	color: #000;
	background: none;
	border: none;
	right: 4px;
	top: 2px;
}

@media (max-width: 768px) {
	.character-container {
		width: 100%;
		margin-bottom: 10px;
	}

	.character-list {
		column-gap: 20px;
		max-height: calc(120px * 2);
	}

	.character-item {
		width: 70px;
		height: 70px;
	}

	.character-item span {
		display: block;
		font-size: 12px;
		line-height: 1.2;
		margin-top: 6px;
	}

	.character-display {
		display: block;
	}

	.image-window {
		width: calc(100vw - 48px);
		height: calc(147vw - 48px);
	}

	.text-window {
		position: static;
		width: 100%;
		box-sizing: border-box;
		margin-top: 16px;
	}

	.close-btn {
		display: none;
	}
}
