/* ============================================================
 * トップページ専用レイアウト（front-page.php / template-parts/front/*）
 * ------------------------------------------------------------
 * モックアップ(top-pc.html/top-sp.html)の固定px幅は目安として
 * 使うが、実装はCSS Grid + メディアクエリによる可変レイアウト。
 * ============================================================ */

/* #sidebar非表示・幅の調整はサイト全体の共通ルール（global.css）に移動済み。
   ここではトップページ固有の背景色だけ設定する。
   #content-in は Cocoon の .wrap（margin:0 auto で中央寄せ）を
   維持したいので margin は触らない。 */
body.home #content,
body.home #main {
	background: transparent;
	padding: 0;
	margin: 0;
}
body.home #content-in {
	background: transparent;
	padding: 0;
	/* Cocoonのカスタマイザー設定で .wrap（#content-inに付与）の
	   幅が1036px固定になっており、.satellite-front側でmax-widthを
	   広げても親のこの制限に収まってしまうため、ここで直接広げる。 */
	width: var(--w-site);
	max-width: 100%;
}

.satellite-front {
	max-width: var(--w-site);
	margin: 0 auto;
	padding: 40px 20px 72px;
	font-family: var(--font-sans);
	color: var(--c-text);
}

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

/* ---- サイト紹介（最上部） ----
   初めて来た人が「どういうサイトか」を最初に掴めるようにする。
   サイドバーのパネルと同じく、方眼の上に紙を1枚置いた見た目にする。
   PCでは不要と感じたら、下の @media の display:none を有効にする。 */
.satellite-intro {
	margin-bottom: 40px;
	padding: 24px 28px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-top: 4px solid var(--c-pop-blue);
	border-radius: var(--radius-card);
	box-shadow: 0 1px 3px rgba(23, 32, 43, .06);
}
.satellite-intro__heading {
	margin: 0 0 12px;
	font-size: 22px;
	font-weight: 900;
	line-height: 1.4;
}
.satellite-intro__body {
	margin: 0;
	font-size: 15px;
	line-height: 1.9;
	color: var(--c-text);
}
/* サイト内の入り口リンク。丸い囲みはやめて、黒の太字の文字だけを横に並べる。
   マウスを重ねた・押した間は、青い文字と薄い背景になる。 */
.satellite-intro__nav {
	/* 5つを均等な幅の列に並べて、それぞれの文字を中央に置く（丸い囲みがあった頃と同じ等間隔） */
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
	gap: 4px 8px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px dashed var(--c-divider);
}
.satellite-intro__nav a {
	justify-self: center; /* 列いっぱいに広げず、文字の幅だけにする（押したときの背景が横に長くならないように） */
	padding: 8px 6px;
	border-radius: 8px;
	background: none;
	font-size: 16px;
	font-weight: 900;
	text-decoration: none;
	color: var(--c-text);
	white-space: nowrap;
}
.satellite-intro__nav a:hover,
.satellite-intro__nav a:active {
	background: var(--c-surface);
	color: var(--c-accent);
}
/* リンクだけで本文が無い場合は、上の区切り線を出さない */
.satellite-intro__nav:first-child {
	margin-top: 0;
	padding-top: 0;
	border-top: none;
}
/* 本文はPC用とスマホ用の2つを出力しておき、画面幅で出し分ける。
   スマホ用が未設定の場合はスマホでもPC用のまま。 */
.satellite-intro__body--sp { display: none; }
@media (max-width: 520px) {
	.satellite-intro--has-sp .satellite-intro__body--pc { display: none; }
	.satellite-intro--has-sp .satellite-intro__body--sp { display: block; }
}

@media (max-width: 520px) {
	.satellite-intro {
		margin-bottom: 32px;
		padding: 20px;
	}
	.satellite-intro__heading { font-size: 19px; }
	.satellite-intro__body { font-size: 14px; }
	/* スマホは5つを、幅いっぱいに均等に散らして1行に収める。
	   左右の余白を詰めている（収まらない極端に狭い画面では、折り返す）。 */
	.satellite-intro__nav {
		display: flex;
		flex-wrap: wrap;
		justify-content: space-between;
		gap: 4px 0;
	}
	.satellite-intro__nav a {
		padding: 8px 3px;
		font-size: 15px;
	}
}
/* PCでは紹介を出さない場合はこの行を有効にする
@media (min-width: 900px) { .satellite-intro { display: none; } }
*/

/* ---- 全体グリッド ----
 * grid-column だけを指定する自動配置は、行の高さが左右の列で
 * 共有されてしまい（片方の列が長いと、もう片方の列にも同じ分の
 * 空白ができる）、Pick Upの下に不要な隙間ができるバグがあった。
 *
 * そこで、メイン列（.satellite-front__main）とサイド列
 * （.satellite-front__aside）を実際にDOM上でも入れ子にし、
 * それぞれが完全に独立した縦積み（flex column）になるようにする。
 * これで片方の列の高さがもう片方に影響しない。
 *
 * ただしスマホでは「Pick Up→雑記→New→タグ→連載→今日の一曲→
 * プロフィール」という、2つの列を交互に混ぜた順番で表示したい。
 * そこでスマホ幅では .satellite-front__main / __aside を
 * display:contents で「透明化」し、中の各セクションを直接
 * .satellite-front__grid の子として扱わせ、source順のまま
 * 1カラムで積む。デスクトップ幅になったら display:contents を
 * 解除して、本来の2列（独立した高さ）に戻す。
 */
.satellite-front__grid {
	display: flex;
	flex-direction: column;
	gap: 56px;
}
.satellite-front__main,
.satellite-front__aside {
	display: contents;
}

@media (min-width: 900px) {
	.satellite-front__grid {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 360px;
		column-gap: 88px;
		align-items: start;
	}
	.satellite-front__main,
	.satellite-front__aside {
		display: flex;
		flex-direction: column;
	}
	.satellite-front__main {
		gap: 48px;
	}
	.satellite-front__aside {
		gap: 72px;
	}
}

/* ---- 共通パーツ ----
   セクション見出しは、左にアクセントの縦バー＋薄い色面を敷いて、
   どこからどこまでが1つのまとまりかを分かりやすくする。 */
.satellite-section-head {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 20px;
	padding: 10px 16px;
	background: var(--c-surface);
	border-left: 4px solid var(--c-accent);
	border-radius: 0 6px 6px 0;
}
.satellite-section-head h2 {
	margin: 0;
	font-size: 21px;
	font-weight: 900;
	line-height: 1.4;
}
/* ---- Pick Up ---- */
.satellite-pickup {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-decoration: none;
	color: inherit;
}
.satellite-pickup__image {
	position: relative;
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-img);
	background: var(--c-img-placeholder);
	overflow: hidden;
}
/* カテゴリーと年月日は、New のカードと同じく画像の下に並べる（左にバッジ、右に日付） */
.satellite-pickup__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	color: var(--c-text-sub);
}
.satellite-pickup__meta .satellite-date-mono { margin-left: auto; }
.satellite-pickup__title {
	margin: 0;
	font-size: 24px;
	font-weight: 900;
	line-height: 1.5;
}
.satellite-pickup__excerpt {
	margin: 0;
	font-size: 15px;
	line-height: 1.7;
	color: var(--c-text-sub);
}

/* ---- New (読みもの) ---- */
.satellite-new-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0 18px;
}
@media (min-width: 620px) {
	.satellite-new-grid { grid-template-columns: repeat(3, 1fr); }
}
/* 囲みではなく線で区切る（下の線は -1px 分重ねて二重を防ぐ）。
   min-width:0 と overflow-wrap が無いと、長い英数字のタイトルが
   改行されずに列を押し広げ、列幅が不揃いになる。 */
.satellite-new-card {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 14px 0;
	margin-bottom: -1px;
	min-width: 0;
	overflow-wrap: anywhere;
	border-top: 1px dashed var(--c-divider);
	border-bottom: 1px dashed var(--c-divider);
	text-decoration: none;
	color: inherit;
}
.satellite-new-card__image {
	/* YouTube と同じ 16:9。Pick Up・読みもの一覧とも揃えている */
	aspect-ratio: 16 / 9;
	border-radius: var(--radius-img);
	background: var(--c-img-placeholder);
	overflow: hidden;
}
/* 2列表示のスマホでは幅が狭いので、長いカテゴリー名でも溢れないよう折り返す */
.satellite-new-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-size: 12px;
	color: var(--c-text-sub);
}
.satellite-new-card__meta .satellite-date-mono { margin-left: auto; }
/* スマホは1列の横並び（左に画像、右にタイトルとカテゴリー・年月日）にする。
   読みもの一覧（archive.css）と同じ見え方。マークアップの順序は
   「画像 → メタ → タイトル」なので、grid-template-areas で並べ替える。 */
@media (max-width: 619px) {
	.satellite-new-grid {
		grid-template-columns: 1fr;
	}
	.satellite-new-card {
		display: grid;
		grid-template-columns: 128px minmax(0, 1fr);
		grid-template-areas:
			"image title"
			"image meta";
		grid-template-rows: auto auto;
		align-content: center;
		column-gap: 14px;
		row-gap: 8px;
	}
	.satellite-new-card__image {
		grid-area: image;
		align-self: center;
	}
	.satellite-new-card__title { grid-area: title; align-self: end; }
	.satellite-new-card__meta {
		grid-area: meta;
		align-self: start;
		gap: 8px;
	}
	.satellite-new-card__meta .satellite-date-mono { margin-left: 0; }
}
.satellite-new-card__title {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.55;
}

/* ---- 最近よく使われているタグ ---- */
.satellite-tags-box {
	padding: 24px;
	border: 1px solid var(--c-border);
	border-radius: var(--radius-card);
	background: #fff;
	box-shadow: 0 1px 3px rgba(23, 32, 43, .06);
}
.satellite-tags-box .satellite-section-head { margin-bottom: 16px; }
.satellite-tags-list {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 20px;
}


/* ---- 雑記 ---- */
/* サイドの各ブロックは白いパネルに統一して、ウィジェットらしく見せる。
   方眼の背景の上に「紙を1枚置いた」ように見せたいので、薄い影を足す。 */
.satellite-front__aside > section > div {
	padding: 20px;
	background: #fff;
	border: 1px solid var(--c-border);
	border-radius: var(--radius-card);
	box-shadow: 0 1px 3px rgba(23, 32, 43, .06);
}

.satellite-zakki-box {
	display: flex;
	flex-direction: column;
}
.satellite-zakki-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding-bottom: 14px;
	border-bottom: 2px solid var(--c-text);
	margin-bottom: 4px;
}
.satellite-zakki-head h2 {
	margin: 0;
	font-size: 19px;
	font-weight: 900;
	display: flex;
	align-items: center;
	gap: 9px;
}
.satellite-zakki-item {
	padding: 16px 0;
	border-bottom: 1px dashed var(--c-divider);
}
.satellite-zakki-item--first { padding-top: 20px; }
.satellite-zakki-item__meta {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-bottom: 10px;
}
.satellite-zakki-item__row .satellite-zakki-item__meta {
	margin-bottom: 0;
}
.satellite-zakki-item__image {
	aspect-ratio: 4 / 3;
	border-radius: var(--radius-img);
	background: var(--c-img-placeholder);
	overflow: hidden;
	margin-bottom: 10px;
}
.satellite-zakki-item__text {
	margin: 0;
	font-size: 14px;
	line-height: 1.7;
}
.satellite-zakki-item__row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}
.satellite-zakki-item__body {
	flex-grow: 1;
	display: flex;
	flex-direction: column;
	gap: 5px;
}
.satellite-zakki-item__thumb {
	width: 56px;
	height: 56px;
	border-radius: 8px;
	overflow: hidden;
	background: var(--c-img-placeholder);
	flex-shrink: 0;
}

/* ---- 今日の一曲 ---- */
.satellite-song-box {
	display: flex;
	flex-direction: column;
	gap: 12px;
}
.satellite-song {
	display: flex;
	gap: 12px;
	align-items: center;
	text-decoration: none;
	color: inherit;
}
.satellite-song__art {
	width: 52px;
	height: 52px;
	border-radius: 8px;
	background: var(--c-img-placeholder);
	overflow: hidden;
	flex-shrink: 0;
}
.satellite-song__meta { display: flex; flex-direction: column; gap: 2px; }
.satellite-song__title { font-size: 15px; font-weight: 700; }
.satellite-song__artist { font-size: 13px; color: var(--c-text-sub); }

/* ---- プロフィール ---- */
/* 枠の幅は他のパネルに揃えず、中身に合わせる（左寄せ） */
.satellite-front__aside > .satellite-front__profile > .satellite-profile-box {
	width: fit-content;
	min-width: 220px;
	max-width: 100%;
}
.satellite-profile-box {
	display: flex;
	flex-direction: column;
	gap: 0;
}
/* アイコン・名前の行と「about →」の間を詰める */
.satellite-profile-box .satellite-see-all {
	line-height: 1.2;
	margin-top: -4px;
}
.satellite-profile__head {
	display: flex;
	gap: 12px;
	align-items: center;
}
/* Cocoon の .avatar / img 指定に負けて枠いっぱいに広がるので、サイズを固定する。
   THIS WEEK'S SONG のジャケット枠（52px）と揃えている。 */
.satellite-profile__head img.satellite-profile__avatar {
	width: 52px;
	height: 52px;
	max-width: none;
	flex-shrink: 0;
	border-radius: 50%;
	object-fit: cover;
}
.satellite-profile__name {
	display: block;
	font-size: 16px;
	font-weight: 900;
}
.satellite-profile__bio {
	margin: 0;
	font-size: 14px;
	line-height: 1.8;
	color: var(--c-text-sub);
}
