:root {
  color-scheme: light;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f6f6f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 100%;
  min-height: 100%;
  margin: 0;
}

body {
  display: grid;
  min-height: 100vh;
  place-items: center;
  background: #f6f6f7;
}

.preview {
  display: grid;
  justify-items: center;
}

.star-rating {
  display: flex;
  width: 160px;
  height: 32px;
  user-select: none;
  touch-action: none;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.star-rating:focus {
  outline: none;
}

.star-slot {
  position: relative;
  display: grid;
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  place-items: center;
  border-radius: 999px;
  transition: background-color 140ms cubic-bezier(0.2, 0, 0, 1);
}

.star-slot.is-pressed {
  background-color: rgba(9, 9, 11, 0.08);
}

.star-icon {
  position: relative;
  display: block;
  width: 29.334px;
  height: 29.334px;
  transform-origin: 50% 50%;
}

.star-layer {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  transition: opacity 140ms cubic-bezier(0.2, 0, 0, 1);
}

.star-filled {
  opacity: 0;
}

.star-slot.is-filled .star-empty {
  opacity: 0;
}

.star-slot.is-filled .star-filled {
  opacity: 1;
}

.star-icon.is-popping {
  animation: star-pop 220ms cubic-bezier(0.2, 0.9, 0.3, 1.35) var(--pop-delay, 0ms) both;
}

.rating-status {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@keyframes star-pop {
  0% {
    transform: scale(1);
  }

  48% {
    transform: scale(1.105);
  }

  100% {
    transform: scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .star-slot,
  .star-layer {
    transition: none;
  }

  .star-icon.is-popping {
    animation: none;
  }
}
