/* ルート変数: ブランドカラーとUI要素の背景色、テキスト色を定義 */
:root {
	--brand-orange: rgba(249, 115, 22, 0.8);
	--brand-yellow: rgba(234, 179, 8, 0.8);
	--brand-green: rgba(34, 197, 94, 0.8);
	--brand-blue: rgba(59, 130, 246, 0.8);
	--brand-red: rgba(239, 68, 68, 0.8);
	--sidebar-bg: #ffffff;
	--chart-bg: #ffffff;
	--hover-gray: #e2e8f0;
	--active-blue-light: #bfdbfe;
	--active-blue-dark: #1e40af;
	--text-dark: #334155;
	--text-medium: #475569;
	--text-light: #64748b;
	--brand-blue-dark: rgba(37, 99, 235, 0.8);
}

/* ボディ全体のスタイル */
body {
	min-height: 100vh;
	margin: 0 auto;
}

/* テーブルの基本スタイル */
table {
	width: 100%;
	border-collapse: collapse;
}

/* テーブルヘッダーとデータセルの共通スタイル */
th,
td {
	border: 1px solid #e0e0e0;
	padding: 5px 10px 5px 10px;
	text-align: center;
	vertical-align: middle;
	font-size: 0.90em;
}

/* テーブルヘッダーのスタイル */
th {
	background-color: #e0f2f7;
	font-weight: 1000;
	color: #2c3e50;
	white-space: nowrap;
	position: sticky;
	top: 0;
	z-index: 2;
}

/* 最初の列のヘッダー（行ヘッダー）のスタイル */
th:first-child {
	left: 0;
	z-index: 3;
}

/* テーブルデータセルのスタイル */
td {
	background-color: #ffffff;
	color: #34495e;
}

.tdheader {
	background-color: #4F81BD !important;
	font-weight: 1000;
	color: #ffffff !important;
	text-align: left;
}
/* メインタイトルのスタイル */
.main-title {
	font-size: 0.90em;
	padding: 5px 10px 5px 10px;
	background-color: #4F81BD;
	color: white;
	text-align: center;
	font-weight: 700;
	line-height: 1.4;
	border-bottom: 1px solid #e0e0e0;
}

/* チャートコンテナのラッパー要素のスタイル */
.chart-container-wrapper {
	background-color: var(--chart-bg);
	border-radius: 0.75rem;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
	padding: 1.5rem;
	margin-bottom: 2rem;
}

/* チャートタイトルのH2見出しスタイル */
.chart-title-h2 {
	font-size: 1.25rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: var(--text-dark);
	text-align: center !important;
}

/* 注釈エリアのスタイル */
.annotation {
	background-color: var(--chart-bg);
	border-left: 4px solid var(--brand-blue);
	border-radius: 0.5rem;
	padding: 1rem 1.5rem;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 凡例のスタイル */
.legend {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-top: 1.5rem;
	padding-top: 1rem;
	border-top: 1px solid var(--hover-gray);
	justify-content: center;
}

/* 凡例アイテムのスタイル */
.legend-item {
	display: flex;
	align-items: center;
	font-size: 0.875rem;
	color: var(--text-medium);
}

/* 凡例の色の表示スタイル */
.legend-color {
	width: 16px;
	height: 16px;
	border-radius: 0.25rem;
	margin-right: 0.5rem;
}

/* タイトルエリアのスタイル */
.title {
	display: flex;
	justify-content: center;
	margin-top: 20px;
	padding: 0.5rem;
}

/* グリッドナビゲーションのリンクスタイル */
.grid-nav .nav-link-custom {
	color: #333;
	text-decoration: none;
	font-weight: bold;
	display: block;
	padding: 0.5rem 0.5rem;
	border-radius: 0px;
	transition: background-color 0.3s ease, color 0.3s ease;
	width: 100%;
	text-align: left;
	background-color: transparent;
	border: none;
}

/* グリッドナビゲーションのリンクホバー、フォーカス時のスタイル */
.nav-link-custom:hover,
.nav-link-custom:focus,
.nav-link-custom:focus-visible,
.nav-link-custom:focus-within {
	background-color: #215F9A;
	color: #FFFFFF;
}

/* アクティブなナビゲーションボタンのスタイル */
.active-nav-button {
	background-color: #215F9A !important;
	color: #FFFFFF !important;
}

/* ページ全体のグリッドコンテナ */
.grid-container {
	display: grid;
	grid-template-columns: 280px 1fr;
	/* 後半の定義を優先 */
	grid-template-rows: auto 1fr auto;
	/* 前半のみに存在 */
	grid-template-areas:
		"header header"
		"nav main"
		"footer footer";
	/* 前半のみに存在 */
	min-height: 100vh;
	/* 後半の定義を優先 */
	gap: 0rem;
	/* 前半のみに存在 */
	margin: 0 auto;
	/* 前半のみに存在 */
	box-sizing: border-box;
	/* 前半のみに存在 */
}

/* ヘッダーのスタイル */
.grid-header {
	grid-area: header;
	background-color: #282c34;
	color: #ffffff;
	padding: 1rem 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	border-radius: 15px;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.grid-header h1 {
	margin: 0;
	font-size: 1.8rem;
}

.header-nav-placeholder {
	font-size: 0.9rem;
}

.header-nav-placeholder a {
	color: #61dafb;
	text-decoration: none;
	margin-left: 1rem;
}

.header-nav-placeholder a:hover {
	text-decoration: underline;
}

/* ナビゲーションメニューのスタイル */
.grid-nav {
	grid-area: nav;
	/* 前半のみに存在 */
	background-color: var(--sidebar-bg);
	/* 後半の定義を優先 */
	border-right: 1px solid #d1d5db;
	/* 後半のみに存在 */
	border-left: 1px solid #d1d5db;
	/* 後半のみに存在 */
	padding: 1.5rem;
	/* 両方に存在、同じ値なのでどちらでも可 */
	width: 280px;
	/* 後半のみに存在 */
	border-radius: 0;
	/* 両方に存在、同じ値なのでどちらでも可 */
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	/* 前半のみに存在 */
}

.grid-nav ul {
	list-style: none;
	padding: 0;
	margin-bottom: 1.5rem;
}

.grid-nav ul li {
	margin-bottom: 0.75rem;
}

.grid-nav ul li a {
	color: #333;
	text-decoration: none;
	font-weight: bold;
	display: block;
	/* リンク全体をクリック可能に */
	padding: 0.5rem 0.75rem;
	border-radius: 0px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.grid-nav ul li a:hover {
	background-color: #e0e6ed;
	color: #61dafb;
}

/* メインコンテンツ（記事エリア）のスタイル */
.grid-main-content {
	grid-area: main;
	/* 前半のみに存在 */
	background-color: #ffffff;
	/* 両方に存在、同じ値なのでどちらでも可 */
	padding: 1.5rem;
	/* 後半の定義を優先 */
	border-radius: 0px;
	/* 前半のみに存在 */
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
	/* 前半のみに存在 */
	flex-grow: 1;
	/* 後半のみに存在 */
}

.grid-main-content .article-meta {
	font-size: 0.9rem;
	color: #666;
	margin-bottom: 1.5rem;
}

.grid-main-content ul {
	list-style: disc;
	margin-left: 1.5rem;
}

/* グリッドナビゲーションのH4見出しスタイル */
.grid-nav h4 {
	font-size: 1.05rem;
	font-weight: 700;
	margin-bottom: 1.5rem;
	color: #1a202c;
	text-align: left;
	line-height: 1.4;
}

/* グリッドナビゲーション内のマージントップ調整 */
.grid-nav .mt-4 {
	margin-top: 1.25rem;
}

/* グリッドナビゲーション内のブロックラベルスタイル */
.grid-nav label.block {
	display: block;
}

/* グリッドナビゲーション内の小さいテキストスタイル */
.grid-nav .text-sm {
	font-size: 0.9375rem;
}

/* グリッドナビゲーション内のミディアムフォントウェイトスタイル */
.grid-nav .font-medium {
	font-weight: 500;
}

/* グリッドナビゲーション内のグレーテキストスタイル */
.grid-nav .text-gray-700 {
	color: #374151;
}

/* グリッドナビゲーション内のブロックセレクトボックススタイル */
.grid-nav select.block {
	display: block;
}

/* グリッドナビゲーション内のフル幅セレクトボックススタイル */
.grid-nav select.w-full {
	width: 100%;
}

/* グリッドナビゲーション内のパディング付きセレクトボックススタイル */
.grid-nav select.p-2 {
	padding: 0.625rem;
}

/* グリッドナビゲーション内のボーダー付きセレクトボックススタイル */
.grid-nav select.border {
	border-width: 1px;
	border-style: solid;
}

/* グリッドナビゲーション内のグレーボーダー付きセレクトボックススタイル */
.grid-nav select.border-gray-300 {
	border-color: #d1d5db;
}

/* グリッドナビゲーション内の角丸セレクトボックススタイル */
.grid-nav select.rounded-md {
	border-radius: 0.5rem;
}

/* グリッドナビゲーション内の影付きセレクトボックススタイル */
.grid-nav select.shadow-sm {
	box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* グリッドナビゲーション内のセレクトボックスフォーカス時のスタイル */
.grid-nav select:focus {
	outline: 2px solid transparent;
	outline-offset: 2px;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
	border-color: var(--brand-blue);
}

/* グリッドナビゲーション内の白い背景のセレクトボックススタイル */
.grid-nav select.bg-white {
	background-color: #fff;
}

/* グリッドナビゲーション内のH3見出しスタイル */
.grid-nav h3 {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 0.625rem;
	margin-top: 1.5rem;
	color: #374151;
	border-bottom: 1px solid #e5e7eb;
	padding-bottom: 5px;
}

/* ボタングループのスタイル */
.button-group {
	display: flex;
	flex-direction: column;
	gap: 0.625rem;
}

/* ラジオボタンを模したボタンのスタイル */
.button-radio {
	display: block;
	width: 100%;
	padding: 0.75rem 1rem;
	border: 1px solid #d1d5db;
	border-radius: 0.5rem;
	background-color: #f9fafb;
	color: #374151;
	text-align: left;
	cursor: pointer;
	transition: all 0.2s ease-in-out;
	font-size: 1em;
	font-weight: 500;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

/* ラジオボタンを模したボタンのホバー時のスタイル */
.button-radio:hover {
	background-color: var(--hover-gray);
	border-color: var(--brand-blue);
	color: var(--brand-blue-dark);
}

/* アクティブなラジオボタンを模したボタンのスタイル */
.button-radio.active {
	background-color: var(--brand-blue);
	color: #ffffff;
	border-color: var(--brand-blue);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.4);
}

/* アクティブなラジオボタンを模したボタンのホバー時のスタイル */
.button-radio.active:hover {
	background-color: var(--brand-blue-dark);
	border-color: var(--brand-blue-dark);
}

/* 無効化されたラジオボタンを模したボタンのスタイル */
.button-radio.disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
	background-color: #e0e0e0;
	border-color: #c0c0c0;
	color: #808080;
}

/* グリッドナビゲーション内のマージン左調整 */
.grid-nav .ml-2 {
	margin-left: 0.625rem;
}

/* チャートと注釈のグリッドレイアウトスタイル */
.chart-and-annotation-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1rem;
	margin-bottom: 1rem;
	margin-top: 1rem;
}

/* メディアクエリ: 768px以上の画面幅でのレイアウト調整 */
@media (min-width: 768px) {
	.chart-and-annotation-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	/* チャートエリアのスタイル調整 (棒グラフ用) */
	.chart-area-md-col-span-2 {
		grid-column: span 1 / span 2;
		background-color: var(--chart-bg);
		height: 350px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	/* 円グラフ専用のチャートエリアスタイル */
	.chart-area-pie-chart {
		grid-column: span 1 / span 2;
		background-color: var(--chart-bg);
		height: 300px;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
	}

	/* チャートキャンバスの最大幅と高さ */
	.chart-area-md-col-span-2 canvas,
	.chart-area-pie-chart canvas {
		max-width: 100%;
		max-height: 100%;
	}

	/* 注釈エリアのスタイル調整 */
	.annotation-md-col-span-1 {
		grid-column: span 1 / span 1;
	}
}

/* セクション区切り線のスタイル */
.section-separator {
	margin-top: 2rem;
	margin-bottom: 2rem;
	border: none;
	border-bottom: 1px solid #e0e0e0;
	width: 100%;
}

/* テーブルとタイトルをまとめるラッパーのスタイル */
.table-block-wrapper {
	background-color: #ffffff;
	border-radius: 12px;
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
	overflow: hidden;
	margin-bottom: 1rem;
}

/* テーブルのスクロール可能なコンテンツ部分のスタイル */
.table-scrollable-content {
	overflow-y: hidden;
	overflow-x: auto;
	padding: 0;
}

/* KAAAAA.css から統合されたスタイル */
.modal {
	display: none;
	position: fixed;
	z-index: 1;
	left: 0;
	top: 0;
	height: 100%;
	width: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
	position: fixed;
	top: 10%;
	left: 15%;
	width: 70%;
	box-shadow: 0 5px 8px 0 rgba(0, 0, 0, 0.2), 0 7px 20px 0 rgba(0, 0, 0, 0.17);
	animation-name: modalopen;
	animation-duration: 0.5s;
	font-size: 20px;
}

/* ネストされたCSSを修正 */
.modal-content .row div.title {
	text-align: center;
}

.modal-content .row {
	padding: 5px 0px;
}

.modal-content .row .text-center {
	color: white;
	align-content: center;
}

@keyframes modalopen {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.modalClose {
	font-size: 2rem;
}

.modalClose:hover {
	cursor: pointer;
}

.modal-body {
	padding: 10px 20px;
	color: black;
}

.button-bottom {
	padding: 20px 0px;
}

.midashi {
	border-left: solid #018838 6px;
	padding-left: 5px;
	color: #018838;
}

.modal-table th {
	background-color: #BDD7EE !important;
}

.table-wrapper {
	width: 1300px;
	position: relative;
	max-height: 500px;
	overflow-y: scroll;
}

thead::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 50%;
	background: white;
	z-index: -2;
}

div.info textarea {
	width: 95%;
	height: 200px;
	margin-top: 15px;
	margin-left: 20px;
	margin-right: 20px;
	background-color: #c0c0c0 !important;
}

div.info2 textarea {
	width: 95%;
	height: 70px;
	margin-top: 15px;
	margin-left: 20px;
	margin-right: 20px;
	background-color: #c0c0c0 !important;
}

div.info3 textarea {
	width: 95%;
	height: 200px;
	margin-top: 15px;
	margin-left: 20px;
	margin-right: 20px;
}

div.info4 textarea {
	width: 95%;
	height: 70px;
	margin-top: 15px;
	margin-left: 20px;
	margin-right: 20px;
}

/* レスポンシブ対応 (画面幅が768px以下の場合) */
@media (max-width: 768px) {
	.grid-container {
		/* 画面が狭い場合は1列にする */
		grid-template-columns: 1fr;
		/* 要素を縦に積み重ねる順序を定義 */
		grid-template-areas:
			"header"
			"nav"
			"main"
			"footer";
		padding: 1rem;
		/* パディングを小さくする */
		gap: 1rem;
		/* ギャップを小さくする */
	}

	.grid-header {
		flex-direction: column;
		/* ヘッダーの要素を縦並びにする */
		text-align: center;
		padding: 1rem;
	}

	.grid-header h1 {
		font-size: 1.5rem;
	}

	.header-nav-placeholder {
		margin-top: 0.5rem;
	}

	.grid-nav {
		padding: 1rem;
	}

	.grid-nav h3 {
		text-align: center;
	}

	.grid-nav ul {
		display: flex;
		/* ナビゲーションリンクを横スクロール可能にするか、折り返すか */
		flex-wrap: wrap;
		/* リンクを折り返す */
		justify-content: center;
		/* 中央寄せ */
		margin-bottom: 1rem;
	}

	.grid-nav ul li {
		margin: 0.5rem 0.75rem;
		/* リンク間のマージン */
	}

	.grid-nav ul li a {
		padding: 0.4rem 0.8rem;
		font-size: 0.9rem;
	}

	.ad-space {
		margin-top: 1.5rem;
	}

	.grid-main-content {
		padding: 1.5rem;
	}

	.grid-main-content h2 {
		font-size: 1.5rem;
	}
}

/* スピナーのスタイル */
.spinner-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(255, 255, 255, 0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 1000;
	display: none;
	/* Initially hidden */
}

.spinner {
	border: 8px solid #f3f3f3;
	/* Light grey */
	border-top: 8px solid #3498db;
	/* Blue */
	border-radius: 50%;
	width: 60px;
	height: 60px;
	animation: spin 2s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

.evmaxmin-table {
	font-size: 0.9em;;
}