#container
{
	font-size:17px;
	font-family: 'Nunito', sans-serif;
	width:1280px;
	height:800px;
}

#choices
{
	position:absolute;
	bottom:0px;
	padding:10px;
	width: 1260px;
	left:0px;
	background:rgba(0,0,0,0.8);
	z-index: 100; /* スチルより前面に表示 */
}

/* ダイアログボックス非表示クラス */
#choices.dialog-hidden
{
	display: none !important;
}
.choice
{
	cursor:pointer;
	-webkit-touch-callout: none;
	-webkit-user-select: none;
	-khtml-user-select: none;
	-moz-user-select: none;
	-ms-user-select: none;
	user-select: none;
	padding: 5px;
	color:rgb(190,190,190);
}

#characterName
{
	font-family: 'Poiret One', cursive;
	text-align: left;
	color:rgb(190,190,190);
	font-size:22px;
	text-shadow:2px 2px 3px black;
	margin-left: 15px;
}
#placeName
{
	position:absolute;
	top:-1px;
	left:6px;
	font-family: 'Poiret One', cursive;
	color:white;
	padding:3px 20px;
	border:1px solid rgba(255,255,255, 0.6);
	background:rgba(0,0,0,0.8);
	z-index: 10; /* スチルよりも前面に表示 */
}
.choice:hover
{
	background:rgba(255,255,255,0.1);
	color:white;
}

/* キャラクターテキスト */
#characterText {
	color: white;
	padding: 5px;
	padding-left: 10px;
	line-height: 1.4;
	font-size: 17px;
}

/* キャラクターごとのテキスト色 */
#container[character="alice"] #characterText {
	color: rgb(255, 80, 150);
}

#container[character="bobby"] #characterText {
	color: rgb(255, 247, 128);
}

#container[character="default"] #characterText {
	color: rgb(200, 200, 200);
}

#container[character="me"] #characterText {
	color: rgb(255, 255, 255);
}

#container[character="narrator"] #characterText {
	color: rgb(190, 190, 190);
}

#container[character="yami"] #characterText {
	color: rgb(255, 150, 200);
}

#container[character="hunter"] #characterText {
	color: rgb(200, 150, 255);
}

/* ダイアログ背景画像サポート */
#choices {
	background-image: url('');
	background-repeat: repeat;
	background-size: auto;
}

/* ダイアログ背景画像設定用クラス */
.dialog-bg-pattern1 #choices {
	background-image: url('../img/pattern1.png') !important;
	background-color: transparent !important; /* 黒い半透明背景を無効化 */
}

.dialog-bg-pattern2 #choices {
	background-image: url('../img/dialog-bg-pattern2.png');
}

/* 中央ダイアログ */
.center-dialog {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.8);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1000;
}

.center-dialog.hidden {
	display: none;
}

.center-dialog-content {
	/* 黒いウインドウを削除 - 背景透明に */
	background: transparent;
	padding: 40px;
	/* border-radius: 10px; 角丸削除 */
	max-width: 80%;
	max-height: 80%;
	text-align: center;
}

/* 中央ダイアログの話者名 */
#centerDialogCharacterName {
	font-family: 'Poiret One', cursive;
	text-align: left;
	color: rgb(190,190,190);
	font-size: 22px;
	text-shadow: 2px 2px 3px black;
	margin-bottom: 10px;
	margin-left: 15px;
}

#centerDialogText {
	color: white;
	font-size: 17px; /* 通常セリフ(#container)と同じサイズに変更 */
	line-height: 1.6;
}

/* 中央ダイアログでのキャラクター別文字色 */
.center-dialog[character="alice"] #centerDialogText {
	color: rgb(255, 80, 150);
}

.center-dialog[character="alice"] #centerDialogCharacterName {
	color: rgb(255, 80, 150);
}

.center-dialog[character="bobby"] #centerDialogText {
	color: rgb(255, 247, 128);
}

.center-dialog[character="bobby"] #centerDialogCharacterName {
	color: rgb(255, 247, 128);
}

.center-dialog[character="default"] #centerDialogText {
	color: rgb(200, 200, 200);
}

.center-dialog[character="default"] #centerDialogCharacterName {
	color: rgb(128, 232, 255);
}

.center-dialog[character="me"] #centerDialogText {
	color: rgb(255, 255, 255);
}

.center-dialog[character="me"] #centerDialogCharacterName {
	color: rgb(255, 255, 255);
}

.center-dialog[character="narrator"] #centerDialogText {
	color: rgb(190, 190, 190);
}

.center-dialog[character="narrator"] #centerDialogCharacterName {
	color: rgb(190, 190, 190);
}

.center-dialog[character="yami"] #centerDialogText {
	color: rgb(255, 150, 200);
}

.center-dialog[character="yami"] #centerDialogCharacterName {
	color: rgb(255, 150, 200);
}

.center-dialog[character="hunter"] #centerDialogText {
	color: rgb(200, 150, 255);
}

.center-dialog[character="hunter"] #centerDialogCharacterName {
	color: rgb(200, 150, 255);
}

/* スチル表示機能 */
#stillContainer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 3; /* 背景・キャラより手前、UI要素・ダイアログより後ろに表示 */
	pointer-events: none;
	display: flex;
	align-items: center;
	justify-content: center;
}

#stillImage {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
}

#stillImage.visible {
	opacity: 1;
}

#stillImage.fade-in {
	opacity: 0;
	animation: fadeIn 1s ease-in-out forwards;
}

#stillImage.fade-out {
	opacity: 1;
	animation: fadeOut 1s ease-in-out forwards;
}

/* マスク表示機能 */
#maskContainer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 2000; /* 最前面 */
	pointer-events: none;
	opacity: 0;
	background-color: black;
	transition: opacity 0.5s ease-in-out;
}

#maskContainer.visible {
	opacity: 1;
}

#maskContainer.fade-in {
	opacity: 0;
	animation: fadeIn 1s ease-in-out forwards;
}

#maskContainer.fade-out {
	opacity: 1;
	animation: fadeOut 1s ease-in-out forwards;
}

/* エフェクト用アニメーション */
@keyframes fadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes fadeOut {
	from { opacity: 1; }
	to { opacity: 0; }
}

/* 時間指定エフェクト用クラス */
.fade-effect-1s { animation-duration: 1s !important; }
.fade-effect-2s { animation-duration: 2s !important; }
.fade-effect-3s { animation-duration: 3s !important; }
.fade-effect-4s { animation-duration: 4s !important; }
.fade-effect-5s { animation-duration: 5s !important; }
.fade-effect-custom { /* カスタム時間は動的に設定 */ }
}

/* 背景のエフェクト用 */
#place {
	transition: opacity 0.5s ease-in-out;
}

#place.fade-in {
	opacity: 0;
	animation: fadeIn 1s ease-in-out forwards;
}

#place.fade-out {
	opacity: 1;
	animation: fadeOut 1s ease-in-out forwards;
}

/* キャラクターのエフェクト用 */
.character {
	opacity: 1; /* デフォルトで可視状態 */
	transition: opacity 0.5s ease-in-out;
}

.character.fade-in {
	opacity: 0;
	animation: fadeIn 1s ease-in-out forwards;
}

.character.fade-out {
	opacity: 1;
	animation: fadeOut 1s ease-in-out forwards;
}

/* 入力禁止時のスタイル */
body.input-blocked {
	cursor: not-allowed;
}

body.input-blocked #container {
	pointer-events: none;
}

body.input-blocked #choices {
	/* タイプライター表示中は透明度を保持 */
	opacity: 1.0;
	pointer-events: none;
}

body.input-blocked .choice {
	pointer-events: none;
	cursor: not-allowed;
}

/* 入力禁止中の視覚的フィードバック */
body.input-blocked::before {
	content: '';
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: transparent;
	z-index: 9999;
	pointer-events: all;
	cursor: not-allowed;
}