/* ==========================================================================
   guests.css — ゲスト一覧（page-guests.php）専用（2026-09-19 新規）
   読み込み: inc/guests.php（テンプレート page-guests.php の表側だけ）
   SCSS ではなく素の CSS（WP-SCSS の対象外。assets/scss/guests.scss は作らない）
   クラスはすべて guests-* 。テーマ共通のクラスは上書きしない。
   色: テーマの黄（#fbcb15）と黒
   ========================================================================== */

/* ---------- 見出し（画像なし。2026-09-20 ヒーロー画像を廃止） ----------
   左: 大きな GUESTS＋赤の斜めの帯つきの日本語タイトル（固定ページのタイトル）。
   「TOWER RECORDS SHIBUYA」の小見出しは上にロゴがあるため外した（2026-09-20）
   右: 総数と SINCE 年。下に細い線。左上はテーマのヘッダーが重なるので上の余白を広く取る */
.guests-head__inner {
	padding-top: 150px;
	padding-bottom: 0;
}

.guests-head__row {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 24px 40px;
	flex-wrap: wrap;
	padding-bottom: 36px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}

.guests-head__title {
	min-width: 0;
	/* h1 と帯を inline-block にしているので、横に並ばないよう縦積みにする */
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.guests-head__en {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: clamp(72px, 11vw, 168px);
	font-weight: 700;
	line-height: 0.85;
	letter-spacing: 0.01em;
	text-transform: uppercase;
	color: var(--primary, #fbcb15); /* テーマの黄（style.css の --primary） */
	margin: 0;
	/* 斜体: Antonio にはイタリックがないので変形で傾ける（タワーのロゴの勢い）。
	   文字単位のアニメーション（data-splitting）とぶつからないよう、変形は親の h1 に掛ける */
	display: inline-block;
	transform: skewX(-12deg);
	transform-origin: left bottom;
	padding-right: 0.08em; /* 傾けた右端が切れないように */
}

.guests-head__ja {
	position: relative;
	display: inline-block;
	margin: 22px 0 0;
	padding: 6px 16px 6px 22px;
	font-size: 15px;
	font-weight: 700;
	letter-spacing: 0.08em;
	color: #fff;
	z-index: 0;
}

/* 赤の斜めの帯（テーマの skew ボタンと同じ雰囲気） */
.guests-head__ja::before {
	content: "";
	position: absolute;
	inset: 0;
	background: var(--secondary, #d7000f);
	transform: skewX(-14deg);
	z-index: -1;
}

.guests-head__meta {
	display: flex;
	align-items: flex-end;
	gap: 12px;
	color: #fff;
}

.guests-head__num {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: clamp(48px, 5vw, 80px);
	font-weight: 700;
	line-height: 0.85;
	color: #fbcb15;
	/* GUESTS と同じ斜体（変形で傾ける） */
	display: inline-block;
	transform: skewX(-12deg);
	transform-origin: left bottom;
	padding-right: 0.08em;
}

.guests-head__num-label {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 14px;
	letter-spacing: 0.14em;
	line-height: 1.3;
	color: rgba(255, 255, 255, 0.7);
}

.guests-intro {
	color: rgba(255, 255, 255, 0.85);
	line-height: 1.9;
	font-size: 15px;
	max-width: 820px;
	padding-top: 28px;
}

/* ---------- 全体 ---------- */
.guests__inner {
	padding-top: 48px;
	padding-bottom: 150px;
}

.guests-intro a {
	color: #fbcb15;
	text-decoration: underline;
}

.guests-layout {
	display: grid;
	grid-template-columns: 220px minmax(0, 1fr);
	gap: 48px;
	align-items: start;
}

.guests-main {
	min-width: 0;
}

/* 画面には出さず、読み上げには使う */
.guests-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* ---------- 左: 絞り込み ---------- */
.guests-filter-toggle {
	display: none; /* SP だけ出す */
}

.guests-search {
	display: flex;
	align-items: stretch;
	border: 1px solid rgba(255, 255, 255, 0.5);
	margin-bottom: 28px;
}

.guests-search input[type="search"] {
	flex: 1 1 auto;
	min-width: 0;
	background: transparent;
	border: 0;
	color: #fff;
	font-size: 14px;
	padding: 10px 12px;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	border-radius: 0;
}

.guests-search input[type="search"]::placeholder {
	color: rgba(255, 255, 255, 0.5);
}

/* ブラウザ標準の「×」（入力を消す）は青系で差し色の方針から外れるため出さない（2026-09-20） */
.guests-search input[type="search"]::-webkit-search-cancel-button,
.guests-search input[type="search"]::-webkit-search-decoration {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.guests-search:focus-within {
	border-color: #fbcb15;
}

.guests-search button {
	flex: 0 0 auto;
	width: 44px;
	background: transparent;
	border: 0;
	color: #fff;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
}

.guests-search button svg,
.guests-filter-toggle svg {
	width: 18px;
	height: 18px;
}

.guests-search button:hover {
	color: #fbcb15;
}

.guests-years ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.guests-year,
.guests-month {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
	color: #fff;
	text-decoration: none;
	transition: color 0.2s;
}

.guests-year {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: 0.04em;
	line-height: 1;
	padding: 8px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.guests-month {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 16px;
	letter-spacing: 0.04em;
	padding: 6px 0 6px 14px;
	color: rgba(255, 255, 255, 0.8);
}

.guests-months {
	padding: 4px 0 8px !important;
	border-left: 2px solid #fbcb15;
	margin: 6px 0 4px !important;
}

.guests-year:hover,
.guests-month:hover,
.guests-year.is-open,
.guests-year.is-active,
.guests-month.is-active {
	color: #fbcb15;
}

.guests-count {
	font-family: "Lato", Arial, sans-serif;
	font-size: 12px;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.5);
}

.guests-year.is-active .guests-count,
.guests-month.is-active .guests-count {
	color: #fbcb15;
}

/* ---------- 右: 結果 ---------- */
.guests-result-head {
	display: flex;
	align-items: baseline;
	flex-wrap: wrap;
	gap: 8px 20px;
	margin-bottom: 28px;
}

.guests-result-label {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: clamp(28px, 3.4vw, 44px);
	font-weight: 700;
	line-height: 1;
	letter-spacing: 0.01em;
	color: #fbcb15;
	margin: 0;
	word-break: break-all;
	/* GUESTS と同じ斜体（変形で傾ける） */
	display: inline-block;
	transform: skewX(-12deg);
	transform-origin: left bottom;
	padding-right: 0.08em;
}

.guests-result-count {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 16px;
	letter-spacing: 0.08em;
	color: rgba(255, 255, 255, 0.6);
}

.guests-empty {
	color: rgba(255, 255, 255, 0.7);
	padding: 60px 0;
}

.guests-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)); /* 24 件 = 4 × 6 */
	gap: 32px 20px;
}

.guests-card__link {
	display: block;
	color: #fff;
	text-decoration: none;
}

.guests-card__thumb {
	display: block;
	position: relative;
	aspect-ratio: 1 / 1; /* 高さを先に確保（遅延読み込みでもページの高さが変わらない＝LocomotiveScroll がずれない） */
	overflow: hidden;
	background: #1a1a1a;
}

.guests-card__thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top; /* 顔が切れにくいように上寄せ */
	transition: transform 0.4s ease;
}

a.guests-card__link:hover .guests-card__thumb img {
	transform: scale(1.04);
}

.guests-card__noimg {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	letter-spacing: 0.1em;
	color: rgba(255, 255, 255, 0.35);
}

.guests-card__body {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding-top: 10px;
}

.guests-card__name {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.45;
	word-break: break-word;
}

/* 写真なし＋リンクありのカードだけ（写真つきはポップアップを開くので付けない。2026-10-09） */
a.guests-card__link:not(.guests-card__link--pop) .guests-card__name::after {
	/* ↗ 外部リンク。前に改行しない空白（U+00A0）を置き、矢印だけが次の行に落ちないようにする */
	content: "\00a0\2197";
	font-weight: 400;
	color: #fbcb15;
}

a.guests-card__link:hover .guests-card__name {
	color: #fbcb15;
}

.guests-card__date {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 14px;
	letter-spacing: 0.06em;
	color: #fbcb15;
}

.guests-pager {
	padding-top: 80px;
}

/* ---------- 写真のポップアップ（2026-10-09） ----------
   ブラウザ標準の dialog を画面いっぱいに広げ、中央に「クロップなしの画像＋名前・来店日＋リンクボタン」。
   画像は縦横比そのまま、画面に収まる最大サイズ（一覧のような正方形の切り抜きはしない） */
html.guests-lb-open {
	overflow: hidden;
}

.guests-lb {
	position: fixed;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	max-height: none;
	margin: 0;
	padding: 0;
	border: 0;
	background: rgba(8, 8, 8, 0.94);
	color: #fff;
	overflow: hidden;
}

.guests-lb::backdrop {
	background: transparent; /* 暗幕は dialog 自体の背景で出す */
}

.guests-lb[open] {
	display: block;
	animation: guests-lb-in 0.2s ease-out;
}

@keyframes guests-lb-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.guests-lb__stage {
	position: relative;
	width: 100%;
	height: 100%;
	box-sizing: border-box;
	padding: 64px 96px 32px;
	display: flex;
	align-items: center;
	justify-content: center;
}

.guests-lb__figure {
	margin: 0;
	display: flex;
	flex-direction: column;
	align-items: stretch;
	max-width: 100%;
}

.guests-lb__imgbox {
	display: flex;
	justify-content: center;
}

.guests-lb__img {
	display: block;
	width: auto;
	height: auto;
	max-width: min(calc(100vw - 192px), 1600px);
	max-height: calc(100vh - 200px);
	max-height: calc(100dvh - 200px);
	object-fit: contain;
	background: #1a1a1a;
	transition: opacity 0.2s;
}

.guests-lb__imgbox.is-loading .guests-lb__img {
	opacity: 0.35;
}

.guests-lb__caption {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 32px;
	flex-wrap: wrap;
	padding-top: 18px;
}

.guests-lb__text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.guests-lb__name {
	font-size: 20px;
	font-weight: 700;
	line-height: 1.4;
	word-break: break-word;
}

.guests-lb__date {
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 16px;
	letter-spacing: 0.06em;
	color: #fbcb15;
}

/* リンクボタン: テーマの黄の斜めボタン（見出しと同じ傾き）＋下にリンク先のドメイン */
.guests-lb__link {
	display: inline-flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
	color: #111;
	text-decoration: none;
	flex: 0 0 auto;
}

.guests-lb__link[hidden] {
	display: none;
}

.guests-lb__link-box {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	padding: 10px 24px 10px 26px;
	background: #fbcb15;
	color: #111;
	font-family: "Antonio", "Bebas Neue", Arial, sans-serif;
	font-size: 18px;
	font-weight: 700;
	letter-spacing: 0.1em;
	line-height: 1;
	transform: skewX(-12deg);
	transition: background-color 0.2s;
}

.guests-lb__link-arrow {
	font-family: Arial, sans-serif;
	font-weight: 400;
}

.guests-lb__link:hover .guests-lb__link-box,
.guests-lb__link:focus-visible .guests-lb__link-box {
	background: #fff;
}

.guests-lb__link-host {
	font-size: 12px;
	letter-spacing: 0.04em;
	color: rgba(255, 255, 255, 0.55);
}

.guests-lb__link-host:empty {
	display: none;
}

/* 閉じる（右上の ×） */
.guests-lb__close {
	position: absolute;
	top: 14px;
	right: 14px;
	width: 48px;
	height: 48px;
	padding: 0;
	background: transparent;
	border: 0;
	cursor: pointer;
	z-index: 2;
}

.guests-lb__close span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 26px;
	height: 2px;
	background: #fff;
	transition: background-color 0.2s;
}

.guests-lb__close span:first-child {
	transform: translate(-50%, -50%) rotate(45deg);
}

.guests-lb__close span:last-child {
	transform: translate(-50%, -50%) rotate(-45deg);
}

.guests-lb__close:hover span,
.guests-lb__close:focus-visible span {
	background: #fbcb15;
}

/* 前後（左右の丸ボタン。矢印は絞り込みの下向き矢印を回して使う） */
.guests-lb__nav {
	position: absolute;
	top: 50%;
	width: 52px;
	height: 52px;
	margin-top: -26px;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(0, 0, 0, 0.4);
	border: 1px solid rgba(255, 255, 255, 0.3);
	border-radius: 50%;
	color: #fff;
	cursor: pointer;
	z-index: 2;
	transition: color 0.2s, border-color 0.2s;
}

.guests-lb__nav[hidden] {
	display: none;
}

.guests-lb__nav svg {
	width: 20px;
	height: 20px;
}

.guests-lb__nav--prev {
	left: 20px;
}

.guests-lb__nav--prev svg {
	transform: rotate(90deg);
}

.guests-lb__nav--next {
	right: 20px;
}

.guests-lb__nav--next svg {
	transform: rotate(-90deg);
}

.guests-lb__nav:hover,
.guests-lb__nav:focus-visible {
	color: #fbcb15;
	border-color: #fbcb15;
}

.guests-lb :focus-visible {
	outline: 2px solid #fbcb15;
	outline-offset: 3px;
}

.guests-lb__link:focus-visible {
	outline: none; /* ボタン側の色変化で示す */
}

@media (prefers-reduced-motion: reduce) {
	.guests-lb[open] {
		animation: none;
	}
}

/* ---------- レスポンシブ ---------- */
/* 大きい画面では列を増やしてカードを大きくしすぎない（2026-09-20）。
   画像は srcset で大きいサイズも選べる。page-guests.php の sizes と境目をそろえること
   ※ 24 件／ページのため 5 列のときだけ最後の行が 4 件になる */
@media (min-width: 1440px) {
	.guests-grid {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}
}

@media (min-width: 1800px) {
	.guests-grid {
		grid-template-columns: repeat(6, minmax(0, 1fr)); /* 24 件 = 6 × 4 */
	}
}

@media (max-width: 1200px) {
	.guests-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr)); /* 24 件 = 3 × 8 */
	}
}

@media (max-width: 1024px) {
	.guests-layout {
		grid-template-columns: 180px minmax(0, 1fr);
		gap: 32px;
	}
}

@media (max-width: 768px) {
	.guests__inner {
		padding-top: 32px;
		padding-bottom: 100px;
	}

	.guests-layout {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}

	.guests-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr)); /* 24 件 = 2 × 12 */
		gap: 24px 14px;
	}

	.guests-filter-toggle {
		/* 検索欄と見分けがつくように、枠線ではなく塗り＋左に赤の縦線の「ボタン」にする（2026-09-20） */
		display: flex;
		align-items: center;
		justify-content: space-between;
		width: 100%;
		background: rgba(255, 255, 255, 0.08);
		color: #fff;
		border: 0;
		border-left: 4px solid var(--secondary, #d7000f);
		padding: 12px 14px;
		font-size: 14px;
		font-weight: 700;
		cursor: pointer;
	}

	.guests-filter-toggle svg {
		transition: transform 0.2s;
	}

	/* JS が動くときだけ閉じる。JS なしでは開いたまま */
	.guests-side.is-js .guests-filter {
		display: none;
		padding-top: 20px;
	}

	.guests-side.is-js.is-open .guests-filter {
		display: block;
	}

	.guests-side.is-open .guests-filter-toggle {
		color: #fbcb15;
	}

	.guests-side.is-open .guests-filter-toggle svg {
		transform: rotate(180deg);
	}

	.guests-card__name {
		font-size: 14px;
	}

	.guests-head__inner {
		padding-top: 110px;
	}

	.guests-head__row {
		padding-bottom: 24px;
	}

	.guests-head__ja {
		margin-top: 16px;
		font-size: 13px;
	}

	/* ポップアップ: 画像を画面幅いっぱいに。前後ボタンは小さくして画像の左右端に重ねる */
	.guests-lb__stage {
		padding: 64px 0 24px;
	}

	.guests-lb__img {
		max-width: 100vw;
		max-height: calc(100vh - 230px);
		max-height: calc(100dvh - 230px);
	}

	.guests-lb__caption {
		padding: 14px 16px 0;
		flex-direction: column;
		align-items: stretch;
	}

	.guests-lb__name {
		font-size: 17px;
	}

	.guests-lb__link {
		align-items: flex-start;
		padding-left: 4px; /* 斜めにした左下の角が切れないように */
	}

	.guests-lb__close {
		top: 8px;
		right: 8px;
	}

	.guests-lb__nav {
		width: 40px;
		height: 40px;
		margin-top: -60px; /* 下の文字の分だけ上げて、画像の中央あたりに */
		background: rgba(0, 0, 0, 0.55);
	}

	.guests-lb__nav--prev {
		left: 8px;
	}

	.guests-lb__nav--next {
		right: 8px;
	}
}
