/* ==========================================================
   p-event｜イベント情報（TOP／アーカイブ共通）
   Figma「06_イベント情報」「イベント一覧（デザイン案）」に合わせた実装
   ブレークポイント：〜1023（SP・TB／2段レイアウト）／1024〜（PC／横一列）
   ========================================================== */

.p-event {
	--ev-green: var(--color-color-brand-primary);
	--ev-green-dk: #3d8f55;
	--ev-green-pale: #e6f3e4;
	--ev-green-line: #cfe5c8;
	--ev-orange: var(--color-color-brand-secondary);
	--ev-orange-dk: #d9822f;
	--ev-orange-pale: #fff3e6;
	--ev-miyama-bg: #fdf0da;
	--ev-miyama: #b97a16;
	--ev-teal: #5e9ba8;
	--ev-purple: #9c7bb5;
	--ev-sat: #4a8fc4;
	--ev-sat-bg: #e4eff8;
	--ev-sun: #d9645a;
	--ev-sun-bg: #fbe7e4;
	--ev-ink: var(--color-color-text-main);
	--ev-ink-sub: var(--color-color-text-mute);
	--ev-body: #5a4d42;
	--ev-line: var(--color-color-border-default);

	padding: 0 20px;
	color: var(--ev-ink);
	text-align: left;
}

.p-event__inner {
	max-width: 1180px;
	margin-inline: auto;
}

/* ---------- 見出し ---------- */
.p-event__head {
	margin-bottom: 22px;
	text-align: center;
}

.p-event__en {
	color: var(--ev-green);
}

.p-event__title {
	color: var(--ev-ink);
}

.p-event__lead {
	margin-top: 16px;
	color: var(--ev-ink-sub);
	font-size: 14px;
	line-height: 1.7;
	text-align: left;
}

/* ---------- 絞り込み ---------- */
.p-event__filters {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 20px;
}

.p-event__tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.p-event__tab {
	flex: none;
	height: 44px;
	padding: 0 28px;
	border: 1.5px solid #a9d6b4;
	border-radius: 22px;
	background: #fff;
	box-shadow: 0 3px 0 rgba(79, 174, 103, 0.16);
	color: var(--ev-ink);
	font: inherit;
	font-size: 13px;
	font-weight: 700;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s;
}

.p-event__tab[aria-pressed="true"] {
	border-color: var(--ev-green);
	background: var(--ev-green);
	box-shadow: 0 3px 0 rgba(62, 140, 83, 0.45);
	color: #fff;
}

.p-event__chips-row {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.p-event__chips-wrap {
	position: relative;
}

.p-event__chips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.p-event__chip {
	flex: none;
	padding: 7px 14px;
	border: 1.5px solid var(--ev-line);
	border-radius: 999px;
	background: #fff;
	color: var(--ev-ink-sub);
	font: inherit;
	font-size: 13px;
	line-height: normal;
	white-space: nowrap;
	cursor: pointer;
}

.p-event__chip[aria-pressed="true"] {
	border-color: var(--ev-orange);
	background: var(--ev-orange-pale);
	color: var(--ev-orange-dk);
	font-weight: 700;
}

.p-event__divider {
	display: none;
	flex: none;
	align-self: center;
	width: 1.5px;
	height: 24px;
	background: #d9d4c7;
}

.p-event__switch {
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ev-ink-sub);
	font: inherit;
	font-size: 13px;
	cursor: pointer;
}

.p-event__switch-track {
	position: relative;
	flex: none;
	width: 40px;
	height: 22px;
	border-radius: 11px;
	background: #d9d4c7;
	transition: background-color 0.2s;
}

.p-event__switch-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #fff;
	transition: transform 0.2s;
}

.p-event__switch[aria-checked="true"] .p-event__switch-track {
	background: var(--ev-green);
}

.p-event__switch[aria-checked="true"] .p-event__switch-track::after {
	transform: translateX(18px);
}

.p-event__switch[aria-checked="true"] .p-event__switch-label {
	color: var(--ev-green-dk);
	font-weight: 700;
}

.p-event__tab:focus-visible,
.p-event__chip:focus-visible,
.p-event__switch:focus-visible,
.p-event__toggle:focus-visible,
.p-event__reserve:focus-visible {
	outline: 3px solid var(--ev-orange);
	outline-offset: 2px;
}

/* ---------- カード ---------- */
.p-event__card {
	padding: 24px 12px 16px 16px;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 4px 14px rgba(61, 89, 51, 0.08);
}

.p-event__list {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

/* ---------- 月 ---------- */
.p-event__month-head {
	display: flex;
	align-items: baseline;
	gap: 10px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--ev-green);
	font-weight: 400;
	white-space: nowrap;
}

.p-event__month-num {
	color: var(--ev-green);
	font-size: 22px;
	font-weight: 800;
	line-height: normal;
}

.p-event__month-sub {
	color: var(--ev-ink-sub);
	font-size: 12px;
}

.p-event__rows {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* ---------- 行（〜1023：日付｜本文＋時間・種別｜予約する） ---------- */
.p-event__row {
	border-bottom: 1px dashed var(--ev-green-line);
}

.p-event__link {
	display: grid;
	grid-template-columns: 40px minmax(0, 1fr) auto;
	grid-template-areas:
		"date body reserve"
		"date meta reserve";
	gap: 6px 12px;
	align-items: center;
	padding: 16px 0;
}

.p-event__date {
	grid-area: date;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	color: var(--ev-ink);
}

.p-event__day {
	font-size: 26px;
	font-weight: 800;
	line-height: normal;
}

.p-event__week {
	display: inline-grid;
	place-items: center;
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #eef4ea;
	font-size: 12px;
	font-weight: 700;
	line-height: normal;
}

.p-event__date--sat .p-event__week {
	background: var(--ev-sat-bg);
	color: var(--ev-sat);
}

.p-event__date--sun .p-event__week {
	background: var(--ev-sun-bg);
	color: var(--ev-sun);
}

/* 同じ日付の2件目以降は日付を隠す（列は確保して揃える） */
.p-event__row--same .p-event__date {
	visibility: hidden;
}

.p-event__body {
	grid-area: body;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.p-event__school {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}

.p-event__area {
	flex: none;
	padding: 2px 7px;
	border-radius: 4px;
	background: var(--ev-green-pale);
	color: var(--ev-green-dk);
	font-size: 11px;
	font-weight: 700;
	line-height: normal;
}

.p-event__area--miyama {
	background: var(--ev-miyama-bg);
	color: var(--ev-miyama);
}

.p-event__school-name {
	color: var(--ev-ink);
	font-size: 16px;
	font-weight: 700;
	line-height: normal;
}

.p-event__resv {
	color: var(--ev-sun);
	font-size: 11px;
	font-weight: 700;
	line-height: normal;
}

/* イベント名＋開閉ボタン（開閉してもボタンの位置は動かさない） */
.p-event__title-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: flex-start;
	gap: 12px;
	width: 100%;
}

.p-event__name {
	flex: 1;
	min-width: 0;
	margin: 0;
	color: var(--ev-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: normal;
}

.p-event__canceled {
	display: inline-block;
	margin-right: 6px;
	padding: 1px 8px;
	border-radius: 4px;
	background: var(--ev-ink);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
}

.p-event__toggle {
	flex: none;
	padding: 0;
	border: 0;
	background: none;
	color: var(--ev-green);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: normal;
	white-space: nowrap;
	cursor: pointer;
}

/* ラベルの出し分け（SP「＋ 詳細」／PC「＋ 詳しく見る」、「－ 閉じる」は共通） */
.p-event__toggle-less {
	display: none;
}

.p-event__toggle[aria-expanded="true"] .p-event__toggle-more {
	display: none;
}

.p-event__toggle[aria-expanded="true"] .p-event__toggle-less {
	display: inline;
}

.p-event__toggle-label--pc {
	display: none;
}

@media (min-width: 768px) {
	.p-event__toggle-label--sp {
		display: none;
	}

	.p-event__toggle-label--pc {
		display: inline;
	}
}

/* ひとこと説明・詳細（トグルで開閉） */
.p-event__more-box {
	min-width: 0;
}

.p-event__summary {
	margin: 0;
	max-width: 100%;
	overflow: hidden;
	color: var(--ev-body);
	font-size: 13.5px;
	font-weight: 500;
	line-height: 1.8;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.p-event__detail {
	width: 100%;
	margin-top: 10px;
}

.p-event__detail[hidden] {
	display: none;
}

.p-event__items {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin: 0;
	padding: 14px 16px;
	border-radius: 8px;
	background: #f1f7ec;
}

.p-event__item {
	display: flex;
	gap: 12px;
	align-items: flex-start;
}

.p-event__item dt {
	flex: none;
	width: 44px;
	color: var(--ev-green-dk);
	font-size: 12px;
	font-weight: 700;
	line-height: 1.6;
}

.p-event__item dd {
	flex: 1;
	min-width: 0;
	margin: 0;
	color: var(--ev-ink);
	font-size: 13px;
	line-height: 1.6;
}

.p-event__row.is-open .p-event__summary {
	overflow: visible;
	text-overflow: clip;
	white-space: normal;
}

/* 時間・種別 */
.p-event__meta {
	grid-area: meta;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 10px;
}

.p-event__time {
	color: var(--ev-ink-sub);
	font-size: 13px;
	line-height: normal;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.p-event__type {
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--ev-green);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: normal;
	white-space: nowrap;
}

.p-event__type--garden { background: var(--ev-orange); }
.p-event__type--class  { background: var(--ev-teal); }
.p-event__type--visit  { background: var(--ev-purple); }

/* 予約する */
.p-event__reserve {
	grid-area: reserve;
	display: grid;
	place-items: center;
	width: 50px;
	height: 48px;
	border-radius: 12px;
	background: var(--ev-orange);
	box-shadow: 0 3px 0 var(--ev-orange-dk);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.25;
	text-align: center;
	text-decoration: none;
	transition: transform 0.15s, box-shadow 0.15s;
}

.p-event__reserve:hover {
	transform: translateY(2px);
	box-shadow: 0 1px 0 var(--ev-orange-dk);
}

.p-event__reserve--none {
	background: none;
	box-shadow: none;
	color: var(--ev-ink-sub);
	font-weight: 700;
	cursor: default;
}

.p-event__reserve--none:hover {
	transform: none;
	box-shadow: none;
}

/* 中止 */
.p-event__row--canceled .p-event__link {
	opacity: 0.55;
}

.p-event__row--canceled .p-event__school-name,
.p-event__row--canceled .p-event__time {
	text-decoration: line-through;
}

/* ---------- 空・注記・ボタン ---------- */
.p-event__empty {
	padding: 32px 0;
	color: var(--ev-ink-sub);
	text-align: center;
}

.p-event__note {
	margin: 24px 0 0;
	color: var(--ev-ink-sub);
	font-size: 12px;
	line-height: 1.7;
}

.p-event__more {
	display: flex;
	justify-content: center;
	margin-top: 32px;
}

/* ==========================================================
   768〜：タブレット
   ========================================================== */
@media (min-width: 768px) {
	.p-event {
		padding-inline: 40px;
	}

	.p-event__head {
		margin-bottom: 32px;
	}

	.p-event__lead {
		text-align: center;
	}

	.p-event__filters {
		align-items: center;
		gap: 16px;
		margin-bottom: 32px;
	}

	.p-event__tabs {
		gap: 16px;
	}

	.p-event__tab {
		flex: none;
		width: 240px;
		height: 60px;
		border-radius: 27px;
		font-size: 16px;
		box-shadow: 0 4px 0 rgba(79, 174, 103, 0.16);
	}

	.p-event__tab[aria-pressed="true"] {
		box-shadow: 0 4px 0 rgba(62, 140, 83, 0.45);
	}

	.p-event__chips-row {
		align-items: center;
		gap: 12px;
	}

	.p-event__chips {
		justify-content: center;
	}

	.p-event__switch {
		align-self: center;
	}

	.p-event__card {
		padding: 32px 32px 24px;
		border-radius: 20px;
	}

	.p-event__month-num {
		font-size: 26px;
	}

	.p-event__month-sub {
		font-size: 13px;
	}

	.p-event__link {
		grid-template-columns: 56px minmax(0, 1fr) auto;
		column-gap: 20px;
		padding: 20px 0;
	}

	.p-event__summary {
		font-size: 14px;
	}
}

/* ==========================================================
   1024〜：PC（日付｜時間｜本文｜種別｜予約する の横一列）
   ========================================================== */
@media (min-width: 1024px) {
	.p-event {
		padding-inline: 0;
	}

	.p-event__head {
		margin-bottom: 40px;
	}

	.p-event__lead {
		margin-top: 40px;
		font-size: 16px;
		line-height: 1.8;
	}

	.p-event__filters {
		margin-bottom: 40px;
	}

	.p-event__chips-row {
		flex-direction: row;
		justify-content: center;
		gap: 10px;
	}

	.p-event__chips {
		gap: 10px;
	}

	.p-event__chip {
		padding: 10px 20px;
		font-size: 15px;
	}

	.p-event__divider {
		display: block;
	}

	.p-event__switch {
		font-size: 15px;
	}

	.p-event__switch-track {
		width: 42px;
		height: 24px;
		border-radius: 12px;
	}

	.p-event__switch-track::after {
		width: 18px;
		height: 18px;
	}

	.p-event__card {
		padding: 40px 48px 24px;
		box-shadow: 0 6px 20px rgba(61, 89, 51, 0.08);
	}

	.p-event__list {
		gap: 44px;
	}

	.p-event__month-head {
		gap: 14px;
		padding-bottom: 14px;
	}

	.p-event__month-num {
		font-size: 30px;
	}

	.p-event__month-sub {
		font-size: 14px;
	}

	.p-event__link {
		grid-template-columns: 110px 170px minmax(0, 1fr) 150px 64px;
		grid-template-areas: "date time body type reserve";
		gap: 24px;
		padding: 22px 16px;
	}

	.p-event__date {
		flex-direction: row;
		justify-content: flex-start;
		gap: 10px;
	}

	.p-event__day {
		font-size: 36px;
	}

	.p-event__week {
		width: 30px;
		height: 30px;
		font-size: 14px;
	}

	.p-event__title-row {
		gap: 14px;
	}

	/* 時間・種別は本文と同じ行のセルに置く */
	.p-event__meta {
		display: contents;
	}

	.p-event__time {
		grid-area: time;
		font-size: 17px;
	}

	.p-event__type {
		grid-area: type;
		justify-self: start;
		padding: 6px 16px;
		font-size: 13px;
	}

	.p-event__area {
		padding: 3px 10px;
		font-size: 12px;
	}

	.p-event__school {
		gap: 12px;
	}

	.p-event__school-name {
		font-size: 21px;
	}

	.p-event__resv {
		font-size: 13px;
	}

	.p-event__name {
		font-size: 17px;
	}

	.p-event__summary {
		font-size: 15px;
	}

	.p-event__toggle {
		font-size: 13px;
	}

	.p-event__item dt {
		width: 56px;
		font-size: 13px;
	}

	.p-event__item dd {
		font-size: 14px;
	}

	.p-event__reserve {
		width: 64px;
		height: 56px;
		font-size: 13px;
	}

	.p-event__note {
		margin-top: 44px;
		font-size: 13px;
	}

	.p-event__more {
		margin-top: 48px;
	}
}

/* ---------- ページネーション（/event/） ---------- */
.p-event__card {
	scroll-margin-top: 110px;
}

.p-event__pager {
	margin-top: 32px;
}

.p-event__pager[hidden] {
	display: none;
}

.p-event__pager-list {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	align-items: center;
	gap: 6px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.p-event__page {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 1.5px solid #dde9d5;
	border-radius: 50%;
	background: #fff;
	color: var(--ev-ink-sub);
	font: inherit;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.p-event__page--dots {
	border-color: transparent;
	background: transparent;
	cursor: default;
}

.p-event__page:hover:not(:disabled):not(.is-current):not(.p-event__page--dots) {
	border-color: var(--ev-green);
	color: var(--ev-green);
}

.p-event__page.is-current {
	border-color: var(--ev-green);
	background: var(--ev-green);
	color: #fff;
	cursor: default;
}

.p-event__page:disabled {
	opacity: 0.4;
	cursor: not-allowed;
}

.p-event__page:focus-visible {
	outline: 3px solid var(--ev-orange);
	outline-offset: 2px;
}

@media (min-width: 768px) {
	.p-event__pager {
		margin-top: 40px;
	}

	.p-event__pager-list {
		gap: 12px;
	}

	.p-event__page {
		width: 48px;
		height: 48px;
		font-size: 14px;
		font-weight: 500;
	}

	.p-event__page.is-current {
		font-weight: 700;
	}
}

/* ---------- 各園紹介ページ内（園名の行なし） ---------- */
.p-event--single-school .p-event__name .p-event__resv {
	margin-left: 10px;
	vertical-align: 1px;
}

.school-event {
	background: var(--color-color-bg-light);
}

.school-event .p-event {
	padding: 0;
}

.school-event .p-event__more {
	margin-top: 40px;
}

@media (max-width: 767px) {
	.school-event .p-event__lead {
		text-align: left;
	}
}

/* ---------- テーマ調整 ---------- */
.p-event__more .btn {
	margin-inline: auto;
}

/* TOPのセクション内 */
.top-hint .p-event {
	padding: 0;
}

/* 一覧ページ：白い背景 */
.event-archive {
	padding: 56px 20px 80px;
	background: var(--color-color-bg-light);
}

.event-archive .p-event {
	padding: 0;
}

@media (min-width: 768px) {
	.event-archive {
		padding: 72px 40px 96px;
	}
}

@media (min-width: 1024px) {
	.event-archive {
		padding: 96px 40px 104px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.p-event__switch-track,
	.p-event__switch-track::after,
	.p-event__reserve {
		transition: none;
	}
}
