/*!
 * MoteRaku スキン共通スケルトン CSS (Wave 267)
 *
 * 全スキン共通の防御 CSS。装飾は各スキンの style.css / header.html 等で上書き可能。
 * 役割:
 *   - 統一マークアップ規約 (.mtr-site-header / .mtr-site-footer / .mtr-works-*) の
 *     最低限の挙動を保証(grid / flex / aspect-ratio 等)
 *   - 宿主テーマの max-width 制約 / 余白を打ち消し、スキンの HTML を正しく描画
 *   - スキンの HTML がどんなに雑でも「縦並びに崩れる」を防ぐフォールバック
 */

/* ============================================================
   ベース: スキン適用中の宿主テーマ最大幅 / 余白を打ち消し
   ============================================================ */
body.mtr-skin-active {
	margin: 0 !important;
	padding: 0 !important;
}
/* Wave 307: max-width 100% 強制は archive/home/search のみ。
   single/page の本文では宿主テーマの max-width(中央寄せ)を温存し、
   読みやすい横幅(720-880px 程度)を維持する。 */
body.mtr-skin-archive .wp-site-blocks > main,
body.mtr-skin-archive main,
body.mtr-skin-archive #main,
body.mtr-skin-archive #primary,
body.mtr-skin-archive .l-main,
body.mtr-skin-archive .site-main,
body.mtr-skin-archive .l-content {
	max-width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
}

/* ============================================================
   ヘッダー (.mtr-site-header) スケルトン
   ============================================================ */
.mtr-site-header {
	display: block;
	width: 100%;
	box-sizing: border-box;
}
.mtr-site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0.85rem 1.5rem;
	flex-wrap: wrap;
}
.mtr-site-header__brand {
	font-weight: 700;
	font-size: 1.1rem;
	text-decoration: none;
}
.mtr-site-header__nav {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	flex-wrap: wrap;
}
.mtr-site-header__nav a {
	text-decoration: none;
	font-size: 0.9rem;
	font-weight: 600;
}
.mtr-site-header__cta {
	display: inline-flex;
	align-items: center;
	padding: 0.55rem 1.2rem;
	border-radius: 6px;
	font-weight: 700;
	font-size: 0.9rem;
	text-decoration: none;
}

/* ============================================================
   フッター (.mtr-site-footer) スケルトン
   ============================================================ */
.mtr-site-footer {
	display: block;
	width: 100%;
	box-sizing: border-box;
	padding: 3rem 1.5rem 1.5rem;
}
.mtr-site-footer__top {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 2.5rem;
	max-width: 1280px;
	margin: 0 auto;
	padding-bottom: 2rem;
}
.mtr-site-footer__col h3 {
	font-size: 0.8rem;
	letter-spacing: 0.08em;
	font-weight: 700;
	margin: 0 0 0.75rem;
}
.mtr-site-footer__col ul {
	list-style: none;
	padding: 0;
	margin: 0;
}
.mtr-site-footer__col li {
	margin-bottom: 0.4rem;
}
.mtr-site-footer__col a {
	text-decoration: none;
	font-size: 0.85rem;
}
.mtr-site-footer__bottom {
	display: flex;
	justify-content: space-between;
	align-items: center;
	max-width: 1280px;
	margin: 0 auto;
	padding-top: 1.25rem;
	flex-wrap: wrap;
	gap: 0.5rem;
	font-size: 0.75rem;
}

/* ============================================================
   投稿一覧 (.mtr-works / .mtr-works-grid / .mtr-works-card)
   ============================================================ */
.mtr-works {
	display: block;
	width: 100%;
	box-sizing: border-box;
}
.mtr-works__inner {
	max-width: 1200px;
	margin: 0 auto;
	padding: 3rem 1.5rem 4rem;
}
.mtr-works__title {
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: 700;
	margin: 0 0 2rem;
}
.mtr-works-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1.75rem;
}
.mtr-works-card {
	display: block;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 10px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.mtr-works-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}
.mtr-works-card__img {
	width: 100%;
	aspect-ratio: 16 / 10;
	background-size: cover;
	background-position: center;
	background-color: #f1f5f9;
}
.mtr-works-card__body {
	padding: 1rem 1.2rem 1.25rem;
}
.mtr-works-card__cat {
	display: inline-block;
	font-size: 0.7rem;
	letter-spacing: 0.05em;
	font-weight: 700;
	padding: 0.15rem 0.5rem;
	border-radius: 3px;
	margin-bottom: 0.5rem;
	background: rgba(0, 0, 0, 0.06);
}
.mtr-works-card__title {
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.55;
	margin: 0 0 0.5rem;
}
.mtr-works-card__excerpt {
	font-size: 0.8rem;
	line-height: 1.7;
	margin: 0 0 0.6rem;
	color: rgba(0, 0, 0, 0.6);
}
.mtr-works-card__date {
	font-size: 0.7rem;
	color: rgba(0, 0, 0, 0.45);
}

.mtr-works__pager {
	display: flex;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 2.5rem;
}
.mtr-works__pager .page-numbers {
	padding: 0.45rem 0.85rem;
	background: #fff;
	border: 1px solid rgba(0, 0, 0, 0.1);
	border-radius: 5px;
	text-decoration: none;
	font-size: 0.8rem;
	font-weight: 600;
}

/* ============================================================
   モバイル
   ============================================================ */
@media (max-width: 640px) {
	.mtr-site-header__nav { gap: 0.75rem; }
	.mtr-site-footer__bottom { flex-direction: column; align-items: flex-start; }
	.mtr-works__inner { padding: 2rem 1rem 3rem; }
}
