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

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

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

.sf__bar {
  position: relative;
  box-sizing: border-box;
  height: 28px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 40px 0 8px;
  margin-bottom: 8px;
  border-radius: 8px;
  background: #fff;
  border: 1px solid rgba(23, 20, 26, 0.14);
}

.sf__ico {
  display: inline-flex;
  flex: 0 0 auto;
  color: rgba(23, 20, 26, 0.45);
}

.sf__stack {
  position: relative;
  display: block;
  flex: 1;
  height: 28px;
}

.sf__t {
  position: absolute;
  left: 0;
  top: 0;
  line-height: 28px;
  font-size: 12px;
  font-weight: 600;
  opacity: 0;
}

.sf__t--0 {
  opacity: 1;
}

.sf__input {
  position: absolute;
  inset: 0;
  border: 0;
  padding: 0;
  background: transparent;
  font-family: inherit;
  font-size: 12px;
  line-height: 28px;
  font-weight: 600;
  color: #17141a;
  outline: none;
}

.sf.is-demo .sf__input::placeholder {
  color: transparent;
}

.sf:not(.is-demo) .sf__stack {
  display: none;
}

.sf__count {
  position: absolute;
  top: 6px;
  right: 0;
  height: 20px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  background: rgba(23, 20, 26, 0.08);
  overflow: hidden;
}

.sf__c, .sf__creal {
  position: absolute;
  right: 8px;
  font-size: 10px;
  line-height: 20px;
  font-weight: 800;
  white-space: nowrap;
}

.sf__c {
  opacity: 0;
}

.sf__c--0 {
  opacity: 1;
}

.sf__c--2 {
  color: #2f6df6;
}

.sf__tree {
  list-style: none;
  margin: 0;
  padding: 0;
}

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

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

.sf__row {
  box-sizing: border-box;
  height: 22px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 8px;
  margin-bottom: 4px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  user-select: none;
}

.sf__row:hover {
  background: rgba(23, 20, 26, 0.07);
}

.sf__row--deep {
  margin-left: 16px;
}

.sf__tree li:last-child .sf__row {
  margin-bottom: 0;
}

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

.sf__f .sf__fi {
  color: #2f6df6;
}

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

.sf__name--path {
  color: rgba(23, 20, 26, 0.45);
}

.sf__m {
  background: #ffd23f;
  color: #17141a;
  font-weight: 800;
}

.sf:not(.is-demo) .sf__hits {
  display: none;
}

.sf__hits {
  position: absolute;
  top: 36px;
  left: 0;
  right: 0;
  opacity: 0;
  pointer-events: none;
}

.sf.is-demo .sf__tree {
  animation-name: sf-full;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes sf-full {
  0%, 6% {
    opacity: 1;
  }
  16.9% {
    opacity: 1;
  }
  17% {
    opacity: 0;
  }
  92% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
.sf.is-demo .sf__hits {
  animation-name: sf-hit;
  animation-duration: 2s;
  animation-timing-function: linear;
  animation-iteration-count: infinite;
}

@keyframes sf-hit {
  0%, 16.9% {
    opacity: 0;
  }
  17% {
    opacity: 1;
  }
  80% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
}
.sf.is-demo .sf__t--0 {
  animation-name: sf-t0;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sf-t0 {
  0% {
    opacity: 1;
  }
  13% {
    opacity: 0;
  }
  92% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.sf.is-demo .sf__t--1 {
  animation-name: sf-t1;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sf-t1 {
  0% {
    opacity: 0;
  }
  13% {
    opacity: 1;
  }
  17% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.sf.is-demo .sf__t--2 {
  animation-name: sf-t2;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sf-t2 {
  0% {
    opacity: 0;
  }
  17% {
    opacity: 1;
  }
  92% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
.sf.is-demo .sf__c--0 {
  animation-name: sf-c0;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sf-c0 {
  0% {
    opacity: 1;
  }
  17% {
    opacity: 0;
  }
  92% {
    opacity: 1;
  }
  100% {
    opacity: 1;
  }
}
.sf.is-demo .sf__c--2 {
  animation-name: sf-c2;
  animation-duration: 2s;
  animation-timing-function: steps(1, end);
  animation-iteration-count: infinite;
}

@keyframes sf-c2 {
  0% {
    opacity: 0;
  }
  17% {
    opacity: 1;
  }
  92% {
    opacity: 0;
  }
  100% {
    opacity: 0;
  }
}
@media (max-width: 340px) {
  .sf__bar {
    height: 24px;
  }
  .sf__stack {
    height: 24px;
  }
  .sf__t {
    line-height: 24px;
  }
  .sf__input {
    line-height: 24px;
  }
  .sf__hits {
    top: 32px;
  }
  .sf__row {
    height: 20px;
    font-size: 11px;
  }
  .sf__row--deep {
    margin-left: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .sf.is-demo .sf__tree, .sf.is-demo .sf__hits, .sf.is-demo .sf__t, .sf.is-demo .sf__c {
    animation: none !important;
  }
}
