
.chart-section {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 32px;
	margin-top: 24px;
	margin-bottom: 40px;
}
.chart-header-info {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 16px;
	margin-bottom: 24px;
	border-bottom: 1px solid var(--line);
	padding-bottom: 16px;
}
.fund-main-title {
	font-size: 24px;
	font-weight: 700;
	color: var(--ink);
	margin: 0;
}
.fund-ticker-code {
	display: none;
	font-family: var(--mono);
	font-size: 13px;
	color: var(--slate);
	background: var(--fog);
	padding: 4px 8px;
	border-radius: 4px;
}
.fund-action-buttons {
	display: flex;
	gap: 12px;
	margin-bottom: 24px;
	flex-wrap: wrap;
}
.action-btn {
	background: #00ad36;
	color: #fff;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	border-radius: 4px;
	text-decoration: none;
	transition: opacity 0.2s;
}
.action-btn:hover { opacity: 0.85; }

.fund-metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 16px;
	background: var(--fog);
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 20px;
	margin-bottom: 24px;
}
.metric-item {
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.metric-label {
	font-size: 12px;
	color: var(--slate);
	font-family: var(--mono);
}
.metric-value {
	font-size: 18px;
	font-weight: 700;
	color: var(--ink);
	font-family: var(--mono);
}
.metric-value.positive { color: #00ad36; }
.metric-value.negative { color: #e53935; }

/* 定量指標および相関テーブル用セクション */
.metrics-table-section {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 24px;
	margin-top: 24px;
	margin-bottom: 40px;
}
/* --- 定量指標セクションの見出し共通化 --- */
.metrics-table-section .perf-table-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	margin-bottom: 16px;
	padding-bottom: 12px;
}

/* 「指定インデックスとの相関・ベータ」の見出し（インラインスタイルを上書きして統一） */
.metrics-table-section h3 {
	font-size: 20px !important;
	font-weight: 700 !important;
	color: var(--ink) !important;
	margin-bottom: 12px !important;
	margin-top: 24px !important;
}
.metrics-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 16px;
	margin-bottom: 24px;
}
.metric-card {
	background: var(--fog);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 16px;
}
.metric-card-title {
	font-size: 12px;
	color: var(--slate);
	font-family: var(--mono);
	margin-bottom: 8px;
}
.metric-card-val {
	font-size: 20px;
	font-weight: 700;
	font-family: var(--mono);
	color: var(--ink);
}


.metrics-glossary-section {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 16px 20px;
	margin-top: 16px;
	margin-bottom: 24px;
}
.glossary-list {
	display: grid;
	grid-template-columns: 1fr;
	gap: 8px 0;
	font-size: 11.5px;
	color: var(--slate);
	line-height: 1.45;
	margin: 0;
}
.glossary-item {
	background: transparent;
	padding: 2px 0;
	border: none;
}
.glossary-item dt {
	display: inline;
	font-weight: 700;
	color: var(--ink);
	font-family: var(--mono);
	margin-right: 6px;
}
.glossary-item dt::after {
	content: "：";
}
.glossary-item dd {
	display: inline;
	margin: 0;
}

@media (max-width: 768px) {
	.glossary-list {
		grid-template-columns: 1fr;
	}
}

.performance-table-section {
	background: #ffffff;
	border: 1px solid var(--line);
	border-radius: 6px;
	padding: 24px;
	margin-top: 24px;
	margin-bottom: 40px;
}
.perf-table-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--ink);
	margin-bottom: 16px;
	/* border-bottom: 1px solid var(--line); */
	padding-bottom: 12px;
}
.perf-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
	gap: 12px;
	text-align: center;
}
.perf-card {
	background: var(--fog);
	border: 1px solid var(--line);
	border-radius: 4px;
	padding: 12px 8px;
}
.perf-period {
	font-size: 12px;
	color: var(--slate);
	font-family: var(--mono);
	margin-bottom: 6px;
	display: block;
}
.perf-val {
	font-size: 15px;
	font-weight: 600;
	font-family: var(--mono);
	color: var(--ink);
}
.perf-val.positive { color: #00ad36; }
.perf-val.negative { color: #e53935; }

.chart-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
}
.btn-group { 
	display: flex; 
	gap: 6px; 
	flex-wrap: wrap; 
}
.chart-btn {
	background: #fff;
	border: 1px solid var(--line);
	color: var(--ink);
	padding: 6px 14px;
	font-size: 13px;
	font-family: var(--mono);
	font-weight: 500;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.2s;
}
.chart-btn:hover, .chart-btn.active {
	background: var(--ink);
	color: #fff;
	border-color: var(--ink);
}
#chart-container {
	width: 100%;
	height: 480px;
	position: relative;
}
.loading-overlay {
	position: absolute;
	inset: 0;
	background: rgba(255,255,255,0.8);
	display: flex;
	justify-content: center;
	align-items: center;
	font-family: var(--mono);
	font-size: 14px;
	color: var(--slate);
	z-index: 10;
}

@media print {
	@page {
		size: A4 portrait;
		margin: 6mm 8mm; /* 用紙の余白をわずかに狭めて収まりを良くする */
	}
	body {
		background: #fff !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
		font-size: 9px !important; 
		color: #000 !important;
		margin: 0 !important;
		padding: 0 !important;
	}
	/* 画面専用の不要なUIを非表示 */
	.util-bar, nav, .breadcrumb, .fund-action-buttons, .chart-controls, .loading-overlay {
		display: none !important;
	}
	/* フル幅を確保 */
	main, .section, .section-inner {
		padding: 0 !important;
		margin: 0 !important;
		width: 100% !important;
		max-width: 100% !important;
		display: block !important;
	}
	/* 各セクションの余白を詰めて1ページに収める */
	.chart-section, .performance-table-section, .metrics-table-section, .disclaimer-section {
		background: #fff !important;
		border: 1px solid #ccc !important;
		padding: 5px 8px !important;
		margin-top: 0 !important;
		margin-bottom: 3px !important;
		border-radius: 4px !important;
		break-inside: avoid;
		position: static !important;
	}
	/* --- 印刷時の見出しサイズ統一（リスク・リターン指標 / 相関分析 ＆ 指定インデックス） --- */
	.metrics-table-section .perf-table-title {
		font-size: 11px !important;
		margin-bottom: 4px !important;
		padding-bottom: 2px !important;
		border-bottom: 1px solid #ccc !important;
	}

	.metrics-table-section h3 {
		font-size: 11px !important;
		font-weight: bold !important;
		margin-top: 6px !important;
		margin-bottom: 3px !important;
		border-bottom: 1px solid #eee !important;
		padding-bottom: 2px !important;
	}

	/* --- 印刷時の「リスク・リターン指標について」を小さくする --- */
	.glossary-section-title,
	div[style*="margin-top: 24px"] > div:first-child {
		font-size: 10px !important;
		font-weight: bold !important;
		margin-top: 4px !important;
		margin-bottom: 2px !important;
	}
	.chart-header-info {
		margin-bottom: 4px !important;
		padding-bottom: 4px !important;
		border-bottom: 1px solid #ccc !important;
	}
	.fund-main-title {
		font-size: 13px !important;
	}
	.fund-ticker-code {
		display: none;
		font-size: 10px !important;
		padding: 2px 4px !important;
	}
	.fund-metrics-grid {
		padding: 4px 8px !important;
		margin-bottom: 4px !important;
		gap: 6px !important;
		grid-template-columns: repeat(4, 1fr) !important;
		background: #f8f9fa !important;
	}
	.metric-label {
		font-size: 8px !important;
	}
	.metric-value {
		font-size: 11px !important;
	}

	/* チャートの高さをわずかに調整してスペースを確保 */
	#chart-container {
		height: 150px !important;
		width: 100% !important;
		position: relative !important;
		margin-top: 2px !important;
	}
	#myChart {
		width: 100% !important;
		height: 150px !important;
	}

	.perf-table-title {
		font-size: 11px !important;
		margin-bottom: 4px !important;
		padding-bottom: 2px !important;
		/* border-bottom: 1px solid #ccc !important; */
	}
	.perf-grid {
		grid-template-columns: repeat(9, 1fr) !important;
		gap: 3px !important;
	}
	.perf-card {
		padding: 3px 2px !important;
		background: #f8f9fa !important;
		border: 1px solid #ddd !important;
	}
	.perf-period {
		font-size: 8px !important;
		margin-bottom: 1px !important;
	}
	.perf-val {
		font-size: 9.5px !important;
	}
	.metrics-grid {
		grid-template-columns: repeat(3, 1fr) !important;
		gap: 4px !important;
		margin-bottom: 4px !important;
	}
	.metric-card {
		padding: 4px 6px !important;
		background: #f8f9fa !important;
		border: 1px solid #ddd !important;
	}
	.metric-card-title {
		font-size: 8px !important;
		margin-bottom: 1px !important;
	}
	.metric-card-val {
		font-size: 11px !important;
	}

	/* ★「リスク・リターン指標について」の文字を小さくして高さを圧縮 */
	.glossary-list {
		grid-template-columns: 1fr !important;
		gap: 1.5px 0 !important;
		font-size: 7.5px !important; /* 文字サイズを小さく変更 */
		line-height: 1.2 !important;
	}
	.glossary-item {
		padding: 1px 0 !important;
		background: transparent !important;
		border: none !important;
	}
	.glossary-item dt {
		font-size: 7.5px !important;
	}
	.glossary-item dd {
		font-size: 7.5px !important;
	}

	.disclaimer-section {
		padding: 4px 8px !important;
		margin-top: 3px !important;
	}
	.disc-title {
		font-size: 9px !important;
		margin-bottom: 2px !important;
	}
	.disc-text p {
		font-size: 6.5px !important;
		line-height: 1.15 !important;
		margin: 0 !important;
	}
	
	/* --- 印刷用フッター（1ページ目に確実に収めるためのコンパクト設計） --- */
	footer {
		display: block !important;
		background: #fff !important;
		border: 1px solid #ccc !important;
		border-radius: 4px !important;
		margin-top: 3px !important;
		padding: 4px 8px !important;
		font-size: 7.5px !important;
		break-inside: avoid;
	}
	.footer-inner {
		padding: 0 !important;
		max-width: 100% !important;
	}
	.footer-top {
		display: block !important;
		padding-bottom: 2px !important;
		border-bottom: 1px solid #eee !important;
	}
	.footer-brand-name {
		font-size: 9px !important;
		font-weight: bold;
		color: #000 !important;
		display: block;
		margin-bottom: 1px;
	}
	.footer-brand-desc {
		display: block !important;
		list-style: none !important;
		padding: 0 !important;
		margin: 0 !important;
		font-size: 7px !important;
		color: #333 !important;
		line-height: 1.2 !important;
	}
	.footer-brand-desc li {
		margin-bottom: 0px !important;
	}
	/* 不要なリンク類は完全に非表示 */
	.footer-top > div:nth-child(2),
	.footer-top > div:nth-child(3),
	.footer-legal {
		display: none !important;
	}
	.footer-bottom {
		margin-top: 2px !important;
		padding: 0 !important;
		text-align: right !important;
	}
	.ft-copy {
		font-size: 7px !important;
		color: #555 !important;
	}
}

@media (max-width: 768px) {
	.chart-controls {
		flex-direction: column;
		align-items: stretch;
		gap: 8px;
	}
	.btn-group {
		justify-content: center;
		flex-wrap: wrap;
	}
	.chart-btn {
		flex: 1 1 auto;
		text-align: center;
		padding: 6px 10px;
		font-size: 12px;
	}
	.footer-top {
		display: flex !important;
		flex-direction: column !important;
		gap: 24px !important;
	}
	.footer-top ul.ft-links {
		display: grid !important;
		grid-template-columns: 1fr !important; /* スマホでは縦一列（または 1fr 1fr の2列）にする */
		gap: 4px 0 !important;
		width: 100% !important;
		white-space: normal !important; /* 折り返しを許可する */
	}
	.footer-top ul.ft-links li a {
		font-size: 13px !important;
		word-break: break-all;
	}
}
