/* ===== 이용자 페이지 (학생·학부모) =====
   랜딩(styles.css)의 브랜드 토큰(--purple, --lav 등)을 그대로 사용.
   색상 규칙: 공지 · 보강 영상 = 진한 보라(채움) / 수업·클리닉 일정 = 연한 보라 */

:root {
  --up-ok-bg: #e9f3ec;   --up-ok-tx: #557f66;   /* 출석 · A · O */
  --up-warn-bg: #f7f0e3; --up-warn-tx: #9c7f52; /* 지각 · B·C */
  --up-danger-bg: #faecec; --up-danger-tx: #c15c5c; /* 결석 · D · X (빨강 — 4단계 위계 통일) */
  --up-neutral-bg: #f0eef5; --up-neutral-tx: #9a97a8;
}

body.up { background: var(--lav); }

.up-shell {
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--lav);
}

/* ----- 헤더 (로고) ----- */
.up-header {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  text-align: center;
  /* 위아래 가장자리 크롭: 상단 -5% · 하단 -8% (헤더 높이 기준) */
  padding: 11px 16px 9px;
  border-bottom: 1px solid var(--line);
}
.up-logo { display: inline-flex; }
.up-logo-img { height: 40px; width: auto; display: block; }

/* ----- 개발용 임시 선택기 (로그인 대체) ----- */
.up-devbar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 16px 0;
}
.up-dev-label {
  font-size: 11px;
  color: var(--purple);
  background: var(--lav-2);
  padding: 3px 9px;
  border-radius: 999px;
}
.up-dev-select {
  font-family: inherit;
  font-size: 12.5px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
  cursor: pointer;
}
.up-dev-back { font-size: 12px; color: var(--muted); text-decoration: none; }
.up-dev-back:hover { color: var(--purple); }

.up-main { padding: 14px 16px 36px; }

/* ----- 자녀 선택 (학부모 모드) ----- */
.up-childbar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.up-childbar__label { font-size: 12px; color: var(--muted); margin-right: 2px; }
.up-child {
  font-family: inherit;
  font-size: 13px;
  color: var(--purple);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease, border-color 0.12s ease;
}
.up-child:hover { border-color: #ddd4ee; }
.up-child.is-active {
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  color: #fff;
  border-color: transparent;
}

/* 임시 선택기 optgroup */
.up-dev-select optgroup { font-size: 12px; }

/* ----- D-Day (한 줄) ----- */
.up-dday {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 6px 20px rgba(111, 95, 151, 0.07);
  padding: 11px 14px;
  margin-bottom: 12px;
  font-size: 12.5px;
  color: var(--ink);
}
.up-dday__flame { display: inline-flex; color: #d98b6a; }
.up-dday__item b { color: var(--purple); font-weight: 700; }
.up-dday__sep { color: var(--line); }

/* ----- 카드 공통 ----- */
.up-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 6px 22px rgba(111, 95, 151, 0.08);
  padding: 18px;
  margin-bottom: 14px;
}
.up-empty { text-align: center; color: var(--muted); font-size: 0.9rem; padding: 28px 12px; }

/* ----- 레포트 헤더 (최신·지난 공통 접기/펼치기) ----- */
.up-rhead {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  background: none; border: none; cursor: pointer;
  font-family: inherit; text-align: left; padding: 0;
}
.up-rhead__main { flex: 1; min-width: 0; }
.up-rhead__date { font-size: 13px; font-weight: 500; color: var(--ink); }
.up-rhead__cls { color: var(--muted); font-weight: 400; }
.up-rhead__summ { font-size: 11px; color: var(--muted); margin-top: 2px; }
.up-rhead__chev { display: inline-flex; color: var(--muted); flex-shrink: 0; transition: transform 0.2s ease; }
.up-rhead__chev.is-open { transform: rotate(180deg); }

/* 상단 최신 레포트 헤더 (항상 펼침 — 접기 없음) */
.up-report__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  margin-bottom: 14px;
}
.up-report__date { font-size: 15px; font-weight: 700; color: var(--ink); flex: 1; }
.up-report__cls { color: var(--muted); font-weight: 400; }

/* ===== 레포트 본문 재구성 (2026-08-13) =====
   ① 성적 격자 ② 공지+개별 안내 ③ 보강 영상 ④ 강의·자료 / 리뷰T 문항별(세그먼트) */

/* ① 성적 격자 — 있는 항목만 칸을 만들어 1~3칸 */
.up-kpi { display: grid; gap: 8px; margin-bottom: 14px; }
.up-kpi--1 { grid-template-columns: 1fr; }
.up-kpi--2 { grid-template-columns: repeat(2, 1fr); }
.up-kpi--3 { grid-template-columns: repeat(3, 1fr); }
.up-kpi__c {
  background: #fbfafd; border: 1px solid var(--line); border-radius: 13px;
  padding: 11px 8px 9px; text-align: center; min-width: 0;
}
.up-kpi__k { font-size: 10.5px; color: var(--muted); letter-spacing: 0.03em; }
.up-kpi__v {
  /* 줄 높이를 px로 고정(=21 × 1.25) — 좁은 화면에서 긴 값('재시통과')만 글자를 줄일 때
     (upFitKpiValues) 줄 높이까지 같이 줄면 아래의 근거줄·반 평균이 위로 딸려 올라가
     옆 칸과 어긋난다. 고정해 두면 글자만 작아지고 칸 안의 줄 위치는 그대로 유지됨 */
  font-size: 21px; font-weight: 700; line-height: 26.25px; margin-top: 2px;
  color: var(--ink); font-variant-numeric: tabular-nums;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.up-kpi__s { font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.up-kpi__avg {
  font-size: 10px; color: var(--muted); margin-top: 6px; padding-top: 6px;
  border-top: 1px dashed var(--line); font-variant-numeric: tabular-nums;
}
/* 색은 4단계 위계 그대로 — 값 글자에만 (칸 배경은 중립) */
.up-kpi__c--ok .up-kpi__v { color: var(--up-ok-tx); }
.up-kpi__c--warn .up-kpi__v { color: var(--up-warn-tx); }
.up-kpi__c--mid .up-kpi__v { color: #bd6b2e; }
.up-kpi__c--danger .up-kpi__v { color: var(--up-danger-tx); }

/* ② 공지 + 개별 안내 (한 카드) */
.up-guide { background: var(--lav); border-radius: 12px; padding: 11px 13px; margin-bottom: 14px; }
.up-guide__k {
  display: flex; align-items: center; gap: 4px;
  font-size: 11.5px; font-weight: 700; color: var(--purple); margin-bottom: 3px;
}
.up-guide__t { font-size: 13px; line-height: 1.5; color: var(--ink); white-space: pre-wrap; }
.up-guide__div { height: 1px; background: #e6dff5; margin: 10px 0; }

/* ④ 세그먼트 — 접는 게 아니라 바꿔 끼움 */
.up-seg {
  display: flex; gap: 3px; padding: 3px;
  /* 위 블록(보강 영상)과 붙지 않게. 앞 블록에 아래 여백이 있으면 margin이 합쳐지지 않고 큰 쪽만 적용됨 */
  margin: 16px 0 11px;
  background: var(--up-neutral-bg); border-radius: 10px;
}
.up-seg__b {
  flex: 1; border: 0; border-radius: 8px; background: transparent; color: var(--muted);
  font: inherit; font-size: 12.5px; font-weight: 600; padding: 7px 4px; cursor: pointer;
  font-family: inherit;
}
.up-seg__b.is-on { background: #fff; color: var(--purple); box-shadow: 0 1px 4px rgba(111, 95, 151, 0.14); }
.up-seg__b:focus-visible { outline: 2px solid var(--purple-2); outline-offset: 1px; }
.up-panel[hidden] { display: none; }
/* 세그먼트 없이 강의·자료만 나오는 경우(리뷰T 없음·결석) — 위 블록과의 간격을 같게 */
.up-panel-solo { margin-top: 16px; }
.up-empty-line { font-size: 12.5px; color: var(--muted); padding: 2px 0; }

/* 강의·자료 (라벨 + 값) */
.up-facts { display: grid; grid-template-columns: 42px 1fr; gap: 5px 12px; margin: 0; }
.up-facts dt { font-size: 11px; color: var(--muted); line-height: 1.7; }
.up-facts dd { margin: 0; font-size: 13px; color: var(--ink); white-space: pre-wrap; min-width: 0; }

/* 리뷰T 문항 스트립 — 한 줄 최대 13칸, 넘치면 줄마다 균등 분배(--cols) */
.up-strip { display: flex; align-items: center; gap: 9px; }
.up-strip__cells {
  display: grid; grid-template-columns: repeat(var(--cols, 10), minmax(0, 1fr));
  gap: 3px; flex: 1; min-width: 0;
}
.up-cell {
  height: 20px; border-radius: 4px; display: grid; place-items: center;
  font-size: 10px; font-weight: 700; font-variant-numeric: tabular-nums;
}
.up-cell.is-ok { background: var(--up-ok-bg); color: var(--up-ok-tx); }
.up-cell.is-tri { background: var(--up-warn-bg); color: var(--up-warn-tx); }
.up-cell.is-x { background: var(--up-danger-bg); color: var(--up-danger-tx); }
.up-cell.is-none { background: var(--up-neutral-bg); color: var(--up-neutral-tx); }
.up-strip__score {
  font-size: 11.5px; font-weight: 700; color: var(--purple);
  white-space: nowrap; font-variant-numeric: tabular-nums;
}

/* 문항 목록 — 2열, 왼쪽 위부터 세로로 채움(--rows) */
.up-qgrid {
  display: grid; grid-auto-flow: column;
  grid-template-columns: 1fr 1fr; grid-template-rows: repeat(var(--rows, 5), auto);
  gap: 0 14px; margin-top: 11px;
}
.up-qrow {
  display: flex; align-items: center; gap: 7px;
  font-size: 12px; padding: 4px 0; border-bottom: 1px solid #f5f3f9; min-width: 0;
}
.up-qrow__n {
  color: var(--muted); font-size: 11px; width: 16px; text-align: right;
  flex-shrink: 0; font-variant-numeric: tabular-nums;
}
.up-qrow__t { flex: 1; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-qrow__a { font-weight: 700; flex-shrink: 0; }
.up-qrow__a.is-ok { color: var(--up-ok-tx); }
.up-qrow__a.is-tri { color: var(--up-warn-tx); }
.up-qrow__a.is-x { color: var(--up-danger-tx); }
.up-qrow__a.is-none { color: var(--up-neutral-tx); }

.up-badge { font-size: 12px; font-weight: 500; padding: 3px 10px; border-radius: 999px; }
.up-badge--ok { background: var(--up-ok-bg); color: var(--up-ok-tx); }
.up-badge--warn { background: var(--up-warn-bg); color: var(--up-warn-tx); }
.up-badge--mid { background: #f9e6d4; color: #bd6b2e; }
.up-badge--danger { background: var(--up-danger-bg); color: var(--up-danger-tx); }
.up-badge--neutral { background: var(--up-neutral-bg); color: var(--up-neutral-tx); }

/* 단어T 점수 색 — 통과=초록 / 불통=빨강 / 재시통과=노랑 ('점수(재시통과)' 전체) */
.up-word--pass { color: var(--up-ok-tx); }
.up-word--fail { color: var(--up-danger-tx); }
.up-word--retry { color: var(--up-warn-tx); }
.up-word__tag { font-size: 0.78em; font-weight: 500; margin-left: 1px; }

/* ----- 보강 영상 (여러 개 · 번호 목록) ----- */
.up-videos { margin-top: 2px; }
.up-videos__head {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-bottom: 9px;
}
.up-videos__title {
  display: flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 500; color: var(--purple);
}
.up-videos__expire {
  display: inline-flex; align-items: center; gap: 3px;
  font-size: 11px; color: var(--muted); white-space: nowrap;
}
.up-video {
  display: flex; align-items: center; gap: 10px;
  background: var(--lav-2);
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  transition: background 0.12s ease;
}
.up-video:last-child { margin-bottom: 0; }
.up-video:hover { background: #e6def5; }
.up-video__play {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  color: #fff; border-radius: 50%; padding-left: 2px;
}
.up-video__label { flex: 1; font-size: 13.5px; font-weight: 500; color: var(--purple); }
.up-video__chev { display: inline-flex; color: var(--purple-2); }

/* 보강 영상 비활성 상태 (업로드 예정 / 재생 기한 만료) */
.up-video-off {
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 12px;
  font-size: 13px; font-weight: 500;
  color: var(--muted);
  background: var(--up-neutral-bg);
  border-radius: 12px;
  cursor: default;
}
.up-video-off__icon { display: inline-flex; }

/* ----- 수업/클리닉 일정 버튼 (연한 보라) ----- */
/* '수업/클리닉 일정'과 '누적 성적표'를 한 줄에 나란히 (2026-08-13).
   전체 폭 보라 버튼 두 개가 세로로 겹쳐 무거워 보이던 것을 눕힘 — 보라 띠 111px → 44px */
.up-duo {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-bottom: 14px;
}
.up-btn-sched {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 13px 10px;
  font-size: 13px; font-weight: 600; color: #fff; line-height: 1.35;
  background: linear-gradient(135deg, var(--purple-2), var(--purple));
  border: none; border-radius: 14px; cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 18px rgba(111, 95, 151, 0.22);
  white-space: nowrap; /* 두 줄로 내려가지 않게 */
}
.up-btn-sched:hover { filter: brightness(1.05); }
.up-btn-sched svg { flex-shrink: 0; }
.up-btn-sub { font-size: 10.5px; font-weight: 400; color: rgba(255, 255, 255, 0.8); }
/* 좁은 폰에서는 '(최근 N회)'를 숨겨 한 줄을 유지 */
@media (max-width: 374px) {
  .up-btn-sub { display: none; }
}

/* ----- 누적 성적표 (모달) ----- */
/* 버튼은 위 .up-duo 안에 있고, 본문은 모달(#upCumModal) 안에 들어감 (2026-08-18).
   창이 이미 흰 카드라 테두리·그림자·바깥 여백을 얹으면 이중으로 보여 평평하게 둔다. */
.up-cum__body { padding: 0; }
.up-cum__att {
  display: flex; align-items: center; gap: 8px;
  font-size: 12.5px; color: var(--ink);
  padding-bottom: 11px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line);
}
.up-cum__att-k { font-size: 12px; color: var(--muted); }
.up-cum__att-v b { color: var(--purple); font-weight: 700; }
.up-cum__att-dot { color: var(--line); }
.up-cum__hint { font-size: 10px; color: var(--muted); }
.up-cum__empty { font-size: 12.5px; color: var(--muted); text-align: center; padding: 8px 0; }

/* 회차(일자)별 정렬 표 — 라벨 + N등분 컬럼 + 값 */
.up-cum__row { display: flex; align-items: flex-end; gap: 8px; padding: 5px 0; }
.up-cum__k { width: 64px; flex-shrink: 0; align-self: center; font-size: 11px; color: var(--muted); }
.up-cum__v { width: 26px; flex-shrink: 0; align-self: center; text-align: right; font-size: 13px; font-weight: 700; color: var(--ink); }
.up-cum__cells { flex: 1; min-width: 0; display: flex; align-items: flex-end; gap: 3px; height: 30px; }
.up-cum__cell { flex: 1; min-width: 0; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; }
.up-cum__bar { width: 100%; min-height: 4px; border-radius: 3px 3px 0 0; position: relative; }
/* 리뷰T 막대 — 60↑ 초록 / 40~59 노랑 / 40↓ 빨강 (단어T·숙제와 같은 색) */
.up-cum__bar.is-review-ok { background: #9cc9ab; }
.up-cum__bar.is-review-warn { background: #e3c58a; }
.up-cum__bar.is-review-fail { background: #dc9393; }
.up-cum__bar.is-word { background: #9cc9ab; }
.up-cum__bar.is-word-pass { background: #9cc9ab; }
.up-cum__bar.is-word-fail { background: #dc9393; }
.up-cum__bar.is-word-retry { background: #e3c58a; }

/* 막대 탭(모바일)·호버(데스크톱) → 그 날 점수 말풍선 */
.up-cum__cell--bar { cursor: pointer; }
.up-cum__barval {
  position: absolute;
  bottom: 100%; left: 50%;
  transform: translateX(-50%) translateY(3px);
  margin-bottom: 5px;
  padding: 3px 7px;
  background: var(--ink); color: #fff;
  font-size: 10.5px; font-weight: 600; line-height: 1.2;
  white-space: nowrap; border-radius: 6px;
  box-shadow: 0 3px 10px rgba(40, 34, 60, 0.22);
  opacity: 0; pointer-events: none;
  transition: opacity 0.13s ease, transform 0.13s ease;
  z-index: 6;
}
.up-cum__barval::after {
  content: ""; position: absolute; top: 100%; left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent; border-top-color: var(--ink);
}
.up-cum__cell--bar:hover .up-cum__barval,
.up-cum__cell--bar.is-show .up-cum__barval {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* 날짜 헤더 행 */
.up-cum__row--dates { align-items: center; padding-bottom: 2px; }
.up-cum__row--dates .up-cum__cells { height: auto; }
.up-cum__cell--date { font-size: 9px; color: var(--muted); white-space: nowrap; text-align: center; }

/* 숙제 행 — 회차별 평균 완성도(%)를 한 줄 텍스트로 (색 구간: 80↑초록·55↑노랑·30↑주황·30↓빨강) */
.up-cum__row--hw .up-cum__cells { height: auto; align-items: center; }
.up-cum__cell--hw { align-items: center; }
.up-hwpct { font-size: 9.5px; font-weight: 600; white-space: nowrap; }
.up-hwpct--ok { color: var(--up-ok-tx); }
.up-hwpct--warn { color: var(--up-warn-tx); }
.up-hwpct--mid { color: #bd6b2e; }
.up-hwpct--danger { color: var(--up-danger-tx); }

/* ----- 지난 레포트 (아코디언) ----- */
.up-past__title { font-size: 12.5px; color: var(--muted); margin-bottom: 9px; }
.up-past__item {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 8px;
  overflow: hidden;
  transition: border-color 0.12s ease;
}
.up-past__item:hover { border-color: #ddd4ee; }
.up-past__item.is-open { border-color: #d9cef1; }
.up-past__item .up-rhead { padding: 13px 15px; }
.up-past__detail { padding: 13px 15px 15px; border-top: 1px solid var(--line); }
.up-past__toggle {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 4px;
  padding: 9px;
  font-size: 12.5px; color: var(--purple);
  background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.up-past__toggle-chev { display: inline-flex; transition: transform 0.2s ease; }
.up-past__toggle.is-open .up-past__toggle-chev { transform: rotate(180deg); }

/* 지난 레포트 페이지 버튼 (더 보기 상태에서 5개씩) */
.up-pager { display: flex; justify-content: center; align-items: center; gap: 4px; margin-top: 10px; }
.up-pager__btn {
  min-width: 28px; height: 28px; padding: 0 7px;
  border: 1px solid transparent; border-radius: 8px;
  background: none; color: var(--muted);
  font-family: inherit; font-size: 12.5px; cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
}
.up-pager__btn:hover:not(:disabled) { background: var(--lav); color: var(--purple); }
.up-pager__btn.is-active { background: var(--purple); color: #fff; font-weight: 600; }
.up-pager__btn:disabled { opacity: 0.35; cursor: default; }

/* ===== 모달 (수업·클리닉 일정 캘린더) ===== */
body.up-modal-open { overflow: hidden; }
.up-modal { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; box-sizing: border-box; }
.up-modal[hidden] { display: none; }
.up-modal__backdrop { position: absolute; inset: 0; background: rgba(40, 34, 60, 0.45); }
.up-modal__dialog {
  position: relative; width: 100%; max-width: 460px; max-height: 100%;
  display: flex; flex-direction: column;
  background: #fff; border-radius: 20px;
  box-shadow: 0 24px 60px rgba(40, 34, 60, 0.3);
  animation: up-modal-in 0.2s ease;
}
@keyframes up-modal-in { from { transform: translateY(12px) scale(0.985); opacity: 0; } to { transform: none; opacity: 1; } }
.up-modal__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 18px 12px; border-bottom: 1px solid var(--line);
}
.up-modal__title { font-size: 15px; font-weight: 700; color: var(--ink); }
.up-modal__close {
  width: 30px; height: 30px; border: none; background: var(--lav); color: var(--purple);
  border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; flex-shrink: 0;
}
.up-modal__body { padding: 14px 16px 20px; overflow-y: auto; min-height: 0; }

.up-cal-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 10px; }
.up-cal-navbtn {
  width: 32px; height: 32px; border: 1px solid var(--line); background: #fff; color: var(--purple);
  border-radius: 9px; font-size: 16px; line-height: 1; cursor: pointer; font-family: inherit;
}
.up-cal-navbtn:hover { background: var(--lav); }
.up-cal-label { font-size: 15px; font-weight: 700; color: var(--ink); min-width: 92px; text-align: center; }
.up-cal-legend { display: flex; justify-content: center; gap: 16px; margin-bottom: 12px; font-size: 12px; color: var(--muted); }
.up-cal-leg { display: inline-flex; align-items: center; gap: 5px; }
.up-cal-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.up-cal-dot--class { background: #cdbdf0; }
.up-cal-dot--clinic { background: #e6c79a; }
.up-cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 3px; }
.up-cal__dow { text-align: center; font-size: 11px; font-weight: 600; color: var(--muted); padding: 3px 0; }
.up-cal__dow--sun { color: #cc8a8a; }
.up-cal__cell {
  min-height: 52px; min-width: 0;
  border: 1px solid var(--line); border-radius: 8px; padding: 3px 4px;
  display: flex; flex-direction: column; gap: 2px;
}
.up-cal__cell--empty { border-color: transparent; }
.up-cal__cell--today { border-color: var(--purple-2); background: var(--lav); }
.up-cal__num { font-size: 11px; color: var(--muted); }
.up-cal__events { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-cal-chip {
  font-size: 10px; font-weight: 600; padding: 1px 4px; border-radius: 5px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
.up-cal-chip--class { background: #ece7f8; color: #6f5f97; }
.up-cal-chip--clinic { background: #f7f0e3; color: #a8895f; }

/* 좁은 화면: 시간이 칸에 들어가도록 바깥 여백을 줄임 (넓은 화면은 그대로) */
@media (max-width: 480px) {
  .up-modal { padding: 8px; }
  .up-modal__body { padding: 14px 10px 20px; }
  .up-cal { gap: 2px; }
  .up-cal__cell { padding: 3px 2px; }
  .up-cal-chip { padding: 1px 3px; }
}
