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

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

p, ul {
  margin: 0;
}

.rd {
  box-sizing: border-box;
  width: clamp(288px, 94vw, 432px);
}

.rd__defs {
  display: none;
}

.rd__card {
  box-sizing: border-box;
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 16px;
  border-radius: 16px;
  background: #fbf7ef;
}

.rd__summary {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.rd__avg {
  display: grid;
  justify-items: start;
  gap: 4px;
}

.rd__num {
  display: grid;
  justify-items: start;
}

.rd__n {
  grid-area: 1/1;
  color: #1c1b22;
  font-weight: 800;
  font-size: 34px;
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  opacity: 0;
}

.rd__n--4 {
  opacity: 1;
}

.rd__stars {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #ff4d1f;
}

.rd__stars svg {
  display: block;
}

.rd__count {
  display: grid;
  justify-items: start;
  color: #565062;
  font-weight: 600;
  font-size: 11px;
  line-height: 1.2;
}

.rd__c {
  grid-area: 1/1;
  opacity: 0;
  white-space: nowrap;
}

.rd__c--4 {
  opacity: 1;
}

.rd__rows {
  display: grid;
  gap: 8px;
  padding: 0;
  list-style: none;
}

.rd__row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: none;
  color: #565062;
  font-family: inherit;
  font-weight: 700;
  font-size: 11px;
  line-height: 1;
  text-align: left;
  cursor: pointer;
}

.rd__row--5 {
  --p: .68;
}

.rd__row--4 {
  --p: .21;
}

.rd__row--3 {
  --p: .07;
}

.rd__row--2 {
  --p: .03;
}

.rd__row--1 {
  --p: .01;
}

.rd__lv {
  display: flex;
  align-items: center;
  gap: 4px;
  color: #1c1b22;
  font-variant-numeric: tabular-nums;
}

.rd__lv svg {
  display: block;
  color: #ff4d1f;
}

.rd__track {
  display: grid;
}

.rd__bg, .rd__fill {
  grid-area: 1/1;
  height: 8px;
  border-radius: 999px;
}

.rd__bg {
  background: rgba(28, 27, 34, 0.12);
}

.rd__fill {
  background: #1c1b22;
  transform: scaleX(var(--p));
  transform-origin: left center;
}

.rd__pct {
  min-width: 26px;
  color: #565062;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.rd__row:hover .rd__fill,
.rd__row[aria-pressed=true] .rd__fill {
  background: #ff4d1f;
}

.rd__row[aria-pressed=true] {
  color: #1c1b22;
}

.rd.is-picked .rd__row[aria-pressed=false] {
  opacity: 0.42;
}

.rd__row:focus-visible {
  outline: 2px solid #1c1b22;
  outline-offset: 2px;
}

.rd.is-demo .rd__fill {
  animation-name: rdFill;
  animation-duration: 2s;
  animation-timing-function: cubic-bezier(0.2, 0.8, 0.2, 1);
  animation-iteration-count: infinite;
  animation-fill-mode: backwards;
}

.rd.is-demo .rd__row--4 .rd__fill {
  animation-delay: 0.16s;
}

.rd.is-demo .rd__row--3 .rd__fill {
  animation-delay: 0.32s;
}

.rd.is-demo .rd__row--2 .rd__fill {
  animation-delay: 0.48s;
}

.rd.is-demo .rd__row--1 .rd__fill {
  animation-delay: 0.64s;
}

.rd.is-demo .rd__n,
.rd.is-demo .rd__c {
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
  animation-fill-mode: both;
}

.rd.is-demo .rd__n--1, .rd.is-demo .rd__c--1 {
  animation-name: rdStep1;
}

.rd.is-demo .rd__n--2, .rd.is-demo .rd__c--2 {
  animation-name: rdStep2;
}

.rd.is-demo .rd__n--3, .rd.is-demo .rd__c--3 {
  animation-name: rdStep3;
}

.rd.is-demo .rd__n--4, .rd.is-demo .rd__c--4 {
  animation-name: rdStep4;
}

@keyframes rdFill {
  0% {
    transform: scaleX(0);
  }
  46%, 100% {
    transform: scaleX(var(--p));
  }
}
@keyframes rdStep1 {
  0% {
    opacity: 1;
  }
  22%, 100% {
    opacity: 0;
  }
}
@keyframes rdStep2 {
  0% {
    opacity: 0;
  }
  22% {
    opacity: 1;
  }
  50%, 100% {
    opacity: 0;
  }
}
@keyframes rdStep3 {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 1;
  }
  84%, 100% {
    opacity: 0;
  }
}
@keyframes rdStep4 {
  0% {
    opacity: 0;
  }
  84%, 100% {
    opacity: 1;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .rd {
    width: 100%;
  }
  .rd__card {
    gap: 12px;
    padding: 12px;
  }
  .rd__n {
    font-size: 26px;
  }
  .rd__stars {
    gap: 0;
  }
  .rd__stars svg {
    width: 11px;
    height: 11px;
  }
  .rd__count {
    font-size: 10px;
  }
  .rd__rows {
    gap: 4px;
  }
  .rd__row {
    gap: 4px;
    font-size: 10px;
  }
  .rd__bg, .rd__fill {
    height: 6px;
  }
  .rd__pct {
    min-width: 22px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rd__fill, .rd__n, .rd__c {
    animation: none !important;
  }
  .rd__n, .rd__c {
    opacity: 0 !important;
  }
  .rd__n--4, .rd__c--4 {
    opacity: 1 !important;
  }
}
