/* 말레이시아 공휴일 달력 — calendar.php + 사이드바 위젯 */

#container:has(> .hm_cal_page) > h2#container_title {
  display: none !important;
}

.hm_cal_page {
  width: 100%;
  margin: 0;
  padding: 0 0 2.5rem;
  box-sizing: border-box;
}

.hm_cal_shell {
  background: #fff;
  border-radius: 10px;
  border: 1px solid #e3e3e3;
  padding: 1.875rem 2.125rem 2.375rem;
}

.hm_cal_head {
  margin-bottom: 1.75rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid #eee;
}

.hm_cal_title {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #1a1a1a;
  line-height: 1.25;
}

.hm_cal_sub {
  margin: 0;
  font-size: 0.8125rem;
  color: #94a3b8;
  line-height: 1.45;
}

.hm_cal_nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.25rem;
  margin-bottom: 1.75rem;
  position: relative;
}

.hm_cal_nav_center {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

/* 오늘로 이동 버튼 */
.hm_cal_nav_today_btn {
  position: absolute;
  right: 0;
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid #010066;
  background: #fff;
  color: #010066;
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease;
}
.hm_cal_nav_today_btn:hover {
  background: #010066;
  color: #fff;
  text-decoration: none;
}

/* 오늘 날짜 셀 */
.hm_cal_cell.hm_cal_day--today {
  border: 2px solid #010066 !important;
  box-shadow: 0 0 0 2px rgba(1, 0, 102, 0.1);
}
.hm_cal_cell.hm_cal_day--today:not(.hm_cal_day--holiday):not(.hm_cal_day--sun):not(.hm_cal_day--sat) {
  background: #eef0ff;
}
.hm_cal_cell.hm_cal_day--today .hm_cal_num {
  color: #010066 !important;
}

/* "오늘" 배지 */
.hm_cal_today_badge {
  display: inline-block;
  padding: 1px 5px;
  background: #010066;
  color: #fff;
  font-size: 0.52rem;
  font-weight: 800;
  border-radius: 3px;
  line-height: 1.5;
  letter-spacing: 0.02em;
}

/* 다음 공휴일: 하늘색 박스 최대 4건 · 2열 그리드 */
.hm_cal_next_hol_block {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid #eee;
}

.hm_cal_next_sec_title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.75rem;
}

.hm_cal_next_head_meta {
  font-size: 0.82rem;
  font-weight: 600;
  color: #94a3b8;
}

.hm_cal_next_hol_grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  align-items: stretch;
}

.hm_cal_next_hol_badge--grid-filler {
  visibility: hidden;
  pointer-events: none;
  padding: 11px 14px;
  border: 1px solid transparent !important;
  background: transparent !important;
  min-height: 0;
}

/* 이달 공휴일 목록(.hm_cal_li)과 동일 패딩·라운드, 3열: 날짜 | 제목 | 남은 일수 */
.hm_cal_next_hol_badge {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 11px 14px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  background: #f0f9ff;
  border: 1px solid #bae6fd;
  border-radius: 10px;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.hm_cal_next_hol_badge:hover {
  background: #e0f2fe;
  border-color: #7dd3fc;
}

.hm_cal_next_hol_badge--grid-filler:hover {
  background: transparent !important;
  border-color: transparent !important;
}

.hm_cal_next_hol_date {
  flex: 0 0 auto;
  font-size: 0.93rem;
  font-weight: 700;
  color: #374151;
}

.hm_cal_next_hol_name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}

.hm_cal_next_hol_eta {
  flex: 0 0 auto;
  font-size: 0.93rem;
  font-weight: 700;
  color: #0369a1;
}

.hm_cal_next_hol_badge--today {
  background: #fef9c3;
  border-color: #fde047;
}

.hm_cal_next_hol_badge--today:hover {
  background: #fef08a;
  border-color: #eab308;
}

.hm_cal_next_hol_badge--today .hm_cal_next_hol_date {
  color: #78350f;
}

.hm_cal_next_hol_badge--today .hm_cal_next_hol_name {
  color: #92400e;
}

.hm_cal_next_hol_badge--today .hm_cal_next_hol_eta {
  color: #b45309;
}

.hm_cal_next_hol_badge--soon {
  background: #fff7ed;
  border-color: #fdba74;
}

.hm_cal_next_hol_badge--soon:hover {
  background: #ffedd5;
  border-color: #fb923c;
}

.hm_cal_next_hol_badge--soon .hm_cal_next_hol_date {
  color: #9a3412;
}

.hm_cal_next_hol_badge--soon .hm_cal_next_hol_name {
  color: #c2410c;
}

.hm_cal_next_hol_badge--soon .hm_cal_next_hol_eta {
  color: #c2410c;
}

/* ----- 연간 공휴일 한눈에 보기 (calendar.php) ----- */
.hm_cal_nav_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e3e3e3;
  background: #fff;
  color: #334155;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hm_cal_nav_btn:hover {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.hm_cal_nav_label {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
  min-width: 9rem;
  text-align: center;
}

.hm_cal_grid_wrap {
  margin-bottom: 2.5rem;
}

.hm_cal_weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin-bottom: 6px;
}

.hm_cal_wd {
  text-align: center;
  font-size: 0.875rem;
  font-weight: 700;
  color: #374151;
  padding: 8px 4px;
  box-sizing: border-box;
  border-radius: 10px;
  border: none;
  background: #e6e6e6;
}

.hm_cal_wd--sun {
  color: #dc2626;
  background: #ffe8e8;
}

.hm_cal_wd--sat {
  color: #2563eb;
  background: #dee8fc;
}

.hm_cal_cells {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.hm_cal_row {
  --hm-cal-gap: 4px;
  /* 연휴 띠 안쪽 세로선: 일반 셀 테두리(#fbcfe8 등)보다 더 연하게 */
  --hm-cal-bridge-sep: rgba(15, 23, 42, 0.07);
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--hm-cal-gap);
}

.hm_cal_cell {
  min-height: 4.25rem;
  border-radius: 10px;
  border: 1px solid #b0b7c3;
  background: #efefef;
  padding: 6px 6px 8px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.hm_cal_cell--empty {
  min-height: 4.25rem;
  background: #f8fafc;
  border: none;
  border-radius: 10px;
  box-sizing: border-box;
}

.hm_cal_num {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  line-height: 1.2;
}

.hm_cal_day--sun .hm_cal_num {
  color: #dc2626;
}

.hm_cal_day--sat .hm_cal_num {
  color: #2563eb;
}

/* 일요일 · 토요일 셀 배경 — 공휴일 규칙보다 앞에 위치해야 override 가능 */
.hm_cal_cell.hm_cal_day--sun {
  background: #fff0f0;
  border-color: #f87171;
}

.hm_cal_cell.hm_cal_day--sat {
  background: #e8f0ff;
  border-color: #60a5fa;
}

/* 실제 공휴일 당일(일반) */
.hm_cal_day--holiday.hm_cal_day--ph {
  background: #fde8f4;
  border-color: #e879a8;
}

.hm_cal_day--holiday.hm_cal_day--ph .hm_cal_num {
  color: #b91c1c;
}

/* 대체 휴일: 배경은 일반 공휴일과 동일 · 라벨 앞 점으로만 구분 */
.hm_cal_day--holiday.hm_cal_day--replacement,
.hm_cal_cell.hm-day--replacement.hm_cal_day--holiday {
  background: #fde8f4;
  border-color: #e879a8;
}

.hm_cal_day--holiday.hm_cal_day--replacement .hm_cal_num,
.hm_cal_cell.hm-day--replacement .hm_cal_num {
  color: #b91c1c;
}

/* 대체 휴일 라벨 앞 점 제거 */
.hm_cal_day--holiday.hm_cal_day--replacement .hm_cal_hl::before {
  display: none;
}

/* Observed / 보임일 */
.hm_cal_day--holiday.hm_cal_day--observed,
.hm_cal_cell.hm-day--observed.hm_cal_day--holiday {
  background: #dbeafe;
  border-color: #93c5fd;
}

.hm_cal_day--holiday.hm_cal_day--observed .hm_cal_num {
  color: #1d4ed8;
}

/* 연속 연휴 띠: 간격 메우기 + 안쪽만 연한 세로선(한 줄) · 끝만 둥근 모서리 */
.hm_cal_cell.hm_cal_day--bridge-join {
  margin-left: calc(-1 * var(--hm-cal-gap));
  position: relative;
  z-index: 1;
  border-left: none;
}

.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-start {
  border-radius: 10px 0 0 10px;
  border-right-color: var(--hm-cal-bridge-sep);
}

.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-mid {
  border-radius: 0;
  border-right-color: var(--hm-cal-bridge-sep);
}

/* 연휴 띠 안쪽 세로선 — 공휴일 종류별 테두리 색 통일 */
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--ph.hm_cal_day--bridge-start,
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--replacement.hm_cal_day--bridge-start {
  border-right-color: #f0abcb;
}
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--ph.hm_cal_day--bridge-mid,
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--replacement.hm_cal_day--bridge-mid {
  border-right-color: #f0abcb;
}
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--observed.hm_cal_day--bridge-start {
  border-right-color: #93c5fd;
}
.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--observed.hm_cal_day--bridge-mid {
  border-right-color: #93c5fd;
}

.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-end {
  border-radius: 0 10px 10px 0;
}

.hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-single {
  border-radius: 10px;
}

/*
 * 주가 바뀌는 지점(토→일): 같은 행 안 연휴용 연한 세로선이
 * 토요일 오른쪽·일요일 왼쪽 격자 바깥선까지 없애는 것처럼 보이는 문제 보정
 */
.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--ph:nth-child(7n),
.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--replacement:nth-child(7n) {
  border-right-color: #f0abcb;
}

.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--observed:nth-child(7n) {
  border-right-color: #60a5fa;
}

.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-join.hm_cal_day--ph:nth-child(7n + 1),
.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-join.hm_cal_day--replacement:nth-child(7n + 1) {
  border-left: 1px solid #e879a8;
}

.hm_cal_row .hm_cal_cell.hm_cal_day--holiday.hm_cal_day--bridge-join.hm_cal_day--observed:nth-child(7n + 1) {
  border-left: 1px solid #60a5fa;
}

.hm_cal_hl {
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.25;
  color: #be185d;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  max-width: 100%;
}

.hm_cal_day--holiday.hm_cal_day--observed .hm_cal_hl {
  color: #1d4ed8;
}

.hm_cal_list_sec {
  margin-top: 0.5rem;
  padding-top: 1.75rem;
  border-top: 1px solid #eee;
}

.hm_cal_list_title {
  margin: 0 0 1rem;
  font-size: 1.1rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.02em;
}

.hm_cal_list_empty {
  margin: 0;
  font-size: 0.95rem;
  color: #94a3b8;
}

.hm_cal_list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hm_cal_li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  padding: 11px 14px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #e3e3e3;
  min-width: 0;
  transition: border-color 0.18s ease, background-color 0.18s ease;
}

.hm_cal_li:not(.hm_cal_li--grid-filler):hover {
  background: #f1f5f9;
  border-color: #cbd5e1;
}

/* 2열 그리드에서 항목이 홀수 개일 때 마지막 행 우측 칸 자리만 확보(레이아웃·칸 크기 통일) */
.hm_cal_li--grid-filler {
  visibility: hidden;
  padding: 11px 14px;
  border: 1px solid transparent;
  background: transparent;
  pointer-events: none;
  min-height: 0;
}

.hm_cal_li_date {
  flex: 0 0 auto;
  font-size: 0.93rem;
  font-weight: 700;
  color: #374151;
}

.hm_cal_li_date .hm_cal_li_wd {
  white-space: nowrap;
}

.hm_cal_li_name {
  flex: 1 1 auto;
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.45;
}

/* ----- 사이드바 미니 위젯 (날씨 위젯과 동일 헤더·본문, 좌 6 : 우 4) ----- */
.hm_cal_wd {
  box-sizing: border-box;
  max-width: 400px;
  width: 100%;
  margin: 12px 0;
  padding: 0;
  background: #fff;
  border: 1px solid #e3e3e3;
  border-radius: 12px;
  overflow: visible;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  isolation: isolate;
}

.hm_cal_wd * {
  box-sizing: border-box;
}

.hm_cal_wd a {
  color: inherit;
  text-decoration: none;
}

.hm_cal_wd a:hover {
  text-decoration: underline;
}

.hm_cal_wd__head {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #eee;
  border-radius: 12px 12px 0 0;
  overflow: hidden;
}

.hm_cal_wd__title_row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.hm_cal_wd__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #111;
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.hm_cal_wd__link_more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.6875rem;
  font-weight: 600;
  color: #333;
  background: #f3f4f6;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  text-decoration: none !important;
  white-space: nowrap;
  flex-shrink: 0;
}

.hm_cal_wd__link_more:hover {
  background: #e5e7eb;
  text-decoration: none !important;
}

.hm_cal_wd__body {
  display: flex;
  gap: 10px;
  padding: 10px 12px 14px;
  align-items: flex-start;
  border-radius: 0 0 12px 12px;
  overflow: visible;
}

.hm_cal_wd__left {
  flex: 6 1 0;
  min-width: 0;
}

.hm_cal_wd__right {
  flex: 4 1 0;
  min-width: 0;
  min-height: 0;
  padding-left: 6px;
  border-left: 1px solid #f0f0f0;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  text-align: left;
  overflow: hidden;
}

.hm_cal_wd__upcoming_h {
  margin: 6px 0 13px;
  width: 100%;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  line-height: 1.25;
  white-space: nowrap;
}

.hm_cal_wd__upcoming_list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  flex: 1 1 0;
  min-height: 0;
  overflow-y: auto;
  /* 스크롤바 얇게 */
  scrollbar-width: thin;
  scrollbar-color: #e2e8f0 transparent;
}
.hm_cal_wd__upcoming_list::-webkit-scrollbar {
  width: 3px;
}
.hm_cal_wd__upcoming_list::-webkit-scrollbar-track {
  background: transparent;
}
.hm_cal_wd__upcoming_list::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 2px;
}

.hm_cal_wd__upcoming_li {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 7px 0;
  border-bottom: 1px dashed #e2e8f0;
}

.hm_cal_wd__upcoming_li:last-child {
  border-bottom: none;
}

.hm_cal_wd__upcoming_date {
  font-size: 0.75rem;
  font-weight: 600;
  color: #334155;
  line-height: 1.4;
  white-space: nowrap;
  display: flex;
  align-items: center;
  gap: 5px;
}

.hm_cal_wd__upcoming_eta {
  font-size: 0.65rem;
  font-weight: 600;
  color: #64748b;
  background: #f1f5f9;
  border-radius: 4px;
  padding: 1px 5px;
  white-space: nowrap;
  flex-shrink: 0;
}
.hm_cal_wd__upcoming_eta--today {
  color: #b91c1c;
  background: #fef2f2;
}
.hm_cal_wd__upcoming_eta--soon {
  color: #b45309;
  background: #fffbeb;
}

.hm_cal_wd__upcoming_name {
  font-size: 0.6875rem;
  font-weight: 500;
  color: #64748b;
  line-height: 1.4;
  word-break: keep-all;
  text-align: left;
}

.hm_cal_wd__upcoming_foot {
  margin: 10px 0 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.4;
  text-align: left;
  word-break: keep-all;
}

.hm_cal_wd__upcoming_empty {
  margin: 0;
  font-size: 0.6875rem;
  font-weight: 500;
  color: #94a3b8;
  line-height: 1.4;
  word-break: keep-all;
}

/* 테마에서 hm_side_card--calendar 에 주던 박스는 hm_cal_wd 단일 카드로 통일 */
body.hm-site .hm_sidebar_left .hm_side_card--calendar.hm_cal_wd {
  margin-top: 12px;
  padding: 0;
  background: transparent;
  border: none;
  border-radius: 0;
}

/* 이전/다음 달 네비게이션 행 */
.hm_cal_sw_nav_row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin: 0 0 8px;
}

.hm_cal_sw_ym {
  flex: 1;
  text-align: center;
  font-size: 0.85rem;
  font-weight: 700;
  color: #1f2937;
  margin: 0;
  white-space: nowrap;
}

.hm_cal_sw_nav_btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 1px solid #e3e3e3;
  border-radius: 6px;
  background: #fff;
  color: #374151;
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.hm_cal_sw_nav_btn:hover:not(:disabled) {
  background: #f0f1f3;
  border-color: #d1d5db;
  color: #010066;
}

.hm_cal_sw_nav_btn:disabled {
  opacity: 0.3;
  cursor: default;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget.hm_cal_wd {
  background: #111827;
  border-color: #293241;
  color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__head {
  border-bottom-color: #293241;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__title,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_ym,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_h {
  color: #e5e7eb;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn {
  background: #0f172a;
  border-color: #293241;
  color: #cbd5e1;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more:hover,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn:hover:not(:disabled) {
  background: #1f2937;
  border-color: #3b4454;
  color: #fff;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__right {
  border-left-color: #293241;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd {
  color: #94a3b8;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd--sun,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sun {
  color: #f87171;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd--sat,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sat {
  color: #60a5fa;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell {
  background: #1f2937;
  color: #cbd5e1;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell--empty {
  background: transparent;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sun {
  background: rgba(248, 113, 113, 0.14);
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sat {
  background: rgba(96, 165, 250, 0.14);
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm_cal_sw--today {
  background: rgba(124, 140, 255, 0.22) !important;
  color: #c7d2fe !important;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm_cal_sw--today::after {
  background: #4f5fd5;
  color: #fff;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--ph,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--replacement,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm-day--replacement.hm_cal_sw--holiday {
  background: rgba(236, 72, 153, 0.18);
  color: #f9a8d4;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--observed,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm-day--observed.hm_cal_sw--holiday {
  background: rgba(96, 165, 250, 0.18);
  color: #93c5fd;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_date {
  color: #cbd5e1;
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_eta {
  color: #94a3b8;
  background: rgba(255,255,255,0.07);
}
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_eta--today {
  color: #fca5a5;
  background: rgba(220,38,38,0.18);
}
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_eta--soon {
  color: #fcd34d;
  background: rgba(217,119,6,0.18);
}

html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_name,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_foot,
html[data-hm-theme="dark"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_empty {
  color: #94a3b8;
}

html[data-hm-theme-choice="light"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more {
  background: #f3f4f6 !important;
  border-color: #e5e7eb !important;
  color: #333 !important;
}

html[data-hm-theme-choice="light"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more:hover {
  background: #e5e7eb !important;
  border-color: #d1d5db !important;
  color: #111827 !important;
}

html[data-hm-theme-choice="light"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn {
  background: #fff !important;
  border-color: #e3e3e3 !important;
  color: #374151 !important;
}

html[data-hm-theme-choice="light"] body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn:hover:not(:disabled) {
  background: #f0f1f3 !important;
  border-color: #d1d5db !important;
  color: #010066 !important;
}

.hm_cal_sw_grid {
  width: 100%;
}

.hm_cal_sw_wdrow {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
  margin-bottom: 4px;
}

.hm_cal_sw_wd {
  text-align: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #6b7280;
}

.hm_cal_sw_wd--sun {
  color: #dc2626;
}

.hm_cal_sw_wd--sat {
  color: #2563eb;
}

.hm_cal_sw_row {
  --hm-sw-gap: 2px;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: var(--hm-sw-gap);
  margin-bottom: 2px;
}

.hm_cal_sw_cell {
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  min-height: 1.6rem;
  font-size: 0.68rem;
  font-weight: 700;
  color: #1f2937;
  border-radius: 4px;
  background: #efefef;
}

.hm_cal_sw_cell--empty {
  background: transparent;
}

.hm_cal_sw--sun {
  background: #fff0f0;
  color: #dc2626;
}

.hm_cal_sw--sat {
  background: #e8f0ff;
  color: #2563eb;
}

/* ── 오늘 날짜 하이라이트 ── */
.hm_cal_sw_cell.hm_cal_sw--today {
  font-weight: 900;
  color: #3b5bdb !important;
  background: #d8e2ff !important;
  outline: 1px solid #3b5bdb;
  outline-offset: -2px;
}
.hm_cal_sw_cell.hm_cal_sw--today::after {
  content: '오늘';
  position: absolute;
  bottom: calc(100% + 5px);
  left: 50%;
  transform: translateX(-50%);
  background: #3b5bdb;
  color: #fff;
  font-size: 0.65rem;
  padding: 2px 6px;
  border-radius: 4px;
  white-space: nowrap;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s;
  z-index: 10;
}
.hm_cal_sw_cell.hm_cal_sw--today:hover::after {
  opacity: 1;
}

.hm_cal_sw--holiday.hm_cal_sw--ph {
  background: #fde8f4;
  color: #9d174d;
}

.hm_cal_sw--holiday.hm_cal_sw--replacement,
.hm_cal_sw_cell.hm-day--replacement.hm_cal_sw--holiday {
  background: #fde8f4;
  color: #9d174d;
}

/* 미니달력 대체 휴일 점 제거 */
.hm_cal_sw_cell.hm-day--replacement.hm_cal_sw--holiday::before {
  display: none;
}

.hm_cal_sw--holiday.hm_cal_sw--observed,
.hm_cal_sw_cell.hm-day--observed.hm_cal_sw--holiday {
  background: #dbeafe;
  color: #1d4ed8;
}

.hm_cal_sw_cell.hm_cal_sw--bridge-join {
  margin-left: calc(-1 * var(--hm-sw-gap));
  position: relative;
  z-index: 1;
  border-left: none;
}

.hm_cal_sw_cell.hm_cal_sw--bridge-start {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.hm_cal_sw_cell.hm_cal_sw--bridge-mid {
  border-radius: 0;
}

.hm_cal_sw_cell.hm_cal_sw--bridge-end {
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}

/*
 * 커스텀 툴팁 — title 제거 후 data-tooltip + ::after 만 사용
 * (한글 세로 깨짐 방지: writing-mode·white-space·display 명시)
 */
.hm_cal_sw_cell.hm_cal_sw--holiday[data-tooltip],
.hm_cal_cell.hm_cal_day--holiday[data-tooltip] {
  position: relative;
  cursor: help;
  z-index: 1;
}

.hm_cal_sw_cell.hm_cal_sw--holiday[data-tooltip]:hover,
.hm_cal_cell.hm_cal_day--holiday[data-tooltip]:hover {
  z-index: 50;
}

/* 공통: 반투명 검정 + 흰 글씨, 한 줄 */
.hm_cal_sw_cell.hm_cal_sw--holiday[data-tooltip]:hover::after,
.hm_cal_cell.hm_cal_day--holiday[data-tooltip]:hover::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  transform: translateX(-50%);
  box-sizing: border-box;
  display: block;
  width: max-content;
  min-width: 120px;
  max-width: min(92vw, 420px);
  padding: 8px 12px;
  margin: 0;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: 0;
  color: #fff;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  direction: ltr;
  unicode-bidi: isolate;
  writing-mode: horizontal-tb;
  word-break: keep-all;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
  z-index: 100;
}

/* 미니 달력: 셀 바로 위 중앙 */
.hm_cal_sw_cell.hm_cal_sw--holiday[data-tooltip]:hover::after {
  bottom: calc(100% + 6px);
  font-size: 0.68rem;
  padding: 6px 10px;
  min-width: 100px;
  max-width: min(92vw, 300px);
}

/* 전체 달력: 셀 바로 위 중앙 (약간 여유) */
.hm_cal_cell.hm_cal_day--holiday[data-tooltip]:hover::after {
  bottom: calc(100% + 10px);
  font-size: 0.8125rem;
  padding: 9px 14px;
}

/* ----- 연간 공휴일 한눈에 보기 (calendar.php) ----- */
.hm_cal_year_sec {
  margin-top: 2.25rem;
  padding-top: 2rem;
  border-top: 1px solid #eee;
}

.hm_cal_year_card {
  background: #fafbfc;
  border: 1px solid #e3e3e3;
  border-radius: 10px;
  padding: 1.5rem 1.625rem 1.625rem;
}

.hm_cal_year_empty {
  margin: 0;
  padding-left: 15px;
  font-size: 0.9rem;
  color: #94a3b8;
}

.hm_cal_year_cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 2.75rem;
  align-items: start;
}

.hm_cal_year_col {
  list-style: none;
  margin: 0;
  padding: 0 0 0 15px;
}

.hm_cal_year_col--right {
  border-left: 1px solid #e8ecf1;
  padding-left: calc(2.75rem + 15px);
}

.hm_cal_year_li {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.85rem;
  margin: 0;
  padding: calc(0.85rem + 3px) 0.5rem calc(0.85rem + 3px) 0;
  border-bottom: 1px dashed #e2e8f0;
}

.hm_cal_year_li:last-child {
  border-bottom: none;
}

.hm_cal_year_time {
  flex: 0 0 auto;
  font-size: 0.875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  white-space: nowrap;
}

.hm_cal_year_mdm {
  font-weight: 700;
}

/* 월.일만 강조색 — 요일은 .hm_cal_year_wd 로 분리 */
.hm_cal_year_mdm--sun,
.hm_cal_year_mdm--weekday {
  color: #d32f2f;
}

.hm_cal_year_mdm--sat {
  color: #1565c0;
}

/* 괄호 안 요일: 중립 톤(평일 공휴일·주말 구분은 앞 날짜 색으로) */
.hm_cal_year_wd {
  font-weight: 600;
  color: #64748b;
}

.hm_cal_year_name {
  flex: 1 1 12rem;
  font-size: 0.9rem;
  font-weight: 500;
  line-height: 1.5;
  color: #1e293b;
}

@media (prefers-color-scheme: dark) {
  body:not(.hm-mobile) #hm_cal_sidebar_widget.hm_cal_wd {
    background: #111827;
    border-color: #293241;
    color: #e5e7eb;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__head {
    border-bottom-color: #293241;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__title,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_ym,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_h {
    color: #e5e7eb;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn {
    background: #0f172a;
    border-color: #293241;
    color: #cbd5e1;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__link_more:hover,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_nav_btn:hover:not(:disabled) {
    background: #1f2937;
    border-color: #3b4454;
    color: #fff;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__right {
    border-left-color: #293241;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd {
    color: #94a3b8;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd--sun,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sun {
    color: #f87171;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_wd--sat,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sat {
    color: #60a5fa;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell {
    background: #1f2937;
    color: #cbd5e1;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell--empty {
    background: transparent;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sun {
    background: rgba(248, 113, 113, 0.14);
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--sat {
    background: rgba(96, 165, 250, 0.14);
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm_cal_sw--today {
    background: rgba(124, 140, 255, 0.22) !important;
    color: #c7d2fe !important;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm_cal_sw--today::after {
    background: #4f5fd5;
    color: #fff;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--ph,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--replacement,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm-day--replacement.hm_cal_sw--holiday {
    background: rgba(236, 72, 153, 0.18);
    color: #f9a8d4;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw--holiday.hm_cal_sw--observed,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_sw_cell.hm-day--observed.hm_cal_sw--holiday {
    background: rgba(96, 165, 250, 0.18);
    color: #93c5fd;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_date {
    color: #cbd5e1;
  }

  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_name,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_foot,
  body:not(.hm-mobile) #hm_cal_sidebar_widget .hm_cal_wd__upcoming_empty {
    color: #94a3b8;
  }
}


