/**
 * 説明会・イベントページのレスポンシブ配置だけを管理する。
 *
 * 日程カード、カレンダー、体験内容などの基底デザインは各機能CSSへ置き、
 * このファイルでは画面幅に応じた列数・余白・並び順のみを変更する。
 * 基底値の恒常的な上書きを避け、ブレークポイントの責務を追跡しやすくする。
 */

/**
 * 1.0 1160px以下：カレンダーと次回開催カードの縮小
 *
 * デスクトップ構造を維持したまま列幅と日付セルを縮め、タブレットへ移行する前の中間幅を吸収する。
 */

@media (max-width: 1160px) {
	.next-event__card {
		grid-template-columns: 170px minmax(0, 1fr) 175px;
	}

	.calendar-grid {
		grid-auto-rows: 112px;
		gap: 10px;
	}

	.calendar-day {
		height: 100%;
		min-height: 0;
		padding: 10px;
	}

}

/**
 * 2.0 980px以下：主要セクションの1カラム化
 *
 * 次回開催、イベント種別、会場写真を縦方向へ再配置し、コンテンツの読み順を優先する。
 */

@media (max-width: 980px) {
	.next-event__card {
		grid-template-columns: 155px 1fr;
	}

	.next-event__actions {
		grid-column: 1 / 3;
		padding: 24px 30px;
		flex-direction: row;
		border-top: 1px solid var(--line);
		border-left: 0;
	}

	.next-event__actions .btn {
		width: auto;
		min-width: 180px;
	}

	.schedule-layout {
		grid-template-columns: 1fr;
		gap: 35px;
	}

	.schedule-intro {
		position: static;
		text-align: center;
	}

	.schedule-intro .accent-line {
		margin-inline: auto;
	}

	.schedule-tabs {
		justify-content: center;
	}

	.schedule-calendar-head {
		align-items: center;
		flex-direction: column;
		text-align: center;
	}

	.event-type-card {
		grid-template-columns: minmax(230px, 36%) minmax(0, 1fr);
	}

	.event-type-card__body {
		padding-inline: 30px;
	}

	.event-experience__grid {
		grid-template-columns: 1fr;
		gap: 68px;
	}

	.space-gallery {
		grid-template-rows: repeat(2, 190px);
	}

	.event-notes ul {
		width: 100%;
		grid-template-columns: repeat(2, 1fr);
	}
}

/**
 * 3.0 760px以下：スマートフォン用の情報配置
 *
 * カレンダーの代わりにモバイル一覧を使用し、見出し・CTA・プログラムを中央基準へ揃える。
 */

@media (max-width: 760px) {
	.online-briefing-banner {
		grid-template-columns: 48px minmax(0, 1fr);
		gap: 16px;
		justify-items: center;
		padding: 20px;
	}

	.online-briefing-banner__icon {
		width: 48px;
		height: 48px;
	}

	.online-briefing-banner__copy h3 {
		font-size: 20px;
	}

	.online-briefing-banner > .btn {
		grid-column: 1 / -1;
		width: 100%;
	}

	.next-event,
	.event-schedule,
	.event-types,
	.event-experience,
	.join-flow {
		padding-block: 72px;
	}

	.next-event__card {
		grid-template-columns: 1fr;
	}

	.next-event__date {
		min-height: 132px;
		padding: 18px 18px 14px;
		display: flex;
		align-items: center;
		justify-content: center;
		gap: 12px;
	}

	.next-event__date span,
	.next-event__date strong,
	.next-event__date small {
		display: block;
		margin: 0;
		line-height: 1;
	}

	.next-event__date span {
		font-size: 48px;
	}

	.next-event__date strong {
		font-size: 56px;
	}

	.next-event__date small {
		position: relative;
		top: 2px;
		letter-spacing: 0.12em;
	}

	.next-event__content {
		padding: 30px 25px;
	}

	.next-event__content h3 {
		white-space: nowrap;
		font-size: clamp(23px, 6.2vw, 30px);
		letter-spacing: 0.04em;
		line-height: 1.45;
	}

	.next-event__topline {
		align-items: flex-start;
	}

	.next-event__meta {
		display: grid;
	}

	.next-event__actions {
		grid-column: auto;
		flex-direction: column;
		padding: 24px;
	}

	.next-event__actions .btn {
		width: 100%;
		min-width: 0;
	}

	.schedule-calendar-wrap {
		padding: 22px 18px 18px;
	}

	.calendar-grid {
		display: none;
	}

	.event-mobile-list {
		display: block;
	}

	.schedule-calendar-head__note {
		white-space: normal;
	}

	.event-modal {
		padding: 16px;
	}

	.event-modal__dialog {
		padding: 26px 20px 20px;
		border-radius: 18px;
	}

	.event-detail-card {
		padding: 20px;
	}

	.event-detail-card h4 {
		font-size: 24px;
	}

	.event-detail-card__meta {
		grid-template-columns: 1fr;
	}

	.event-type-card {
		display: block;
		min-height: 0;
	}

	.event-type-card__image {
		min-height: 0;
		aspect-ratio: 16 / 9;
		border-right: 0;
		border-bottom: 1px solid rgba(239, 120, 188, 0.95);
	}

	.event-type-card__body {
		padding: 28px 24px 26px;
	}

	.event-type-card__heading {
		align-items: flex-start;
		flex-wrap: wrap;
		gap: 12px 14px;
	}

	.event-type-card__heading .eyebrow {
		width: 100%;
		margin-left: 68px;
	}

	.space-gallery {
		grid-template-columns: 1fr 1fr;
		grid-template-rows: 240px 130px;
	}

	.space-gallery__main {
		grid-column: 1 / 3;
		grid-row: 1;
	}

	.join-flow {
		padding-block: 72px;
	}

	.join-flow > .container {
		padding: 46px 24px 36px;
		border-radius: 24px;
	}

	.join-flow .events-section-head {
		margin-bottom: 36px;
	}

	.join-flow__list {
		grid-template-columns: 1fr;
		gap: 26px;
	}

	.join-flow__step {
		min-height: 0;
		padding: 26px 22px 24px;
	}

	.join-flow__step:not(:last-child)::after {
		top: auto;
		right: auto;
		bottom: -20px;
		left: 50%;
		border-top: 14px solid #ef78bc;
		border-right: 11px solid transparent;
		border-bottom: 0;
		border-left: 11px solid transparent;
		transform: translateX(-50%);
	}

	.join-flow__step:hover:not(:last-child)::after {
		transform: translate(-50%, 4px);
	}

	.join-flow__icon {
		width: 84px;
		height: 84px;
		margin-bottom: 20px;
	}

	.join-flow__icon::after {
		inset: 8px;
	}

	.join-flow__icon svg {
		width: 34px;
		height: 34px;
	}

	.join-flow__number {
		font-size: 24px;
	}

	.join-flow h3 {
		min-height: 0;
		margin-top: 12px;
		font-size: 18px;
	}

	.join-flow p {
		margin-top: 16px;
	}

	.event-notes {
		padding: 56px 0 70px;
	}

	.event-notes__panel {
		gap: 26px;
		padding: 32px 24px 26px;
		border-radius: 22px;
	}

	.event-notes h2 {
		font-size: 24px;
	}

	.event-notes__head .accent-line {
		margin-top: 16px;
	}

	.event-notes ul {
		grid-template-columns: 1fr;
	}

	.event-notes li {
		min-height: 104px;
		grid-template-columns: 46px minmax(0, 1fr);
		gap: 14px;
		padding: 18px;
	}

	.event-notes__icon {
		width: 46px;
		height: 46px;
	}

	.event-notes__icon .material-symbols-outlined {
		font-size: 25px;
	}

	.event-notes li h3 {
		font-size: 16px;
	}

	.event-notes li p {
		font-size: 11px;
	}

}

/**
 * 4.0 430px以下：小型端末の余白・文字サイズ補正
 *
 * 操作領域を狭めすぎず、横方向にはみ出す要素だけを追加で縮小する。
 */

@media (max-width: 430px) {
	.next-event__date {
		min-height: 120px;
		padding: 16px 16px 12px;
		gap: 8px;
	}

	.next-event__date span {
		font-size: 38px;
	}

	.next-event__date strong {
		font-size: 50px;
	}

	.next-event__date small {
		top: 1px;
		font-size: 14px;
	}

	.next-event__content h3 {
		font-size: clamp(22px, 6vw, 26px);
		letter-spacing: 0.03em;
	}

	.schedule-tabs {
		gap: 0;
	}

	.schedule-tabs button {
		min-width: 68px;
		font-size: 16px;
	}

	.event-mobile-item {
		grid-template-columns: 54px minmax(0, 1fr);
		padding: 16px 14px;
	}

	.event-mobile-item__right {
		grid-column: 2;
		align-items: flex-start;
		flex-direction: row;
		flex-wrap: wrap;
	}

	.event-mobile-item__date strong {
		font-size: 26px;
	}

	.event-mobile-item__title {
		font-size: 15px;
	}

	.join-flow > .container {
		padding-inline: 18px;
	}

	.join-flow__step {
		padding-inline: 18px;
	}

	.join-flow__icon {
		width: 76px;
		height: 76px;
	}
}

/* 動きを抑える設定では、装飾アニメーションを無効化する。 */

@media (prefers-reduced-motion: reduce) {
	.event-type-card,
	.event-type-card__image img,
	.calendar-day__summary,
	.join-flow__step,
	.join-flow__icon,
	.join-flow__icon::before {
		transition: none;
	}
}

@media (max-width: 760px) {
	/*
	 * スマートフォンでは説明会バナーとプログラム一覧の構造を1列へ切り替える。
	 * 文字と見出し線の中央寄せはmobile-content-layout.cssへ集約する。
	 */

	.online-briefing-banner > .btn,
	.space-copy {
		margin-right: auto;
		margin-left: auto;
	}

	.program-list li {
		grid-template-columns: 1fr;
		gap: 12px;
		justify-items: center;
	}

	.program-list li > span {
		display: block;
	}
}

@media (max-width: 430px) {
	/* 可変のイベント名が375px前後でカード幅を超えないよう、見出しだけ自然折返しを許可する。 */
	.next-event__content h3 {
		white-space: normal;
	}
}
