/* --- ベーススタイル --- */
body {
	font-family: 'Segoe UI', 'Hiragino Kaku Gothic ProN', Meiryo, sans-serif;
}

h2 {
	text-align: center;
	color: #004080;
	font-size: 1.6rem;
	margin-bottom: 1.5rem;
}

/* --- カレンダー全体 --- */
#calendar {
	margin: 0 auto;
	background: #ffffff;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
	padding: 1rem;
}

/* --- FullCalendar カスタマイズ --- */
.fc .fc-toolbar-title {
	font-size: 1.3rem;
	font-weight: bold;
	color: #003366;
}

.fc-toolbar {
	flex-wrap: wrap;
	justify-content: space-between;
	margin-bottom: 1rem;
}

/* 日付セル */
.fc-daygrid-day-number {
	font-weight: 500;
	font-size: 0.9rem;
}

/* 今日 */
.fc-daygrid-day.fc-day-today {
	background: #fff9cc !important;
	border-radius: 6px;
}

/* 過去日（今月内） */
.fc-daygrid-day.fc-this-month-past:not(.fc-day-today) {
	background: #f0f0f0;
	color: #999;
}

/* 土日 */
.fc-daygrid-day:not(.fc-day-today).fc-day-sat {
	background: #e6f2ff;
}

.fc-daygrid-day:not(.fc-day-today).fc-day-sun {
	background: #ffe6e6;
}

/* イベントラベル */
.fc-event {
	font-size: 0.8rem;
	padding: 2px 6px;
	border-radius: 4px;
	line-height: 1.4;
}

/* 背景イベント（祝日） */
.fc-event-bg {
	background-color: #fff3dd !important;
}

/* モバイル用レスポンシブ調整 */
@media (max-width: 768px) {
	#calendar {
		padding: 0.5rem;
	}

	.fc .fc-toolbar-title {
		font-size: 1.1rem;
	}

	.fc-event {
		font-size: 0.75rem;
	}

	/* 前後月 */
	.fc-daygrid-day.fc-outside-month {
		background: #e8e8e8;
		color: #bbb;
	}

	/* 土日（前後月） */
	.fc-daygrid-day.fc-outside-month.fc-day-sat {
		background: #d0e3f0;
	}

	.fc-daygrid-day.fc-outside-month.fc-day-sun {
		background: #f5d0d0;
	}
}


/* イベントの重なり数表示（"more"ボタン）を明瞭に */
.fc .fc-more-link {
	font-size: 0.75rem;
	color: #005580;
}

/* イベントセルの高さを増やす */
.fc-daygrid-day-frame {
	min-height: 90px;
	/* 調整可能 */
}

/* 祝日のテキストが数字と被らないよう、位置を調整 */
.fc-daygrid-day-bg .fc-event {
	top: 18px !important;
	left: 0;
	right: 0;
	padding-left: 4px;
	padding-right: 4px;
	z-index: 1;
	pointer-events: none;
	font-size: 0.75rem;
	font-weight: 500;
	color: #555;
	background-color: #fff0da !important;
	border: none;
}

/* 各日セルの枠を高くして、イベントが詰まらないようにする */
.fc-daygrid-day-frame {
	min-height: 100px;
	/* セルの最小高さをさらに拡大 */
}

/* イベントエリアが詰まらないように余白確保 */
.fc-daygrid-day-events {
	margin-top: 4px;
}

/* イベント要素自体も広く取る */
.fc-event {
	margin-bottom: 2px;
	line-height: 1.4;
	white-space: normal;
	overflow-wrap: break-word;
}

/* 多数イベント時でも折り返して表示しやすくする */
.fc-daygrid-event-harness {
	min-height: 18px;
}

/* 日付セルの高さを少し確保しつつ余白を詰める */
.fc-daygrid-day-frame {
	min-height: 80px;
	padding: 2px;
}

/* イベントラベルの表示をコンパクトに */
.fc-event {
	font-size: 0.75rem;
	line-height: 1.2;
	padding: 2px 4px;
	margin: 1px 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	border-radius: 3px;
}

/* イベントタイトル：縮小して複数件が収まるように */
.fc-daygrid-event {
  display: flex;
  flex-direction: column; /* ← 横並びから縦並びへ */
  align-items: start;
  gap: 0; /* ●とテキストの間に少し余白を追加（お好みで） */
  align-items: center;
  text-align: center;
  white-space: nowrap !important;
  overflow: hidden;
}

.fc-daygrid-event-dot {
  margin: 0;             /* デフォルトの余白を除去 */
  padding: 0;
}

.fc-event-time {
	display: none;
}

.fc-event-title {
	display: inline-block;
	text-align: center;
	font-size: 0.5rem;
	font-weight: 500;
	white-space: normal;
	overflow: hidden;
	text-overflow: ellipsis;
	padding: 0;
	margin: 0;
}

/* イベント全体の高さ・余白調整 */
.fc-daygrid-event-harness {
	margin-bottom: 0;
}
