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

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

.sr {
  box-sizing: border-box;
  width: clamp(288px, 88vw, 400px);
  height: 216px;
  overflow: hidden;
  border-radius: 16px;
  background: #26232e;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
}

.sr__view {
  height: 100%;
  overflow-y: auto;
  overscroll-behavior: contain;
}

.sr__doc {
  display: grid;
  grid-template-columns: 136px 1fr;
  gap: 12px;
  min-height: 300px;
  padding: 12px;
}

.sr__rail {
  position: sticky;
  top: 0;
  align-self: start;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sr__link {
  position: relative;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 8px;
  width: 136px;
  height: 44px;
  padding: 0 12px;
  border-radius: 999px;
  background: #15131a;
  color: #bdb7c6;
  text-decoration: none;
  clip-path: inset(0 100px 0 0 round 999px);
  transition: clip-path 300ms cubic-bezier(0.2, 0.8, 0.2, 1), background-color 300ms cubic-bezier(0.2, 0.8, 0.2, 1), color 300ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.sr__ic {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 20px;
}

.sr__ic svg {
  display: block;
}

.sr__name {
  white-space: nowrap;
  font-weight: 600;
  font-size: 12px;
  line-height: 1;
  font-family: inherit;
}

.sr__link:hover,
.sr__link:focus-visible {
  clip-path: inset(0 0 0 0 round 999px);
  background: #c8dce4;
  color: #15131a;
}

.sr__link:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.sr__body {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sr__title {
  margin: 0;
  color: #ffffff;
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  font-family: inherit;
}

.sr__row {
  display: block;
  height: 8px;
  border-radius: 999px;
  background: #3b3746;
}

.sr__row--full {
  width: 100%;
}

.sr__row--wide {
  width: 84%;
}

.sr__row--mid {
  width: 64%;
}

.sr__row--short {
  width: 42%;
}

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

.is-demo .sr__link:nth-child(1) {
  animation-delay: 0s;
}

.is-demo .sr__link:nth-child(2) {
  animation-delay: 0.16s;
}

.is-demo .sr__link:nth-child(3) {
  animation-delay: 0.32s;
}

.is-demo .sr__link:nth-child(4) {
  animation-delay: 0.48s;
}

@keyframes railUnfold {
  0% {
    clip-path: inset(0 100px 0 0 round 999px);
    background-color: #15131a;
    color: #bdb7c6;
  }
  10%, 46% {
    clip-path: inset(0 0 0 0 round 999px);
    background-color: #c8dce4;
    color: #15131a;
  }
  62%, 100% {
    clip-path: inset(0 100px 0 0 round 999px);
    background-color: #15131a;
    color: #bdb7c6;
  }
}
@media (max-width: 340px), (max-height: 220px) {
  .sr {
    height: 156px;
  }
  .sr__doc {
    grid-template-columns: 124px 1fr;
    gap: 8px;
    min-height: 216px;
    padding: 8px;
  }
  .sr__rail {
    gap: 4px;
  }
  .sr__link {
    width: 124px;
    height: 40px;
    padding: 0 8px;
    clip-path: inset(0 92px 0 0 round 999px);
  }
  .sr__title {
    font-size: 13px;
  }
  .sr__row {
    height: 6px;
  }
  .sr__ic svg {
    width: 18px;
    height: 18px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .is-demo .sr__link {
    animation: none !important;
  }
  .sr__link {
    transition: none !important;
  }
  .sr__link:hover, .sr__link:focus-visible {
    clip-path: inset(0 0 0 0 round 999px);
  }
}
