.calendar {
    width: 580px;
    height: 400px;
}
.calendar ol {
	list-style: none;
	margin:0;
	padding:0;
}

.calendar-modal {
    display: none; /* PC紐⑤뱶 */
    position: absolute;
    border: 1px solid #e5e5e5;
}

.calendar-modal .view {
    box-shadow: 1px 2px 3px #ddd;
}

.calendar-inner {
    position: relative;
    z-index: 1;
    -webkit-perspective: 1000;
    -moz-perspective: 1000;
    perspective: 1000;
    -webkit-transform: perspective(1000px);
    transform: perspective(1000px);
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.calendar-views {
    -webkit-transform-style: preserve-3d;
    transform-style: preserve-3d;
}

.calendar .view {
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: absolute;
    top: 0;
    left: 0;
    background: #fff;
    *overflow: hidden;
    -webkit-transition: .6s;
    transition: .6s;
}

.calendar-d .view-month,
.calendar-m .view-date {
    -webkit-transform: rotateY(180deg);
    transform: rotateY(180deg);
    visibility: hidden;
    z-index: 1;
}

.calendar-d .view-date,
.calendar-m .view-month {
    -webkit-transform: rotateY(0deg);
    transform: rotateY(0deg);
    visibility: visible;
    z-index: 2;
}

.calendar-ct,
.calendar-hd,
.calendar-views .week,
.calendar-views .days {
    overflow: hidden;
}

.calendar-views {
    width: 100%;
}

.calendar .view,
.calendar-display,
.calendar-arrow .prev,
.calendar .date-items li {
    float: left;
}

.calendar-arrow,
.calendar-arrow .next {
    float: right;
}

.calendar-arrow .prev {
	float: none;
	position: absolute; top:0; left:50%;
	z-index:99;
	margin-left:-80px;
	width:50px; height:50px;
	background:url('/images/sub/cal_prev.png') no-repeat left center;
	font-size: 0;
}
.calendar-arrow .next {
	float: none;
	position:absolute; top:0; right:50%;
	z-index:99;
	margin-right:-80px;
	width:50px; height:50px;
	background:url('/images/sub/cal_next.png') no-repeat right center;
	font-size: 0;
}

.calendar-arrow .fa{
	font-size: 20px;
}

.calendar-ct {
    height: 280px;
}

.calendar-hd {
	position: relative;
	margin:-10px 0 10px;
    padding: 10px 0;
    height: 50px;
    line-height: 30px;
	font-weight: 600;
}

.calendar-display {
	display:block;
	width:100%;
    font-size: 28px;
	text-align:center;
	letter-spacing:.5px;
	color:#17181a;
}

.view-month .calendar-hd {
    padding: 10px;
}

.calendar-arrow,
.calendar-display {
    color: #17181a;
}

/*.calendar li:nth-child(1), */
.calendar li:nth-child(8), 
.calendar li:nth-child(15), 
.calendar li:nth-child(22), 
.calendar li:nth-child(29), 
.calendar li:nth-child(36) 
{ color:#D50003; }

.calendar li[disabled] {
    color: #bbb;
}

.calendar li.old[disabled],
.calendar li.new[disabled] {
    color: #17181a;
}

.calendar-display .m,
.calendar-views .week,
.calendar-display:hover,
.calendar-arrow span:hover {
    color: #17181a;
}

.calendar-views .days .old,
.calendar-views .days .new {
    color: #ccc
}

.calendar-arrow span,
.calendar-views .days li[data-calendar-day],
.calendar-views .view-month li[data-calendar-month] {
    cursor: pointer;
}

.calendar li[disabled] {
    cursor: not-allowed;
}

.calendar-arrow {
    width: 50px;
    margin-right: 10px;
}

.calendar-arrow span {
    font: 500 26px sans-serif;
}

.calendar ol li {
    position: relative;
    float: left;
    text-align: center;
    border-radius: 50%;
	font-size: 16px;
	color: #333436;
}

.calendar .week li,
.calendar .days li {
    width: 40px;
    height: 40px;
    line-height: 40px;
}

.calendar .month-items li {
    width: 70px;
    height: 70px;
    line-height: 70px;
}

.calendar .days li[data-calendar-day]:hover,
.calendar .view-month li[data-calendar-month]:hover {
	border-radius:2px;
    background: #eee;
}


.calendar .calendar-views .now {
	position: relative; z-index:2;
    color: #fff;
    background: none !important;
}
.calendar .calendar-views .now:after {
	content:'';
	position:absolute; top:0; left:0;
	z-index:-1;
	width:100%; height:100%;
	border-radius:2px;
    background: #f1aa33 !important;
}


.calendar .calendar-views .selected {
	position: relative; z-index: 2;
    color: #fff;
    background: none !important;
	border-radius:2px;
}
.calendar .calendar-views .selected:after {
	content:'';
	position:absolute; top:0; left:0;
	z-index:-1;
	width:100%; height:100%;
	border-radius:2px;
    background: #3057ac !important;
}

.calendar .calendar-views .dot {
    position: absolute;
    left: 50%;
    bottom: 4px;
    margin-left: -2px;
    width: 4px;
    height: 4px;
    background: #af422f;
    border-radius: 50%;
}

.calendar-views .now .dot {
    background: #fff;
}

.calendar .date-items {
    width: 300%;
    margin-left: -100%;
}

.calendar-label {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 2;
    padding: 5px 10px;
    line-height: 22px;
    color: #fff;
    background: #000;
    border-radius: 3px;
    opacity: .7;
    filter: alpha(opacity=70);
}

.calendar-label i {
    display: none;
    position: absolute;
    left: 50%;
    bottom: -12px;
    width: 0;
    height: 0;
    margin-left: -3px;
    border: 6px solid transparent;
    border-top-color: #000;
}

/* 오늘 날짜 스타일 재정의 */
.calendar .calendar-views .today {
    background-color: #f1aa33 !important;
    color: #fff !important;
    border-radius: 5px;
}

/* 선택된 날짜 스타일 재정의 */
.calendar .calendar-views .selected {
    background-color: #3057ac !important;
    color: #fff !important;
    border-radius: 5px;
}

/* 가상 요소 사용 안함 */
.calendar .calendar-views .today:after,
.calendar .calendar-views .selected:after,
.calendar .calendar-views .now:after {
    display: none;
}

/* 이벤트가 있는 날짜 스타일 - 단일화 */
.has-event {
    position: relative !important;
    color: #e74c3c !important;
    border: 2px solid #4b7bec !important;
    border-radius: 5px !important;
    background-color: rgba(75, 123, 236, 0.1) !important;
    box-sizing: border-box !important;
}

/* 이벤트 마커 - 가상요소 사용 */
.has-event::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background-color: #e74c3c;
    border-radius: 50%;
    z-index: 1;
}

/* 오늘 날짜이면서 이벤트가 있는 경우 */
.calendar .calendar-views .today.has-event {
    background-color: #f1aa33 !important;
    border-color: #e74c3c !important;
}

/* 선택된 날짜이면서 이벤트가 있는 경우 */
.calendar .calendar-views .selected.has-event {
    background-color: #3057ac !important;
    border-color: #e74c3c !important;
}

/* 선택된 날짜와 오늘 날짜의 이벤트 마커 색상 */
.calendar .calendar-views .today.has-event::after,
.calendar .calendar-views .selected.has-event::after {
    background-color: #fff;
}

/* 모바일 화면에서 달력 표시 개선 */
@media (max-width: 768px) {
    .calendar {
      width: 100% !important;
    }
    
    .calendar-inner, .calendar .view {
      width: 100% !important;
    }
    
    .calendar ol li,
    .calendar .week li,
    .calendar .days li {
      width: 14.28% !important;
      box-sizing: border-box !important;
      overflow: visible !important;
    }
}

/* 모바일 화면에서 달력 표시 개선 */
@media (max-width: 768px) {
    /* 기존 코드 유지 */
    .calendar {
      width: 100% !important;
    }
    
    .calendar-inner, .calendar .view {
      width: 100% !important;
    }
    
    .calendar ol li,
    .calendar .week li,
    .calendar .days li {
      width: 14.28% !important;
      box-sizing: border-box !important;
      overflow: visible !important;
    }
    
    /* 여기서부터 추가할 코드 */
    .calendar-ct {
      height: auto !important;
      min-height: 280px !important;
    }
    
    .days {
      display: flex !important;
      flex-wrap: wrap !important;
      width: 100% !important;
    }
    
    .days li {
      height: 40px !important;
      line-height: 40px !important;
    }
}