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

.fl {
  position: relative;
  box-sizing: border-box;
  width: min(100%, 440px);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  border-radius: 16px;
  background: rgb(16.2980392157%, 14.9647058824%, 16.5960784314%);
  color: #fff7e6;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
}

.fl__field {
  position: relative;
}

.fl__box {
  --ln: rgb(38.1333333333%, 36.3294117647%, 35.7960784314%);
  position: relative;
  z-index: 1;
  height: 52px;
  border-radius: 8px;
  background: rgb(13.568627451%, 12.2941176471%, 14.1960784314%);
  box-shadow: inset 0 0 0 1.5px var(--ln), 0 0 0 calc(var(--p, 0) * 3px) rgba(185, 160, 255, 0.3);
}

.fl__box[data-up] {
  --ln: #b9a0ff;
}

.fl__box::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  background: #b9a0ff;
  opacity: calc(var(--p, 0) * 0.12);
  pointer-events: none;
}

.fl__input {
  position: relative;
  z-index: 1;
  box-sizing: border-box;
  display: block;
  width: 100%;
  height: 100%;
  margin: 0;
  padding: 24px 12px 4px;
  border: 0;
  border-radius: inherit;
  background: transparent;
  color: #fff7e6;
  font-family: inherit;
  font-size: 16px;
  line-height: 24px;
  font-weight: 500;
  outline: none;
}

.fl__input:focus-visible {
  outline: 2px solid #b9a0ff;
  outline-offset: 2px;
}

.fl__label {
  position: absolute;
  left: 12px;
  top: 0;
  z-index: 2;
  line-height: 52px;
  font-size: 16px;
  font-weight: 500;
  color: #9a93a6;
  white-space: nowrap;
  transform-origin: 0 50%;
  pointer-events: none;
  will-change: transform;
}

.fl__box[data-up] .fl__label {
  color: #b9a0ff;
}

.fl__box {
  --ln: rgb(38.1333333333%, 36.3294117647%, 35.7960784314%);
}

.fl__box[data-open] {
  z-index: 6;
  --ln: #b9a0ff;
}

.fl__select {
  padding-right: 48px;
  text-align: left;
  cursor: pointer;
}

.fl__val {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.fl__chev {
  position: absolute;
  right: 12px;
  top: calc(50% - 12px);
  z-index: 2;
  width: 24px;
  height: 24px;
  color: #9a93a6;
  pointer-events: none;
  will-change: transform;
}

.fl__box[data-open] .fl__chev {
  color: #b9a0ff;
}

.fl__menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 5;
  box-sizing: border-box;
  height: 0;
  margin: 0;
  padding: 4px;
  overflow: hidden;
  list-style: none;
  border-radius: 8px;
  background: rgb(23.5764705882%, 22.0862745098%, 22.9960784314%);
  box-shadow: 0 6px 12px rgba(23, 20, 26, 0.32);
  opacity: 0;
  visibility: hidden;
}

.fl__menu--up {
  top: auto;
  bottom: calc(100% + 4px);
}

.fl__opt {
  box-sizing: border-box;
  height: 36px;
  padding: 0 12px;
  border-radius: 4px;
  font-size: 16px;
  line-height: 36px;
  color: #fff7e6;
  cursor: pointer;
}

.fl__opt[data-hi] {
  background: rgba(185, 160, 255, 0.2);
}

.fl__opt[aria-selected=true] {
  font-weight: 700;
}

@media (max-height: 250px) {
  .fl__field:nth-child(n+3) {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .fl__label, .fl__box {
    will-change: auto;
  }
}
