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

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

.cal {
  position: relative;
  box-sizing: border-box;
  width: min(288px, 88vw);
  color: #fff7e6;
}

.cal__sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.cal__bar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
}

.cal__nav {
  flex: 0 0 auto;
  box-sizing: border-box;
  width: clamp(22px, 6.5vw, 28px);
  height: clamp(22px, 6.5vw, 28px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  color: #fff7e6;
  cursor: pointer;
  transition: background 300ms cubic-bezier(0.2, 0.8, 0.2, 1), border-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cal__nav:hover {
  background: rgba(255, 255, 255, 0.14);
}

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

.cal__titles {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.cal__titlestrip {
  display: flex;
  width: 300%;
  transform: translateX(-33.3333%);
}

.cal__t {
  flex: 0 0 33.3333%;
  text-align: center;
  font-size: clamp(12px, 3.2vw, 15px);
  line-height: 1.3;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.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(255, 255, 255, 0.45);
  text-align: center;
}

.cal__viewport {
  overflow: hidden;
  border-radius: 8px;
}

.cal__track {
  display: flex;
  width: 300%;
  transform: translateX(-33.3333%);
}

.cal.is-anim .cal__track,
.cal.is-anim .cal__titlestrip {
  transition: transform 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.cal__month {
  flex: 0 0 33.3333%;
  display: grid;
  gap: 4px;
}

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

.cal__cell {
  height: clamp(20px, 6vw, 28px);
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  font-size: clamp(9px, 2.6vw, 12px);
  line-height: 1;
  font-weight: 600;
  color: #fff7e6;
  cursor: pointer;
}

.cal__cell.is-out {
  background: rgba(255, 255, 255, 0.03);
  color: rgba(255, 255, 255, 0.72);
}

.cal__cell[aria-selected=true] {
  background: #2f6df6;
  color: #fff7e6;
}

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

.cal.is-demo .cal__track,
.cal.is-demo .cal__titlestrip {
  animation-name: cal-slide;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
}

@keyframes cal-slide {
  0% {
    transform: translateX(-33.3333%);
  }
  20% {
    transform: translateX(-66.6667%);
  }
  33% {
    transform: translateX(-66.6667%);
  }
  50% {
    transform: translateX(-33.3333%);
  }
  58% {
    transform: translateX(-33.3333%);
  }
  75% {
    transform: translateX(0);
  }
  85% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-33.3333%);
  }
}
@media (prefers-reduced-motion: reduce) {
  .cal.is-demo .cal__track,
  .cal.is-demo .cal__titlestrip {
    animation: none !important;
  }
  .cal.is-anim .cal__track,
  .cal.is-anim .cal__titlestrip,
  .cal__nav {
    transition: none;
  }
}
