/**
 * MX Creator Directory — フロントエンド
 *
 * 方針:
 *   - すべて .mx 配下にスコープし、SWELL のスタイルへ影響を与えない
 *   - 色・余白は CSS 変数で管理（SWELL の変数名とは衝突させない）
 *   - 画像は比率を固定し、未設定でもレイアウトが崩れないようにする
 *   - タップ領域は 44px 以上を確保する
 */

.mx {
	--mx-accent: #ff4d7d;
	--mx-accent-dark: #e03567;
	--mx-accent-soft: #fff0f4;
	--mx-text: #1a1a1a;
	--mx-text-muted: #6b6b6b;
	--mx-border: #e6e6e6;
	--mx-bg-soft: #fafafa;
	--mx-radius: 12px;
	--mx-radius-sm: 8px;
	--mx-gap: 16px;
	--mx-section-gap: 48px;

	color: var(--mx-text);
	line-height: 1.7;
}

.mx *,
.mx *::before,
.mx *::after {
	box-sizing: border-box;
}

.mx-container {
	width: 100%;
	max-width: 1120px;
	margin: 0 auto;
	padding: 0 16px 64px;
}

/* ---------------------------------------------------------------------------
 * パンくず
 * ------------------------------------------------------------------------ */

.mx-breadcrumb {
	padding: 16px 0;
	font-size: 0.8125rem;
}

.mx-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mx-breadcrumb__item + .mx-breadcrumb__item::before {
	content: "／";
	margin-right: 8px;
	color: var(--mx-text-muted);
}

.mx-breadcrumb a {
	color: var(--mx-text-muted);
	text-decoration: none;
}

.mx-breadcrumb a:hover {
	color: var(--mx-accent);
	text-decoration: underline;
}

.mx-breadcrumb span {
	color: var(--mx-text);
}

/* ---------------------------------------------------------------------------
 * プロフィールヘッダー
 * ------------------------------------------------------------------------ */

.mx-profile {
	margin-bottom: var(--mx-section-gap);
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius);
	overflow: hidden;
	background: #fff;
}

.mx-profile__cover {
	position: relative;
	aspect-ratio: 16 / 5;
	background: linear-gradient(120deg, var(--mx-accent-soft), #f6f6f8);
	overflow: hidden;
}

.mx-profile__cover:empty {
	aspect-ratio: 16 / 3;
}

.mx-profile__cover-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mx-profile__body {
	display: flex;
	gap: 24px;
	padding: 24px;
}

.mx-profile__avatar {
	flex: 0 0 auto;
	width: 128px;
	margin-top: -72px;
}

.mx-profile__avatar-img,
.mx-profile__avatar .mx-img--placeholder {
	width: 128px;
	height: 128px;
	border-radius: 50%;
	object-fit: cover;
	display: block;
	border: 4px solid #fff;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
	background: var(--mx-bg-soft);
}

.mx-profile__main {
	flex: 1 1 auto;
	min-width: 0;
}

.mx-profile__name {
	margin: 0 0 4px;
	font-size: 1.75rem;
	line-height: 1.3;
	font-weight: 700;
	word-break: break-word;
}

.mx-profile__kana {
	margin: 0 0 12px;
	font-size: 0.875rem;
	color: var(--mx-text-muted);
}

.mx-profile__bio {
	margin: 16px 0 0;
	font-size: 0.9375rem;
}

/* ---------------------------------------------------------------------------
 * バッジ
 * ------------------------------------------------------------------------ */

.mx-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 12px 0 0;
}

.mx-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 12px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.6;
	text-decoration: none;
	background: var(--mx-bg-soft);
	color: var(--mx-text-muted);
	border: 1px solid var(--mx-border);
}

.mx-badge--sm {
	padding: 2px 8px;
	font-size: 0.6875rem;
}

.mx-badge--term:hover {
	border-color: var(--mx-accent);
	color: var(--mx-accent);
}

.mx-badge--verified {
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
	border-color: transparent;
}

.mx-badge--disputed {
	background: #fff6e5;
	color: #8a6100;
	border-color: transparent;
}

.mx-badge--status-active {
	background: #eaf7ef;
	color: #1c7a43;
	border-color: transparent;
}

.mx-badge--sale-on_sale {
	background: #eaf7ef;
	color: #1c7a43;
	border-color: transparent;
}

.mx-badge--sale-ended,
.mx-badge--sale-suspended {
	background: #f3f3f3;
	color: #666;
	border-color: transparent;
}

/* ---------------------------------------------------------------------------
 * 数値
 * ------------------------------------------------------------------------ */

.mx-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin: 20px 0 0;
	padding: 0;
}

.mx-stats__item {
	margin: 0;
}

.mx-stats__item dt {
	margin: 0;
	font-size: 0.75rem;
	color: var(--mx-text-muted);
}

.mx-stats__item dd {
	margin: 2px 0 0;
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.2;
}

/* ---------------------------------------------------------------------------
 * SNS
 * ------------------------------------------------------------------------ */

.mx-social {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 20px 0 0;
	padding: 0;
	list-style: none;
}

.mx-social__link {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	min-height: 44px;
	padding: 8px 16px;
	border-radius: var(--mx-radius-sm);
	border: 1px solid var(--mx-border);
	background: #fff;
	color: var(--mx-text);
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.mx-social__link:hover,
.mx-social__link:focus-visible {
	border-color: var(--mx-accent);
	color: var(--mx-accent);
}

.mx-social__count {
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--mx-text-muted);
}

/* ---------------------------------------------------------------------------
 * セクション
 * ------------------------------------------------------------------------ */

.mx-section {
	margin-bottom: var(--mx-section-gap);
}

.mx-section__title {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--mx-border);
	font-size: 1.25rem;
	font-weight: 700;
	line-height: 1.4;
}

.mx-section__count {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 24px;
	padding: 0 8px;
	border-radius: 999px;
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
	font-size: 0.75rem;
	font-weight: 700;
}

.mx-prose {
	font-size: 0.9375rem;
}

.mx-lead {
	font-size: 1rem;
	font-weight: 500;
}

.mx-note {
	margin: 12px 0 0;
	font-size: 0.75rem;
	color: var(--mx-text-muted);
}

.mx-empty {
	margin: 0;
	padding: 40px 16px;
	border: 1px dashed var(--mx-border);
	border-radius: var(--mx-radius);
	background: var(--mx-bg-soft);
	color: var(--mx-text-muted);
	font-size: 0.875rem;
	text-align: center;
}

/* ---------------------------------------------------------------------------
 * グリッド・カード
 * ------------------------------------------------------------------------ */

.mx-grid {
	display: grid;
	gap: var(--mx-gap);
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mx-card {
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius);
	overflow: hidden;
	background: #fff;
	transition: border-color 0.15s ease, transform 0.15s ease;
}

.mx-card:hover {
	border-color: var(--mx-accent);
	transform: translateY(-2px);
}

.mx-card__link {
	display: block;
	color: inherit;
	text-decoration: none;
	height: 100%;
}

.mx-card__link:focus-visible {
	outline: 2px solid var(--mx-accent);
	outline-offset: 2px;
}

.mx-card__media {
	position: relative;
	overflow: hidden;
	background: var(--mx-bg-soft);
}

.mx-card__media--square {
	aspect-ratio: 1 / 1;
}

.mx-card__media--wide {
	aspect-ratio: 16 / 9;
}

.mx-card__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mx-card__duration {
	position: absolute;
	right: 8px;
	bottom: 8px;
	padding: 2px 8px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 0.6875rem;
	font-weight: 600;
}

.mx-card__body {
	padding: 12px;
}

.mx-card__title {
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 600;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	word-break: break-word;
}

.mx-card__meta,
.mx-card__stats {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 12px;
	margin: 8px 0 0;
	font-size: 0.75rem;
	color: var(--mx-text-muted);
}

.mx-card__excerpt {
	margin: 8px 0 0;
	font-size: 0.8125rem;
	color: var(--mx-text-muted);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.mx-card__price {
	margin: 8px 0 0;
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--mx-accent-dark);
}

.mx-card__service {
	color: var(--mx-accent-dark);
	font-weight: 600;
}

.mx-tag {
	display: inline-block;
	margin-bottom: 6px;
	padding: 2px 8px;
	border-radius: 4px;
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
	font-size: 0.6875rem;
	font-weight: 600;
}

/* 画像プレースホルダー */
.mx-img--placeholder {
	display: block;
	width: 100%;
	height: 100%;
	background:
		repeating-linear-gradient(
			45deg,
			#f4f4f5,
			#f4f4f5 8px,
			#eeeef0 8px,
			#eeeef0 16px
		);
}

/* ---------------------------------------------------------------------------
 * 作品ページ
 * ------------------------------------------------------------------------ */

.mx-work-header {
	margin: 8px 0 24px;
}

.mx-work-header__title {
	margin: 0 0 8px;
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.4;
	word-break: break-word;
}

.mx-work-header__subtitle {
	margin: 0 0 12px;
	font-size: 0.9375rem;
	color: var(--mx-text-muted);
}

.mx-work-hero {
	margin: 0 0 var(--mx-section-gap);
	border-radius: var(--mx-radius);
	overflow: hidden;
	background: var(--mx-bg-soft);
	aspect-ratio: 16 / 9;
}

.mx-work-hero__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mx-spec {
	margin: 0;
	border-top: 1px solid var(--mx-border);
}

.mx-spec__item {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	padding: 12px 4px;
	border-bottom: 1px solid var(--mx-border);
}

.mx-spec__item dt {
	flex: 0 0 120px;
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--mx-text-muted);
}

.mx-spec__item dd {
	flex: 1 1 200px;
	margin: 0;
	font-size: 0.9375rem;
}

.mx-gallery {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mx-gallery__item {
	margin: 0;
	border-radius: var(--mx-radius-sm);
	overflow: hidden;
	background: var(--mx-bg-soft);
	aspect-ratio: 16 / 9;
}

.mx-gallery__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ---------------------------------------------------------------------------
 * サービス・購入リンク
 * ------------------------------------------------------------------------ */

.mx-services,
.mx-purchase {
	margin: 0;
	padding: 0;
	list-style: none;
	display: grid;
	gap: 8px;
}

.mx-services__link,
.mx-purchase__link {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 8px 16px;
	min-height: 56px;
	padding: 12px 16px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	background: #fff;
	color: var(--mx-text);
	text-decoration: none;
	font-weight: 600;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.mx-services__link:hover,
.mx-purchase__link:hover,
.mx-services__link:focus-visible,
.mx-purchase__link:focus-visible {
	border-color: var(--mx-accent);
	background: var(--mx-accent-soft);
}

.mx-services__name,
.mx-purchase__name {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.mx-services__account {
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--mx-text-muted);
}

.mx-purchase__right {
	display: inline-flex;
	align-items: center;
	gap: 12px;
}

.mx-purchase__price {
	font-size: 1rem;
	font-weight: 700;
	color: var(--mx-accent-dark);
}

.mx-purchase__strike {
	font-size: 0.8125rem;
	font-weight: 400;
	color: var(--mx-text-muted);
	text-decoration: line-through;
}

.mx-purchase__status {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--mx-text-muted);
}

.mx-purchase__item.is-ended .mx-purchase__link {
	opacity: 0.6;
}

/* ---------------------------------------------------------------------------
 * メタ情報・注意書き
 * ------------------------------------------------------------------------ */

.mx-meta {
	margin-bottom: 24px;
	padding: 16px;
	border-radius: var(--mx-radius-sm);
	background: var(--mx-bg-soft);
}

.mx-meta__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 32px;
	margin: 0;
}

.mx-meta__item {
	display: flex;
	gap: 8px;
	margin: 0;
	font-size: 0.75rem;
}

.mx-meta__item dt {
	margin: 0;
	color: var(--mx-text-muted);
}

.mx-meta__item dd {
	margin: 0;
	font-weight: 600;
}

.mx-disclaimer {
	padding: 16px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	font-size: 0.75rem;
	color: var(--mx-text-muted);
}

.mx-disclaimer__note {
	margin: 0 0 8px;
	color: var(--mx-text);
}

.mx-disclaimer__text {
	margin: 0 0 4px;
}

.mx-disclaimer a {
	color: var(--mx-accent-dark);
}

/* ---------------------------------------------------------------------------
 * タブレット
 * ------------------------------------------------------------------------ */

@media (min-width: 768px) {
	.mx-container {
		padding: 0 24px 80px;
	}

	.mx-grid--creator,
	.mx-grid--work {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-grid--article {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.mx-gallery {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-services,
	.mx-purchase {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------------------
 * デスクトップ
 * ------------------------------------------------------------------------ */

@media (min-width: 1024px) {
	.mx-profile__body {
		padding: 32px;
	}

	.mx-profile__name {
		font-size: 2rem;
	}

	.mx-grid--creator,
	.mx-grid--work {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.mx-grid--article {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-work-header__title {
		font-size: 2rem;
	}
}

/* ---------------------------------------------------------------------------
 * スマートフォン
 * ------------------------------------------------------------------------ */

@media (max-width: 767px) {
	.mx {
		--mx-section-gap: 36px;
		--mx-gap: 12px;
	}

	.mx-profile__body {
		display: block;
		padding: 16px;
	}

	.mx-profile__avatar {
		width: 96px;
		margin: -60px 0 12px;
	}

	.mx-profile__avatar-img,
	.mx-profile__avatar .mx-img--placeholder {
		width: 96px;
		height: 96px;
	}

	.mx-profile__name {
		font-size: 1.375rem;
	}

	.mx-stats {
		gap: 20px;
	}

	.mx-stats__item dd {
		font-size: 1.125rem;
	}

	.mx-spec__item dt {
		flex: 0 0 88px;
	}

	.mx-section__title {
		font-size: 1.125rem;
	}
}

/* ---------------------------------------------------------------------------
 * 動きを減らす設定への配慮
 * ------------------------------------------------------------------------ */

@media (prefers-reduced-motion: reduce) {
	.mx-card,
	.mx-social__link,
	.mx-services__link,
	.mx-purchase__link {
		transition: none;
	}

	.mx-card:hover {
		transform: none;
	}
}

/* ---------------------------------------------------------------------------
 * 一覧ページ
 * ------------------------------------------------------------------------ */

.mx-archive-header {
	margin: 8px 0 24px;
}

.mx-archive-header__title {
	margin: 0 0 8px;
	font-size: 1.625rem;
	font-weight: 700;
	line-height: 1.4;
}

.mx-archive-header__desc {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--mx-text-muted);
}

/* 絞り込みフォーム */

.mx-filter {
	margin-bottom: 20px;
	padding: 16px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius);
	background: var(--mx-bg-soft);
}

.mx-filter__row {
	display: grid;
	gap: 12px;
	margin-bottom: 12px;
	grid-template-columns: 1fr;
}

.mx-filter__row--features {
	display: block;
}

.mx-filter__field {
	display: block;
	min-width: 0;
}

.mx-filter__label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.75rem;
	font-weight: 600;
	color: var(--mx-text-muted);
}

.mx-filter input[type="search"],
.mx-filter select {
	width: 100%;
	min-height: 44px;
	padding: 8px 12px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	background: #fff;
	color: var(--mx-text);
	font-size: 1rem;
	line-height: 1.5;
	appearance: none;
}

.mx-filter select {
	background-image: linear-gradient(45deg, transparent 50%, var(--mx-text-muted) 50%),
		linear-gradient(135deg, var(--mx-text-muted) 50%, transparent 50%);
	background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%;
	background-size: 5px 5px, 5px 5px;
	background-repeat: no-repeat;
	padding-right: 36px;
}

.mx-filter input[type="search"]:focus,
.mx-filter select:focus {
	outline: 2px solid var(--mx-accent);
	outline-offset: 1px;
	border-color: var(--mx-accent);
}

.mx-filter__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.mx-chip {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 6px 14px;
	border: 1px solid var(--mx-border);
	border-radius: 999px;
	background: #fff;
	color: var(--mx-text-muted);
	font-size: 0.8125rem;
	text-decoration: none;
	transition: border-color 0.15s ease, color 0.15s ease;
}

.mx-chip:hover,
.mx-chip:focus-visible {
	border-color: var(--mx-accent);
	color: var(--mx-accent);
}

.mx-chip.is-on {
	background: var(--mx-accent);
	border-color: var(--mx-accent);
	color: #fff;
	font-weight: 600;
}

.mx-filter__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}

.mx-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 10px 24px;
	border: 1px solid var(--mx-accent);
	border-radius: var(--mx-radius-sm);
	background: var(--mx-accent);
	color: #fff;
	font-size: 0.875rem;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s ease;
}

.mx-button:hover,
.mx-button:focus-visible {
	background: var(--mx-accent-dark);
	border-color: var(--mx-accent-dark);
	color: #fff;
}

.mx-button--ghost {
	background: #fff;
	border-color: var(--mx-border);
	color: var(--mx-text-muted);
}

.mx-button--ghost:hover,
.mx-button--ghost:focus-visible {
	background: #fff;
	border-color: var(--mx-accent);
	color: var(--mx-accent);
}

/* 結果件数 */

.mx-result {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px 16px;
	margin-bottom: 16px;
}

.mx-result__count {
	margin: 0;
	font-size: 0.875rem;
	color: var(--mx-text-muted);
}

.mx-result__count strong {
	font-size: 1.125rem;
	color: var(--mx-text);
}

.mx-result__reset {
	font-size: 0.8125rem;
	color: var(--mx-accent-dark);
}

/* ページネーション */

.mx-pagination {
	margin-top: 32px;
}

.mx-pagination__list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.mx-pagination__item a,
.mx-pagination__item span {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	background: #fff;
	color: var(--mx-text);
	font-size: 0.875rem;
	text-decoration: none;
}

.mx-pagination__item a:hover,
.mx-pagination__item a:focus-visible {
	border-color: var(--mx-accent);
	color: var(--mx-accent);
}

.mx-pagination__item .current {
	background: var(--mx-accent);
	border-color: var(--mx-accent);
	color: #fff;
	font-weight: 700;
}

.mx-pagination__item .dots {
	border-color: transparent;
	background: transparent;
	min-width: 24px;
}

@media (min-width: 768px) {
	.mx-filter__row {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-filter__field--search {
		grid-column: span 2;
	}

	.mx-archive-header__title {
		font-size: 2rem;
	}
}

/* ---------------------------------------------------------------------------
 * ランキング
 * ------------------------------------------------------------------------ */

.mx-ranking-nav {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 20px;
}

.mx-note--boxed {
	margin: 0 0 20px;
	padding: 12px 16px;
	border-radius: var(--mx-radius-sm);
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
	font-size: 0.8125rem;
}

.mx-ranking {
	margin: 0;
	padding: 0;
	list-style: none;
	border-top: 1px solid var(--mx-border);
}

.mx-ranking__item {
	border-bottom: 1px solid var(--mx-border);
}

.mx-ranking__link {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 4px;
	color: inherit;
	text-decoration: none;
	min-height: 72px;
}

.mx-ranking__link:hover {
	background: var(--mx-bg-soft);
}

.mx-ranking__link:focus-visible {
	outline: 2px solid var(--mx-accent);
	outline-offset: -2px;
}

.mx-ranking__rank {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: var(--mx-bg-soft);
	color: var(--mx-text-muted);
	font-size: 0.875rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mx-ranking__rank--medal {
	color: #fff;
}

.mx-ranking__rank--1 { background: #e0a800; }
.mx-ranking__rank--2 { background: #9aa0a6; }
.mx-ranking__rank--3 { background: #b07a4a; }

.mx-ranking__media {
	flex: 0 0 auto;
	width: 56px;
	height: 56px;
	border-radius: 50%;
	overflow: hidden;
	background: var(--mx-bg-soft);
}

.mx-ranking__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mx-ranking__body {
	flex: 1 1 auto;
	min-width: 0;
}

.mx-ranking__name {
	display: block;
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.4;
	word-break: break-word;
}

.mx-ranking__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 12px;
	margin-top: 2px;
	font-size: 0.75rem;
	color: var(--mx-text-muted);
}

.mx-ranking__bio {
	display: none;
}

.mx-ranking__diff {
	flex: 0 0 auto;
	font-size: 0.75rem;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
}

.mx-ranking__diff--up { color: #1c7a43; }
.mx-ranking__diff--down { color: #a33; }

@media (min-width: 768px) {
	.mx-ranking__link {
		gap: 16px;
		padding: 16px 8px;
	}

	.mx-ranking__rank {
		width: 40px;
		height: 40px;
		font-size: 1rem;
	}

	.mx-ranking__media {
		width: 72px;
		height: 72px;
	}

	.mx-ranking__bio {
		display: -webkit-box;
		-webkit-line-clamp: 1;
		-webkit-box-orient: vertical;
		overflow: hidden;
		margin-top: 4px;
		font-size: 0.8125rem;
		color: var(--mx-text-muted);
	}
}

/* ---------------------------------------------------------------------------
 * トップページ
 * ------------------------------------------------------------------------ */

.mx-hero {
	padding: 48px 0 40px;
	margin-bottom: 8px;
	background: linear-gradient(160deg, var(--mx-accent-soft) 0%, #ffffff 70%);
	text-align: center;
}

.mx-hero__title {
	margin: 0 0 8px;
	font-size: 1.5rem;
	font-weight: 700;
	line-height: 1.4;
}

.mx-hero__lead {
	margin: 0 0 24px;
	font-size: 0.875rem;
	color: var(--mx-text-muted);
}

.mx-hero__form {
	display: flex;
	gap: 8px;
	max-width: 640px;
	margin: 0 auto;
}

.mx-hero__form input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	min-height: 48px;
	padding: 10px 16px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	background: #fff;
	font-size: 1rem;
	color: var(--mx-text);
}

.mx-hero__form input[type="search"]:focus {
	outline: 2px solid var(--mx-accent);
	outline-offset: 1px;
	border-color: var(--mx-accent);
}

.mx-hero__form .mx-button {
	flex: 0 0 auto;
	min-height: 48px;
}

.mx-hero__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 20px;
	margin: 20px 0 0;
	font-size: 0.8125rem;
}

.mx-hero__links a {
	color: var(--mx-accent-dark);
	text-decoration: none;
}

.mx-hero__links a:hover {
	text-decoration: underline;
}

/* セクション見出しと「もっと見る」 */

.mx-section__head {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
	padding-bottom: 12px;
	border-bottom: 2px solid var(--mx-border);
}

.mx-section__head .mx-section__title {
	margin: 0;
	padding: 0;
	border: 0;
}

.mx-section__more {
	flex: 0 0 auto;
	font-size: 0.8125rem;
	color: var(--mx-accent-dark);
	text-decoration: none;
	white-space: nowrap;
}

.mx-section__more:hover {
	text-decoration: underline;
}

/* カテゴリー・サービスのカード */

.mx-termgrid {
	display: grid;
	gap: 8px;
	grid-template-columns: repeat(2, minmax(0, 1fr));
}

.mx-termcard {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	min-height: 56px;
	padding: 12px 16px;
	border: 1px solid var(--mx-border);
	border-radius: var(--mx-radius-sm);
	background: #fff;
	color: var(--mx-text);
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.mx-termcard:hover,
.mx-termcard:focus-visible {
	border-color: var(--mx-accent);
	background: var(--mx-accent-soft);
}

.mx-termcard__name {
	font-size: 0.9375rem;
	font-weight: 600;
	word-break: break-word;
}

.mx-termcard__count {
	flex: 0 0 auto;
	font-size: 0.75rem;
	color: var(--mx-text-muted);
	font-variant-numeric: tabular-nums;
}

.mx-about {
	padding-top: 8px;
}

@media (min-width: 768px) {
	.mx-hero {
		padding: 72px 0 56px;
	}

	.mx-hero__title {
		font-size: 2.125rem;
	}

	.mx-hero__lead {
		font-size: 1rem;
	}

	.mx-termgrid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (min-width: 1024px) {
	.mx-termgrid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

/* ---------------------------------------------------------------------------
 * テーマ側のレイアウト調整
 *
 * 一覧・ランキング・トップページは横幅が必要なため、サイドバーを隠して
 * 本文カラムを広げます。
 *
 * テーマのクラス名は将来変わる可能性があるため、完全一致ではなく
 * 部分一致（[class*="..."]）で指定しています。
 * テーマの中央寄せやコンテナ幅そのものには手を出しません。
 *
 * サイドバーを残したい場合は、子テーマの style.css に次を追加してください。
 *   .mx-directory-page [class*="l-sidebar"] { display: block !important; }
 * ------------------------------------------------------------------------ */

.mx-directory-page [class*="l-sidebar"],
.mx-directory-page [id*="sidebar"],
.mx-directory-page [class*="c-sidebar"],
.mx-directory-page [class*="p-sidebar"] {
	display: none !important;
}

/* サイドバー分の幅を本文カラムへ返す */
.mx-directory-page [class*="mainContent"],
.mx-directory-page #main_content,
.mx-directory-page main[class] {
	width: 100% !important;
	max-width: 100% !important;
	margin-left: 0 !important;
	margin-right: 0 !important;
	float: none !important;
	flex-basis: 100% !important;
}

/* 一覧ページでは不要なテーマ側の装飾を隠す */
.mx-directory-page [class*="p-articleFoot"],
.mx-directory-page [class*="c-shareBtns"],
.mx-directory-page [class*="p-authorBox"],
.mx-directory-page [class*="p-toc"] {
	display: none;
}

/* トップページはヒーローから始めたいので、本文上部の余白を詰める。
   テーマ側の指定に確実に勝つよう、html body から書いて優先度を上げています。
   打ち消すのは「上方向の余白」だけで、左右・下には影響しません。 */
html body.mx-directory-page.home #body_wrap,
html body.mx-directory-page.home #content,
html body.mx-directory-page.home #content > *,
html body.mx-directory-page.home #content > * > *,
html body.mx-directory-page.home #main_content,
html body.mx-directory-page.home #main_content > *,
html body.mx-directory-page.home #main_content > * > *,
html body.mx-directory-page.home [class*="l-content"],
html body.mx-directory-page.home [class*="mainContent"],
html body.mx-directory-page.home [class*="articleWrap"],
html body.mx-directory-page.home [class*="post_content"],
html body.mx-directory-page.home [class*="w-content"] {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

html body.mx-directory-page.home .mx-page--front,
html body.mx-directory-page.home .mx-page--front > .mx-hero {
	margin-top: 0 !important;
}

/* ヒーロー自体の上の余白は少しだけ残す */
html body.mx-directory-page.home .mx .mx-hero {
	padding-top: 24px;
}

@media (min-width: 768px) {
	html body.mx-directory-page.home .mx .mx-hero {
		padding-top: 40px;
	}
}

/* ---------------------------------------------------------------------------
 * ヒーローの調整
 * ------------------------------------------------------------------------ */

/* 余白を詰める */
.mx .mx-hero {
	padding: 32px 0 28px;
}

/* 検索フォームの幅を確実に抑える */
.mx .mx-hero__form {
	max-width: 640px;
	margin-left: auto;
	margin-right: auto;
}

.mx .mx-hero__form input[type="search"] {
	max-width: 100%;
}

@media (min-width: 768px) {
	.mx .mx-hero {
		padding: 48px 0 40px;
	}
}

/* ---------------------------------------------------------------------------
 * カードの横スライド
 *
 * トップページの各セクションで使います。
 * 自動スクロールしますが、マウスを乗せる・タップする・タブを離れると止まります。
 * OSの「視差効果を減らす」設定では自動スクロールしません。
 * ------------------------------------------------------------------------ */

.mx-carousel {
	display: flex;
	gap: var(--mx-gap);
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x proximity;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: none;
	padding-bottom: 4px;
	/* グリッドの指定を打ち消す */
	grid-template-columns: none;
}

.mx-carousel::-webkit-scrollbar {
	display: none;
}

.mx-carousel > .mx-card {
	flex: 0 0 46%;
	scroll-snap-align: start;
}

.mx-carousel.mx-grid--article > .mx-card {
	flex-basis: 78%;
}

/* 自動で動く要素はホバーで浮かせない（読みづらくなるため） */
.mx-carousel > .mx-card:hover {
	transform: none;
}

@media (min-width: 768px) {
	.mx-carousel > .mx-card {
		flex-basis: 30%;
	}

	.mx-carousel.mx-grid--article > .mx-card {
		flex-basis: 46%;
	}
}

@media (min-width: 1024px) {
	.mx-carousel > .mx-card {
		flex-basis: 22.5%;
	}

	.mx-carousel.mx-grid--article > .mx-card {
		flex-basis: 31%;
	}
}

/* カードが画面に収まりきる件数のときは中央寄せにする */
.mx-carousel.is-static {
	justify-content: center;
	overflow-x: visible;
}

/* ===========================================================================
 * 1.9.5 追加調整
 * ======================================================================== */

/* ---------------------------------------------------------------------------
 * トップページ上部の余白
 *
 * SWELL は body に "top" クラスを付け、.top #content { padding-top: 4em } を
 * 適用します。固定ページテンプレートのクラスと合わせて確実に打ち消します。
 * ------------------------------------------------------------------------ */

html body.mx-directory-page.top #content,
html body.mx-directory-page.home #content,
html body[class*="page-template-mx-directory-front"] #content {
	padding-top: 0 !important;
	margin-top: 0 !important;
}

/* ---------------------------------------------------------------------------
 * カードを大きく
 * ------------------------------------------------------------------------ */

@media (min-width: 768px) {
	.mx-grid--creator,
	.mx-grid--work {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-carousel > .mx-card {
		flex-basis: 31%;
	}

	.mx-carousel.mx-grid--article > .mx-card {
		flex-basis: 48%;
	}
}

@media (min-width: 1024px) {
	.mx-grid--creator,
	.mx-grid--work {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-grid--article {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.mx-carousel > .mx-card {
		flex-basis: 31%;
	}

	.mx-carousel.mx-grid--article > .mx-card {
		flex-basis: 32%;
	}
}

/* カード内の文字も少し大きく */
.mx-card__title {
	font-size: 1rem;
}

.mx-card__body {
	padding: 14px 16px 16px;
}

/* ---------------------------------------------------------------------------
 * 色味を足す
 * ------------------------------------------------------------------------ */

/* 見出しにアクセントの下線を重ねる */
.mx-section__title,
.mx-section__head {
	position: relative;
	border-bottom-color: #eee;
}

.mx-section__title::after,
.mx-section__head::after {
	content: "";
	position: absolute;
	left: 0;
	bottom: -2px;
	width: 72px;
	height: 2px;
	background: var(--mx-accent);
	border-radius: 2px;
}

/* 入れ子で二重に線が出ないようにする */
.mx-section__head .mx-section__title::after {
	content: none;
}

/* カードに軽い影と、ホバー時の色付き影 */
.mx-card {
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.mx-card:hover {
	box-shadow: 0 6px 20px rgba(255, 77, 125, 0.16);
}

/* 画像がない場合のプレースホルダーにも少し色を乗せる */
.mx-img--placeholder {
	background:
		repeating-linear-gradient(
			45deg,
			#fdf3f6,
			#fdf3f6 10px,
			#f7e9ee 10px,
			#f7e9ee 20px
		);
}

/* カテゴリー・サービスのカードを色付きに */
.mx-termcard {
	background: linear-gradient(180deg, #fff 0%, #fffafb 100%);
	border-color: #f0dbe2;
}

.mx-termcard__count {
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
	font-weight: 700;
}

/* 「もっと見る」をボタン風に */
.mx-section__more {
	padding: 6px 14px;
	border: 1px solid var(--mx-accent-soft);
	border-radius: 999px;
	background: var(--mx-accent-soft);
	font-weight: 600;
}

.mx-section__more:hover {
	background: var(--mx-accent);
	border-color: var(--mx-accent);
	color: #fff;
	text-decoration: none;
}

/* ヒーローの色を少し濃く */
.mx .mx-hero {
	background: linear-gradient(165deg, #ffe8ef 0%, #fff6f8 55%, #ffffff 100%);
}

/* 作品カードのサービス名を目立たせる */
.mx-card__service {
	padding: 1px 8px;
	border-radius: 4px;
	background: var(--mx-accent-soft);
	color: var(--mx-accent-dark);
}

/* ---------------------------------------------------------------------------
 * カルーセルの表示枚数
 *
 * 登録件数が少ないうちでも横スクロールが成立するよう、
 * 1画面あたりの表示枚数を少し増やしています（PCで約3.5枚）。
 * ------------------------------------------------------------------------ */

@media (min-width: 1024px) {
	.mx-carousel > .mx-card {
		flex-basis: 27%;
	}

	.mx-carousel.mx-grid--article > .mx-card {
		flex-basis: 30%;
	}
}

/* ---------------------------------------------------------------------------
 * スクロールスナップの解除
 *
 * scroll-snap を有効にしていると、JavaScript が少しずつ scrollLeft を
 * 動かすたびにブラウザが元の位置へ吸着させ直すため、自動スクロールが
 * まったく進みません。自動で流す以上、スナップは併用できません。
 * 手動でのスワイプ・スクロールはこれまでどおり可能です。
 * ------------------------------------------------------------------------ */

.mx-carousel {
	scroll-snap-type: none;
	scroll-behavior: auto;
}

.mx-carousel > .mx-card {
	scroll-snap-align: none;
}

/* ---------------------------------------------------------------------------
 * プロフィールヘッダー（シンプル表示）
 * ------------------------------------------------------------------------ */

.mx-profile--minimal {
	border: none;
	background: none;
	overflow: visible;
	margin-bottom: 28px;
	padding: 8px 0 0;
}

.mx-profile--minimal .mx-profile__name {
	margin: 0 0 4px;
	font-size: 1.625rem;
}

.mx-profile--minimal .mx-profile__kana {
	margin: 0 0 12px;
}

.mx-profile--minimal .mx-badges {
	margin-top: 0;
}

.mx-profile--minimal .mx-social {
	margin-top: 16px;
}

@media (min-width: 1024px) {
	.mx-profile--minimal .mx-profile__name {
		font-size: 2rem;
	}
}
