html, body {
  margin: 0;
  overflow: hidden;
}

.stage {
  box-sizing: border-box;
  min-height: 100vh;
  display: grid;
  place-items: center;
  margin: 0;
  background: #ffffff;
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  padding: clamp(8px, 4vw, 24px);
}

.cal {
  box-sizing: border-box;
  width: min(280px, 88vw);
  color: #17141a;
}

.cal__bar {
  margin: 0 0 8px;
}

.cal__title {
  margin: 0;
  font-size: clamp(12px, 3.4vw, 15px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-align: center;
}

.cal__dows {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 4px;
  margin: 0 0 4px;
  font-size: clamp(8px, 2.2vw, 10px);
  line-height: 1.2;
  font-weight: 700;
  color: rgba(23, 20, 26, 0.72);
  text-align: center;
}

.cal__grid {
  display: grid;
  gap: 4px;
}

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

.cal__cell {
  position: relative;
  height: clamp(24px, 7.5vw, 32px);
  display: grid;
  place-items: center;
  border-radius: 4px;
  font-size: clamp(9px, 2.8vw, 12px);
  line-height: 1;
  font-weight: 600;
  color: #17141a;
  cursor: pointer;
  background: transparent;
  transition: background 220ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.cal__cell:hover {
  background: rgba(23, 20, 26, 0.06);
}

.cal__cell:focus-visible {
  outline: 2px solid #2f6df6;
  outline-offset: 1px;
}

.cal__cell.is-out .cal__n {
  opacity: 0.25;
}

.cal__cell.is-today {
  color: #fff;
}

.cal__n {
  position: relative;
  z-index: 1;
}

.cal__cell.is-today::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(24px, 7.5vw, 32px);
  height: clamp(24px, 7.5vw, 32px);
  transform: translate(-50%, -50%);
  background: #2f6df6;
  border-radius: 50%;
}

.cal__cell.is-today::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: clamp(24px, 7.5vw, 32px);
  height: clamp(24px, 7.5vw, 32px);
  border: 3px solid #2f6df6;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0.9);
  opacity: 0;
  pointer-events: none;
}

.cal__cell.is-today::after {
  animation-name: today-ring;
  animation-duration: 2s;
  animation-timing-function: ease-out;
  animation-iteration-count: infinite;
}

@keyframes today-ring {
  0% {
    transform: translate(-50%, -50%) scale(0.9);
    opacity: 0;
  }
  16% {
    transform: translate(-50%, -50%) scale(1.08);
    opacity: 1;
  }
  64% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
  100% {
    transform: translate(-50%, -50%) scale(1.5);
    opacity: 0;
  }
}
.cal__badge {
  position: absolute;
  right: 0;
  top: 0;
  z-index: 2;
  min-width: 14px;
  height: 14px;
  box-sizing: border-box;
  padding: 0 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #17141a;
  color: #fff;
  border-radius: 999px;
  box-shadow: 0 0 0 2px #fff;
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
}

.cal__cell.is-today .cal__badge {
  background: #fff7e6;
  color: #17141a;
}

.cal__cell[aria-selected=true]:not(.is-today) {
  background: rgba(47, 109, 246, 0.14);
}

@media (prefers-reduced-motion: reduce) {
  .cal__cell.is-today::after {
    animation: none !important;
    opacity: 0;
  }
  .cal__cell {
    transition: none;
  }
}
