/*
 * SF 今月の自販機（sf-monthly-jihanki）の見た目。新しい区画（.sf-mj-*・.sf-pt-*・.sf-ar*）だけに当てる。
 * 区切り：PC＝960 以上（ふつうの規則）／SP＝959 以下（@media (max-width:959px)）。全選択子はクラス 2 つ以上。
 * 作成 2026-10-28（修正指示書 20261028 §2-c・束1b）。
 */

/* ---------- 今月の自販機の帯 ---------- */
.sf-root.sf-mj-band {
	background: #e83632;
	padding: 50px 0;
	margin-bottom: 0;
}

/* 帯をメイン画像／パンくずに接ける。SWELL の .post_content > :first-child { margin-top: 0 !important } が
   負の margin-top を打ち消すため、top で上げて margin-bottom で同じ量を詰める（2026-10-28 複製で実測）。 */
.sf-root.sf-mj-band--home {
	position: relative;
	top: -96px;
	margin-bottom: -96px;
}

.sf-root.sf-mj-band--search {
	position: relative;
	top: -64px;
	margin-bottom: -64px;
}

.sf-mj-band .sf-mj-inner {
	max-width: 1240px;
	margin: 0 auto;
}

/* ---------- タブ（帯と一覧の 1 枚目） ---------- */
/* 形は Figma 書き出しの union_tab_card.svg の実値：枠 7（stroke 14 を内側で切る）・上の角丸 64・
   カード上端からの出っ張り 85・幅 536・左端はカード左から 339（中央より 13 左）。
   印と文字はカードの上端にまたがる（Figma の書き出し f1 で中心がタブ上端から 76）。 */
.sf-root .sf-mj-tab {
	position: relative;
	z-index: 1;
	width: 536px;
	height: 92px;
	margin: 0 auto -7px calc(50% - 281px);
	padding-top: 53px;
	background: #fff;
	border: 7px solid #000;
	border-bottom: 0;
	border-radius: 64px 64px 0 0;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	box-sizing: border-box;
}

.sf-mj-tab .sf-mj-tab__mark {
	width: 69px;
	height: 96px;
	margin: 0;
}

.sf-mj-tab .sf-mj-tab__text {
	font-family: "Zen Kaku Gothic New", sans-serif;
	font-weight: 700;
	font-size: 40px;
	line-height: 1;
	color: #e83632;
}

/* ---------- カード ---------- */
.sf-root .sf-mj-card {
	position: relative;
	background: #fff;
	border: 7px solid #000;
	border-radius: 32px;
	/* Figma の左右 75／70 は外形（枠を含む）から。枠 7 は内側なので引く＝写真 512・右の列 540 が入る。 */
	padding: 48px 63px 48px 68px;
	display: flex;
	gap: 43px;
	align-items: flex-start;
	box-sizing: border-box;
	margin: 0;
}

.sf-root .sf-mj-card--plain {
	margin-top: 40px;
}

.sf-mj-card .sf-mj-photo {
	flex: 0 1 512px;
	min-width: 0;
	max-width: 512px;
	aspect-ratio: 512 / 335;
	border-radius: 0;
	overflow: hidden;
}

.sf-mj-photo .sf-mj-photo__img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.sf-mj-card .sf-mj-body {
	flex: 1 1 540px;
	min-width: 0;
}

.sf-mj-body .sf-mj-genre {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 140px;
	width: auto;
	max-width: 100%;
	min-height: 32px;
	padding: 0 12px;
	box-sizing: border-box;
	border-radius: 8px;
	background: #ffefaf;
	font: 700 16px/22px "Zen Kaku Gothic New", sans-serif;
	color: #000;
	margin: 0 0 12px;
}

.sf-mj-body .sf-mj-place {
	font: 700 20px/24px "Zen Kaku Gothic New", sans-serif;
	color: #000;
	margin: 0 0 4px;
	text-wrap: pretty;
}

.sf-mj-body .sf-mj-month {
	font: 400 14px/1.4 "Noto Sans JP", sans-serif;
	color: #555;
	margin: 0 0 12px;
}

.sf-mj-body .sf-mj-text p {
	font: 400 16px/28px "Zen Kaku Gothic Antique", sans-serif;
	color: #000;
	margin: 0 0 1em;
	text-wrap: pretty;
}

.sf-mj-body .sf-mj-text p:last-child {
	margin-bottom: 0;
}

/* ---------- 黄色のボタン（帯・一覧） ---------- */
.sf-root .sf-mj-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 376px;
	max-width: 100%;
	height: 72px;
	margin: 24px auto 0;
	border-radius: 8px;
	background: #fffb00;
	color: #e83632;
	font: 700 24px/1 "Zen Kaku Gothic New", sans-serif;
	text-decoration: none;
}

.sf-root .sf-mj-btn:focus-visible {
	outline: 3px solid #000;
	outline-offset: 2px;
}

.sf-root .sf-mj-btn--top {
	margin-top: 40px;
}

/* ---------- これまでの自販機（一覧ページ） ---------- */
/* SWELL は body に class を付けず div#body_wrap に付ける（2026-10-28 複製で実測）。 */
#body_wrap.page-template-page-jihanki-archive {
	background: #e83632;
}

#body_wrap.page-template-page-jihanki-archive .c-pageTitle,
#body_wrap.page-template-page-jihanki-archive .l-topTitleArea {
	display: none;
}

.sf-root.sf-ar {
	max-width: 1240px;
	margin: 0 auto;
	padding: 64px 0 80px;
}

.sf-ar .sf-ar-title {
	font: 700 40px/1.2 "Zen Kaku Gothic New", sans-serif;
	color: #fff;
	text-align: center;
	margin: 64px 0 0;
}

.sf-root.sf-ar-h1 {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
}

/* ---------- オフィシャルパートナー ---------- */
.sf-root.sf-pt {
	background: #fff;
	padding: 64px 16px 64px; /* 2026-10-28 井埜さん「空白大きすぎない？」で Figma の 160／150 から詰めた */
	text-align: center;
}

.sf-pt .sf-pt-banner {
	display: inline-block;
}

.sf-root .sf-pt-banner:focus-visible {
	outline: 3px solid #000;
	outline-offset: 2px;
}

.sf-pt .sf-pt-banner img {
	display: block;
	width: 776px;
	max-width: 100%;
	height: auto;
	margin: 0 auto;
	border-radius: 24px;
}

.sf-pt .sf-pt-lead {
	font: 500 18px/1.4 "Noto Sans JP", sans-serif;
	color: #dc3030;
	margin: 24px 0 8px;
}

.sf-pt .sf-pt-note {
	font: 400 16px/26px "Noto Sans JP", sans-serif;
	color: #000;
	margin: 0;
}

/* ---------- PC の中間幅（960〜1439） ---------- */
@media (min-width: 960px) and (max-width: 1279px) {
	.sf-mj-band .sf-mj-inner {
		padding: 0 24px;
	}
}

@media (min-width: 960px) and (max-width: 1439px) {
	.sf-root .sf-mj-card {
		padding: 48px clamp(24px, 5vw, 63px) 48px clamp(24px, 5vw, 68px);
		gap: clamp(24px, 3vw, 43px);
	}
}

/* ---------- SP（959 以下） ---------- */
@media (max-width: 959px) {
	.sf-root.sf-mj-band {
		padding: 32px 16px;
	}

	.sf-mj-band .sf-mj-inner {
		max-width: 343px;
	}

	/* SP は §1-4 の比を保つ：枠と角丸は PC の 2/3（7→5・32→21・64→43）、出っ張りは 72/134 の比（85→46）、
	   ずれは 240/536 の比（13→6）。 */
	.sf-root .sf-mj-tab {
		width: 240px;
		height: 51px;
		padding-top: 26px;
		border-width: 5px;
		border-bottom: 0;
		border-radius: 43px 43px 0 0;
		gap: 12px;
		margin-bottom: -5px;
		margin-left: calc(50% - 126px);
	}

	.sf-mj-tab .sf-mj-tab__mark {
		width: 34px;
		height: 48px;
	}

	.sf-mj-tab .sf-mj-tab__text {
		font-size: 22px;
	}

	.sf-root .sf-mj-card {
		border-width: 5px;
		border-radius: 21px;
		padding: 20px 16px 24px;
		flex-direction: column;
		gap: 16px;
	}

	.sf-root .sf-mj-card--plain {
		margin-top: 24px;
	}

	.sf-mj-card .sf-mj-photo {
		flex: none;
		width: 100%;
		max-width: none;
		border-radius: 0;
	}

	.sf-mj-card .sf-mj-body {
		flex: none; /* 縦並びでは 540px が高さに効くため打ち消す */
		width: 100%;
	}

	.sf-mj-body .sf-mj-genre {
		min-width: 120px;
		min-height: 28px;
		font-size: 14px;
	}

	.sf-mj-body .sf-mj-place {
		font-size: 17px;
		line-height: 1.4;
	}

	.sf-mj-body .sf-mj-month {
		font-size: 13px;
	}

	.sf-mj-body .sf-mj-text p {
		font-size: 15px;
		line-height: 1.7;
	}

	.sf-root .sf-mj-btn {
		width: 100%;
		max-width: 343px;
		height: 60px;
		font-size: 20px;
		margin-top: 20px;
	}

	.sf-root .sf-mj-btn--top {
		margin-top: 40px;
	}

	.sf-root.sf-ar {
		padding: 32px 0 48px;
	}

	.sf-ar .sf-ar-title {
		font-size: 28px;
		margin-top: 40px;
	}

	.sf-root.sf-pt {
		padding: 56px 16px 48px;
	}

	.sf-pt .sf-pt-banner img {
		border-radius: 12px;
	}

	.sf-pt .sf-pt-lead {
		font-size: 16px;
	}

	.sf-pt .sf-pt-note {
		font-size: 14px;
		line-height: 1.6;
	}
}

/* 600 未満は帯の上の空きが幅に比例する（複製で実測：トップ 21.6vw・/search/ 7.2vw。600〜1440 は 96／64）。 */
@media (max-width: 599px) {
	.sf-root.sf-mj-band--home {
		top: -21.6vw;
		margin-bottom: -21.6vw;
	}

	.sf-root.sf-mj-band--search {
		top: -7.2vw;
		margin-bottom: -7.2vw;
	}
}
