/* =========================
   数値で見るデジタルアイズページ用
========================= */

.numbers-page {
	position: relative;
	overflow: visible;
}

.numbers-page__inner {
	position: relative;
	z-index: 2;
	max-width: 1100px;
	margin: 0 auto;
}

.numbers-page__inner--narrow {
	max-width: 1100px;
}

.numbers-hero {
	padding: 24px 0 72px;
}

.numbers-hero__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 420px;
	gap: 72px;
	align-items: center;
}

.numbers-hero__lead {
	max-width: 520px;
	color: var(--color-text);
	font-size: var(--font-size-body);
	font-weight: 300;
	line-height: 2;
	letter-spacing: 0.06em;
}

.numbers-hero__lead p {
	margin: 0 0 1.2em;
}

.numbers-hero__image {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

.numbers-hero__image .attachment-large {
	max-width: unset !important;
	width: 150%;
	padding-right: 40px;
}

.numbers-hero__image img {
	z-index: 1;
	display: block;
	width: min(100%, 360px);
	height: auto;
}

.numbers-hero__image_bg {
	position: absolute;
	z-index: -1;
	opacity: 0.3;
    max-width: unset;
    width: 120% !important;
    left: -60px;
	bottom: 0;
}

.numbers-summary {
	padding: 0 0 84px;
}

/* ========================================
   数値グラフ：新デザイン
======================================== */
.numbers-chart-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	margin-bottom: 52px;
}

.numbers-chart-card {
	position: relative;
	display: flex;
	flex-direction: column;
	min-height: 360px;
	padding: 30px 34px 18px;
	background: rgb(236 249 244 / 92%);
	border-radius: 12px;
	box-sizing: border-box;
}

/* タイトル＋主要数値 */
.numbers-chart-card__heading {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 7px;
	margin-bottom: 18px;
}

/*
 * デザイン案ではタイトルより数値を明確に大きくする
 */
.numbers-chart-card__title {
	margin: 0;
	padding: 0;
	color: var(--color-primary);
	/* font-size: clamp(1rem, 1.5vw, 1.35rem); */
	font-size: var(--font-size-heading-xs);
	font-weight: 700;
	line-height: 1.4;
	border: none !important;
}

.numbers-chart-card__heading-value {
	margin: 0;
	color: var(--color-primary);
	font-size: var(--font-size-heading-lg);
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.numbers-chart-card__heading-value span {
	margin-left: 3px;
}

/* 両カードの時点表示：全画面幅共通 */
.numbers-chart-card__note--bottom {
	align-self: stretch;
	width: 100%;
	margin: auto 0 0 !important;
	padding-top: 8px;
	color: var(--color-primary);
	font-family: inherit;
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: right;
	white-space: nowrap;
}

/* 擬似要素を無効化 */
.numbers-chart-card__title::before,
.numbers-chart-card__title::after,
.numbers-section-title::before,
.numbers-section-title::after {
	display: none !important;
	content: none !important;
}

/* ========================================
   従業員数カード：男女比
======================================== */

.numbers-gender-label {
	align-self: center;
	margin: 0 0 8px;
	padding: 4px 18px;
	border-radius: 999px;
	background: var(--color-primary);
	color: #fff;
	font-size: var(--font-size-meta);
	font-weight: 700;
	line-height: 1;
}

.numbers-gender-bars {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;

	width: min(100%, 360px);
	margin: 0 auto;
}

/*
 * 棒の中身
 */
.numbers-gender-bar {
	display: flex;
	align-items: flex-end;
	justify-content: flex-start;
	gap: 8px;

	height: 74px;
	padding: 0 14px;

	color: #fff;
	box-sizing: border-box;
	overflow: hidden;
}

/*
 * PCでも最大値を100%として伸縮
 * 43名：100%
 * 31名：約72%
 */
.numbers-gender-bar--male {
	width: var(--male-sp-ratio);
	background: #7fd3bd;
}

.numbers-gender-bar--female {
	width: var(--female-sp-ratio);
	background: #f7931e;
}

.numbers-gender-bar__icon {
	display: flex;
	flex: 0 0 auto;
	align-items: flex-end;
	justify-content: center;

	width: auto;
	height: 100%;
	aspect-ratio: 1 / 2;
}

.numbers-gender-bar__icon img {
	display: block;
	width: auto;
	height: 100%;
	max-width: none;
	object-fit: contain;
	object-position: center bottom;
}

.numbers-gender-bar__value {
	display: flex;
	align-items: baseline;
	align-self: center;

	margin: 0;
	font-size: 4rem;
	font-weight: 700;
	line-height: 1;
	white-space: nowrap;
}

.numbers-gender-bar__value span {
	margin-left: 5px;
	font-size: 0.48em;
}

.numbers-worklife__heading {
	display: block;
	align-items: baseline;
	justify-content: center;
	gap: 8px;
	margin-bottom: 22px;
}

.numbers-worklife__title {
	margin: 0;
}

.numbers-worklife__date {
	position: static;
	margin: 0;
	color: var(--color-primary);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.5;
	white-space: nowrap;
	transform: none;
}

.numbers-chart-card__title::before,
.numbers-chart-card__title::after,
.numbers-section-title::before,
.numbers-section-title::after {
	display: none !important;
	content: none !important;
}

/* ========================================
   平均年齢カード
======================================== */

.numbers-chart-card--age .numbers-chart-card__body {
	display: grid;
	grid-template-columns: 210px max-content;
	align-items: start;
	justify-content: center;
	gap: 22px;

	width: 100%;
	margin: 12px 0 0;
}

.numbers-chart-card--age .numbers-pie {
	width: 210px;
	aspect-ratio: 1;
	border-radius: 50%;
	flex-shrink: 0;
}

.numbers-chart-card--age .numbers-legend {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	align-self: start;
	gap: 7px;
	padding-top: 18px;
}

.numbers-legend p {
	display: grid;
	grid-template-columns: 12px auto auto;
	align-items: center;
	justify-content: start;
	column-gap: 5px;

	width: auto;
	margin: 0;

	color: var(--color-text);
	font-size: var(--font-size-body-small);
	font-weight: 700;
	line-height: 1.4;
}

.numbers-legend p em {
	margin-left: 1px;
	font-style: normal;
	font-size: 0.82em;
	white-space: nowrap;
}

.numbers-legend p span {
	display: inline-block;
	width: 12px;
	height: 12px;
	flex: 0 0 12px;
}

.numbers-legend p:nth-child(1) span {
	background: #7fd3bd;
}

.numbers-legend p:nth-child(2) span {
	background: #f5a400;
}

.numbers-legend p:nth-child(3) span {
	background: #fff27a;
}

.numbers-legend p:nth-child(4) span {
	background: #98cf3d;
}

.numbers-section-title {
	color: var(--color-primary);
	font-size: var(--font-size-label);
	font-weight: 700;
	line-height: 1.5;
	text-align: center;
	border: none !important;
}

.numbers-worklife {
	margin-top: 0;
	text-align: center;
}

.numbers-worklife__box {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
	background: rgba(247, 250, 238, 0.95);
	border-radius: 12px;
	padding: 28px 24px;
}

.numbers-worklife__item {
	position: relative;
	text-align: center;
}

.numbers-worklife__item:not(:last-child)::after {
	content: "";
	position: absolute;
	top: 8px;
	right: 0;
	width: 1px;
	height: calc(100% - 16px);
	background: rgba(126, 220, 200, .6);
}

.numbers-worklife__label {
	margin: 0 0 8px;
	color: var(--color-text);
	font-size: var(--font-size-body-small);
	font-weight: 700;
}

.numbers-worklife__value {
	margin: 0;
	color: var(--color-primary);
	font-size: var(--font-size-heading-lg);
	font-weight: 700;
	line-height: 1;
}

.numbers-worklife__value span {
	margin-left: 4px;
	font-size: var(--font-size-meta);
}

.numbers-worklife__content {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.numbers-worklife__icon {
	width: 48px;
	height: 48px;
	border-radius: 50%;
	background: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.numbers-worklife__icon img {
	display: block;
	width: 30px;
	height: 30px;
	object-fit: contain;
}

.numbers-worklife__value {
	margin: 0;
}

.numbers-survey {
	padding: 0 0;
	text-align: center;
}

.numbers-survey__lead {
	max-width: 540px;
	margin: 0 auto 34px;
	font-size: var(--font-size-body-small);
	font-weight: 700;
	line-height: 1.7;
}

.numbers-survey__lead p {
	margin: 0;
}

.numbers-survey__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.numbers-survey__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
	margin-bottom: 18px;
}

.numbers-survey-card {
	padding: 24px 26px 28px;
	border: 2px solid rgba(126, 220, 200, .35);
	border-radius: 12px;
	background: #fff;
	text-align: left;
	box-shadow: 0px 4px 6px #EFF6E8;
}

.numbers-survey-card--wide {
	margin-top: 18px;
	margin-bottom: 7px;
}

.numbers-survey-card__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding-bottom: 16px;
	margin-bottom: 18px;
	border-bottom: 1px solid rgba(126, 220, 200, .35);
}

.numbers-survey-card__label {
	color: #65bfae;
	font-size: 3.2rem;
	font-weight: bold;
	line-height: 1;
}

.numbers-survey-card__title {
	margin: 0;
	padding-bottom: 0;
	color: var(--color-primary);
	font-size: var(--font-size-body);
	font-weight: 700;
	line-height: 1.45;
	min-height: 65.28px;
	border: none !important;

	display: flex;
	align-items: center;
}

.numbers-survey-card__title::before,
.numbers-survey-card__title::after {
	display: none !important;
	content: none !important;
}

.numbers-survey-rank {
	display: grid;
	grid-template-columns: 54px 1fr;
	gap: 14px;
	align-items: center;
	margin-bottom: 16px;
}
.numbers-survey-rank--1 .numbers-survey-rank__badge {
	width: 70px;
	height: 59px;
	margin-left: -7px;
}
.numbers-survey-rank--1 .numbers-survey-rank__text {
	font-size: var(--font-size-meta);
}
.numbers-survey-rank:last-child {
	margin-bottom: 0;
}

.numbers-survey-rank__badge {
	position: relative;
	width: 54px;
	height: 48px;
	flex-shrink: 0;
}

.numbers-survey-rank__crown {
	display: block;
	width: 100%;
	height: auto;
}

.numbers-survey-rank__number {
	position: absolute;
	left: 50%;
	bottom: 7px;
	transform: translateX(-50%);
	color: #fff;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1;
}

.numbers-survey-rank--2 .numbers-survey-rank__crown {
	filter: grayscale(1);
}

.numbers-survey-rank--3 .numbers-survey-rank__crown {
	filter: sepia(1)
		saturate(350%)
		hue-rotate(330deg)
		brightness(.75);
}

.numbers-survey-rank__text {
	color: var(--color-text);
	font-size: var(--font-size-body-small);
	font-weight: 700;
	line-height: 1.35;
	text-wrap: nowrap;
}

.numbers-shop-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px;
}

.numbers-shop-card {
	padding: 20px;
	background: rgba(247, 250, 238, 0.95);
	border-radius: 14px;
}

.numbers-shop-card__head {
	display: grid;
	grid-template-columns: 72px 1fr;
	gap: 14px;
	align-items: center;
	margin-bottom: 14px;
}

.numbers-shop-card__time {
	width: 72px;
	height: 72px;
	margin: 0;
	border-radius: 50%;
	background: #f5a400;
	color: #fff;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	text-align: center;
	line-height: 1;
}

.numbers-shop-card__time-line--1 {
	font-size: 0.9rem;
}

.numbers-shop-card__time-line--2 {
	margin-top: 2px;
	font-size: 1.7rem;
	line-height: 1;
}

.numbers-shop-card__name {
	display: flex;
	align-items: center;
	min-height: 72px;
	margin: 0 !important;
	padding: 0 !important;
	background: transparent !important;
	color: var(--color-text);
	font-size: var(--font-size-meta);
	font-weight: 700;
	line-height: 1.35;
	text-align: left;
	border: none !important;
	box-shadow: none !important;
}

.numbers-shop-card__name::before,
.numbers-shop-card__name::after {
	display: none !important;
	content: none !important;
}

.numbers-shop-card__comments {
	display: grid;
	gap: 10px;
}

.numbers-shop-card__comment-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}
/* 左側コメント：左起点 */
.numbers-shop-card__comment-row--left {
	justify-content: flex-start;
}
/* 右側コメント：右起点 */
.numbers-shop-card__comment-row--right {
	justify-content: flex-end;
}

.numbers-shop-card__icon {
	flex: 0 0 36px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	overflow: hidden;
}

.numbers-shop-card__icon img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.numbers-shop-card__comment {
	/* 残り幅いっぱいに広げない */
	flex: 0 1 auto;

	/* テキスト量に合わせて可変 */
	width: fit-content;

	/* アイコン36px＋gap8pxを除いた範囲を上限にする */
	max-width: calc(100% - 44px);

	min-width: 0;
	min-height: 36px;
	max-height: none;

	margin: 0 !important;
	padding: 10px 15px;

	background: #fff;
	border-radius: 15px;

	display: inline-flex;
	align-items: center;

	color: var(--color-text);
	font-size: 0.8rem;
	font-weight: 700;
	line-height: 1.45;

	position: relative;
	box-sizing: border-box;

	/* 長文時の折り返し */
	white-space: normal;
	overflow-wrap: anywhere;
	word-break: normal;
}

.numbers-shop-card__comment-row--left .numbers-shop-card__comment {
	text-align: left;
	justify-content: flex-start;
}
.numbers-shop-card__comment-row--right .numbers-shop-card__comment {
	order: 1;
	text-align: right;
	justify-content: flex-end;
}
.numbers-shop-card__comment-row--right .numbers-shop-card__icon {
	order: 2;
}

/* 左アイコン → 吹き出し */
.numbers-shop-card__comment-row--left .numbers-shop-card__comment::before {
	content: "";
	position: absolute;
	left: -7px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	border-right: 18px solid #fff;
}
/* 吹き出し → 右アイコン */
.numbers-shop-card__comment-row--right .numbers-shop-card__comment::after {
	content: "";
	position: absolute;
	right: -7px;
	top: 50%;
	transform: translateY(-50%);
	width: 0;
	height: 0;
	border-top: 7px solid transparent;
	border-bottom: 7px solid transparent;
	border-left: 18px solid #fff;
}

@media (max-width: 991px) {
	.numbers-hero__layout {
		grid-template-columns: 1fr;
		gap: 48px;
	}
	.numbers-hero__lead {
		max-width: unset;
	}
	.numbers-hero__image_bg {
        width: 55% !important;
        left: unset;
	}
	.numbers-hero__image .attachment-large {
		width: 45%
	}
	.numbers-survey-card__title {
		min-height: 57px;
	}
}

@media (max-width: 767px) {

	.numbers-page {
		overflow: hidden;
		padding: 0 20px 0;
	}

	.numbers-hero {
		padding: 8px 0 64px;
	}

	.numbers-hero__lead {
		line-height: 1.9;
	}

	.numbers-hero__image {
		display: none;
	}

	.numbers-chart-grid {
		grid-template-columns: 1fr;
		gap: 18px;
		margin-bottom: 36px;
	}

	.numbers-worklife__box {
		grid-template-columns: 1fr;
		gap: 24px;
	}

	.numbers-worklife__item:not(:last-child)::after {
		top: auto;
		right: auto;
		left: 50%;
		bottom: -12px;
		width: 80%;
		height: 1px;
		transform: translateX(-50%);
	}

	.numbers-survey__grid {
		grid-template-columns: 1fr;
	}

	.numbers-survey {
		padding-bottom: 30px;
	}

	.numbers-survey__grid,
	.numbers-shop-grid {
		grid-template-columns: 1fr;
	}
	.numbers-survey-card {
		padding: 22px 18px;
	}

	.numbers-survey-card__head,
	.numbers-survey-card__ranks {
		width: 260px;
		margin: 0 auto 18px;
		padding-left: 2%;
		padding-right: 1%;
	}
	.numbers-survey-card--wide .numbers-survey-card__head {
		width: 100%;
	}

	.numbers-shop-card {
		grid-template-columns: 1fr;
	}
	.numbers-shop-card__comment {
		font-size: 0.75rem;
	}
	.numbers-shop-card__time {
		margin: 0 auto;
	}

	/* ========================================
	SP：数値グラフ共通
	======================================== */
	.numbers-chart-card {
		min-height: 0;
		padding: 20px 18px 14px;
		border-radius: 12px;
	}

	.numbers-chart-card__heading {
		gap: 4px;
		margin-bottom: 10px;
	}

	.numbers-chart-card__heading-value span {
		font-size: 0.48em;
	}

	/* 時点表示を両カードの右下へ */
	.numbers-chart-card__note--bottom {
		padding-top: 7px;
		font-size: 0.55rem;
	}
	.numbers-chart-card--age .numbers-chart-card__body {
		display: grid;
		grid-template-columns:
			minmax(0, min(46vw, 190px))
			max-content;
		align-items: start;
		justify-content: center;
		gap: 10px;
		width: max-content;
		max-width: 100%;
		margin: 8px auto 0;
	}

	/* ========================================
	SP：従業員数・男女比
	======================================== */
	.numbers-gender-label {
		margin-bottom: 7px;
		padding: 3px 16px;
	}

	/* 男女の大きい値を100%として左起点で表示 */
	.numbers-gender-bars {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		gap: 5px;

		width: 100%;
		margin: 0 auto;
	}

	.numbers-gender-bar {
		display: flex;
		align-items: flex-end;
		justify-content: flex-start;
		gap: 8px;

		height: 74px;
		padding: 0 14px;

		color: #fff;
		box-sizing: border-box;
		overflow: hidden;
	}

	.numbers-gender-bar--male {
		width: var(--male-sp-ratio);
	}

	.numbers-gender-bar--female {
		width: var(--female-sp-ratio);
	}

	/* SVGを棒の下端まで表示 */
	.numbers-gender-bar__icon {
		display: flex;
		flex: 0 0 auto;
		align-items: flex-end;
		justify-content: center;

		width: auto;
		height: 100%;
		aspect-ratio: 1 / 2;
	}

	.numbers-gender-bar__icon img {
		display: block;
		width: auto;
		height: 100%;
		max-width: none;
		object-fit: contain;
		object-position: center bottom;
	}

	.numbers-gender-bar__value {
		align-self: center;
		font-size: clamp(2.3rem, 14vw, 3.5rem);
	}

	/* ワークライフバランス年月 */
	.numbers-worklife__heading {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 4px;
		margin-bottom: 18px;
	}

	.numbers-worklife__date {
		position: static;
		font-size: 0.62rem;
		transform: none;
	}

	/* ========================================
	SP：平均年齢・年代別グラフ
	======================================== */
	.numbers-chart-card--age .numbers-chart-card__body {
		display: grid;
		grid-template-columns:
			minmax(0, min(46vw, 190px))
			max-content;
		align-items: start;
		justify-content: center;
		gap: 10px;

		width: max-content;
		max-width: 100%;
		margin: 8px auto 0;
	}

	.numbers-chart-card--age .numbers-pie {
		width: min(46vw, 190px);
		aspect-ratio: 1;
	}

	/* 凡例を円グラフ右側の上寄りへ */
	.numbers-chart-card--age .numbers-legend {
		display: flex;
		flex-direction: column;
		align-items: flex-start;
		align-self: start;
		gap: 4px;
		padding-top: 10px;
	}

	.numbers-chart-card--age .numbers-legend p {
		grid-template-columns: 8px auto auto;
		justify-content: start;
		column-gap: 3px;
		font-size: 0.62rem;
	}

	.numbers-chart-card--age .numbers-legend p span {
		width: 8px;
		height: 8px;
		flex-basis: 8px;
	}

	.numbers-chart-card--age .numbers-legend p em {
		margin-left: 1px;
	}
}

@media (max-width: 500px) {
	.numbers-shop-card__comment-row--right .numbers-shop-card__comment {
		justify-content: flex-start;
		text-align: left;
	}
}