@charset "utf-8";

/* ── 변수 스코프를 .cal-wrapper로 격리 (전역 :root 충돌 방지) ── */
  .cal-wrapper {
    --navy: #1a2d5a;
    --navy-mid: #2b4080;
    --accent-blue: #4a6fdc;
    --highlight-yellow: #fff0c2;
    --highlight-yellow-border: #f5c842;
    --highlight-pink: #ffa4a4;
    --highlight-pink-border: #e87878;
    --highlight-pink-dark: #f87171;
    --highlight-blue-light: #dde6f7;
    --highlight-blue-dark: #8897b5;
    --today-bg: #3b5fc0;
    --gray-50: #f8f9fc;
    --gray-100: #edf0f7;
    --gray-300: #c5cde0;
    --gray-500: #7a86a1;
    --gray-700: #3d4b6b;
    --red: #e05555;
    --blue-sat: #3b6de8;
    --white: #ffffff;
    --radius: 14px;
    --shadow: 0 4px 20px rgba(26,45,90,0.10);
    --font-main: 'DM Sans', 'Noto Sans KR', sans-serif;
  }
 
  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

 
  /* ── 캘린더 컨테이너 ── */
  .cal-wrapper {
    max-width: 1000px;
    margin: 0 auto;
  }
 
  .cal-header {
    text-align: center;
    margin-bottom: 28px;
  }
  .cal-header h1 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--navy);
    letter-spacing: -0.02em;
  }
  .cal-header p {
    font-size: 0.85rem;
    color: var(--gray-500);
    margin-top: 4px;
  }
 
  /* ── 캘린더 그리드 (PC: 가로, 모바일: 세로) ── */
  .cal-grid {
    display: flex;
    flex-direction: row;
    gap: 20px;
    align-items: flex-start;
  }
 
  .cal-month {
    flex: 1;
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--gray-100);
    min-width: 0;
  }
 
  /* ── 월 헤더 ── */
  .cal-month-header {
    background-color: #002445;
    color: var(--white);
    text-align: center;
    padding: 18px 16px 16px;
    position: relative;
    overflow: hidden;
  }
  
  .cal-month-header h2 {
    font-size: 1.7rem;
    font-weight: 700;
    position: relative;
    letter-spacing: -0.01em;
  }
 
  /* ── 요일 헤더 ── */
  .cal-dow-row {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: var(--gray-100);
    border-bottom: 1px solid var(--gray-300);
  }
  .cal-dow {
    text-align: center;
    padding: 9px 4px;
    font-size: 1.2rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--gray-500);
  }
  .cal-dow.sun { color: var(--red); }
  .cal-dow.sat { color: var(--blue-sat); }
 
  /* ── 날짜 그리드 ── */
  .cal-body {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    padding: 10px 8px 14px;
    gap: 2px 0;
  }
 
  .cal-day {
    position: relative;
    aspect-ratio: 1/0.8;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.82rem;
    font-weight: 400;
    color: var(--gray-700);
    border-radius: 8px;
    transition: background 0.15s;
    cursor: default;
    min-height: 36px;
  }
  .cal-day.empty { pointer-events: none; }
 
  .cal-day.sun .day-num { color: var(--red); font-weight: 500; }
  .cal-day.sat .day-num { color: var(--blue-sat); font-weight: 500; }
 
  .day-num {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1;
    position: relative;
    font-weight: 500;
    font-size: 1.7rem;
  }
  
  
  /* ── day-bg stretch ── */
  .day-bg {
    position: absolute;
    top: 4px; bottom: 4px;
    left: 0; right: 0;
  }
 
  /* ── 하이라이트 공통 ── */
 
  /* 범위형(range) 공통: day-bg 테두리·배경 */
  [class*="hl-"] .day-bg {
    background: var(--hl-bg);
    /* border-top: 2px solid var(--hl-border);
    border-bottom: 2px solid var(--hl-border); */
  }
  
[class*="hl-"].range-start  .day-bg { border-radius: 50px 0 0 50px; }
[class*="hl-"].range-end    .day-bg { border-radius: 0 50px 50px 0; }
[class*="hl-"].range-single .day-bg { border-radius: 50px; }

.day-point {
  position: absolute;
  top: 8px; bottom: 8px;
  left: 5px; right: 5px;
  border-radius: 50px;
  background: var(--hl-point);
}

.day-point .day-bg { border-radius: 50px; }               /* 기본: 단독 */
.day-point.point-end .day-bg { border-radius: 0 50px 50px 0; }      /* 왼쪽이 배경과 연결 */
.day-point.point-start .day-bg { border-radius: 50px 0 0 50px; }      /* 오른쪽이 배경과 연결 */
 
  /* 단일 강조형(point) 공통: day-num 원형 뱃지 */
.cal-day.hl-pink-dark .day-num,
.cal-day.hl-blue-point .day-num,
.cal-day.hl-yellow-point .day-num {
  background: transparent;
  color: var(--white) !important;
  font-weight: 700;
  border-radius: 0;
  position: relative;
}
 
 
  /* ── 하이라이트 색상 (타입별 변수만 선언) ── */
 
  /* yellow (원서접수 등) */
  .cal-day.hl-yellow {
    --hl-bg: var(--highlight-yellow);
    /* --hl-border: var(--highlight-yellow-border); */
  }
 
  /* pink (수강신청 등) */
  .cal-day.hl-pink {
    --hl-bg: var(--highlight-pink);
   /*  --hl-border: var(--highlight-pink-border); */
  }
 
  /* blue-range (기본등록금 등) */
  .cal-day.hl-blue-range {
    --hl-bg: var(--highlight-blue-light);
    /* --hl-border: var(--highlight-blue-dark); */
  }
 
  /* 포인트 컬러 모음 */
  .cal-day.hl-pink-dark  { --hl-point: var(--highlight-pink-dark); }
  .cal-day.hl-blue-point { --hl-point: var(--today-bg); }
  .cal-day.hl-yellow-point { --hl-point: var(--highlight-yellow-border); }

  /* ── 범례 ── */
  .cal-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    margin-top: 20px;
    padding: 18px 24px;
    background: var(--white);
    border-radius: var(--radius);
    /* box-shadow: var(--shadow);
    border: 1px solid var(--gray-100); */
  }
  .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.5rem;
    color: var(--gray-700);
    font-weight: 500;
  }
  .legend-chip {
    width: 30px;
    height: 22px;
    border-radius: 11px;
    display: inline-block;
  }
  .legend-chip.yellow     { background: var(--highlight-yellow); border: 2px solid var(--highlight-yellow-border); }
  .legend-chip.yellow-point { background: var(--highlight-yellow-border); }
  .legend-chip.pink       { background: var(--highlight-pink);   /* border: 2px solid var(--highlight-pink-border); */ }
  .legend-chip.pink-dark  { background: var(--highlight-pink-dark); }
  .legend-chip.blue-point { background: var(--today-bg); }
  .legend-chip.navy-point { background: var(--navy); }
  .legend-chip.blue-range { background: var(--highlight-blue-light); border: 2px solid var(--highlight-blue-dark); }
 
  /* ── 반응형 ── */
  @media (max-width: 768px) {
    /* body { padding: 16px 12px 40px; } */
    .cal-wrapper { max-width: 550px; }
    .cal-grid { flex-direction: column; gap: 16px; }
    .cal-month { width: 100%; }
    .cal-legend { gap: 10px 16px; }
  }