.panel {
  background: #fff;
  border-radius: 24px;
  padding: 18px;
  box-shadow: 0 1px 4px rgb(117 10 73 / .06)
}

.mhead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px
}

.mhead h2 {
  font-size: 24px
}

.mhead button {
  width: 40px;
  min-height: 40px;
  padding: 0;
  font-size: 22px;
  line-height: 1;
  border: 0;
  background: var(--pink-50);
  color: var(--pink-600)
}

.grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 2px 0;
  text-align: center
}

.grid .wd {
  font-size: 13px;
  color: var(--mute);
  padding: 2px 0 8px;
  margin-bottom: 4px;
  border-bottom: 1px solid #f3e3ec
}

.grid>:nth-child(7n+1) {
  color: #e0457b
}

.grid>:nth-child(7n) {
  color: #3d86e0
}

.day {
  position: relative;
  height: 44px;
  border-radius: 12px;
  border: 0;
  background: transparent;
  font-family: var(--f-body);
  font-size: 15px;
  min-height: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  transition: background-color .15s
}

.day:hover {
  background: var(--soft)
}

.day.out {
  opacity: .35
}

.day>span {
  position: relative;
  z-index: 1
}

.day.today {
  font-weight: 700
}

.day.today::after {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  background: var(--lav-50);
  box-shadow: inset 0 0 0 2px var(--lav)
}

.day .fv {
  position: absolute;
  top: 1px;
  right: 3px;
  font-size: 10px;
  line-height: 1;
  color: var(--pink-600);
  z-index: 2
}

/* 고른 날짜 한 줄 안내: 목록이 달력 아래에 있는 폰에서만(데스크톱은 바로 옆 목록 제목이 같은 걸 보여 줌) */
.peek {
  display: none
}

@media(max-width:860px) {
  .peek:not([hidden]) {
    display: block;
    margin-top: 6px;
    text-align: center;
    font: 15px var(--f-ui);
    color: var(--pink-600)
  }

  .peek button,
  .peek span {
    display: inline-block;
    min-height: 44px;
    padding: 0 8px;
    border: 0;
    background: none;
    font: inherit;
    color: inherit;
    line-height: 44px
  }
}

/* 기간 표시: 36px 높이의 연한 바, 시작·끝(과 주의 양끝)은 모서리 5px (pk=달력으로 고른 기간, rng=카드에 올린 행사 기간) */
.day.pk,
.day.rng {
  --band: color-mix(in srgb, var(--pink-200) 55%, var(--pink-50));
  background: none;
  border-radius: 0
}

/* 카드에 올린 행사 기간은 더 연하게. 고른 기간(pk)과 겹치면 고른 쪽 색이 보이게 */
.day.rng:not(.pk) {
  --band: var(--pink-50)
}

.day.rng.fan:not(.pk) {
  --band: var(--sky-50)
}

.day:is(.pk, .rng):not(.sel)::before {
  content: "";
  position: absolute;
  inset: 4px 0;
  background: var(--band)
}

.day:is(.ps, .rs, .pk:nth-child(7n+1), .rng:nth-child(7n+1)):not(.sel)::before {
  left: 3px;
  border-top-left-radius: 5px;
  border-bottom-left-radius: 5px
}

.day:is(.pe, .re, .pk:nth-child(7n), .rng:nth-child(7n)):not(.sel)::before {
  right: 3px;
  border-top-right-radius: 5px;
  border-bottom-right-radius: 5px
}

.day.sel {
  background: none;
  color: #fff !important
}

.day.sel::before {
  content: "";
  position: absolute;
  inset: 0;
  margin: auto;
  width: 36px;
  height: 36px;
  max-width: 100%;
  max-height: 100%;
  border-radius: 50%;
  background: var(--pink-600)
}

.day.sel::after {
  display: none
}

.day .dots {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 5px;
  z-index: 1;
  display: flex;
  justify-content: center;
  gap: 2px;
  height: 5px
}

/* 점은 칸 아래에 띄워서 숫자가 정확히 가운데에 오게 */
.day .dots i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--pink)
}

.day .dots i.f {
  background: var(--sky)
}

.day.sel .dots i {
  background: #fff
}

.day .dots {
  align-items: center;
  height: 7px
}

/* 큰 행사 ◆, 정기 행사 ○(속 빈 동그라미) */
.day .dots i.bg {
  width: 6px;
  height: 6px;
  border-radius: 1px;
  transform: rotate(45deg);
  background: var(--pink-600)
}

.day .dots i.bg.f {
  background: var(--sky-600)
}

.day .dots i.rp {
  background: none;
  box-shadow: inset 0 0 0 1.2px var(--pink)
}

.day .dots i.rp.f {
  box-shadow: inset 0 0 0 1.2px var(--sky)
}

.day.sel .dots i.rp {
  background: none;
  box-shadow: inset 0 0 0 1.2px #fff
}

/* 친구가 가는 날(친구 찜 목록으로 볼 때만): 칸 아래쪽 라벤더 띠. '오늘'(라벤더 동그라미)과는 모양으로 구별 */
.day .frb {
  position: absolute;
  left: 22%;
  right: 22%;
  bottom: 2px;
  height: 4px;
  border-radius: 2px;
  background: var(--lav);
  z-index: 2
}

.legend b.lg-fr {
  width: 16px;
  height: 4px;
  border-radius: 2px;
  background: var(--lav)
}

.legend b.lg-bg {
  border-radius: 2px;
  transform: rotate(45deg) scale(.8);
  background: var(--pink-600)
}

.legend b.lg-rp {
  background: none;
  box-shadow: inset 0 0 0 1.5px var(--pink)
}

.legend {
  display: flex;
  gap: 14px;
  font-size: 13px;
  color: var(--mute);
  margin-top: 12px;
  flex-wrap: wrap
}

.legend b {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-right: 5px;
  vertical-align: 0
}
