.doughnut-chart {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-start;
	justify-content: space-between;
	gap: 24px 48px;
	max-width: 100%;
	margin: 0 auto;
	text-align: left;
	overflow: visible;
	font-family: 'Hiragino Sans', 'ヒラギノ角ゴ Pro', 'Hiragino Kaku Gothic Pro', 'メイリオ', 'Meiryo', sans-serif;
}

.doughnut-chart__canvas-wrap {
	position: relative;
	width: 100%;
	max-width: 380px;
	flex: 0 0 380px;
	overflow: visible;
}

.doughnut-chart__tooltip {
	position: fixed;
	z-index: 10000;
	background: #333;
	color: #fff;
	padding: 6px 10px;
	font-size: 15px;
	line-height: 1.4;
	white-space: nowrap;
	font-family: 'Hiragino Sans', 'ヒラギノ角ゴ Pro', 'Hiragino Kaku Gothic Pro', 'メイリオ', 'Meiryo', sans-serif;
	pointer-events: none;
	opacity: 0;
	visibility: hidden;
	box-shadow: none;
}

.doughnut-chart__canvas-wrap canvas {
	display: block;
	width: 100% !important;
	height: auto !important;
}

.doughnut-chart__legend {
	list-style: none;
	margin: 0 0 0 auto;
	padding: 0;
	flex: 0 1 auto;
	width: max-content;
	max-width: 100%;
}

.doughnut-chart__legend-item,
.doughnut-chart__legend-total {
	display: grid;
	grid-template-columns: 14px auto auto;
	align-items: center;
	column-gap: 8px;
	font-size: 18px;
	line-height: 1.45;
	color: #333;
	padding: 4px 0;
	white-space: nowrap;
}

.doughnut-chart__legend-total {
	grid-template-columns: auto auto;
	margin-top: 6px;
	padding-top: 8px;
	border-top: 1px solid #ccc;
	font-weight: bold;
}

.doughnut-chart__swatch {
	width: 14px;
	height: 14px;
	border-radius: 2px;
}

.doughnut-chart__label {
	min-width: 0;
}

.doughnut-chart__count {
	font-weight: bold;
	font-variant-numeric: tabular-nums;
	text-align: right;
	padding-left: 22px;
}

.doughnut-chart--en .doughnut-chart__legend-item,
.doughnut-chart--en .doughnut-chart__legend-total {
	white-space: normal;
}

.doughnut-chart--en .doughnut-chart__label {
	max-width: 16em;
}

@media screen and (max-width: 1199px) {
	.doughnut-chart {
		gap: 20px 32px;
	}

	.doughnut-chart__canvas-wrap {
		max-width: 320px;
		flex: 0 1 320px;
	}

	.doughnut-chart__legend-item,
	.doughnut-chart__legend-total {
		font-size: 16px;
	}
}

@media screen and (max-width: 959px) {
	.doughnut-chart {
		justify-content: center;
		gap: 20px;
	}

	.doughnut-chart__canvas-wrap {
		flex: 0 1 auto;
		max-width: 300px;
	}

	.doughnut-chart__legend {
		margin: 0 auto;
	}

	.doughnut-chart__legend-item,
	.doughnut-chart__legend-total {
		font-size: 16px;
	}

	.doughnut-chart__count {
		padding-left: 16px;
	}
}

@media screen and (max-width: 640px) {
	.doughnut-chart {
		justify-content: center;
		gap: 16px;
		overflow: hidden;
	}

	.doughnut-chart__canvas-wrap {
		flex: 0 0 auto;
		max-width: 260px;
		overflow: hidden;
	}

	.doughnut-chart__legend {
		flex: 0 1 auto;
		width: max-content;
		max-width: 100%;
		margin: 0 auto;
	}

	.doughnut-chart__legend-item,
	.doughnut-chart__legend-total {
		grid-template-columns: 14px auto auto;
		font-size: 15px;
	}

	.doughnut-chart__legend-total {
		grid-template-columns: auto auto;
	}

	.doughnut-chart__count {
		padding-left: 14px;
	}

	.doughnut-chart__tooltip {
		font-size: 14px;
	}
}

@media screen and (max-width: 400px) {
	.doughnut-chart__canvas-wrap {
		max-width: 220px;
	}

	.doughnut-chart__legend-item,
	.doughnut-chart__legend-total {
		font-size: 14px;
	}
}
