@charset "utf-8";
/* ==========================================================
   音声読み上げ（js/tts.js）
   ========================================================== */

/* 非対応ブラウザ・JS無効時はボタンを出さない */
.ttsArea,
.ttsSpWrap {
	display: none;
}

/* ---------- 読み上げボタン ---------- */
.ttsOpenBtn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 6px 14px;
	border: 1px solid #30458c;
	border-radius: 4px;
	background: #30458c;
	color: #fff;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.4;
	cursor: pointer;
}
.ttsOpenBtn:hover {
	background: #fff;
	color: #30458c;
}
.ttsOpenBtn:focus-visible {
	outline: 3px solid #f41787;
	outline-offset: 2px;
}
.ttsOpenBtn svg {
	width: 18px;
	height: 18px;
	flex: none;
}

/* PC：ヘッダー右側、リンクの下 */
.tts-ready .ttsArea {
	display: block;
	float: right;
	clear: right;
	margin: 12px 10px 0 0;
}
.tts-open .ttsArea .ttsOpenBtn {
	visibility: hidden; /* 場所は確保したまま、コントローラーに置き換える */
}

/* ---------- コントローラー ---------- */
.ttsPanel {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 10000;
	box-sizing: border-box;
	width: 193px;
	padding: 30px 12px 12px;
	border-radius: 6px;
	background: rgba(60, 60, 60, 0.85);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}
.ttsPanel button {
	margin: 0;
	padding: 0;
	font-family: inherit;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
.ttsPanel svg {
	display: block;
}

.ttsClose {
	position: absolute;
	top: 5px;
	left: 6px;
	width: 22px;
	height: 22px;
	border: none;
	background: transparent;
	color: #fff;
}
.ttsClose svg {
	width: 16px;
	height: 16px;
	margin: 3px;
}

.ttsBtns {
	display: flex;
	justify-content: space-between;
}
.ttsBtn {
	width: 49px;
	height: 42px;
	border: 1px solid rgba(255, 255, 255, 0.85);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
}
.ttsBtn svg {
	width: 24px;
	height: 24px;
	margin: 0 auto;
}
.ttsBtn:hover,
.ttsBtn.is-active {
	background: rgba(255, 255, 255, 0.3);
	border-color: #fff;
}
.ttsPanel button:focus-visible {
	outline: 3px solid #ffd400;
	outline-offset: 1px;
}

/* ---------- スマホ ---------- */
@media handheld, only screen and (max-width: 767px) {
	.tts-ready .ttsArea {
		display: none;
	}

	/* MENUバーの直下・右側（メイン画像の右上に重ねる） */
	.tts-ready .ttsSpWrap {
		display: block;
		position: relative;
		height: 0;
		z-index: 50;
	}
	.ttsSpWrap .ttsOpenBtn {
		position: absolute;
		top: 8px;
		right: 8px;
		padding: 5px 10px;
		font-size: 13px;
		background: rgba(48, 69, 140, 0.9);
		border-color: #fff;
	}
	.tts-open .ttsSpWrap .ttsOpenBtn {
		display: none;
	}

	.ttsPanel--sp {
		top: 8px;
		right: 8px;
	}
}
