/* ── CALENDAR TOOLBAR ── */
.cal-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.cal-toolbar h2 { font-size: 1.1rem; font-weight: 900; }
.cal-nav-btn {
  background: var(--card); border: 1.5px solid #EEE0F0; border-radius: 10px;
  padding: 7px 15px; cursor: pointer; font-weight: 800; font-family: inherit;
  color: var(--tx); font-size: .88rem;
  box-shadow: 0 2px 7px rgba(160,80,140,.07); transition: all .2s;
}
.cal-nav-btn:hover { border-color: var(--pk); color: var(--pk); }

.cal-view-toggle { display: flex; gap: 4px; margin-bottom: 14px; }
.cvt {
  padding: 7px 15px; border-radius: 40px; font-size: .74rem; font-weight: 800;
  cursor: pointer; border: none; font-family: inherit;
  background: #EEE5F4; color: var(--txl); transition: all .2s;
}
.cvt.on { background: linear-gradient(135deg, #F06292, #9C27B0); color: #fff; box-shadow: 0 3px 12px rgba(200,80,180,.22); }

/* ── Sprint 11: 캘린더 타입 필터 ── */
.cal-filter-btn {
  padding: 6px 13px; border-radius: 40px; font-size: .72rem; font-weight: 800;
  cursor: pointer; border: 1.5px solid #EEE0F0; font-family: inherit;
  background: var(--wh); color: var(--txl); transition: all .2s;
}
.cal-filter-btn:hover { border-color: var(--pk); }
.cal-filter-btn.on {
  background: linear-gradient(135deg, #F06292, #9C27B0);
  color: #fff; border-color: transparent;
  box-shadow: 0 3px 12px rgba(200,80,180,.22);
}

/* ── THEME BAR ── */
.theme-bar  { display: flex; gap: 7px; align-items: center; }
.theme-label{ font-size: .71rem; font-weight: 800; color: var(--txl); }
.theme-btn  { width: 22px; height: 22px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; transition: all .2s; box-shadow: 0 2px 6px rgba(0,0,0,.12); }
.theme-btn.on { border-color: var(--tx); transform: scale(1.2); }

/* ── CALENDAR GRID ── */
.cal-wrap { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); overflow: hidden; }
.cal-head-row  { display: grid; grid-template-columns: repeat(7,1fr); padding: 13px 0; }
.cal-head-cell { text-align: center; font-size: .71rem; font-weight: 900; color: #fff; }
.cal-body      { display: grid; grid-template-columns: repeat(7,1fr); }

.cal-cell {
  min-height: 104px; border: 1px solid #F5EEF8;
  padding: 6px 4px; cursor: pointer;
  transition: background .14s; position: relative;
  overflow: hidden; /* Sprint 9: 긴 텍스트·잔여 요소가 옆 셀로 삐져나오지 않도록 */
}
.cal-cell:hover        { background: #FFF5FA; }
.cal-cell.other-month  { opacity: .28; }
.cal-cell.today .day-num { background: var(--pk); color: #fff; border-radius: 50%; }
.cal-cell.selected     { background: var(--pkl); }

.day-num {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: .72rem; font-weight: 800;
}

/* ── v0.0.11: 날짜 숫자 + 이유식 스티커 한 줄 배치 ── */
.day-num-row { display: flex; align-items: center; gap: 3px; margin-bottom: 3px; }
.day-food-stickers { display: flex; align-items: center; gap: 1px; }
.food-sticker-on-cal   { font-size: .74rem; line-height: 1; }
.food-sticker-overflow {
  font-size: .48rem; background: var(--pk); color: #fff;
  border-radius: 4px; padding: 1px 3px; font-weight: 800; line-height: 1.3;
}

/* ── EVENT LINES (Sprint 26, 형광펜 스타일로 개편 Sprint 27) ── */
/* Sprint 26에서 배경을 아예 없앴더니 예쁘지 않다는 피드백 — 대신 형광펜으로 칠한 것처럼
   글자 뒤에 옅은 색 배경을 살짝만 깔아서, 박스 여백 때문에 공간이 줄어드는 문제 없이도
   예쁜 배경색 느낌을 살림 (좌우 여백을 필 방식보다 훨씬 좁게 줘서 글자 공간은 그대로 확보).
   배경·글자색은 JS에서 인라인 style로 지정(연한 배경 + 진한 글자, 뱃지와 같은 톤 규칙) */
.ev-lines { display: flex; flex-direction: column; gap: 2px; margin-top: 2px; }
.ev-line {
  /* v0.0.4: 앱 전체 글자 확대(html 17px)에서 이 텍스트만 제외 — 셀 공간이 빠듯해서
     과거 여러 스프린트에 걸쳐 맞춰둔 크기라 rem 대신 px로 고정(기존 .66rem = 10.56px과 동일) */
  font-size: 10.56px; font-weight: 800; line-height: 1.4;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 100%; box-sizing: border-box;
  padding: 0 3px; border-radius: 4px;
}
.ev-more {
  font-size: 8px; font-weight: 700; color: var(--txl); margin-top: 1px; /* v0.0.4: 기존 .5rem 고정(px) */
}

/* ── STICKERS ON CALENDAR ── */
/* Bug #7 fix: stickers display in a small row, max 4, with +N overflow */
.sticker-row {
  position: absolute; bottom: 2px; right: 2px;
  display: flex; gap: 1px; flex-wrap: wrap;
  justify-content: flex-end; max-width: 100%;
}
.sticker-on-cal   { font-size: .8rem; line-height: 1; }
.sticker-overflow {
  font-size: .5rem; background: var(--txl); color: #fff;
  border-radius: 4px; padding: 1px 3px; font-weight: 800; line-height: 1.4;
  align-self: center;
}

/* ── DAY PANEL ── */
.day-panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 22px; margin-top: 14px; }
.dp-vax-item-row { background: rgba(255,255,255,.6); }
.dp-date   { font-size: .97rem; font-weight: 900; margin-bottom: 16px; display: flex; align-items: center; gap: 7px; }
.dp-ev     { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 13px; margin-bottom: 8px; }
.dp-ev-main  { flex: 1; }
.dp-ev-title { font-weight: 800; font-size: .84rem; margin-bottom: 2px; color: var(--tx); }
.dp-ev-note  { font-size: .73rem; color: var(--txl); }
.dp-ev-badge { font-size: .62rem; font-weight: 800; padding: 3px 8px; border-radius: 10px; color: #fff; flex-shrink: 0; }

/* ── STICKER PICKER ── */
.sticker-picker { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 20px; margin-top: 14px; }
.sp-tabs { display: flex; gap: 5px; margin-bottom: 12px; overflow-x: auto; scrollbar-width: none; }
.sp-tabs::-webkit-scrollbar { display: none; }
.sp-tab {
  padding: 6px 12px; border-radius: 40px; border: none;
  background: #EEE5F4; color: var(--txl);
  font-size: .71rem; font-weight: 800; cursor: pointer;
  font-family: inherit; white-space: nowrap; transition: all .2s;
}
.sp-tab.on { background: linear-gradient(135deg, #F06292, #9C27B0); color: #fff; }
.sp-grid   { display: flex; gap: 6px; flex-wrap: wrap; }
.sp-sticker {
  font-size: 1.45rem; cursor: pointer; padding: 6px;
  border-radius: 10px; transition: all .2s; border: 2px solid transparent;
}
.sp-sticker:hover { background: var(--pkl); border-color: var(--pk); transform: scale(1.2); }

/* ── ADD EVENT FORM ── */
.add-ev-form { background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow); padding: 22px; margin-top: 14px; }

.type-row { display: flex; gap: 6px; flex-wrap: wrap; }
.type-btn {
  padding: 7px 12px; border-radius: 40px;
  border: 1.5px solid #EEE0F0; background: var(--wh);
  cursor: pointer; font-size: .73rem; font-weight: 800;
  color: var(--txl); font-family: inherit; transition: all .2s;
}
.type-btn.on { border-color: var(--pk); background: var(--pkl); color: var(--pkd); }

/* ── RESPONSIVE ── */
@media (max-width: 640px) {
  .cal-cell { min-height: 76px; }

  /* Sprint 25: 모바일은 PC보다 셀 폭이 훨씬 좁아서 같은 글자 크기라도 한 줄에 들어가는
     글자 수가 적음 — 모바일 글자 크기는 그대로 유지(Sprint 27: PC만 확대, 모바일은 그대로)
     v0.0.4: 여기도 px로 고정해 전체 확대 대상에서 제외(기존 .5rem = 8px과 동일) */
  .ev-line { font-size: 8px; padding: 0 2px; }
}

/* ══════════════════════════════════════
 *  Sprint 2 추가 스타일
 * ══════════════════════════════════════ */

/* ── 완료된 이벤트 (데이 패널) ── */
.dp-ev.dp-done {
  opacity: .72;
}
.dp-ev.dp-done .dp-ev-title {
  text-decoration: line-through;
  color: var(--txl);
}

/* ── Sprint 20: 정부지원 마감 임박 강조 ── */
.dp-ev.dp-ev-urgent {
  border: 2px solid #C62828;
}

/* ── 드래그 타겟 강조 ── */
.cal-cell.drag-over {
  background: var(--pkl) !important;
  border: 2px dashed var(--pk) !important;
}

/* ── 모바일 드래그 고스트 ── */
.drag-ghost {
  position: fixed;
  z-index: 9999;
  background: linear-gradient(135deg, #F06292, #9C27B0);
  color: #fff;
  padding: 7px 14px;
  border-radius: 40px;
  font-size: .8rem;
  font-weight: 400;
  font-family: 'OwnglyphParkDahyun', sans-serif; /* v0.0.3: 온글잎 박다현체로 전면 교체 */
  pointer-events: none;
  box-shadow: 0 6px 20px rgba(200,80,180,.35);
  white-space: nowrap;
  transform: rotate(-3deg);
}

/* ── 수정 Modal 내 수정 버튼 ── */
.dp-ev .dp-edit-btn {
  background: none;
  border: 1px solid #EEE0F0;
  border-radius: 8px;
  padding: 3px 8px;
  font-size: .65rem;
  font-weight: 800;
  color: var(--txl);
  cursor: pointer;
  font-family: inherit;
  transition: all .2s;
}
.dp-ev .dp-edit-btn:hover {
  border-color: var(--pk);
  color: var(--pk);
}

/* ── Sprint 21: 캘린더 하단 색상 범례 (탭하면 색상 변경) ── */
.cal-legend {
  display: flex; flex-wrap: wrap; gap: 8px 14px;
  margin-top: 14px; padding: 14px 16px;
  background: var(--card); border-radius: var(--radius); box-shadow: var(--card-shadow);
}
.legend-item {
  display: flex; align-items: center; gap: 6px;
  cursor: pointer; position: relative;
  font-size: .74rem; font-weight: 800; color: var(--tx);
  padding: 3px 4px; border-radius: 8px; transition: background .2s;
}
.legend-item:hover { background: var(--pkl); }
.legend-dot { width: 11px; height: 11px; border-radius: 50%; flex-shrink: 0; }
.legend-label { white-space: nowrap; }
.legend-color-input {
  position: absolute; width: 11px; height: 11px; left: 0; top: 3px;
  opacity: 0; cursor: pointer; border: none; padding: 0;
}
.legend-reset {
  font-size: .68rem; color: var(--txl); margin-left: 2px;
  padding: 0 2px; border-radius: 4px;
}
.legend-reset:hover { color: var(--pk); }
