/* ===================================================
   1. 박스 모델 방어 코드 (Padding으로 인한 너비 초과 방지)
=================================================== */
.fc-calendar *, 
.fc-calendar *::before, 
.fc-calendar *::after {
	box-sizing: border-box;
}
.custom-content-reveal{display: none;}
.fc-calendar-container {
	position: relative;
	height: auto;
	width: auto;
	padding: 10px 0px;
}

.fc-calendar {
	width: 100%;
	height: 100%;
}

.fc-calendar .fc-head {
	height: 30px;
	line-height: 30px;
	color: #333;
	font-weight: bold;
	font-size: 14px !important;
	display: flex; /* Flexbox 적용 */
}

.fc-calendar .fc-body {
	position: relative;
	width: 100%;
	height: calc(100% - 30px);
}

.fc-calendar .fc-row {
	width: 100%;
	display: flex; /* Flexbox 적용 */
}

/* ===================================================
   2. 행 높이 설정 (특수 공백 완벽 제거)
=================================================== */
.fc-four-rows .fc-row {
	height: 25%;
	max-height: 58px;
	display: flex;
}

.fc-five-rows .fc-row {
	height: 20%;
	max-height: 58px;
	display: flex;
}

.fc-six-rows .fc-row {
	height: 16.66%;
	max-height: 58px;
	height: calc(100% / 6);
	display: flex;
}

/* ===================================================
   3. 날짜 및 요일 칸 너비 (Flexbox 기준 유연한 7등분)
=================================================== */
.fc-calendar .fc-row > div,
.fc-calendar .fc-head > div {
	flex: 1 1 0; /* 화면이 아무리 작아도 정확히 7등분 비율 유지 */
	width: calc(100% / 7);
	aspect-ratio: 1 / 1; /* 가로세로 1:1 비율 유지 */
	position: relative;
	/* min-width: 47px;  <-- 제거됨 (떨어짐 현상의 주원인) */
}

@media screen and (max-width: 400px) {
	.fc-calendar .fc-row > div,
	.fc-calendar .fc-head > div {
		height: auto; /* 비율에 맞춰 자동 조정 */
	}
}

.fc-calendar .fc-row > div {
	padding: 4px;
	overflow: hidden;
	position: relative;
	cursor: pointer;
}

.fc-calendar .fc-head > div {
	text-align: center;
}

.fc-calendar .fc-row > div > span.fc-date {
	position: absolute;
	width: 30px;
	height: 20px;
	font-size: 14px;
	line-height: 20px;
	font-weight: 400;
	bottom: 5px;
	right: 5px;
	text-align: center;
	top: 50%;
	left: 50%;
	margin: -10px 0 0 -15px;
	color: #222222;
	pointer-events: none;
}

.fc-calendar .fc-row > div time, 
.fc-calendar .fc-row > div note,
.fc-calendar .fc-row > div > span.fc-weekday {
	display: none;
}

.fc-calendar .fc-row > div.fc-today {
	background: #fff4c3;
	border-radius: 50%;
}

.fc-calendar .fc-row > div.fc-today > span.fc-date {
	color: #fff;
	text-shadow: 0 1px 1px rgba(0, 0, 0, 0.1);
}

.fc-calendar .fc-row > div.fc-out {
	opacity: 0.6;
}

.fc-calendar .fc-row > div:empty {
	background: transparent;
	cursor: default;
}

.fc-calendar .fc-row > div > span.fc-emptydate {
	color: #ccc;
}

.fc-calendar .fc-row > div:last-child,
.fc-calendar .fc-head > div:last-child {
	border-right: none;
}

.fc-calendar .fc-row:last-child {
	border-bottom: none;
}

/* Custom calendar elements */
.custom-calendar-wrap {
	position: relative;
	overflow: hidden;
}

.custom-inner:before,
.custom-inner:after {
	content: '';
	width: 99%;
	height: 50%;
	position: absolute;
	bottom: -4px;
	left: 0.5%;
	z-index: -1;
}

.custom-inner:after {
	width: 98%;
	bottom: -7px;
	left: 1%;
	z-index: -2;
}

.custom-header {
	padding: 5px 10px 10px 10px;
	height: 70px;
	position: relative;
}

.custom-header h2,
.custom-header h3 {
	text-align: center;
}

.custom-header h2 {
	color: #333;
	font-weight: 100;
	font-size: 20px;
	margin-top: 0px;
}

.custom-header h3 {
	font-size: 16px;
	font-weight: 700;
	color: #b7bbc2;
}

.custom-header nav span {
	position: absolute;
	top: 0px;
	width: 30px;
	height: 30px;
	color: transparent;
	cursor: pointer;
	margin: 0 1px;
	font-size: 16px;
	line-height: 30px;
	user-select: none;
}

.custom-header nav span:first-child {
	left: 10px;
	top: 3px;
}

.custom-header nav span:last-child {
	right: 10px;
	top: 3px;
}

.custom-header nav span:before {
	color: #aaa;
	position: absolute;
	text-align: center;
	width: 100%;
}

.custom-header nav span.custom-prev:before {
	content: '\203A';
	font-size: 25px;
	line-height: 1;
	font-weight: 100;
	font-family: Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
	transform: rotate(180deg);
}

.custom-header nav span.custom-next:before {
	content: '\203A';
	font-size: 25px;
	line-height: 1;
	font-weight: 100;
	font-family: Arial, sans-serif;
	-webkit-font-smoothing: antialiased;
}

.custom-header nav span:hover:before {
	color: #495468;
}

@media screen and (max-width: 400px) {
	.fc-calendar-container {
		height: 300px;
	}
	.fc-calendar .fc-row > div > span.fc-date {
		font-size: 14px;
	}
}