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);
}

.tree, .rail {
  list-style: none;
  margin: 0;
  padding: 0;
}

.tree {
  width: 220px;
}

.tree > li {
  color: #fff7e6;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
}

.rail {
  position: relative;
  margin-top: 8px;
  padding-left: 16px;
}

.rail::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 0;
  bottom: 0;
  width: 2px;
  background: #5b8cf8;
  transform-origin: top;
  transform: scaleY(0);
  transition: transform 300ms ease-out;
}

.rail.is-open::before {
  transform: scaleY(1);
}

.rail li {
  position: relative;
  padding-left: 12px;
  color: #fff7e6;
  font-size: 12px;
  font-weight: 400;
  opacity: 0.72;
  transition: opacity 300ms ease-out;
}

.rail.is-open > li {
  opacity: 1;
}

.rail li::before {
  content: "";
  position: absolute;
  left: -3px;
  top: 9px;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #5b8cf8;
}

.reveal {
  appearance: none;
  border: none;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 12px;
  background: #2f6df6;
  color: #fff7e6;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 140ms ease-out;
}
.reveal:hover {
  transform: translateY(-1px);
}
.reveal:active {
  transform: scale(0.96);
}
.reveal:focus-visible {
  outline: 2px solid #5b8cf8;
  outline-offset: 2px;
}

@media (max-width: 340px) {
  .tree {
    width: 170px;
  }
  .tree > li {
    font-size: 12px;
    margin-bottom: 4px;
  }
  .rail {
    margin-top: 4px;
    padding-left: 12px;
  }
  .rail li {
    font-size: 10px;
    padding-left: 8px;
  }
  .reveal {
    margin-top: 8px;
    padding: 4px 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .rail::before {
    transition: none;
  }
  .rail li {
    transition: none;
  }
  .reveal {
    transition: none;
  }
}
