/* ==========================================================
   MEMBERS (一覧 + プロフィールオーバーレイ)
   ========================================================== */
.p-mdir {
	display: flex;
	flex-direction: column;
	gap: 5.6rem;
	max-width: 144rem;
	margin-inline: auto;
	padding: 8rem 6.4rem 12rem;
	background: var(--c-white);
}

.p-mdir__guide {
	font-family: var(--f-en);
	font-weight: 800;
	font-size: min(2.4rem, 26.4px);
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--c-blue);
}

.p-mdir__grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 3.2rem;
}

.p-mcard {
	display: flex;
	flex-direction: column;
	gap: 1.6rem;
	text-align: left;
}

.p-mcard__photo {
	display: block;
	aspect-ratio: 416 / 480;
	overflow: hidden;
	background: #e6e6e6;
}

.p-mcard__photo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
	transition: transform 0.8s var(--ease);
}

.p-mcard:hover .p-mcard__photo img {
	transform: scale(1.04);
}

.p-mcard__info {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.p-mcard__role,
.p-mcard__view {
	font-size: var(--fs-12);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.05em;
	color: var(--c-blue);
}

.p-mcard__row {
	display: flex;
	align-items: center;
	gap: 1.6rem;
}

.p-mcard__name {
	flex: 1;
	min-width: 0;
	font-size: min(2.8rem, 30.8px);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -0.04em;
	color: #141414;
}

.p-mcard__plus {
	display: flex;
	flex: none;
	align-items: center;
	justify-content: center;
	width: 4rem;
	height: 4rem;
	border: 1px solid #ccd5e8;
	transition: background 0.3s;
}

.p-mcard:hover .p-mcard__plus {
	background: var(--c-bg);
}

.p-mcard__plus .c-icon {
	width: 2.4rem;
	height: 2.4rem;
}

/* ---------- profile overlay ---------- */
.p-mprofile {
	position: fixed;
	inset: var(--wp-admin--admin-bar--height, 0px) 0 0 0;
	z-index: 200;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 2rem;
}

.p-mprofile:target,
.p-mprofile.is-open {
	display: flex;
}

.p-mprofile[hidden]:target,
.p-mprofile.is-open[hidden] {
	display: flex;
}

.p-mprofile__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(8, 13, 31, 0.65);
	animation: bm-fade 0.4s ease both;
}

.p-mprofile__dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 2.4rem;
	width: 112rem;
	max-width: 100%;
	max-height: 100%;
	overflow-y: auto;
	padding: 4rem 4.8rem;
	background: var(--c-white);
	animation: bm-rise 0.6s var(--ease) both;
}

@keyframes bm-fade {
	from { opacity: 0; }
}

@keyframes bm-rise {
	from { opacity: 0; transform: translateY(2.4rem); }
}

.p-mprofile__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.p-mprofile__label {
	font-family: var(--f-en);
	font-weight: 800;
	font-size: min(2.4rem, 26.4px);
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--c-blue);
}

.p-mprofile__close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.8rem;
	height: 4.8rem;
	background: var(--c-bg);
	transition: background 0.3s;
}

.p-mprofile__close:hover {
	background: #dfe7fb;
}

.p-mprofile__close .c-icon {
	width: 2.4rem;
	height: 2.4rem;
}

.p-mprofile__content {
	display: flex;
	gap: 4.8rem;
	align-items: flex-start;
}

.p-mprofile__portrait {
	flex: none;
	width: 33.6rem;
	height: 44.8rem;
	overflow: hidden;
	background: #e6e6e6;
}

.p-mprofile__portrait img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: top;
}

.p-mprofile__info {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2.4rem;
	min-width: 0;
}

.p-mprofile__id {
	display: flex;
	flex-direction: column;
	gap: 0.8rem;
}

.p-mprofile__role {
	font-size: var(--fs-12);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.05em;
	color: var(--c-blue);
}

.p-mprofile__name {
	font-size: min(4rem, 44px);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -0.04em;
	color: #141414;
}

.p-mprofile__catch {
	font-size: min(2.8rem, 30.8px);
	font-weight: 700;
	line-height: 1.5;
	letter-spacing: -0.04em;
	color: #141414;
}

.p-mprofile__bio {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
	font-size: var(--fs-14);
	line-height: 2;
	color: #4a5261;
}

.p-mprofile__sub {
	font-family: var(--f-en);
	font-weight: 800;
	font-size: min(2rem, 20px);
	line-height: 1;
	letter-spacing: -0.04em;
	color: var(--c-blue);
}

.p-mprofile__skills {
	display: flex;
	flex-direction: column;
	gap: 1.2rem;
}

.p-mprofile__skills-label {
	font-size: var(--fs-12);
	font-weight: 500;
	line-height: 1.4;
	letter-spacing: 0.05em;
	color: var(--c-blue);
}

.p-mprofile__skills ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0.8rem;
}

.p-mprofile__skills li {
	padding: 0.8rem 1.2rem;
	background: var(--c-bg);
	font-size: var(--fs-12);
	line-height: 2;
	color: var(--c-blue);
}

@media (max-width: 1023px) {
	.p-mdir {
		gap: 3.2rem;
		max-width: 60rem;
		padding: 4rem 2rem 7.2rem;
	}

	.p-mdir__guide { font-size: min(2rem, 20px); }

	.p-mdir__grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 2.8rem 1.6rem;
	}

	.p-mcard { gap: 1.2rem; }
	.p-mcard__name { font-size: min(2rem, 22px); }

	.p-mcard__row {
		gap: 0.8rem; /* 名前と＋ボタンは SP でも横並び */
	}

	.p-mcard__plus {
		width: 2.6rem;
		height: 2.6rem;
	}

	.p-mcard__plus .c-icon {
		width: 2rem;
		height: 2rem;
	}

	.p-mprofile { padding: 1.6rem; }

	.p-mprofile__dialog {
		width: 100%;
		max-width: 60rem;
		gap: 2rem;
		padding: 2rem;
	}

	.p-mprofile__content {
		flex-direction: column;
		gap: 2.4rem;
	}

	.p-mprofile__portrait {
		width: 100%;
		height: auto;
		aspect-ratio: 3 / 4;
	}

	.p-mprofile__name { font-size: min(3.2rem, 35.2px); }
	.p-mprofile__catch { font-size: min(2.2rem, 20px); }
}
