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

.cm {
  position: relative;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

.cm__field {
  width: clamp(190px, 60vw, 260px);
  height: 130px;
  border-radius: 16px;
  background: #17141a;
  color: #fff7e6;
  display: grid;
  place-items: center;
  padding: 12px;
  box-sizing: border-box;
  font: 600 14px/1.3 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  text-align: center;
  user-select: none;
}

.cm__hint {
  opacity: 0.8;
  font-weight: 500;
  font-size: 12px;
}

.cm__menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 168px;
  background: #ffffff;
  border-radius: 8px;
  box-shadow: 0 14px 24px rgba(23, 20, 26, 0.32);
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  transition: opacity 220ms ease-out;
  z-index: 5;
}
.cm__menu.is-open {
  opacity: 1;
  pointer-events: auto;
}

.cm__track {
  display: flex;
  width: 100%;
  transition: transform 300ms cubic-bezier(0.2, 1.4, 0.4, 1);
}

.cm__panel {
  flex: none;
  width: 168px;
  box-sizing: border-box;
  padding: 4px;
  display: grid;
  gap: 4px;
  align-content: start;
}

.cm__item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border: 0;
  background: none;
  border-radius: 4px;
  font: 500 13px/1.2 -apple-system, "Segoe UI", "Noto Sans KR", sans-serif;
  color: #17141a;
  cursor: pointer;
  text-align: left;
  width: 100%;
}
.cm__item:hover, .cm__item:focus-visible {
  background: rgba(23, 20, 26, 0.08);
}
.cm__item--back {
  color: rgba(23, 20, 26, 0.6);
  font-weight: 600;
}

.cm__caret {
  margin-left: auto;
  width: 12px;
  height: 12px;
  color: rgba(23, 20, 26, 0.55);
}

.cm__caret svg {
  display: block;
  width: 100%;
  height: 100%;
}

.cm__ic {
  width: 16px;
  height: 16px;
  flex: none;
  color: #2f6df6;
}
.cm__ic svg {
  display: block;
  width: 100%;
  height: 100%;
}

@media (max-width: 340px) {
  .cm__field {
    width: 176px;
    height: 108px;
    font-size: 12px;
    padding: 8px;
  }
  .cm__menu, .cm__panel {
    width: 144px;
  }
  .cm__item {
    padding: 4px 8px;
    font-size: 12px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .cm__menu, .cm__track {
    transition: none;
  }
}
