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

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

.dg {
  position: relative;
  box-sizing: border-box;
  width: min(268px, 88vw);
  font-family: -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
}

.dg__list, .dg__list ul, .dg__after ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.dg__list:focus-visible {
  outline: none;
}

.dg__list li[aria-selected=true] > .dg__row {
  outline: 2px solid #2f6df6;
  outline-offset: -2px;
}

.dg__list:focus-visible .dg__row {
  outline: none;
}

.dg__row {
  box-sizing: border-box;
  height: 26px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  margin-bottom: 4px;
  border: 1px solid rgba(23, 20, 26, 0.1);
  border-radius: 4px;
  background: #fff;
  font-size: 12px;
  font-weight: 600;
  cursor: grab;
  user-select: none;
  transition: border-color 220ms cubic-bezier(0.2, 0.8, 0.2, 1), background 220ms cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dg__row--f {
  cursor: pointer;
}

.dg__row:hover {
  border-color: rgba(23, 20, 26, 0.24);
}

.dg__ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: #17141a;
}

.dg__ico--folder {
  color: #2f6df6;
}

.dg__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dg__n {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.08);
  font-size: 10px;
  line-height: 16px;
  font-weight: 800;
  color: rgba(23, 20, 26, 0.72);
}

.dg__n--on {
  background: #2f6df6;
  color: #fff;
}

.dg__row.is-hot {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, 0.08);
  box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.25);
}

.dg__kids {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 220ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

.dg__kwrap {
  overflow: hidden;
  min-height: 0;
}

.dg__f:has(.dg__kids li) > .dg__kids {
  grid-template-rows: 1fr;
}

.dg__kids .dg__row {
  margin-left: 16px;
}

.dg__row.is-in {
  animation-name: dg-in;
  animation-duration: 320ms;
  animation-timing-function: cubic-bezier(0.2, 1.4, 0.4, 1);
  animation-iteration-count: 1;
}

@keyframes dg-in {
  0% {
    transform: scale(0.94);
    background: rgba(47, 109, 246, 0.16);
  }
  100% {
    transform: scale(1);
    background: #fff;
  }
}
.dg:not(.is-demo) .dg__after, .dg:not(.is-demo) .dg__ghost {
  display: none;
}

.dg__after {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
}

.dg__inkids {
  padding-left: 16px;
}

.dg__row--in {
  margin-bottom: 4px;
}

.dg__row--flash {
  border-color: #2f6df6;
  background: rgba(47, 109, 246, 0.08);
}

.dg__ghost {
  position: absolute;
  left: 24px;
  top: 65px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 24px;
  padding: 0 8px;
  border-radius: 4px;
  background: #fff;
  border: 1px solid rgba(23, 20, 26, 0.14);
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  font-size: 11px;
  font-weight: 700;
  color: #17141a;
  opacity: 0;
  pointer-events: none;
  z-index: 2;
}

.dg__ghost.is-live {
  position: fixed;
  opacity: 1;
}

.dg.is-demo .dg__list {
  animation-name: dg-list;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes dg-list {
  0% {
    opacity: 0;
  }
  4% {
    opacity: 1;
  }
  39.9% {
    opacity: 1;
  }
  40% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.dg.is-demo .dg__after {
  animation-name: dg-after;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes dg-after {
  0% {
    opacity: 0;
  }
  39.9% {
    opacity: 0;
  }
  40% {
    opacity: 1;
  }
  82% {
    opacity: 1;
  }
  94%, 100% {
    opacity: 0;
  }
}
.dg.is-demo .dg__ghost {
  animation-name: dg-ghost;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes dg-ghost {
  0%, 4% {
    opacity: 0;
    transform: translate(0, 0);
  }
  5% {
    opacity: 1;
  }
  6% {
    transform: translate(0, 0) scale(0.96);
  }
  34% {
    transform: translate(10px, -52px) scale(0.96);
  }
  39.9% {
    opacity: 1;
  }
  40%, 100% {
    opacity: 0;
    transform: translate(10px, -52px) scale(0.96);
  }
}
.dg.is-demo .dg__list .dg__f:first-child .dg__row {
  animation-name: dg-hot;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes dg-hot {
  0%, 29.9% {
    border-color: rgba(23, 20, 26, 0.1);
    box-shadow: none;
  }
  30%, 39.9% {
    border-color: #2f6df6;
    box-shadow: 0 0 0 2px rgba(47, 109, 246, 0.25);
  }
  40%, 100% {
    border-color: rgba(23, 20, 26, 0.1);
    box-shadow: none;
  }
}
@media (max-width: 340px) {
  .dg__row {
    height: 22px;
    font-size: 11px;
  }
  @keyframes dg-ghost {
    0%, 4% {
      opacity: 0;
      transform: translate(0, 0);
    }
    5% {
      opacity: 1;
    }
    6% {
      transform: translate(0, 0) scale(0.96);
    }
    34% {
      transform: translate(10px, -46px) scale(0.96);
    }
    39.9% {
      opacity: 1;
    }
    40%, 100% {
      opacity: 0;
      transform: translate(10px, -46px) scale(0.96);
    }
  }
}
@media (prefers-reduced-motion: reduce) {
  .dg.is-demo .dg__list, .dg.is-demo .dg__after, .dg.is-demo .dg__ghost, .dg.is-demo .dg__list .dg__f:first-child .dg__row {
    animation: none !important;
  }
  .dg__row, .dg__kids {
    transition: none;
  }
  .dg:not(.is-demo) .dg__after {
    display: none;
  }
}
